/* TeacherNode design tokens (2026-10 redesign). Loaded LAST in both shells.
   Rules: clickable = --tn-primary only; red = overdue only; amber = due today only;
   class colours are fixed per class; every action is a labelled button (no icon-only, no hover-only). */
:root{
  /* neutrals (cool, slight blue bias) */
  --tn-bg:#f6f7f9; --tn-surface:#ffffff; --tn-side:#ffffff; --tn-subtle:#f2f4f7;
  --tn-scrim:color-mix(in srgb,var(--tn-ink) 32%,transparent);
  --tn-line:#e3e6eb; --tn-line-soft:#eef0f3;
  --tn-ink:#1a1d23; --tn-ink-2:#3b414d; --tn-muted:#5f6673; --tn-faint:#8a919d;
  /* action */
  --tn-primary:#2257d6; --tn-primary-hover:#1b47b3; --tn-primary-soft:#edf2fd; --tn-primary-line:#d3defa; --tn-on-primary:#ffffff;
  --tn-selected:var(--tn-primary-soft); --tn-focus:#2257d6;
  /* meaning */
  --tn-danger:#c4352b; --tn-danger-soft:#fdeeec;
  --tn-warning:#9a5b00; --tn-warning-soft:#fdf3e0;
  --tn-ok:#157a4f; --tn-ok-soft:#e6f4ec;
  /* fixed class colours: background / ink */
  --tn-c1:#e8efff; --tn-c1-ink:#2248b8;
  --tn-c2:#fff0e2; --tn-c2-ink:#a8500c;
  --tn-c3:#e4f5ec; --tn-c3-ink:#14714a;
  --tn-c4:#f0eaff; --tn-c4-ink:#6440bd;
  --tn-c5:#fde8f1; --tn-c5-ink:#a8336a;
  --tn-c6:#e2f4f7; --tn-c6-ink:#0f6b7a;
  /* type */
  --tn-font:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  --tn-fs-xs:12px; --tn-fs-sm:13px; --tn-fs:14px; --tn-fs-md:16px; --tn-fs-lg:20px; --tn-fs-xl:24px;
  /* shape */
  --tn-radius:10px; --tn-control-radius:7px;
  --tn-button-height:32px; --tn-button-padding-y:2px; --tn-touch-target:44px;
  --tn-touch-outset:7px;
  --tn-control-height:32px; --tn-row-height:44px; --tn-content-gap:16px;
  --tn-row:var(--tn-row-height);

  /* ---- remap legacy variable sets onto the tokens ---- */
  /* studio.css (workspace shell) */
  --st-ink:var(--tn-ink); --st-muted:var(--tn-muted); --st-green:var(--tn-primary); --st-line:var(--tn-line);
  --st-soft:var(--tn-bg); --st-selected:var(--tn-primary-soft); --st-radius:var(--tn-radius);
  /* workspace.css / style.css */
  --paper:var(--tn-bg); --panel:var(--tn-surface); --ink:var(--tn-ink); --ink-2:var(--tn-ink-2);
  --sub:var(--tn-muted); --faint:var(--tn-muted); --line:var(--tn-line); --line-2:var(--tn-line-soft);
  --brand:var(--tn-primary); --brand-2:var(--tn-primary-hover); --brand-soft:var(--tn-primary-soft);
  --accent:var(--tn-primary); --focus:var(--tn-focus);
  --ok:var(--tn-ok); --ok-bg:var(--tn-ok-soft); --late:var(--tn-warning); --late-bg:var(--tn-warning-soft);
  --none:var(--tn-danger); --none-bg:var(--tn-danger-soft); --re:var(--tn-primary); --re-bg:var(--tn-primary-soft);
  /* today.css */
  --tw-line:var(--tn-line); --tw-muted:var(--tn-muted); --tw-accent:var(--tn-primary);
}
html[data-tn-density=compact]{--tn-control-height:28px;--tn-row-height:40px;--tn-content-gap:12px}
html[data-tn-density=relaxed]{--tn-control-height:36px;--tn-row-height:52px;--tn-content-gap:20px}
html,body{overflow-x:clip}
body{background:var(--tn-bg);color:var(--tn-ink)}
:focus-visible{outline:2px solid var(--tn-focus);outline-offset:2px}

/* ---------------- shell: sidebar ---------------- */
[data-tn-shell]{--tn-sidebar-width:216px;--tn-nav-row:34px}
[data-tn-shell] .tn-sidebar{background:var(--tn-side);border-right:1px solid var(--tn-line);color:var(--tn-ink);font-family:var(--tn-font);padding:16px 10px 12px}
[data-tn-shell] .tn-sidebar-heading{margin-bottom:12px}
[data-tn-shell] .tn-sidebar-brand{color:var(--tn-ink);font-size:16px;gap:9px;padding:0 6px}
[data-tn-shell] .tn-logo-mark{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:var(--tn-primary);color:var(--tn-on-primary);font-size:13px;font-weight:800;flex:none}
/* quick add: always visible, labelled */
[data-tn-shell] .tn-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:0 2px 14px}
[data-tn-shell] .tn-quick a{display:flex;align-items:center;justify-content:center;gap:3px;min-height:32px;border:1px solid var(--tn-primary-line);border-radius:var(--tn-control-radius);background:var(--tn-primary-soft);color:var(--tn-primary-hover);font-size:12.5px;font-weight:600;text-decoration:none;white-space:nowrap}
[data-tn-shell] .tn-quick a:hover{background:color-mix(in srgb,var(--tn-primary) 14%,var(--tn-surface))}
[data-tn-shell] .tn-quick svg{width:13px;height:13px}
[data-tn-shell] .tn-sidebar nav a,[data-tn-shell] .tn-sidebar-settings,[data-tn-shell] .tn-sidebar-logout{color:var(--tn-ink-2);border-radius:var(--tn-control-radius);padding:7px 10px;gap:10px}
[data-tn-shell] .tn-sidebar nav.tn-common-nav a{font-size:13.5px}
[data-tn-shell] .tn-sidebar :is(nav a,.tn-sidebar-settings,.tn-sidebar-logout) svg{width:17px;height:17px;color:var(--tn-muted)}
[data-tn-shell] .tn-sidebar nav a:hover,[data-tn-shell] .tn-sidebar-settings:hover,[data-tn-shell] .tn-sidebar-logout:hover{background:var(--tn-subtle)}
[data-tn-shell] .tn-sidebar nav.tn-common-nav a[aria-current],[data-tn-shell] .tn-sidebar-settings[aria-current]{background:var(--tn-primary-soft);color:var(--tn-primary-hover);font-weight:700}
[data-tn-shell] .tn-sidebar nav a[aria-current] svg,[data-tn-shell] .tn-sidebar-settings[aria-current] svg{color:var(--tn-primary)}
[data-tn-shell] .tn-sidebar nav .tn-nav-group{margin:16px 10px 4px;font-size:12px;font-weight:600;color:var(--tn-muted)}
[data-tn-shell] .tn-nav-count{margin-left:auto;min-width:20px;padding:0 6px;border-radius:10px;background:var(--tn-danger);color:var(--tn-on-primary);font-size:11px;font-weight:700;line-height:18px;text-align:center}
[data-tn-shell] .tn-sidebar-account{border-top-color:var(--tn-line)}
[data-tn-shell] .tn-sidebar-account small,[data-tn-shell] .tn-sidebar-logout{color:var(--tn-muted)}
[data-tn-shell] .tn-sidebar-avatar{background:var(--tn-subtle);color:var(--tn-ink-2)}
[data-tn-shell] .tn-sidebar :focus-visible{outline-color:var(--tn-focus)}
@media(max-width:900px){[data-tn-shell]{--tn-sidebar-width:260px;--tn-nav-row:44px}[data-tn-shell] .tn-quick a{min-height:44px}}

/* 사이드바 '내 수업반': 반 색 점(아이콘 자리 16px에 맞춤) */
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot{width:16px;height:16px;flex:none;display:inline-grid;place-items:center}
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot::before{content:"";width:8px;height:8px;border-radius:2px;background:var(--tn-muted)}
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot[data-c="1"]::before{background:var(--tn-c1-ink)}
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot[data-c="2"]::before{background:var(--tn-c2-ink)}
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot[data-c="3"]::before{background:var(--tn-c3-ink)}
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot[data-c="4"]::before{background:var(--tn-c4-ink)}
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot[data-c="5"]::before{background:var(--tn-c5-ink)}
[data-tn-shell] .tn-sidebar nav.tn-common-nav .tn-nav-dot[data-c="6"]::before{background:var(--tn-c6-ink)}
/* ---------------- shell: top bar ---------------- */
.st-top{background:var(--tn-surface);border-bottom:1px solid var(--tn-line);color:var(--tn-muted)}
.st-divider{color:var(--tn-faint)}

/* ---------------- shared components ---------------- */
.tn-class{display:inline-block;border-radius:5px;padding:1px 7px;font-size:12px;font-weight:600;line-height:18px;white-space:nowrap;background:var(--tn-subtle);color:var(--tn-ink-2)}
.tn-class[data-c="1"]{background:var(--tn-c1);color:var(--tn-c1-ink)}
.tn-class[data-c="2"]{background:var(--tn-c2);color:var(--tn-c2-ink)}
.tn-class[data-c="3"]{background:var(--tn-c3);color:var(--tn-c3-ink)}
.tn-class[data-c="4"]{background:var(--tn-c4);color:var(--tn-c4-ink)}
.tn-class[data-c="5"]{background:var(--tn-c5);color:var(--tn-c5-ink)}
.tn-class[data-c="6"]{background:var(--tn-c6);color:var(--tn-c6-ink)}
.tn-due{display:inline-block;border-radius:5px;padding:0 6px;font-size:12px;font-weight:700;line-height:18px;white-space:nowrap}
.tn-due.is-late{color:var(--tn-danger);background:var(--tn-danger-soft)}
.tn-due.is-today{color:var(--tn-warning);background:var(--tn-warning-soft)}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* account theme (설정 > 화면): accent follows the saved theme; neutrals stay on the tokens above */
html.tn-product[data-tn-theme]{--tn-primary-hover:var(--tn-hover);--tn-primary-soft:var(--tn-selected);--tn-primary-line:color-mix(in srgb,var(--tn-primary) 22%,var(--tn-surface));
  --tn-paper:var(--tn-bg);--tn-line:#e3e6eb;--tn-ink:#1a1d23;--tn-muted:#5f6673;--paper:var(--tn-bg);--line:#e3e6eb;--ink:#1a1d23;--sub:#5f6673;--faint:#5f6673}
html.tn-product[data-tn-theme] [data-tn-shell] .tn-quick a{border-color:var(--tn-primary-line);background:var(--tn-primary-soft);color:var(--tn-primary-hover)}
/* desktop: the top bar only repeated the account name; the sidebar already shows it */
@media(min-width:901px){.st-top{display:none}}
/* active nav: tint + weight only; never a side stripe (legacy style.css drew an inset 3px bar) */
[data-tn-shell] .tn-sidebar nav a.on,[data-tn-shell] .tn-sidebar nav a[aria-current],.nav a.on{box-shadow:none}

/* ---------------- messages: always-visible message -> task actions ---------------- */
.cm-filters{display:block}
.cm-actions{margin:18px 0 6px;padding:14px 0;border-top:1px solid var(--tn-line);border-bottom:1px solid var(--tn-line)}
.cm-actions h2{font-size:15px;margin:0 0 8px}
.cm-linked{list-style:none;margin:0 0 10px;padding:0}
.cm-linked li{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--tn-line-soft);font-size:14px}
.cm-linked a{flex:1;min-width:0;color:var(--tn-ink);font-weight:600;text-decoration:none}
.cm-linked a.is-done{color:var(--tn-muted);text-decoration:line-through}
.cm-linked form{margin:0}
.cm-chip{font-size:12px;font-weight:700;color:var(--tn-ok);background:var(--tn-ok-soft);border-radius:5px;padding:0 6px}
.cm-text-button{border:0;background:none;padding:4px 2px;font:inherit;font-size:13px;color:var(--tn-muted);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.cm-create,.cm-link{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 10px;align-items:center;margin-top:8px}
.cm-create label,.cm-link label{font-size:13px;font-weight:600;color:var(--tn-ink-2)}
.cm-create input,.cm-link select{min-height:36px;font:inherit;font-size:14px;border:1px solid var(--tn-line);border-radius:var(--tn-control-radius);padding:0 10px;background:var(--tn-surface);color:var(--tn-ink);accent-color:var(--tn-primary)}
.cm-create button,.cm-link button{grid-column:2;justify-self:start}
.cm-why{margin:8px 0;padding:8px 0;border-top:1px solid var(--tn-line-soft)}
.cm-why-title{margin:0 0 4px;font-size:13px;font-weight:600;color:var(--tn-muted)}
.cm-source{font-size:13px;color:var(--tn-muted)}
.cm-empty{display:grid;gap:8px;justify-items:start;padding:8px 0}
.cm-empty h2{margin:0;font-size:16px}.cm-empty p{margin:0;color:var(--tn-muted);font-size:14px;line-height:1.6}
@media(max-width:600px){.cm-create,.cm-link{grid-template-columns:1fr}.cm-create button,.cm-link button{grid-column:1;min-height:44px}.cm-create input,.cm-link select{min-height:44px;font-size:16px}}

/* Anonymous login uses the same semantic tokens without changing its card geometry. */
.tn-login .inp{border:1px solid var(--tn-line);background:var(--tn-surface);color:var(--tn-ink)}
.tn-login .btn.pri{background:var(--tn-primary);border-color:var(--tn-primary);color:var(--tn-on-primary)}
.tn-login .btn.pri:hover{background:var(--tn-primary-hover);border-color:var(--tn-primary-hover)}
.tn-login :is(.inp,.btn):focus-visible{outline:2px solid var(--tn-focus);outline-offset:3px}
@media(max-width:900px){.tn-login :is(.inp,.btn){min-height:44px}}
