:root{--bg:#fff8fb;--bg-alt:#fff0f6;--panel:#fff;--ink:#493c46;--ink-soft:#8b7784;--line:#f2dbe6;--sakura:#f58bb5;--sakura-deep:#db5f91;--accent:#f58bb5;--accent2:#bca2ef;--cyan:#7bcbd1;--ok:#55b98c;--danger:#d95c70;--shadow:0 10px 30px rgba(157,105,132,.10)}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;min-height:100vh;color:var(--ink);font-family:'Noto Sans KR','Nanum Gothic',system-ui,sans-serif;background:linear-gradient(180deg,#fffafd 0,#fff6fa 50%,#fff 100%)}body:before{content:"";position:fixed;inset:0 0 auto;height:5px;background:linear-gradient(90deg,#f7a8c7,#d8c2f2,#a8dfe2);z-index:10}a{color:var(--sakura-deep);text-decoration:none}a:hover{text-decoration:underline}.wrap{max-width:820px;margin:0 auto;padding:0 20px 72px}.wrap.narrow{max-width:520px}header.hero{padding:48px 0 24px;text-align:center}.eyebrow{display:inline-flex;align-items:center;padding:7px 14px;border:1px solid #f1cfde;border-radius:999px;background:#fff;color:var(--sakura-deep);font-size:12px;font-weight:800;letter-spacing:.04em;box-shadow:0 4px 14px rgba(213,107,153,.08)}h1{margin:14px 0 8px;font-size:clamp(28px,6vw,42px);line-height:1.2;font-weight:900;letter-spacing:-.04em;color:#4d3c47}.sub{font-size:14px;line-height:1.75;color:var(--ink-soft);margin:0 0 16px}.card{position:relative;background:#fff;border:1px solid var(--line);border-radius:18px;margin:14px 0;padding:20px;box-shadow:var(--shadow)}.card:after{content:"🌸";position:absolute;right:14px;top:11px;font-size:12px;opacity:.18}.field{margin-bottom:15px}.field label{display:block;font-size:13px;color:#725d6b;margin-bottom:7px;font-weight:800}.field input[type=text],.field input[type=password],.field input[type=email],.field input[type=number],.field select,.field textarea{width:100%;padding:12px 13px;border:1px solid #ead4df;border-radius:11px;font-size:14px;background:#fffafd;color:var(--ink);font-family:inherit;transition:.15s}.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:#ef9dbd;box-shadow:0 0 0 3px rgba(245,139,181,.13);background:#fff}.field input[type=file]{font-size:13px;color:var(--ink-soft)}.help{display:block;margin-top:7px;color:#9a8491;font-size:12px;line-height:1.55}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:linear-gradient(135deg,#f28bb4,#e675a3);color:#fff!important;text-decoration:none!important;border:1px solid #e87da9;border-radius:11px;padding:10px 18px;font-size:14px;font-weight:800;cursor:pointer;box-shadow:0 6px 16px rgba(225,105,154,.17);transition:.15s}.btn:hover{transform:translateY(-1px);filter:brightness(1.02)}.btn-outline{background:#fff;color:#c65d89!important;border:1px solid #edc7d8;box-shadow:none}.btn-outline:hover{background:#fff5f9}.btn-danger{background:#fff;color:#c94f63!important;border:1px solid #e9a7b1;box-shadow:none}.btn-danger:hover{background:#fff1f3}.qno,.q-order{display:inline-flex!important;align-items:center;font-family:inherit!important;font-size:11px!important;font-weight:900;color:#c95887!important;background:#fff0f6!important;border:1px solid #f1cddd!important;border-radius:999px!important;padding:6px 10px!important;margin-bottom:10px}.qtext{font-weight:800;font-size:18px;line-height:1.6;margin:0 0 14px;color:#493c46}.qimg{border-radius:14px;overflow:hidden;background:#fff7fa;border:1px solid var(--line);margin-bottom:14px;aspect-ratio:16/10;display:flex;align-items:center;justify-content:center}.qimg img{width:100%;height:100%;object-fit:cover;display:block}.choice-list{display:grid;grid-template-columns:1fr 1fr;gap:9px}.choice-list label{border:1px solid #ecd8e2;border-radius:12px;padding:12px 13px;font-size:14px;background:#fffafd;display:flex;align-items:center;gap:9px;cursor:pointer;transition:.15s}.choice-list label:hover{border-color:#eca9c4;background:#fff4f8}.choice-list input[type=radio]{accent-color:var(--sakura)}.choice-list label.correct{background:#effbf5;border-color:#94d6b7;color:#348661;font-weight:800}.choice-list label.wrong,.choice-list label.picked-wrong{background:#fff1f3;border-color:#eba6b0;color:#c54c61}.remove-q{float:right;color:#c94f63;background:#fff;border:1px solid #efc5cc;border-radius:8px;cursor:pointer;font-size:12px;font-weight:800;padding:6px 10px}.remove-q:hover{background:#fff1f3}.alert,.saved-banner{padding:12px 15px;border-radius:12px;font-size:13px;font-weight:700;margin-bottom:12px}.alert.danger{background:#fff1f3;border:1px solid #efc2ca;color:#bd4459}.saved-banner{background:#fff1f7;color:#c45683;border:1px solid #efcedc}.pkg-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}.pkg-row:last-child{border-bottom:0}.pkg-title{font-weight:800;font-size:15px;margin:0 0 5px}.pkg-meta{font-size:12px;color:var(--ink-soft);margin:0}.pkg-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.pkg-actions .btn{padding:8px 12px;font-size:12px}.mini-key{width:130px;padding:8px 10px;border:1px solid #ead4df;border-radius:9px;background:#fffafd;font-family:inherit;font-size:12px}.delete-form{display:inline-flex!important;align-items:center;gap:6px}.pkg-inactive{opacity:.55}.badge-off{display:inline-block;background:#f5eff2;color:#8f7a86;font-size:11px;padding:2px 8px;border-radius:999px;margin-left:6px}.result-hero{text-align:center;padding:36px 0}.result-score{font-size:42px;font-weight:900;color:var(--sakura-deep);margin:12px 0}.result-point{display:inline-flex;background:#fff1f7;color:#c45683;border:1px solid #efcedc;padding:8px 18px;border-radius:999px;font-size:14px;font-weight:800}.q-add-row{border-top:1px dashed #e8cbd8;padding-top:16px;margin-top:16px}
@media(max-width:650px){.wrap{padding:0 12px 48px}header.hero{padding-top:34px}.card{padding:16px;border-radius:15px}.choice-list{grid-template-columns:1fr}.pkg-row{align-items:flex-start;flex-direction:column}.pkg-actions{width:100%}.pkg-actions .btn{flex:1}.delete-form{width:100%}.mini-key{flex:1;min-width:120px}}

/* 2026 refresh — soft moe community inspired UI */
:root{--bg:#fff9fc;--bg-alt:#fff1f7;--panel:#ffffff;--ink:#40353d;--ink-soft:#8c7a85;--line:#f1dce6;--sakura:#f27fab;--sakura-deep:#d8588c;--accent:#f27fab;--accent2:#c8b3f3;--cyan:#9ddce0;--ok:#57b98d;--danger:#cf5268;--shadow:0 12px 36px rgba(174,107,140,.11)}
html{scroll-behavior:smooth}body{background:radial-gradient(circle at 8% 3%,rgba(255,207,226,.34),transparent 23rem),radial-gradient(circle at 92% 13%,rgba(211,199,248,.28),transparent 25rem),linear-gradient(180deg,#fffafd 0,#fff7fb 48%,#fff 100%);letter-spacing:-.015em}body:after{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;background-image:radial-gradient(circle,rgba(242,127,171,.11) 1px,transparent 1.2px);background-size:26px 26px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),transparent 58%)}
.wrap{max-width:960px;padding:0 22px 84px}header.hero{padding:64px 0 30px}.eyebrow{padding:8px 15px;background:rgba(255,255,255,.88);backdrop-filter:blur(8px);border-color:#f1cfdd;box-shadow:0 7px 24px rgba(213,107,153,.10)}h1{font-size:clamp(30px,6vw,46px);color:#453740;text-shadow:0 2px 0 #fff}.sub{font-size:14px;color:#907b87}.card{border-color:rgba(239,211,224,.92);border-radius:22px;padding:24px;background:rgba(255,255,255,.94);box-shadow:0 12px 35px rgba(164,99,132,.10),inset 0 1px 0 #fff;backdrop-filter:blur(10px)}.card:after{content:"✿";font-size:14px;color:#ee9cbd;opacity:.28}.card:hover{border-color:#edccdc}
.field label{color:#68545f}.field input[type=text],.field input[type=password],.field input[type=email],.field input[type=number],.field select,.field textarea{min-height:46px;border-color:#ecd6e1;border-radius:13px;background:#fffbfd;box-shadow:inset 0 1px 2px rgba(112,68,88,.025)}.field input:hover,.field select:hover,.field textarea:hover{border-color:#e8bfd1}.field input:focus,.field select:focus,.field textarea:focus{border-color:#ed8fb5;box-shadow:0 0 0 4px rgba(242,127,171,.12)}
.btn{min-height:42px;border-radius:12px;padding:10px 19px;background:linear-gradient(135deg,#f38cb4,#e96e9f);border-color:#e879a5;box-shadow:0 7px 18px rgba(222,91,145,.17)}.btn:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(222,91,145,.21)}.btn-outline{background:#fff;color:#c95c88!important;border-color:#edc8d8;box-shadow:0 4px 12px rgba(170,104,135,.06)}.btn-outline:hover{background:#fff5f9}.btn-danger{background:#fff;color:#c64e64!important;border-color:#e9a8b4}.btn-danger:hover{background:#fff1f4}.pkg-row{padding:18px 2px!important}.pkg-title{font-size:16px!important;color:#493943}.pkg-meta{line-height:1.65}.mini-key{min-height:38px;border-color:#ead4df;background:#fffbfd}.qimg{border-radius:17px}.choice-list label{min-height:48px;border-radius:14px;background:#fffbfd}.choice-list label:hover{transform:translateY(-1px);box-shadow:0 5px 13px rgba(190,116,149,.07)}
@media(max-width:650px){.wrap{padding:0 13px 56px}header.hero{padding-top:44px}.card{padding:18px;border-radius:18px}.pkg-actions{gap:7px}.pkg-actions .btn{min-width:0}.delete-form{display:grid!important;grid-template-columns:1fr auto}.mini-key{width:100%}}

/* Moe-style media upload buttons */
.field input[type=file]{
  width:100%;min-height:54px;padding:7px 9px;border:1px dashed #e8bfd1;border-radius:14px;
  background:linear-gradient(135deg,#fffafd,#fff4f9);color:#927b88;font-family:inherit;font-size:12px;
  cursor:pointer;transition:border-color .15s,box-shadow .15s,background .15s
}
.field input[type=file]:hover{border-color:#ed8fb5;background:#fff7fb;box-shadow:0 5px 16px rgba(222,91,145,.08)}
.field input[type=file]:focus{outline:none;border-color:#ed8fb5;box-shadow:0 0 0 4px rgba(242,127,171,.12)}
.field input[type=file]::file-selector-button{
  min-height:38px;margin-right:12px;padding:8px 15px;border:1px solid #e9b9ce;border-radius:10px;
  background:linear-gradient(135deg,#fff,#fff0f6);color:#c85887;font-family:inherit;font-size:12px;font-weight:800;
  cursor:pointer;box-shadow:0 4px 12px rgba(190,93,135,.08);transition:.15s
}
.field input[type=file]::file-selector-button:hover{background:linear-gradient(135deg,#fff6fa,#ffeaf3);border-color:#e99abb;transform:translateY(-1px)}
.field input[name="q_audio[]"]{border-color:#d9cff3;background:linear-gradient(135deg,#fdfbff,#f7f3ff)}
.field input[name="q_audio[]"]:hover,.field input[name="q_audio[]"]:focus{border-color:#bca2ef}
.field input[name="q_audio[]"]::file-selector-button{border-color:#d5c7f3;background:linear-gradient(135deg,#fff,#f2edff);color:#8067b9}
.field input[name="q_audio[]"]::file-selector-button:hover{background:linear-gradient(135deg,#faf8ff,#ece5ff);border-color:#bca2ef}
@media(max-width:650px){.field input[type=file]{padding:7px}.field input[type=file]::file-selector-button{margin-right:8px;padding:8px 11px}}



/* Sakura dialog / error UI */
.moe-dialog-root{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:18px;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .18s ease,visibility .18s ease}.moe-dialog-root.show{visibility:visible;opacity:1;pointer-events:auto}.moe-dialog-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(83,57,72,.28);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}.moe-dialog{position:relative;width:min(430px,100%);overflow:hidden;padding:30px 26px 24px;border:1px solid rgba(239,190,212,.95);border-radius:25px;background:linear-gradient(155deg,rgba(255,255,255,.98),rgba(255,245,250,.97));box-shadow:0 24px 70px rgba(137,72,105,.22),inset 0 1px 0 #fff;text-align:center;transform:translateY(10px) scale(.98);transition:.2s ease}.moe-dialog-root.show .moe-dialog{transform:none}.moe-dialog:before,.moe-error-card:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 8% 12%,rgba(247,166,198,.20),transparent 22%),radial-gradient(circle at 92% 4%,rgba(218,202,249,.24),transparent 25%)}.moe-dialog-petals{position:absolute;right:18px;top:14px;font-size:22px;opacity:.28;transform:rotate(14deg)}.moe-dialog-icon{position:relative;display:grid;place-items:center;width:58px;height:58px;margin:0 auto 13px;border:1px solid #f1cadb;border-radius:50%;background:linear-gradient(145deg,#fff,#ffeaf3);color:#df6999;font-size:28px;box-shadow:0 8px 20px rgba(222,105,154,.13)}.moe-dialog-title{position:relative;margin:0 0 9px;color:#4b3944;font-size:21px;font-weight:900;letter-spacing:-.04em}.moe-dialog-message{position:relative;margin:0;color:#806b77;font-size:14px;line-height:1.8;white-space:pre-line;word-break:keep-all}.moe-dialog-actions{position:relative;display:flex;justify-content:center;gap:9px;margin-top:22px}.moe-dialog-actions button{min-width:96px;min-height:43px;padding:9px 17px;border-radius:13px;font-family:inherit;font-size:13px;font-weight:900;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-align:center}.moe-dialog-ok{border:1px solid #e77ca8;background:linear-gradient(135deg,#f491b8,#e86f9f);color:#fff;box-shadow:0 7px 17px rgba(218,91,143,.18)}.moe-dialog-cancel{border:1px solid #edccda;background:#fff;color:#a66f87}.moe-error-page{margin:0;min-height:100vh;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at 12% 8%,rgba(255,199,221,.42),transparent 25rem),radial-gradient(circle at 88% 10%,rgba(217,205,249,.34),transparent 24rem),linear-gradient(180deg,#fffafd,#fff3f8 62%,#fff);font-family:'Noto Sans KR','Nanum Gothic',system-ui,sans-serif;color:#493c46}.moe-error-card{position:relative;width:min(540px,100%);overflow:hidden;padding:38px 30px 30px;border:1px solid #f0cede;border-radius:28px;background:rgba(255,255,255,.94);box-shadow:0 22px 65px rgba(146,82,113,.16);text-align:center}.moe-error-flower{position:relative;font-size:45px;filter:drop-shadow(0 5px 9px rgba(213,98,148,.15))}.moe-error-card h1{position:relative;margin:12px 0 10px;font-size:24px;color:#493842}.moe-error-card p{position:relative;margin:0;color:#806c78;font-size:14px;line-height:1.8;white-space:pre-line;word-break:keep-all}.moe-error-home{position:relative;display:inline-flex;align-items:center;justify-content:center;margin-top:23px;min-height:44px;padding:10px 21px;border:1px solid #e87ca8;border-radius:13px;background:linear-gradient(135deg,#f38cb4,#e96e9f);color:#fff!important;text-decoration:none!important;font-size:13px;font-weight:900;box-shadow:0 8px 18px rgba(222,91,145,.17)}
@media(max-width:520px){.moe-dialog{padding:27px 19px 21px;border-radius:21px}.moe-dialog-actions{flex-direction:column-reverse}.moe-dialog-actions button{width:100%}.moe-error-card{padding:31px 20px 24px;border-radius:22px}}

/* play.php 문제 이미지: 가로 100% + 원본 비율 유지 + 상/하 여백 동일 */
.qimg{
  width:100%;
  height:auto;
  aspect-ratio:auto;
  margin:14px 0;
  padding:0;
  overflow:hidden;
  display:block;
  background:#fff7fa;
}
.qimg img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  max-height:none;
  margin:0;
  object-fit:contain;
  object-position:center;
}

/* 시험 보기 버튼: 기본 버튼 대비 약 1.5배 너비 */
.pkg-actions .btn-play{min-width:120px;}
@media(max-width:650px){.pkg-actions .btn-play{flex:1.5 1 0;min-width:120px;max-width:100%;}}

/* 시험 목록: 이미지 크기에 관계없이 레이아웃을 유지하는 좌측 썸네일 */
.pkg-row {min-width:0;}
.pkg-info {display:grid;grid-template-columns:112px minmax(0,1fr);column-gap:14px;align-items:center;flex:1 1 0;min-width:0;}
.pkg-info .pkg-title,.pkg-info .pkg-meta {grid-column:2;min-width:0;overflow-wrap:anywhere;}
.pkg-info .pkg-title {align-self:end;}
.pkg-info .pkg-meta {align-self:start;}
.pkg-thumb {grid-column:1;grid-row:1 / span 2;width:112px;height:112px;max-width:100%;min-width:0;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:13px;border:1px solid #f0d8e3;background:#fff5fa;}
.pkg-thumb img {display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;}
.pkg-thumb-empty {color:#df96b7;font-size:32px;}
.pkg-actions {flex:0 0 auto;}
@media(max-width:650px) {.pkg-info{width:100%;grid-template-columns:88px minmax(0,1fr);column-gap:12px}.pkg-thumb{width:88px;height:88px}.pkg-actions{max-width:100%;}}

/* Representative thumbnail: equal horizontal/vertical breathing room and true centering */
.pkg-thumb{padding:8px!important;align-items:center!important;justify-content:center!important;}
.pkg-thumb img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:50% 50%!important;}

.pkg-title-link{color:inherit;text-decoration:none;font-weight:inherit}.pkg-title-link:hover,.pkg-title-link:focus-visible{color:var(--sakura-deep);text-decoration:underline;text-underline-offset:3px}.pkg-title-link:focus-visible{outline:2px solid #ef9dbd;outline-offset:3px;border-radius:4px}


/* SEO + GEO + AEO + SXO: 검색 의도를 즉시 해결하는 가독성 높은 설명/FAQ */
.seo-answer,.seo-faq{line-height:1.75}.seo-answer h2,.seo-faq h2{margin:0 0 10px;font-size:1.25rem}.seo-answer p,.seo-faq p{margin:0;color:#665968}.seo-faq details{padding:12px 0;border-top:1px solid var(--line)}.seo-faq details:first-of-type{border-top:0}.seo-faq summary{cursor:pointer;font-weight:400;color:#514452}.seo-faq details p{padding-top:8px}.pkg-title-link:focus-visible,.btn:focus-visible,.seo-faq summary:focus-visible{outline:3px solid currentColor;outline-offset:3px}

/* FAQ 문항: 클릭 가능함을 나타내는 손가락 커서 */
.seo-faq summary {
  cursor: pointer;
}


/* ===== Theme system: Light / Dark ===== */
:root{
  color-scheme: light dark;
  --theme-bg:#fff8fb;
  --theme-bg-alt:#fff0f6;
  --theme-panel:#ffffff;
  --theme-panel-soft:#fffafd;
  --theme-ink:#493c46;
  --theme-muted:#8b7784;
  --theme-line:#f2dbe6;
  --theme-input:#fffafd;
}
html[data-theme="light"]{
  color-scheme:light;
  --theme-bg:#fff8fb;--theme-bg-alt:#fff0f6;--theme-panel:#fff;--theme-panel-soft:#fffafd;
  --theme-ink:#493c46;--theme-muted:#8b7784;--theme-line:#f2dbe6;--theme-input:#fffafd;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --theme-bg:#121016;--theme-bg-alt:#1b151d;--theme-panel:#211b23;--theme-panel-soft:#19151b;
  --theme-ink:#f5edf3;--theme-muted:#b9aab7;--theme-line:#40323f;--theme-input:#18141a;
}
@media (prefers-color-scheme:dark){
  html:not([data-theme]){
    --theme-bg:#121016;--theme-bg-alt:#1b151d;--theme-panel:#211b23;--theme-panel-soft:#19151b;
    --theme-ink:#f5edf3;--theme-muted:#b9aab7;--theme-line:#40323f;--theme-input:#18141a;
  }
}
html,body{background-color:var(--theme-bg)}
body{
  color:var(--theme-ink);
  background:linear-gradient(180deg,var(--theme-bg-alt) 0%,var(--theme-bg) 52%,var(--theme-bg) 100%);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .field input[type=text],
html[data-theme="dark"] .field input[type=password],
html[data-theme="dark"] .field input[type=email],
html[data-theme="dark"] .field input[type=number],
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .choice-list label,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-danger,
html[data-theme="dark"] .remove-q{
  background:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-line);
}
html[data-theme="dark"] .card{box-shadow:0 12px 32px rgba(0,0,0,.28)}
html[data-theme="dark"] h1,
html[data-theme="dark"] .qtext{color:var(--theme-ink)}
html[data-theme="dark"] .sub,
html[data-theme="dark"] .pkg-meta,
html[data-theme="dark"] .help,
html[data-theme="dark"] .field label{color:var(--theme-muted)}
html[data-theme="dark"] .eyebrow{background:var(--theme-panel);border-color:var(--theme-line)}
html[data-theme="dark"] .qimg{background:var(--theme-panel-soft);border-color:var(--theme-line)}
html[data-theme="dark"] .choice-list label{background:var(--theme-panel-soft)}
html[data-theme="dark"] .choice-list label:hover{background:#2a2029;border-color:#9d5b78}
html[data-theme="dark"] .btn-outline:hover{background:#2a2029}
html[data-theme="dark"] .btn-danger:hover{background:#2a2029}
html[data-theme="dark"] .qno,html[data-theme="dark"] .q-order{background:#2b1c27!important;border-color:#5b3447!important}
html[data-theme="dark"] .alert.danger{background:#321d24;border-color:#68404a;color:#f2aab6}
html[data-theme="dark"] .saved-banner{background:#30202a;border-color:#5b3a49;color:#e8a4bf}
html[data-theme="dark"] .choice-list label.correct{background:#183027;border-color:#39765d;color:#91dfbb}
html[data-theme="dark"] .choice-list label.wrong,
html[data-theme="dark"] .choice-list label.picked-wrong{background:#351f25;border-color:#74414b;color:#f0a4af}
html[data-theme="dark"] .remove-q:hover{background:#351f25}
html[data-theme="dark"] .pkg-row{border-color:var(--theme-line)}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#827583}
html[data-theme="dark"] .field input:focus,html[data-theme="dark"] .field select:focus,html[data-theme="dark"] .field textarea:focus{background:#211b23}

/* Theme toggle */
.theme-toggle{
  position:fixed;top:14px;right:14px;z-index:9999;
  display:inline-flex;align-items:center;gap:7px;padding:8px 12px;
  border:1px solid var(--theme-line);border-radius:999px;
  background:var(--theme-panel);color:var(--theme-ink);
  box-shadow:0 5px 18px rgba(80,50,70,.12);font:700 12px/1 inherit;
  cursor:pointer;transition:background .2s,color .2s,border-color .2s,transform .15s;
}
.theme-toggle:hover{transform:translateY(-1px)}
.theme-toggle .theme-icon{font-size:15px;line-height:1}
@media(max-width:600px){.theme-toggle{top:9px;right:9px;padding:7px 10px}.theme-toggle .theme-label{display:none}}

/* Result page: support both themes */
body:has(.result-shell){
  --result-bg:#fff8fb;--result-panel:rgba(255,255,255,.96);--result-line:#ead9e4;
  --result-ink:#493c46;--result-muted:#8b7784;--result-soft:#fffafd;
  background:var(--result-bg)!important;color:var(--result-ink)!important;
}
body:has(.result-shell) .page-bg{
  background:radial-gradient(circle at 15% 0%,rgba(188,162,239,.18),transparent 35%),radial-gradient(circle at 90% 15%,rgba(245,139,181,.18),transparent 30%),linear-gradient(180deg,#fffafd,#fff8fb)!important;
}
body:has(.result-shell) .page-dim{
  background-image:linear-gradient(rgba(188,162,239,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(188,162,239,.07) 1px,transparent 1px)!important;
}
body:has(.result-shell) .glass{background:var(--result-panel)!important;border-color:var(--result-line)!important;box-shadow:0 18px 50px rgba(90,55,80,.12)!important}
body:has(.result-shell) .hero-head h1{background:linear-gradient(90deg,#493c46,#d45f91,#7b68b1)!important;-webkit-background-clip:text!important;background-clip:text!important}
body:has(.result-shell) .hero-head p,
body:has(.result-shell) .score-box span,
body:has(.result-shell) .ranking li,
body:has(.result-shell) .question-card,
body:has(.result-shell) .summary{color:var(--result-ink)}
body:has(.result-shell) .summary-grid,
body:has(.result-shell) .result-message,
body:has(.result-shell) .answer,
body:has(.result-shell) .medal{background:var(--result-soft)!important;border-color:var(--result-line)!important;color:var(--result-ink)!important}
body:has(.result-shell) .ranking li{border-bottom-color:var(--result-line)!important}
body:has(.result-shell) .site-pill{background:#fff0f6!important;color:#c85884!important;border-color:#e9cbd9!important}
html[data-theme="dark"] body:has(.result-shell){
  --result-bg:#080b16;--result-panel:rgba(17,25,47,.94);--result-line:#2b395b;
  --result-ink:#f7f8ff;--result-muted:#a2adca;--result-soft:#0e162a;
  background:var(--result-bg)!important;color:var(--result-ink)!important;
}
html[data-theme="dark"] body:has(.result-shell) .page-bg{
  background:radial-gradient(circle at 15% 0%,rgba(139,92,246,.25),transparent 35%),radial-gradient(circle at 90% 15%,rgba(255,79,163,.2),transparent 30%),linear-gradient(180deg,#090d19,#080b16)!important;
}
html[data-theme="dark"] body:has(.result-shell) .page-dim{
  background-image:linear-gradient(rgba(55,215,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(55,215,255,.05) 1px,transparent 1px)!important;
}


/* ===== Dark mode readability patch ===== */
html[data-theme="dark"]{
  --ink:#f7eef4;
  --ink-soft:#c8b9c4;
  --line:#4a3b49;
  --theme-bg:#100d12;
  --theme-bg-alt:#19131b;
  --theme-panel:#241d27;
  --theme-panel-soft:#1b161e;
  --theme-ink:#f7eef4;
  --theme-muted:#c8b9c4;
  --theme-line:#4a3b49;
  --theme-input:#1b161e;
}
html[data-theme="dark"] body{
  color:#f7eef4!important;
  background:linear-gradient(180deg,#19131b 0%,#100d12 55%,#100d12 100%)!important;
}
html[data-theme="dark"] a{color:#ff9fc4}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .qtext,
html[data-theme="dark"] .pkg-title,
html[data-theme="dark"] .seo-answer h2,
html[data-theme="dark"] .seo-faq h2{
  color:#fff5fa!important;
}
html[data-theme="dark"] .sub,
html[data-theme="dark"] .help,
html[data-theme="dark"] .pkg-meta,
html[data-theme="dark"] .seo-answer p,
html[data-theme="dark"] .seo-faq p,
html[data-theme="dark"] .field label,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer p{
  color:#cbbbc7!important;
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .pkg-row,
html[data-theme="dark"] .seo-faq details{
  border-color:#4a3b49!important;
}
html[data-theme="dark"] .card{
  background:#241d27!important;
  color:#f7eef4!important;
}
html[data-theme="dark"] .field input[type=text],
html[data-theme="dark"] .field input[type=password],
html[data-theme="dark"] .field input[type=email],
html[data-theme="dark"] .field input[type=number],
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .mini-key,
html[data-theme="dark"] .choice-list label{
  background:#1b161e!important;
  color:#f7eef4!important;
  border-color:#514252!important;
}
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder{
  color:#9f8d9c!important;
  opacity:1!important;
}
html[data-theme="dark"] .field input[type=file]{
  background:#1b161e!important;
  color:#c8b9c4!important;
  border-color:#5a4655!important;
}
html[data-theme="dark"] .field input[type=file]::file-selector-button{
  background:#30232d!important;
  color:#ffc0d9!important;
  border-color:#624957!important;
}
html[data-theme="dark"] .choice-list label{color:#f7eef4!important}
html[data-theme="dark"] .choice-list label:hover{background:#30232d!important;color:#fff!important}
html[data-theme="dark"] .qno,
html[data-theme="dark"] .q-order{
  color:#ffafd0!important;
  background:#34212c!important;
  border-color:#69465a!important;
}
html[data-theme="dark"] .qimg,
html[data-theme="dark"] .pkg-thumb{
  background:#17131a!important;
  border-color:#4a3b49!important;
}
html[data-theme="dark"] .pkg-title-link{color:#fff5fa!important}
html[data-theme="dark"] .pkg-title-link:hover,
html[data-theme="dark"] .pkg-title-link:focus-visible{color:#ff9fc4!important}
html[data-theme="dark"] .badge-off{
  background:#302a31!important;
  color:#c5b7c1!important;
}
html[data-theme="dark"] .btn-outline{
  background:#2b222b!important;
  color:#ffafd0!important;
  border-color:#66495a!important;
}
html[data-theme="dark"] .btn-danger,
html[data-theme="dark"] .remove-q{
  background:#302126!important;
  color:#ffb1bd!important;
  border-color:#75414d!important;
}
html[data-theme="dark"] .btn-outline:hover{background:#392a35!important}
html[data-theme="dark"] .btn-danger:hover,
html[data-theme="dark"] .remove-q:hover{background:#43252d!important}
html[data-theme="dark"] .alert.danger{
  background:#3a2028!important;
  color:#ffb5c0!important;
  border-color:#754652!important;
}
html[data-theme="dark"] .saved-banner{
  background:#38242f!important;
  color:#ffb5d1!important;
  border-color:#68465a!important;
}
html[data-theme="dark"] .choice-list label.correct{
  background:#19382d!important;
  color:#a8ebca!important;
  border-color:#438367!important;
}
html[data-theme="dark"] .choice-list label.wrong,
html[data-theme="dark"] .choice-list label.picked-wrong{
  background:#402329!important;
  color:#ffb1bc!important;
  border-color:#824a56!important;
}
html[data-theme="dark"] .notice{
  background:#2d2029!important;
  color:#f3e7ee!important;
  border-color:#4e3b48!important;
}
html[data-theme="dark"] .notice.err{
  background:#402128!important;
  color:#ffb8c3!important;
  border-color:#754652!important;
}
html[data-theme="dark"] .theme-toggle{
  background:#2a212a!important;
  color:#fff5fa!important;
  border-color:#594653!important;
}
html[data-theme="dark"] .theme-toggle:hover{background:#372b35!important}
html[data-theme="dark"] .moe-dialog{
  background:linear-gradient(155deg,#2a222b,#211a23)!important;
  color:#f7eef4!important;
  border-color:#5a4554!important;
}
html[data-theme="dark"] .moe-dialog-title{color:#fff5fa!important}
html[data-theme="dark"] .moe-dialog-message{color:#d0c0cb!important}
html[data-theme="dark"] .moe-dialog-cancel{background:#30262f!important;color:#ffc0d8!important;border-color:#614b59!important}
html[data-theme="dark"] .moe-error-page{
  background:linear-gradient(180deg,#19131b,#100d12)!important;
  color:#f7eef4!important;
}
html[data-theme="dark"] .moe-error-card{background:#241d27!important;border-color:#4a3b49!important}
html[data-theme="dark"] .moe-error-card h1{color:#fff5fa!important}
html[data-theme="dark"] .moe-error-card p{color:#cbbbc7!important}
html[data-theme="dark"] .seo-faq summary{color:#fff0f7!important}
html[data-theme="dark"] .seo-faq details p{color:#cbbbc7!important}
html[data-theme="dark"] .otaku-site-status-footer{color:#bcaab7!important}
html[data-theme="dark"] .otaku-site-status-footer a{color:#ff9fc4!important}


/* ===== Final dark-mode font/readability + index test-number fix ===== */
html,body{
  font-family:"Noto Sans KR","Malgun Gothic","Apple SD Gothic Neo","Nanum Gothic","Segoe UI",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
  font-synthesis:none;
}

.pkg-number{
  position:absolute;
  top:8px;
  left:10px;
  z-index:20;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:32px;
  min-height:27px;
  padding:4px 9px;
  border-radius:999px;
  background:#fff!important;
  color:#b83f70!important;
  border:1px solid #efc3d5;
  box-shadow:0 2px 9px rgba(80,35,60,.16);
  font-family:"Noto Sans KR","Malgun Gothic","Apple SD Gothic Neo","Nanum Gothic","Segoe UI",sans-serif!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:-.02em;
  text-align:center;
  white-space:nowrap;
  opacity:1!important;
  visibility:visible!important;
  transform:translateZ(0);
  pointer-events:none;
}

html[data-theme="dark"] .pkg-number{
  background:#35212d!important;
  color:#ffd1e2!important;
  border-color:#7b4d63!important;
  box-shadow:0 2px 10px rgba(0,0,0,.42),0 0 0 1px rgba(255,175,208,.06);
  text-shadow:none!important;
}

html[data-theme="dark"] .pkg-row .pkg-number{
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
}

html[data-theme="dark"] .pkg-title,
html[data-theme="dark"] .pkg-meta,
html[data-theme="dark"] .seo-answer p,
html[data-theme="dark"] .seo-faq summary,
html[data-theme="dark"] .seo-faq details p,
html[data-theme="dark"] strong{
  text-shadow:none!important;
  -webkit-text-fill-color:currentColor!important;
}

html[data-theme="dark"] .pkg-title-link,
html[data-theme="dark"] .pkg-title-link:visited{
  color:#fff5fa!important;
  -webkit-text-fill-color:#fff5fa!important;
}

html[data-theme="dark"] .pkg-meta{color:#d2c4cf!important;}
html[data-theme="dark"] .seo-faq summary{color:#fff0f7!important;}
html[data-theme="dark"] .seo-answer p,
html[data-theme="dark"] .seo-faq details p{color:#d2c4cf!important;}

/* ===== Unified Sakura UI: consistent site-wide design ===== */
:root{--bg:#fff8fb;--bg-alt:#fff1f7;--panel:#fff;--ink:#493c46;--ink-soft:#8b7784;--line:#f1dce6;--sakura:#f27fab;--sakura-deep:#d8588c;--accent:#f27fab;--accent2:#bca2ef;--cyan:#8bcfd4;--ok:#55ad83;--danger:#cf5268;--shadow:0 12px 34px rgba(174,107,140,.10)}
html{scroll-behavior:smooth;background:var(--bg)}
body{font-family:'Noto Sans KR','Nanum Gothic',system-ui,sans-serif;letter-spacing:-.015em}
.wrap{max-width:960px}
header.hero{padding-top:54px}
.eyebrow{color:var(--sakura-deep);border-color:var(--line);background:rgba(255,255,255,.9)}
h1{letter-spacing:-.045em}
.card{border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);background:rgba(255,255,255,.94)}
.card:after{color:var(--sakura);opacity:.22}
.site-intro-copy{border-color:var(--line)!important;border-radius:16px!important;background:rgba(255,255,255,.88)!important;color:#685764!important;box-shadow:0 8px 24px rgba(174,107,140,.06)}
.field label{color:#68545f}
.field input[type=text],.field input[type=password],.field input[type=email],.field input[type=number],.field select,.field textarea,.mini-key{border-color:var(--line);border-radius:12px;background:#fffbfd;color:var(--ink)}
.btn{border-radius:12px;background:linear-gradient(135deg,#f38cb4,#df6698);border-color:#e879a5;box-shadow:0 6px 16px rgba(222,91,145,.15)}
.btn-outline{background:#fff;color:#c95c88!important;border-color:#edc8d8;box-shadow:none}
.btn-danger{background:#fff;color:#c64e64!important;border-color:#e9a8b4;box-shadow:none}
.choice-list label{border-color:var(--line);background:#fffbfd;border-radius:13px}
.qimg,.pkg-thumb{border-color:var(--line);background:#fff7fa}
.pkg-row{border-color:var(--line)}
.seo-answer,.seo-faq{border-color:var(--line)}
.site-footer,.otaku-policy-links{color:var(--ink-soft)}
html[data-theme="dark"] body{color:#f7eef4!important;background:linear-gradient(180deg,#19131b 0%,#100d12 55%,#100d12 100%)!important}
html[data-theme="dark"] .card,html[data-theme="dark"] .site-intro-copy{background:rgba(36,29,39,.96)!important;border-color:#4a3b49!important;color:#f7eef4!important}
html[data-theme="dark"] .field input[type=text],html[data-theme="dark"] .field input[type=password],html[data-theme="dark"] .field input[type=email],html[data-theme="dark"] .field input[type=number],html[data-theme="dark"] .field select,html[data-theme="dark"] .field textarea,html[data-theme="dark"] .mini-key,html[data-theme="dark"] .choice-list label{background:#1b161e!important;color:#f7eef4!important;border-color:#4a3b49!important}
html[data-theme="dark"] .field label,html[data-theme="dark"] .sub,html[data-theme="dark"] .help,html[data-theme="dark"] .pkg-meta{color:#c8b9c4!important}
html[data-theme="dark"] .btn-outline,html[data-theme="dark"] .btn-danger{background:#241d27!important;color:#f7eef4!important;border-color:#4a3b49!important}
@media(max-width:650px){header.hero{padding-top:42px}.wrap{padding-left:13px;padding-right:13px}.card{border-radius:17px}.site-intro-copy{font-size:13px!important;line-height:1.8!important}}


/* 삭제/신고 완료 알림이 소개 영역에 붙지 않도록 간격 보정 */
.wrap > .saved-banner {
  display: block;
  margin-top: 14px !important;
  margin-bottom: 14px !important;
  position: relative;
  clear: both;
}
@media (max-width: 650px) {
  .wrap > .saved-banner {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }
}
