:root { --badge-paper:#fffdf8; --badge-ink:#173354; --badge-line:#e5d7b9; --badge-blue:#2563d9; --badge-green:#2ca774; }
.student-badge-page { min-height:100vh; background:#dff4ff url("/token-assets/page-background.png") center/cover fixed; color:var(--badge-ink); }
.student-badge-page [hidden] { display:none !important; }
.student-badge-page .student-token-layout { align-items:start; }
.student-badge-page .student-token-sidebar a { min-height:44px; }
.student-badge-main { min-width:0; padding:18px 18px 34px 0; }
.student-badge-paper { min-height:calc(100vh - 52px); border:7px solid #956321; border-radius:24px; background:var(--badge-paper); padding:24px 28px 30px; box-shadow:inset 0 0 0 3px #e2b65b,0 12px 30px #4a607338; }
.student-badge-hero { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:22px; border-bottom:1px solid var(--badge-line); padding-bottom:18px; }
.student-badge-hero p { margin:0 0 4px; color:#2b69cc; font-size:10px; font-weight:1000; letter-spacing:.16em; }
.student-badge-hero h1 { margin:0; font-family:Georgia,"Noto Serif KR",serif; font-size:clamp(27px,3vw,40px); }
.student-badge-hero > div > span { display:block; margin-top:7px; color:#647792; font-size:12px; font-weight:750; }
.student-badge-hero dl { display:grid; grid-template-columns:repeat(3,minmax(82px,1fr)); margin:0; }
.student-badge-hero dl div { border-left:1px solid #d8c39c; padding:4px 14px; text-align:center; }
.student-badge-hero dt { color:#8a7554; font-size:9px; font-weight:900; }
.student-badge-hero dd { margin:5px 0 0; color:#254d85; font-size:20px; font-weight:1000; }
.student-badge-guide { display:flex; align-items:center; gap:9px; margin-top:14px; border:1px solid #b9d9ca; border-radius:10px; background:#effbf4; padding:11px 13px; color:#46705c; font-size:10px; line-height:1.5; }
.student-badge-guide i { color:#219167; font-size:15px; }
.student-badge-message { min-height:20px; margin:8px 2px 0; color:#7a6a50; font-size:10px; font-weight:800; }
.student-badge-message[data-tone="good"] { color:#257b4d; }
.student-badge-message[data-tone="bad"] { color:#a33b34; }
.student-badge-unseen { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0 2px; border:1px solid #e8bd5e; border-radius:12px; background:#fff6d7; padding:10px 13px; color:#75521a; font-size:10px; }
.student-badge-unseen button { min-height:44px; border:1px solid #cf9d35; border-radius:11px; background:#fff; padding:0 14px; color:#75521a; font:inherit; font-size:9px; font-weight:1000; }
.student-badge-filters { display:flex; flex-wrap:wrap; gap:7px; padding:8px 0 14px; }
.student-badge-filters button { min-height:44px; border:1px solid #c9d7e8; border-radius:12px; background:#eef4fb; padding:0 17px; color:#526986; font:inherit; font-size:10px; font-weight:1000; cursor:pointer; }
.student-badge-filters button.is-active { border-color:#2f6bd4; background:#2d67d1; color:#fff; }
.student-badge-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.student-badge-card { display:grid; grid-template-columns:88px minmax(0,1fr); grid-template-rows:auto auto; gap:12px 14px; min-height:224px; border:1px solid var(--badge-line); border-radius:18px; background:#fff; padding:16px; box-shadow:0 8px 20px #46361612; }
.student-badge-card.is-progress .student-badge-art img { filter:grayscale(1); opacity:.45; }
.student-badge-card.is-revoked { background:#faf7f4; }
.student-badge-card.is-revoked .student-badge-art img { filter:grayscale(1); opacity:.28; }
.student-badge-art { display:grid; place-items:center; align-self:start; width:88px; height:88px; border-radius:20px; background:#fff7e4; }
.student-badge-art img { width:78px; height:78px; object-fit:contain; }
.student-badge-copy { min-width:0; }
.student-badge-copy > span { color:#2265d0; font-size:9px; font-weight:1000; }
.student-badge-copy h2 { margin:4px 0 0; color:#183354; font-size:14px; }
.student-badge-copy p { margin:6px 0 0; color:#667992; font-size:10px; line-height:1.45; }
.student-badge-copy small { display:block; margin-top:6px; overflow:hidden; color:#354f70; font-size:9px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.student-badge-progressbar { height:8px; margin-top:10px; overflow:hidden; border-radius:5px; background:#e7edf4; }
.student-badge-progressbar span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2871d8,#41b98d); }
.student-badge-state { display:flex; justify-content:space-between; gap:7px; margin-top:6px; color:#73859c; font-size:9px; }
.student-badge-state strong { color:#264e85; }
.student-badge-state em { font-style:normal; }
.student-badge-card footer { display:flex; align-items:center; justify-content:space-between; grid-column:1/-1; gap:7px; border-top:1px solid #eee4d1; padding-top:10px; }
.student-badge-card footer > span { border-radius:12px; background:#eef3f9; padding:4px 8px; color:#647792; font-size:8px; font-weight:900; }
.student-badge-card footer > span.is-featured { background:#fff1bc; color:#8c641b; }
.student-badge-card footer div { display:flex; gap:6px; }
.student-badge-card button { min-height:44px; border:1px solid #b8c9dc; border-radius:11px; background:#f5f8fc; padding:0 11px; color:#44617f; font:inherit; font-size:9px; font-weight:1000; cursor:pointer; }
.student-badge-card button[data-action="sync"] { border-color:#7eaa89; background:#effaef; color:#397743; }
.student-badge-card button[data-action="feature"] { border-color:#d3ab4e; background:#fff8dd; color:#7e5b1b; }
.student-badge-card button[data-action="feature"].is-featured { border-color:#b37b11; background:#f6df96; color:#684509; }
.student-badge-card button:disabled { cursor:default; opacity:.58; }
.student-badge-empty { grid-column:1/-1; border:1px dashed #d7c6a5; border-radius:16px; padding:42px 20px; color:#8c7959; font-size:11px; font-weight:850; text-align:center; }
.student-badge-dialog { width:min(520px,calc(100vw - 32px)); border:5px solid #936125; border-radius:20px; background:#fffdf8; padding:0; color:var(--badge-ink); box-shadow:0 28px 70px #2a324b70; }
.student-badge-dialog::backdrop { background:#17304694; backdrop-filter:blur(3px); }
.student-badge-dialog article { position:relative; display:grid; place-items:center; padding:26px; text-align:center; }
.student-badge-dialog-close { position:absolute; top:12px; right:12px; width:44px; min-height:44px; border:1px solid #d4c39f; border-radius:50%; background:#fff; color:#5d4a31; }
.student-badge-dialog img { width:150px; height:150px; object-fit:contain; }
.student-badge-dialog article > span { color:#2f6dcc; font-size:10px; font-weight:1000; }
.student-badge-dialog h2 { margin:7px 0 0; font-family:Georgia,"Noto Serif KR",serif; font-size:25px; }
.student-badge-dialog article > p { margin:9px 0 0; color:#6c7b8d; font-size:11px; line-height:1.55; }
.student-badge-dialog dl { display:grid; gap:7px; width:100%; margin:17px 0; text-align:left; }
.student-badge-dialog dl div { display:grid; grid-template-columns:88px 1fr; gap:8px; border-top:1px solid #eadfc9; padding-top:8px; }
.student-badge-dialog dt { color:#8a7553; font-size:9px; font-weight:900; }
.student-badge-dialog dd { margin:0; color:#314d6c; font-size:10px; font-weight:850; }
.student-badge-dialog #studentBadgeDialogSync { min-height:44px; border:1px solid #5b9669; border-radius:14px; background:#eaf8e9; padding:0 20px; color:#347241; font:inherit; font-size:10px; font-weight:1000; }

@media (max-width:1050px) {
  .student-badge-main { padding-right:12px; }
  .student-badge-paper { padding:20px 20px 26px; }
  .student-badge-hero { grid-template-columns:1fr; gap:13px; }
  .student-badge-hero dl { width:100%; }
  .student-badge-hero dl div:first-child { border-left:0; }
  .student-badge-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) { .student-badge-main { display:none; } }
