:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-accent: #e7f3f1;
  --surface: #fffdf8;
  --ink: #1c1915;
  --muted: #6d655c;
  --line: #e4dccf;
  --accent: #0f6e6b;
  --accent-ink: #ffffff;
  --accent-soft: #e5f4f2;
  --saffron: #b86a12;
  --danger: #9f2d2d;
  --danger-soft: #fdecec;
  --ok: #0d6b45;
  --ok-soft: #e7f6ee;
  --info-soft: #e8f1fb;
  --shadow: 0 12px 40px rgba(48, 36, 18, 0.06);
  --radius: 18px;
  --chat-wall: #d5ebe4;
  --chat-in: #ffffff;
  --chat-out: #d9f5c8;
  --font: Vazirmatn, Tahoma, sans-serif;
  --top: 4.2rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141311;
  --bg-accent: #1a2423;
  --surface: #1e1c19;
  --ink: #f6f1e8;
  --muted: #b7aea3;
  --line: #34302a;
  --accent: #3dbeb8;
  --accent-ink: #10211f;
  --accent-soft: #1c3331;
  --saffron: #e0a45a;
  --danger: #ffb4b4;
  --danger-soft: #3a2222;
  --ok: #8ed7b4;
  --ok-soft: #1a3328;
  --info-soft: #1c2a3a;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  --chat-wall: #0e1614;
  --chat-in: #1c2826;
  --chat-out: #1a4034;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141311;
    --bg-accent: #1a2423;
    --surface: #1e1c19;
    --ink: #f6f1e8;
    --muted: #b7aea3;
    --line: #34302a;
    --accent: #3dbeb8;
    --accent-ink: #10211f;
    --accent-soft: #1c3331;
    --saffron: #e0a45a;
    --danger: #ffb4b4;
    --danger-soft: #3a2222;
    --ok: #8ed7b4;
    --ok-soft: #1a3328;
    --info-soft: #1c2a3a;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    --chat-wall: #0e1614;
    --chat-in: #1c2826;
    --chat-out: #1a4034;
  }
}

@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 400px at 100% -10%, var(--bg-accent), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 0.4rem; }
p { margin: 0.4rem 0; }

.wrap { width: min(1120px, calc(100% - 1.5rem)); margin: 0 auto; padding: 1.2rem 0 5.5rem; }
.wrap.tight { padding-top: 0.4rem; }
.topbar, .admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 0.7rem; align-items: center; color: inherit; text-decoration: none; }
.brand strong { display: block; letter-spacing: -0.03em; }
.brand small, .muted { color: var(--muted); }
.brand-mark {
  width: auto;
  height: 2.75rem;
  display: block;
  object-fit: contain;
  background: none;
  box-shadow: none;
}
.hero-logo {
  height: 11rem;
  width: auto;
  display: block;
  margin: 0.2rem 0 0.8rem;
}
.topnav, .actions, .card-head, .row-head, .search-bar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.desktop-nav a, .wrap .topnav a { color: inherit; text-decoration: none; padding: 0.2rem 0.35rem; }
.desktop-nav a.is-active, .wrap .topnav a.is-active { color: var(--accent); font-weight: 700; }
.wrap .topnav { margin: 0 0 0.85rem; }
.wrap .topnav a { padding: 0.35rem 0.7rem; border-radius: 999px; }
.wrap .topnav a.is-active { background: var(--accent-soft); }
.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.1rem;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 0.28rem 0.32rem calc(0.22rem + env(safe-area-inset-bottom));
}
.tabbar.has-chat,
.tabbar.has-manage,
.tabbar.has-play { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tabbar.has-chat.has-manage,
.tabbar.has-chat.has-play { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tabbar.has-chat.has-play.has-manage { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.tabbar.is-mini { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabbar.is-mini .tab-icon img {
  width: 1.38rem;
  height: 1.38rem;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
  min-height: 3.05rem;
  padding: 0.28rem 0.08rem 0.18rem;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.1;
  border-radius: 12px;
}
.tabbar a .tab-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabbar a.is-active {
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
}
.tabbar .tab-icon {
  display: grid;
  place-items: center;
  width: 1.42rem;
  height: 1.42rem;
  flex: none;
}
.tabbar .tab-icon svg {
  width: 1.38rem;
  height: 1.38rem;
  display: block;
}
.tabbar a.is-active .tab-icon svg { stroke-width: 2.1; }
.tabbar a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.field-picks { display: grid; gap: 0.35rem; margin: 0.6rem 0 1rem; }

.btn, .icon-btn, .text-btn {
  border: 0; border-radius: 999px; cursor: pointer;
  min-height: 2.7rem; padding: 0.45rem 1rem;
}
.btn { background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: white; }
html[data-theme="dark"] .btn-danger { color: #2a1010; }
.btn-small { min-height: 2.2rem; padding: 0.25rem 0.75rem; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; }
.icon-btn, .text-btn { background: transparent; color: var(--muted); min-height: 2.2rem; }
.text-btn { padding-inline: 0; }
.icon-btn { border: 1px solid var(--line); }

.pwa-toast {
  position: fixed;
  z-index: 35;
  inset-inline: 0.7rem;
  bottom: calc(0.7rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(36rem, calc(100% - 1.4rem));
  margin-inline: auto;
  padding: 0.7rem 0.8rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(28, 25, 21, 0.16);
}
.pwa-toast p { margin: 0; flex: 1; font-size: 0.92rem; line-height: 1.5; }
.pwa-toast .btn { min-height: 2.2rem; padding: 0.2rem 0.85rem; flex: none; }
.pwa-toast .text-btn { flex: none; min-height: 2.2rem; }
body:has(.tabbar) .pwa-toast { bottom: calc(4.5rem + env(safe-area-inset-bottom)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
  margin: 0.8rem 0;
}
.card.compact { padding: 0.85rem 1rem; }
.card h2 { font-size: 1.05rem; }
.hero { padding: 1.4rem 0 0.4rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); max-width: 14ch; }
.lede { font-size: 1.05rem; max-width: 42rem; }
.eyebrow { color: var(--saffron); font-weight: 700; margin-bottom: 0.2rem; }
.landing-hero {
  display: grid;
  gap: 1.2rem;
  align-items: center;
  padding: 1.1rem 0 0.6rem;
}
.landing-copy { min-width: 0; }
.landing-copy h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  max-width: 16ch;
  letter-spacing: -0.03em;
}
.landing-copy .lede { max-width: 38rem; }
.landing-week {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem 0.7rem;
}
.landing-week header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}
.landing-week header span {
  color: var(--saffron);
  font-size: 0.78rem;
  font-weight: 700;
}
.landing-week header strong { font-size: 0.95rem; }
.landing-week ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.landing-week li {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.35rem 0.7rem;
  align-items: center;
  min-width: 0;
  padding: 0.42rem 0.5rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 72%, var(--surface));
}
.landing-week li b { font-size: 0.82rem; }
.landing-week li > span {
  font-size: 0.8rem;
  color: var(--muted);
}
.landing-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  min-width: 0;
}
.landing-week li em {
  font-style: normal;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}
.landing-week li em.is-soft {
  background: color-mix(in srgb, var(--line) 55%, var(--surface));
  color: var(--ink);
  font-weight: 600;
}
.landing-week li em.is-warn {
  background: var(--danger-soft);
  color: var(--danger);
}
.landing-week li.is-busy { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.landing-points {
  display: grid;
  gap: 0.8rem;
  margin: 1.1rem 0 0.4rem;
}
.landing-points .card { margin: 0; }
.landing-points h2 { font-size: 1.02rem; }
.landing-points p { color: var(--muted); font-size: 0.94rem; }
.landing-ico {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 0.55rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.landing-ico svg { width: 1.2rem; height: 1.2rem; }
.landing-steps { margin: 1.6rem 0 0.4rem; }
.landing-steps > h2 { margin-bottom: 0.85rem; font-size: 1.25rem; }
.landing-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.landing-steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.landing-steps li b {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.95rem;
}
.landing-steps li p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem; }
.landing-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin: 1.2rem 0 0.4rem;
  padding: 1.1rem 1.15rem;
  background: linear-gradient(160deg, var(--accent-soft), var(--surface) 62%);
}
.landing-cta h2 { margin: 0; font-size: 1.2rem; max-width: 22ch; }
.landing-cta p { margin: 0.25rem 0 0; }
.feature-grid, .stat-grid { display: grid; gap: 0.8rem; }
.stat-grid { grid-template-columns: repeat(2, 1fr); }
.stat-grid strong { display: block; font-size: 1.6rem; }
.page-head { margin-bottom: 0.8rem; }
.auth-card { max-width: 28rem; margin-inline: auto; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}
.switch-row span { display: grid; gap: 0.15rem; min-width: 0; }
.switch-row strong { font-size: 0.95rem; }
.switch-row small { display: block; font-weight: 400; }
.switch {
  position: relative;
  display: block;
  flex: none;
  width: 2.85rem;
  height: 1.7rem;
  margin: 0;
  direction: ltr;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, var(--surface));
  pointer-events: none;
  transition: background 0.16s ease;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.34rem;
  height: 1.34rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.16s ease;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { left: 1.32rem; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
label { display: grid; gap: 0.3rem; font-weight: 500; margin: 0.7rem 0; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 80%, var(--bg));
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  min-height: 2.8rem;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, white); border-color: var(--accent); }
.grow { flex: 1; min-width: 12rem; margin: 0; }
.search-bar { align-items: end; margin: 0.6rem 0 1rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.flash, .banner {
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  margin: 0.7rem 0;
}
.flash-ok, .banner { background: var(--ok-soft); color: var(--ok); }
.flash-bad { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--info-soft); }
.banner a { color: inherit; font-weight: 700; }
.empty { text-align: center; padding: 1.5rem 1rem; }
.chip {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.meta { display: grid; gap: 0.25rem; margin: 0.6rem 0; }
.meta div { display: flex; gap: 0.5rem; }
.meta dt { color: var(--muted); min-width: 3.2rem; }
.meta dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0.4rem 0; }
.note-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.45rem; }
.note-list li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.note-btn { white-space: nowrap; }
.id-preview {
  display: block;
  width: min(100%, 22rem);
  max-height: 18rem;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.chat-shell { display: grid; gap: 0.8rem; animation: none !important; }
.chat-rooms, .chat-thread {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  min-height: 0;
}
.chat-list-head { padding: 0.85rem 0.95rem 0.35rem; }
.chat-list-head h2 { margin: 0; font-size: 1.2rem; }
.chat-notify-ask { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.82rem; min-height: 1.2rem; }
.chat-mute {
  width: 2.2rem;
  height: 2.2rem;
  min-height: 0;
  margin-inline-start: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chat-mute svg { width: 1.3rem; height: 1.3rem; display: block; }
.chat-mute-off { display: none; }
.chat-mute.is-on { color: var(--saffron); }
.chat-mute.is-on .chat-mute-on { display: none; }
.chat-mute.is-on .chat-mute-off { display: block; }
.chat-note-toast {
  position: fixed;
  z-index: 80;
  inset-inline: 0.7rem;
  top: calc(0.7rem + env(safe-area-inset-top));
  width: min(26rem, calc(100% - 1.4rem));
  margin-inline: auto;
  display: grid;
  gap: 0.12rem;
  padding: 0.78rem 0.9rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(28, 25, 21, 0.22);
  animation: chat-note-in 0.22s ease-out;
}
.chat-note-toast strong { font-size: 0.95rem; }
.chat-note-toast span { color: var(--muted); font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-note-toast .text-btn { justify-self: start; color: var(--accent); font-weight: 700; }
@keyframes chat-note-in {
  from { transform: translateY(-0.6rem); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.tabbar a.has-unread .tab-icon,
.desktop-nav a.has-unread {
  position: relative;
}
.tabbar a.has-unread .tab-icon::after,
.desktop-nav a.has-unread::after {
  content: "";
  position: absolute;
  top: -0.12rem;
  inset-inline-end: -0.12rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--danger, #c0392b);
  box-shadow: 0 0 0 2px var(--surface);
}
.chat-rooms { display: flex; flex-direction: column; }
.chat-rooms nav { display: grid; flex: 1; min-height: 0; overflow: auto; }
.chat-list-label {
  margin: 0;
  padding: 0.55rem 0.9rem 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.chat-rooms a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.9rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.chat-rooms a:last-child { border-bottom: 0; }
.chat-rooms a.is-active { background: var(--accent-soft); }
.chat-rooms a.is-important { background: color-mix(in srgb, var(--saffron) 12%, var(--surface)); }
.chat-pin {
  display: inline-block;
  margin-inline-start: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--saffron);
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  vertical-align: 0.12em;
}
html[data-theme="dark"] .chat-pin { color: #2a1a08; }
.chat-room-text { display: grid; min-width: 0; flex: 1; }
.chat-room-text strong,
.chat-room-text span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-room-text span { color: var(--muted); font-size: 0.82rem; }
.chat-rooms a.has-unread .chat-room-text strong { font-weight: 800; }
.chat-unread {
  flex: none;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
}
.chat-unread[hidden] { display: none !important; }
.chat-avatar {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}
.chat-rooms .chat-avatar { width: 3rem; height: 3rem; font-size: 1.15rem; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.45rem;
  padding: 0.4rem 0.7rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
}
.chat-head-text { flex: 1; min-width: 0; }
.chat-members {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--bg);
  padding: 0.75rem 0.9rem 1rem;
}
.chat-members-count { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.82rem; }
.chat-member {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--line);
}
.chat-member .chat-avatar { width: 2.35rem; height: 2.35rem; font-size: 0.95rem; }
.chat-member strong { font-weight: 600; }
.chat-member em { margin-right: auto; color: var(--muted); font-style: normal; font-size: 0.78rem; }
.pro-badge {
  display: inline-block;
  margin-inline-start: 0.35rem;
  padding: 0.05rem 0.38rem 0;
  border-radius: 999px;
  background: var(--saffron);
  color: #1c1915;
  font-size: 0.62rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.04em;
  line-height: 1.5;
  vertical-align: middle;
}
.class-members { margin: 0 0 1rem; padding: 0; list-style: none; }
.class-members li { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.3; }
.chat-status.is-on { color: var(--ok); }
.chat-back {
  width: 2.2rem;
  height: 2.2rem;
  display: none;
  place-items: center;
  flex: none;
  color: var(--accent);
  text-decoration: none;
  border-radius: 50%;
}
.chat-back svg, .chat-send svg, .chat-reply-x svg, .chat-reply-btn svg { width: 1.25rem; height: 1.25rem; display: block; }
.chat-thread { display: flex; flex-direction: column; overflow: hidden; }
.chat-thread [data-thread-body] {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-shell [hidden] { display: none !important; }
.chat-log {
  flex: 1;
  min-height: 16rem;
  max-height: 58vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  padding: 0.65rem 0.7rem 0.85rem;
  direction: ltr;
  background-color: var(--chat-wall);
  background-image:
    radial-gradient(var(--chat-dot, rgba(15, 110, 107, 0.11)) 0.7px, transparent 0.8px),
    radial-gradient(rgba(255, 255, 255, 0.35) 0.7px, transparent 0.8px);
  background-size: 22px 22px, 14px 14px;
  background-position: 0 0, 8px 10px;
}
.chat-log::before {
  content: "";
  flex: 1 1 auto;
  min-height: 0.2rem;
}
.chat-day {
  align-self: center;
  direction: rtl;
  margin: 0.45rem 0 0.25rem;
  padding: 0.12rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  font-size: 0.75rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.chat-empty { align-self: center; margin: auto; color: var(--muted); font-size: 0.9rem; direction: rtl; }
.chat-row {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  direction: rtl;
  width: fit-content;
  max-width: min(82%, 26rem);
  margin-top: 0.42rem;
}
.chat-row.is-follow { margin-top: 0.12rem; }
.chat-row.is-me { align-items: flex-end; align-self: flex-end; }
.chat-msg {
  position: relative;
  width: fit-content;
  max-width: 100%;
  padding: 0.38rem 0.62rem 0.32rem;
  border-radius: 16px;
  background: var(--chat-in);
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(16, 24, 20, 0.08);
}
.chat-row.is-me .chat-msg { background: var(--chat-out); }
.chat-row:not(.is-me):not(:has(+ .chat-row.is-follow)) .chat-msg { border-radius: 16px 16px 16px 4px; }
.chat-row.is-me:not(:has(+ .chat-row.is-follow)) .chat-msg { border-radius: 16px 16px 4px 16px; }
.chat-msg::after {
  content: "";
  display: none;
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 10px;
  background: inherit;
}
.chat-row:not(.is-me):not(:has(+ .chat-row.is-follow)) .chat-msg::after {
  display: block;
  left: -5px;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}
.chat-row.is-me:not(:has(+ .chat-row.is-follow)) .chat-msg::after {
  display: block;
  right: -5px;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.chat-msg strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.3;
  margin-bottom: 0.08rem;
}
.chat-row.is-me [data-name],
.chat-row.is-follow [data-name] { display: none; }
.chat-msg p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 0.96rem;
}
.chat-msg time {
  float: left;
  margin: 0.45rem 0.4rem 0 0;
  color: color-mix(in srgb, var(--ink) 48%, transparent);
  font-size: 0.68rem;
  line-height: 1.2;
  direction: ltr;
}
.chat-msg.is-flash { outline: 2px solid var(--accent); outline-offset: 1px; }
.chat-own-del {
  position: absolute;
  top: 0.18rem;
  inset-inline-end: 0.18rem;
  z-index: 2;
  width: 1.55rem;
  height: 1.55rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--danger);
  cursor: pointer;
}
.chat-shell.is-admin .chat-msg { padding-inline-end: 1.7rem; }
.chat-shell.is-admin .chat-hover {
  display: flex;
  position: static;
  inset: auto;
  flex-direction: row;
  margin-top: 0.2rem;
}
.chat-own-del svg { width: 0.95rem; height: 0.95rem; display: block; }
.chat-hover {
  position: absolute;
  top: 0.15rem;
  inset-inline-start: -2.15rem;
  z-index: 4;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
}
.chat-row.is-me .chat-hover { inset-inline-start: auto; inset-inline-end: -2.15rem; }
.chat-reply-btn {
  width: 1.7rem;
  height: 1.7rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.chat-reply-btn.is-del, .chat-react.is-del { color: var(--danger); }
.chat-msg-reply {
  display: grid;
  gap: 0.02rem;
  margin: 0.12rem 0 0.28rem;
  padding: 0.22rem 0.45rem;
  border: 0;
  width: 100%;
  text-align: start;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border-inline-start: 3px solid var(--accent);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.chat-msg-reply strong { font-size: 0.75rem; margin: 0; pointer-events: none; color: var(--accent); }
.chat-msg-reply span {
  pointer-events: none;
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-dock { background: var(--surface); border-top: 1px solid var(--line); }
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
}
.chat-compose[hidden] { display: none !important; }
.chat-compose textarea {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 2.55rem;
  max-height: 7.2rem;
  resize: none;
  overflow: auto;
  border: 0;
  border-radius: 1.3rem;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  padding: 0.55rem 0.9rem;
  line-height: 1.45;
  font-size: 1rem;
}
.chat-compose textarea:focus { outline: none; }
.chat-send {
  width: 2.7rem;
  height: 2.7rem;
  min-height: 2.7rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
.chat-send svg { transform: scaleX(-1); }
.chat-send:disabled { opacity: 0.38; cursor: default; }
.chat-theme {
  width: 2.2rem;
  height: 2.2rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chat-theme svg { width: 1.2rem; height: 1.2rem; display: block; }
.chat-theme.is-on { color: var(--accent); background: var(--accent-soft); }
.chat-theme-box {
  border-top: 1px solid var(--line);
  background: var(--surface);
  max-height: 14.5rem;
  overflow: auto;
  padding: 0.5rem 0.55rem 0.65rem;
}
.chat-theme-box[hidden] { display: none !important; }
.chat-theme-meta { margin: 0 0 0.45rem; color: var(--muted); font-size: 0.82rem; }
.chat-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.chat-theme-grid button {
  margin: 0;
  padding: 0.35rem 0.25rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.25;
}
.chat-theme-grid button.is-on { border-color: var(--accent); background: var(--accent-soft); }
.chat-theme-grid button.is-locked { opacity: 0.72; }
.chat-theme-swatch {
  display: block;
  height: 2.1rem;
  border-radius: 8px;
  margin-bottom: 0.3rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.chat-sticker {
  width: 2.4rem;
  height: 2.4rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chat-sticker svg { width: 1.35rem; height: 1.35rem; display: block; }
.chat-sticker.is-on { color: var(--accent); background: var(--accent-soft); }
.chat-coins {
  flex: none;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.chat-sticker-box {
  border-top: 1px solid var(--line);
  background: var(--surface);
  max-height: 16.5rem;
  overflow: auto;
  padding: 0.45rem 0.55rem 0.6rem;
}
.chat-sticker-box[hidden] { display: none !important; }
.chat-sticker-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.chat-sticker-tabs button {
  min-height: 2rem;
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.chat-sticker-tabs button.is-on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.chat-sticker-meta {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.chat-sticker-meta .btn { display: inline-flex; vertical-align: middle; }
.chat-sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}
.chat-sticker-grid button {
  margin: 0;
  padding: 0.2rem;
  border: 0;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  cursor: pointer;
  min-height: 3.6rem;
}
.chat-sticker-grid button:disabled { opacity: 0.45; cursor: default; }
.chat-sticker-grid img {
  width: 100%;
  height: 3.8rem;
  object-fit: contain;
  display: block;
}
.chat-msg.is-sticker {
  background: transparent;
  box-shadow: none;
  padding: 0.15rem 0.2rem;
}
.chat-row.is-me .chat-msg.is-sticker { background: transparent; }
.chat-msg.is-sticker::after { display: none !important; }
.chat-msg.is-sticker p {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  white-space: normal;
  gap: 0.15rem;
}
.chat-row.is-me .chat-msg.is-sticker p { align-items: flex-end; }
.chat-msg.is-sticker .chat-sticker-img {
  width: 8.2rem;
  height: 8.2rem;
  object-fit: contain;
  display: block;
}
.chat-msg.is-sticker [data-body] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.chat-msg.is-sticker time {
  float: none;
  margin: 0;
  opacity: 0.7;
}
.chat-sticker-buy {
  margin-inline-start: 0.35rem;
  min-height: 1.85rem;
  padding: 0.1rem 0.7rem;
}
.chat-locked {
  margin: 0;
  padding: 0.75rem 0.9rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.chat-rooms .chat-verify {
  flex: none;
  margin: 0.7rem 0.8rem;
  padding: 0.85rem 0.9rem;
  max-height: 38%;
  overflow: auto;
}
.chat-rooms .chat-verify h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.chat-rooms .id-preview {
  width: auto;
  max-width: 100%;
  max-height: 5rem;
  margin: 0.35rem auto;
}
.chat-verify form { margin: 0.55rem 0; }
.chat-verify .btn { width: 100%; }
.id-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 0.35rem 0 0.55rem; }
.chat-reply {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.7rem 0.15rem;
  background: var(--surface);
}
.chat-reply.is-on { display: flex; }
.chat-reply[hidden] { display: none !important; }
.chat-reply-quote {
  flex: 1;
  min-width: 0;
  display: grid;
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 0.55rem;
}
.chat-reply-quote strong { color: var(--accent); font-size: 0.82rem; }
.chat-reply-quote span {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-reply-x {
  width: 2rem;
  height: 2rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chat-react-picker[hidden] { display: none !important; }
.chat-reacts {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem;
  margin-top: -0.28rem;
  padding-inline: 0.28rem;
  z-index: 1;
}
.chat-react-picker {
  position: absolute;
  z-index: 6;
  bottom: calc(100% + 0.3rem);
  inset-inline-end: 0;
  inset-inline-start: auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.08rem;
  width: max-content;
  max-width: 20.5rem;
  padding: 0.22rem 0.32rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.chat-row.is-me .chat-react-picker { inset-inline-end: auto; inset-inline-start: 0; }
.chat-react {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 0;
  background: color-mix(in srgb, var(--surface) 88%, var(--chat-wall));
  color: inherit;
  border-radius: 999px;
  padding: 0.02rem 0.34rem;
  min-height: 1.45rem;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}
.chat-react b { font-size: 0.68rem; font-weight: 700; color: var(--muted); }
.chat-react.is-on { background: var(--accent-soft); }
.chat-react.is-on b { color: var(--accent); }
.chat-react-add {
  min-width: 1.45rem;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
  opacity: 0;
}
.chat-row:hover .chat-react-add,
.chat-reacts:focus-within .chat-react-add { opacity: 0.9; }
.chat-reacts.is-bare { display: none; }
.chat-reacts.is-bare:has(.chat-react-picker:not([hidden])) { display: flex; }
@media (hover: none) {
  .chat-react-add { display: none; }
  .chat-reacts:has(.chat-react-picker:not([hidden])) .chat-react-add { display: inline-flex; opacity: 0.9; }
}
.chat-react-picker .chat-react { background: transparent; box-shadow: none; min-width: 1.8rem; justify-content: center; }
.chat-react svg { width: 1.05rem; height: 1.05rem; display: block; }
.check-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  margin: 0.45rem 0;
  width: 100%;
}
.check-line input[type="radio"],
.check-line input[type="checkbox"] {
  width: 1.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  min-height: 1.15rem;
  margin: 0;
  padding: 0;
  flex: none;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
}
.check-line > span {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
}
.chat-report-box {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.7rem;
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--ink) 28%, transparent);
}
.chat-report-box[hidden] { display: none !important; }
.chat-report-box .card {
  width: min(100%, 26rem);
  margin: 0;
  max-height: min(86dvh, 36rem);
  overflow: auto;
}
.card .chat-reply-quote {
  margin: 0.55rem 0;
  padding: 0.2rem 0 0.2rem 0;
  padding-inline-start: 0.55rem;
}
.card .chat-reply-quote span {
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: unset;
}
.kind-form fieldset { padding: 0.75rem 1rem 0.9rem; }
.kind-form .admin-picks { display: grid; }
.kind-form:has([name="kind"][value="open"]:checked) .admin-picks { opacity: 0.55; }
@media (min-width: 860px) {
  .chat-report-box { align-items: center; padding: 1.2rem; }
  .chat-shell:not(.is-admin) {
    grid-template-columns: 20rem minmax(0, 1fr);
    align-items: stretch;
    height: calc(100vh - var(--top) - 7.5rem);
  }
  .chat-shell.is-admin { grid-template-columns: 1fr; }
  .chat-shell.is-admin .chat-thread { height: min(70vh, 42rem); }
  .chat-rooms, .chat-thread { overflow: hidden; }
  .chat-rooms nav { overflow: auto; }
  .chat-log { max-height: none; }
  .chat-row:hover,
  .chat-row:focus-within { z-index: 8; }
  .chat-row:hover .chat-hover,
  .chat-row:focus-within .chat-hover { display: flex; }
}
@media (min-width: 860px) and (hover: hover) and (pointer: fine) {
  .chat-shell:not(.is-admin) .chat-row {
    padding-inline-start: 2.35rem;
  }
  .chat-shell:not(.is-admin) .chat-row.is-me {
    padding-inline-start: 0;
    padding-inline-end: 2.35rem;
  }
  .chat-shell:not(.is-admin) .chat-hover {
    inset-inline-start: 0.2rem;
  }
  .chat-shell:not(.is-admin) .chat-row.is-me .chat-hover {
    inset-inline-start: auto;
    inset-inline-end: 0.2rem;
  }
}
@media (max-width: 859px) {
  body:has(.chat-shell) .wrap {
    width: 100%;
    padding: 0;
  }
  body:has(.chat-shell) .chat-intro { display: none; }
  .chat-shell { gap: 0; }
  .chat-rooms, .chat-thread {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .chat-shell.is-list .chat-thread { display: none; }
  .chat-shell.is-thread .chat-rooms { display: none; }
  body:has(.chat-shell.is-thread) .topbar { display: none; }
  body:has(.chat-shell.is-thread) .wrap { padding: 0; }
  .chat-shell.is-thread {
    position: fixed;
    z-index: 25;
    inset: 0 0 calc(3.5rem + env(safe-area-inset-bottom)) 0;
    display: flex;
  }
  .chat-shell.is-thread .chat-thread { flex: 1; border-radius: 0; }
  .chat-shell.is-thread .chat-log { max-height: none; }
  .chat-back { display: grid; }
  .chat-shell.is-list .chat-rooms {
    min-height: calc(100dvh - var(--top));
    padding-bottom: calc(3.6rem + env(safe-area-inset-bottom));
  }
}
.group-missing { display: inline-flex; align-items: center; gap: 0.4rem; }
.stack { display: grid; gap: 0.2rem; }
.inline-form { margin: 1rem 0 2rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 40rem; }
th, td { text-align: start; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.stack-form { display: grid; gap: 0.4rem; min-width: 14rem; }
.form-grid { display: grid; gap: 0.2rem 0.8rem; }
fieldset { border: 1px dashed var(--line); border-radius: 14px; margin: 0.4rem 0; }
.import-picks label { display: flex; align-items: flex-start; gap: 0.45rem; font-weight: 400; }
.repeat { display: grid; gap: 0.4rem; margin-bottom: 0.5rem; }
.pager { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 1rem 0; }
.pager a, .pager span {
  min-width: 2.3rem; min-height: 2.3rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; text-decoration: none; border: 1px solid var(--line); padding: 0 0.45rem;
}
.pager .is-current { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.site-footer { color: var(--muted); width: min(1120px, calc(100% - 1.5rem)); margin: 0 auto 2rem; font-size: 0.92rem; }
.site-footer strong { color: inherit; font-weight: 700; }
.is-muted { opacity: 0.65; }

.timetable { display: flex; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.6rem; align-items: flex-start; }
.time-col { position: relative; width: 3.2rem; flex: none; margin-top: 2.15rem; height: calc(var(--span) * 0.9px); }
.time-col span { position: absolute; inset-inline-start: 0; transform: translateY(-50%); color: var(--muted); font-size: 0.75rem; }
.days { display: flex; gap: 0.45rem; flex: 1; min-width: max-content; }
.day { width: 9.5rem; }
.day h2 { font-size: 0.95rem; text-align: center; margin-bottom: 0.35rem; }
.day-grid {
  position: relative;
  height: calc(var(--span) * 0.9px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.day-grid i { position: absolute; inset-inline: 0; border-top: 1px dashed var(--line); }
.class-block {
  position: absolute;
  overflow: hidden;
  border-radius: 12px;
  padding: 0.35rem 0.4rem;
  text-decoration: none;
  color: var(--ink);
  background: color-mix(in srgb, var(--block) 18%, var(--surface));
  border-inline-start: 3px solid var(--block);
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: 0.78rem;
  line-height: 1.35;
}
.class-block strong { font-size: 0.82rem; }
.class-block.is-conflict { outline: 2px solid var(--danger); }

.desktop-week, .week-list { display: none; }
.week-mobile { display: block; }
.day-switch {
  position: sticky;
  top: var(--top);
  z-index: 15;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.35rem;
  padding: 0.35rem 0 0.75rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  min-height: 3.15rem;
  min-width: 0;
  padding: 0.25rem 0.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
}
.day-tab b { font-weight: 700; line-height: 1; }
.day-tab span {
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.day-tab.is-today { border-color: var(--accent); }
.day-tab.is-on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.day-tab.is-on span { background: color-mix(in srgb, var(--accent-ink) 22%, transparent); color: inherit; }
.week-mobile.is-ready .day-panel { display: none; }
.week-mobile.is-ready .day-panel.is-on { display: block; }
.day-panel h2 { margin-top: 0.2rem; }
.session-list { display: grid; gap: 0.65rem; }
.session-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--block, var(--accent));
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.session-card.is-conflict { border-color: var(--danger); }
.session-card > a {
  display: grid;
  grid-template-columns: 6.6rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 0.85rem;
  color: inherit;
  text-decoration: none;
  min-height: 4.6rem;
}
.session-when { font-weight: 700; line-height: 1.45; }
.session-body { display: grid; gap: 0.1rem; min-width: 0; }
.session-body strong { font-size: 1.02rem; }
.session-body span, .session-body em { color: var(--muted); font-style: normal; font-size: 0.9rem; }
.session-card.is-conflict em { color: var(--danger); font-weight: 700; }
.session-card .actions { padding: 0 0.85rem 0.85rem; }
.session-card .btn { width: 100%; }

.chips { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-bad { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); color: var(--danger); }
.chip-muted { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.group-tip { display: grid; gap: 0.35rem; width: 100%; }
.group-tip p { margin: 0; }
.group-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  line-height: 1;
}
.group-btn .muted { font-size: 0.85rem; }
.plat {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
}
.plat svg { width: 1.35rem; height: 1.35rem; display: block; }
.filter-check { display: flex; align-items: center; gap: 0.45rem; margin: 0; min-height: 2.8rem; font-weight: 500; }
.filter-check input { width: 1.1rem; min-height: 0; }
.status-ok { color: var(--ok); font-weight: 700; }
.bulk-report { margin-top: 0.8rem; }
.line-ok { color: var(--ok); }
.line-bad { color: var(--danger); }

.admin-shell { display: block; }
.side {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem;
}
.side nav { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0.6rem 0; }
.side nav a { color: inherit; text-decoration: none; white-space: nowrap; padding: 0.35rem 0.6rem; border-radius: 999px; }
.side nav a.is-active { background: var(--accent-soft); color: var(--accent); }
.admin-main { min-width: 0; }

@media (min-width: 860px) {
  .desktop-nav { display: flex; align-items: center; gap: 0.6rem; }
  .tabbar { display: none; }
  .wrap { padding-bottom: 2rem; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .landing-hero { grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr); gap: 2rem; padding-top: 1.6rem; }
  .landing-points { grid-template-columns: repeat(3, 1fr); }
  .landing-steps ol { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
  .repeat { grid-template-columns: 1.1fr 0.8fr 0.8fr 1.4fr; }
  .admin-shell { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
  .side { border-bottom: 0; border-inline-end: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
  .side nav { display: grid; overflow: visible; }
  .side form { margin-top: auto; }
  .admin-body { background: var(--bg); }
  .desktop-week { display: flex; }
  .week-list { display: block; }
  .week-mobile { display: none; }
}

@media (max-width: 859px) {
  .desktop-nav { display: none; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions > .btn,
  .actions > form { width: 100%; }
  .actions > form .btn { width: 100%; }
  .is-guest .wrap { padding: 0.35rem 0 1.2rem; }
  .is-guest .topbar { padding: 0.4rem 0.7rem; gap: 0.45rem; }
  .is-guest .brand { gap: 0.4rem; min-width: 0; }
  .is-guest .brand small { display: none; }
  .is-guest .brand-mark { height: 2rem; }
  .is-guest .topnav { flex-wrap: nowrap; gap: 0.35rem; }
  .is-guest .topnav .btn,
  .is-guest .icon-btn { min-height: 2.15rem; padding: 0.15rem 0.65rem; }
  .hero { padding: 0.15rem 0 0; text-align: center; }
  .hero-logo { height: 8rem; margin: 0.15rem auto 0.35rem; }
  .hero h1 { font-size: 1.55rem; margin-inline: auto; }
  .lede { font-size: 0.98rem; margin-inline: auto; }
  .is-landing .landing-copy { text-align: center; }
  .is-landing .landing-copy h1 { margin-inline: auto; font-size: 1.55rem; }
  .is-landing .landing-copy .lede { margin-inline: auto; }
  .is-landing .landing-copy .actions { justify-content: stretch; }
  .landing-week { padding: 0.75rem 0.75rem 0.55rem; }
  .landing-week li { grid-template-columns: 3.6rem 1fr; }
  .landing-points { gap: 0.55rem; }
  .landing-points .card { padding: 0.85rem 0.9rem; }
  .landing-steps > h2 { text-align: center; }
  .landing-cta { text-align: center; justify-content: center; }
  .landing-cta .actions { width: 100%; }
  .feature-grid { gap: 0.55rem; }
  .feature-grid .card { margin: 0; padding: 0.85rem 0.9rem; }
  .site-footer { margin-bottom: 1rem; text-align: center; }
  body:has(.tabbar) .site-footer { margin-bottom: calc(5.2rem + env(safe-area-inset-bottom)); font-size: 0.82rem; }
}

.play-shell {
  max-width: 26rem;
  margin: 0 auto 1.4rem;
  padding: 1rem 0.8rem 1.4rem;
  text-align: center;
}
.play-coins {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--saffron);
}
.play-daily, .play-hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }
.play-hit {
  position: relative;
  width: min(78vw, 20.5rem);
  height: min(78vw, 20.5rem);
  margin: 1.1rem auto 0.9rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #ffe08a 0%, #e0a45a 58%, #9a5a18 100%);
  box-shadow: 0 14px 0 #7a4310, 0 22px 40px rgba(90, 40, 8, 0.28);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.play-hit:disabled { opacity: 0.55; cursor: default; }
.play-hit.is-hit { transform: scale(0.96); }
.play-ring {
  position: absolute;
  inset: 0.55rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 248, 220, 0.35);
  pointer-events: none;
}
.play-hamster {
  position: relative;
  width: 72%;
  height: 72%;
  display: block;
  margin: 14% auto 0;
}
.play-fly {
  position: absolute;
  inset-inline-start: 50%;
  top: 12%;
  color: #fff8dc;
  font-weight: 800;
  pointer-events: none;
  animation: play-fly 0.6s ease-out forwards;
}
.play-energy { margin-top: 0.35rem; }
.play-energy-bar {
  display: block;
  height: 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, var(--surface));
  overflow: hidden;
}
.play-energy-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #e0a45a, #0f6e6b);
}
.play-energy p { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--muted); }
@keyframes play-fly {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -1.6rem); }
}

@keyframes unihelp-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  contain: paint;
  background: var(--bg);
  animation: splash-up 0.42s cubic-bezier(0.4, 0, 0.2, 1) 0.62s forwards;
}
html.splash-seen .splash { display: none; }
.splash-mark {
  display: grid;
  justify-items: center;
  gap: 0.95rem;
}
.splash-mark img {
  width: 7.4rem;
  height: auto;
  animation: splash-hit 0.42s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}
.splash-bar {
  width: 7.2rem;
  height: 0.28rem;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 16%, var(--line));
}
.splash-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--saffron), var(--accent));
  transform: scaleX(0);
  transform-origin: right center;
  animation: splash-load 0.48s ease 0.08s forwards;
}
@keyframes splash-hit {
  0% { opacity: 0; transform: scale(0.86); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes splash-load { to { transform: scaleX(1); } }
@keyframes splash-up { to { transform: translateY(-110%); } }
.wrap > * { animation: unihelp-rise 0.45s ease both; }
.wrap > *:nth-child(2) { animation-delay: 0.06s; }
.wrap > *:nth-child(3) { animation-delay: 0.12s; }
.hero-logo { animation: unihelp-rise 0.55s ease both; }
.card, .session-card, .pwa-toast { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.btn, .icon-btn, .tabbar a { transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease; }
.btn:active, .icon-btn:active { transform: scale(0.98); }
.pwa-toast { animation: unihelp-rise 0.35s ease both; }
.flash { animation: unihelp-rise 0.3s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .splash { display: none !important; }
}

.plan-pick { margin: 0 0 1.1rem; }
.plan-pick-note { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.88rem; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.plan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem;
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
}
.plan-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-card h2, .plan-card h3 { margin: 0; font-size: 1rem; display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.plan-card h2 em, .plan-card h3 em { font-style: normal; font-size: 0.72rem; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0.05rem 0.45rem; }
.plan-card p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.plan-card .btn { width: 100%; }
.plan-state { color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.plan-swatch {
  height: 2.5rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 4px;
  overflow: hidden;
}
.plan-swatch i { display: block; border-radius: 4px; background: var(--accent); min-height: 0; }
.plan-swatch.is-classic { grid-template-columns: repeat(4, 1fr); align-items: end; }
.plan-swatch.is-classic i:nth-child(1) { height: 62%; }
.plan-swatch.is-classic i:nth-child(2) { height: 100%; opacity: 0.55; }
.plan-swatch.is-classic i:nth-child(3) { height: 38%; }
.plan-swatch.is-classic i:nth-child(4) { height: 78%; background: var(--saffron); }
.plan-swatch.is-agenda { grid-template-rows: repeat(4, 1fr); }
.plan-swatch.is-agenda i:nth-child(2) { width: 74%; opacity: 0.7; }
.plan-swatch.is-agenda i:nth-child(3) { width: 90%; }
.plan-swatch.is-agenda i:nth-child(4) { width: 46%; background: var(--saffron); }
.plan-swatch.is-board { grid-template-columns: repeat(4, 1fr); }
.plan-swatch.is-board i:nth-child(odd) { background: var(--saffron); }
.plan-swatch.is-timeline { grid-template-columns: 6px 1fr; grid-template-rows: repeat(3, 1fr); }
.plan-swatch.is-timeline i:nth-child(1) { grid-row: 1 / 4; border-radius: 99px; }
.plan-swatch.is-timeline i:nth-child(4) { display: none; }

.plan-agenda { display: grid; gap: 0.65rem; }
.agenda-day {
  display: grid;
  grid-template-columns: 4.3rem minmax(0, 1fr);
  gap: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.55rem;
  box-shadow: var(--shadow);
}
.agenda-day.is-today { border-color: var(--accent); }
.agenda-mark {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.05rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  min-height: 4.2rem;
  padding: 0.35rem 0.2rem;
}
.agenda-mark b { font-size: 1.35rem; line-height: 1; }
.agenda-mark span { font-size: 0.72rem; }
.agenda-day.is-today .agenda-mark { background: var(--accent); color: var(--accent-ink); }
.agenda-rows, .agenda-item { display: grid; gap: 0.35rem; min-width: 0; }
.agenda-free, .line-free, .board-col > p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.agenda-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  grid-template-areas: "when title" "when place";
  gap: 0.05rem 0.55rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.4rem 0.5rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--block, var(--accent)) 18%, var(--surface));
  border-inline-start: 3px solid var(--block, var(--accent));
}
.agenda-row time { grid-area: when; font-weight: 700; font-size: 0.82rem; line-height: 1.45; }
.agenda-row strong { grid-area: title; min-width: 0; }
.agenda-row span { grid-area: place; color: var(--muted); font-size: 0.8rem; min-width: 0; }
.agenda-row.is-conflict { box-shadow: inset 0 0 0 1px var(--danger); }

.plan-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(11.2rem, 16rem);
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}
.board-col {
  background: var(--bg-accent);
  border-radius: 16px;
  padding: 0.55rem;
  min-height: 8rem;
}
.board-col.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.board-col header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 0.45rem; }
.board-col header b {
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 0.8rem;
}
.board-card {
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 0.45rem;
  border-top: 3px solid var(--block, var(--accent));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.board-card.is-conflict { box-shadow: inset 0 0 0 1px var(--danger); }
.board-card > a { display: grid; gap: 0.08rem; padding: 0.55rem 0.6rem 0.45rem; color: inherit; text-decoration: none; }
.board-card time { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.board-card span { color: var(--muted); font-size: 0.8rem; }

.plan-line { display: grid; gap: 1rem; }
.plan-line h2 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.plan-line ol {
  list-style: none;
  margin: 0;
  padding: 0.1rem 0 0.1rem 0;
  display: grid;
  gap: 0.65rem;
  border-inline-start: 2px solid var(--line);
}
.plan-line li {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 0.55rem;
  position: relative;
  padding-inline-start: 0.85rem;
}
.plan-line li::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  inset-inline-start: -6px;
  top: 0.85rem;
}
.plan-line li.is-next::before { background: var(--saffron); box-shadow: 0 0 0 4px var(--accent-soft); }
.plan-line li.is-conflict::before { background: var(--danger); }
.plan-line time { font-weight: 800; padding-top: 0.55rem; }
.plan-line time small { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.line-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border-inline-start: 3px solid var(--block, var(--accent));
}
.line-card > a { display: grid; gap: 0.12rem; padding: 0.65rem 0.75rem; color: inherit; text-decoration: none; }
.line-card span { color: var(--muted); font-size: 0.86rem; }
.line-card em { font-style: normal; color: var(--saffron); font-weight: 700; font-size: 0.8rem; }
.plan-line li.is-conflict .line-card em { color: var(--danger); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0 0.45rem 0.45rem; }
.plan-actions .btn { min-height: 2rem; padding: 0.15rem 0.6rem; font-size: 0.78rem; width: auto; }

.exam-board { display: grid; gap: 0.7rem; }
.exam-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.exam-tile.is-today { border-color: var(--saffron); }
.exam-tile.is-conflict { border-color: var(--danger); }
.exam-tile > a { display: grid; gap: 0.15rem; padding: 0.85rem 0.9rem 0.65rem; color: inherit; text-decoration: none; }
.exam-tile header { display: flex; gap: 0.7rem; align-items: center; }
.exam-tile header b { font-size: 2.1rem; line-height: 1; color: var(--accent); }
.exam-tile header span { font-weight: 700; }
.exam-tile header small { display: block; color: var(--muted); font-weight: 500; }
.exam-tile p { margin: 0; color: var(--muted); }
.exam-tile em {
  justify-self: start;
  margin-top: 0.25rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (min-width: 760px) {
  .plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .agenda-row { grid-template-columns: 7rem minmax(0, 1fr) auto; grid-template-areas: "when title place"; }
  .exam-board { grid-template-columns: 1fr 1fr; }
}

@media print {
  .topbar, .tabbar, .actions, .icon-btn, .site-footer, .search-bar, .pwa-toast, .plan-pick { display: none !important; }
  body { background: white; }
  .day-grid { break-inside: avoid; }
  .week-mobile { display: none !important; }
  .desktop-week { display: flex !important; }
  .week-list { display: block !important; }
  .plan-board { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
}

.account-page { display: grid; gap: 0.15rem; }
.account-page > .page-head { margin-bottom: 0.35rem; }
.account-page > .page-head h1 { margin-bottom: 0.1rem; }
.account-layout { display: grid; gap: 0.15rem; align-items: start; }
.account-shops { display: grid; gap: 0.15rem; min-width: 0; }
.account-shops > .card,
.account-shops > .plan-pick,
.account-layout > .card { margin: 0.35rem 0; }
.account-page #profile .btn { width: 100%; }
.account-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
}
.account-menu a {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  border-radius: 999px;
  min-height: 2.35rem;
  padding: 0.28rem 0.85rem;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
}
.account-menu a:hover { border-color: var(--accent); color: var(--accent); }
.plan-jump { margin: -0.4rem 0 0.8rem; }
.look-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}
.look-card > div { display: grid; gap: 0.15rem; min-width: 0; }
.look-card h2, .look-card p { margin: 0; }
.look-card .btn { width: auto; flex: none; }
.account-page .plan-pick {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
}
.account-page .plan-pick h2 { font-size: 1.05rem; }
.account-page .plan-grid,
.account-page .sticker-grid { grid-template-columns: 1fr; }
.card .plan-card,
.account-page .plan-card {
  background: color-mix(in srgb, var(--bg) 72%, var(--surface));
  box-shadow: none;
}
.account-page .plan-card .btn {
  min-height: 2.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: normal;
}
.sticker-row img { flex: none; }
.theme-swatch {
  height: 2.6rem;
  border-radius: 10px;
  background: var(--wall, var(--accent-soft));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
}
.theme-swatch i { display: block; border-radius: 8px; }
.theme-swatch i:first-child { background: var(--in, white); }
.theme-swatch i:last-child { background: var(--out, var(--accent)); }
.sticker-grid { margin-top: 0.2rem; }
.sticker-row { display: flex; gap: 0.2rem; min-height: 2.5rem; }
.sticker-row img { width: 2.35rem; height: 2.35rem; object-fit: contain; }
@media (min-width: 720px) {
  .account-page .plan-grid,
  .account-page .sticker-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .account-layout { grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: 0.85rem; }
  .account-page #chat-theme .plan-grid,
  .account-page .sticker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .look-card { align-items: stretch; flex-direction: column; }
  .look-card .btn { width: 100%; }
}

.plan-agenda > .is-today,
.plan-line > .is-today,
.plan-board > .is-today,
.exam-tile.is-today {
  scroll-margin-top: calc(var(--top) + 0.8rem);
  scroll-margin-inline: 0.6rem;
}
.agenda-row.is-live { box-shadow: inset 0 0 0 1px var(--saffron); }
.board-card.is-live { box-shadow: 0 0 0 2px var(--saffron); }
tr.is-today td { background: var(--accent-soft); }
@media (max-width: 859px) {
  .plan-board {
    display: block;
    overflow: visible;
    padding-bottom: 0;
  }
  .plan-board .board-col { min-height: 0; }
  .plan-board .board-card > a {
    display: grid;
    grid-template-columns: 4.8rem minmax(0, 1fr);
    align-items: center;
    gap: 0.1rem 0.7rem;
    padding: 0.85rem 0.9rem;
  }
  .plan-board .board-card time {
    grid-row: 1 / span 2;
    font-size: 1.2rem;
  }
}
@media (min-width: 860px) {
  .exam-board > .plan-day { display: contents; }
}
