/* EduSpace — 토스 스타일: 흰 카드, 굵은 글자 위계, 선 대신 여백, 둥근 모서리, 큰 누르는 곳
   글자: 제목 #191F28 / 본문 #333D4B / 설명 #8B95A1 · 강조 #3182F6 */
:root {
  --bg: #f2f4f6;
  --card: #fff;
  --soft: #f9fafb;
  --fill: #f2f4f6;
  --fill2: #e5e8eb;
  --ink: #191f28;
  --ink2: #333d4b;
  --ink3: #4e5968;
  --muted: #64707d; /* 작은 회색 글자도 배경과 4.5:1 대비 (WCAG AA) */
  --faint: #b0b8c1;
  --line: #e5e8eb;
  --blue: #1d6ce0; /* 흰 글자와 4.9:1 */
  --blue-d: #1957c2; /* 연한 파랑 바탕 위 파란 글자 */
  --blue-s: #e8f3ff;
  --red: #f04452;
  --red-s: #ffeeee;
  --red-t: #c81d2c; /* 글자용 빨강 */
  --green-t: #067a4b;
  --orange-t: #9a5600;
  --green: #15c47e;
  --green-s: #e5f8ef;
  --orange: #fe9800;
  --orange-s: #fff3e0;
  --purple: #8b5cf6;
  --purple-s: #f1ecfe;
  --r: 20px;
  --side: 288px;
  --drawer: 460px;
  --bnav: 64px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 27, 55, 0.05);
  --shadow-l: 0 20px 60px rgba(0, 27, 55, 0.18);
  color-scheme: light;
}
/* 어두운 화면: 밤에 공부할 때 눈이 덜 부시게. 같은 변수만 바꾸므로 화면 코드는 그대로다.
   공책 종이(필기 쪽)는 펜 색이 그대로 보이도록 늘 흰색으로 둔다. */
:root[data-theme="dark"] {
  --bg: #101317;
  --card: #1b1f25;
  --soft: #20252c;
  --fill: #262b33;
  --fill2: #313844;
  --ink: #f2f4f6;
  --ink2: #d9dde3;
  --ink3: #b6bec8;
  --muted: #9aa4b1;
  --faint: #6b7684;
  --line: #2c323b;
  --blue: #2f6fd6;
  --blue-d: #8ab8ff;
  --blue-s: #1a2a44;
  --red-s: #3a1d22;
  --red-t: #ff8a93;
  --green-s: #13302a;
  --green-t: #5fdaa6;
  --orange-s: #3a2a12;
  --orange-t: #ffbe63;
  --purple-s: #2a2342;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-l: 0 20px 60px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
/* hidden 은 어떤 display 보다 세다 (JS 가 el.hidden = true 로 숨긴 것이 CSS 때문에 다시 보이는 버그를 막는다) */
[hidden] {
  display: none !important;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
body.drawer-open,
body.menu-open {
  overflow: hidden;
}
h1,
h2,
h3 {
  margin: 0 0 0.4em;
  line-height: 1.3;
  color: var(--ink);
}
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink3);
  margin-top: 20px;
}
p {
  margin: 0 0 0.5em;
  color: var(--ink2);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
a {
  color: var(--blue-d);
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid rgba(49, 130, 246, 0.45);
  outline-offset: 2px;
  border-radius: 10px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--blue);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
}
.skip:focus {
  left: 8px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.blue {
  color: var(--blue-d);
}
.red {
  color: var(--red-t);
}
.blue-d {
  color: var(--blue-d);
}
.err {
  color: var(--red-t);
  font-size: 14px;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}
.sp-f {
  flex: 1;
}
.row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.row.gap {
  gap: 8px;
}
.wrapr {
  flex-wrap: wrap;
  margin: 14px 0;
}
.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 4px;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--blue-s);
  color: var(--blue-d);
  vertical-align: middle;
}
.tag.ro {
  background: var(--orange-s);
  color: var(--orange-t);
}
.tag.mine {
  background: var(--green-s);
  color: var(--green-t);
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--fill);
  color: var(--ink3);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.1s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--fill2);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--blue);
  color: #fff;
}
.btn.primary:hover {
  background: var(--blue-d);
}
.btn.tinted {
  background: var(--blue-s);
  color: var(--blue-d);
}
.btn.danger {
  color: var(--red-t);
  background: var(--red-s);
}
.btn.danger-fill {
  background: var(--red);
  color: #fff;
}
.btn.small {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 10px;
}
.btn.big {
  min-height: 56px;
  padding: 14px 24px;
  font-size: 17px;
  border-radius: 16px;
}
.btn.wide {
  width: 100%;
}
.btn.cta {
  width: 100%;
  min-height: 56px;
  font-size: 17px;
  border-radius: 16px;
}
.btn.google {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  margin-top: 10px;
}
.btn.google span {
  font-weight: 800;
  color: #4285f4;
}
.link {
  background: none;
  border: 0;
  padding: 4px 2px;
  color: var(--blue-d);
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
}
.link.small {
  font-size: 13px;
  color: var(--muted);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  color: var(--ink3);
  font-size: 18px;
  flex: none;
}
.icon-btn:hover {
  background: var(--fill);
}
.icon-btn.sm {
  width: 32px;
  height: 32px;
  font-size: 15px;
  border-radius: 9px;
}
.seg {
  display: inline-flex;
  background: var(--fill);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: none;
  padding: 7px 14px;
  border-radius: 9px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seg button.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.seg.sm button {
  padding: 5px 11px;
  min-height: 30px;
  font-size: 13px;
}
.seg.wide {
  display: flex;
  flex-wrap: wrap;
}
.seg.wide button {
  flex: 1;
  justify-content: center;
}

/* 아바타 */
.av {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}
.av.sm {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.av.xs {
  width: 18px;
  height: 18px;
  font-size: 10px;
  vertical-align: -4px;
}
.av.lg {
  width: 44px;
  height: 44px;
  font-size: 18px;
}
.av.more {
  background: var(--fill2);
  color: var(--ink3);
}
.av-stack {
  display: inline-flex;
  align-items: center;
}
.av-stack .av,
.av-stack .pp {
  margin-left: -6px;
  box-shadow: 0 0 0 2px #fff;
  border-radius: 50%;
}
.av-stack > :first-child {
  margin-left: 0;
}

/* ── 화면 틀: 왼쪽 사이드바 · 가운데 · 오른쪽 패널 ── */
#side {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--side);
  background: var(--card);
  padding: 18px 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#main {
  margin-left: var(--side);
  padding: 28px 36px 80px;
  min-height: 100vh;
  outline: none;
  max-width: calc(var(--side) + 1320px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px;
}
.brand b {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.live {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px 3px 18px;
  border-radius: 999px;
  position: relative;
}
.live::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: currentColor;
}
.live.on {
  color: var(--green-t);
  background: var(--green-s);
}
.live.on::before {
  animation: blink 2s infinite;
}
.live.off {
  color: var(--orange-t);
  background: var(--orange-s);
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}
.profile > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.profile b {
  font-size: 16px;
}
.profile small {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.class-switch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--fill);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  min-height: 56px;
}
.class-switch > span:first-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.class-switch small {
  font-size: 12px;
  color: var(--muted);
}
.class-switch b {
  font-size: 17px;
}
.class-switch:hover {
  background: var(--fill2);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  border-radius: 12px;
  padding: 0 14px;
  min-height: 46px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink3);
  cursor: pointer;
  text-align: left;
}
.nav button span {
  font-size: 19px;
  width: 24px;
  text-align: center;
}
.nav button:hover {
  background: var(--fill);
}
.nav button.on {
  background: var(--blue-s);
  color: var(--blue-d);
}
.online {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--ink3);
}
.online b {
  font-weight: 600;
  flex: 1;
}
.dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s infinite;
}
#widgets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* 사이드바 위젯 */
.wcard {
  background: var(--soft);
  border-radius: 18px;
  padding: 14px 14px 12px;
}
.wcard h3 {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}
.wc-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}
.wc-nav {
  display: flex;
}
.wcard .seg {
  width: 100%;
  margin-bottom: 8px;
}
.wcard .seg button {
  flex: 1;
  justify-content: center;
}
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}
#m-widgets .menu {
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}
.menu li {
  font-size: 14px;
  color: var(--ink2);
  display: flex;
  gap: 3px;
  align-items: baseline;
  min-width: 0;
}
.menu li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu li small {
  font-size: 10px;
  color: var(--faint);
  flex: none;
  cursor: help;
}
.wc-f {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.wc-f .link {
  margin-left: auto;
}
.empty-meal {
  margin: 6px 0;
}
.wk {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wk li {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  padding: 5px 4px;
  border-radius: 8px;
}
.wk li[role="button"] {
  cursor: pointer;
}
.wk li[role="button"]:hover {
  background: var(--fill);
}
.wk-d {
  flex: none;
  width: 58px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.wk-d.red {
  color: var(--red-t);
}
.wk-n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dd {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-d);
  background: var(--blue-s);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}
.allergy {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.allergy span {
  background: var(--fill);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
}
.allergy b {
  color: var(--blue-d);
  margin-right: 6px;
}

/* 반 바꾸기 창 */
.switcher-pop {
  position: fixed;
  z-index: 90;
  width: 300px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-l);
  padding: 16px;
  animation: pop 0.18s ease-out;
}
.sp-h {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}
.switcher-pop .seg {
  display: flex;
  margin-bottom: 10px;
}
.switcher-pop .seg button {
  flex: 1;
  justify-content: center;
}
.cls-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.cls-grid button,
.cls-big button {
  border: 0;
  background: var(--fill);
  border-radius: 10px;
  min-height: 40px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink3);
  position: relative;
}
.cls-grid button:hover,
.cls-big button:hover {
  background: var(--fill2);
}
.cls-grid button.on,
.cls-big button.on {
  background: var(--blue);
  color: #fff;
}
.cls-grid button.mine::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

/* 휴대폰 */
#mtop,
#bnav,
#menu-scrim {
  display: none;
}
.m-only {
  display: none;
}
@media (max-width: 899px) {
  #side {
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow-l);
    width: min(320px, 88vw);
  }
  body.menu-open #side {
    transform: none;
  }
  #menu-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  body.menu-open #menu-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  #main {
    margin-left: 0;
    padding: 12px 16px calc(var(--bnav) + 90px + env(safe-area-inset-bottom));
  }
  #mtop {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 20;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: rgba(242, 244, 246, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mt-class {
    border: 0;
    background: var(--card);
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
  }
  #mtop .live {
    margin-left: auto;
  }
  #bnav {
    display: flex;
    position: fixed;
    z-index: 25;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 4px 6px env(safe-area-inset-bottom);
    box-shadow: 0 -1px 0 var(--line);
  }
  #bnav button {
    flex: 1;
    border: 0;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: var(--bnav);
    cursor: pointer;
    color: var(--muted);
    font-size: 21px;
  }
  #bnav button b {
    font-size: 11px;
    font-weight: 600;
  }
  #bnav button.on {
    color: var(--blue-d);
  }
  .m-only {
    display: block;
  }
  #m-widgets {
    margin-bottom: 14px;
  }
  #m-widgets.m-after {
    margin: 18px 0 0;
  }
  #m-widgets .wcard {
    background: var(--card);
  }
  h1 {
    font-size: 25px;
  }
}

/* ── 공통: 머리, 카드, 빈 화면 ── */
.page-h {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 6px 0 20px;
}
.page-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 2px 0 0;
  max-width: 720px;
}
.ph-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ph-ico {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: color-mix(in srgb, var(--c) 15%, #fff);
  flex: none;
}
.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
}
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
  background: var(--card);
  border-radius: var(--r);
}
.empty-state span {
  font-size: 44px;
  display: block;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--muted);
  margin-bottom: 16px;
}
.empty-mini {
  text-align: center;
  padding: 26px 10px;
  color: var(--muted);
}
.empty-mini span {
  font-size: 30px;
}
.empty-mini p {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 14px;
}
.loading {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 120px 0;
}
.loading span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  animation: bounce 1s infinite;
}
.loading span:nth-child(2) {
  animation-delay: 0.15s;
}
.loading span:nth-child(3) {
  animation-delay: 0.3s;
}
.ro-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--orange-s);
  color: #8a4f00;
  border-radius: 16px;
  padding: 10px 12px 10px 16px;
  margin-bottom: 16px;
  font-size: 15px;
}
.ro-banner b {
  color: #8a4f00;
}
.info-box {
  background: var(--blue-s);
  color: var(--ink2);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 15px;
}
.notice {
  background: var(--orange-s);
  color: #8a4f00;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 14px;
}
.notice.live-n {
  background: var(--blue-s);
  color: var(--blue-d);
  animation: fadeOut 4s forwards 2s;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--fill);
  color: var(--ink3);
}

/* 일정 색 */
.cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--faint);
}
.cat-dot.neis {
  background: var(--blue);
}
.cat-dot.exam,
.cat-dot.mock {
  background: var(--red);
}
.cat-dot.performance {
  background: var(--orange);
}
.cat-dot.assignment {
  background: var(--purple);
}
.cat-dot.event {
  background: var(--green);
}
.cat-dot.holiday {
  background: var(--red);
}
.badge.neis {
  background: var(--blue-s);
  color: var(--blue-d);
}
.badge.exam {
  background: var(--red-s);
  color: var(--red-t);
}
.badge.performance {
  background: var(--orange-s);
  color: var(--orange-t);
}
.badge.assignment {
  background: var(--purple-s);
  color: #5b2fd0;
}
.badge.event {
  background: var(--green-s);
  color: var(--green-t);
}

/* ── 공유 달력 ── */
.cal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1180px) {
  .cal-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}
.cal {
  padding: 20px 20px 16px;
}
.cal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cal-h h2 {
  margin: 0;
  font-size: 22px;
}
.cal-h h2 small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tgl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink3);
}
.tgl input {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
}
.grid-h,
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.grid-h span {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0;
}
.grid {
  gap: 4px;
}
.cell {
  position: relative;
  min-height: 112px;
  border-radius: 14px;
  padding: 6px;
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: background 0.15s;
}
.cell:hover {
  background: var(--fill);
}
.cell.out {
  opacity: 0.45;
}
.cell.sel {
  background: var(--blue-s);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.cell-hit {
  position: absolute;
  inset: 0;
  border: 0;
  background: none;
  border-radius: 14px;
  cursor: pointer;
  z-index: 0;
}
.dn {
  position: relative;
  z-index: 1;
  pointer-events: none;
  font-size: 14px;
  font-weight: 600;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink2);
}
.cell.today .dn {
  background: var(--blue);
  color: #fff;
}
.chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chip {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
}
.chip.neis {
  background: var(--blue);
  color: #fff;
}
.chip.neis.hol {
  background: #dceafe;
  color: var(--blue-d);
}
.chip.exam {
  background: var(--red-s);
  color: var(--red-t);
}
.chip.performance {
  background: var(--orange-s);
  color: var(--orange-t);
}
.chip.assignment {
  background: var(--purple-s);
  color: #5b2fd0;
}
.chip.event {
  background: var(--green-s);
  color: var(--green-t);
}
.chip:hover {
  filter: brightness(0.96);
}
.more {
  font-size: 11px;
  color: var(--muted);
  padding-left: 6px;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.dots {
  display: none;
  gap: 3px;
  justify-content: center;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.cell-add {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.cell:hover .cell-add,
.cell-add:focus-visible {
  opacity: 1;
}
@media (max-width: 899px) {
  .cal {
    padding: 14px 10px 10px;
  }
  .cell {
    min-height: 58px;
    padding: 4px 2px;
    align-items: center;
    border-radius: 12px;
  }
  .chips,
  .more,
  .cell-add {
    display: none;
  }
  .dots {
    display: flex;
  }
  .grid {
    gap: 3px;
  }
}
.cal-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cal-side .card {
  padding: 20px;
}
.ev-list,
.up-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ev-row,
.up-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  padding: 10px 8px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  min-height: 56px;
}
.ev-row:hover,
.up-list button:hover {
  background: var(--soft);
}
.er-m,
.um {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.er-m b,
.um b {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.er-m small,
.um small {
  font-size: 13px;
  color: var(--muted);
}
.ud {
  flex: none;
  min-width: 52px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
  background: var(--fill);
  border-radius: 8px;
  padding: 4px 6px;
}
.ud.soon {
  background: var(--red-s);
  color: var(--red-t);
}

/* ── 과목 고르기 ── */
.subj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.subj-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  border: 0;
  background: var(--card);
  border-radius: 22px;
  padding: 22px;
  min-height: 176px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 30ms);
}
.subj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 27, 55, 0.1);
}
.sc-ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 27px;
  background: color-mix(in srgb, var(--c) 15%, #fff);
  margin-bottom: 10px;
}
.subj-card b {
  font-size: 19px;
}
.subj-card small {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}
.sc-n {
  font-size: 13px;
  font-weight: 700;
  color: color-mix(in srgb, var(--c) 55%, #000);
  background: color-mix(in srgb, var(--c) 10%, #fff);
  border-radius: 8px;
  padding: 3px 9px;
  margin-top: 8px;
}
.subj-card.add {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--line);
}
.subj-card.add .sc-ico {
  background: var(--fill);
  color: var(--blue-d);
}
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.crumb b {
  color: var(--ink);
}
.crumb .back {
  font-size: 14px;
}
.subj-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 4px;
  scrollbar-width: thin;
}
.st {
  flex: none;
  border: 0;
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink3);
  cursor: pointer;
  min-height: 36px;
}
.st.on {
  background: color-mix(in srgb, var(--c) 62%, #000);
  color: #fff;
}

/* ── 문서함 ── */
.doc-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tagf {
  border: 0;
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink3);
  cursor: pointer;
  min-height: 36px;
}
.tagf small {
  color: var(--muted);
  font-weight: 500;
}
.tagf.on {
  background: var(--ink);
  color: #fff;
}
.tagf.on small {
  color: rgba(255, 255, 255, 0.7);
}
.search {
  border: 0;
  background: var(--card);
  border-radius: 12px;
  padding: 9px 14px;
  min-height: 42px;
  width: 260px;
  max-width: 60vw;
  font-size: 15px;
  outline: none;
}
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 2px dashed var(--fill2);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
  cursor: pointer;
  text-align: center;
  transition: 0.15s;
  background: rgba(255, 255, 255, 0.5);
}
.drop span {
  font-size: 30px;
}
.drop b {
  font-size: 16px;
  color: var(--ink2);
}
.drop small {
  color: var(--muted);
}
.drop:hover,
.drop.over {
  border-color: var(--blue);
  background: var(--blue-s);
}
.drop.small {
  padding: 18px;
}
.table {
  background: var(--card);
  border-radius: var(--r);
  padding: 6px 10px;
  box-shadow: var(--shadow);
}
.tr {
  display: grid;
  grid-template-columns: minmax(0, 3fr) 110px 140px 90px 70px 190px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
}
.tr:not(.th):hover {
  background: var(--soft);
}
.th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 8px;
}
.td {
  min-width: 0;
  font-size: 14px;
}
.td.name {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  padding: 6px 0;
  min-height: 52px;
}
.td.name > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.td.name b {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td.name small {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td.who {
  display: flex;
  align-items: center;
  gap: 6px;
}
.td.act {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
.f-ico {
  font-size: 24px;
  flex: none;
  width: 30px;
  text-align: center;
}
.tagb {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-d);
  background: var(--blue-s);
  border-radius: 6px;
  padding: 3px 8px;
}
.ver {
  color: var(--blue-d);
  font-weight: 700;
}
@media (max-width: 1100px) {
  .tr {
    grid-template-columns: minmax(0, 1fr) 96px 120px;
  }
  .tr > :nth-child(4),
  .tr > :nth-child(5) {
    display: none;
  }
  .td.act {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .th .td,
  .th > :nth-child(6) {
    display: none;
  }
}
@media (max-width: 600px) {
  .tr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .tr > :nth-child(3) {
    display: none;
  }
  .th {
    display: none;
  }
  .search {
    width: 100%;
    max-width: none;
  }
  .doc-tools .row {
    width: 100%;
  }
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.dg {
  border: 0;
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.dg img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 6px;
}
.dg-ico {
  height: 120px;
  display: grid;
  place-items: center;
  font-size: 48px;
  background: var(--soft);
  border-radius: 12px;
  margin-bottom: 6px;
}
.dg b {
  font-size: 15px;
}
.dg small {
  font-size: 12px;
  color: var(--muted);
}
.pv {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: var(--soft);
  margin: 12px 0;
}
.pv.img {
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}
.pv.img img {
  width: 100%;
  display: block;
}
.pv.pdf {
  height: 420px;
}
.pv.txt {
  padding: 16px;
  font-size: 14px;
  white-space: pre-wrap;
  max-height: 360px;
  overflow: auto;
  font-family: ui-monospace, Menlo, monospace;
  color: var(--ink2);
}
.pv.none {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}
.pv.none span {
  font-size: 40px;
}
.pv.none p {
  color: var(--muted);
}
.vers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vers li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--soft);
}
.vers li.cur {
  background: var(--blue-s);
}
.vn {
  font-weight: 800;
  color: var(--blue-d);
  width: 30px;
}
.vm {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.vm b {
  font-size: 14px;
}
.vm small {
  font-size: 12px;
  color: var(--muted);
}
.up-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.up-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  border-radius: 14px;
  padding: 8px 10px;
}
.up-m {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.up-title {
  border: 0;
  background: var(--card);
  border-radius: 8px;
  padding: 6px 8px;
  font-weight: 600;
  outline: none;
}
.up-m small {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 8px;
}
.up-tag {
  border: 0;
  background: var(--card);
  border-radius: 8px;
  padding: 6px;
  min-height: 36px;
}

/* ── 공유 노트 ── */
.notes {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.nlist {
  background: var(--card);
  border-radius: var(--r);
  padding: 10px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.nl-h {
  padding: 6px 10px 8px;
  font-size: 14px;
  color: var(--muted);
}
.nl {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  border: 0;
  background: none;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}
.nl:hover {
  background: var(--soft);
}
.nl.on {
  background: var(--blue-s);
}
.nl b {
  font-size: 15px;
}
.nl span {
  font-size: 13px;
  color: var(--ink3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nl small {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.nl .dot-live {
  width: 6px;
  height: 6px;
}
.pad {
  padding: 10px;
}
.neditor {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.neditor .empty-state {
  box-shadow: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.ne-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 8px;
  flex-wrap: wrap;
}
.nt-title {
  flex: 1 1 260px;
  min-width: 0;
  border: 0;
  font-size: 24px;
  font-weight: 700;
  outline: none;
  padding: 4px 0;
  letter-spacing: -0.03em;
  background: none;
}
.pp {
  display: inline-flex;
  position: relative;
}
.pp.typing::after {
  content: "…";
  position: absolute;
  right: -4px;
  bottom: -6px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  border-radius: 6px;
  padding: 0 3px;
  line-height: 1.4;
  animation: blink 1s infinite;
}
.pp-n {
  font-size: 13px;
  color: var(--muted);
  margin-left: 10px;
  white-space: nowrap;
}
.nt-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  white-space: nowrap;
}
.nt-status.ok {
  color: var(--green-t);
  background: var(--green-s);
}
.nt-status.saving {
  color: var(--blue-d);
  background: var(--blue-s);
}
.nt-status.off {
  color: var(--orange-t);
  background: var(--orange-s);
}
.ne-foot {
  padding: 10px 20px;
  margin: 0;
  border-top: 1px solid var(--fill);
}
@media (max-width: 1000px) {
  .notes {
    grid-template-columns: minmax(0, 1fr);
  }
  .notes.has-note .nlist {
    display: none;
  }
  .notes:not(.has-note) .neditor {
    display: none;
  }
  .nlist {
    position: static;
    max-height: none;
  }
}

/* 마크다운 */
.md h3,
.md h4,
.md h5 {
  color: var(--ink);
  margin: 14px 0 6px;
}
.md h3 {
  font-size: 21px;
}
.md h4 {
  font-size: 18px;
}
.md h5 {
  font-size: 16px;
}
.md p {
  margin: 0 0 6px;
}
.md ul,
.md ol {
  margin: 4px 0 8px;
  padding-left: 22px;
}
.md li {
  margin: 2px 0;
  color: var(--ink2);
}
.md ul.chk {
  list-style: none;
  padding-left: 2px;
}
.md ul.chk li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
}
.md .cb {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px var(--faint);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
  flex: none;
  margin-top: 3px;
}
.md li.done .cb {
  background: var(--blue);
  box-shadow: none;
}
.md li.done {
  color: var(--muted);
  text-decoration: line-through;
}
.md code {
  background: var(--fill);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.92em;
}
.md blockquote {
  margin: 6px 0;
  padding: 4px 12px;
  border-left: 3px solid var(--blue);
  color: var(--ink3);
}
.md .sp {
  height: 8px;
}

/* ── 오른쪽 상세 패널 ── */
#scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 20, 50, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
#scrim.open {
  opacity: 1;
  pointer-events: auto;
}
#drawer {
  position: fixed;
  z-index: 41;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(var(--drawer), 100vw);
  background: var(--card);
  box-shadow: var(--shadow-l);
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
}
#drawer.open {
  transform: none;
}
#drawer-body {
  padding: 18px 24px 40px;
}
.dr-top {
  display: flex;
  align-items: center;
  gap: 6px;
  position: sticky;
  top: -18px;
  background: var(--card);
  padding: 10px 0;
  margin: -10px 0 6px;
  z-index: 2;
}
.dr-title {
  font-size: 25px;
  margin: 8px 0 6px;
  outline: none;
}
.dr-date {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}
.edited {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 18px 0 0;
}
.edited b {
  color: var(--ink2);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.g-img {
  border: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4/3;
  background: var(--soft);
}
.g-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.g-img:hover img {
  transform: scale(1.04);
}
.files {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.files li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  border-radius: 14px;
  padding: 8px 10px;
}
.f-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}
.f-name small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.cmts {
  margin-top: 24px;
}
.cmts ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cmts li {
  display: flex;
  gap: 10px;
}
.cm-b {
  flex: 1;
  min-width: 0;
}
.cm-b p {
  margin: 0;
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.cm-b small {
  color: var(--muted);
}
.cm-b > div {
  background: var(--soft);
  border-radius: 4px 14px 14px 14px;
  padding: 8px 12px;
  margin-top: 3px;
  font-size: 15px;
  color: var(--ink2);
  white-space: pre-wrap;
  display: inline-block;
}
.cm-form {
  display: flex;
  gap: 8px;
  position: sticky;
  bottom: -40px;
  background: var(--card);
  padding: 10px 0;
}
.cm-form input {
  flex: 1;
  border: 0;
  background: var(--fill);
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 44px;
  outline: none;
}
.cm-form input:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
  background: var(--card);
}

/* 입력 칸 */
.form {
  display: flex;
  flex-direction: column;
}
.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink3);
}
.fld.inline {
  margin-top: 10px;
}
.fld input,
.fld select,
.fld textarea {
  border: 0;
  background: var(--fill);
  border-radius: 12px;
  padding: 11px 14px;
  min-height: 46px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  width: 100%;
}
.fld textarea {
  resize: vertical;
  line-height: 1.6;
}
.fld input:focus,
.fld select:focus,
.fld textarea:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
  background: var(--card);
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: sticky;
  bottom: -40px;
  background: var(--card);
  padding: 12px 0;
  margin-top: 6px;
}
.form-btns .btn {
  flex: 1;
}
.pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pk {
  border: 0;
  background: var(--fill);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
}
.pk.on {
  box-shadow: 0 0 0 2px var(--blue);
  background: var(--blue-s);
}
.pk.dot {
  background: var(--c);
  border-radius: 50%;
  width: 34px;
  height: 34px;
}
.pk.dot.on {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--blue);
}
.pk.dot.sq {
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.pk.dot.sq.on {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--blue);
}
.att-ed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.att-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.att-th {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
}
.att-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.att-th button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}
.att-add {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: var(--fill);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--ink3);
  cursor: pointer;
  font-weight: 600;
}
.att-add:hover {
  background: var(--fill2);
}
.files.edit {
  margin: 0;
}
.att-file {
  align-self: flex-start;
  cursor: pointer;
}

/* 창 (확인·만들기) */
#modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 20, 50, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#modal.open {
  display: flex;
  animation: fade 0.2s;
}
.dialog {
  background: var(--card);
  border-radius: 24px;
  padding: 26px 24px 20px;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dialog.wide {
  width: min(640px, 100%);
}
.dialog h2 {
  font-size: 22px;
}
.dlg-btns {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.dlg-btns .btn {
  flex: 1;
  min-height: 50px;
  font-size: 16px;
}
.acc {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 6px 0 18px;
}
.acc > div {
  display: flex;
  flex-direction: column;
}
.acc small {
  color: var(--muted);
}
@media (max-width: 600px) {
  #modal {
    align-items: flex-end;
    padding: 0;
  }
  .dialog {
    border-radius: 24px 24px 0 0;
    width: 100%;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    animation: up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
#lightbox.open {
  display: flex;
  animation: fade 0.2s;
}
#lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}
.lb-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
#toast {
  position: fixed;
  z-index: 99;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.err {
  background: var(--red);
}
@media (max-width: 899px) {
  #toast {
    bottom: calc(var(--bnav) + 20px + env(safe-area-inset-bottom));
  }
}
#activity {
  position: fixed;
  z-index: 35;
  top: 16px;
  left: 50%;
  transform: translate(-50%, -80px);
  background: var(--card);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  box-shadow: var(--shadow-l);
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s 0.35s;
  visibility: hidden;
}
#activity::before {
  content: "🔔 ";
}
#activity.show {
  transform: translate(-50%, 0);
  visibility: visible;
  transition-delay: 0s;
}
@media (min-width: 900px) {
  #activity {
    left: calc(50% + var(--side) / 2);
  }
}

/* ── 로그인 ── */
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1180px;
  width: 100%;
}
@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .hero-r {
    order: 2;
  }
}
.hero-l h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  margin: 14px 0 16px;
  font-weight: 800;
}
.lead {
  font-size: 18px;
  color: var(--ink3);
  max-width: 520px;
  line-height: 1.6;
}
.logo-xl svg {
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(49, 130, 246, 0.3);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
}
.mock {
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 10px;
  background: #fff;
  border-radius: 26px;
  padding: 12px;
  box-shadow: var(--shadow-l);
  aspect-ratio: 16/10;
}
.mk-side {
  background: var(--soft);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mk-p {
  height: 32px;
  border-radius: 10px;
  background: var(--fill);
}
.mk-n {
  height: 18px;
  border-radius: 6px;
  background: var(--fill);
  width: 80%;
}
.mk-n.on {
  background: var(--blue-s);
}
.mk-w {
  margin-top: auto;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.mk-w i {
  height: 7px;
  border-radius: 4px;
  background: var(--fill);
}
.mk-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mk-h {
  height: 22px;
  width: 50%;
  border-radius: 8px;
  background: var(--fill);
}
.mk-cal {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.mk-cal span {
  background: var(--soft);
  border-radius: 6px;
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: flex-end;
}
.mk-cal em {
  height: 5px;
  border-radius: 3px;
}
.mk-cal em.neis {
  background: var(--blue);
}
.mk-cal em.c0 {
  background: var(--orange);
}
.mk-cal em.c1 {
  background: var(--purple);
}
.mk-cal em.c2 {
  background: var(--green);
}
.mk-cal em.c3 {
  background: var(--red);
}
.feat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.feat div {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow);
}
.feat span {
  font-size: 24px;
}
.feat b {
  font-size: 15px;
}
.feat small {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .feat {
    grid-template-columns: 1fr 1fr;
  }
}
.q {
  width: min(520px, 100%);
  background: var(--card);
  border-radius: 28px;
  padding: 22px 26px 26px;
  box-shadow: var(--shadow);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  animation: slide 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.q-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -10px 18px;
}
.q-prog {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--fill);
  overflow: hidden;
}
.q-prog span {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 0.4s;
}
.q-t {
  font-size: 27px;
  line-height: 1.35;
}
.q-s {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 22px;
}
.big-in {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--blue);
  font-size: 24px;
  font-weight: 600;
  padding: 10px 0;
  outline: none;
  margin-bottom: 14px;
  border-radius: 0;
}
.opts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 380px;
  overflow-y: auto;
}
.opt {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  background: none;
  border-radius: 16px;
  padding: 12px;
  min-height: 64px;
  cursor: pointer;
}
.opt span {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--fill);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.opt b {
  font-size: 17px;
}
.opt small {
  font-size: 14px;
  color: var(--muted);
}
.opt:hover:not(:disabled) {
  background: var(--soft);
}
.opt:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cls-big {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.cls-big button {
  min-height: 52px;
  font-size: 16px;
}
.q-cta {
  margin-top: auto;
  padding-top: 20px;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}
@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes up {
  from {
    transform: translateY(40px);
  }
  to {
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
  }
}
@keyframes slide {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes heart {
  50% {
    transform: scale(1.25);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── 손필기 ── */
.ink-host {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--fill);
  flex: 1;
  min-height: 0;
}
.ink-tb {
  background: var(--card);
  position: relative;
  z-index: 3;
  box-shadow: 0 1px 0 var(--fill);
}
.tb-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  flex-wrap: wrap;
}
.tb-row.opts {
  padding-top: 0;
  height: 52px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.tb-row.opts > * {
  flex-shrink: 0;
}
.tb-row.opts .muted {
  white-space: nowrap;
}
.ink-tools {
  display: flex;
  gap: 2px;
  background: var(--fill);
  border-radius: 14px;
  padding: 3px;
  flex-wrap: wrap;
}
.it {
  border: 0;
  background: none;
  border-radius: 11px;
  padding: 4px 10px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.it span {
  font-size: 19px;
}
.it.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.tbx {
  border: 0;
  background: var(--fill);
  border-radius: 11px;
  min-height: 42px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink3);
}
.tbx b {
  font-size: 13px;
}
.tbx.on {
  background: var(--blue-s);
  color: var(--blue-d);
}
@media (max-width: 1180px) {
  .it b,
  .tbx b {
    display: none;
  }
  .it {
    padding: 4px 9px;
  }
}
.chipset {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pchip {
  border: 0;
  background: var(--fill);
  border-radius: 10px;
  padding: 6px 11px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pchip.on {
  background: var(--ink);
  color: #fff;
}
.sh-i {
  font-size: 15px;
}
.er-dot {
  display: inline-block;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.ink-colors {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.ic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--c);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  position: relative;
  padding: 0;
  flex: none;
}
.ic.on {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--c);
}
.ic.custom {
  background: conic-gradient(#f04452, #fe9800, #ffe066, #15c47e, #3182f6, #8b5cf6, #f04452);
  overflow: hidden;
}
.ic.custom.on {
  background: var(--c);
}
.ic.custom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.ink-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fill);
  border-radius: 12px;
  padding: 4px 12px;
  min-height: 40px;
  margin-left: 4px;
}
.sz-dot {
  display: inline-block;
  border-radius: 50%;
  flex: none;
}
.ink-size input {
  width: 120px;
  accent-color: var(--blue);
}
.ink-size output {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink3);
  min-width: 34px;
}
.ink-sep {
  width: 1px;
  height: 26px;
  background: var(--fill2);
  margin: 0 2px;
}
.ink-zoom {
  display: inline-flex;
  align-items: center;
  background: var(--fill);
  border-radius: 11px;
}
.ink-zoom .zl {
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 700;
  min-width: 44px;
  cursor: pointer;
  color: var(--ink3);
}
.ink-more {
  position: relative;
}
.ink-pop {
  position: absolute;
  right: 0;
  top: 46px;
  z-index: 30;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-l);
  padding: 6px;
  min-width: 270px;
  display: flex;
  flex-direction: column;
}
.ink-pop[hidden] {
  display: none;
}
.pop-i {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  flex-wrap: wrap;
}
.pop-i:hover {
  background: var(--fill);
}
.pop-i small {
  color: var(--muted);
  font-size: 12px;
  width: 100%;
  padding-left: 26px;
  margin-top: -4px;
}
.pop-i.danger {
  color: var(--red-t);
}
.pop-i input {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
}
.ink-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
}
.ink-side {
  width: 190px;
  flex: none;
  background: #f6f8fa;
  overflow-y: auto;
  height: calc(100vh - 330px);
  min-height: 520px;
  padding: 10px;
  border-right: 1px solid var(--fill);
}
.ink-side[hidden] {
  display: none;
}
.side-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px;
}
.thumbs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.thumbs li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.th {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 6px;
}
.th canvas {
  width: 100%;
  display: block;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 27, 55, 0.12);
  background: #fff;
}
.thumbs li.on canvas {
  box-shadow: 0 0 0 3px var(--blue);
}
.th-f {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.th-act {
  display: flex;
}
.ink-scroll {
  flex: 1;
  overflow: auto;
  background: #e9edf2;
  height: calc(100vh - 330px);
  min-height: 520px;
  overscroll-behavior: contain;
}
.ink-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 22px 16px 40px;
  min-width: min-content;
}
.ink-page {
  position: relative;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 27, 55, 0.12);
  flex: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: crosshair;
}
.ink-page canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}
.pg-n {
  position: absolute;
  right: 10px;
  bottom: -19px;
  font-size: 11px;
  color: var(--muted);
}
.ink-add-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.ink-add {
  border: 2px dashed #c9d2dc;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 14px 26px;
  font-weight: 700;
  color: var(--blue-d);
  cursor: pointer;
  min-height: 52px;
}
.ink-add.ghost {
  color: var(--ink3);
}
.ink-add:hover {
  background: var(--card);
}
.sel-bar {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 4px;
  box-shadow: var(--shadow-l);
  white-space: nowrap;
  animation: pop 0.15s;
}
.sel-bar span {
  font-size: 12px;
  padding: 0 8px;
  opacity: 0.7;
}
.sel-bar button {
  border: 0;
  background: none;
  color: #fff;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}
.sel-bar button:hover {
  background: rgba(255, 255, 255, 0.15);
}
.sel-bar .danger {
  color: #ff8a92;
}
.ink-text {
  position: absolute;
  z-index: 4;
  border: 0;
  outline: 2px dashed var(--blue);
  outline-offset: 4px;
  background: rgba(255, 255, 255, 0.85);
  resize: none;
  font-family: Pretendard, sans-serif;
  padding: 0;
  margin: 0;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: 2px;
  cursor: text;
}
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
  margin: 10px 0;
}
.tpl {
  border: 0;
  background: var(--soft);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.tpl img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 27, 55, 0.14);
}
.tpl b {
  font-size: 13px;
}
.tpl:hover {
  background: var(--blue-s);
}
body.ink-full .neditor {
  position: fixed;
  inset: 0;
  z-index: 60;
  border-radius: 0;
  margin: 0;
}
body.ink-full .ink-scroll,
body.ink-full .ink-side {
  height: auto;
}
body.ink-full .ink-host {
  min-height: 0;
}
body.ink-full .ne-foot {
  display: none;
}
body.ink-full #bnav,
body.ink-full .fab {
  display: none;
}
@media (max-width: 899px) {
  .ink-scroll,
  .ink-side {
    height: calc(100vh - 340px - var(--bnav));
    min-height: 420px;
  }
  .ink-side {
    width: 130px;
  }
  .ink-size input {
    width: 80px;
  }
}

/* ── 클래스룸 ── */
.cat-dot.due {
  background: #e2559b;
}
.chip.due {
  background: #fde8f2;
  color: #a8256a;
}
.chip.due.done {
  background: var(--fill);
  color: var(--muted);
  text-decoration: line-through;
}
.demo-t {
  display: block;
  margin-top: 14px;
  font-size: 15px;
}
.ov-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .ov-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.todo-card .seg {
  display: flex;
  margin: 4px 0 10px;
}
.todo-card .seg button {
  flex: 1;
  justify-content: center;
}
.todo-card .seg b {
  color: var(--blue-d);
}
.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.todo-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  text-align: left;
  padding: 10px 6px;
  border-radius: 12px;
  cursor: pointer;
  min-height: 60px;
}
.todo-list button:hover {
  background: var(--soft);
}
.tl-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: color-mix(in srgb, var(--c) 14%, #fff);
  flex: none;
}
.tl-m {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tl-m b {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-m small {
  font-size: 13px;
  color: var(--muted);
}
.tl-d {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.tl-d small {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tl-d.red small {
  color: var(--red-t);
  font-weight: 600;
}
.tl-n {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--blue-s);
  border-radius: 10px;
  padding: 4px 10px;
}
.tl-n b {
  color: var(--blue-d);
  font-size: 17px;
}
.tl-n small {
  font-size: 11px;
  color: var(--blue-d);
}
.ccards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.ccard {
  border: 0;
  padding: 0;
  text-align: left;
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  animation: rise 0.4s both;
  animation-delay: calc(var(--i) * 30ms);
  min-height: 210px;
}
.ccard:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 27, 55, 0.1);
}
.cc-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 65%, #000));
  color: #fff;
  position: relative;
  min-height: 96px;
}
.cc-top b {
  font-size: 20px;
  display: block;
}
.cc-top small {
  font-size: 13px;
  opacity: 0.85;
}
.cc-ico {
  font-size: 30px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  flex: none;
}
.cc-t {
  margin-left: auto;
}
.cc-t .av {
  box-shadow: 0 0 0 2px #fff;
}
.cc-body {
  padding: 12px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cc-due {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.cc-due small {
  color: var(--muted);
  font-size: 12px;
}
.cc-due span {
  font-weight: 600;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-foot {
  display: flex;
  gap: 14px;
  padding: 10px 18px 14px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--fill);
}
.cc-rev {
  margin-left: auto;
  color: var(--blue-d);
  font-weight: 700;
}
.banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 30px 30px 26px;
  color: #fff;
  background: linear-gradient(120deg, var(--c), color-mix(in srgb, var(--c) 60%, #001));
  margin: 6px 0 14px;
  display: flex;
  align-items: flex-end;
  min-height: 170px;
}
.banner h1 {
  color: #fff;
  font-size: 34px;
  margin: 0;
}
.banner p {
  color: rgba(255, 255, 255, 0.9);
  margin: 2px 0 0;
}
.banner .bn-meta {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 8px;
}
.bn-art {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) rotate(-12deg);
  font-size: 120px;
  opacity: 0.25;
  pointer-events: none;
}
.ctabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--fill2);
  margin-bottom: 18px;
  overflow-x: auto;
}
.ctabs button {
  border: 0;
  background: none;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}
.ctabs button.on {
  color: var(--blue-d);
  border-bottom-color: var(--blue);
}
.stream {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) {
  .stream {
    grid-template-columns: minmax(0, 1fr);
  }
}
.up-card {
  padding: 18px;
  position: sticky;
  top: 16px;
}
.up-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
}
.mini-up {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-up .link {
  text-align: left;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  color: var(--ink2);
  padding: 0;
}
.mini-up small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.st-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.composer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 15px;
}
.composer:hover {
  box-shadow: 0 6px 20px rgba(0, 27, 55, 0.08);
}
.composer.open {
  align-items: flex-start;
  cursor: default;
}
.cp-b {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cp-b textarea {
  border: 0;
  background: var(--fill);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  resize: vertical;
  outline: none;
  color: var(--ink);
}
.cp-b textarea:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
  background: var(--card);
}
.row.end {
  justify-content: flex-end;
}
.sitem {
  padding: 18px 20px;
}
.si-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.si-h > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.si-h small {
  color: var(--muted);
  font-size: 13px;
}
.si-t {
  font-size: 16px;
}
.sitem.work {
  padding: 6px;
}
.si-w {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: none;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
}
.si-w:hover {
  background: var(--soft);
}
.si-ico {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 19px;
  flex: none;
  background: var(--blue-s);
}
.si-ico.k-question {
  background: var(--purple-s);
}
.si-ico.k-material {
  background: var(--fill);
}
.si-ico.big {
  width: 56px;
  height: 56px;
  font-size: 26px;
}
.si-m {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.si-m b {
  font-size: 15px;
  font-weight: 600;
}
.si-m small {
  color: var(--muted);
  font-size: 13px;
}
.thread {
  margin-top: 12px;
  border-top: 1px solid var(--fill);
  padding-top: 8px;
}
.th-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.th-list li {
  display: flex;
  gap: 10px;
}
.th-list li > div {
  flex: 1;
  min-width: 0;
}
.th-list p {
  margin: 0;
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.th-list small {
  color: var(--muted);
}
.th-list li > div > div {
  font-size: 15px;
  color: var(--ink2);
  white-space: pre-wrap;
}
.th-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.th-form input {
  flex: 1;
  border: 0;
  background: var(--fill);
  border-radius: 999px;
  padding: 9px 14px;
  min-height: 40px;
  outline: none;
  font-size: 15px;
}
.th-form input:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
  background: var(--card);
}
.stb {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.st-as {
  background: var(--fill);
  color: var(--ink3);
}
.st-ok {
  background: var(--green-s);
  color: var(--green-t);
}
.st-late {
  background: var(--orange-s);
  color: var(--orange-t);
}
.st-miss {
  background: var(--red-s);
  color: var(--red-t);
}
.st-ret {
  background: var(--blue-s);
  color: var(--blue-d);
}
.work-h {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.mk-menu {
  position: relative;
}
.mk-pop {
  position: absolute;
  z-index: 20;
  top: 52px;
  left: 0;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-l);
  padding: 6px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
}
.mk-pop[hidden] {
  display: none;
}
.mk-pop button {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.mk-pop button:hover {
  background: var(--fill);
}
.mk-pop span {
  font-size: 20px;
}
.topic {
  margin-bottom: 22px;
}
.topic h2 {
  font-size: 22px;
  color: var(--blue-d);
  border-bottom: 1px solid var(--fill2);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.topic h2:empty {
  display: none;
}
.cw-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cw-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: var(--card);
  text-align: left;
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
  min-height: 68px;
}
.cw-row:hover {
  box-shadow: 0 4px 16px rgba(0, 27, 55, 0.08);
}
.cw-m {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cw-m b {
  font-size: 16px;
}
.cw-m small {
  font-size: 13px;
  color: var(--muted);
}
.cnt {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}
.cnt b {
  font-size: 20px;
}
.cnt small {
  font-size: 11px;
  color: var(--muted);
}
.gr {
  font-size: 15px;
  color: var(--blue-d);
  white-space: nowrap;
}
.people h2 {
  color: var(--blue-d);
  border-bottom: 1px solid var(--fill2);
  padding-bottom: 10px;
  margin-top: 14px;
}
.people ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.people li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--fill);
  font-size: 16px;
}
.my-avg {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.my-avg small {
  color: var(--muted);
}
.my-avg b {
  font-size: 34px;
  color: var(--blue-d);
}
.gtable-wrap {
  overflow-x: auto;
  padding: 8px;
}
.gtable {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 14px;
}
.gtable th,
.gtable td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--fill);
  text-align: center;
  white-space: nowrap;
}
.gtable th:first-child,
.gtable td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--card);
  z-index: 1;
}
.gtable th {
  vertical-align: bottom;
  font-weight: 600;
}
.gtable th .link {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.gtable th small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}
.gtable tr.avg td {
  background: var(--soft);
  color: var(--muted);
  font-weight: 600;
}
.gc small {
  color: var(--muted);
  font-size: 12px;
  display: block;
}
.gc.missing small {
  color: var(--red-t);
}
.gc b {
  font-size: 15px;
}
.d-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.d-grid.t {
  grid-template-columns: minmax(0, 1fr) 420px;
}
.d-grid.one {
  grid-template-columns: minmax(0, 860px);
}
@media (max-width: 1100px) {
  .d-grid,
  .d-grid.t {
    grid-template-columns: minmax(0, 1fr);
  }
}
.d-main {
  padding: 26px;
}
.d-h {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--blue-s);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.d-ht {
  flex: 1;
  min-width: 200px;
}
.d-ht h1 {
  font-size: 26px;
  margin: 0 0 4px;
}
.d-ht p {
  margin: 0;
}
.d-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink3);
  margin-top: 6px !important;
}
.d-meta .red {
  color: var(--red-t);
  font-weight: 600;
}
.d-cm {
  margin-top: 22px;
}
.d-cm h3 {
  margin: 0;
  color: var(--ink);
}
.d-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 16px;
}
.mywork {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mw-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mw-h h2 {
  margin: 0;
}
.grade-big {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.grade-big b {
  font-size: 40px;
  color: var(--blue-d);
}
.grade-big small {
  color: var(--muted);
  font-size: 16px;
}
.warn-box {
  background: var(--red-s);
  color: #c0262f;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 0;
}
.add-work {
  border: 2px dashed var(--fill2);
  background: var(--card);
  color: var(--blue-d);
  cursor: pointer;
}
.mywork textarea,
#qa-text {
  border: 0;
  background: var(--fill);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  resize: vertical;
  outline: none;
  width: 100%;
}
.my-ans {
  background: var(--blue-s);
  border-radius: 14px;
  padding: 12px 14px;
}
.my-ans small {
  color: var(--blue-d);
  font-weight: 700;
}
.my-ans p {
  margin: 2px 0 0;
  font-size: 16px;
  color: var(--ink);
}
.my-memo {
  background: var(--soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  white-space: pre-wrap;
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fill);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 15px;
  min-height: 48px;
}
.choice input {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
}
.choice.on {
  background: var(--blue-s);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.q-res {
  background: var(--soft);
  border-radius: 16px;
  padding: 16px;
  margin: 14px 0;
}
.q-res h3 {
  margin: 0 0 10px;
  color: var(--ink);
}
.qr {
  display: grid;
  grid-template-columns: minmax(100px, 40%) 1fr 30px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}
.qr-bar {
  height: 12px;
  background: var(--fill2);
  border-radius: 99px;
  overflow: hidden;
}
.qr-bar i {
  display: block;
  height: 100%;
  background: var(--purple);
  border-radius: 99px;
}
.subs {
  padding: 16px;
}
.sum {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.sum button {
  border: 0;
  background: var(--soft);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.sum button.on {
  background: var(--blue-s);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.sum b {
  font-size: 26px;
}
.sum small {
  color: var(--muted);
  font-size: 12px;
}
.subs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 8px;
  border-bottom: 1px solid var(--fill);
}
.chk {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.chk input,
.sub-list input[type="checkbox"] {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
}
.sub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.sub-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--fill);
}
.sub-list li.sel {
  background: var(--blue-s);
  border-radius: 10px;
}
.sl-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  padding: 4px;
  border-radius: 10px;
}
.sl-m {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.sl-m b {
  font-size: 15px;
}
.gin {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.gin small {
  color: var(--muted);
  font-size: 13px;
}
.gin input,
.grade-in {
  width: 64px;
  border: 0;
  background: var(--fill);
  border-radius: 10px;
  padding: 7px 8px;
  text-align: right;
  font-weight: 700;
  font-size: 15px;
  outline: none;
}
.gin input:focus,
.grade-in:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
  background: var(--card);
}
.gin input.saved {
  box-shadow: inset 0 0 0 2px var(--green);
}
.grade-in {
  width: 90px;
}
.opt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.opt-n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fill);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.opt-row input {
  flex: 1;
  border: 0;
  background: var(--fill);
  border-radius: 10px;
  padding: 9px 12px;
  outline: none;
  font-size: 15px;
}
.pad {
  padding: 14px;
}
.th-form input {
  min-width: 0;
}
.th-form .btn {
  flex: none;
}
.d-side {
  min-width: 0;
}
.d-side .card {
  min-width: 0;
}
.ccard > * {
  width: 100%;
  align-self: stretch;
}

/* ── 공부 타이머 ── */
.study-now {
  background: var(--green-s);
  color: var(--green-t);
  padding: 8px 14px;
  font-size: 14px;
}
.study-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(300px, 1.1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1300px) {
  .study-grid {
    grid-template-columns: 1fr 1fr;
  }
  .rank-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .study-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.timer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 20px;
}
.timer-card.running {
  background: linear-gradient(180deg, #f2f8ff, #fff 60%);
}
.ring-wrap {
  position: relative;
  width: 250px;
  height: 250px;
}
.t-ring {
  width: 100%;
  height: 100%;
}
.tr-bg {
  fill: none;
  stroke: var(--fill);
  stroke-width: 16;
}
.tr-fg {
  fill: none;
  stroke: var(--blue);
  stroke-width: 16;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s;
}
.t-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.t-center small {
  color: var(--muted);
  font-size: 13px;
}
.t-center b {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.t-cur {
  font-size: 14px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.running .t-cur {
  color: var(--green-t);
  font-weight: 700;
}
.subj-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.sp {
  border: 0;
  background: var(--fill);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink3);
  min-height: 38px;
}
.sp.on {
  background: color-mix(in srgb, var(--c) 62%, #000);
  color: #fff;
}
.t-btn {
  width: 100%;
  max-width: 320px;
}
.btn.stop {
  background: var(--ink);
  color: #fff;
}
.goal-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  background: var(--soft);
  border-radius: 16px;
  padding: 14px;
}
.goal-row > div {
  display: flex;
  flex-direction: column;
}
.goal-row > div:last-child {
  align-items: flex-end;
}
.goal-row b {
  font-size: 18px;
}
.goal-ctl {
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
}
.goal-ctl b {
  color: var(--blue-d);
  min-width: 50px;
  text-align: center;
}
.sbars {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sbars li {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.sb-name {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sb-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.sb-bar {
  height: 10px;
  background: var(--fill);
  border-radius: 99px;
  overflow: hidden;
}
.sb-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  opacity: 0.85;
}
.wchart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  height: 150px;
  align-items: end;
}
.wc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.wc small {
  font-size: 11px;
  color: var(--muted);
  min-height: 14px;
}
.wc b {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.wc span {
  width: 100%;
  max-width: 30px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: var(--fill);
  border-radius: 8px;
  overflow: hidden;
}
.wc span i {
  display: block;
  width: 100%;
  background: #b9d6fb;
  border-radius: 8px;
  min-height: 2px;
}
.wc.today span i {
  background: var(--blue);
}
.wc.today b {
  color: var(--blue-d);
}
.rank {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rank li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 14px;
}
.rank li.me {
  background: var(--blue-s);
}
.rk {
  width: 30px;
  text-align: center;
  font-weight: 800;
  color: var(--muted);
  font-size: 15px;
}
.rk.top0,
.rk.top1,
.rk.top2 {
  font-size: 22px;
}
.rm {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.rm b {
  font-size: 15px;
}
.rm small {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rm small.on {
  color: var(--green-t);
  font-weight: 700;
}
.rt {
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  white-space: nowrap;
}
.side-timer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--green-s);
  color: #0b7a4d;
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.side-timer span {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-timer b {
  font-variant-numeric: tabular-nums;
}
.nl-wrap {
  position: relative;
}
.nl-del {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: var(--card);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: var(--shadow);
}
.nl-wrap:hover .nl-del,
.nl-del:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .nl-del {
    opacity: 0.8;
  }
}

.tbx.big {
  background: var(--blue-s);
  color: var(--blue-d);
  font-weight: 700;
}
.tbx.big b {
  display: inline !important;
  font-size: 13px;
}
@media (max-width: 760px) {
  .tbx.big b {
    display: none !important;
  }
}
.pen-tray {
  display: flex;
  gap: 4px;
}
.pen-k {
  border: 0;
  background: var(--fill);
  border-radius: 12px;
  padding: 3px 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  min-width: 64px;
}
.pen-k canvas {
  width: 60px;
  height: 20px;
}
.pen-k b {
  font-size: 11px;
  color: var(--ink3);
  font-weight: 600;
}
.pen-k.on {
  background: var(--card);
  box-shadow: 0 0 0 2px var(--blue);
}
.pen-k.on b {
  color: var(--blue-d);
}
.tb-row.opts {
  height: 60px;
}
.dg {
  position: relative;
}
.dg-del {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--card);
  border-radius: 8px;
  padding: 4px 7px;
  box-shadow: var(--shadow);
}

/* ── 오늘 홈 ── */
.hero-today {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  background: linear-gradient(120deg, #3182f6, #6f5df5);
  color: #fff;
  border-radius: 26px;
  padding: 28px 30px;
  margin: 4px 0 18px;
}
.hero-today h1 {
  color: #fff;
  font-size: 30px;
  margin: 4px 0 8px;
}
.hero-today .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}
.ht-sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  margin: 0;
}
.ht-sub b {
  color: #fff;
}
.ht-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ht-kpis .kpi {
  border: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 14px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s;
  min-height: 104px;
}
.ht-kpis .kpi:hover {
  background: rgba(255, 255, 255, 0.24);
}
.ht-kpis small {
  font-size: 12px;
  opacity: 0.85;
}
.ht-kpis b {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ht-kpis span {
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1000px) {
  .hero-today {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .hero-today h1 {
    font-size: 24px;
  }
}
@media (max-width: 480px) {
  .ht-kpis b {
    font-size: 20px;
  }
  .ht-kpis .kpi {
    padding: 10px;
    min-height: 90px;
  }
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1000px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.hg-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.h-list,
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.h-list button,
.feed button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  text-align: left;
  padding: 10px 6px;
  border-radius: 12px;
  cursor: pointer;
  min-height: 56px;
}
.h-list button:hover,
.feed button:hover {
  background: var(--soft);
}
.hl-i {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--fill);
  display: grid;
  place-items: center;
  font-size: 19px;
  flex: none;
}
.hl-i.neis {
  background: var(--blue-s);
}
.hl-m {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hl-m b {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hl-m small {
  font-size: 13px;
  color: var(--muted);
}
.due {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
  background: var(--fill);
  border-radius: 8px;
  padding: 4px 9px;
  white-space: nowrap;
}
.due.soon {
  background: var(--orange-s);
  color: var(--orange-t);
}
.due.late {
  background: var(--red-s);
  color: var(--red-t);
}
.pill-n {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-d);
  background: var(--blue-s);
  border-radius: 8px;
  padding: 4px 9px;
  white-space: nowrap;
}
.score {
  font-size: 17px;
  font-weight: 800;
  color: var(--blue-d);
}
.h-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 6px 2px;
}
.chips-m {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips-m span {
  background: var(--soft);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 14px;
}
.proof-card {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid color-mix(in srgb, var(--blue-d) 20%, transparent);
  background: linear-gradient(135deg, var(--blue-s), var(--card) 68%);
}
.proof-card.is-empty {
  border-style: dashed;
}
.proof-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 25px;
}
.proof-copy {
  min-width: 0;
}
.proof-copy .eyebrow {
  margin: 0 0 2px;
  color: var(--blue-d);
}
.proof-copy h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.proof-copy > p:not(.eyebrow),
.proof-copy small {
  display: block;
  margin: 0;
  color: var(--ink2);
  line-height: 1.5;
}
.proof-copy small {
  margin-top: 3px;
  color: var(--muted);
}
.proof-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: max-content;
}
@media (max-width: 720px) {
  .proof-card {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
  }
  .proof-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
  .proof-copy h2 {
    font-size: 18px;
  }
  .proof-actions {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .proof-actions .btn {
    width: 100%;
  }
}
.mini-rank {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mini-rank li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  padding: 6px 4px;
}
.mini-rank b {
  flex: 1;
}
.mini-rank span {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.feed button {
  align-items: flex-start;
  min-height: 0;
}
.feed span {
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.45;
}
.feed small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.guide {
  margin-bottom: 18px;
  background: linear-gradient(180deg, #f5f9ff, #fff);
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1000px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}
.steps button {
  width: 100%;
  height: 100%;
  border: 0;
  text-align: left;
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  box-shadow: var(--shadow);
  position: relative;
}
.st-n {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-d);
}
.st-i {
  font-size: 28px;
}
.steps b {
  font-size: 16px;
}
.steps small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
/* 알림 · 오프라인 */
.bell {
  position: relative;
  font-size: 17px;
}
.bell i {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
.brand .live {
  margin-left: auto;
}
.brand .bell {
  margin-left: 2px;
}
.bell-pop {
  position: fixed;
  z-index: 90;
  width: 330px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-l);
  padding: 14px;
  animation: pop 0.18s ease-out;
}
.bell-pop ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bell-pop li {
  display: flex;
  gap: 10px;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.bell-pop li:hover {
  background: var(--soft);
}
.bell-pop li div {
  display: flex;
  flex-direction: column;
}
.bell-pop small {
  color: var(--muted);
  font-size: 12px;
}
.bell-pop b {
  font-weight: 600;
}
#offline {
  position: fixed;
  z-index: 98;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-l);
}
#offline[hidden] {
  display: none;
}
#mtop .bell {
  margin-left: 4px;
}
.brand b {
  white-space: nowrap;
}
.brand .live {
  padding: 3px 7px 3px 16px;
  font-size: 10px;
}
.brand {
  gap: 8px;
}
/* 긴 제목 하나가 휴대폰 화면 폭을 넘기지 않게: 격자·세로 칸 안의 내용은 줄어들 수 있다 */
.hg-col,
.hg-col > *,
.card {
  min-width: 0;
}
html,
body {
  overflow-x: clip;
}

/* 첫 화면: 해결하는 문제 3가지 */
.pains {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pains li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
.pains span {
  font-size: 20px;
}
.pains p {
  margin: 0;
  font-size: 14px;
  color: var(--ink2);
}
.pains b {
  color: var(--ink);
}

.ink-outbox {
  margin: 6px 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: #fff4e5;
  color: #8a4b00;
  font-size: 13px;
  font-weight: 600;
}
.ink-outbox[hidden] {
  display: none;
}
/* 알림 안 버튼 (되살리기) */
#toast.has-act {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.toast-act {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font: inherit;
  font-weight: 700;
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
}
.toast-act:hover,
.toast-act:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}
/* 휴지통 */
.trash-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.trash-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg, #f2f4f6);
}
.trash-list .t-ico {
  font-size: 22px;
  grid-row: span 2;
}
.trash-list .t-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.trash-list .t-main b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trash-list .t-main small {
  color: var(--muted);
  font-size: 12px;
}
.trash-list .t-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
/* 부담 지도 */
.cell.load-2 {
  background: #fff8e6;
}
.cell.load-3 {
  background: #ffefef;
}
.load-b {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  pointer-events: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wl {
  margin: 4px 0 0;
  font-size: 13px;
  border-radius: 12px;
  padding: 10px 12px;
}
.wl.ok {
  background: #e8f8ef;
  color: #0b7a43;
}
.wl.warn {
  background: #fff4e5;
  color: #7a4300;
}
.wl.warn.lv3 {
  background: #ffeceb;
  color: #a1141f;
}
.wl ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.wl-sug {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.wl-sug > span {
  font-weight: 700;
  margin-right: 2px;
}
.wl-strip {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 4px;
  margin: 6px 0 8px;
}
.wl-strip .ws {
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  background: var(--fill);
}
.wl-strip .ws i {
  font-style: normal;
  padding-bottom: 3px;
}
.wl-strip .lv1 {
  background: #e8f3ff;
  color: var(--ink3);
}
.wl-strip .lv2 {
  background: #ffe2a8;
  color: #7a4300;
}
.wl-strip .lv3 {
  background: #ffb4b0;
  color: #a1141f;
  font-weight: 700;
}
.legend .load-l {
  font-size: 12px;
}
.wl-card {
  margin-bottom: 18px;
}
/* 오늘 시간표 */
.tt {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.tt li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.tt-n {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--blue-l, #e8f3ff);
  color: var(--blue, #3182f6);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
/* 시험 대비 계획 */
.plan-card {
  margin-top: 18px;
}
.pl-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pl-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto 90px;
  gap: 12px;
  align-items: center;
}
.pl-name {
  font-weight: 700;
}
.pl-tag {
  font-style: normal;
  font-size: 11px;
  background: #ffeceb;
  color: #c4161c;
  border-radius: 6px;
  padding: 1px 6px;
}
.pl-tag.ok {
  background: #e8f8ef;
  color: #0b7a43;
}
.pl-bar {
  height: 10px;
  border-radius: 99px;
  background: var(--fill);
  overflow: hidden;
}
.pl-bar i {
  display: block;
  height: 100%;
  background: var(--blue, #3182f6);
  border-radius: 99px;
}
.pl-row.behind .pl-bar i {
  background: #f04452;
}
.pl-row.done .pl-bar i {
  background: #15c47e;
}
.pl-num {
  font-size: 13px;
  white-space: nowrap;
}
.pl-in {
  width: 70px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #d1d6db;
  font: inherit;
}
.pl-day {
  color: var(--muted);
  text-align: right;
}
.pl-today {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #f5f9ff;
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 10px;
}
.pl-today > b {
  margin-right: 4px;
}
.pl-chip {
  border: 0;
  border-radius: 99px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pl-chip.done {
  color: #0b7a43;
  background: #e8f8ef;
  box-shadow: none;
}
.pl-add {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
@media (max-width: 600px) {
  .pl-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .pl-bar {
    grid-column: 1 / -1;
    order: 3;
  }
  .pl-day {
    display: none;
  }
}
/* 통합 검색 (명령 팔레트) */
.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.side-search:hover,
.side-search:focus-visible {
  background: var(--fill2);
  color: var(--ink2);
}
.side-search kbd,
.gs-top kbd {
  margin-left: auto;
  font: inherit;
  font-size: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--muted);
}
.dialog.gs-wrap {
  width: min(640px, calc(100vw - 24px));
  padding: 0;
  align-self: flex-start;
  margin-top: 10vh;
  overflow: hidden;
}
.gs-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}
.gs-top input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 17px;
  background: transparent;
  color: var(--ink);
  min-width: 0;
}
.gs-res {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(60vh, 460px);
  overflow-y: auto;
}
.gs-h {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 10px 12px 4px;
}
.gs-item,
.gs-recent {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.gs-recent {
  color: var(--ink3);
  font-size: 14px;
  padding: 6px 12px;
}
.gs-item.on,
.gs-item:hover,
.gs-recent:hover {
  background: var(--blue-s);
}
.gs-ico {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex: none;
}
.gs-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.gs-main b,
.gs-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-main small {
  color: var(--muted);
  font-size: 13px;
}
.gs-kind {
  flex: none;
  font-size: 12px;
  color: var(--ink3);
  background: var(--fill);
  border-radius: 8px;
  padding: 2px 8px;
}
.gs-res mark {
  background: #fff1a8;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.gs-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
}
.gs-foot {
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.people li .pp-reset {
  margin-left: auto;
}
.lock-b {
  font-size: 12px;
  color: var(--red-t);
  background: var(--red-s);
  border-radius: 8px;
  padding: 1px 6px;
  margin-left: 6px;
}
.temp-pin {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 10px;
  text-align: center;
  background: var(--blue-s);
  color: var(--blue-d);
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0;
  font-variant-numeric: tabular-nums;
}
.pin-box {
  margin: 10px 0;
  background: var(--fill);
  border-radius: 14px;
  padding: 10px 14px;
}
.pin-box summary {
  cursor: pointer;
  font-weight: 700;
}
.bell-pop li.due {
  background: var(--orange-s);
  border-radius: 12px;
}
/* 달력 줄(row)은 격자 배치에 끼어들지 않게 (접근성용 줄 묶음) */
.grid-row {
  display: contents;
}
.wk-b,
.bp-b {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}
div.wk-b,
div.bp-b {
  cursor: default;
}
.bp-b div {
  display: flex;
  flex-direction: column;
}
.menu li small {
  color: var(--muted);
}

/* 어두운 화면: 연한 색을 직접 쓴 곳 맞추기 */
:root[data-theme="dark"] .cell.load-2 {
  background: #33290f;
}
:root[data-theme="dark"] .cell.load-3 {
  background: #3b1b1e;
}
:root[data-theme="dark"] .wl.ok {
  background: var(--green-s);
  color: var(--green-t);
}
:root[data-theme="dark"] .wl.warn {
  background: var(--orange-s);
  color: var(--orange-t);
}
:root[data-theme="dark"] .wl.warn.lv3 {
  background: var(--red-s);
  color: var(--red-t);
}
:root[data-theme="dark"] .wl-strip .lv2 {
  background: #6b4a10;
  color: #ffe2a8;
}
:root[data-theme="dark"] .wl-strip .lv3 {
  background: #7a2a2f;
  color: #ffd4d1;
}
:root[data-theme="dark"] .gs-res mark {
  background: #6b5a10;
}
:root[data-theme="dark"] .ink-outbox {
  background: var(--orange-s);
  color: var(--orange-t);
}
:root[data-theme="dark"] .pl-today {
  background: var(--blue-s);
}
:root[data-theme="dark"] .pl-tag {
  background: var(--red-s);
  color: var(--red-t);
}
:root[data-theme="dark"] .pl-tag.ok {
  background: var(--green-s);
  color: var(--green-t);
}
:root[data-theme="dark"] .chip.exam {
  color: var(--red-t);
}
:root[data-theme="dark"] .chip.performance {
  color: var(--orange-t);
}
:root[data-theme="dark"] .chip.event {
  color: var(--green-t);
}
:root[data-theme="dark"] .chip.assignment {
  color: #c4b1ff;
}
:root[data-theme="dark"] .chip.due {
  background: #3a1a2c;
  color: #ff9ccc;
}
:root[data-theme="dark"] .chip.neis.hol {
  background: var(--blue-s);
  color: var(--blue-d);
}
:root[data-theme="dark"] .sc-n {
  color: color-mix(in srgb, var(--c) 60%, #fff);
  background: color-mix(in srgb, var(--c) 18%, var(--card));
}
:root[data-theme="dark"] .temp-pin {
  color: var(--blue-d);
}
/* 단축키 도움말 */
.keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 14px 0;
  align-items: center;
}
.keys kbd {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  background: var(--fill);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 8px;
  padding: 2px 8px;
  white-space: nowrap;
  justify-self: start;
}
.side-foot {
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 12px 0 20px;
}
:root[data-theme="dark"] .guide {
  background: linear-gradient(180deg, #1a2638, var(--card));
}
:root[data-theme="dark"] #toast {
  background: #2c333d;
  color: #f2f4f6;
}
:root[data-theme="dark"] #toast.err {
  background: #b3202d;
}
:root[data-theme="dark"] .wl-strip .lv1 {
  background: var(--blue-s);
  color: var(--ink3);
}
:root[data-theme="dark"] .ink-side,
:root[data-theme="dark"] .ink-scroll {
  background: #15191e;
}
:root[data-theme="dark"] .timer-card.running {
  background: linear-gradient(180deg, #1a2638, var(--card) 60%);
}
:root[data-theme="dark"] .tt-n {
  background: var(--blue-s);
  color: var(--blue-d);
}
/* 체험 투어 */
#tour {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.tour-hole {
  position: fixed;
  border-radius: 22px;
  box-shadow: 0 0 0 9999px rgba(0, 12, 30, 0.62);
  outline: 3px solid #fff;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.tour-dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 12, 30, 0.62);
}
.tour-card {
  position: fixed;
  width: min(380px, calc(100vw - 24px));
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  padding: 18px 20px 14px;
  box-shadow: var(--shadow-l);
  animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tour-card.mid {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.tour-card h2 {
  font-size: 19px;
  margin: 2px 0 6px;
}
.tour-card p {
  margin: 0;
  color: var(--ink2);
  line-height: 1.55;
}
.tour-n {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-d) !important;
}
.tour-dots {
  display: flex;
  gap: 5px;
  margin: 12px 0 8px;
}
.tour-dots i {
  width: 6px;
  height: 6px;
  border-radius: 9px;
  background: var(--fill2);
}
.tour-dots i.on {
  width: 18px;
  background: var(--blue);
}
.tour-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .tour-hole,
  .tour-card {
    transition: none;
    animation: none;
  }
}
/* 리포트 */
.rpt {
  margin-top: 18px;
}
.rpt h3 {
  font-size: 15px;
  margin: 16px 0 8px;
}
.rpk-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.rpk {
  background: var(--fill);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}
.rpk small,
.rpk span {
  color: var(--muted);
  font-size: 12px;
}
.rpk b {
  font-size: 24px;
}
.hist {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  height: 150px;
  align-items: end;
}
.hb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.hb span {
  width: 100%;
  min-height: 3px;
  background: var(--blue);
  border-radius: 8px 8px 3px 3px;
}
.hb small {
  font-size: 12px;
  font-weight: 700;
  order: -1;
}
.hb i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.tbl-wrap {
  overflow-x: auto;
}
.rtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rtable th,
.rtable td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.rtable thead th {
  font-size: 12px;
  color: var(--muted);
}
.rtable tbody th {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 160px;
  font-weight: 600;
}
.rtable small {
  color: var(--muted);
  font-size: 12px;
}
.rate {
  height: 8px;
  border-radius: 9px;
  background: var(--fill);
  overflow: hidden;
  min-width: 120px;
  margin-bottom: 4px;
}
.rate span {
  display: block;
  height: 100%;
  background: var(--green);
}
.watch {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: grid;
  gap: 8px;
}
.watch li {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--fill);
  border-radius: 14px;
  padding: 10px 12px;
}
.watch li div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.watch small {
  color: var(--ink3);
  font-size: 13px;
}
.wl-tag {
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--orange-s);
  color: var(--orange-t);
}
.wl-tag.hi {
  background: var(--red-s);
  color: var(--red-t);
}
/* 공부 리포트 */
.sr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}
.hm {
  display: grid;
  gap: 3px;
}
.hm-row {
  display: grid;
  grid-template-columns: 22px repeat(24, minmax(0, 1fr));
  gap: 3px;
  align-items: center;
}
.hm-row b {
  font-size: 12px;
  color: var(--muted);
}
.hm-row i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: color-mix(in srgb, var(--blue) calc(var(--a) * 100%), var(--fill));
}
.hm-h small {
  font-size: 10px;
  color: var(--muted);
}
.wk4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  height: 120px;
  align-items: end;
}
.wk4 div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.wk4 span {
  width: 70%;
  min-height: 3px;
  background: var(--blue);
  border-radius: 8px 8px 3px 3px;
}
.wk4 small {
  order: -1;
  font-size: 11px;
  font-weight: 700;
}
.wk4 i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.share {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.share li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.share i {
  height: 8px;
  border-radius: 9px;
  background: var(--purple);
}
.share b {
  text-align: right;
}
@media (max-width: 800px) {
  .rpk-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sr-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.row.wrap {
  flex-wrap: wrap;
}
#cal-url {
  font-size: 13px;
}
/* 타임랩스 */
.dialog.rp {
  width: min(760px, 100%);
}
.rp-cv {
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: block;
  margin: 10px 0;
}
.rp-ctl {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rp-ctl input[type="range"] {
  flex: 1;
  accent-color: var(--blue);
}
.rp-ctl select {
  font: inherit;
  border-radius: 8px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.rank li.me small {
  color: var(--ink3);
}
/* 불러오는 중 뼈대(스켈레톤): 실제 내용과 같은 자리에 회색 틀 */
.sk-wrap .card.sk {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sk-bar,
.sk-cell,
.sk-ring {
  display: block;
  background: linear-gradient(90deg, var(--fill) 25%, var(--fill2) 37%, var(--fill) 63%);
  background-size: 400% 100%;
  border-radius: 8px;
  animation: sk 1.4s ease-in-out infinite;
}
@keyframes sk {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.sk-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sk-item .sk-bar:first-child {
  border-radius: 10px;
  flex: none;
}
.sk-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.sk-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}
.sk-cell {
  aspect-ratio: 1 / 0.9;
  border-radius: 14px;
}
.sk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.sk-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 10px auto;
}
.hero-sk {
  min-height: 150px;
  justify-content: center;
}
@media (prefers-reduced-motion: reduce) {
  .sk-bar,
  .sk-cell,
  .sk-ring {
    animation: none;
  }
}
/* ───── 휴대폰: 손가락으로 편하게 (애플·구글 권장 44px 이상), 글자는 12px 이상 ───── */
@media (max-width: 899px) {
  .icon-btn,
  #mtop .icon-btn,
  #mtop .mt-class {
    width: 44px;
    height: 44px;
  }
  #mtop .mt-class {
    width: auto;
    min-height: 44px;
    padding: 0 12px;
  }
  .wcard .seg button,
  .seg button {
    min-height: 44px;
  }
  .icon-btn.sm {
    width: 40px;
    height: 40px;
  }
  .wk li .wk-b,
  .menu li > *,
  .mini-up li button,
  .feed li > * {
    min-height: 44px;
  }
  .wk-d,
  .menu li small,
  .hb i,
  .wk4 small,
  .wk4 i,
  .hm-row b,
  .hm-h small,
  .pains p,
  .gs-main small,
  .feed small,
  .tt-n {
    font-size: 12px;
  }
  .allergy-btn,
  .link.small {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  /* 앞으로 2주 부담: 한 줄에 14칸은 너무 좁다 → 7칸씩 두 줄 */
  .wl-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }
  .wl-strip .ws {
    height: 40px;
    font-size: 12px;
  }
  /* 처음 안내 카드: 폰에서는 2칸 + 설명 없이 (중요한 '할 일'이 화면 밖으로 밀리지 않게) */
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .steps li button {
    min-height: 84px;
    padding: 10px;
  }
  .steps small {
    display: none;
  }
  .steps b {
    font-size: 14px;
  }
}
/* 카드 머리에 버튼이 둘 이상이면 좁은 화면에서 줄을 바꿔 눌리게 (글자가 세로로 쪼개지지 않게) */
.cal-h {
  flex-wrap: wrap;
  row-gap: 8px;
}
.cal-h .row {
  flex-wrap: wrap;
}
@media (max-width: 899px) {
  .guide .cal-h .row {
    width: 100%;
    justify-content: space-between;
  }
  .guide .cal-h .btn.small,
  .guide .cal-h .link.small {
    min-height: 40px;
    white-space: nowrap;
  }
}
/* 이름·인사말이 어색하게 쪼개지지 않게 (이모지만 다음 줄로 내려가는 것 방지) */
.nowrap {
  white-space: nowrap;
}
@media (max-width: 420px) {
  .hero-today h1 {
    font-size: 25px;
  }
}
/* ───── 지금 수업 ───── */
.now-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  background: var(--fill);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 4px 0 10px;
  overflow: hidden;
}
.now-bar.on {
  background: var(--blue-s);
}
.now-bar b {
  font-size: 17px;
}
.now-n {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-d);
  background: var(--card);
  border-radius: 8px;
  padding: 3px 8px;
}
.now-left {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
}
.now-gauge {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: var(--p);
  background: var(--blue);
}
.now-go {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tt li {
  padding: 3px 0;
  border-radius: 8px;
}
.tt li small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.tt li.on {
  background: var(--blue-s);
  padding: 5px 8px;
  margin: 0 -8px;
}
.tt li.on b {
  color: var(--blue-d);
}
.tt li.nx b {
  font-weight: 700;
}
.now-pill {
  background: var(--blue-s);
  color: var(--ink2);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin: 10px 0 0;
}
.now-pill b {
  color: var(--blue-d);
}
/* ───── 급식 알레르기 경고 ───── */
.meal-bad,
.meal-ok {
  margin: 8px 0 6px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 10px;
}
.meal-bad {
  background: var(--red-s);
  color: var(--red-t);
}
.meal-ok {
  background: var(--green-s);
  color: var(--green-t);
}
.menu li.danger-dish span,
.chips-m span.danger-dish {
  color: var(--red-t);
  font-weight: 700;
}
.chips-m span.danger-dish {
  background: var(--red-s);
}
.dish-warn {
  flex: none;
  font-size: 12px;
}
.al-pick {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--fill);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  min-height: 44px;
}
.al-pick.on {
  background: var(--red-s);
  color: var(--red-t);
  font-weight: 700;
}
.al-pick b {
  color: var(--muted);
  font-size: 11px;
  min-width: 14px;
}
.al-pick.on b {
  color: var(--red-t);
}
.allergy {
  max-height: 46vh;
  overflow-y: auto;
}
/* ───── 반 투표 ───── */
.poll-card .poll + .poll {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.poll-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.poll-h b {
  font-size: 15px;
}
.poll-btns {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.poll.closed {
  opacity: 0.75;
}
.pv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.pv-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.pv-opt:disabled {
  cursor: default;
}
.pv-opt.mine {
  border-color: var(--blue);
}
.pv-opt.lead .pv-n {
  font-weight: 800;
  color: var(--blue-d);
}
.pv-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--blue-s);
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pv-opt.mine .pv-fill {
  background: #dceafe;
}
.pv-t,
.pv-n {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.pv-n {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink3);
  white-space: nowrap;
}
.pv-who {
  display: flex;
}
.pv-who .av {
  margin-left: -5px;
}
.pv-lv {
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--fill);
  color: var(--ink3);
}
.pv-lv.lv1 {
  background: var(--blue-s);
  color: var(--blue-d);
}
.pv-lv.lv2 {
  background: var(--orange-s);
  color: var(--orange-t);
}
.pv-lv.lv3 {
  background: var(--red-s);
  color: var(--red-t);
}
.pl-dates {
  display: grid;
  gap: 6px;
}
.pl-date {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fill);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 44px;
}
.pl-date input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}
.pl-date b {
  flex: 1;
  white-space: nowrap;
}
.pl-date.on {
  background: var(--blue-s);
}
.pl-date b {
  font-size: 14px;
}
.pl-date .pv-lv {
  flex: none;
  background: var(--card);
}
.pl-opt {
  width: 100%;
  margin-bottom: 6px;
}
.fld.sm {
  margin-top: 8px;
}
.av.xs {
  width: 18px;
  height: 18px;
  font-size: 9px;
  border: 1.5px solid var(--card);
}
/* ───── 첫 화면: 실제 앱을 작게 보여 주는 미리 보기 ───── */
.shot {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-l);
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.shot-bar b {
  font-size: 10px;
  margin-left: 6px;
}
.sb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fill2);
}
.shot-body {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: var(--bg);
}
.shot-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ss-p {
  height: 26px;
  border-radius: 8px;
  background: var(--fill2);
  margin-bottom: 2px;
}
.ss-n {
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--ink3);
  white-space: nowrap;
  overflow: hidden;
}
.ss-n.on {
  background: var(--blue-s);
  color: var(--blue-d);
  font-weight: 700;
}
.shot-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.sh-hero {
  background: linear-gradient(120deg, #2f80ed, #8b5cf6);
  color: #fff;
  border-radius: 12px;
  padding: 9px 11px;
}
.sh-hero small {
  opacity: 0.85;
  font-size: 9px;
}
.sh-hero > b {
  display: block;
  font-size: 13px;
  margin: 2px 0 6px;
}
.sh-kpis {
  display: flex;
  gap: 5px;
}
.sh-kpis span {
  flex: 1;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 4px 6px;
}
.sh-kpis i {
  display: block;
  font-style: normal;
  font-size: 8px;
  opacity: 0.9;
}
.sh-kpis b {
  font-size: 13px;
}
.sh-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sh-card {
  background: var(--card);
  border-radius: 10px;
  padding: 8px 9px;
  min-width: 0;
}
.sh-card > b {
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}
.sh-card small {
  color: var(--muted);
  display: block;
  font-size: 9px;
}
.sh-now {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--blue-s);
  border-radius: 7px;
  padding: 4px 6px;
  font-weight: 700;
  color: var(--blue-d);
  margin-bottom: 4px;
}
.sh-now em {
  margin-left: auto;
  font-style: normal;
  font-size: 9px;
  color: var(--ink3);
}
.sh-p {
  background: var(--card);
  border-radius: 5px;
  padding: 1px 4px;
  font-size: 9px;
}
.sh-chip {
  display: inline-block;
  background: var(--fill);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 9px;
  margin: 2px 2px 0 0;
}
.sh-chip.blue {
  background: var(--blue-s);
  color: var(--blue-d);
}
.sh-chip.warn {
  background: var(--red-s);
  color: var(--red-t);
  font-weight: 700;
}
.sh-vote {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 6px;
  margin-top: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sh-vote.on {
  border-color: var(--blue);
}
.sh-vote i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--blue-s);
}
.sh-vote > * {
  position: relative;
}
.sh-vote em {
  margin-left: auto;
  font-style: normal;
  font-size: 8px;
  border-radius: 4px;
  padding: 1px 4px;
}
.sh-vote .lv0 {
  background: var(--fill);
  color: var(--ink3);
}
.sh-vote .lv2 {
  background: var(--orange-s);
  color: var(--orange-t);
}
.sh-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin: 4px 0;
}
.sh-strip i {
  height: 14px;
  border-radius: 4px;
  background: var(--fill);
}
.sh-strip .l1 {
  background: var(--blue-s);
}
.sh-strip .l2 {
  background: #ffe2a8;
}
.sh-strip .l3 {
  background: #ffb4b0;
}
.sh-warn {
  background: var(--red-s);
  color: var(--red-t) !important;
  border-radius: 6px;
  padding: 3px 5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.sh-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 좁은 화면: 미리 보기 카드를 한 줄에 하나씩 (글자가 쪼개지지 않게) */
@media (max-width: 960px) {
  .shot-body {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .sh-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .shot {
    font-size: 12px;
  }
}

/* 반 고르기 창: 학생에게 보여 주는 '내 반' 줄 */
.sp-mine {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg2);
  margin-bottom: 8px;
}
.sp-mine b {
  font-size: 15px;
}

/* 비밀번호 세기 표시 */
.pw-meter {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pw-meter[data-s="0"] {
  color: #e8890c;
}
.pw-meter[data-s="1"] {
  color: #1bab5a;
}
.pw-meter[data-s="2"] {
  color: #1bab5a;
}
.pw-meter[data-s="x"] {
  color: var(--red);
}

/* 로그인에서 막혔을 때 빠져나갈 길 */
.err-ways {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

/* 개인정보·보안 창 */
.sec-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.sec-prot {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.sec-prot li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg2);
}
.sec-prot .pr-i {
  font-size: 18px;
  line-height: 1.2;
}
.sec-prot b {
  display: block;
  font-size: 14px;
}
.sec-prot small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.sec-two h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.sec-dot {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.sec-dot.no li::marker {
  color: var(--red);
}
.sec-log {
  width: 100%;
  margin: 16px 0 0;
  border-collapse: collapse;
  font-size: 13px;
}
.sec-log caption {
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.sec-log th,
.sec-log td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.sec-log th {
  color: var(--muted);
  font-weight: 600;
}
.sec-log .bad {
  color: var(--red);
}
.sec-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.btn.danger-ghost {
  color: var(--red);
  border-color: var(--line);
  background: transparent;
}
.priv-l {
  display: block;
  margin-top: 14px;
  font-size: 13px;
}

/* 🎯 놓칠 위험 카드 */
.rk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.rk-list > li > button {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--bg2);
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}
.rk-list > li > button:hover {
  background: var(--bg3, #eef1f5);
}
.rk-b {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
}
/* 작은 글자(12px)라 흰 글자 대비 4.5:1 을 넘기려고 조금 더 진한 색을 쓴다 (WCAG AA) */
.rk-b.rk-hi {
  background: #c7253a;
}
.rk-b.rk-mid {
  background: #a85a06;
}
.rk-b.rk-low {
  background: #17794a;
}
.rk-m {
  min-width: 0;
}
.rk-m b {
  display: block;
  font-size: 14px;
}
.rk-m small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}
.rk-why {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.rk-why i {
  font-style: normal;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* 🧠 내 공부 유형 */
.ins-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg2);
}
.ins-box h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.ins-big {
  margin: 0 0 10px;
  font-size: 15px;
}
.ins-cl {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 5px;
}
.ins-cl li {
  display: grid;
  grid-template-columns: 90px 1fr 42px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.ins-cl i {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--w), var(--line) var(--w));
}
.ins-cl em {
  font-style: normal;
  text-align: right;
  color: var(--muted);
}

/* 📅 마감 자동 배치 */
.dl-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.dl-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg2);
  font-size: 14px;
}
.dl-list b {
  flex: 1 1 120px;
}
.dl-list em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--card);
}
.dl-list em.lv0 {
  color: #1bab5a;
}
.dl-list em.lv1 {
  color: #3182f6;
}
.dl-list em.lv2 {
  color: #e8890c;
}
.dl-list em.lv3 {
  color: var(--red);
}

/* 🔎 비슷한 자료 */
.sim-box {
  margin: 16px 0;
}
.sim-box h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.sim-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.sim-box button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  min-height: 44px;
}
.sim-box b {
  display: block;
  font-size: 13px;
}
.sim-box small {
  color: var(--muted);
  font-size: 12px;
}

/* 🔔 앱을 닫아도 오는 알림 */
.push-box {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

/* ═══════════ 📌 복습 카드 (es/review.py · static/review.js) ═══════════ */
.sel-bar button.pin {
  background: var(--blue);
}
.rv-card .rv-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 12px;
}
.rv-n {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex: none;
}
.rv-n b {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -1px;
}
.rv-n small {
  color: var(--muted);
  font-size: 13px;
}
.rv-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.rv-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 12px;
}
.rv-units {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.rv-units li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.rv-units b {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rvu-s {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-s);
  padding: 3px 7px;
  border-radius: 7px;
}
.rvu-n {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}
.rv-units.big li {
  padding: 12px;
}
.rv-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.rv-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
}
.rv-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--line);
}
.rv-dot.on {
  background: var(--blue);
}
.rv-m {
  flex: 1;
  min-width: 0;
}
.rv-m b {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rv-m small {
  color: var(--muted);
  font-size: 12px;
}
.rv-due {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}
.rv-due.now {
  color: var(--blue);
  font-weight: 700;
}
.rv-prev {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin: 10px 0;
}
/* 복습 창 */
.dialog.rv-dlg {
  max-width: 620px;
  width: min(94vw, 620px);
}
.rv-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.rv-top b {
  font-size: 13px;
  color: var(--muted);
  flex: none;
}
.rv-prog {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.rv-prog i {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 0.25s;
}
.rv-label {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
}
.rv-label small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}
.rv-canvas-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: auto;
  max-height: 46vh;
}
.rv-canvas-wrap canvas {
  display: block;
  width: 100%;
}
.rv-tip {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.rv-acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.rv-a {
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-height: 56px;
  font-weight: 700;
  /* 바탕을 카드색(흰색)으로: 글자 대비 4.5:1 을 넘기기 위해 (WCAG AA) */
  background: var(--card);
}
.rv-a small {
  font-size: 11px;
  font-weight: 600;
  color: inherit; /* 흐리게(opacity) 하면 대비가 4.5:1 아래로 내려간다 */
}
.rv-a.again {
  border-color: #f3c0c8;
  color: var(--red-t);
}
.rv-a.hard {
  border-color: #f3dcb0;
  color: var(--orange-t);
}
.rv-a.good {
  border-color: #b6e0c8;
  color: var(--green-t);
}
.rv-done {
  text-align: center;
  padding: 8px 0;
}
.rv-done span {
  font-size: 44px;
}
.rv-done h2 {
  margin: 6px 0;
}
.rv-done .row {
  justify-content: center;
  margin-top: 14px;
}
@media (max-width: 560px) {
  .rv-row {
    grid-template-columns: 1fr 1fr;
  }
  .rv-canvas-wrap {
    max-height: 40vh;
  }
}

/* 로그인: 비밀번호 질문에서 '이름이 겹치는 친구' 가 빠져나갈 길 */
.link.same-name {
  display: block;
  margin: 14px auto 0;
  font-size: 13px;
  color: var(--muted);
}

/* ═══════════ 📅 하루별 공부 계획표 (es/ml.py plan_blocks) ═══════════ */
.plan-days .pd-cap {
  display: flex;
  gap: 10px;
  margin: 8px 0 2px;
  font-size: 13px;
  color: var(--ink3);
}
.plan-days .pd-cap label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.plan-days .pd-cap input {
  width: 68px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}
.pd-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.pd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
}
.pd-row.today {
  background: var(--blue-s);
  border-radius: 12px;
  padding: 10px;
  border-top: 0;
}
/* 연한 파랑 바탕에서는 회색 글자가 4.5:1 에 아주 조금 못 미친다 → 한 단계 진하게 (WCAG AA) */
.pd-row.today .pd-t,
.pd-row.today .pd-d small {
  color: var(--ink3);
}
.pd-d {
  flex: none;
  width: 54px;
  text-align: center;
}
.pd-d b {
  display: block;
  font-size: 14px;
}
.pd-d small {
  color: var(--muted);
  font-size: 11px;
}
.pd-row.rest .pd-d b {
  color: var(--red-t);
}
.pd-c {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}
.pd-chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink2);
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
  min-height: 32px;
}
.pd-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.pd-chip b {
  font-weight: 700;
}
.pd-rest {
  font-size: 12px;
  color: var(--muted);
}
.pd-t {
  flex: none;
  width: 62px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 560px) {
  .pd-d {
    width: 44px;
  }
  .pd-t {
    display: none;
  }
}

/* ═══════════ 💡 이 앱이 푸는 문제 (es/why.py · static/why.js) ═══════════ */
.wy-thesis {
  margin: 2px 0 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  background: var(--blue-s);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.wy-list,
.wy-calc,
.wy-why {
  list-style: none;
  margin: 8px 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.wy-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.wy-i {
  flex: none;
  font-size: 18px;
  width: 26px;
  text-align: center;
}
.wy-i.big {
  font-size: 24px;
  width: 34px;
}
.wy-list b {
  display: block;
  font-size: 14px;
}
.wy-list small,
.wy-calc small {
  color: var(--muted);
  font-size: 12px;
}
.wy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 18px;
}
.wy-chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--ink3);
  background: var(--soft);
}
.wy-chip b {
  color: var(--blue-d);
  margin-left: 2px;
}
.wy-chip i {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}
.wy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.wy-m {
  flex: 1;
  min-width: 0;
}
.wy-m b {
  display: block;
  font-size: 15px;
  margin: 1px 0 3px;
}
.wy-m p {
  margin: 0;
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.5;
}
.wy-m p.wy-how {
  color: var(--muted);
  margin-top: 3px;
}
.wy-why li {
  font-size: 13px;
  color: var(--ink3);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.wy-why li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--red-t);
  font-weight: 700;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}
@media (max-width: 560px) {
  .wy-row {
    flex-wrap: wrap;
  }
  .wy-row .btn {
    width: 100%;
  }
}

/* 지금 수업이 반 과목 목록에 없을 때의 한 줄 안내 */
.now-none {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
