@font-face {
  font-family: "Hakgyoansim Poster B";
  src: url("./fonts/HakgyoansimPosterB.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Gong Gothic Light";
  src: url("./fonts/GongGothicLight.woff") format("woff");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #e8f1fb;
  --ink: #132238;
  --muted: #64748b;
  --line: #d9e5f2;
  --accent: #075da4;
  --accent-strong: #06386f;
  --accent-soft: #dcecff;
  --blue: #075da4;
  --amber: #a7650f;
  --danger: #b64235;
  --danger-soft: #f8e4e0;
  --ok: #075da4;
  --ok-soft: #e8f1fb;
  --shadow: 0 18px 46px rgba(10, 41, 78, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  background: #f4f6f8;
}

html.student-online-mode {
  background: #0b2746;
}

/* Only the installed iOS lecture screen extends behind the system bars. */
html.student-lecture-ios-standalone {
  background-color: #0b2746;
}

html.student-lecture-ios-standalone body:not([data-app-mode="teacher"]) .main-shell {
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
}

/* Private study rooms */
.study-room-open-button,
.study-room-manage-button,
.study-room-cafe-button,
.study-room-menu-button,
.study-room-return-button,
.study-room-leave-button,
.study-room-subject-button {
  border: 1px solid rgba(26, 63, 106, 0.18);
  border-radius: 10px;
  background: #fff;
  color: #173a63;
  min-height: 36px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.study-room-open-button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  min-height: 28px;
  border-color: color-mix(in srgb, var(--room-accent, #607985) 28%, transparent);
  border-radius: 8px;
  background: var(--room-accent-soft, #e4ebef);
  color: var(--room-accent, #526c79);
  padding: 5px 8px;
  font-size: 0.68rem;
  box-shadow: none;
}

.study-room-open-icon {
  font-size: 0.72rem;
  line-height: 1;
}

.study-private-room-page {
  padding-bottom: 190px;
}

.study-private-room {
  overflow: hidden;
  border: 1px solid #c8d8ea;
  border-radius: 20px;
  background:
    linear-gradient(rgba(240, 248, 255, 0.94), rgba(231, 243, 252, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(37, 104, 163, 0.04) 31px 32px);
  box-shadow: 0 18px 45px rgba(34, 73, 110, 0.14);
}

.study-private-room-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #173a63, #2678b8);
}

.study-private-room-title {
  min-width: 0;
}

.study-private-room-title > span {
  display: block;
  margin-bottom: 4px;
  color: #9edbff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.study-private-room-title > strong {
  display: block;
  overflow: hidden;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-private-room-title p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
}

.study-private-room-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.study-private-room-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 14px 9px;
  color: var(--room-muted);
}

.study-private-room-overview > strong {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.study-private-room-members-link {
  border: 0;
  background: transparent;
  color: var(--room-accent);
  padding: 3px 0;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--room-accent) 35%, transparent);
  text-underline-offset: 3px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.study-private-room-members-link:hover {
  color: var(--room-ink);
  text-decoration-color: currentColor;
}

.study-private-room-members-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--room-accent) 28%, transparent);
  outline-offset: 2px;
}

.study-room-manage-button,
.study-room-cafe-button,
.study-room-menu-button,
.study-room-leave-button {
  min-height: 32px;
  border-color: color-mix(in srgb, var(--room-accent) 28%, transparent);
  background: var(--room-accent-soft);
  color: var(--room-ink);
  padding: 6px 9px;
  font-size: 0.75rem;
}

.study-room-cafe-button {
  color: var(--room-accent);
}

.study-room-menu-button {
  background: transparent;
  color: var(--room-muted);
}

.study-room-return-button {
  min-height: 29px;
  border-color: color-mix(in srgb, var(--room-accent) 28%, transparent);
  border-radius: 8px;
  background: var(--room-accent-soft);
  color: var(--room-ink);
  padding: 5px 8px;
  font-size: 0.68rem;
}

.study-room-leave-button {
  color: #875b5b;
}

.study-private-my-status,
.study-private-seat-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px;
  border: 1px solid color-mix(in srgb, var(--room-accent) 28%, transparent);
  border-radius: 14px;
  padding: 13px 14px;
  background: color-mix(in srgb, var(--room-toolbar) 88%, #fff);
}

.study-private-my-status span {
  display: block;
  color: var(--room-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.study-private-my-status strong,
.study-private-seat-guide strong {
  color: var(--room-ink);
}

.study-private-my-status p,
.study-private-seat-guide p {
  margin: 3px 0 0;
  color: var(--room-muted);
  font-size: 0.78rem;
}

.study-private-my-status time {
  color: var(--room-accent);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.study-private-my-actions {
  width: 104px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.study-private-my-actions .study-room-subject-button,
.study-private-my-actions .study-private-release-button {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 7px 9px;
  font-size: 0.75rem;
  line-height: 1.2;
}

.study-private-release-button {
  border-color: #d4dce4;
  background: #fff;
  color: #7b5260;
}

.study-private-seat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 4px 14px 18px;
}

.study-private-seat {
  position: relative;
  display: grid;
  grid-template-columns: auto 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 8px;
  min-height: 78px;
  border: 1px solid #c8d9e8;
  border-radius: 13px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.9);
  color: #24445f;
  text-align: left;
  cursor: pointer;
}

.study-private-seat.mine {
  border-color: #1884cc;
  background: #e7f5ff;
  box-shadow: inset 0 0 0 2px rgba(24, 132, 204, 0.12);
}

.study-private-seat.studying::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ac677;
  box-shadow: 0 0 0 4px rgba(42, 198, 119, 0.13);
}

.study-private-seat-number {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #dceaf6;
  color: #1c567e;
  font-size: 0.73rem;
  font-weight: 900;
}

.study-private-seat .study-cafe-avatar {
  grid-row: 1 / 3;
  width: 34px;
  transform: scale(0.65);
  transform-origin: center;
}

.study-private-seat > strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-private-seat > small {
  color: #72889a;
  font-size: 0.66rem;
}

.study-private-empty-plus {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eaf3fa;
  color: #4580a8;
  font-size: 1.1rem;
}

.study-room-chat {
  border-top: 3px solid var(--room-border);
  background: color-mix(in srgb, var(--room-floor) 82%, #fff);
  color: var(--room-ink);
}

.study-room-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 43px;
  padding: 8px 11px;
  border-bottom: 1px solid color-mix(in srgb, var(--room-accent) 22%, transparent);
  background: var(--room-toolbar);
}

.study-room-chat-head > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.study-room-unread {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  padding: 0 5px;
  background: #ffca3a;
  color: #163b62;
  font-size: 0.68rem;
  font-weight: 900;
}

.study-room-chat-size,
.study-room-chat-toggle {
  border: 1px solid color-mix(in srgb, var(--room-accent) 30%, transparent);
  border-radius: 7px;
  background: var(--room-accent-soft);
  color: var(--room-ink);
  padding: 5px 8px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.study-room-chat-log {
  overflow-y: auto;
  height: 180px;
  padding: 9px 11px;
  scrollbar-color: var(--room-accent) transparent;
}

.study-room-chat.expanded .study-room-chat-log {
  height: min(48vh, 430px);
}

.study-room-message {
  position: relative;
  padding: 4px 42px 5px 0;
  color: var(--room-ink);
  font-size: 0.78rem;
}

.study-room-message.system {
  padding-right: 0;
  color: var(--room-accent);
}

.study-room-message-meta {
  display: inline-flex;
  gap: 7px;
  margin-right: 6px;
}

.study-room-message-meta strong {
  color: var(--room-accent);
}

.study-room-message.system .study-room-message-meta strong {
  color: var(--room-accent);
}

.study-room-message-meta time {
  color: var(--room-muted);
  font-size: 0.65rem;
}

.study-room-message p {
  display: inline;
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.study-room-message.deleted p {
  color: var(--room-muted);
  font-style: italic;
}

.study-room-message-delete {
  position: absolute;
  top: 3px;
  right: 0;
  border: 0;
  background: transparent;
  color: var(--room-muted);
  font: inherit;
  font-size: 0.64rem;
  cursor: pointer;
}

.study-room-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 8px;
  border-top: 1px solid color-mix(in srgb, var(--room-accent) 22%, transparent);
  background: var(--room-toolbar);
}

.study-room-chat-form textarea {
  resize: none;
  min-height: 38px;
  max-height: 88px;
  border: 1px solid color-mix(in srgb, var(--room-accent) 42%, transparent);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--room-ink);
  font: inherit;
  font-size: 0.8rem;
}

.study-room-chat-send {
  border: 1px solid var(--room-accent);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--room-accent);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.study-room-chat-collapsed-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--room-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.study-room-chat.collapsed .study-room-chat-head > div:first-child {
  display: none;
}

.study-room-chat.collapsed .study-room-chat-head {
  display: none;
}

.study-room-list-modal .info-modal-panel,
.study-room-create-modal .info-modal-panel,
.study-room-manage-modal .info-modal-panel,
.study-room-members-modal .info-modal-panel,
.study-room-join-modal .info-modal-panel {
  width: min(94vw, 540px);
}

.study-room-list-modal-content,
.study-room-form,
.study-room-manage-content {
  display: grid;
  gap: 12px;
}

.study-room-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.study-room-list-head p {
  margin: 0;
  color: #647486;
  font-size: 0.8rem;
}

.study-room-create-button,
.study-room-join-button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  padding: 8px 11px;
  background: var(--study-room-modal-action, #477f8c);
  color: #fff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.study-room-create-button:hover,
.study-room-join-button:hover {
  background: var(--study-room-modal-action-hover, #3b6f7b);
}

.study-room-list {
  display: grid;
  gap: 9px;
  overflow-y: auto;
  max-height: 55vh;
}

.study-room-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d8e2ec;
  border-radius: 12px;
  padding: 12px;
  background: #f9fbfd;
}

.study-room-list-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.study-room-list-item p {
  margin: 4px 0;
  color: #627588;
  font-size: 0.74rem;
}

.study-room-list-item > div > span {
  color: #718294;
  font-size: 0.7rem;
}

.study-room-list-item.full .study-room-join-button {
  background: #aab5bf;
  cursor: default;
}

.study-room-list-empty {
  padding: 30px 15px;
  color: #637487;
  text-align: center;
}

.study-room-list-empty p {
  margin: 5px 0 0;
}

.study-room-form textarea {
  min-height: 78px;
}

.study-room-manage-members {
  display: grid;
  gap: 7px;
  border-top: 1px solid #e0e7ee;
  border-bottom: 1px solid #e0e7ee;
  padding: 12px 0;
}

.study-room-manage-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 8px;
  background: #f5f7f9;
  font-size: 0.8rem;
}

.study-room-members-list {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}

.study-room-members-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 11px;
  padding: 10px;
  background: #f8fafc;
  color: inherit;
  font: inherit;
  text-align: left;
}

.study-room-members-item.mine {
  border-color: color-mix(in srgb, var(--accent) 32%, #e1e8ef);
  background: color-mix(in srgb, var(--accent-soft) 45%, white);
}

.study-room-members-item.is-clickable {
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.study-room-members-item.is-clickable:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, #e1e8ef);
  background: color-mix(in srgb, var(--accent-soft) 28%, #f8fafc);
}

.study-room-members-item.is-clickable:active {
  transform: translateY(1px);
}

.study-room-members-item.is-clickable:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
  outline-offset: 1px;
}

.study-room-members-profile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.study-room-members-avatar {
  flex: 0 0 auto;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #d8e7f4;
  color: #315b7d;
  font-size: 0.78rem;
  font-weight: 900;
}

.study-room-members-avatar.tone-mint { background: #d9f0e9; color: #277060; }
.study-room-members-avatar.tone-purple { background: #e8e0f4; color: #67518c; }
.study-room-members-avatar.tone-orange { background: #f5e5d2; color: #8c5b25; }
.study-room-members-avatar.tone-rose { background: #f4dfe6; color: #8c4f63; }
.study-room-members-avatar.tone-navy { background: #dbe2ec; color: #344d6a; }

.study-room-members-profile > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.study-room-members-profile strong {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #233b51;
  font-size: 0.82rem;
}

.study-room-members-profile strong > span:not(.study-room-host-label) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-room-host-label {
  flex: 0 0 auto;
  color: #8a6927;
  font-size: 0.66rem;
  font-weight: 850;
}

.study-room-members-profile > div > span,
.study-room-members-meta {
  color: #708194;
  font-size: 0.68rem;
}

.study-room-members-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  white-space: nowrap;
}

.study-room-members-meta [class^="status-"] {
  color: #597086;
  font-weight: 850;
}

.study-room-members-meta .status-studying { color: #16805b; }
.study-room-members-meta .status-paused { color: #9a6b25; }

.study-room-members-item-arrow {
  color: #8091a2;
  font-size: 1.15rem;
  line-height: 1;
}

.study-room-close-button {
  width: 100%;
}

.study-room-options-modal .info-modal-panel {
  width: min(92vw, 420px);
}

.study-room-options-content {
  display: grid;
  gap: 10px;
}

.study-room-options-summary {
  display: grid;
  gap: 4px;
  border-radius: 11px;
  padding: 12px;
  background: #f5f8fb;
}

.study-room-options-summary > strong {
  color: #263f56;
}

.study-room-options-summary > span {
  color: #708194;
  font-size: 0.72rem;
  font-weight: 800;
}

.study-room-options-summary > p {
  margin: 4px 0 0;
  color: #64788b;
  font-size: 0.74rem;
  line-height: 1.45;
}

.study-room-withdraw-button {
  margin-top: 5px;
  width: 100%;
}

.study-room-member-detail {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
}

@media (min-width: 600px) {
  .study-private-seat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .study-private-seat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .study-room-chat-log {
    height: 220px;
  }
}

@media (max-width: 520px) {
  .study-private-room-toolbar {
    display: grid;
  }

  .study-private-room-actions {
    justify-content: flex-start;
  }

  .study-private-my-status,
  .study-private-seat-guide {
    align-items: flex-start;
  }

  .study-room-list-head {
    align-items: stretch;
    flex-direction: column;
  }

}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(7, 93, 164, 0.08), transparent 32%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  font-family: "Gong Gothic Light", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body.student-online-mode {
  font-family: "Gong Gothic Light", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

body.student-online-mode h1,
body.student-online-mode h2,
body.student-online-mode h3,
body.student-online-mode .student-study-cafe-card-title {
  font-family: "Hakgyoansim Poster B", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.student-refresh-indicator {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 220;
  min-width: 142px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-strong);
  box-shadow: 0 12px 30px rgba(10, 41, 78, 0.16);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, 0);
  transition: opacity 120ms ease, transform 120ms ease;
}

.student-refresh-indicator[hidden] {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.no-script-warning {
  margin: 12px auto 0;
  width: min(420px, calc(100% - 28px));
  border: 1px solid var(--danger-soft);
  border-radius: 12px;
  background: #fff7f5;
  color: var(--danger);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.app-frame {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand-copy {
  min-width: 0;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-section {
  margin: 14px 8px 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.nav-list button,
.icon-btn,
.btn {
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

.nav-list button {
  width: 100%;
  padding: 13px 14px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-list button:hover,
.nav-list button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.main-shell {
  padding: 22px min(4vw, 44px) 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  letter-spacing: 0;
}

.top-actions,
.action-row,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

.icon-btn {
  min-height: 38px;
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.icon-btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.content-area {
  display: grid;
  gap: 16px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.stat-group h2 {
  margin: 0;
  font-size: 1rem;
}

.stat-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cohort-filter {
  display: grid;
  grid-template-columns: auto minmax(92px, 128px);
  align-items: center;
  gap: 8px;
}

.cohort-filter span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.cohort-filter select {
  min-height: 36px;
  padding: 7px 10px;
}

.stat-group .grid.stats {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.stat,
.outing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 188px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.module-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.module-card h3,
.module-card p {
  margin-bottom: 0;
}

.module-card p {
  color: var(--muted);
  line-height: 1.55;
}

.module-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.module-status.active {
  background: var(--ok-soft);
  color: var(--ok);
}

.management-empty {
  display: grid;
  gap: 8px;
}

.management-empty strong,
.management-empty p {
  margin: 0;
}

.stat {
  padding: 16px;
}

.stat span,
.field span,
.subtle {
  color: var(--muted);
}

.field-hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.stat strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
  font-size: 2rem;
}

.stat-action {
  display: flex;
  align-items: baseline;
  gap: 4px;
  width: fit-content;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 2rem;
  font-weight: 800;
  cursor: pointer;
}

.stat-action:hover {
  color: var(--accent);
}

.stat-action:focus-visible {
  outline: 3px solid rgba(37, 157, 116, 0.24);
  outline-offset: 4px;
  border-radius: 6px;
}

.stat strong small,
.stat-action small {
  font-size: 0.95rem;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.track-option-form {
  align-items: end;
}

.track-option-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.track-option-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.track-option-row.fixed {
  background: var(--surface-soft);
}

.track-option-order {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.track-option-name {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.track-option-name strong,
.track-option-name span {
  overflow-wrap: anywhere;
}

.track-option-name span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.track-option-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.track-option-actions .mini-btn {
  min-width: 34px;
  min-height: 32px;
  padding: 6px 9px;
}

.track-option-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(10, 41, 78, 0.12);
}

.student-id-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.student-id-check .btn {
  min-width: 74px;
  padding-inline: 14px;
}

.student-check-result {
  min-height: 22px;
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--muted);
}

.student-check-result.success {
  color: var(--accent);
}

.student-check-result.error {
  color: #b93838;
}

.split-time-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 240px;
}

.visually-hidden-file {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-input-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.photo-input-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-input-button {
  min-width: 96px;
}

body:not([data-app-mode="teacher"]) .photo-input-button {
  width: auto;
  margin-top: 0;
}

.photo-input-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.photo-input-status.selected {
  color: var(--accent);
}

.attendance-form .photo-input-status.loading,
.attendance-form .photo-input-status.selected {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #9bc8ee;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--accent-strong);
  line-height: 1.45;
}

.attendance-submit-ready {
  box-shadow: 0 0 0 3px rgba(7, 93, 164, 0.14);
}

.photo-input-status.loading {
  color: var(--accent-strong);
}

.photo-input-status .loading-spinner {
  inline-size: 14px;
  block-size: 14px;
  border-color: rgba(7, 93, 164, 0.24);
  border-top-color: var(--accent);
}

.pending-verification-notice {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #f0c46b;
  border-radius: 8px;
  background: #fff7e6;
  color: #7a4d00;
}

.pending-verification-notice strong {
  font-size: 0.96rem;
}

.pending-verification-notice span {
  color: #8a620f;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.photo-input-preview {
  grid-column: 1 / -1;
  inline-size: 92px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-soft);
}

.photo-input-preview img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.photo-submit-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #b9d6f0;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.photo-submit-status.error {
  border-color: #f0c7bf;
  background: #fff4f1;
  color: var(--danger);
}

.photo-submit-status .loading-spinner {
  flex: 0 0 auto;
  inline-size: 16px;
  block-size: 16px;
  border-color: rgba(7, 93, 164, 0.22);
  border-top-color: var(--accent);
}

.loading-spinner {
  inline-size: 16px;
  block-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.data-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft, #f7f9fc);
  color: var(--muted);
  text-align: center;
}

.data-loading-state .loading-spinner {
  flex: 0 0 auto;
  inline-size: 20px;
  block-size: 20px;
  border-color: rgba(7, 93, 164, 0.2);
  border-top-color: var(--accent);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
}

.btn.secondary {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.88rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge.out {
  background: #e7f0ff;
  color: var(--blue);
}

.badge.pending {
  background: #fff0d7;
  color: var(--amber);
}

.badge.requested {
  background: #fff0d7;
  color: var(--amber);
}

.badge.verified,
.badge.returned,
.badge.approved {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.outing-card {
  padding: 16px;
}

.outing-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.outing-meta {
  color: var(--muted);
  line-height: 1.7;
}

.outing-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfdff;
  padding: 5px 8px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.2;
}

.meta-chip em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.date-groups {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.date-group {
  display: grid;
  gap: 10px;
}

.date-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.date-heading h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.date-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.teacher-sections {
  display: grid;
  gap: 20px;
  margin-top: 14px;
}

.teacher-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 18px;
}

.teacher-date-sections {
  display: grid;
  gap: 14px;
}

.teacher-date-section {
  display: grid;
  gap: 8px;
}

.section-heading.compact {
  padding: 0 2px;
}

.section-heading.compact h3 {
  font-size: 0.95rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 11px 12px;
}

.section-heading h3 {
  margin-bottom: 0;
}

.section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.outing-data-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.outing-data-table th,
.outing-data-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  font-size: 0.9rem;
}

.outing-data-table tr:last-child th,
.outing-data-table tr:last-child td {
  border-bottom: 0;
}

.outing-data-table th {
  width: 104px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.outing-data-table td {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.excel-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.excel-table {
  min-width: 1080px;
  border-collapse: collapse;
  box-shadow: none;
}

.excel-table th,
.excel-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 9px 8px;
  font-size: 0.86rem;
  vertical-align: middle;
}

.excel-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.excel-table td {
  background: #fff;
}

.excel-table tr:hover td {
  background: #f6f9fd;
}

.excel-table th:last-child,
.excel-table td:last-child {
  border-right: 0;
}

.teacher-outing-table {
  min-width: 1420px;
}

.teacher-outing-table.no-approval-columns {
  min-width: 1100px;
}

.teacher-outing-table .outing-date-cell {
  min-width: 102px;
  width: 102px;
  white-space: nowrap;
}

.teacher-outing-table .outing-expected-cell {
  min-width: 62px;
  width: 62px;
  white-space: nowrap;
}

.teacher-outing-table .outing-time-cell {
  min-width: 86px;
  width: 86px;
  white-space: nowrap;
}

.teacher-outing-table .outing-name-cell,
.teacher-outing-table .outing-reason-cell {
  min-width: 72px;
  white-space: nowrap;
}

.teacher-outing-table .outing-photo-cell {
  min-width: 122px;
  width: 122px;
}

.teacher-outing-table .outing-status-cell {
  min-width: 82px;
  width: 82px;
  text-align: center;
}

.teacher-outing-table .outing-status-cell .badge {
  white-space: nowrap;
}

.teacher-outing-table .action-cell {
  min-width: 86px;
  width: 86px;
}

.wide-cell {
  min-width: 180px;
  max-width: 260px;
  overflow-wrap: anywhere;
}

.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.photo-mini-list {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.photo-mini-button,
.photo-mini-list img {
  width: 52px;
}

.photo-mini-button {
  display: grid;
  gap: 3px;
  justify-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
}

.photo-mini-list img {
  display: block;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  object-fit: cover;
}

.photo-mini-button:hover img {
  border-color: var(--accent);
}

.photo-mini-placeholder {
  display: grid;
  place-items: center;
  width: 52px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 800;
}

.photo-mini-label {
  display: block;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-photo-thumb {
  width: 72px;
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.attendance-photo-thumb img {
  display: block;
  width: 72px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
}

.attendance-photo-thumb:hover img {
  border-color: var(--accent);
}

.penalty-summary-table {
  min-width: 720px;
}

.penalty-history-table {
  min-width: 860px;
}

.penalty-total {
  color: #b42318;
}

.reward-total {
  color: #047857;
}

.penalty-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

.penalty-period-controls,
.penalty-sort-controls {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.penalty-period-controls .field {
  min-width: 150px;
  margin: 0;
}

.penalty-period-controls input {
  min-height: 34px;
  padding: 6px 8px;
}

.penalty-period-actions {
  display: flex;
  gap: 6px;
}

.mini-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.penalty-toolbar-right {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.fitness-toolbar {
  align-items: flex-end;
}

.fitness-toolbar .field {
  min-width: 180px;
  margin: 0;
}

.fitness-score-input {
  width: 86px;
  min-height: 34px;
  padding: 6px 8px;
}

.fitness-reason-input {
  width: 220px;
  min-height: 34px;
  padding: 6px 8px;
}

.fitness-reason-text {
  min-width: 180px;
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.fitness-bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.fitness-bulk-actions.bottom {
  margin-top: 10px;
}

.fitness-month-stat strong {
  font-size: 1.25rem;
  line-height: 1.25;
  white-space: nowrap;
}

.fitness-score-summary {
  display: grid;
  gap: 2px;
  min-width: 132px;
}

.fitness-score-summary strong {
  color: var(--accent-strong);
}

.fitness-score-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.info-modal-panel.penalty-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  gap: 10px;
  padding: 18px;
  overflow: visible;
}

.penalty-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.penalty-form textarea {
  min-height: 72px;
}

.penalty-reason-control {
  display: grid;
  gap: 8px;
}

.penalty-reason-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px 9px 12px;
}

.penalty-reason-preview-text {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 800;
}

.penalty-student-picker {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(96px, auto);
  gap: 8px;
}

.penalty-student-lookup {
  display: grid;
  gap: 6px;
}

.penalty-selected-students {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.penalty-modal .attendance-modal-actions .btn {
  width: auto;
  min-width: 108px;
}

.penalty-student-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 4px 4px 4px 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.penalty-detail-modal {
  width: min(980px, 100%);
  max-height: min(86vh, 760px);
}

.penalty-detail-table-wrap {
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.penalty-detail-table {
  width: 100%;
  min-width: 760px;
}

.seat-management {
  gap: 16px;
}

.seat-room-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.seat-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
}

.seat-toolbar .cohort-filter {
  width: auto;
  min-width: 170px;
}

.seat-print-button {
  min-height: 38px;
}

.seat-print-sheets {
  display: none;
}

.seat-title-row {
  margin-bottom: 0;
}

.seat-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seat-board-wrap {
  display: grid;
  margin: 14px 0 26px;
  overflow-x: visible;
  padding-right: 42px;
  padding-bottom: 12px;
}

.lecture-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 36px 470px 168px;
  width: 100%;
  min-width: 0;
  --lecture-border: 3px;
  --lecture-notch-x: 108px;
  --seat-row-height: 50px;
  --seat-row-gap: 8px;
  --lecture-notch-y: calc(12px + 36px + (8 * var(--seat-row-height)) + (7 * var(--seat-row-gap)));
  background: #fff;
  padding: 12px 10px 18px;
}

.lecture-border {
  position: absolute;
  z-index: 3;
  background: #111;
  pointer-events: none;
}

.lecture-border-top {
  top: 0;
  left: 0;
  right: 0;
  height: var(--lecture-border);
}

.lecture-border-right {
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--lecture-border);
}

.lecture-border-bottom {
  left: var(--lecture-notch-x);
  right: 0;
  bottom: 0;
  height: var(--lecture-border);
}

.lecture-border-left {
  top: 0;
  left: 0;
  height: var(--lecture-notch-y);
  width: var(--lecture-border);
}

.lecture-border-notch-top {
  top: var(--lecture-notch-y);
  left: 0;
  width: var(--lecture-notch-x);
  height: var(--lecture-border);
}

.lecture-border-notch-left {
  top: var(--lecture-notch-y);
  left: var(--lecture-notch-x);
  bottom: 0;
  width: var(--lecture-border);
}

.lecture-stage {
  grid-column: 1;
  grid-row: 1;
  justify-self: stretch;
  align-self: start;
  display: grid;
  place-items: center;
  width: min(360px, 46%);
  min-width: 220px;
  min-height: 17px;
  margin-left: calc(28px + ((100% - 28px - min(360px, 46%)) / 2));
  border: 2px dashed #111;
  background: #f4f4f4;
  color: #111;
  font-size: 0.72rem;
  font-weight: 900;
}

.lecture-front-room,
.lecture-lower-room {
  display: grid;
  grid-template-columns:
    28px
    minmax(220px, 1fr)
    minmax(18px, 0.12fr)
    minmax(220px, 1fr)
    minmax(18px, 0.12fr)
    minmax(220px, 1fr);
  column-gap: 0;
  row-gap: var(--seat-row-gap);
  justify-content: stretch;
  align-content: start;
}

.lecture-front-room {
  grid-column: 1;
  grid-row: 2;
  grid-template-rows: repeat(8, var(--seat-row-height));
  padding-top: 0;
}

.lecture-lower-room {
  grid-column: 1;
  grid-row: 3;
  grid-template-rows: repeat(3, var(--seat-row-height));
  margin-left: 0;
  padding-top: 0;
}

.lecture-row-label {
  grid-column: 1;
  grid-row: var(--seat-row-index);
  align-self: center;
  justify-self: end;
  margin-right: 8px;
  color: #111;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.seat-group {
  display: grid;
  grid-template-columns: repeat(var(--seat-count), minmax(0, 1fr));
  align-self: start;
  min-height: var(--seat-row-height);
  border-top: 1px solid #111;
  border-left: 1px solid #111;
  background: #fff;
}

.seat-group.left {
  grid-column: 2;
  grid-row: var(--seat-row-index);
}

.seat-group.center {
  grid-column: 4;
  grid-row: var(--seat-row-index);
}

.seat-group.right {
  grid-column: 6;
  grid-row: var(--seat-row-index);
}

.seat-group.lower-left {
  grid-column: 2;
  grid-row: var(--seat-row-index);
  width: 50%;
  min-width: 0;
  justify-self: end;
}

.seat-group.lower-center {
  grid-column: 4;
  grid-row: var(--seat-row-index);
}

.seat-group.lower-right {
  grid-column: 6;
  grid-row: var(--seat-row-index);
}

.lecture-exit-label {
  position: absolute;
  left: 36px;
  bottom: 180px;
  width: 72px;
  min-height: 17px;
  display: grid;
  place-items: center;
  background: #d9d9d9;
  color: #111;
  font-size: 0.66rem;
  font-weight: 900;
}

.lecture-bottom-door {
  position: absolute;
  left: 122px;
  bottom: -20px;
  width: 72px;
  min-height: 17px;
  display: grid;
  place-items: center;
  background: #d9d9d9;
  color: #111;
  font-size: 0.66rem;
  font-weight: 900;
}

.lecture-side-door {
  position: absolute;
  right: -36px;
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 46px;
  background: #e5e5e5;
  color: #111;
  font-size: 0.62rem;
  font-weight: 900;
  writing-mode: vertical-rl;
  text-orientation: upright;
  z-index: 4;
}

.lecture-side-door-top {
  top: 250px;
}

.lecture-side-door-bottom {
  bottom: 78px;
}

.seat-cell {
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  gap: 0;
  min-width: 0;
  min-height: var(--seat-row-height);
  border: 0;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 2px 4px;
  text-align: center;
}

.seat-cell:hover,
.seat-cell:focus-visible {
  background: #eaf3ff;
  outline: none;
}

.seat-cell.occupied {
  background: #f1f7ff;
}

.seat-cell.placeholder {
  pointer-events: none;
  background: #fff;
}

.seat-number {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
}

.seat-cell strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #111;
  font-size: 0.66rem;
  line-height: 1.05;
}

.seat-cell small {
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1.05;
}

.seat-cell em {
  min-width: 0;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-seat-board-wrap {
  display: grid;
  margin: 14px 0 18px;
  overflow: visible;
  padding-right: 48px;
}

.study-seat-layout {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 34px;
  align-items: start;
  width: min(760px, 100%);
  border: 3px solid #111;
  background: #fff;
  padding: 34px 22px 22px;
}

.study-door {
  position: absolute;
  right: -42px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 46px;
  background: #d9d9d9;
  color: #111;
  font-size: 0.66rem;
  font-weight: 900;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.study-seat-column {
  display: grid;
  gap: 7px;
}

.study-column-label {
  display: grid;
  place-items: center;
  min-height: 22px;
  background: #eef3f8;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.study-seat-column .seat-cell {
  min-height: 48px;
  border: 1px solid #111;
}

.info-modal-panel.seat-modal {
  width: min(520px, calc(100vw - 28px));
  gap: 14px;
}

.seat-modal-form {
  display: grid;
  gap: 12px;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 12mm 5mm 6mm;
  }

  body[data-app-mode="teacher"].seat-print-mode {
    background: #fff;
  }

  body[data-app-mode="teacher"].seat-print-mode .app-frame,
  body[data-app-mode="teacher"].seat-print-mode .main-shell,
  body[data-app-mode="teacher"].seat-print-mode #app {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .sidebar,
  body[data-app-mode="teacher"].seat-print-mode .topbar,
  body[data-app-mode="teacher"].seat-print-mode .bottom-nav,
  body[data-app-mode="teacher"].seat-print-mode .toast,
  body[data-app-mode="teacher"].seat-print-mode .seat-management > .panel,
  body[data-app-mode="teacher"].seat-print-mode .info-modal {
    display: none !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-management {
    display: block !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-print-sheets {
    display: block !important;
    position: static !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 286mm !important;
    margin: 0 auto !important;
    padding: 3mm 0 0 !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-print-sheet {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 286mm !important;
    margin: 0 auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-print-sheet + .seat-print-sheet {
    break-before: page;
    page-break-before: always;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-print-sheet h2 {
    color: #000 !important;
    font-size: 16pt !important;
    margin: 0 0 4mm !important;
    text-align: center !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-board-wrap {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 286mm !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-right: 36px !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .study-seat-board-wrap {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 286mm !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-right: 48px !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .study-seat-layout {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .lecture-layout {
    width: 100% !important;
    overflow: visible !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .lecture-border {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #000 !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-cell {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #fff !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-cell.occupied {
    background: #f1f7ff !important;
  }

  body[data-app-mode="teacher"].seat-print-mode .seat-number,
  body[data-app-mode="teacher"].seat-print-mode .seat-cell em {
    color: #005ea8 !important;
  }
}

.weekly-exam-admin .panel {
  gap: 14px;
}

.weekly-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.check-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  font-weight: 800;
}

.selected-row td {
  background: #eef7f3;
}

.weekly-unpublished-row td {
  color: var(--muted);
  background: #fbfcfd;
}

.weekly-publish-select {
  min-width: 96px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  padding: 6px 9px;
}

.weekly-publish-select.published {
  border-color: rgba(0, 91, 172, 0.24);
  background: #fbfdff;
  color: var(--accent-strong);
}

.weekly-publish-select.hidden {
  border-color: rgba(154, 103, 0, 0.22);
  background: #fffdf8;
  color: #7a5300;
}

.weekly-exam-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.info-modal-panel.weekly-reset-modal {
  max-width: 460px;
}

.weekly-reset-content {
  display: grid;
  gap: 12px;
}

.weekly-reset-content .field {
  margin: 0;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.weekly-answer-table .excel-table {
  width: auto;
  min-width: 680px;
}

.weekly-answer-form {
  display: grid;
  gap: 12px;
  align-items: start;
}

.weekly-lookup-filter,
.weekly-cohort-filter,
.weekly-answer-week-filter {
  margin: 0;
}

.compact-filter {
  grid-template-columns: minmax(120px, 180px);
  gap: 8px;
  align-items: end;
}

.compact-filter .field {
  margin: 0;
  gap: 4px;
}

.compact-filter select {
  min-height: 38px;
  padding: 8px 10px;
}

.excel-table tr {
  scroll-margin-top: 18px;
}

.weekly-cohort-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weekly-cohort-tabs .mini-btn {
  min-width: 76px;
}

.weekly-answer-actions {
  margin: 0;
}

.info-modal-panel.weekly-answer-reset-modal {
  width: min(440px, 100%);
}

.weekly-answer-reset-content,
.weekly-answer-reset-form {
  display: grid;
  gap: 12px;
}

.weekly-answer-reset-form .field {
  margin: 0;
}

.weekly-answer-reset-feedback {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.86rem;
}

.weekly-answer-reset-feedback.error {
  color: var(--danger);
}

.weekly-detail-actions,
.weekly-exam-period-form {
  margin: 0;
}

.weekly-exam-period-form {
  grid-template-columns: repeat(3, max-content);
  align-items: end;
  gap: 8px;
}

.weekly-exam-period-form .field {
  gap: 4px;
  min-width: 0;
}

.weekly-exam-period-form .field span {
  font-size: 0.78rem;
}

.weekly-exam-period-form input {
  width: 190px;
  min-height: 36px;
  padding: 7px 9px;
  font-size: 0.86rem;
}

.weekly-exam-period-form .btn {
  width: auto;
  min-height: 36px;
  padding: 8px 11px;
  font-size: 0.84rem;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title-row h2 {
  margin: 0;
}

.weekly-detail-title-row .btn {
  width: auto;
  min-height: 36px;
  padding: 8px 12px;
}

.weekly-inline-file-upload {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.weekly-inline-file-upload > span {
  max-width: 180px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-inline-file-list {
  display: grid;
  gap: 5px;
}

.weekly-inline-file-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) auto auto;
  gap: 5px;
  align-items: center;
}

.weekly-inline-file-row span {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.weekly-inline-file-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.weekly-inline-upload-progress {
  display: grid;
  gap: 5px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.weekly-inline-upload-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #0f3767;
  font-size: 0.78rem;
  font-weight: 900;
}

.weekly-inline-upload-progress-top strong,
.weekly-inline-upload-progress-top span {
  overflow-wrap: anywhere;
}

.weekly-inline-upload-progress-track {
  block-size: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.weekly-inline-upload-progress-track span {
  display: block;
  block-size: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.weekly-inline-upload-progress small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.weekly-answer-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, auto);
  align-items: start;
  gap: 16px;
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.weekly-answer-header > div:first-child {
  display: grid;
  gap: 4px;
  align-content: start;
}

.weekly-answer-header strong {
  font-size: 1.05rem;
}

.weekly-answer-header span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.weekly-answer-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.weekly-answer-header-actions {
  display: grid;
  align-items: start;
  justify-content: flex-end;
  gap: 8px;
}

.weekly-answer-control-group {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.weekly-answer-control-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.weekly-question-count-row {
  display: grid;
  grid-template-columns: minmax(96px, 150px) auto;
  gap: 8px;
  align-items: end;
}

.weekly-question-count-tools {
  min-width: 280px;
}

.weekly-question-count-controls {
  display: flex;
  align-items: end;
  gap: 7px;
  flex-wrap: nowrap;
}

.weekly-question-count-row .field {
  margin: 0;
}

.weekly-answer-table {
  width: fit-content;
  max-width: 100%;
}

.weekly-answer-table .excel-table th,
.weekly-answer-table .excel-table td {
  padding: 8px 12px;
  text-align: center;
}

.weekly-answer-table .excel-table th:first-child,
.weekly-answer-table .excel-table td:first-child {
  width: 64px;
  color: var(--muted);
  font-weight: 900;
}

.weekly-answer-question-row th {
  background: var(--surface-soft);
  white-space: nowrap;
}

.weekly-answer-input-row th {
  color: var(--muted);
}

.weekly-answer-track-row th {
  color: var(--muted);
}

.weekly-answer-track-row td {
  vertical-align: top;
}

.weekly-question-track-options {
  display: inline-flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  min-width: 92px;
}

.weekly-question-track-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 26px;
  padding: 3px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.weekly-question-track-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.weekly-track-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.track-subject-management {
  display: grid;
  gap: 12px;
}

.track-subject-management .table-wrap {
  max-height: calc(100dvh - 260px);
}

.track-subject-management .excel-table,
.track-subject-management .responsive-table {
  min-width: 1120px;
}

.track-subject-management th:first-child,
.track-subject-management td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  min-width: 240px;
}

.track-subject-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 62px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.track-subject-check input {
  width: 15px;
  height: 15px;
}

.info-modal-panel.weekly-subject-settings-modal {
  width: calc(100vw - 16px);
  max-width: none;
  height: min(94dvh, 940px);
  max-height: calc(100dvh - 16px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  overflow: hidden;
  padding: 22px;
}

.weekly-answer-modal {
  padding: 8px;
  place-items: stretch;
}

.info-modal-panel.weekly-answer-modal-panel {
  width: calc(100vw - 16px);
  max-width: none;
  height: calc(100dvh - 16px);
  max-height: none;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  overflow: hidden;
  padding: 18px;
}

.weekly-answer-modal-panel > .panel {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  box-shadow: none;
}

.weekly-answer-modal-panel > .panel > h2 {
  margin-bottom: 12px;
}

.weekly-answer-modal-panel .btn {
  width: auto;
}

.weekly-subject-settings {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.weekly-subject-settings .table-wrap {
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.weekly-subject-settings .form-grid {
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(120px, 0.55fr) minmax(120px, 0.55fr) auto;
  align-items: end;
}

.weekly-subject-settings .excel-table,
.weekly-subject-settings .responsive-table {
  min-width: 920px;
}

.grade-management-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.grade-management .responsive-table {
  min-width: 1320px;
}

.grade-input-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.grade-input-actions .subtle {
  margin: 0;
  line-height: 1.45;
}

.grade-bulk-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.grade-bulk-action-buttons .btn {
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding: 0 14px;
}

.grade-bulk-action-buttons .mini-btn {
  min-height: 32px;
}

.grade-bulk-input {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
}

.grade-bulk-textarea {
  min-height: 112px;
  font-family: "Gong Gothic Light", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre;
  overflow: auto;
}

.grade-score-input {
  width: 72px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
}

.grade-score-input.compact {
  width: 64px;
}

.info-modal-panel.final-score-edit-modal {
  width: min(520px, calc(100vw - 28px));
}

.final-score-modal-form {
  display: grid;
  gap: 14px;
}

.weekly-answer-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.weekly-answer-picker.compact {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.weekly-answer-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 11px;
  color: var(--ink);
  text-align: left;
}

.weekly-answer-chip strong {
  font-size: 0.9rem;
}

.weekly-answer-chip.active {
  border-color: var(--accent);
  background: #eef6ff;
  color: var(--accent-strong);
}

.weekly-file-upload {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.answer-key-input {
  width: 72px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
  text-align: center;
}

.answer-key-input:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.exam-file-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto minmax(180px, 260px) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.student-exam-tabs,
.student-exam-files {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.student-weekly-files {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.student-weekly-files-head {
  display: grid;
  gap: 3px;
}

.student-weekly-files-head strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.student-weekly-files-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.student-weekly-back-panel {
  padding: 14px 16px;
}

.student-weekly-header-panel {
  padding: 14px 16px;
}

.student-weekly-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.student-weekly-header-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-weekly-header-title h2 {
  margin: 0;
}

.student-weekly-week-select {
  width: auto;
  min-width: 86px;
  min-height: 36px;
  padding: 7px 30px 7px 10px;
  border-radius: 8px;
  font-weight: 900;
}

.student-weekly-back-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.student-weekly-back-title > div {
  display: grid;
  gap: 3px;
}

.student-weekly-back-button {
  justify-self: end;
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  margin: 0 0 0 auto;
  white-space: nowrap;
}

.student-grade-card-grid,
.student-grade-action-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.student-grade-action-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

.student-grade-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.student-grade-card strong {
  font-size: 1.08rem;
}

.student-grade-card span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.student-grade-action-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink);
  min-height: 74px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 60, 120, 0.04);
}

.student-grade-action-card::after {
  content: "›";
  color: var(--accent-strong);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.student-grade-action-card:hover,
.student-grade-action-card:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 10px 22px rgba(0, 91, 172, 0.1);
  outline: none;
}

.student-grade-action-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-grade-action-text strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.student-grade-action-text span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.student-grade-action-label {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #e4f0fb;
  color: #005bac;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.student-grade-type-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.student-grade-menu-back {
  justify-self: start;
  width: auto;
  margin-top: -4px;
}

.student-grade-result {
  display: grid;
  gap: 20px;
}

.student-grade-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.student-grade-result-title strong {
  color: var(--ink);
  font-size: 1rem;
}

.student-grade-result-title span {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.student-grade-round-select {
  width: auto;
  min-width: 92px;
  max-width: 112px;
  min-height: 34px;
  padding: 0 34px 0 12px;
  border: 1px solid #c8dff4;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #ffffff 0%, #f6faff 100%);
  color: #004b8d;
  font-size: 0.8rem;
  font-weight: 900;
  outline: none;
  box-shadow: 0 6px 14px rgba(0, 60, 120, 0.05);
}

.student-grade-round-select:focus {
  border-color: #005bac;
  box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.12);
}

.student-grade-summary {
  display: grid;
  gap: 10px;
}

.student-grade-summary > strong {
  font-size: 1.08rem;
}

.student-grade-subject-list {
  display: grid;
  gap: 10px;
}

.student-grade-subject-list > strong {
  font-size: 1rem;
}

.student-grade-subject-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.student-grade-subject-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.student-grade-subject-card .detail-grid {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.student-grade-subject-card .detail-item,
.student-grade-overview .detail-item {
  min-width: 0;
  padding: 11px 10px;
}

.student-grade-subject-card .detail-item strong,
.student-grade-overview .detail-item strong {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.student-grade-subject-card .detail-item:nth-child(3) strong {
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1.25;
}

.student-grade-overview {
  position: relative;
  width: min(100%, 520px);
  margin: 2px auto 0;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 21px 24px 18px;
  border: 1px solid #c8dff4;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 12px 28px rgba(0, 60, 120, 0.06);
  overflow: hidden;
}

.student-grade-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-grade-overview-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #d9ecff;
  color: #005bac;
  font-size: 0.75rem;
  font-weight: 900;
}

.student-grade-overview-track {
  color: #005bac;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: right;
}

.student-grade-overview-value {
  display: block;
  color: #003b73;
  font-size: clamp(1.9rem, 8vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

.student-grade-overview-meta {
  display: block;
  color: #5f7895;
  font-size: 0.82rem;
  font-weight: 800;
}

.student-grade-progress {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #dcecff;
  overflow: hidden;
}

.student-grade-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #005bac 0%, #4aa3ff 100%);
}

.student-grade-overview .student-grade-overview-grid {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: start;
  gap: 8px;
  margin-top: 0;
}

.student-grade-overview .student-grade-overview-grid .detail-item strong {
  font-size: 0.95rem;
}

.student-fitness-view .student-grade-result {
  gap: 16px;
}

.student-fitness-month-select {
  min-width: 72px;
  max-width: 86px;
  padding-left: 10px;
  padding-right: 28px;
}

.student-fitness-overview .student-grade-overview-value {
  color: #064e3b;
}

.student-fitness-empty {
  display: grid;
  gap: 14px;
}

.student-fitness-event-list {
  gap: 10px;
}

.student-fitness-event-card .detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-fitness-event-card .detail-item strong {
  font-size: 0.92rem;
}

.student-fitness-criteria-button {
  justify-self: end;
}

.student-fitness-criteria-modal {
  max-width: min(92vw, 520px);
  max-height: min(82vh, 720px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.student-fitness-criteria-content {
  display: grid;
  gap: 14px;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.student-fitness-criteria-section {
  display: grid;
  gap: 8px;
}

.student-fitness-criteria-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.student-fitness-criteria-table-wrap {
  overflow-x: auto;
}

.student-fitness-criteria-table {
  width: max-content;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.student-fitness-criteria-table th,
.student-fitness-criteria-table td {
  min-width: 86px;
  padding: 7px 6px;
  border: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.student-fitness-criteria-table th:first-child,
.student-fitness-criteria-table td:first-child {
  min-width: 54px;
}

.student-fitness-criteria-table th {
  background: #f3f8fc;
  color: var(--muted);
  font-weight: 900;
}

.student-grade-subject-card .detail-item,
.student-grade-overview .student-grade-overview-grid .detail-item {
  align-items: center;
  text-align: center;
}

.student-exam-subjects {
  display: grid;
  gap: 12px;
}

.student-exam-subject {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 15px 14px 16px;
}

.student-exam-subject > div:first-child,
.student-exam-total,
.student-answer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.student-exam-total {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  font-weight: 900;
}

.student-score-line {
  color: var(--accent-strong);
  font-weight: 900;
}

.student-answer-progress {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.student-answer-subject-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.student-answer-subject-tabs::-webkit-scrollbar {
  display: none;
}

.student-answer-subject-tab {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  min-width: 104px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.student-answer-subject-tab strong {
  font-size: 0.9rem;
  line-height: 1.15;
}

.student-answer-subject-tab span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.student-answer-subject-tab.active {
  border-color: var(--accent);
  background: #f4f9ff;
  box-shadow: inset 0 0 0 1px rgba(0, 91, 172, 0.14);
}

.student-answer-subject-tab.submitted {
  background: var(--surface-soft);
}

.student-answer-subject-tab:disabled {
  opacity: 1;
}

.student-answer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.student-answer-title > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-answer-title strong {
  font-size: 1.08rem;
}

.student-answer-title span:not(.badge) {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.student-answer-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.student-answer-progress-top span {
  color: var(--muted);
}

.student-answer-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.student-answer-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.student-answer-list {
  display: grid;
  gap: 8px;
}

.student-answer-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.student-answer-row.answered {
  border-color: rgba(0, 91, 172, 0.34);
  background: #f8fbff;
}

.student-answer-head {
  min-height: 48px;
  display: grid;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 2px;
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.student-answer-head strong {
  display: block;
  width: 100%;
  font-size: 0.98rem;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.student-answer-head span {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
}

.student-answer-row.answered .student-answer-head span {
  color: var(--accent-strong);
}

.answer-choice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(42px, 1fr));
  gap: 6px;
}

.answer-choice {
  position: relative;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.answer-choice.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(0, 91, 172, 0.12);
}

.answer-choice:disabled {
  opacity: 0.9;
}

.student-answer-nav {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
}

body:not([data-app-mode="teacher"]) .student-answer-nav {
  position: static;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  padding: 8px;
}

.student-answer-page-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.student-answer-review-button {
  min-width: 132px;
}

.student-answer-saving {
  display: grid;
  gap: 4px;
  border: 1px solid var(--accent-soft);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  padding: 10px 12px;
}

.student-answer-saving strong {
  font-size: 0.95rem;
}

.student-answer-saving span {
  color: var(--muted);
  font-size: 0.84rem;
}

.answer-sheet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.answer-sheet-cell {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.1;
  padding: 7px 4px;
}

.answer-sheet-cell span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.answer-sheet-cell strong {
  font-size: 1rem;
}

.answer-sheet-cell.missing,
.missing-warning {
  border-color: #f04438;
  background: #fff1f0;
  color: #b42318;
}

.missing-warning {
  border: 1px solid #f04438;
  border-radius: 8px;
  padding: 10px;
  font-weight: 900;
}

.answer-complete-message {
  margin: 0;
  border: 1px solid rgba(0, 91, 172, 0.18);
  border-radius: 8px;
  background: #f4f9ff;
  color: var(--accent-strong);
  padding: 10px 12px;
  font-weight: 900;
}

.student-answer-sheet-button {
  width: 100%;
  justify-content: center;
}

.student-graded-answer-modal {
  width: min(640px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 44px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.student-graded-answer-sheet {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.student-graded-answer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.student-graded-answer-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(0, 91, 172, 0.16);
  border-radius: 8px;
  background: #f4f9ff;
  padding: 10px;
  text-align: center;
}

.student-graded-answer-summary span,
.student-graded-answer-body span,
.student-graded-answer-correct span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.student-graded-answer-summary strong {
  color: var(--ink);
  font-size: 1rem;
}

.student-graded-answer-grid {
  min-height: 0;
  max-height: min(520px, calc(100vh - 260px));
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  padding-right: 2px;
}

.student-graded-answer-cell {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) minmax(86px, auto);
  align-items: center;
  gap: 10px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.student-graded-answer-cell.correct {
  border-color: rgba(0, 91, 172, 0.22);
  background: #fbfdff;
}

.student-graded-answer-cell.wrong {
  border-color: rgba(240, 68, 56, 0.42);
  background: #fff8f8;
}

.student-graded-answer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.student-graded-answer-head strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.student-graded-answer-head span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(0, 91, 172, 0.1);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
}

.student-graded-answer-cell.wrong .student-graded-answer-head span {
  background: #ffe4e2;
  color: #b42318;
}

.student-graded-answer-body,
.student-graded-answer-correct {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-graded-answer-body strong,
.student-graded-answer-correct strong {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.1;
}

.student-graded-answer-correct {
  border-left: 1px dashed rgba(180, 35, 24, 0.32);
  padding-left: 10px;
}

.student-graded-answer-correct span,
.student-graded-answer-correct strong {
  color: #b42318;
}

.student-graded-answer-correct.muted {
  border-left-color: transparent;
}

.student-graded-answer-correct.muted span,
.student-graded-answer-correct.muted strong {
  color: rgba(100, 116, 139, 0.36);
}

@media (max-width: 430px) {
  .student-graded-answer-modal {
    width: min(430px, calc(100vw - 24px));
  }

  .student-graded-answer-summary > div {
    padding: 8px 6px;
  }

  .student-graded-answer-cell,
  .student-graded-answer-cell.wrong {
    grid-template-columns: 72px minmax(0, 1fr) minmax(72px, auto);
    gap: 8px;
    padding: 9px 10px;
  }

  .student-graded-answer-head strong {
    font-size: 0.96rem;
  }
}

.confirm-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.confirm-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.confirm-check span {
  min-width: 0;
}

.penalty-detail-table th,
.penalty-detail-table td {
  padding: 12px 14px;
  font-size: 0.94rem;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 22px;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 18, 15, 0.68);
}

.photo-modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(76vh, 640px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.photo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.photo-modal-head strong,
.photo-modal-head span {
  display: block;
}

.photo-modal-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.photo-modal-details {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.photo-modal-details p {
  margin: 0;
}

.photo-modal-panel > img {
  width: 100%;
  height: 100%;
  max-height: calc(76vh - 58px);
  object-fit: contain;
  background: #111;
}

.info-modal,
.study-cafe-auto-pause-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 22px;
}

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 18, 15, 0.54);
}

.info-modal-panel {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  border-radius: 14px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.info-modal-panel strong {
  font-size: 1.16rem;
}

.info-modal-panel.account-deletion-modal {
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
}

.account-deletion-content,
.account-deletion-content form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.account-deletion-content p {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.info-modal-panel.student-content-safety-modal { max-height: calc(100vh - 44px); max-height: calc(100dvh - 44px); overflow-y: auto; }
.student-content-safety-content { display: grid; gap: 14px; }
.student-content-safety-content textarea { width: 100%; box-sizing: border-box; }
.student-content-safety-content article { padding: 10px 0; border-bottom: 1px solid #dce3e6; }
.student-content-report-snapshot { white-space: pre-wrap; overflow-wrap: anywhere; }
.student-content-safety-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }

.info-modal-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.info-modal-panel .btn {
  width: 100%;
}

.study-cafe-timer-pause-guide {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.study-cafe-timer-pause-guide-icon {
  grid-row: 1 / span 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e8f1f3;
  color: #477f8c;
  font-size: 0.94rem;
  font-weight: 950;
}

.study-cafe-timer-pause-guide p:first-of-type {
  color: #2d5661;
  font-weight: 900;
}

.study-cafe-timer-pause-guide p {
  font-size: 0.82rem;
}

.info-modal.weekly-answer-modal {
  inset: 0 0 0 248px;
  padding: 22px min(4vw, 44px) 40px;
  place-items: stretch;
}

.info-modal.weekly-answer-modal .weekly-answer-modal-panel {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 14px;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  overflow: hidden;
  padding: 20px;
}

.info-modal.weekly-answer-modal .weekly-answer-modal-panel > .panel {
  min-height: 0;
  overflow: auto;
}

.info-modal.weekly-answer-modal .weekly-answer-modal-panel .btn {
  width: auto;
}

.install-guide {
  display: grid;
  gap: 12px;
}

.install-guide ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.55;
}

.install-guide-actions {
  display: grid;
  gap: 8px;
}

.loading-modal {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  padding: 22px;
}

.loading-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 15, 0.42);
}

.loading-modal-panel {
  position: relative;
  z-index: 1;
  width: min(320px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  border-radius: 12px;
  background: #fff;
  padding: 22px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.loading-modal-panel .loading-spinner {
  inline-size: 28px;
  block-size: 28px;
  border-color: rgba(7, 93, 164, 0.18);
  border-top-color: var(--accent);
}

.loading-modal-panel strong {
  font-size: 1.05rem;
}

.loading-modal-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.action-cell {
  min-width: 86px;
}

.teacher-action-stack {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.teacher-action-stack .mini-btn {
  margin: 0;
  max-width: 100%;
  white-space: normal;
  word-break: keep-all;
  text-align: center;
  line-height: 1.25;
}

.attendance-action-stack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.approval-history-cell {
  min-width: 110px;
}

.approval-reason-cell {
  min-width: 170px;
}

.approval-history {
  display: grid;
  gap: 3px;
  line-height: 1.35;
}

.approval-history span:first-child {
  font-weight: 800;
  color: var(--accent-strong);
}

.approval-history small {
  color: var(--muted);
  font-weight: 700;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  padding: 6px 9px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.mini-status.penalty-applied {
  background: var(--danger-soft);
  color: var(--danger);
}

.attendance-bulk-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.attendance-holiday-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(27, 99, 197, 0.2);
  border-radius: 8px;
  background: #eaf3ff;
  color: #174ea6;
}

.attendance-holiday-banner strong {
  font-size: 0.98rem;
}

.attendance-holiday-banner span {
  font-size: 0.86rem;
  font-weight: 700;
}

.table-wrap td:last-child {
  white-space: nowrap;
}

.student-admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
}

.student-admin-actions .mini-btn {
  min-width: 74px;
}

.student-admin-table-wrap {
  overflow: visible;
}

.student-action-menu {
  position: relative;
  display: inline-block;
}

.student-action-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

.student-action-menu-trigger::-webkit-details-marker {
  display: none;
}

.student-action-menu-trigger::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.student-action-menu[open] .student-action-menu-trigger {
  background: #e4f0ff;
}

.student-action-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 132px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.student-action-menu-item {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.student-action-menu-item:hover {
  background: var(--surface-soft);
}

.student-action-menu-item.danger {
  color: var(--danger);
}

.info-modal-panel.student-registration-history-modal {
  width: min(860px, 100%);
}

.student-registration-history .table-wrap {
  max-height: 55vh;
  overflow: auto;
}

.student-registration-history td:last-child {
  font-family: "Gong Gothic Light", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 0.82rem;
}

.mini-btn {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 7px;
  margin: 2px;
}

.mini-btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.weekly-score-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 72px;
}

.weekly-score-cell.answer-incomplete {
  color: var(--danger);
}

.weekly-score-cell .subtle {
  width: 100%;
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
}

.teacher-tools,
.teacher-search {
  display: grid;
  gap: 10px;
}

.teacher-tools {
  grid-template-columns: minmax(280px, 1fr) minmax(160px, 220px);
  align-items: end;
  margin: 14px 0;
}

.student-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teacher-search {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.student-admin-result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.student-roster-download {
  white-space: nowrap;
}

.grade-management-student-search-wrap {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.grade-management-student-results .action-row {
  justify-content: flex-start;
}

.grade-management-student-summary {
  margin-bottom: 18px;
}

.grade-management-history-section + .grade-management-history-section {
  margin-top: 24px;
}

.grade-management-history-section h3 {
  margin: 0 0 10px;
}

.duplicate-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.duplicate-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.duplicate-photo-button,
.duplicate-item img {
  width: 72px;
  height: 72px;
}

.duplicate-photo-button {
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.duplicate-item img {
  border-radius: 6px;
  object-fit: cover;
}

.duplicate-item strong {
  display: block;
  margin-bottom: 4px;
}

.duplicate-item p {
  margin-bottom: 0;
}

.inline-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.inline-section h3 {
  margin-bottom: 12px;
}

.compact-form {
  align-items: end;
}

.student-hero {
  border: 1px solid rgba(7, 93, 164, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #e8f1fb 100%);
  padding: 22px;
}

.student-hero h2 {
  margin-bottom: 8px;
}

.student-hero p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 11px;
}

.detail-item span,
.detail-item strong {
  display: block;
}

.detail-item span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.detail-item strong {
  overflow-wrap: anywhere;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.photo-thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
}

.photo-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-thumb-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.photo-thumb span {
  display: block;
  padding: 8px 8px 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.photo-thumb .photo-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.photo-thumb time {
  display: block;
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: right;
}

.attendance-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.attendance-photo-grid {
  margin-top: 14px;
}

.attendance-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.attendance-secondary-action {
  display: grid;
}

.attendance-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attendance-deadline-note {
  margin-top: 7px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.attendance-toggle-control {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attendance-toggle-control input {
  width: 18px;
  height: 18px;
}

.attendance-toggle-control strong {
  font-size: 0.88rem;
}

.online-managed-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.online-managed-toggle-row p {
  margin: 6px 0 0;
}

.online-managed-toggle-control {
  min-width: 116px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

.online-managed-toggle-control input {
  width: 18px;
  height: 18px;
}

.online-managed-toggle-status {
  font-size: 0.86rem;
  white-space: nowrap;
}

.online-managed-toggle-note {
  margin: 12px 0 0;
}

.study-cafe-feature-settings {
  display: grid;
  gap: 16px;
}

.study-cafe-feature-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.study-cafe-feature-settings-head h2,
.study-cafe-feature-settings-head p {
  margin: 0;
}

.study-cafe-feature-settings-head p {
  margin-top: 6px;
}

.study-cafe-feature-toggle-list {
  display: grid;
  gap: 12px;
}

.study-cafe-feature-toggle-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.study-cafe-feature-toggle-row .online-managed-toggle-control {
  background: var(--surface);
}

@media (max-width: 620px) {
  .online-managed-toggle-row {
    align-items: stretch;
    flex-direction: column;
  }

  .online-managed-toggle-control {
    align-self: flex-start;
  }
}

.attendance-settings-modal {
  gap: 14px;
}

.attendance-date-deadline-form {
  border-top: 1px solid var(--line, #e2e8f0);
  padding-top: 16px;
}

.attendance-modal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attendance-modal-titlebar > strong {
  font-size: 1rem;
}

.attendance-modal-close {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
}

.attendance-holiday-modal {
  width: min(940px, calc(100vw - 28px));
}

.attendance-holiday-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 0.64fr);
  align-items: start;
  gap: 16px;
}

.attendance-holiday-calendar-form {
  display: grid;
  gap: 12px;
}

.attendance-save-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(37, 157, 116, 0.22);
  border-radius: 8px;
  background: #ecfdf6;
  color: #087a55;
  font-size: 0.8rem;
  font-weight: 800;
}

.attendance-save-status strong {
  font-size: 0.78rem;
}

.attendance-calendar-head {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 8px;
}

.attendance-calendar-head strong {
  text-align: center;
  font-size: 1rem;
}

.attendance-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.attendance-calendar-weekday {
  min-height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.attendance-calendar-empty {
  min-height: 40px;
}

.attendance-calendar-day {
  position: relative;
  min-height: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(116, 135, 158, 0.26);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.attendance-calendar-day input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.attendance-calendar-day small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 0.56rem;
  font-weight: 700;
}

.attendance-calendar-day:has(input:checked) {
  border-color: rgba(27, 99, 197, 0.72);
  background: #eaf3ff;
  color: #174ea6;
}

.attendance-calendar-day.default-holiday {
  border-color: rgba(27, 99, 197, 0.5);
  background: #eaf3ff;
  color: #174ea6;
}

.attendance-calendar-day.open-default-holiday {
  border-color: rgba(116, 135, 158, 0.26);
  background: #fff;
  color: var(--text);
}

.attendance-calendar-day.open-default-holiday small {
  color: #087a55;
}

.attendance-calendar-day.disabled {
  background: #f2f5f9;
  color: #98a5b5;
  cursor: not-allowed;
}

.attendance-calendar-day.disabled input {
  cursor: not-allowed;
}

.attendance-holiday-settings {
  display: grid;
  gap: 12px;
  padding-left: 16px;
  border-left: 1px solid rgba(116, 135, 158, 0.22);
  max-height: min(540px, calc(100vh - 220px));
  overflow-y: auto;
  padding-right: 4px;
}

.attendance-holiday-settings .table-wrap {
  overflow-x: auto;
}

.attendance-holiday-settings td:first-child {
  min-width: 150px;
  white-space: normal;
}

.attendance-holiday-settings td:last-child {
  min-width: 92px;
}

.attendance-holiday-settings .student-admin-actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.attendance-holiday-settings .mini-btn {
  min-width: 82px;
  white-space: nowrap;
}

.attendance-holiday-settings > strong {
  font-size: 0.95rem;
}

.attendance-holiday-form {
  margin: 0;
}

@media (max-width: 720px) {
  .attendance-holiday-layout {
    grid-template-columns: 1fr;
  }

  .attendance-holiday-settings {
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px solid rgba(116, 135, 158, 0.22);
  }
}

.attendance-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 901px) {
  body[data-app-mode="teacher"] .main-shell {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0 44px;
  }

  body[data-app-mode="teacher"] .content-area {
    gap: 18px;
  }

  body[data-app-mode="teacher"] .panel {
    box-shadow: 0 10px 28px rgba(10, 41, 78, 0.08);
  }

  body[data-app-mode="teacher"] .panel > h2 {
    margin-bottom: 12px;
  }

  body[data-app-mode="teacher"] .outing-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
    align-items: start;
    gap: 16px;
    padding: 18px;
    box-shadow: none;
  }

  body[data-app-mode="teacher"] .outing-head {
    display: grid;
    gap: 10px;
  }

  body[data-app-mode="teacher"] .outing-head h3 {
    margin-bottom: 4px;
  }

  body[data-app-mode="teacher"] .photo-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 150px));
    margin-top: 2px;
    justify-content: start;
  }

  body[data-app-mode="teacher"] .action-row {
    grid-column: 1 / -1;
  }

  body[data-app-mode="teacher"] .outing-card > .subtle {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  body[data-app-mode="teacher"] .photo-thumb img {
    height: 108px;
    aspect-ratio: auto;
  }

  body[data-app-mode="teacher"] .photo-thumb span {
    padding: 7px 8px 2px;
    font-size: 0.78rem;
  }

  body[data-app-mode="teacher"] .photo-thumb time {
    font-size: 0.7rem;
  }
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.success-message {
  border-color: rgba(7, 93, 164, 0.32);
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  border-radius: 8px;
  background: #08294f;
  color: #fff;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body:not([data-app-mode="teacher"]) .toast {
  left: 50%;
  right: auto;
  bottom: var(--student-toast-bottom);
  width: min(420px, calc(100% - 28px));
  max-width: none;
  text-align: center;
  transform: translate(-50%, 10px);
}

body:not([data-app-mode="teacher"]) .toast.show {
  transform: translate(-50%, 0);
}

body:not([data-app-mode="teacher"]) {
  --student-page-bg: #f4f6f8;
  --student-safe-top: env(safe-area-inset-top, 0px);
  --student-footer-safe-bottom: env(safe-area-inset-bottom, 0px);
  --student-footer-bottom: max(18px, calc(var(--student-footer-safe-bottom) + 12px));
  --student-content-bottom: calc(104px + var(--student-footer-safe-bottom));
  --student-toast-bottom: calc(var(--student-footer-bottom) + 104px);
  background: var(--student-page-bg);
}

body.student-online-mode {
  --student-page-bg: #0b2746;
  background-color: #0b2746;
  background-image:
    radial-gradient(circle at 8% 4%, rgba(60, 126, 190, 0.42) 0, transparent 34%),
    radial-gradient(circle at 94% 28%, rgba(33, 157, 150, 0.24) 0, transparent 32%),
    radial-gradient(circle at 12% 82%, rgba(112, 78, 169, 0.2) 0, transparent 34%),
    linear-gradient(165deg, #0a223e 0%, #10345a 48%, #0a2949 100%);
  background-attachment: fixed;
}

body.student-online-mode.student-home-route {
  --student-page-bg: #0b2746;
  background-color: #0b2746;
  background-image:
    radial-gradient(circle at 8% 4%, rgba(60, 126, 190, 0.42) 0, transparent 34%),
    radial-gradient(circle at 94% 28%, rgba(33, 157, 150, 0.24) 0, transparent 32%),
    radial-gradient(circle at 12% 82%, rgba(112, 78, 169, 0.2) 0, transparent 34%),
    linear-gradient(165deg, #0a223e 0%, #10345a 48%, #0a2949 100%);
  background-attachment: fixed;
}

body:not([data-app-mode="teacher"])::after {
  content: "";
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 25;
  width: 100%;
  height: var(--student-footer-bottom);
  background: var(--student-page-bg);
  pointer-events: none;
}

body:not([data-app-mode="teacher"]) .app-frame {
  display: block;
  min-height: 100svh;
}

body:not([data-app-mode="teacher"]) .sidebar {
  position: static;
  border-right: 0;
  border-bottom: 0;
  padding: 18px 18px 8px;
  background: transparent;
  backdrop-filter: none;
}

body:not([data-app-mode="teacher"]) .brand {
  width: min(420px, 100%);
  margin: 0 auto;
}

body:not([data-app-mode="teacher"]) .nav-list {
  display: none;
}

body:not([data-app-mode="teacher"]) .main-shell {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 4px 18px var(--student-content-bottom);
}

.online-student-header {
  display: none;
}

body.student-online-mode .sidebar {
  display: none;
}

body.student-online-mode .main-shell {
  padding-top: calc(14px + var(--student-safe-top));
}

body.student-online-mode .online-student-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  margin-bottom: 12px;
}

.online-student-logo,
.online-student-notice-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.online-student-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #08294f;
  font-family: "Gong Gothic Light", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1;
}

.online-student-logo-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 7px;
  object-fit: cover;
}

.online-student-logo-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.online-student-logo strong,
.online-student-logo span {
  font: inherit;
  color: inherit;
}

.online-student-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.online-student-dday {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #e8f0fa;
  color: #174f8f;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
}

.online-student-dday:active {
  background: #d8e5f4;
}

.student-dday-modal,
.admin-student-dday-modal {
  width: min(420px, calc(100% - 28px));
}

.student-dday-settings,
.admin-student-dday-settings {
  display: grid;
  gap: 12px;
}

.student-dday-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid #d2deea;
  border-radius: 12px;
  background: #f7f9fb;
  padding: 12px;
  cursor: pointer;
}

.student-dday-choice:has(input:checked) {
  border-color: #5a91c3;
  background: #edf5fc;
}

.student-dday-choice input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.student-dday-choice span {
  display: grid;
  gap: 4px;
}

.student-dday-choice strong {
  color: #20384c;
  font-size: 0.86rem;
}

.student-dday-choice small {
  color: #687d90;
  font-size: 0.7rem;
  line-height: 1.45;
}

.student-dday-custom-fields {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e0e7ee;
  padding-top: 12px;
}

.student-dday-custom-fields.disabled {
  opacity: 0.48;
}

/* Keep native mobile date controls inside the student D-day modal. */
.student-dday-modal,
.student-dday-modal .student-dday-settings,
.student-dday-modal .student-dday-custom-fields,
.student-dday-modal .field {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.student-dday-modal .student-dday-custom-fields input {
  display: block;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.admin-student-dday-settings > p {
  margin: 0;
  color: #667b8e;
  font-size: 0.78rem;
  line-height: 1.55;
}

.online-student-notice-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #173a60;
}

.online-student-notice-button:active {
  background: rgba(8, 41, 79, 0.08);
}

.online-student-notice-button > span {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom: 0;
  transform: translateY(1px);
}

.online-student-notice-button > span::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -3px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.online-student-notice-button > span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
}

.online-student-notice-button > b {
  position: absolute;
  top: 1px;
  right: 0;
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  border: 2px solid var(--student-page-bg);
  border-radius: 999px;
  background: #e54848;
  color: #fff;
  padding: 0 3px;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
}

.online-student-notice-button > b[hidden] {
  display: none;
}

body.student-online-mode .online-student-logo,
body.student-online-mode .online-student-notice-button {
  color: #fff;
}

body.student-online-mode .online-student-dday {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

body.student-online-mode .student-notification-page-head h2,
body.student-online-mode .student-notices-head h2,
body.student-online-mode .student-planner-solo-header h2 {
  color: #fff;
}

body.student-online-mode:not(.student-home-route) .student-notice-row .student-notice-title-text {
  color: #f4f8fb;
}

body.student-online-mode:not(.student-home-route) .student-notice-row {
  border-bottom-color: rgba(220, 234, 242, 0.2);
}

body.student-online-mode:not(.student-home-route) .student-notice-row:first-child {
  border-top-color: rgba(220, 234, 242, 0.2);
}

body.student-online-mode:not(.student-home-route) .student-notice-row:active {
  background: rgba(255, 255, 255, 0.06);
}

body.student-online-mode:not(.student-home-route) .student-notice-meta,
body.student-online-mode:not(.student-home-route) .student-notice-meta > span {
  color: rgba(218, 231, 239, 0.72);
}

body.student-online-mode:not(.student-home-route) .student-notice-row-action {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(234, 242, 247, 0.78);
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-page-head h2 {
  color: #fff;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-page-head > div > span {
  color: #9fd3e7;
}

.student-notification-page {
  display: grid;
  gap: 12px !important;
}

.student-notification-page-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding: 2px 0 6px;
}

.student-notification-page-head h2 {
  margin: 0;
  color: #20384c;
  font-size: 1.08rem;
  text-align: center;
}

.student-notification-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--accent-strong);
  padding: 0;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.student-notification-list {
  display: grid;
  overflow: hidden;
  border: 1px solid #ccd8e4;
  border-radius: 18px;
  background: #fff;
}

.student-notification-item {
  display: grid;
  gap: 7px;
  padding: 16px;
  border-bottom: 1px solid #e3e9ef;
}

.student-notification-item:last-child {
  border-bottom: 0;
}

.student-notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.student-notification-item-head strong {
  color: #20384c;
  font-size: 0.88rem;
}

.student-notification-item-head time {
  flex: 0 0 auto;
  color: #7b8d9d;
  font-size: 0.64rem;
}

.student-notification-item p,
.student-notification-empty p {
  margin: 0;
  color: #667b8e;
  font-size: 0.76rem;
  line-height: 1.55;
}

.student-notification-empty {
  display: grid;
  gap: 6px;
  border-radius: 18px;
  background: #fff;
  padding: 28px 20px;
  color: #687d90;
  text-align: center;
}

.student-notification-empty strong {
  color: #20384c;
}

.student-notification-empty.error {
  color: var(--danger);
}

body:not([data-app-mode="teacher"]) .content-area,
body:not([data-app-mode="teacher"]) .student-view {
  gap: 0;
}

/* Local curriculum quest UI prototype */
.curriculum-home-card,
.curriculum-overview-card,
.curriculum-detail-hero,
.curriculum-task-card {
  border: 1px solid rgba(26, 76, 133, 0.12);
  box-shadow: 0 12px 30px rgba(12, 48, 91, 0.08);
}

.curriculum-home-card {
  margin-top: 12px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff 0%, #f4f8ff 100%);
}

.curriculum-home-card-top,
.curriculum-home-main,
.curriculum-overview-copy,
.curriculum-overview-progress,
.curriculum-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.curriculum-home-eyebrow,
.curriculum-page-head span,
.curriculum-detail-kicker {
  color: #1a63c7;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.curriculum-home-progress-label {
  color: #5f7188;
  font-size: 0.75rem;
  font-weight: 800;
}

.curriculum-home-main {
  justify-content: flex-start;
  gap: 12px;
  margin: 15px 0 14px;
}

.curriculum-home-main strong {
  display: block;
  color: #102d52;
  font-size: 1.08rem;
}

.curriculum-home-main p,
.curriculum-overview-copy p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

.curriculum-subject-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(25, 79, 144, 0.18);
}

.curriculum-subject-mark.indigo,
.curriculum-detail-hero.indigo { background: linear-gradient(145deg, #123d79, #2469d8); }
.curriculum-subject-mark.teal,
.curriculum-detail-hero.teal { background: linear-gradient(145deg, #087d88, #18a8a2); }
.curriculum-subject-mark.violet,
.curriculum-detail-hero.violet { background: linear-gradient(145deg, #583c9b, #8164d8); }

.curriculum-progress-track {
  position: relative;
  height: 7px;
  display: block;
  overflow: hidden;
  border-radius: 99px;
  background: #dce6f3;
}

.curriculum-progress-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #315b68, #6ca6a3);
}

.curriculum-progress-track.light { background: rgba(255, 255, 255, 0.24); }
.curriculum-progress-track.light i { background: #fff; }

.curriculum-home-continue {
  width: 100%;
  margin-top: 15px;
}

.student-curriculum-page {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding-bottom: 18px;
}

.curriculum-page-head {
  margin: -8px -18px 0;
  padding: calc(20px + var(--student-safe-top)) 18px 48px;
  border-radius: 0;
  background: linear-gradient(145deg, #062b5f 0%, #0d447f 100%);
  box-shadow: none;
}

.curriculum-content-sheet {
  position: relative;
  z-index: 2;
  margin: -25px -18px 0;
  padding: 21px 18px 18px;
  border-radius: 28px 28px 0 0;
  background: #f5f8fc;
  box-shadow: 0 -8px 24px rgba(6, 43, 95, 0.08);
}

.curriculum-page-head h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 1.45rem;
}

.curriculum-page-head > div > span { color: rgba(255, 255, 255, 0.68); }

.curriculum-map-badge {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
  letter-spacing: 0 !important;
}

.curriculum-subject-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 13px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.curriculum-subject-tabs::-webkit-scrollbar { display: none; }

.curriculum-subject-tab {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #dce5f1;
  border-radius: 999px;
  background: #fff;
  color: #66778d;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.curriculum-subject-tab.active {
  border-color: #315b68;
  background: #315b68;
  color: #fff;
}

.curriculum-overview-card {
  padding: 16px;
  border-radius: 20px;
  background: #fff;
}

.curriculum-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.curriculum-overview-copy {
  min-width: 0;
  justify-content: flex-start;
  gap: 12px;
}

.curriculum-overview-copy h3 {
  margin: 0;
  color: #122f52;
  font-size: 1.05rem;
}

.curriculum-current-stage-jump {
  min-width: 92px;
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid #bdd1d6;
  border-radius: 11px;
  background: #e8f1f3;
  color: #315b68;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.curriculum-current-stage-jump:hover,
.curriculum-current-stage-jump:focus-visible {
  border-color: #6f9ba3;
  background: #dce9ec;
}

.curriculum-current-stage-jump:focus-visible {
  outline: 2px solid #547f88;
  outline-offset: 2px;
}

.curriculum-current-stage-jump.completed {
  border-color: #c9e8dc;
  background: #eaf8f3;
  color: #18825f;
  cursor: default;
  opacity: 1;
}

.curriculum-overview-progress {
  margin: 15px 0 8px;
  color: #607086;
  font-size: 0.74rem;
  font-weight: 800;
}

.curriculum-overview-progress strong {
  color: #315b68;
  font-size: 0.88rem;
}

.curriculum-stage-list {
  position: relative;
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.curriculum-stage-list::before {
  content: "";
  position: absolute;
  top: 56px;
  bottom: 34px;
  left: 20px;
  width: 2px;
  background: linear-gradient(#85addf 0%, #d9e3ef 42%, #e1e7ef 100%);
}

.curriculum-stage-entry {
  position: relative;
  display: grid;
  gap: 8px;
  scroll-margin-block: 120px;
}

.curriculum-phase-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 3px 1px;
  color: #315f98;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.curriculum-phase-label span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #ccdbed;
  border-radius: 999px;
  background: #edf4fd;
}

.curriculum-phase-label i {
  width: 100%;
  height: 1px;
  background: #dbe5f1;
}

.curriculum-stage-card {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 12px;
  padding: 15px 15px 15px 0;
  border: 1px solid #dbe5f0;
  border-radius: 20px;
  background: #fff;
  color: #193552;
  text-align: left;
  box-shadow: 0 7px 20px rgba(20, 52, 91, 0.07);
  overflow: hidden;
}

.curriculum-stage-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 20px 0 0 20px;
  background: #d9e3ee;
}

.curriculum-stage-card.current {
  border-color: #91b4bc;
  background: linear-gradient(135deg, #ffffff 0%, #f0f6f7 100%);
  box-shadow: 0 13px 28px rgba(49, 91, 104, 0.14);
  transform: translateY(-1px);
}

.curriculum-stage-card.current::after { background: linear-gradient(#315b68, #6ca6a3); }

.curriculum-stage-card.completed {
  border-color: #cfe7de;
  background: linear-gradient(135deg, #fff 0%, #f5fcf9 100%);
}

.curriculum-stage-card.completed::after { background: #20a477; }

.curriculum-stage-card.locked {
  background: #f7f9fb;
  color: #8491a1;
  box-shadow: none;
  opacity: 0.88;
}

.curriculum-stage-node {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
  margin-left: 6px;
  border: 3px solid #d6e0eb;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-size: 0.65rem;
}

.curriculum-stage-card.completed .curriculum-stage-node {
  border-color: #1ca878;
  background: #1ca878;
}

.curriculum-stage-card.current .curriculum-stage-node {
  border-color: #5b8d95;
  background: #edf5f6;
  color: #477f8c;
  box-shadow: 0 0 0 5px rgba(71, 127, 140, 0.11);
}

.curriculum-stage-body,
.curriculum-stage-title,
.curriculum-stage-meta {
  display: block;
}

.curriculum-stage-body { min-width: 0; }

.curriculum-stage-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.curriculum-stage-topline small {
  color: #70849a;
  font-size: 0.66rem;
  font-weight: 900;
}

.curriculum-stage-title {
  color: #173957;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.4;
}

.curriculum-stage-card.locked .curriculum-stage-title { color: #78899a; }

.curriculum-stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.curriculum-stage-meta > span {
  padding: 5px 7px;
  border: 1px solid #e0e7ef;
  border-radius: 7px;
  background: #f7f9fc;
  color: #718197;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
}

.curriculum-stage-meta > span.active {
  border-color: #bdd1d6;
  background: #e8f1f3;
  color: #315b68;
}

.curriculum-stage-meta > span.done {
  border-color: #c9e8dc;
  background: #eaf8f3;
  color: #18825f;
}

.curriculum-stage-status {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  background: #eef2f6;
  color: #718197;
  font-size: 0.61rem;
  font-weight: 900;
  line-height: 1;
}

.curriculum-stage-status.completed { background: #e5f7f0; color: #168760; }
.curriculum-stage-status.current { background: #e5eff1; color: #315b68; }
.curriculum-stage-status.locked { background: #eceff3; color: #8491a1; }
.curriculum-stage-chevron { color: #7890aa; font-size: 1.3rem; }

.curriculum-local-note,
.curriculum-stage-helper {
  margin: 14px 0 0;
  color: #8190a2;
  font-size: 0.7rem;
  text-align: center;
}

.curriculum-detail-navy {
  margin: -8px -18px 0;
  padding: 0 18px 48px;
  background: linear-gradient(145deg, #062b5f 0%, #0d447f 100%);
}

.curriculum-back-button {
  width: fit-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  margin: calc(12px + var(--student-safe-top)) 0 6px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 7px 18px rgba(3, 25, 51, 0.18);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.curriculum-back-button:hover,
.curriculum-back-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.curriculum-detail-hero {
  margin: 0;
  padding: 10px 18px 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #fff;
  box-shadow: none;
}

.curriculum-detail-sheet {
  margin-top: -27px;
  padding-top: 7px;
}

.curriculum-detail-hero .curriculum-detail-kicker { color: rgba(255, 255, 255, 0.76); }
.curriculum-detail-hero h2 { margin: 8px 0 5px; font-size: 1.38rem; }
.curriculum-detail-hero p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.82); font-size: 0.78rem; }

.curriculum-lecture-section,
.curriculum-after-lecture-section {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(26, 76, 133, 0.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(12, 48, 91, 0.07);
}

.curriculum-detail-section-head,
.curriculum-detail-section-head > div {
  display: flex;
  align-items: center;
}

.curriculum-detail-section-head {
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e5ebf2;
}

.curriculum-detail-section-head.compact { margin-bottom: 10px; }
.curriculum-detail-section-head > div { gap: 10px; }
.curriculum-detail-section-head strong,
.curriculum-detail-section-head small { display: block; }
.curriculum-detail-section-head strong { color: #153552; font-size: 0.9rem; }
.curriculum-detail-section-head small { margin-top: 3px; color: #7a899a; font-size: 0.68rem; }

.curriculum-section-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eaf2ff;
  color: #2867bf;
  font-size: 0.68rem;
  font-weight: 900;
}

.curriculum-section-count {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf2f7;
  color: #5c6f85;
  font-size: 0.7rem;
  font-weight: 900;
}

.curriculum-section-count.completed { background: #e5f8f0; color: #17875f; }

.curriculum-lecture-list { display: grid; }

.curriculum-lecture-row {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #edf1f5;
  cursor: pointer;
}

.curriculum-lecture-row:last-child { border-bottom: 0; }
.curriculum-lecture-row input,
.curriculum-finish-task input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.curriculum-lecture-check {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 2px solid #c6d2df;
  border-radius: 7px;
  background: #fff;
  color: #fff;
  font-size: 0.67rem;
  font-weight: 900;
}

.curriculum-lecture-row.completed .curriculum-lecture-check {
  border-color: #1ca878;
  background: #1ca878;
}

.curriculum-lecture-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 9px;
}

.curriculum-lecture-copy strong {
  color: #2865b7;
  font-size: 0.72rem;
  white-space: nowrap;
}

.curriculum-lecture-copy span {
  color: #30475f;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
}

.curriculum-lecture-row.completed .curriculum-lecture-copy span {
  color: #7b8b9b;
  text-decoration: line-through;
}

.curriculum-finish-task {
  position: relative;
  min-height: 66px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #edf1f5;
  cursor: pointer;
}

.curriculum-finish-task:last-child { border-bottom: 0; }

.curriculum-finish-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid #c6d2df;
  border-radius: 50%;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}

.curriculum-finish-task.completed .curriculum-finish-icon {
  border-color: #1ca878;
  background: #1ca878;
}

.curriculum-finish-copy strong,
.curriculum-finish-copy span { display: block; }
.curriculum-finish-copy strong { color: #183653; font-size: 0.82rem; }
.curriculum-finish-copy span { margin-top: 4px; color: #78889a; font-size: 0.69rem; }

.curriculum-task-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.curriculum-task-card {
  position: relative;
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}

.curriculum-task-card.completed { border-color: rgba(25, 164, 116, 0.28); background: #f5fcf9; }
.curriculum-task-order { color: #b3bfcc; font-size: 0.72rem; font-weight: 900; }
.curriculum-task-copy strong,
.curriculum-task-copy span { display: block; }
.curriculum-task-copy strong { color: #183653; font-size: 0.88rem; }
.curriculum-task-copy span { margin-top: 5px; color: #738296; font-size: 0.7rem; line-height: 1.45; }
.curriculum-task-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.curriculum-task-check {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid #cbd6e2;
  border-radius: 50%;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
}
.curriculum-task-card.completed .curriculum-task-check { border-color: #20a978; background: #20a978; }
.curriculum-stage-finish,
.curriculum-home-continue {
  border-color: #315b68;
  background: linear-gradient(135deg, #315b68, #477f8c);
  color: #fff;
  box-shadow: 0 8px 18px rgba(49, 91, 104, 0.2);
}
.curriculum-stage-finish { width: 100%; margin-top: 14px; }
.curriculum-stage-finish:disabled { background: #cbd5e1; box-shadow: none; cursor: not-allowed; }

.curriculum-admin-page {
  display: grid;
  gap: 18px;
}

.curriculum-admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, #062b5f 0%, #124c8b 100%);
  color: #fff;
  box-shadow: 0 15px 34px rgba(7, 42, 88, 0.18);
}

.curriculum-admin-heading > div > span,
.curriculum-admin-section-head > div > span {
  display: block;
  color: #79a8dc;
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.11em;
}

.curriculum-admin-heading h2 { margin: 5px 0 6px; color: #fff; font-size: 1.45rem; }
.curriculum-admin-heading p { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.78rem; }
.curriculum-admin-heading .btn { flex: 0 0 auto; background: #fff; color: #123f75; }

.curriculum-admin-release {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #d7e1ec;
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(18, 51, 87, 0.06);
}
.curriculum-admin-release.enabled { border-color: #9fd8bd; background: #f1fbf6; }
.curriculum-admin-release.disabled { border-color: #f1cfaa; background: #fff9f1; }
.curriculum-admin-release-status > span {
  display: block;
  margin-bottom: 4px;
  color: #718096;
  font-size: 0.65rem;
  font-weight: 950;
  letter-spacing: 0.11em;
}
.curriculum-admin-release-status strong { color: #173c67; font-size: 1.05rem; }
.curriculum-admin-release-status p { margin: 5px 0 0; color: #64748b; font-size: 0.77rem; }
.curriculum-admin-release.enabled .curriculum-admin-release-status strong { color: #14714d; }
.curriculum-admin-release.disabled .curriculum-admin-release-status strong { color: #a75a17; }
.curriculum-admin-release-button { flex: 0 0 auto; min-width: 104px; }
.curriculum-admin-release-button:disabled { opacity: 0.55; cursor: not-allowed; }

.curriculum-admin-alert {
  padding: 12px 15px;
  border: 1px solid #f1c7c7;
  border-radius: 12px;
  background: #fff4f4;
  color: #a33b3b;
  font-size: 0.78rem;
  font-weight: 800;
}

.curriculum-admin-workspace {
  min-height: 650px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  border: 1px solid #dce5ef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(18, 51, 87, 0.08);
  overflow: hidden;
}

.curriculum-admin-subject-rail,
.curriculum-admin-stage-rail {
  min-width: 0;
  padding: 18px;
  background: #f5f8fc;
}

.curriculum-admin-subject-rail { border-right: 1px solid #e0e7ef; }

.curriculum-admin-rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #173a5d;
}

.curriculum-admin-rail-title span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e4ecf6;
  color: #5d7188;
  font-size: 0.66rem;
  font-weight: 900;
}

.curriculum-admin-subject-list,
.curriculum-admin-stage-list { display: grid; gap: 8px; }

.curriculum-admin-subject {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #24415e;
  text-align: left;
}

.curriculum-admin-subject:hover { background: #edf3fa; }
.curriculum-admin-subject.active {
  border-color: #b7d0ef;
  background: #fff;
  box-shadow: 0 7px 18px rgba(25, 70, 119, 0.09);
}

.curriculum-admin-subject .curriculum-subject-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 0.64rem; }
.curriculum-admin-subject > span:nth-child(2) { min-width: 0; }
.curriculum-admin-subject strong,
.curriculum-admin-subject small { display: block; }
.curriculum-admin-subject strong { overflow: hidden; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.curriculum-admin-subject small { margin-top: 4px; color: #7a8a9b; font-size: 0.62rem; }
.curriculum-admin-subject i {
  grid-column: 2;
  justify-self: start;
  margin-top: -2px;
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
}
.curriculum-admin-subject i.published { background: #e7f7f1; color: #1c8563; }
.curriculum-admin-subject i.draft { background: #edf0f4; color: #7a8795; }

.curriculum-admin-editor { min-width: 0; padding: 22px; }
.curriculum-admin-subject-settings { padding-bottom: 22px; border-bottom: 1px solid #e3eaf2; }

.curriculum-admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.curriculum-admin-section-head h3 { margin: 3px 0 0; color: #173957; font-size: 1.06rem; }
.curriculum-admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.curriculum-admin-actions.compact { flex-wrap: nowrap; }
.curriculum-admin-fields { display: grid; grid-template-columns: minmax(160px, 2fr) minmax(100px, 1fr) minmax(105px, 1fr) minmax(190px, 2fr) auto; align-items: end; gap: 12px; }

.curriculum-admin-field { display: grid; gap: 6px; }
.curriculum-admin-field > span { color: #60758b; font-size: 0.68rem; font-weight: 900; }
.curriculum-admin-field input,
.curriculum-admin-field select,
.curriculum-admin-lecture-row input {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #d6e0ea;
  border-radius: 10px;
  background: #fff;
  color: #213f5d;
  font: inherit;
  font-size: 0.76rem;
}
.curriculum-admin-field input:focus,
.curriculum-admin-field select:focus,
.curriculum-admin-lecture-row input:focus { border-color: #4c86d2; outline: 3px solid rgba(76, 134, 210, 0.12); }

.curriculum-admin-toggle {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  color: #536a81;
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}
.curriculum-admin-toggle input { accent-color: #286bc2; }

.curriculum-admin-stage-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  margin: 22px -22px -22px;
}

.curriculum-admin-stage-rail { border-right: 1px solid #e0e7ef; }
.curriculum-admin-stage {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #334e69;
  text-align: left;
}
.curriculum-admin-stage > span:first-child { color: #94a4b6; font-size: 0.65rem; font-weight: 950; }
.curriculum-admin-stage strong,
.curriculum-admin-stage small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.curriculum-admin-stage strong { font-size: 0.73rem; }
.curriculum-admin-stage small { margin-top: 4px; color: #8492a2; font-size: 0.59rem; }
.curriculum-admin-stage.active { border-color: #bfd5ef; background: #e8f2ff; color: #1c579d; }

.curriculum-admin-add-stage {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px dashed #9db9d9;
  border-radius: 11px;
  background: #f7fbff;
  color: #386a9f;
  font-size: 0.7rem;
  font-weight: 900;
}

.curriculum-admin-stage-editor { min-width: 0; padding: 20px 22px 24px; }
.curriculum-admin-stage-fields { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: end; gap: 12px; }
.curriculum-admin-lecture-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 10px; }
.curriculum-admin-lecture-head > div { display: flex; align-items: center; gap: 8px; color: #1b3d5e; }
.curriculum-admin-lecture-head span { padding: 4px 7px; border-radius: 999px; background: #e8eff7; color: #62768c; font-size: 0.64rem; font-weight: 900; }
.curriculum-admin-lecture-list { display: grid; gap: 7px; }
.curriculum-admin-lecture-row {
  display: grid;
  grid-template-columns: 28px 76px minmax(160px, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: #fbfcfe;
}
.curriculum-admin-drag-index { color: #96a5b5; font-size: 0.63rem; font-weight: 950; text-align: center; }
.curriculum-admin-row-actions { display: flex; gap: 4px; }
.curriculum-admin-row-actions .mini-btn { min-width: 32px; padding-inline: 7px; }

.curriculum-admin-fixed-tasks {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #f0f5fb;
}
.curriculum-admin-fixed-tasks span { margin-right: auto; color: #718399; font-size: 0.67rem; font-weight: 850; }
.curriculum-admin-fixed-tasks strong { padding: 6px 9px; border-radius: 8px; background: #fff; color: #315b88; font-size: 0.66rem; }
.curriculum-admin-fixed-tasks.disabled { background: #f4f5f7; }
.curriculum-admin-fixed-tasks.disabled strong { color: #778493; }
.curriculum-admin-save-bottom { width: 100%; margin-top: 16px; }

.curriculum-admin-empty {
  min-height: 240px;
  display: grid;
  place-content: center;
  padding: 30px;
  color: #65798e;
  text-align: center;
}
.curriculum-admin-empty strong { color: #294b6d; }
.curriculum-admin-empty p { margin: 7px 0 0; font-size: 0.75rem; }
.curriculum-admin-empty.lecture { min-height: 150px; border: 1px dashed #cad7e4; border-radius: 14px; background: #fafcff; }

@media (max-width: 1040px) {
  .curriculum-admin-workspace { grid-template-columns: 210px minmax(0, 1fr); }
  .curriculum-admin-fields { grid-template-columns: 1fr 1fr; }
  .curriculum-admin-stage-workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .curriculum-admin-lecture-row { grid-template-columns: 28px 70px minmax(140px, 1fr); }
  .curriculum-admin-row-actions { grid-column: 2 / -1; justify-content: flex-end; }
}

@media (max-width: 760px) {
  .curriculum-admin-release { align-items: stretch; flex-direction: column; }
  .curriculum-admin-release-button { width: 100%; }
  .curriculum-admin-heading { align-items: stretch; flex-direction: column; }
  .curriculum-admin-workspace,
  .curriculum-admin-stage-workspace { grid-template-columns: 1fr; }
  .curriculum-admin-subject-rail,
  .curriculum-admin-stage-rail { border-right: 0; border-bottom: 1px solid #e0e7ef; }
  .curriculum-admin-subject-list,
  .curriculum-admin-stage-list { max-height: 260px; overflow-y: auto; }
  .curriculum-admin-editor { padding: 18px; }
  .curriculum-admin-stage-workspace { margin: 18px -18px -18px; }
  .curriculum-admin-fields,
  .curriculum-admin-stage-fields { grid-template-columns: 1fr; }
  .curriculum-admin-lecture-row { grid-template-columns: 26px 70px minmax(0, 1fr); }
}

.student-footer-menu {
  position: fixed;
  left: 50%;
  bottom: var(--student-footer-bottom);
  z-index: 30;
  width: min(420px, calc(100% - 28px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(10, 41, 78, 0.16);
  transform: translateX(-50%);
  backface-visibility: hidden;
  isolation: isolate;
  touch-action: manipulation;
  will-change: opacity, transform;
  transition:
    opacity 160ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 240ms;
}

body.student-footer-tap-guard .study-cafe-seat {
  pointer-events: none;
}

.student-footer-menu [data-route="study-cafe"] {
  display: none;
}

body.student-online-managed-mode .normal-student-footer {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.student-study-mode .study-cafe-footer-menu {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-footer-menu [hidden] {
  display: none !important;
}

.normal-student-footer {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s, 0s, 0s;
}

.study-cafe-footer-menu {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-50% + 28px));
  transition-delay: 0s, 0s, 240ms;
}

.study-cafe-footer-menu::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 0;
  width: calc(25% - 6.5px);
  border-radius: 10px;
  background: var(--accent-soft);
  pointer-events: none;
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.study-cafe-footer-menu[data-active-index="1"]::before {
  transform: translateX(calc(100% + 4px));
}

.study-cafe-footer-menu[data-active-index="2"]::before {
  transform: translateX(calc(200% + 8px));
}

.study-cafe-footer-menu[data-active-index="3"]::before {
  transform: translateX(calc(300% + 12px));
}

body.student-study-mode .normal-student-footer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-50% - 28px));
  transition-delay: 0s, 0s, 240ms;
}

body.student-study-mode .study-cafe-footer-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%);
  transition-delay: 0s, 0s, 0s;
}

body.student-online-mode .student-footer-menu [data-route="study-cafe"] {
  display: grid;
}

body.student-online-mode .student-footer-menu [data-route="attendance"],
body.student-online-mode .student-footer-menu [data-route="student"] {
  display: none;
}

.badge.student-category-offline {
  background: #eef3f7;
  color: #425c70;
}

.badge.student-category-online_managed {
  background: #e8f4ff;
  color: #1267a4;
}

.badge.student-category-lecture {
  background: #f1edff;
  color: #6947aa;
}

body[data-app-mode="teacher"] .student-footer-menu {
  display: none;
}

body:not([data-app-mode="teacher"]):has(input:focus, textarea:focus) .student-footer-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(100% + 24px));
}

.student-footer-menu button,
.student-footer-menu a {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-rows: 24px auto;
  justify-items: center;
  align-content: center;
  gap: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 100ms linear, color 100ms linear;
}

.study-cafe-footer-menu button,
.study-cafe-footer-menu a {
  position: relative;
  z-index: 1;
  overflow: hidden;
  font-size: 0.56rem;
  white-space: nowrap;
}

.study-cafe-footer-menu button::after,
.study-cafe-footer-menu a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: currentColor;
  opacity: 0;
  transform: translateX(-50%) scaleX(0.45);
  will-change: opacity, transform;
  transition:
    opacity 120ms linear,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.study-cafe-footer-menu button > span:last-child,
.study-cafe-footer-menu a > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-footer-menu button.active,
.student-footer-menu a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.study-cafe-footer-menu button.active,
.study-cafe-footer-menu a.active,
.study-cafe-footer-menu button:active,
.study-cafe-footer-menu a:active {
  background: transparent;
}

.study-cafe-footer-menu button.active::after,
.study-cafe-footer-menu a.active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.student-footer-menu button:active,
.student-footer-menu a:active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

@media (hover: hover) and (pointer: fine) {
  .student-footer-menu button:hover,
  .student-footer-menu a:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }
}

.student-footer-menu button:disabled,
.student-footer-menu button[aria-disabled="true"],
.student-footer-menu a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.46;
}

.footer-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: block;
  color: currentColor;
  transition: transform 160ms ease;
}

.footer-icon::before,
.footer-icon::after {
  box-sizing: border-box;
}

.footer-icon-home::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.footer-icon-home::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  width: 12px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.footer-icon-outing::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 10px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.footer-icon-outing::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 11px;
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 3px -3px 0 -1px currentColor, 3px 3px 0 -1px currentColor;
}

.footer-icon-grades::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 6px -4px 0 currentColor, 12px -9px 0 currentColor;
}

.footer-icon-grades::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.footer-icon-attendance::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.footer-icon-attendance::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  width: 6px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.student-study-route-enter {
  animation: student-study-route-enter 190ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes student-study-route-enter {
  from {
    transform: translateX(var(--student-study-route-enter-x, 10px));
  }
  to {
    transform: translateX(0);
  }
}

.footer-icon-study-todo::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 16px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.footer-icon-study-todo::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 8px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.footer-icon-study-cafe::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 20px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 2px 2px 1px 1px;
}

.footer-icon-study-cafe::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 14px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 2px 2px 4px 4px;
  background: linear-gradient(
    90deg,
    transparent calc(50% - 1px),
    currentColor calc(50% - 1px) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.footer-icon-question-board::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.footer-icon-question-board::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}

.footer-icon-study-back::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.footer-icon-study-back::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.footer-icon-study-ranking::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 14px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 2px 2px 8px 8px;
}

.footer-icon-study-ranking::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  width: 12px;
  height: 8px;
  background:
    linear-gradient(currentColor, currentColor) center top / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 12px 2px no-repeat;
}

.footer-icon-study-timer::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 -4px 0 -2px currentColor;
}

.footer-icon-study-timer::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  width: 5px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 0 1px;
}

.footer-icon-study-character::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.footer-icon-study-character::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 20px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 3px 3px 5px 5px;
  background: linear-gradient(
    90deg,
    transparent calc(50% - 1px),
    currentColor calc(50% - 1px) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.footer-icon-mypage::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.footer-icon-mypage::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 3px;
  width: 16px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 10px 10px 4px 4px;
}

body:not([data-app-mode="teacher"]) .student-home {
  gap: 10px;
}

.lecture-home-summary-card,
.lecture-home-shortcuts-card,
.lecture-home-board-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
}

.lecture-home-shortcuts-card {
  border: 1px solid #c7d3df;
  background: #d5dee8;
}

.lecture-home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.lecture-home-section-head > div {
  min-width: 0;
}

.lecture-home-section-head span {
  display: block;
  margin-bottom: 3px;
  color: #4a91c5;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.lecture-home-section-head h2 {
  margin: 0;
  color: #20384c;
  font-size: 1.06rem;
}

.lecture-home-text-link {
  border: 0;
  background: transparent;
  color: #267cb7;
  padding: 5px 0;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.lecture-home-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.lecture-home-summary-item {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 0;
  border-radius: 13px;
  background: #f3f8fc;
  padding: 13px 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.lecture-home-summary-item span {
  color: #6f8494;
  font-size: 0.72rem;
  font-weight: 800;
}

.lecture-home-summary-item strong {
  overflow: hidden;
  color: #1e4f72;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lecture-home-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.lecture-home-shortcut-grid.compact-three {
  grid-template-columns: minmax(0, 1fr);
}

.lecture-home-shortcut-grid.compact-three .lecture-home-shortcut {
  min-height: 72px;
}

.lecture-home-board-list {
  display: grid;
}

.lecture-home-board-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #e7edf2;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.lecture-home-board-row:first-child {
  border-top: 1px solid #e7edf2;
}

.lecture-home-board-row:active {
  background: #f7f9fb;
}

.lecture-home-board-row:focus-visible {
  outline: 2px solid #2e88c9;
  outline-offset: -2px;
}

.lecture-home-board-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.lecture-home-board-main > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #20384c;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lecture-home-board-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: #8a99a5;
  font-size: 0.64rem;
}

.lecture-home-board-comments {
  width: 48px;
  min-height: 50px;
  display: grid;
  place-content: center;
  gap: 2px;
  border-radius: 14px;
  background: #f3f6f8;
  color: #89949d;
  text-align: center;
}

.lecture-home-board-comments strong {
  color: #263642;
  font-size: 0.84rem;
  line-height: 1;
}

.lecture-home-board-comments small {
  font-size: 0.6rem;
}

.lecture-home-board-state {
  min-height: 72px;
  display: grid;
  place-items: center;
  border-top: 1px solid #e7edf2;
  border-bottom: 1px solid #e7edf2;
  color: #8595a2;
  font-size: 0.72rem;
  text-align: center;
}

.lecture-home-shortcut {
  min-width: 0;
  min-height: 92px;
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #b9c8d6;
  border-radius: 14px;
  background: #fff;
  padding: 13px 10px 13px 13px;
  color: #31556f;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 9px rgba(24, 55, 83, 0.08);
}

.lecture-home-shortcut:active {
  border-color: #8eabc2;
  background: #eef5fa;
  box-shadow: 0 1px 4px rgba(24, 55, 83, 0.1);
}

.lecture-home-shortcut-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eaf5fd;
  color: #287eb9;
}

.lecture-home-shortcut-icon .footer-icon {
  flex: 0 0 24px;
}

.lecture-home-shortcut-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lecture-home-shortcut-copy strong {
  color: #20384c;
  font-size: 0.85rem;
}

.lecture-home-shortcut-copy > span {
  display: -webkit-box;
  overflow: hidden;
  color: #768a99;
  font-size: 0.66rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lecture-home-shortcut-chevron {
  color: #98aab7;
  font-size: 1.25rem;
  line-height: 1;
}

.lecture-home-notice-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 16px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: linear-gradient(currentColor, currentColor) 3px 6px / 9px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 3px 11px / 7px 2px no-repeat;
}

.lecture-home-notice-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 1px;
  width: 8px;
  height: 4px;
  border-radius: 3px 3px 1px 1px;
  background: currentColor;
}

@media (max-width: 360px) {
  .lecture-home-shortcut {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 12px 9px;
  }

  .lecture-home-shortcut-icon {
    width: 30px;
    height: 30px;
  }

  .lecture-home-shortcut-chevron {
    display: none;
  }
}

body.student-browser-install-only .sidebar,
body.student-browser-install-only .student-footer-menu {
  display: none;
}

body.student-browser-install-only::after {
  display: none;
}

body.student-browser-install-only .app-frame {
  display: block;
  min-height: 100svh;
}

body.student-browser-install-only .main-shell {
  min-height: 100svh;
  padding: 24px;
}

.student-browser-install-only-view {
  min-height: calc(100svh - 48px);
  display: grid;
  place-items: center;
}

.student-browser-install-button {
  width: min(320px, 100%);
  min-height: 56px;
  margin: 0;
  font-size: 1rem;
}

.student-auth-card {
  display: grid;
  gap: 14px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  padding: 22px 20px;
}

.student-auth-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.student-auth-card h2 {
  margin: 6px 0 8px;
  font-size: 1.45rem;
}

.student-auth-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.student-auth-lookup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.student-auth-lookup .btn {
  width: auto;
  min-width: 74px;
  margin-top: 0;
  padding-inline: 14px;
}

.student-auth-result {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.student-auth-result.success {
  color: var(--accent);
}

.student-auth-result.error {
  color: var(--danger);
}

.student-auth-reset-request[hidden] {
  display: none;
}

.student-auth-reset-request .btn {
  width: 100%;
  margin-top: 0;
}

.student-auth-profile {
  display: grid;
  gap: 13px;
}

.student-auth-profile[hidden] {
  display: none;
}

.student-auth-name {
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f8fb;
  padding: 0 12px;
}

body:not([data-app-mode="teacher"]) input[readonly] {
  background: #f5f8fb;
  color: var(--muted);
}

.info-modal-panel.student-reset-request-modal {
  width: min(480px, 100%);
}

.student-reset-request-content {
  display: grid;
  gap: 12px;
}

.student-reset-request-content textarea {
  min-height: 84px;
  resize: vertical;
}

.student-forgot-password-btn {
  justify-self: start;
  min-height: 32px;
  margin-top: -6px;
}

.student-forgot-password-notice[hidden] {
  display: none;
}

.student-forgot-password-notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f8fb;
  padding: 10px 12px;
  font-size: 0.86rem;
}

.student-dday-card,
.student-today-card,
.student-notice-card,
.student-summary-card {
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

.student-dday-card {
  display: grid;
  gap: 7px;
  padding: 14px 18px;
}

.student-dday-card div {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.student-dday-card span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.student-dday-card strong {
  color: var(--accent-strong);
  font-size: 1.85rem;
  line-height: 1;
}

.student-dday-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.student-today-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.student-today-card h3 {
  margin-bottom: 0;
  font-size: 1.02rem;
}

.student-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.student-status-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.student-status-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.student-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.student-status-dot.idle {
  background: var(--muted);
}

.student-status-dot.pending {
  background: var(--amber);
}

.student-status-dot.active {
  background: var(--accent);
}

.student-notice-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.student-notice-head,
.student-notices-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-notice-head h3,
.student-notices-head h2 {
  margin-bottom: 0;
  color: #1f2e3a;
}

.student-notice-head h3 {
  font-size: 1.02rem;
}

.student-notice-more {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #d9e0e8;
  border-radius: 999px;
  background: #f3f6f9;
  color: #506070;
  font-weight: 900;
  font-size: 0.88rem;
  cursor: pointer;
}

.student-notice-list {
  display: grid;
  gap: 8px;
}

.student-notice-list.full {
  gap: 0;
  margin: 0 -2px;
}

.student-notice-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #e7edf5;
  border-radius: 12px;
  background: #f8fbff;
  color: #1f2e3a;
  text-align: left;
  cursor: pointer;
}

.student-notice-title:active {
  transform: translateY(1px);
}

.student-notice-title-text {
  overflow: hidden;
  font-weight: 850;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-notice-arrow {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e7eef8;
  color: var(--accent-strong);
  font-weight: 900;
  font-size: 0.74rem;
}

.student-notice-row {
  min-height: 94px;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 14px;
  padding: 17px 2px;
  border: 0;
  border-bottom: 1px solid #e7edf2;
  border-radius: 0;
  background: transparent;
}

.student-notice-row:first-child {
  border-top: 1px solid #e7edf2;
}

.student-notice-row:active {
  background: #f7f9fb;
  transform: none;
}

.student-notice-row:focus-visible {
  outline: 2px solid #2e88c9;
  outline-offset: -2px;
}

.student-notice-row-main {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.student-notice-row .student-notice-title-text {
  display: -webkit-box;
  overflow: hidden;
  color: #1f2e3a;
  font-size: 0.98rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-notice-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: #919aa2;
  font-size: 0.7rem;
}

.student-notice-meta > span {
  color: #737f89;
}

.student-notice-row-action {
  width: 54px;
  min-height: 58px;
  display: grid;
  place-content: center;
  border-radius: 15px;
  background: #f4f6f8;
  color: #89949d;
  font-size: 1rem;
  font-weight: 900;
}

.student-notices {
  gap: 10px;
}

.student-notices-panel,
.student-notice-detail {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.student-notices-panel {
  gap: 6px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.student-notice-detail-head {
  display: grid;
  gap: 8px;
}

.student-notice-detail-head span {
  color: var(--accent-strong);
  font-weight: 900;
  font-size: 0.82rem;
}

.student-notice-detail-head h2 {
  margin-bottom: 0;
  color: #1f2e3a;
  font-size: 1.26rem;
  line-height: 1.35;
}

.student-notice-body {
  display: grid;
  gap: 12px;
}

.student-notice-body p {
  margin-bottom: 0;
  color: #1f2e3a;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.student-notice-image-link {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #eef3f7;
}

.student-notice-image {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: contain;
}

.student-notice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.notice-admin-form textarea {
  min-height: 180px;
}

.notice-image-picker {
  display: grid;
  gap: 10px;
}

.notice-image-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #cbd8e6;
  border-radius: 9px;
  background: #f6f9fc;
  color: #294760;
  font-weight: 850;
  cursor: pointer;
}

.notice-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.notice-image-preview-card {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.notice-image-preview-card img {
  display: block;
  width: min(260px, 100%);
  max-height: 220px;
  border: 1px solid #d9e3ec;
  border-radius: 12px;
  background: #eef3f7;
  object-fit: contain;
}

.notice-image-preview-empty {
  display: grid;
  min-height: 74px;
  place-items: center;
  border: 1px dashed #cbd8e6;
  border-radius: 10px;
  background: #f8fafc;
  color: #70808f;
  font-size: 0.86rem;
}

.notice-publish-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--text);
  font-weight: 850;
}

.notice-publish-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.notice-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notice-form-actions .btn {
  width: auto;
}

.notice-target-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.notice-target-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d6e0ea;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.notice-target-option:has(input:checked) {
  border-color: #76aee0;
  background: #edf6ff;
}

.notice-target-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.notice-target-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.notice-admin-preview {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.badge.notice-target-academy {
  background: #e8f2ff;
  color: #175f9e;
}

.badge.notice-target-offline {
  background: #e8f2ff;
  color: #175f9e;
}

.badge.notice-target-online_managed {
  background: #e8f8f2;
  color: #167052;
}

.badge.notice-target-lecture {
  background: #ede9fe;
  color: #6d3cc4;
}

@media (max-width: 680px) {
  .notice-target-options {
    grid-template-columns: 1fr;
  }
}

.student-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.student-summary-card > div {
  min-width: 0;
}

.student-install-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 16px 18px;
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.student-install-card strong {
  font-size: 1.02rem;
}

.student-install-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.student-install-card .btn {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 9px 12px;
  font-size: 0.88rem;
}

.student-auth-install-card {
  margin-top: 0;
}

/* The initial student login has one primary action and quieter entry points. */
body:not([data-app-mode="teacher"]) .student-view.student-login {
  width: 100%;
  max-width: 460px;
  margin: 24px auto;
  gap: 12px;
}

.student-login .student-auth-card {
  padding: 28px 24px;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.student-login .student-auth-card h2 { margin: 0 0 8px; }
.student-login .student-auth-card p { margin: 0; }
.student-login .student-auth-result:empty { display: none; }
.student-login .student-auth-card .btn[hidden] { display: none; }
.student-login .student-auth-card > .btn { margin-top: 0; }
.student-login .student-auth-lookup { grid-template-columns: minmax(0, 1fr); }
.student-login .student-auth-card > .btn { width: 100%; min-height: 48px; }
.student-login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.student-login-link {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #52677c;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.student-login-link + .student-login-link { border-left: 1px solid var(--line); }
.student-login-link:hover { color: #234e83; text-decoration: underline; }
.student-login-link:focus-visible { outline: 2px solid #234e83; outline-offset: -2px; border-radius: 6px; }
.student-login-links .lecture-application-status-card { flex-basis: 100%; margin-top: 12px; }

.student-login .lecture-application-entry-card {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.student-login .lecture-application-entry-card strong { font-size: 0.95rem; }
.student-login .lecture-application-entry-card p { font-size: 0.84rem; word-break: keep-all; }
.student-login .lecture-application-entry-card .btn { margin-top: 0; }
.student-login .student-auth-install-card { padding: 16px; box-shadow: none; }

@media (max-width: 480px) {
  body:not([data-app-mode="teacher"]) .student-view.student-login { margin: 12px auto; }
  .student-login .student-auth-card { padding: 24px 20px; }
  .student-login .student-auth-install-card { grid-template-columns: minmax(0, 1fr); }
}

.student-summary-card strong {
  font-size: 1.08rem;
}

.student-summary-card p {
  margin: -2px 0 6px;
  color: var(--muted);
  line-height: 1.5;
}

.student-summary-card .btn {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 9px 12px;
  font-size: 0.88rem;
}

.student-summary-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.student-mypage {
  gap: 10px;
}

.student-profile-card {
  display: grid;
  gap: 18px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  padding: 20px;
}

.student-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.student-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 900;
}

.student-profile-head span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.student-profile-head h2 {
  min-width: 0;
  margin: 3px 0 0;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.student-profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.student-profile-name-row .mini-btn {
  flex: 0 0 auto;
  min-height: 26px;
}

.student-profile-list {
  display: grid;
  gap: 2px;
}

.student-profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  border-top: 1px solid #e7eef7;
}

.student-profile-item span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.student-profile-item strong {
  text-align: right;
}

.student-profile-note {
  margin-bottom: 0;
  border-radius: 12px;
  background: #f5f8fb;
  padding: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.student-history-button-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  padding: 16px 18px;
}

.student-history-head {
  display: grid;
  gap: 12px;
}

.student-history-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.student-history-head span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.student-history-button-card .btn {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 9px 12px;
  font-size: 0.88rem;
}

.student-faq-page { gap: 10px; }

.student-faq-back {
  width: fit-content;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.student-faq-head {
  display: grid;
  gap: 6px;
  padding: 5px 2px 12px;
}

.student-faq-head > span {
  color: #83d0c5;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.student-faq-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1.38rem;
}

.student-faq-head p {
  margin: 0;
  color: rgba(225, 239, 248, 0.78);
  font-size: 0.78rem;
  line-height: 1.55;
}

.student-faq-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 7px 12px 9px 7px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.student-faq-filters::-webkit-scrollbar { display: none; }

.student-faq-filter {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(207, 224, 235, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #294b65;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.student-faq-filter.active {
  border-color: #b8dff2;
  background: #dff2fb;
  color: #0f628f;
  box-shadow: 0 5px 14px rgba(7, 46, 72, 0.2);
}

.student-faq-list { display: grid; gap: 9px; }

.student-faq-item {
  overflow: hidden;
  border: 1px solid #d0dde2;
  border-radius: 17px;
  background: #e9f0f2;
}

.student-faq-question {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 7px 12px;
  width: 100%;
  min-height: 72px;
  padding: 14px 14px 14px 16px;
  border: 0;
  background: transparent;
  color: #173b52;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.student-faq-category {
  grid-column: 1;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: #d8ebe7;
  color: #176d68;
  font-size: 0.59rem;
  font-weight: 900;
}

.student-faq-question strong {
  grid-column: 1;
  font-size: 0.86rem;
  line-height: 1.45;
}

.student-faq-toggle {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dce7ea;
  color: #315b68;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}

.student-faq-item.open .student-faq-toggle {
  background: #315b68;
  color: #fff;
  transform: rotate(45deg);
}

.student-faq-answer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 0 14px;
  padding: 14px 2px 16px;
  border-top: 1px solid #d3dfe3;
}

.student-faq-answer[hidden] { display: none; }

.student-faq-answer > span {
  padding: 3px 6px;
  border-radius: 6px;
  background: #315b68;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
}

.student-faq-answer p {
  margin: 0;
  color: #526d7f;
  font-size: 0.76rem;
  line-height: 1.68;
}

.student-faq-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(207, 226, 232, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(225, 239, 248, 0.75);
}

.student-faq-contact > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.student-faq-contact strong {
  color: #fff;
  font-size: 0.76rem;
}

.student-faq-contact p {
  margin: 0;
  font-size: 0.67rem;
  line-height: 1.5;
}

.student-faq-contact-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(184, 223, 242, 0.8);
  border-radius: 11px;
  background: #dff2fb;
  color: #0f628f;
  font-size: 0.69rem;
  font-weight: 900;
  cursor: pointer;
}

.inquiry-page {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
  padding-bottom: calc(98px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-x: clip;
}

.inquiry-page > * {
  min-width: 0;
  max-width: 100%;
}

.inquiry-back-button {
  width: fit-content;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.inquiry-head {
  display: grid;
  gap: 6px;
  padding: 5px 2px 4px;
}

.inquiry-head > span,
.inquiry-kicker {
  color: #83d0c5;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.inquiry-head h2,
.inquiry-surface h2 {
  margin: 0;
  color: #173b52;
  font-size: 1.32rem;
}

.inquiry-head h2 { color: #fff; }

.inquiry-head > p {
  margin: 0;
  color: rgba(225, 239, 248, 0.8);
  font-size: 0.76rem;
  line-height: 1.6;
}

.inquiry-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
}

.inquiry-search input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #173b52;
}

.inquiry-search-button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #b8dff2;
  border-radius: 12px;
  background: #dff2fb;
  color: #0f628f;
  font-weight: 900;
  cursor: pointer;
}

.inquiry-filter-scroll,
.inquiry-status-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.inquiry-filter-scroll {
  padding: 7px 12px 9px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.inquiry-status-filters { padding: 0 1px 2px; }
.inquiry-filter-scroll::-webkit-scrollbar,
.inquiry-status-filters::-webkit-scrollbar { display: none; }

.inquiry-filter-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #cfdee5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #294b65;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.inquiry-filter-button.active {
  border-color: #a9d5e9;
  background: #dff2fb;
  color: #0f628f;
  box-shadow: 0 5px 14px rgba(7, 46, 72, 0.16);
}

.inquiry-list-section,
.inquiry-surface {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid #d5e2e8;
  border-radius: 19px;
  background: #f7fafb;
  box-shadow: 0 10px 26px rgba(7, 40, 64, 0.08);
}

.inquiry-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
}

.inquiry-list-head strong { color: #173b52; font-size: 0.9rem; }
.inquiry-list-head span { color: #6a8190; font-size: 0.7rem; font-weight: 850; }
.inquiry-list,
.inquiry-admin-list { display: grid; min-width: 0; gap: 9px; }

.inquiry-skeleton-list { display: grid; min-width: 0; gap: 9px; }
.inquiry-skeleton-card { min-height: 122px; display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px solid #d2e0e5; border-radius: 15px; background: #eaf1f3; }
.inquiry-skeleton-card > span { display: block; overflow: hidden; border-radius: 999px; background: linear-gradient(100deg, rgba(92,122,138,.1) 20%, rgba(255,255,255,.58) 42%, rgba(92,122,138,.1) 64%); background-size: 240% 100%; animation: inquiry-skeleton-loading 1.05s ease-in-out infinite; }
.inquiry-skeleton-status { width: 54px; height: 20px; }
.inquiry-skeleton-title { width: min(74%, 240px); height: 16px; }
.inquiry-skeleton-body { width: min(88%, 290px); height: 11px; }
.inquiry-skeleton-date { width: 76px; height: 10px; margin-top: 2px; }
@keyframes inquiry-skeleton-loading { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .inquiry-skeleton-card > span { animation: none; } }

.inquiry-card,
.inquiry-admin-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border: 1px solid #d2e0e5;
  border-radius: 15px;
  background: #eaf1f3;
  color: #173b52;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.inquiry-card:hover,
.inquiry-card:focus-visible,
.inquiry-admin-card:hover,
.inquiry-admin-card:focus-visible {
  border-color: #9fc8d3;
  background: #e2edef;
  outline: none;
}

.inquiry-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.inquiry-category-badge,
.inquiry-status-badge {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 900;
}

.inquiry-category-badge { background: #d8ebe7; color: #176d68; }
.inquiry-status-badge.open { background: #fff1d8; color: #945900; }
.inquiry-status-badge.answered { background: #dff2fb; color: #0f628f; }
.inquiry-card strong,
.inquiry-admin-card strong { font-size: 0.84rem; line-height: 1.45; }

.inquiry-card p,
.inquiry-admin-card p {
  overflow: hidden;
  margin: 0;
  color: #5e7686;
  font-size: 0.72rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-card time,
.inquiry-admin-card small,
.inquiry-surface > time { color: #7c909c; font-size: 0.65rem; }

.inquiry-compose-button {
  position: fixed;
  right: max(18px, calc((100vw - 560px) / 2 + 18px));
  bottom: calc(var(--student-footer-bottom) + 80px);
  z-index: 35;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid #8fc9c1;
  border-radius: 999px;
  background: #2a8c82;
  color: #fff;
  box-shadow: 0 10px 24px rgba(7, 57, 66, 0.28);
  font-weight: 900;
  cursor: pointer;
}

.inquiry-form-page,
.inquiry-detail-page { gap: 12px; }
.inquiry-surface { display: grid; gap: 11px; }
.inquiry-surface > p { margin: 0; color: #5e7686; font-size: 0.75rem; line-height: 1.6; }
.inquiry-form { display: grid; gap: 12px; margin-top: 4px; }
.inquiry-form textarea,
.inquiry-message-form textarea,
.inquiry-admin-reply textarea { resize: vertical; }

.inquiry-form-actions,
.inquiry-detail-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.inquiry-body {
  padding-top: 13px;
  border-top: 1px solid #dce7eb;
  color: #294b65;
  font-size: 0.8rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inquiry-conversation h3 { margin: 0; color: #173b52; font-size: 0.88rem; }
.inquiry-message-list { display: grid; gap: 9px; }
.inquiry-message {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #d6e2e7;
  border-radius: 14px;
  background: #eef4f5;
}

.inquiry-message.teacher { border-color: #b9dcd7; background: #e1f0ed; }
.inquiry-message > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.inquiry-message strong { color: #173b52; font-size: 0.73rem; }
.inquiry-message span { padding: 3px 6px; border-radius: 999px; background: #2a8c82; color: #fff; font-size: 0.56rem; font-weight: 900; }
.inquiry-message time { margin-left: auto; color: #7a909c; font-size: 0.61rem; }
.inquiry-message p { margin: 0; color: #36576b; font-size: 0.75rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }

.inquiry-message-form,
.inquiry-admin-reply {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #dce7eb;
}

.inquiry-state {
  padding: 22px 12px;
  border: 1px dashed #c4d5dc;
  border-radius: 13px;
  color: #667f8e;
  font-size: 0.75rem;
  text-align: center;
}

.inquiry-state.error { border-color: #e5c4c4; color: #a04646; }
.inquiry-state p { margin: 0 0 9px; }
.inquiry-admin-page,
.inquiry-admin-detail { gap: 14px; }
.inquiry-admin-search { margin-bottom: 10px; }
.inquiry-admin-page .inquiry-filter-scroll { border-color: #dbe5e9; background: #eef3f5; }
.inquiry-admin-page .inquiry-status-filters { margin: 9px 0 12px; }
.inquiry-admin-card { background: #f5f8f9; }
.inquiry-admin-reply .btn { justify-self: end; }

body.student-online-mode:not(.student-home-route) .inquiry-list-section {
  padding: 8px 2px 24px;
  border: 0;
  border-top: 1px solid rgba(218,232,240,.18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .inquiry-list-head strong,
body.student-online-mode:not(.student-home-route) .inquiry-conversation h3 {
  color: #edf5f8;
}

body.student-online-mode:not(.student-home-route) .inquiry-list-head span {
  color: rgba(218,231,238,.62);
}

body.student-online-mode:not(.student-home-route) .inquiry-card,
body.student-online-mode:not(.student-home-route) .inquiry-skeleton-card {
  border-color: rgba(232,241,245,.26);
  border-radius: 16px;
  background: rgba(219,231,236,.9);
  box-shadow: 0 3px 10px rgba(2,18,33,.05);
}

body.student-online-mode:not(.student-home-route) .inquiry-card:hover,
body.student-online-mode:not(.student-home-route) .inquiry-card:focus-visible {
  border-color: rgba(232,241,245,.4);
  background: rgba(229,237,241,.96);
}

body.student-online-mode:not(.student-home-route) .inquiry-compose-button {
  border: 0;
  background: #187f77;
  box-shadow: 0 8px 20px rgba(20,91,86,.2);
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page,
body.student-online-mode:not(.student-home-route) .inquiry-form-page {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-surface,
body.student-online-mode:not(.student-home-route) .inquiry-form-page .inquiry-surface {
  padding: 14px 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page > article.inquiry-surface {
  border-bottom: 1px solid rgba(211,228,238,.2);
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-surface h2,
body.student-online-mode:not(.student-home-route) .inquiry-form-page .inquiry-surface h2 {
  color: #f3f6f8;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.5;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-surface > time {
  color: rgba(194,213,223,.66);
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-body {
  min-height: 0;
  border-top-color: rgba(218,232,240,.16);
  color: rgba(231,239,244,.88);
  font-size: .88rem;
  line-height: 1.8;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-detail-actions .mini-btn {
  min-height: 28px;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: rgba(205,220,228,.64);
  font-size: .68rem;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message {
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid rgba(216,230,238,.14);
  border-radius: 0;
  background: transparent;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message strong {
  color: #e8f1f5;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message time {
  color: rgba(194,213,223,.58);
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message p {
  color: rgba(231,239,244,.84);
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message-form {
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(211,228,238,.2);
  border-radius: 14px;
  background: rgba(137,174,193,.09);
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message-form textarea {
  min-height: 86px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: #f2f6f8;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message-form textarea::placeholder {
  color: rgba(215,228,235,.62);
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-message-form .btn {
  min-width: 96px;
  min-height: 40px;
  justify-self: end;
  border: 0;
  border-radius: 10px;
  background: #218c83;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .inquiry-detail-page .inquiry-state {
  border-color: rgba(216,230,238,.14);
  background: rgba(255,255,255,.045);
  color: rgba(220,232,239,.68);
}

body.student-online-mode:not(.student-home-route) .inquiry-form-page .inquiry-surface > p,
body.student-online-mode:not(.student-home-route) .inquiry-form-page .field span,
body.student-online-mode:not(.student-home-route) .inquiry-form-page .field-hint {
  color: rgba(215,228,235,.66);
}

body.student-online-mode:not(.student-home-route) .inquiry-form-page input,
body.student-online-mode:not(.student-home-route) .inquiry-form-page textarea {
  border-color: rgba(211,228,238,.22);
  background: rgba(137,174,193,.1);
  color: #f2f6f8;
}

body.student-online-mode:not(.student-home-route) .inquiry-form-page input::placeholder,
body.student-online-mode:not(.student-home-route) .inquiry-form-page textarea::placeholder {
  color: rgba(215,228,235,.58);
}

@media (min-width: 700px) {
  .inquiry-message-form,
  .inquiry-admin-reply { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .inquiry-message-form .btn,
  .inquiry-admin-reply .btn { min-height: 44px; }
}

.student-study-cafe-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 154px;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.28) 0 42px, transparent 43px),
    linear-gradient(135deg, #075da4 0%, #0b76c5 58%, #32a7ca 100%);
  padding: 20px 18px;
  color: #fff;
}

.student-study-cafe-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -40px;
  width: 138px;
  height: 96px;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-12deg);
}

.student-study-cafe-card-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.student-study-cafe-card-kicker {
  display: block;
  margin-bottom: 7px;
  color: #cceaff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.student-study-cafe-card strong {
  display: block;
  font-size: 1.14rem;
}

.student-study-cafe-live-count {
  display: inline-block;
  color: #e6f7ff;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.student-study-cafe-operating-hours {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  color: #4f6e88;
  font-size: 0.75rem;
  font-weight: 750;
  white-space: nowrap;
}

.student-study-cafe-operating-hours strong {
  display: inline;
  color: #173f67;
  font: inherit;
  font-weight: 900;
}

.student-study-cafe-live-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin: 10px 0;
  border-radius: 999px;
  background: rgba(2, 39, 76, 0.26);
  padding: 6px 9px 6px 6px;
}

.student-study-cafe-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #e83f4f;
  color: #fff;
  padding: 4px 7px;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1;
}

.student-study-cafe-live-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.student-study-cafe-card > .btn {
  position: relative;
  z-index: 1;
  width: auto;
  min-height: 40px;
  margin: 0;
  background: #fff;
  color: var(--accent-strong);
  padding: 10px 13px;
  font-size: 0.86rem;
}

body.student-online-mode.student-home-route .student-study-cafe-card {
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  align-items: stretch;
  gap: 20px;
  min-height: 286px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 13%, rgba(255, 218, 151, 0.42) 0 58px, transparent 59px),
    radial-gradient(circle at 10% 70%, rgba(99, 196, 176, 0.18) 0 72px, transparent 73px),
    radial-gradient(circle at 85% 80%, rgba(151, 116, 203, 0.16) 0 76px, transparent 77px),
    linear-gradient(145deg, #fbfdff 0%, #e6f1fb 48%, #f3ecfb 100%);
  padding: 26px 22px 20px;
  color: #102f52;
  box-shadow: 0 14px 30px rgba(1, 15, 31, 0.3);
}

body.student-online-mode.student-home-route .student-study-cafe-card-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

body.student-online-mode.student-home-route .student-study-cafe-card-kicker {
  margin-bottom: 8px;
  color: #247b7f;
  font-family: "Gong Gothic Light", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

body.student-online-mode.student-home-route .student-study-cafe-card-title {
  color: #102f52;
  font-size: 1.46rem;
}

body.student-online-mode.student-home-route .student-study-cafe-card-title.branded {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.14em;
  max-width: 100%;
  font-family: "Hakgyoansim Poster B", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: clamp(1.85rem, 7.8vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.18;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 3px 8px rgba(23, 63, 104, 0.1);
}

body.student-online-mode.student-home-route .student-study-cafe-card-title.branded span {
  display: inline;
  color: #173f68;
}

body.student-online-mode.student-home-route .student-study-cafe-card-title.branded .brand {
  flex: 0 0 100%;
  color: #173f68;
  margin-bottom: 3px;
  font-size: 0.86em;
  font-weight: 400;
  letter-spacing: 0;
}

body.student-online-mode.student-home-route .student-study-cafe-live-count {
  color: #174d78;
  font-size: 0.78rem;
}

body.student-online-mode.student-home-route .student-study-cafe-live-row {
  margin: 10px auto 12px;
  background: #d5e7f5;
}

body.student-online-mode.student-home-route .student-study-cafe-avatar-stack {
  justify-content: center;
  min-height: 38px;
}

body.student-online-mode.student-home-route .study-cafe-mini-avatar,
body.student-online-mode.student-home-route .student-study-cafe-avatar-more {
  width: 36px;
  height: 36px;
  border-color: #fff;
}

body.student-online-mode.student-home-route .study-cafe-mini-avatar-hair {
  left: 8px;
  top: 5px;
  width: 16px;
}

body.student-online-mode.student-home-route .study-cafe-mini-avatar-face {
  left: 10px;
  top: 11px;
}

body.student-online-mode.student-home-route .student-study-cafe-card > .btn {
  width: 100%;
  min-height: 52px;
  margin: 0;
  border-radius: 15px;
  background: linear-gradient(100deg, #153f6d 0%, #315f9f 52%, #238b87 100%);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(13, 47, 80, 0.24);
}

body.student-online-mode.student-home-route .student-study-cafe-card > .btn:active {
  background: linear-gradient(100deg, #0d3158 0%, #264e85 52%, #18716e 100%);
}

body.student-online-mode.student-home-route .lecture-home-shortcuts-card {
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(145deg, #e8eef5 0%, #d8e2ec 100%);
}

body.student-online-mode.student-home-route .lecture-home-shortcut-grid.compact-three .lecture-home-shortcut:nth-child(1) {
  border-color: #a9c5e3;
  background: linear-gradient(135deg, #f7fbff 0%, #dceafb 100%);
}

body.student-online-mode.student-home-route .lecture-home-shortcut-grid.compact-three .lecture-home-shortcut:nth-child(2) {
  border-color: #dcc58f;
  background: linear-gradient(135deg, #fffdf6 0%, #f5e6bd 100%);
}

body.student-online-mode.student-home-route .lecture-home-shortcut-grid.compact-three .lecture-home-shortcut:nth-child(3) {
  border-color: #9fcfbe;
  background: linear-gradient(135deg, #f5fcf9 0%, #d5eee5 100%);
}

body.student-online-mode.student-home-route .lecture-home-shortcut-grid.compact-three .lecture-home-shortcut:nth-child(2) .lecture-home-shortcut-icon {
  background: #f3dca5;
  color: #a86b12;
}

body.student-online-mode.student-home-route .lecture-home-shortcut-grid.compact-three .lecture-home-shortcut:nth-child(3) .lecture-home-shortcut-icon {
  background: #c5e8dc;
  color: #187963;
}

body.student-online-mode.student-home-route .lecture-home-board-card {
  overflow: hidden;
  border: 1px solid #c7ddd9;
  background: linear-gradient(145deg, #f1f7fa 0%, #e6f2ef 100%);
  box-shadow: 0 3px 10px rgba(1, 16, 33, 0.12);
}

body.student-online-mode.student-home-route .lecture-home-board-card .lecture-home-section-head > div > span {
  color: #28817b;
}

body.student-online-mode.student-home-route .lecture-home-board-card .lecture-home-section-head h2 {
  color: #203d50;
}

body.student-online-mode.student-home-route .lecture-home-board-card .lecture-home-text-link {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #32776f;
  padding: 6px 2px;
}

body.student-online-mode.student-home-route .lecture-home-board-card .lecture-home-text-link::after {
  content: "  ›";
}

body.student-online-mode.student-home-route .lecture-home-board-list {
  gap: 8px;
}

body.student-online-mode.student-home-route .lecture-home-board-row,
body.student-online-mode.student-home-route .lecture-home-board-row:first-child {
  min-height: 74px;
  border: 1px solid #d8e4e8;
  border-radius: 12px;
  background: #fff;
  padding: 11px 10px 11px 13px;
  box-shadow: 0 3px 8px rgba(34, 70, 91, 0.06);
}

body.student-online-mode.student-home-route .lecture-home-board-row:active {
  border-color: #a9cbc4;
  background: #f5faf9;
}

body.student-online-mode.student-home-route .lecture-home-board-comments {
  border: 1px solid #cfdee7;
  background: #edf4f8;
  color: #6f8798;
  box-shadow: none;
}

body.student-online-mode.student-home-route .lecture-home-board-comments strong {
  color: #315c78;
}

body.student-online-mode.student-home-route .lecture-home-board-state {
  border: 1px solid #d8e4e8;
  border-radius: 12px;
  background: #fff;
}

.student-study-cafe-avatar-stack {
  display: flex;
  align-items: center;
  min-height: 31px;
  padding-left: 2px;
}

.study-cafe-mini-avatar,
.student-study-cafe-avatar-more {
  position: relative;
  width: 30px;
  height: 30px;
  margin-left: -6px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #dcecff;
}

.study-cafe-mini-avatar:first-child {
  margin-left: 0;
}

.study-cafe-mini-avatar-hair {
  position: absolute;
  left: 6px;
  top: 4px;
  width: 15px;
  height: 12px;
  border-radius: 10px 10px 5px 5px;
  background: #27394f;
}

.study-cafe-mini-avatar-face {
  position: absolute;
  left: 8px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 45% 45% 50% 50%;
  background: #ffd7ba;
}

.study-cafe-mini-avatar.mint {
  background: #c8f0e5;
}

.study-cafe-mini-avatar.purple {
  background: #e8dcff;
}

.student-study-cafe-avatar-more {
  z-index: 2;
  display: grid;
  place-items: center;
  background: #06386f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}

.student-study-cafe-page {
  display: grid;
  gap: 12px;
}

.student-study-todo-page {
  display: grid;
  gap: 12px;
}

.student-planner-hub {
  width: 100%;
  min-width: 0;
}

.student-planner-hub.curriculum .student-curriculum-page {
  max-width: none;
  padding-bottom: 0;
}

.student-planner-hub.curriculum .curriculum-page-head {
  margin: 0;
  padding: 10px 0 14px;
  background: transparent;
}

.student-planner-hub.curriculum .curriculum-page-head h2 {
  color: #20384c;
  font-size: 1.15rem;
}

.student-planner-hub.curriculum .curriculum-page-head > div > span {
  color: #4a91c5;
}

.student-planner-hub.curriculum .curriculum-map-badge {
  border-color: #dbe4ed;
  background: #ffffff;
  color: #52677c !important;
}

.student-planner-hub.curriculum .curriculum-content-sheet {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.student-planner-hub.curriculum .curriculum-detail-page {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

.student-planner-hub.curriculum .curriculum-detail-navy {
  margin: 0;
  padding: 0 16px 22px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(6, 43, 95, 0.16);
}

.student-planner-hub.curriculum .curriculum-back-button {
  margin: 13px 0 6px;
  padding: 9px 14px;
}

.student-planner-hub.curriculum .curriculum-detail-hero {
  padding: 7px 0 0;
}

.student-planner-hub.curriculum .curriculum-detail-sheet {
  margin-top: 0;
  padding-top: 0;
}

.student-planner-hub.curriculum .curriculum-lecture-section {
  margin-top: 0;
}

.student-planner-hub.curriculum .curriculum-after-lecture-section {
  margin-top: 12px;
}

.student-planner-view-switch {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 8px 0 14px;
  padding: 4px;
  border: 1px solid #dbe4ed;
  border-radius: 14px;
  background: #edf2f7;
}

.student-planner-view-option {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64768a;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.student-planner-view-option.active {
  background: #fff;
  color: #175ea8;
  box-shadow: 0 1px 4px rgba(18, 61, 105, 0.14);
}

.student-planner-view-option:disabled {
  cursor: wait;
  opacity: 0.58;
}

.student-planner-view-option:focus-visible {
  outline: 2px solid #2b73bd;
  outline-offset: 1px;
}

.student-planner-solo-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 8px 0 14px;
  padding: 0;
}

.student-planner-solo-title {
  display: grid;
  place-items: center;
  min-height: 50px;
  margin: 0;
  border: 1px solid #dbe4ed;
  border-radius: 14px;
  background: #edf2f7;
  color: #20384c;
  font-size: clamp(1.28rem, 5.4vw, 1.5rem);
  font-weight: 850;
  text-align: center;
}

.study-todo-calendar-button.student-planner-month-button {
  grid-column: 1;
  width: max-content;
  min-width: 112px;
  height: 40px;
  display: inline-flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: end;
  padding: 0 12px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.student-planner-month-button .study-todo-calendar-icon {
  width: 17px;
  height: 15px;
  flex: 0 0 17px;
}

.student-planner-month-label {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}

.student-planner-month-action {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 8px;
}

.student-planner-month-action .student-planner-month-button {
  grid-column: auto;
}

.study-cafe-planner-entry-guide {
  display: grid;
  gap: 12px;
  border: 1px solid #b9d9f3;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4faff, #eaf5ff);
  padding: 14px;
}

.study-cafe-planner-entry-guide.ready {
  border-color: #a8ddc8;
  background: linear-gradient(135deg, #f1fbf7, #e7f8f1);
}

.study-cafe-planner-entry-copy {
  display: grid;
  gap: 3px;
}

.study-cafe-planner-entry-copy > span {
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 900;
}

.study-cafe-planner-entry-copy > strong {
  color: #243c53;
  font-size: 0.96rem;
}

.study-cafe-planner-entry-copy > p {
  margin: 0;
  color: #5f7387;
  font-size: 0.76rem;
  line-height: 1.45;
}

.study-cafe-planner-entry-actions {
  display: grid;
  grid-template-columns: minmax(86px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 8px;
}

.study-cafe-planner-entry-actions .btn {
  width: 100%;
  min-height: 40px;
  padding-inline: 10px;
  font-size: 0.76rem;
}

body.student-online-mode .study-cafe-planner-entry-actions .btn {
  border: 1px solid #477f8c;
  border-radius: 10px;
  background: #477f8c;
  color: #fff;
  box-shadow: none;
}

body.student-online-mode .study-cafe-planner-entry-actions .btn.secondary {
  border-color: #ccdde1;
  background: #e8f1f3;
  color: #365f6a;
}

body.student-online-mode .study-cafe-planner-entry-actions .btn:hover,
body.student-online-mode .study-cafe-planner-entry-actions .btn:focus-visible {
  background: #3b6f7b;
}

body.student-online-mode .study-cafe-planner-entry-actions .btn.secondary:hover,
body.student-online-mode .study-cafe-planner-entry-actions .btn.secondary:focus-visible {
  background: #dce9ec;
  color: #2d5661;
}

.study-cafe-planner-entry-waiting {
  color: #60778d;
  font-size: 0.7rem;
  font-weight: 850;
  text-align: center;
}

.study-todo-date-navigation {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  background: #fff;
  padding: 7px 8px;
}

.study-todo-date-arrow {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--accent-strong);
  padding: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.study-todo-date-current {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.study-todo-date-current strong {
  color: #24364a;
  font-size: 0.9rem;
}

.study-todo-calendar-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  cursor: pointer;
}

.study-todo-calendar-icon {
  position: relative;
  width: 17px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.study-todo-calendar-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  border-top: 2px solid currentColor;
}

.study-todo-calendar-icon::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 3px;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 7px 0 currentColor;
}

.study-todo-calendar-button:focus-visible {
  outline: 2px solid #2b73bd;
  outline-offset: 2px;
}

.study-todo-calendar-page-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.study-todo-calendar-page-head h2 {
  grid-column: 2;
  margin: 0;
  color: #20384c;
  font-size: 1.08rem;
  text-align: center;
}

.study-todo-calendar-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--accent-strong);
  padding: 0;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.study-todo-month-calendar {
  display: grid;
  gap: 8px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
}

.study-todo-month-calendar-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.study-todo-month-calendar-head strong {
  color: #24364a;
  font-size: 0.94rem;
  text-align: center;
}

.study-todo-month-calendar-head button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: #f1f5f9;
  color: var(--accent-strong);
  padding: 0;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
}

.study-todo-month-weekdays,
.study-todo-month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px 4px;
}

.study-todo-month-weekdays span {
  color: #718093;
  font-size: 0.66rem;
  font-weight: 850;
  text-align: center;
}

.study-todo-month-weekdays span:first-child {
  color: #c45454;
}

.study-todo-month-day {
  min-width: 0;
  aspect-ratio: 1 / 1.05;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #40556a;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.study-todo-month-day span {
  line-height: 1;
}

.study-todo-month-day i {
  width: min(30px, calc(100% - 4px));
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #e3e7eb;
}

.study-todo-month-day.plan-not-started i,
.study-todo-month-legend i.not-started {
  background: #78838e;
}

.study-todo-month-day.plan-progress-low i,
.study-todo-month-legend i.progress-low {
  background: #dff3e8;
}

.study-todo-month-day.plan-progress-mid i,
.study-todo-month-legend i.progress-mid {
  background: #91d5ae;
}

.study-todo-month-day:nth-child(7n + 1):not(.blank) {
  color: #c45454;
}

.study-todo-month-day.today {
  border-color: #efb04b;
}

.study-todo-month-day.selected {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.study-todo-month-day.plan-completed i,
.study-todo-month-legend i.completed {
  background: #27a269;
}

.study-todo-month-day.blank {
  visibility: hidden;
}

.study-todo-month-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #6a7c8e;
  font-size: 0.64rem;
  font-weight: 800;
}

.study-todo-month-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.study-todo-month-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #e3e7eb;
}

.study-todo-month-legend b {
  font: inherit;
}

.study-todo-month-calendar-head button:focus-visible,
.study-todo-month-day:focus-visible {
  outline: 2px solid #2b73bd;
  outline-offset: 1px;
}

.study-todo-calendar-selected-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 3px 0;
}

.study-todo-calendar-selected-date span {
  color: #6a7c8e;
  font-size: 0.7rem;
  font-weight: 800;
}

.study-todo-calendar-selected-date strong {
  color: #20384c;
  font-size: 0.82rem;
}

.study-todo-date-loading {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.study-todo-progress-card {
  display: grid;
  gap: 9px;
  border: 1px solid #d8e9f7;
  border-radius: 18px;
  background: linear-gradient(135deg, #fafdff, #eaf5ff);
  padding: 15px 16px;
}

.study-todo-progress-card > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.study-todo-progress-card > div span {
  color: #557087;
  font-size: 0.74rem;
  font-weight: 900;
}

.study-todo-progress-card > div strong {
  color: var(--accent-strong);
  font-size: 1.35rem;
}

.study-todo-progress-track {
  display: block;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(7, 93, 164, 0.12);
}

.study-todo-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #075da4, #38a7c9);
  transition: width 180ms ease;
}

.study-todo-progress-card p {
  margin: 0;
  color: #687b8e;
  font-size: 0.72rem;
  line-height: 1.45;
}

.study-todo-subject-list {
  display: grid;
  gap: 10px;
}

.study-todo-subject-card {
  display: grid;
  gap: 7px;
  border: 1px solid #e1e9f1;
  border-radius: 14px;
  background: #fff;
  padding: 10px 11px;
}

.study-todo-subject-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.study-todo-subject-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.study-todo-subject-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.study-todo-subject-head strong {
  min-width: 0;
  overflow: hidden;
  color: #263f57;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-todo-subject-head span {
  color: #718296;
  font-size: 0.64rem;
  font-weight: 800;
}

.study-todo-current-subject {
  height: 27px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 999px;
  background: #e5f7ef;
  padding: 0 8px;
  color: #19734d !important;
  font-size: 0.58rem !important;
  font-weight: 900 !important;
  line-height: 1;
  white-space: nowrap;
}

.study-todo-subject-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.study-todo-goal-select {
  min-height: 40px;
  border: 1px solid #d6e1eb;
  border-radius: 9px;
  background: #f7fafc;
  color: #385169;
  padding: 6px 26px 6px 10px;
  font-size: 0.8rem;
  font-weight: 850;
}

.study-todo-goal-result {
  height: 27px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.64rem !important;
  font-weight: 950 !important;
  line-height: 1;
  white-space: nowrap;
}

.study-todo-goal-result.on-time {
  background: #e5f7ef;
  color: #15805a !important;
}

.study-todo-goal-result.overtime {
  background: #fff2dc;
  color: #bd6b00 !important;
}

.study-subject-completion-modal {
  display: grid;
  gap: 14px;
}

.study-subject-completion-modal > p {
  margin: 0;
}

.study-subject-completion-subject {
  color: #66788b;
  font-size: 0.9rem;
  font-weight: 800;
}

.study-subject-completion-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-radius: 14px;
  background: #f5f8fb;
  padding: 12px;
}

.study-subject-completion-summary > div {
  display: grid;
  gap: 5px;
}

.study-subject-completion-summary span {
  color: #718296;
  font-size: 0.68rem;
  font-weight: 800;
}

.study-subject-completion-summary strong {
  color: #344b61;
  font-size: 0.9rem;
}

.study-subject-completion-question {
  color: #344b61;
  font-size: 0.92rem;
  font-weight: 900;
}

.study-subject-completion-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.study-subject-completion-dialog > .btn:last-child {
  margin-top: 8px;
}

.study-todo-items {
  display: grid;
  gap: 6px;
}

.study-todo-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 11px;
  background: #f6f9fc;
  padding: 8px 8px 8px 10px;
}

.study-todo-item input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--accent);
}

.study-todo-item > span {
  min-width: 0;
  color: #344b61;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.study-todo-item.completed > span {
  color: #94a0ad;
  text-decoration: line-through;
}

.study-todo-delete-button {
  min-height: 29px;
  border: 0;
  border-radius: 8px;
  background: #eef2f6;
  color: #7a8794;
  padding: 5px 7px;
  font-size: 0.62rem;
  font-weight: 900;
}

.study-todo-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding-top: 2px;
}

.study-todo-add-form[hidden] {
  display: none;
}

.study-todo-input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #d8e3ee;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  color: #263f57;
  font-size: 0.78rem;
}

.study-todo-input:focus {
  border-color: #77add5;
  outline: 3px solid rgba(7, 93, 164, 0.1);
}

.study-todo-add-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  flex: 0 0 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(7, 93, 164, 0.18);
  transition: transform 150ms ease, background 150ms ease;
}

.study-todo-add-button[aria-expanded="true"] {
  background: #65788a;
  transform: rotate(90deg);
}

.study-todo-add-button:focus-visible {
  outline: 3px solid rgba(7, 93, 164, 0.2);
  outline-offset: 2px;
}

.study-todo-submit-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #238f67;
  color: #fff;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 900;
}

.study-cafe-my-seat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 124px;
  border: 1px solid #cfe4f7;
  border-radius: 20px;
  background:
    radial-gradient(circle at 4% 12%, rgba(92, 180, 226, 0.2), transparent 34%),
    linear-gradient(135deg, #fafdff 0%, #eaf5ff 100%);
  padding: 14px 18px 14px 14px;
  box-shadow: 0 12px 30px rgba(17, 83, 137, 0.1);
}

.study-cafe-my-seat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  pointer-events: none;
}

.study-cafe-my-seat-character {
  appearance: none;
  position: relative;
  z-index: 1;
  min-height: 0;
  aspect-ratio: 1 / 1.08;
  align-self: center;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0;
  color: inherit;
  box-shadow: inset 0 0 0 1px rgba(72, 145, 198, 0.12);
  cursor: pointer;
}

.study-cafe-my-seat-character:hover,
.study-cafe-my-seat-character:focus-visible {
  background: #fff;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--room-accent, #1884cc) 42%, transparent);
  outline: none;
}

.study-cafe-my-seat-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 5px;
}

.study-cafe-my-seat-title {
  padding-right: 86px;
}

.study-cafe-my-seat-eyebrow {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
}

.study-cafe-my-seat-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.study-cafe-my-seat-title > strong {
  color: #123b61;
  font-size: 1.18rem;
}

.study-cafe-my-seat-status {
  border-radius: 999px;
  background: #e5f7ef;
  padding: 4px 7px;
  color: #19734d;
  font-size: 0.62rem;
  font-weight: 900;
}

.study-cafe-my-seat-status.paused {
  background: #fff0d7;
  color: #9a620c;
}

.study-cafe-my-seat-status.seated {
  background: #e9eef5;
  color: #536579;
}

.study-cafe-my-seat-copy p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #65768a;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-my-seat-copy p strong {
  color: #344a60;
}

.study-cafe-my-seat-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: 3px;
}

.study-cafe-my-seat-detail > span {
  min-width: 0;
  color: #536a80;
  font-size: 0.72rem;
  font-weight: 800;
}

.study-cafe-my-seat-actions {
  position: absolute;
  top: 16px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.study-cafe-my-seat-actions time {
  border-radius: 9px;
  background: #fff;
  padding: 6px 9px;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
}

.study-cafe-my-seat-subject-button {
  width: 100%;
  min-height: 34px;
  margin-top: 3px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
  padding: 7px 10px;
  font-size: 0.74rem;
  font-weight: 900;
}

.study-cafe-my-seat-idle-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.study-cafe-my-seat-idle-buttons .study-cafe-my-seat-subject-button,
.study-cafe-my-seat-release-button {
  width: 100%;
  min-width: 0;
}

.study-cafe-my-seat-release-button {
  min-height: 34px;
  margin-top: 3px;
  border: 1px solid color-mix(in srgb, var(--room-accent, #075da4) 30%, transparent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--room-accent, #075da4);
  padding: 7px 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.study-cafe-my-seat-fullscreen-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--room-accent, #075da4) 28%, transparent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--room-accent, #075da4);
  padding: 8px 11px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--room-accent, #075da4) 10%, transparent);
  pointer-events: auto;
}

.study-cafe-my-seat-fullscreen-button:hover,
.study-cafe-my-seat-fullscreen-button:focus-visible {
  border-color: var(--room-accent, #075da4);
  background: #fff;
  outline: none;
}

.study-cafe-back-button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 7px 9px;
  font-weight: 900;
}

.study-cafe-live-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e5f7ef;
  color: #19734d;
  padding: 6px 8px;
  font-size: 0.66rem;
  font-weight: 900;
  white-space: nowrap;
}

.student-study-timer-page {
  display: grid;
  gap: 12px;
}

.study-timer-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  background: #fff;
  padding: 13px 14px;
}

.study-timer-page-head > div span {
  display: block;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
}

.study-timer-page-head h2 {
  margin: 2px 0 0;
  font-size: 1.06rem;
}

.study-timer-active-chip {
  border-radius: 999px;
  background: #e5f7ef;
  color: #19734d;
  padding: 7px 9px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.study-timer-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.study-timer-share-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #075da4;
  border-radius: 9px;
  background: #075da4;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

body.student-online-mode .study-timer-share-button {
  border-color: #fff;
  background: #fff;
  color: #075da4;
}

.study-timer-share-button:focus-visible {
  outline: 3px solid #5bc7ff;
  outline-offset: 3px;
}

.study-timer-share-button:disabled {
  opacity: 0.5;
  cursor: default;
}

html.study-record-share-open,
html.study-record-share-open body {
  overflow: hidden;
}

.study-record-share-dialog {
  width: min(480px, calc(100vw - 24px));
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #0b2746;
  color: #fff;
  font-family: "Gong Gothic Light", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.study-record-share-dialog::backdrop {
  background: rgba(5, 18, 35, 0.66);
}

.study-record-share-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(940px, calc(100dvh - 32px));
}

.study-record-share-layout.has-period-picker {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.study-record-share-period-picker {
  padding: 0 16px 13px;
  display: grid;
  gap: 10px;
}

.study-record-share-period-picker[hidden],
.study-record-share-retry[hidden],
.study-record-share-options[hidden],
.study-record-share-image[hidden] { display: none; }

.study-record-share-period-picker .study-timer-stats-period-button {
  font: inherit;
  font-size: .76rem;
  font-weight: 900;
}

.study-record-share-period-picker .study-record-share-dates { grid-template-columns: 32px minmax(0, 1fr) 32px; }
.study-record-share-period-picker .study-record-share-dates strong { font-size: .8rem; line-height: 1.4; color: inherit; white-space: normal; }
.study-record-share-dates .study-timer-stats-date-button {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
}
.study-record-share-retry { padding: 10px 14px; border: 1px solid #67839c; border-radius: 8px; background: transparent; color: inherit; font: inherit; }

.study-record-share-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.study-record-share-head h2 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
}

.study-record-share-back {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.8rem;
  cursor: pointer;
}

.study-record-share-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 16px;
}

.study-record-share-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.study-record-share-options {
  margin-bottom: 12px;
  border: 1px solid #67839c;
  border-radius: 12px;
  color: #fff;
  font-size: 0.78rem;
}

.study-record-share-options summary {
  padding: 13px 14px;
  cursor: pointer;
}

.study-record-share-options-hint {
  margin: 0 14px 10px;
  color: #d4e3f1;
  font-size: 0.7rem;
  line-height: 1.5;
}

.study-record-share-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  margin: 0;
  padding: 0 12px 12px;
  border: 0;
  min-width: 0;
}

.study-record-share-fields legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.study-record-share-field {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  line-height: 1.5;
  cursor: pointer;
}

.study-record-share-field input {
  appearance: auto;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin: 0;
  accent-color: #2695df;
}

.study-record-share-field:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}

.study-record-share-image[hidden],
.study-record-share-status[hidden],
.study-record-share-note[hidden] {
  display: none;
}

.study-record-share-status,
.study-record-share-note {
  margin: 12px 0;
  color: #d4e3f1;
  font-size: 0.78rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.study-record-share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  background: #0b2746;
}

.study-record-share-actions .btn {
  min-height: 46px;
  margin: 0;
  font-family: inherit;
}

.study-record-share-actions .btn.secondary {
  background: #fff;
  color: var(--accent);
}

.study-record-share-formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #e6edf4;
}

.study-record-share-formats button {
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #60758a;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}

.study-record-share-formats button[aria-pressed="true"] {
  background: #fff;
  color: #06386f;
}

.study-record-share-ratio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #d4e3f1;
  font-size: .76rem;
}

.study-record-share-ratio select {
  width: auto;
  min-width: 145px;
  min-height: 36px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #67839c;
  border-radius: 8px;
  background: #12314e;
  color: #fff;
  font: inherit;
}

.study-record-share-ratio[hidden] { display: none; }

.study-record-share-photo-picker {
  display: grid;
  gap: 10px;
  padding: 42px 24px;
  border: 1px dashed #7895ad;
  border-radius: 12px;
  background: #12314e;
  text-align: center;
}

.study-record-share-photo-picker p {
  margin: 0 0 12px;
  color: #d4e3f1;
  font-size: .8rem;
  line-height: 1.6;
}

.study-record-share-photo-picker button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #90aec6;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}

.study-record-share-photo-picker button:first-of-type {
  background: #075da4;
  border-color: #075da4;
}

.study-record-share-formats button:disabled,
.study-record-share-photo-picker button:disabled { opacity: .5; cursor: default; }

.study-record-share-photo-tools {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.study-record-share-photo-button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #67839c;
  border-radius: 8px;
  background: transparent;
  color: #e5f2ff;
  font: inherit;
  font-size: .76rem;
  cursor: pointer;
}

.study-record-share-photo-button:disabled { opacity: .5; cursor: default; }

.study-record-share-photo-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 2;
  width: 160px;
  padding: 4px;
  border: 1px solid #67839c;
  border-radius: 10px;
  background: #153652;
  box-shadow: 0 4px 18px #0005;
}

.study-record-share-photo-menu button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .8rem;
  text-align: left;
  cursor: pointer;
}

.study-record-share-photo-menu button:hover,
.study-record-share-photo-menu button:focus-visible { background: #234d6e; }
.study-record-share-photo-menu[hidden],
.study-record-share-photo-menu button[hidden],
.study-record-share-photo-picker[hidden],
.study-record-share-photo-tools[hidden],
.study-record-share-content input[type="file"][hidden] { display: none; }

@media (max-width: 520px) {
  .study-record-share-dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .study-record-share-layout {
    height: 100dvh;
  }

  .study-record-share-head {
    padding-top: max(12px, env(safe-area-inset-top));
  }
}

.study-timer-total-card {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  min-height: 170px;
  align-content: center;
  gap: 8px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.16) 0 46px, transparent 47px),
    linear-gradient(135deg, #075da4, #0780bf 62%, #35a8ca);
  padding: 24px 18px;
  color: #fff;
  text-align: center;
}

.study-timer-fullscreen-button {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 7px 9px;
  font-size: 0.66rem;
  font-weight: 900;
  backdrop-filter: blur(4px);
}

.study-timer-total-card::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -48px;
  width: 150px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.study-timer-total-card > span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
}

.study-timer-total-card time {
  position: relative;
  z-index: 1;
  font-size: clamp(2.2rem, 12vw, 3.35rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.study-timer-total-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 800;
}

.study-subject-timer-card {
  display: grid;
  gap: 8px;
  border-radius: 18px;
  background: #fff;
  padding: 16px 14px 10px;
}

.study-subject-timer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 3px 7px;
}

.study-subject-timer-card-head strong {
  font-size: 1rem;
}

.study-subject-timer-card-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.study-subject-timer-card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.study-subject-edit-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex-shrink: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.study-subject-edit-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.study-planner-subject-management {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.study-planner-subject-empty {
  display: grid;
  gap: 12px;
  padding: 24px 20px;
  border-radius: 16px;
}

.btn.study-subject-add-primary {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 1rem;
  background: #278d87;
  color: #fff;
}

.study-subject-timer-list {
  display: grid;
}

.study-subject-timer-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border-top: 1px solid #edf1f5;
  padding: 8px 4px;
}

.study-subject-timer-row:first-child {
  border-top: 0;
}

.study-subject-timer-row.active {
  border-radius: 12px;
  background: #f1f8ff;
  padding-inline: 7px;
}

.study-subject-play-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #5d95d4;
  color: #fff;
  padding: 0 0 0 2px;
  font-size: 0.8rem;
  font-weight: 900;
}

.study-subject-play-button.pause {
  padding-left: 0;
  font-size: 0.72rem;
}

.study-subject-play-button.coral {
  background: #df6f78;
}

.study-subject-play-button.purple {
  background: #8d77c9;
}

.study-subject-play-button.teal {
  background: #45aca9;
}

.study-subject-play-button.amber {
  background: #eaaa47;
}

.study-subject-play-button.blue {
  background: #5d95d4;
}

.study-subject-play-button.mint {
  background: #52b99c;
}

.study-subject-play-button.navy {
  background: var(--accent);
}

.study-subject-play-button.rose {
  background: #cf6f83;
}

.study-subject-timer-row > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-subject-timer-row > time {
  color: #26384b;
  font-size: 0.9rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-subject-timer-row.active > time {
  color: var(--accent-strong);
}

.study-subject-current-dot {
  color: #20a16d;
  font-size: 0.65rem;
}

.study-subject-timer-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.study-subject-stop-button {
  min-width: 58px;
  min-height: 31px;
  border: 1px solid #f1caca;
  border-radius: 9px;
  background: #fff1f1;
  color: #b04444;
  padding: 5px 9px;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.study-subject-stop-button:hover {
  background: #ffe5e5;
}

.study-subject-stop-button:focus-visible {
  outline: 3px solid rgba(176, 68, 68, 0.16);
  outline-offset: 2px;
}

.study-timer-subject-todos {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin: 1px 0 3px 48px;
  border-left: 3px solid #dceaf5;
  padding: 7px 0 2px 10px;
}

.study-subject-timer-row.active .study-timer-subject-todos {
  border-left-color: #8fc6ec;
}

.study-timer-subject-todos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.study-timer-subject-todos-head strong,
.study-timer-subject-todos-head span {
  color: #6c7f91;
  font-size: 0.63rem;
  font-weight: 900;
}

.study-timer-subject-todo-list {
  display: grid;
  gap: 4px;
}

.study-timer-subject-todo {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  background: #f6f9fc;
  padding: 6px 8px;
}

.study-timer-subject-todo input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.study-timer-subject-todo span {
  min-width: 0;
  color: #43586c;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.study-timer-subject-todo.completed span {
  color: #99a5b1;
  text-decoration: line-through;
}

.study-timer-footnote {
  margin: 0;
  padding: 0 12px 5px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

.study-timer-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 14px;
  background: #e8edf3;
  padding: 4px;
}

.study-timer-mode-button {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.study-timer-mode-button.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 4px 12px rgba(10, 41, 78, 0.09);
}

.study-timer-stats-view {
  display: grid;
  gap: 12px;
}

.study-timer-stats-periods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.study-timer-stats-period-button {
  min-height: 38px;
  border: 1px solid #dbe4ed;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.study-timer-stats-period-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(7, 93, 164, 0.18);
}

.study-timer-stats-calendar-card,
.study-timer-stats-summary,
.study-timer-subject-stats {
  overflow: hidden;
  border: 1px solid #e6edf4;
  border-radius: 18px;
  background: #fff;
}

.study-timer-stats-calendar-card {
  display: grid;
  gap: 16px;
  min-height: 270px;
  padding: 16px 14px;
}

.study-timer-stats-date-nav {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.study-timer-stats-date-nav strong {
  overflow: hidden;
  color: #27374a;
  font-size: 1rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-timer-stats-date-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--accent-strong);
  padding: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.study-timer-stats-date-button:disabled {
  color: #bec7d1;
  opacity: 0.55;
}

.study-timer-stats-loading {
  min-height: 190px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.study-timer-stats-loading p {
  margin: 0;
}

.study-timer-daily-overview {
  display: grid;
  gap: 18px;
}

.study-timer-daily-total {
  display: grid;
  justify-items: center;
  gap: 7px;
  border-radius: 16px;
  background: linear-gradient(145deg, #edf7ff, #f7fbff);
  padding: 22px 14px;
  text-align: center;
}

.study-timer-daily-total > span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.study-timer-daily-total > strong {
  color: var(--accent-strong);
  font-size: clamp(2rem, 10vw, 2.8rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.study-timer-daily-total p {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.study-timer-daily-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 13px;
  background: #e4ebf2;
}

.study-timer-daily-details > div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  background: #f8fafc;
  padding: 12px 5px;
  text-align: center;
}

.study-timer-daily-details span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.study-timer-daily-details strong {
  max-width: 100%;
  overflow: hidden;
  color: #33465a;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-timer-weekly-chart {
  min-height: 220px;
  display: grid;
  gap: 6px;
  align-items: end;
}

.study-timer-chart-unit {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: right;
}

.study-timer-weekly-bars {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  padding-top: 22px;
}

.study-timer-weekly-day {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr) 18px 16px;
  justify-items: center;
  gap: 3px;
}

.study-timer-weekly-day > time {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-timer-weekly-bar-track {
  position: relative;
  width: min(28px, 70%);
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: end;
  border-radius: 8px 8px 4px 4px;
  background: #eff3f7;
}

.study-timer-weekly-bar-track i {
  width: 100%;
  display: block;
  border-radius: inherit;
  background: #d5e0e9;
  transition: height 240ms ease-out;
}

.study-timer-weekly-day.studied .study-timer-weekly-bar-track i {
  background: linear-gradient(180deg, #45a9d0, var(--accent));
}

.study-timer-weekly-day > strong {
  color: #516174;
  font-size: 0.68rem;
}

.study-timer-weekly-day > small {
  color: #98a4b1;
  font-size: 0.6rem;
}

.study-timer-monthly-calendar {
  display: grid;
  gap: 8px;
}

.study-timer-monthly-weekdays,
.study-timer-monthly-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.study-timer-monthly-weekdays span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  text-align: center;
}

.study-timer-monthly-day {
  min-width: 0;
  aspect-ratio: 1 / 1.08;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f5f7;
  color: #718093;
}

.study-timer-monthly-day.blank {
  visibility: hidden;
}

.study-timer-monthly-day strong {
  font-size: 0.68rem;
}

.study-timer-monthly-day time {
  max-width: calc(100% - 3px);
  overflow: hidden;
  font-size: 0.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-timer-monthly-day.level-1,
.study-timer-monthly-legend i.level-1 {
  background: #dceefa;
  color: #386d92;
}

.study-timer-monthly-day.level-2,
.study-timer-monthly-legend i.level-2 {
  background: #add8ef;
  color: #174f77;
}

.study-timer-monthly-day.level-3,
.study-timer-monthly-legend i.level-3 {
  background: #5daed4;
  color: #fff;
}

.study-timer-monthly-day.level-4,
.study-timer-monthly-legend i.level-4 {
  background: var(--accent);
  color: #fff;
}

.study-timer-monthly-day.today {
  border-color: #f0a73b;
  box-shadow: inset 0 0 0 1px #f0a73b;
}

.study-timer-monthly-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 2px;
}

.study-timer-monthly-legend span {
  margin-inline: 3px;
  color: var(--muted);
  font-size: 0.56rem;
}

.study-timer-monthly-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #f3f5f7;
}

.study-timer-stats-summary {
  display: grid;
  gap: 14px;
  padding: 17px 15px;
}

.study-timer-stats-summary-head,
.study-timer-subject-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.study-timer-stats-summary-head > span,
.study-timer-subject-stats-head > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.study-timer-stats-summary-head > strong {
  color: #42556a;
  font-size: 0.76rem;
}

.study-timer-stats-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.study-timer-stats-summary-grid > div {
  display: grid;
  gap: 5px;
  border-radius: 13px;
  background: #f5f8fb;
  padding: 13px;
}

.study-timer-stats-summary-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.study-timer-stats-summary-grid strong {
  color: var(--accent-strong);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.study-timer-subject-stats {
  display: grid;
  gap: 12px;
  padding: 17px 15px;
}

.study-timer-subject-stats-head > strong {
  font-size: 0.92rem;
}

.study-timer-subject-stats-list {
  display: grid;
  gap: 12px;
}

.study-timer-subject-stats-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 9px minmax(70px, auto) minmax(50px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.study-timer-subject-stats-list article > strong {
  max-width: 100px;
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-timer-subject-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.study-timer-subject-stat-dot.tone-1 {
  background: #8d77c9;
}

.study-timer-subject-stat-dot.tone-2 {
  background: #45aca9;
}

.study-timer-subject-stat-dot.tone-3 {
  background: #eaaa47;
}

.study-timer-subject-stat-dot.tone-4 {
  background: #cf6f83;
}

.study-timer-subject-stat-dot.tone-5 {
  background: #52b99c;
}

.study-timer-subject-stat-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.study-timer-subject-stat-bar i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #5daed4, var(--accent));
}

.study-timer-subject-stats-list time {
  color: #42556a;
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-timer-stats-note {
  margin: -2px 8px 2px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
  text-align: center;
}

.student-study-character-page {
  display: grid;
  gap: 12px;
}

.study-character-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}

.study-character-back-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #d7e2ee;
  border-radius: 999px;
  background: #fff;
  color: #36546f;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(39, 65, 91, 0.06);
}

.study-character-back-button:hover,
.study-character-back-button:focus-visible {
  border-color: #9fc3e7;
  color: var(--accent-strong);
}

.study-character-preview-card,
.study-character-options-card {
  border-radius: 18px;
  background: #fff;
}

.study-character-preview-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 282px;
  align-content: center;
  padding: 22px 18px;
  text-align: center;
}

.study-character-preview-card > span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.study-character-preview-avatar {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 210px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding-top: 0;
}

.study-character-preview-avatar.has-status-message {
  height: auto;
  min-height: 238px;
  padding-top: 0;
}

.study-character-seat-detail-button {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.study-character-seat-detail-button:hover {
  background: rgba(225, 241, 249, 0.16);
}

.study-character-seat-detail-button:focus-visible {
  outline: 3px solid rgba(31, 111, 176, 0.32);
  outline-offset: 2px;
}

.study-character-preview-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.study-character-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.study-character-name-edit-button {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #d8e5f1;
  border-radius: 9px;
  background: #f5f9fd;
  color: var(--accent-strong);
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.study-character-name-edit-button span {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.study-character-name-edit-button:hover,
.study-character-name-edit-button:focus-visible {
  border-color: #89bde3;
  background: #e9f5ff;
  outline: none;
}

.study-character-name-edit-button:active {
  transform: scale(0.94);
}

.study-character-preview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.study-character-status-message {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 4;
  width: max-content;
  max-width: min(calc(100% - 24px), 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #dbe9f5;
  border-radius: 13px;
  background: #f7fbff;
  color: #244d70;
  padding: 9px 11px;
  text-align: left;
  transform: translateX(-50%);
}

.study-character-status-message::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #dbe9f5;
  border-bottom: 1px solid #dbe9f5;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.study-character-status-message span {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.45;
}

.study-character-status-message:hover,
.study-character-status-message:focus-visible {
  border-color: #8dc0e5;
  background: #edf7ff;
  outline: none;
}

.study-character-status-empty-button {
  border: 1px solid #d8e5f1;
  border-radius: 999px;
  background: #f5f9fd;
  color: var(--accent-strong);
  padding: 7px 11px;
  font-size: 0.72rem;
  font-weight: 900;
}

.study-character-status-empty-button:hover,
.study-character-status-empty-button:focus-visible {
  border-color: #89bde3;
  background: #e9f5ff;
  outline: none;
}

.study-character-options-card {
  display: grid;
  gap: 13px;
  padding: 17px 15px;
}

.study-character-nickname-modal-content {
  display: grid;
  gap: 12px;
}

.study-character-status-modal-content {
  display: grid;
  gap: 10px;
}

.study-character-status-modal-content > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.study-character-status-input {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid #ccddeb;
  border-radius: 12px;
  background: #fbfdff;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  line-height: 1.5;
}

.study-character-status-input:focus {
  border-color: #6aaedf;
  box-shadow: 0 0 0 3px rgba(30, 125, 192, 0.12);
  outline: none;
}

.study-character-status-meta,
.study-character-status-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.study-character-status-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.study-character-status-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.info-modal-panel.study-character-status-modal > .btn.secondary:last-child {
  display: none;
}

.study-character-status-feedback {
  margin: 0;
  color: #b3261e;
  font-size: 0.78rem;
  font-weight: 800;
}

.info-modal:has(.study-character-nickname-modal) {
  align-items: start;
  overflow-y: auto;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.study-character-nickname-modal {
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.study-character-nickname-modal-content > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.study-character-nickname-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.study-character-nickname-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d7e2ee;
  border-radius: 12px;
  background: #f8fbfe;
  padding: 0 13px;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  outline: none;
}

.study-character-nickname-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(7, 93, 164, 0.12);
}

.study-character-nickname-input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(185, 56, 56, 0.12);
}

.study-character-nickname-save {
  min-width: 68px;
  min-height: 42px;
  margin: 0;
  padding-inline: 14px;
}

.study-character-nickname-modal-content > small {
  display: block;
  margin: -4px 1px 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.study-character-nickname-feedback {
  margin: -4px 1px 0 !important;
  border-radius: 9px;
  background: #fff1f0;
  color: var(--danger) !important;
  padding: 8px 10px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.4 !important;
}

.study-character-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.study-character-options-head strong {
  font-size: 0.98rem;
}

.study-character-options-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.study-character-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.study-character-option {
  position: relative;
  min-height: 94px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid #e2e9f0;
  border-radius: 13px;
  background: #f8fafc;
  padding: 9px 5px;
  color: var(--ink);
}

.study-cafe-avatar-hair.is-custom {
  left: 0;
  top: 0;
  width: 48px;
  height: 66px;
  border-radius: 0;
  background: none;
  overflow: visible;
}

.study-character-hair-card {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  scroll-margin-block: 12px calc(var(--student-content-bottom, 110px) + 12px);
}

.study-character-hair-card .study-character-options-head {
  flex-wrap: wrap;
}

.study-character-hair-grid {
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 88px), 1fr));
}

.study-character-hair-sample {
  position: relative;
  width: 100%;
  max-width: 76px;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: #eef3f7;
}

.study-character-hair-sample .study-cafe-avatar {
  top: 3px;
  transform: translateX(-50%) scale(1.55);
}

.study-character-hair-sample .study-cafe-avatar > * {
  animation: none;
}

.study-character-hair-option {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  min-height: 125px;
  padding-top: 18px;
}

.study-character-hair-option > strong {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Keep the inactive footer's slide offset from widening the character page. */
body.student-online-mode:has(.student-study-character-page) .student-footer-menu {
  transform: translateX(-50%);
}

@media (max-width: 359px) {
  body.student-online-mode:has(.student-study-character-page) .online-student-header {
    gap: 8px;
  }

  body.student-online-mode:has(.student-study-character-page) .online-student-logo {
    min-width: 0;
    font-size: clamp(.72rem, 3.8vw, .84rem);
  }

  body.student-online-mode:has(.student-study-character-page) .online-student-header-actions {
    gap: 6px;
  }
}

.study-character-hair-option:disabled { cursor: wait; opacity: .65; }
.study-character-hair-option:focus-visible { outline: 3px solid #429ace; outline-offset: 2px; }
.study-character-hair-hint { margin: 12px 0 0; font-size: .72rem; line-height: 1.65; color: var(--muted); }

.study-character-option.active {
  border-color: #68ace0;
  background: #edf7ff;
  box-shadow: inset 0 0 0 2px #b9dcf5;
}

.study-character-color {
  width: 34px;
  height: 34px;
  border: 4px solid #fff;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 4px 10px rgba(34, 47, 62, 0.12);
}

.study-character-color.blue {
  background: #5d95d4;
}

.study-character-color.mint {
  background: #52b99c;
}

.study-character-color.purple {
  background: #8d77c9;
}

.study-character-color.orange {
  background: #df8a4b;
}

.study-character-color.rose {
  background: #cf6f83;
}

.study-character-option > strong {
  font-size: 0.72rem;
}

.study-character-option > span:last-child:not(.study-character-color) {
  position: absolute;
  right: 5px;
  top: 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 2px 5px;
  font-size: 0.52rem;
  font-weight: 900;
}

.study-character-footnote {
  margin: 0;
  padding: 0 10px 5px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

.student-study-ranking-page {
  display: grid;
  gap: 12px;
}

.study-ranking-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  background: #fff;
  padding: 13px 14px;
}

.study-ranking-page-head > div {
  text-align: center;
}

.study-ranking-back-button {
  justify-self: start;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.study-ranking-back-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.study-ranking-page-head > div span {
  display: block;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.study-ranking-page-head h2 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.study-ranking-my-chip {
  justify-self: end;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 7px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.study-ranking-period-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 16px;
  background: #fff;
  padding: 5px;
}

.study-ranking-period-button {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.study-ranking-period-button.active {
  background: #edf7ff;
  color: var(--accent-strong);
}

.study-ranking-period-button.active::after {
  content: "";
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: 4px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent);
}

.study-ranking-date-bar {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  border-radius: 16px;
  background: #fff;
  padding: 7px 10px;
  text-align: center;
}

.study-ranking-date-bar strong {
  font-size: 0.98rem;
}

.study-ranking-date-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #f3f7fb;
  color: var(--accent-strong);
  font-size: 1.4rem;
  font-weight: 700;
}

.study-ranking-date-button:disabled {
  opacity: 0.3;
}

.study-ranking-podium-section,
.study-ranking-list-card {
  display: grid;
  gap: 15px;
  border-radius: 18px;
  background: #fff;
  padding: 17px 15px;
}

.study-ranking-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.study-ranking-section-title strong {
  font-size: 0.98rem;
}

.study-ranking-section-title span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.study-ranking-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 7px;
  min-height: 190px;
  padding-top: 13px;
}

.study-ranking-podium-card {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 5px;
  border-radius: 16px 16px 9px 9px;
  background: #f6f8fb;
  padding: 12px 5px 11px;
}

.study-ranking-podium-card.rank-1 {
  min-height: 178px;
  background: linear-gradient(180deg, #fff9e7, #fff2be);
  box-shadow: inset 0 0 0 2px #f2cf5c;
}

.study-ranking-podium-card.rank-2 {
  min-height: 150px;
  background: linear-gradient(180deg, #f9fafc, #e8edf3);
}

.study-ranking-podium-card.rank-3 {
  min-height: 138px;
  background: linear-gradient(180deg, #fff7f1, #f4d4bc);
}

.study-ranking-medal {
  position: absolute;
  left: 50%;
  top: -17px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #cfd5dc;
  color: #5d6570;
  box-shadow: 0 6px 14px rgba(34, 47, 62, 0.14);
  transform: translateX(-50%);
}

.study-ranking-medal i::before,
.study-ranking-medal i::after {
  content: "";
  position: absolute;
  top: -16px;
  width: 10px;
  height: 20px;
  background: #cfd5dc;
  clip-path: polygon(0 0, 100% 0, 75% 100%, 25% 100%);
}

.study-ranking-medal i::before {
  left: 5px;
  transform: rotate(-12deg);
}

.study-ranking-medal i::after {
  right: 5px;
  transform: rotate(12deg);
}

.rank-1 .study-ranking-medal,
.rank-1 .study-ranking-medal i::before,
.rank-1 .study-ranking-medal i::after {
  background: #f3c73e;
  color: #6d5200;
}

.rank-3 .study-ranking-medal,
.rank-3 .study-ranking-medal i::before,
.rank-3 .study-ranking-medal i::after {
  background: #d98f5e;
  color: #6d351b;
}

.study-ranking-avatar {
  position: relative;
  width: 48px;
  height: 62px;
  margin-top: 17px;
}

.study-ranking-avatar .body {
  position: absolute;
  left: 9px;
  bottom: 0;
  width: 30px;
  height: 31px;
  border-radius: 12px 12px 8px 8px;
  background: #5d95d4;
}

.study-ranking-avatar .face {
  position: absolute;
  left: 12px;
  top: 11px;
  z-index: 2;
  width: 24px;
  height: 27px;
  border-radius: 44% 44% 48% 48%;
  background:
    radial-gradient(circle at 8px 14px, #4a3d36 0 1px, transparent 2px),
    radial-gradient(circle at 17px 14px, #4a3d36 0 1px, transparent 2px),
    #ffd7ba;
}

.study-ranking-avatar .hair {
  position: absolute;
  left: 10px;
  top: 6px;
  z-index: 3;
  width: 28px;
  height: 17px;
  border-radius: 15px 15px 7px 7px;
  background: #2e3642;
}

.study-ranking-avatar.mint .body,
.study-ranking-list-avatar.mint {
  background: #52b99c;
}

.study-ranking-avatar.purple .body,
.study-ranking-list-avatar.purple {
  background: #8d77c9;
}

.study-ranking-avatar.orange .body,
.study-ranking-list-avatar.orange {
  background: #df8a4b;
}

.study-ranking-avatar.rose .body,
.study-ranking-list-avatar.rose {
  background: #cf6f83;
}

.study-ranking-avatar.navy .body,
.study-ranking-list-avatar.navy {
  background: var(--accent);
}

.study-ranking-podium-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-ranking-podium-card time {
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-ranking-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 16px;
  background: #dfe8f2;
}

.study-ranking-summary > div {
  display: grid;
  justify-items: center;
  gap: 4px;
  background: #fff;
  padding: 12px 5px;
  text-align: center;
}

.study-ranking-summary span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
}

.study-ranking-summary strong {
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.study-ranking-list {
  display: grid;
  gap: 8px;
}

.study-ranking-row {
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 62px;
  border: 1px solid #edf1f5;
  border-radius: 13px;
  background: #fff;
  padding: 8px 10px;
}

.study-ranking-row.mine {
  border-color: #8dc2eb;
  background: #edf7ff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.study-ranking-number {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid #dbe4ed;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.study-ranking-number.rank-1 {
  border-color: #e2ba36;
  background: #fff4c7;
  color: #7c5c00;
}

.study-ranking-number.rank-2 {
  background: #eef1f5;
}

.study-ranking-number.rank-3 {
  border-color: #d9a17e;
  background: #ffeadb;
  color: #7c4125;
}

.study-ranking-list-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 3px solid #fff;
  border-radius: 13px;
  background: #5d95d4;
  color: #fff;
  box-shadow: 0 3px 9px rgba(34, 47, 62, 0.12);
  font-size: 0.78rem;
  font-weight: 900;
}

.study-ranking-row-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.study-ranking-row-main > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.study-ranking-row-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-ranking-row-main > div span {
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 2px 5px;
  font-size: 0.56rem;
  font-weight: 900;
}

.study-ranking-row-main time {
  margin-left: auto;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-ranking-progress {
  display: block;
  overflow: hidden;
  height: 6px;
  border-radius: 99px;
  background: #e8edf2;
}

.study-ranking-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #075da4, #38a7c9);
}

.study-ranking-row.mine .study-ranking-progress i {
  background: linear-gradient(90deg, #06386f, #075da4);
}

.study-ranking-footnote {
  margin: 0;
  padding: 0 10px 6px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
  text-align: center;
}

.study-cafe-room {
  --room-border: #91b5bd;
  --room-floor: #dcebed;
  --room-grid: rgba(48, 94, 108, 0.075);
  --room-toolbar: rgba(247, 251, 252, 0.98);
  --room-ink: #173a46;
  --room-muted: #4e6d79;
  --room-accent: #347a78;
  --room-accent-soft: #d8eae9;
  --room-button: #477f8c;
  --room-button-hover: #3b6f7b;
  --room-seat: rgba(248, 252, 252, 0.88);
  --room-desk: #6b4b38;
  --room-desk-top: #81604a;
  --room-desk-edge: #463225;
  --room-chair-border: #4a7486;
  --room-chair-top: #6a96a5;
  --room-chair-bottom: #3d6679;
  position: relative;
  overflow: hidden;
  border: 5px solid var(--room-border);
  border-radius: 22px;
  background:
    linear-gradient(90deg, var(--room-grid) 1px, transparent 1px),
    linear-gradient(var(--room-grid) 1px, transparent 1px),
    var(--room-floor);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78), 0 10px 28px rgba(20, 55, 70, 0.14);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.study-cafe-room.theme-dawn {
  --room-border: #9ab8c4;
  --room-floor: #e1ebf1;
  --room-grid: rgba(54, 88, 111, 0.07);
  --room-toolbar: rgba(248, 251, 253, 0.98);
  --room-ink: #193848;
  --room-muted: #526c7a;
  --room-accent: #3f797f;
  --room-accent-soft: #dce9eb;
  --room-button: #4b7f8e;
  --room-button-hover: #3e6f7d;
  --room-seat: rgba(250, 252, 253, 0.9);
  --room-desk: #6b4b38;
  --room-desk-top: #81604a;
  --room-desk-edge: #463225;
  --room-chair-border: #507a92;
  --room-chair-top: #709aae;
  --room-chair-bottom: #426b83;
}

.study-cafe-room.theme-forest {
  --room-border: #b9c2b2;
  --room-floor: #edf0e9;
  --room-grid: rgba(75, 91, 69, 0.05);
  --room-glow: rgba(250, 252, 246, 0.76);
  --room-toolbar: rgba(248, 250, 246, 0.96);
  --room-ink: #424c3f;
  --room-muted: #697364;
  --room-accent: #687a61;
  --room-accent-soft: #e0e6dc;
  --room-seat: rgba(255, 255, 252, 0.56);
  --room-desk: #a28a68;
  --room-desk-top: #baa17d;
  --room-desk-edge: #76664f;
  --room-chair-border: #79816e;
  --room-chair-top: #e9eadf;
  --room-chair-bottom: #c6cbb8;
}

.study-cafe-room.theme-classic {
  --room-border: #c5b6b0;
  --room-floor: #f0ebe8;
  --room-grid: rgba(96, 73, 68, 0.05);
  --room-glow: rgba(255, 251, 248, 0.76);
  --room-toolbar: rgba(251, 248, 246, 0.96);
  --room-ink: #504542;
  --room-muted: #746965;
  --room-accent: #7f655f;
  --room-accent-soft: #e9dfdc;
  --room-seat: rgba(255, 253, 252, 0.56);
  --room-desk: #a7856d;
  --room-desk-top: #bea08a;
  --room-desk-edge: #796052;
  --room-chair-border: #88756f;
  --room-chair-top: #ede6e2;
  --room-chair-bottom: #cfbdb6;
}

.study-cafe-room.theme-night {
  --room-border: #aab4c0;
  --room-floor: #e7ebef;
  --room-grid: rgba(55, 70, 88, 0.052);
  --room-glow: rgba(246, 249, 252, 0.76);
  --room-toolbar: rgba(245, 248, 250, 0.96);
  --room-ink: #3b4654;
  --room-muted: #64707e;
  --room-accent: #5b6d80;
  --room-accent-soft: #dce2e8;
  --room-seat: rgba(252, 253, 255, 0.57);
  --room-desk: #958474;
  --room-desk-top: #ad9b8a;
  --room-desk-edge: #6c6056;
  --room-chair-border: #707b88;
  --room-chair-top: #e5e9ed;
  --room-chair-bottom: #bec6cf;
}

.study-cafe-room .study-cafe-my-seat-card {
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 96px;
  margin: 8px 8px 2px;
  padding: 8px;
  border-radius: 14px;
  border-color: #9abac1;
  background: #edf6f7;
  box-shadow: 0 8px 20px rgba(36, 76, 89, 0.12);
}

.study-cafe-room .study-cafe-my-seat-card::after {
  display: none;
}

.study-cafe-room .study-cafe-my-seat-character {
  grid-column: 1;
  width: 100%;
  height: 72px;
  aspect-ratio: auto;
  justify-self: stretch;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--room-accent) 16%, transparent);
}

.study-cafe-room .study-cafe-my-seat-scene {
  inset: auto;
  left: 50%;
  bottom: 0;
  width: 78px;
  height: 122px;
  margin: 0;
  transform: translateX(-50%) scale(.72);
  transform-origin: center bottom;
}

.study-cafe-room .study-cafe-my-seat-copy {
  grid-column: 2;
  gap: 3px;
  padding-right: 0;
}

.study-cafe-room .study-cafe-my-seat-title {
  gap: 4px;
  padding-right: 0;
}

.study-cafe-room .study-cafe-my-seat-title > strong {
  font-size: .88rem;
}

.study-cafe-room .study-cafe-my-seat-eyebrow {
  font-size: .6rem;
}

.study-cafe-room .study-cafe-my-seat-status {
  padding: 2px 4px;
  font-size: .56rem;
}

.study-cafe-room .study-cafe-my-seat-copy p,
.study-cafe-room .study-cafe-my-seat-detail > span {
  font-size: .66rem;
}

.study-cafe-room .study-cafe-my-seat-detail {
  margin-top: 0;
}

.study-cafe-room .study-cafe-my-seat-actions {
  position: static;
  grid-column: 3;
  align-self: stretch;
  gap: 6px;
}

.study-cafe-room .study-cafe-my-seat-actions time {
  padding: 4px 6px;
  font-size: .76rem;
}

.study-cafe-room .study-cafe-my-seat-fullscreen-button {
  min-height: 30px;
  padding: 5px 6px;
  border-radius: 8px;
  font-size: .6rem;
}

.study-cafe-room .study-cafe-my-seat-idle-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.study-cafe-room .study-cafe-my-seat-idle-buttons > button {
  min-width: 0;
  min-height: 28px;
  margin-top: 0;
  padding: 4px 6px;
  font-size: .64rem;
}

.study-cafe-room .study-cafe-my-seat-eyebrow,
.study-cafe-room .study-cafe-my-seat-actions time {
  color: var(--room-accent);
}

.study-cafe-room .study-cafe-my-seat-subject-button {
  background: var(--room-button);
  color: #fff;
}

.study-cafe-room .study-cafe-my-seat-title > strong {
  color: var(--room-ink);
}

.study-cafe-room .study-cafe-my-seat-copy p {
  color: #58717d;
}

.study-cafe-room .study-cafe-my-seat-copy p strong {
  color: var(--room-ink);
}

.study-cafe-room .study-cafe-my-seat-detail > span {
  color: #607985;
}

.study-cafe-room .study-cafe-my-seat-actions time {
  background: #dcebed;
  color: var(--room-ink);
}

.study-cafe-room .study-cafe-my-seat-release-button,
.study-cafe-room .study-cafe-my-seat-fullscreen-button {
  border-color: var(--room-button);
  background: var(--room-button);
  color: #fff;
  box-shadow: none;
}

.study-cafe-room .study-cafe-my-seat-fullscreen-button:hover,
.study-cafe-room .study-cafe-my-seat-fullscreen-button:focus-visible {
  background: var(--room-button-hover);
  color: #fff;
}

.study-cafe-room .study-room-open-button,
.study-cafe-room .study-room-return-button {
  border-color: var(--room-button);
  background: var(--room-button);
  color: #fff;
}

.study-cafe-room .study-cafe-seat.mine {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 3px #6ca6a3, 0 5px 14px rgba(43, 93, 99, 0.14);
}

.study-cafe-room[data-study-cafe-room="true"] .study-cafe-seat.mine {
  box-shadow: inset 0 0 0 3px #499c99, 0 4px 12px rgba(43, 93, 99, 0.12);
}

.study-cafe-room .study-cafe-seat.mine .study-cafe-seat-number,
.study-cafe-room .study-cafe-seat.mine .study-cafe-seat-name,
.study-cafe-room .study-cafe-seat.mine .study-cafe-member-time {
  background: var(--room-button);
}

.study-cafe-room[data-study-cafe-room="true"] .study-cafe-seat.mine .study-cafe-member-time {
  background: #e7f3f2;
  color: #174d50;
}

.study-cafe-room .study-cafe-seat.empty {
  border-color: color-mix(in srgb, var(--room-accent) 25%, transparent);
}

.study-cafe-room .study-cafe-seat.empty:hover,
.study-cafe-room .study-cafe-seat.empty:focus-visible {
  outline-color: color-mix(in srgb, var(--room-accent) 22%, transparent);
}

.study-cafe-room .study-cafe-desk {
  background: var(--room-desk);
  box-shadow:
    inset 0 4px 0 var(--room-desk-top),
    0 7px 0 var(--room-desk-edge);
}

.study-cafe-room .study-cafe-chair-back {
  border-color: var(--room-chair-border);
  background: linear-gradient(180deg, var(--room-chair-top), var(--room-chair-bottom));
}

.study-cafe-room-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  border-bottom: 3px solid var(--room-border);
  background: var(--room-toolbar);
  padding: 9px 10px;
}

.study-cafe-room-identity {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.study-cafe-room-identity > strong {
  min-width: 0;
  color: var(--room-ink);
  font-size: 0.78rem;
  letter-spacing: 0.025em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.study-cafe-room-identity-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.study-cafe-room-mood {
  overflow: hidden;
  color: var(--room-accent);
  font-size: 0.58rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-room.ranking-room .study-cafe-room-identity-meta {
  display: none;
}

.study-cafe-ranking-help-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #a1b4ba;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.study-cafe-ranking-help-button:hover {
  background: var(--room-accent-soft);
}

.study-cafe-ranking-help-button[hidden] {
  display: none;
}

.study-cafe-ranking-help-button:focus-visible {
  outline: 2px solid var(--room-accent);
  outline-offset: -3px;
}

.study-cafe-room-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

@media (max-width: 600px) {
  .study-cafe-room-toolbar {
    gap: 4px;
    padding: 7px 8px;
  }

  .study-cafe-room-identity > strong {
    font-size: clamp(.575rem, 2.72vw, .78rem);
    white-space: nowrap;
    letter-spacing: 0;
  }

  .study-cafe-room-toolbar .study-cafe-room-toolbar-actions {
    min-width: 0;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .study-cafe-room-toolbar .study-cafe-shop-chip {
    min-height: 30px;
    gap: 4px;
    padding: 4px 6px 4px 4px;
  }

  .study-cafe-room-toolbar .study-cafe-shop-chip > span {
    width: 18px;
    height: 18px;
    font-size: .62rem;
  }

  .study-cafe-room-toolbar .study-cafe-shop-chip strong {
    font-size: .66rem;
  }

  .study-cafe-room-toolbar .study-cafe-live-chip {
    min-height: 30px;
    padding: 5px 6px;
    font-size: .6rem;
  }
}

@media (max-width: 359px) {
  .study-cafe-room-toolbar .study-cafe-shop-chip {
    gap: 3px;
    padding-inline: 3px;
  }

  .study-cafe-room-toolbar .study-cafe-shop-chip > span {
    width: 14px;
    height: 14px;
    font-size: .5rem;
  }

  .study-cafe-room-toolbar .study-cafe-shop-chip strong {
    font-size: .56rem;
  }

  .study-cafe-room-toolbar .study-cafe-live-chip {
    padding-inline: 4px;
    font-size: .5rem;
  }
}

.study-cafe-room-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(72, 116, 129, 0.14);
  background: rgba(242, 248, 249, 0.88);
  padding: 10px 13px 8px;
  color: var(--room-muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.study-cafe-room-label-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-room-label-row.actions-only {
  justify-content: flex-start;
  padding-top: 8px;
}

.study-cafe-room.ranking-room .study-cafe-room-label-row {
  padding-right: 0;
}

.study-cafe-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #ebd9d7;
  border-radius: 0;
  background: #fff8f6;
  color: #554345;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.study-cafe-notice-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: #dc3434;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h5l11-5v16L8 15H3V9Zm2 6h4l2 6H7l-2-6Z'/%3E%3Cpath d='M22 9v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h5l11-5v16L8 15H3V9Zm2 6h4l2 6H7l-2-6Z'/%3E%3Cpath d='M22 9v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.study-cafe-notice-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-notice-arrow {
  flex: 0 0 auto;
  color: #ac6464;
  font-size: 1.1rem;
  line-height: 1;
}

.study-cafe-notice:hover,
.study-cafe-notice:active {
  background: #fff0ed;
}

.study-cafe-notice:focus-visible {
  outline: 2px solid #dc3434;
  outline-offset: -3px;
}

.info-modal-panel.study-cafe-feedback-modal {
  width: min(580px, 100%);
  max-height: min(820px, 88dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 20px;
  color: #26343d;
}

.study-cafe-feedback-modal > strong {
  font-size: 1.45rem;
}

.study-cafe-feedback-content,
.study-cafe-feedback-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.study-cafe-feedback-modal .study-cafe-feedback-intro {
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.study-cafe-feedback-identity,
.study-cafe-feedback-editor-actions,
.study-cafe-feedback-list-head,
.study-cafe-feedback-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.study-cafe-feedback-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #118b9c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.study-cafe-feedback-item:nth-child(even) .study-cafe-feedback-avatar {
  background: #8b68be;
}

.study-cafe-feedback-author {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid #e2e5e9;
  border-radius: 999px;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.study-cafe-feedback-editor {
  border: 1px solid #dfe3e7;
  border-radius: 18px;
  padding: 12px;
}

.study-cafe-feedback-editor:focus-within {
  border-color: #488996;
  box-shadow: 0 0 0 2px #48899618;
}

.study-cafe-feedback-input {
  display: block;
  width: 100%;
  min-height: 100px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  background: #fff;
  color: #26343d;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
}

.study-cafe-feedback-editor-actions,
.study-cafe-feedback-list-head {
  justify-content: space-between;
}

.study-cafe-feedback-counter,
.study-cafe-feedback-modal .study-cafe-feedback-sharing,
.study-cafe-feedback-item-meta time {
  color: #7b858d;
  font-size: 0.7rem;
}

.study-cafe-feedback-private-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.study-cafe-feedback-private-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #327887;
}

.study-cafe-feedback-form > .study-cafe-feedback-editor > .study-cafe-feedback-editor-actions {
  flex-wrap: wrap;
}

.study-cafe-feedback-submit-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.study-cafe-feedback-submit-controls .study-cafe-feedback-private-toggle {
  gap: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.study-cafe-feedback-submit-controls .study-cafe-feedback-submit {
  flex-shrink: 0;
}

.study-cafe-feedback-private-badge {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f2eaf8;
  color: #705183;
  font-size: 0.68rem;
  font-weight: 700;
}

.study-cafe-feedback-admin-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.study-cafe-feedback-admin-entry h3 { margin: 0 0 6px; }
.study-cafe-feedback-admin-entry p { margin: 0; color: var(--muted); }

.study-cafe-feedback-reply-submit,
.study-cafe-feedback-reply-more,
.study-cafe-feedback-submit,
.study-cafe-feedback-more {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #327887;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.study-cafe-feedback-reply-submit:disabled,
.study-cafe-feedback-submit:disabled {
  background: #b1b6ba;
  cursor: default;
}

.study-cafe-feedback-list-head {
  margin-top: 14px;
}

.study-cafe-feedback-list-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.study-cafe-feedback-reply-refresh,
.study-cafe-feedback-text-button {
  min-height: 40px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #527886;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.study-cafe-feedback-modal .study-cafe-feedback-message {
  font-size: 0.8rem;
  color: #55727f;
}

.study-cafe-feedback-message:empty { display: none; }

.study-cafe-feedback-list {
  display: grid;
  gap: 20px;
}

.study-cafe-feedback-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f1f3;
}

.study-cafe-feedback-item-copy {
  min-width: 0;
  flex: 1;
}

.study-cafe-feedback-item-meta {
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 6px;
}

.study-cafe-feedback-item-meta strong {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.study-cafe-feedback-own {
  font-size: 0.65rem;
  color: #327887;
}

.study-cafe-feedback-modal .study-cafe-feedback-body {
  color: #26343d;
  font-size: 0.88rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.study-cafe-feedback-reply-more,
.study-cafe-feedback-more {
  background: #eff5f6;
  color: #327887;
}

.study-cafe-feedback-reply-submit:focus-visible,
.study-cafe-feedback-reply-more:focus-visible,
.study-cafe-feedback-reply-refresh:focus-visible,
.study-cafe-feedback-replies > summary:focus-visible,
.study-cafe-feedback-submit:focus-visible,
.study-cafe-feedback-more:focus-visible,
.study-cafe-feedback-text-button:focus-visible {
  outline: 2px solid #327887;
  outline-offset: 2px;
}

.study-cafe-feedback-replies {
  margin-top: 8px;
  min-width: 0;
}

.study-cafe-feedback-replies > summary {
  width: fit-content;
  padding: 8px 0;
  color: #527886;
  font-size: 0.75rem;
  cursor: pointer;
}

.study-cafe-feedback-reply-content {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.study-cafe-feedback-reply-input {
  display: block;
  flex: 1;
  width: 0;
  min-width: 0;
  min-height: 36px;
  max-height: 180px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #26343d;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
}

.study-cafe-feedback-replies > summary[hidden],
.study-cafe-feedback-reply-head[hidden],
.study-cafe-feedback-reply-form[hidden],
.study-cafe-feedback-reply-list:empty { display: none; }
.study-cafe-feedback-reply-form { display: flex; align-items: flex-end; gap: 6px; padding: 5px; border: 1px solid #e0e8ec; border-radius: 12px; background: #f8fafb; }
.study-cafe-feedback-reply-form:focus-within { border-color: #7daab4; background: #fff; }
.study-cafe-feedback-reply-form .study-cafe-feedback-reply-submit { flex: 0 0 auto; min-width: 44px; min-height: 36px; padding: 6px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; }
.study-cafe-feedback-reply-form .study-cafe-feedback-reply-submit:disabled { color: #8c9ea6; background: transparent; }
.study-cafe-feedback-item-meta > .study-cafe-feedback-delete-actions { margin: 0 0 0 auto; }
.study-cafe-feedback-item-meta .study-cafe-feedback-delete { color: #8b969c; min-height: 28px; padding: 4px; }
.study-cafe-feedback-item-meta .study-cafe-feedback-delete:hover { color: #9b4646; }

.study-cafe-feedback-reply-form .study-cafe-feedback-editor-actions {
  flex-wrap: wrap;
  margin-top: 8px;
}

.study-cafe-feedback-reply-status,
.study-cafe-feedback-reply-form .study-cafe-feedback-sharing {
  font-size: 0.72rem;
  color: #697e89;
}

.study-cafe-feedback-reply-status:empty { display: none; }
.study-cafe-feedback-reply-list { display: grid; gap: 12px; }
.study-cafe-feedback-reply { padding-bottom: 10px; border-bottom: 1px solid #e2ecee; }
.study-cafe-feedback-admin-badge { color: #256d78; font-size: 0.68rem; font-weight: 800; }

.study-cafe-room-label-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.study-cafe-ranking-button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dcc58f;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffdf6 0%, #f5e6bd 100%);
  color: #70490f;
  padding: 3px 8px 3px 4px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
}

.study-cafe-ranking-button-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f3dca5;
  color: #a86b12;
}

.study-cafe-ranking-button-icon .footer-icon {
  flex: 0 0 24px;
  transform: scale(0.68);
}

.study-cafe-ranking-button:active {
  border-color: #c7a85e;
  background: #f5e6bd;
}

.study-cafe-ranking-button:focus-visible {
  outline: 2px solid #a86b12;
  outline-offset: 2px;
}

.study-cafe-room .study-cafe-stats-button {
  padding: 3px 9px;
  white-space: nowrap;
  background: #edf6f7;
  border-color: #adc9cf;
  color: var(--room-ink);
}

.study-cafe-stats-navigation { gap: 6px; }
.study-cafe-stats-navigation .study-cafe-room-label-actions { gap: 5px; }
.study-cafe-stats-navigation .study-cafe-ranking-help-button { flex-shrink: 0; }

.study-cafe-first-use-guide {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 11px 0;
  color: var(--room-muted);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.4;
}

.study-cafe-first-use-guide > span {
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--room-accent-soft);
  color: var(--room-accent);
  font-size: 0.62rem;
  font-weight: 950;
}

.info-modal-panel.study-cafe-ranking-guide-modal {
  width: min(390px, 100%);
  border: 1px solid #ead9b1;
  border-radius: 20px;
  background: linear-gradient(155deg, #fffdf7 0%, #f8f0dc 100%);
}

.study-cafe-ranking-guide-content {
  display: grid;
  gap: 14px;
}

.study-cafe-ranking-guide-summary {
  color: #705a30 !important;
  font-size: 0.82rem;
  font-weight: 750;
}

.study-cafe-ranking-guide-list {
  display: grid;
  gap: 8px;
}

.study-cafe-ranking-guide-list article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(161, 124, 56, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  padding: 11px;
}

.study-cafe-ranking-guide-list article > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #e2bd68, #b88432);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 4px 9px rgba(143, 101, 31, 0.18);
}

.study-cafe-ranking-guide-list article > div {
  display: grid;
  gap: 3px;
}

.study-cafe-ranking-guide-list article strong {
  color: #4f3d1e;
  font-size: 0.78rem;
}

.study-cafe-ranking-guide-list article p {
  color: #796a50;
  font-size: 0.7rem;
  line-height: 1.5;
}

.study-cafe-room-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  border-bottom: 1px solid rgba(72, 116, 129, 0.18);
  background: rgba(242, 248, 249, 0.76);
  padding: 10px;
}

.study-cafe-room-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--room-accent) 32%, white);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
  padding: 7px 2px 5px;
  color: var(--room-muted);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease,
    box-shadow 160ms ease;
}

.study-cafe-room-tab strong {
  font-size: 0.72rem;
  white-space: nowrap;
}

.study-cafe-room-tab.ranking strong {
  font-size: 0.64rem;
}

.study-cafe-room-tab span {
  font-size: 0.55rem;
  font-weight: 800;
  opacity: 0.72;
}

.study-cafe-room-tab i {
  position: absolute;
  top: -7px;
  right: 2px;
  border-radius: 999px;
  background: var(--room-accent);
  padding: 2px 4px;
  color: #fff;
  font-size: 0.43rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.study-cafe-room-tab.active {
  border-color: var(--room-button);
  background: var(--room-button);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 70, 67, 0.24);
}

.study-cafe-seat-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 11px 10px 0;
  color: var(--room-muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.study-cafe-seat-section-head::after {
  content: "";
  min-width: 0;
  height: 1px;
  flex: 1;
  background: rgba(64, 108, 120, 0.32);
}

.study-cafe-power-saving-switch {
  order: 3;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--room-muted, #486c62);
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.study-cafe-power-saving-track {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: #82918c;
}

.study-cafe-power-saving-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.study-cafe-power-saving-switch[aria-checked="true"] .study-cafe-power-saving-track { background: #28785c; }
.study-cafe-power-saving-switch[aria-checked="true"] .study-cafe-power-saving-track::after { transform: translateX(12px); }
.study-cafe-power-saving-switch:focus-visible { outline: 2px solid #28785c; outline-offset: 3px; border-radius: 5px; }
.study-private-room-overview > .study-cafe-power-saving-switch { margin-left: auto; }

/* A static tint dims the app without filtering or animating the whole page. */
@media screen {
  body.study-cafe-power-saving::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .2);
    pointer-events: none;
  }
}

/* Keep the scene and attained fire level visible without continuous motion. */
body.study-cafe-power-saving .study-cafe-seat-visual *,
body.study-cafe-power-saving .study-cafe-seat-visual *::before,
body.study-cafe-power-saving .study-cafe-seat-visual *::after,
body.study-cafe-power-saving .study-cafe-seat-grid,
body.study-cafe-power-saving .study-cafe-floating-action,
body.study-cafe-power-saving .student-study-cafe-page,
body.study-cafe-power-saving .student-study-timer-page {
  animation: none !important;
  transition: none !important;
}

body.study-cafe-power-saving .study-cafe-desk-cup::after { display: none; }

.study-cafe-seat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 7px;
  padding: 8px 9px 14px;
}

.study-cafe-seat-grid.room-changed {
  animation: study-cafe-room-change 180ms ease-out;
}

.study-cafe-seat-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 28px 16px 36px;
  border: 1px solid color-mix(in srgb, var(--room-accent) 16%, transparent);
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 30%, #fff 0%, rgba(255, 255, 255, 0.62) 70%);
  color: var(--room-ink);
  text-align: center;
}

.study-cafe-loading-scene {
  position: relative;
  width: 160px;
  height: 154px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--room-accent-soft) 0%, transparent 70%);
}

.study-cafe-loading-scene > .study-cafe-seat-visual {
  inset: 0;
  width: 160px;
  height: 130px;
  transform: scale(1.2);
  transform-origin: center top;
}

.study-cafe-seat-loading > strong {
  max-width: 270px;
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: keep-all;
}

.study-cafe-seat-loading > p {
  margin: 8px 0 0;
  color: var(--room-ink);
  opacity: 0.75;
  font-size: 0.8rem;
  line-height: 1.6;
  word-break: keep-all;
}

.study-cafe-loading-dots {
  display: flex;
  gap: 7px;
  margin-top: 20px;
}

.study-cafe-loading-dots > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--room-accent);
  animation: study-cafe-loading-dot 1.4s ease-in-out infinite;
}

.study-cafe-loading-dots > i:nth-child(2) { animation-delay: 0.16s; }
.study-cafe-loading-dots > i:nth-child(3) { animation-delay: 0.32s; }
.study-cafe-seat-loading > button { margin-top: 20px; }

@keyframes study-cafe-loading-dot {
  0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-4px); }
}

body.study-cafe-power-saving .study-cafe-loading-dots > i { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .study-cafe-loading-dots > i { animation: none; }
}

.study-cafe-seat-grid.ranking-updated {
  animation: study-cafe-ranking-update 220ms ease-out;
}

@keyframes study-cafe-room-change {
  from {
    opacity: 0.55;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes study-cafe-ranking-update {
  from {
    opacity: 0.72;
  }
  to {
    opacity: 1;
  }
}

.study-cafe-seat {
  position: relative;
  min-height: 122px;
  overflow: visible;
  border: 0;
  border-radius: 13px;
  background: var(--room-seat);
  color: var(--room-ink);
  padding: 8px 5px 5px;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.study-cafe-seat:active {
  transform: scale(0.98);
}

.study-cafe-seat.empty {
  border: 2px dashed color-mix(in srgb, var(--room-accent) 32%, transparent);
  background: rgba(255, 255, 255, 0.46);
}

.study-cafe-seat.empty:hover,
.study-cafe-seat.empty:focus-visible {
  background: color-mix(in srgb, var(--room-accent-soft) 84%, white 16%);
  outline: 3px solid color-mix(in srgb, var(--room-accent) 24%, transparent);
}

.study-cafe-room.has-selected-seat .study-cafe-seat:not(.mine) {
  box-shadow: none;
}

.study-cafe-room.has-selected-seat .study-cafe-seat.empty {
  border-color: color-mix(in srgb, var(--room-accent) 22%, transparent);
  background: rgba(255, 255, 255, 0.34);
}

.study-cafe-room.has-selected-seat .study-cafe-seat.empty:hover,
.study-cafe-room.has-selected-seat .study-cafe-seat.empty:focus-visible {
  background: color-mix(in srgb, var(--room-accent-soft) 78%, white 22%);
}

.study-cafe-room.has-selected-seat .study-cafe-empty-plus {
  min-width: 0;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--room-accent) 24%, transparent);
  background: rgba(255, 255, 255, 0.78);
  color: var(--room-accent);
  padding: 0 6px;
  font-size: 0.54rem;
  box-shadow: none;
}

.study-cafe-seat.mine {
  background: #e9f5ff;
  box-shadow: inset 0 0 0 3px #5aa9df;
}

.study-cafe-seat-number {
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 9;
  min-width: 24px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--room-accent) 72%, #102f4d);
  padding: 3px 4px;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 900;
  text-align: center;
}

.study-cafe-seat.mine .study-cafe-seat-number {
  background: var(--accent-strong);
}

.study-cafe-seat.ranking-seat .study-cafe-seat-number {
  min-width: 30px;
  border-radius: 999px;
  font-size: 0.56rem;
}

.study-cafe-seat.ranking-seat.rank-1 .study-cafe-seat-number {
  background: #c79514;
}

.study-cafe-seat.ranking-seat.rank-2 .study-cafe-seat-number {
  background: #7c8995;
}

.study-cafe-seat.ranking-seat.rank-3 .study-cafe-seat-number {
  background: #a96c3c;
}

.study-cafe-rank-change {
  position: absolute;
  right: 4px;
  top: 29px;
  z-index: 10;
  border-radius: 999px;
  background: #fff;
  padding: 2px 4px;
  font-size: 0.46rem;
  font-weight: 950;
  box-shadow: 0 2px 7px rgba(41, 56, 69, 0.14);
}

.study-cafe-rank-change.up {
  color: #14835b;
}

.study-cafe-rank-change.down {
  color: #7a8794;
}

.study-cafe-seat-name {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 7;
  max-width: calc(100% - 40px);
  overflow: hidden;
  display: grid;
  justify-items: end;
  gap: 1px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: #315b68;
  padding: 3px 4px;
  color: #ffffff;
  text-align: right;
}

.study-cafe-seat-name strong,
.study-cafe-seat-name em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-seat-name strong {
  color: #ffffff;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 900;
}

.study-cafe-seat-name em {
  color: #d8e8ec;
  font-size: 0.45rem;
  font-style: normal;
  font-weight: 800;
}

.study-cafe-seat.mine .study-cafe-seat-name {
  background: var(--accent);
  color: #fff;
}

.study-cafe-seat.mine .study-cafe-seat-name em {
  color: rgba(255, 255, 255, 0.82);
}

.study-cafe-member-time {
  position: absolute;
  left: 4px;
  top: 29px;
  z-index: 8;
  border-radius: 6px;
  background: color-mix(in srgb, var(--room-accent) 24%, white);
  padding: 3px 4px;
  color: #12374a;
  font-size: 0.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(4, 23, 38, 0.18);
}

.study-cafe-seat.mine .study-cafe-member-time {
  background: var(--accent-strong);
}

.study-cafe-seat-pause-icon {
  position: absolute;
  left: 4px;
  top: 50px;
  z-index: 9;
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #f2a93b;
  box-shadow: 0 2px 6px rgba(122, 82, 22, 0.2);
}

.study-cafe-seat-pause-icon::before,
.study-cafe-seat-pause-icon::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 3px;
  height: 7px;
  border-radius: 1px;
  background: #fff;
}

.study-cafe-seat-pause-icon::before {
  left: 4px;
}

.study-cafe-seat-pause-icon::after {
  right: 4px;
}

.study-cafe-avatar {
  position: absolute;
  left: 50%;
  top: 46px;
  z-index: 5;
  width: 48px;
  height: 66px;
  transform: translateX(-50%) scale(0.9);
  transform-origin: center top;
}

/* Keep equipped hats attached to the face throughout the head nod. */
.study-cafe-avatar-head {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 24.5px 24px;
  animation: study-cafe-head-nod 3.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.study-cafe-seat-visual {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  transform: none;
}

.study-cafe-seat-visual.is-idle .study-cafe-avatar-shadow,
.study-cafe-seat-visual.is-idle .study-cafe-avatar-body,
.study-cafe-seat-visual.is-idle .study-cafe-avatar-head,
.study-cafe-seat-visual.is-idle .study-cafe-avatar-face,
.study-cafe-seat-visual.is-idle .study-cafe-avatar-hair,
.study-cafe-seat-visual.is-idle .study-cafe-desk-book,
.study-cafe-seat-visual.is-idle .study-cafe-desk-cup {
  animation: none;
}

.study-cafe-chair-back {
  position: absolute;
  left: 50%;
  top: 72px;
  z-index: 4;
  width: 31px;
  height: 35px;
  border: 2px solid rgba(103, 73, 47, 0.72);
  border-radius: 7px 7px 5px 5px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(126, 91, 58, 0.11) 0 1px,
      transparent 1px 4px
    ),
    linear-gradient(180deg, #f2e4cf, #d9bd98);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.38),
    0 2px 4px rgba(91, 57, 28, 0.14);
  pointer-events: none;
  transform: translateX(-50%);
}

.study-cafe-chair-back::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 6px;
  left: 3px;
  height: 2px;
  border-radius: 999px;
  background: rgba(112, 78, 48, 0.42);
}

.study-cafe-writing-arms {
  position: absolute;
  left: 50%;
  top: 46px;
  z-index: 7;
  width: 48px;
  height: 66px;
  pointer-events: none;
  transform: translateX(-50%) scale(0.9);
  transform-origin: center top;
}

.study-cafe-avatar-shadow {
  position: absolute;
  left: 5px;
  bottom: 0;
  width: 38px;
  height: 10px;
  border-radius: 50%;
  background: rgba(61, 52, 42, 0.16);
  animation: study-cafe-shadow-breathe 2.1s ease-in-out infinite;
}

.study-cafe-avatar-body {
  position: absolute;
  left: 10px;
  top: 32px;
  width: 29px;
  height: 31px;
  border-radius: 12px 12px 9px 9px;
  background: #5d95d4;
  transform-origin: center bottom;
  animation: study-cafe-body-breathe 2.1s ease-in-out infinite;
}

.study-cafe-avatar-face {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 25px;
  height: 28px;
  border-radius: 43% 43% 48% 48%;
  background:
    radial-gradient(circle at 8px 15px, #4a3d36 0 1px, transparent 2px),
    radial-gradient(circle at 17px 15px, #4a3d36 0 1px, transparent 2px),
    #ffd7ba;
  animation: study-cafe-head-nod 3.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.study-cafe-avatar-hair {
  position: absolute;
  left: 10px;
  top: 5px;
  z-index: 2;
  width: 29px;
  height: 18px;
  border-radius: 16px 16px 8px 8px;
  background: #2e3642;
  animation: study-cafe-head-nod 3.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.study-cafe-avatar-arm {
  position: absolute;
  z-index: 4;
  top: 40px;
  width: 8px;
  height: 14px;
  border-radius: 999px;
  background: #ffd7ba;
  transform-origin: top center;
}

.study-cafe-avatar-arm.left {
  left: 8px;
  animation: study-cafe-writing-left 1.35s ease-in-out infinite alternate;
}

.study-cafe-avatar-arm.right {
  right: 7px;
  animation: study-cafe-writing-right 1.2s ease-in-out -0.6s infinite alternate;
}

.study-cafe-seat-visual.is-idle .study-cafe-avatar-arm {
  animation: none;
}

.study-cafe-seat-visual.is-idle .study-cafe-avatar-arm.left {
  transform: rotate(-13deg);
}

.study-cafe-seat-visual.is-idle .study-cafe-avatar-arm.right {
  transform: rotate(13deg);
}

.study-cafe-avatar.mint .study-cafe-avatar-body {
  background: #52b99c;
}

.study-cafe-avatar.purple .study-cafe-avatar-body {
  background: #8d77c9;
}

.study-cafe-avatar.orange .study-cafe-avatar-body {
  background: #df8a4b;
}

.study-cafe-avatar.rose .study-cafe-avatar-body {
  background: #cf6f83;
}

.study-cafe-avatar.navy .study-cafe-avatar-body {
  background: var(--accent);
}

.study-cafe-avatar.shop-outfit-coast-guard-uniform .study-cafe-avatar-body {
  top: 35px;
  z-index: 0;
  border: 1px solid #090d1b;
  background:
    linear-gradient(90deg, transparent 0 45%, #080b14 46% 54%, transparent 55%) 0 0 / 100% 14px no-repeat,
    linear-gradient(145deg, #20283f, #0d1224 72%);
  box-shadow: inset 0 -4px 0 #080b17, inset 0 1px 0 rgba(86, 101, 143, 0.24);
}

.study-cafe-avatar.shop-outfit-coast-guard-uniform .study-cafe-avatar-face {
  z-index: 1;
}

.study-cafe-avatar.shop-outfit-coast-guard-uniform .study-cafe-avatar-body::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 2px;
  width: 25px;
  height: 7px;
  background:
    linear-gradient(90deg, #d6ad3f 0 6px, transparent 6px 19px, #d6ad3f 19px) 0 1px / 100% 2px no-repeat,
    linear-gradient(90deg, #283149 0 7px, transparent 7px 18px, #283149 18px) 0 0 / 100% 4px no-repeat;
}

.study-cafe-avatar.shop-outfit-coast-guard-uniform .study-cafe-avatar-body::after {
  content: none;
}

.study-cafe-avatar.shop-outfit-coast-guard-uniform .study-cafe-avatar-body > b {
  position: absolute;
  z-index: 2;
  display: block;
  box-sizing: border-box;
  pointer-events: none;
}

.study-cafe-uniform-lapels {
  top: 1px;
  left: 5px;
  width: 17px;
  height: 13px;
  background:
    linear-gradient(58deg, transparent 0 45%, #111625 46% 57%, transparent 58%) left / 50% 100% no-repeat,
    linear-gradient(-58deg, transparent 0 45%, #111625 46% 57%, transparent 58%) right / 50% 100% no-repeat;
}

.study-cafe-uniform-insignia {
  top: 7px;
  left: 6px;
  width: 17px;
  height: 4px;
  background:
    radial-gradient(ellipse at 2px 50%, #e2bd4c 0 1.4px, transparent 1.7px),
    radial-gradient(ellipse at 15px 50%, #e2bd4c 0 1.4px, transparent 1.7px);
}

.study-cafe-uniform-nameplate {
  top: 13px;
  left: 3px;
  width: 7px;
  height: 3px;
  border: 1px solid #7b8090;
  background: #090c15;
}

.study-cafe-uniform-ribbons {
  top: 12px;
  right: 2px;
  width: 10px;
  height: 5px;
  border: 1px solid #b2964d;
  background: repeating-linear-gradient(90deg, #c84138 0 1.5px, #e5bd3c 1.5px 3px, #3472a8 3px 4.5px, #4aa27d 4.5px 6px);
}

.study-cafe-uniform-pockets {
  top: 19px;
  left: 2px;
  width: 9px;
  height: 6px;
  border-top: 1px solid #080b16;
  border-bottom: 1px solid #30384c;
  background: #11172a;
  box-shadow: 14px 0 0 -1px #11172a;
}

.study-cafe-uniform-buttons {
  top: 14px;
  left: 13px;
  width: 3px;
  height: 15px;
  background:
    radial-gradient(circle at 50% 2px, #e1bd62 0 1.2px, #8d6b2e 1.4px, transparent 1.7px),
    radial-gradient(circle at 50% 7px, #e1bd62 0 1.2px, #8d6b2e 1.4px, transparent 1.7px),
    radial-gradient(circle at 50% 12px, #e1bd62 0 1.2px, #8d6b2e 1.4px, transparent 1.7px);
}

.study-cafe-uniform-medal {
  top: 19px;
  right: 4px;
  width: 4px;
  height: 6px;
  border: 1px solid #a7a58f;
  border-radius: 50%;
  background: radial-gradient(circle, #b64038 0 1px, #8e9aa0 1.2px 2px, #d5cda8 2.2px);
}

.study-cafe-avatar.shop-outfit-coast-guard-uniform .study-cafe-avatar-arm,
.study-cafe-seat-visual.shop-outfit-coast-guard-uniform .study-cafe-writing-arms .study-cafe-avatar-arm {
  border: 1px solid rgba(4, 7, 16, 0.55);
  background: linear-gradient(180deg, #171e34 0 72%, #ffd7ba 73%);
}

.study-cafe-desk {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 16px;
  z-index: 6;
  height: 18px;
  border-radius: 5px;
  background: #b98d5c;
  box-shadow: inset 0 4px 0 #d2ab7c, 0 7px 0 #856440;
}

.study-cafe-desk-book {
  position: absolute;
  left: 27%;
  top: 5px;
  width: 31px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(90deg, #eaf3ff 48%, #a8b7c8 49% 51%, #fff 52%);
  box-shadow: 0 2px 0 rgba(61, 52, 42, 0.12);
  transform-origin: center bottom;
  animation: study-cafe-book-page 2.8s ease-in-out infinite;
}

.study-cafe-desk-cup {
  position: absolute;
  right: 12%;
  top: 4px;
  width: 12px;
  height: 14px;
  border-radius: 2px 2px 5px 5px;
  background: #eef8fa;
  border: 2px solid #6ca7ac;
}

.study-cafe-desk-cup::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -10px;
  width: 4px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-width: 0 0 0 1px;
  border-radius: 50%;
  animation: study-cafe-cup-steam 2.2s ease-out infinite;
}

.study-cafe-empty-plus {
  position: absolute;
  left: 50%;
  top: 54px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: auto;
  min-width: 54px;
  height: 30px;
  border-radius: 9px;
  background: var(--room-button);
  padding: 0 8px;
  color: #fff;
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 900;
  transform: translateX(-50%);
}

.study-cafe-empty-plus.compact {
  min-width: 0;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--room-accent) 24%, transparent);
  background: rgba(255, 255, 255, 0.78);
  color: var(--room-accent);
  padding: 0 6px;
  font-size: 0.54rem;
}

.study-cafe-seat.empty .study-cafe-desk-book,
.study-cafe-seat.empty .study-cafe-desk-cup {
  display: none;
}

.study-cafe-seat.empty.loading {
  cursor: wait;
  opacity: 0.72;
}

.study-cafe-seat.empty.loading .study-cafe-empty-plus {
  font-size: 0;
}

.study-cafe-seat.empty.loading .study-cafe-empty-plus::after {
  content: "확인 중";
  font-size: 0.62rem;
}

.study-cafe-seat-move-modal {
  width: min(360px, 100%);
}

.study-cafe-seat-move-modal > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.study-cafe-seat-move-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.study-cafe-seat-move-actions .btn {
  width: 100%;
}

.study-cafe-start-guide {
  border: 0;
  border-radius: 18px;
  background: #fff;
  padding: 16px 17px;
}

.study-cafe-start-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.study-cafe-start-guide strong {
  font-size: 1.02rem;
}

.study-cafe-start-guide p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.study-cafe-start-guide > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.study-room-browse-guide {
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  background: color-mix(in srgb, var(--accent-soft) 30%, #fff);
}

.study-room-return-guide-button {
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 10px;
  background: #fff;
  color: var(--accent-strong);
  padding: 7px 11px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.study-cafe-seat.browse-only.empty {
  opacity: 1;
  cursor: not-allowed;
}

.study-cafe-floating-controls {
  --study-cafe-button: #477f8c;
  --study-cafe-button-hover: #3b6f7b;
  --study-cafe-button-soft: #e8f1f3;
  position: fixed;
  inset: 0;
  z-index: 36;
  pointer-events: none;
}

/* Keep every online-student modal on the same muted action palette. */
body.student-online-mode .info-modal {
  --accent: #477f8c;
  --accent-strong: #2d5661;
  --accent-soft: #e8f1f3;
  --surface-soft: #e8f1f3;
  --study-room-modal-action: #477f8c;
  --study-room-modal-action-hover: #3b6f7b;
}

body.student-online-mode .info-modal-panel .btn:not(.secondary):not(.danger) {
  background: #477f8c;
}

body.student-online-mode .info-modal-panel .btn:not(.secondary):not(.danger):hover {
  background: #3b6f7b;
}

body.student-online-mode .info-modal-panel .btn.secondary {
  background: #e8f1f3;
  color: #2d5661;
}

body.student-online-mode .info-modal-panel .btn.secondary:hover {
  background: #dce9ec;
}

body.student-online-mode .info-modal-panel.study-cafe-timer-pause-guide-modal > .btn.secondary {
  background: #477f8c;
  color: #fff;
}

body.student-online-mode .info-modal-panel.study-cafe-timer-pause-guide-modal > .btn.secondary:hover {
  background: #3b6f7b;
}

.study-cafe-floating-controls.open {
  pointer-events: auto;
}

.study-cafe-floating-menu-button {
  position: absolute;
  right: max(18px, calc((100vw - 420px) / 2 + 18px));
  bottom: calc(var(--student-footer-bottom) + 78px);
  width: auto;
  min-width: 104px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 0;
  border-radius: 12px;
  background: var(--study-cafe-button);
  padding: 0 13px;
  color: #fff;
  box-shadow: 0 10px 26px rgba(7, 58, 108, 0.3);
  pointer-events: auto;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.study-cafe-floating-menu-button > span {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.study-cafe-floating-menu-button > small {
  margin-top: 0;
  font-size: 0.66rem;
  font-weight: 900;
}

.study-cafe-floating-controls.open .study-cafe-floating-menu-button {
  background: var(--study-cafe-button-hover);
  box-shadow: 0 8px 22px rgba(24, 48, 70, 0.34);
  transform: scale(0.96);
}

.study-cafe-floating-menu-button:focus-visible {
  outline: 4px solid rgba(79, 165, 225, 0.3);
  outline-offset: 3px;
}

.study-cafe-floating-action-menu {
  position: absolute;
  right: max(18px, calc((100vw - 420px) / 2 + 18px));
  bottom: calc(var(--student-footer-bottom) + 146px);
  display: grid;
  justify-items: end;
  gap: 9px;
}

.study-cafe-floating-action-menu[hidden] {
  display: none;
}

.study-cafe-floating-action {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(47, 129, 120, 0.24);
  border-radius: 12px;
  background: #fff;
  padding: 3px 7px 3px 14px;
  color: var(--study-cafe-button);
  box-shadow: 0 8px 22px rgba(18, 52, 82, 0.2);
  animation: study-cafe-action-rise 180ms ease-out both;
}

.study-cafe-floating-action:nth-child(2) {
  animation-delay: 35ms;
}

.study-cafe-floating-action:nth-child(3) {
  animation-delay: 70ms;
}

.study-cafe-floating-action > strong {
  font-size: 0.76rem;
  white-space: nowrap;
}

.study-cafe-floating-action > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--study-cafe-button-soft);
  color: var(--study-cafe-button);
  font-size: 0.9rem;
  font-weight: 900;
}

.study-cafe-floating-action.stop > span {
  background: var(--study-cafe-button-soft);
  color: var(--study-cafe-button);
}

.study-cafe-floating-action:focus-visible {
  outline: 3px solid rgba(79, 165, 225, 0.3);
  outline-offset: 2px;
}

@keyframes study-cafe-action-rise {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.study-cafe-countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(9, 32, 56, 0.52);
  padding: 24px;
}

.study-cafe-countdown-panel {
  width: min(250px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  padding: 24px 20px 22px;
  color: var(--ink);
  box-shadow: 0 22px 55px rgba(7, 35, 64, 0.24);
  text-align: center;
}

.study-cafe-countdown-panel > span {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.study-cafe-countdown-number {
  display: grid;
  place-items: center;
  width: 112px;
  height: 72px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 3.1rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.study-cafe-countdown-overlay.go .study-cafe-countdown-number {
  width: 112px;
  border-radius: 14px;
  font-size: 1.45rem;
}

.study-cafe-countdown-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.info-modal-panel.study-subject-edit-modal {
  width: min(390px, 100%);
  max-height: min(680px, calc(100dvh - 44px));
  overflow-y: auto;
}

.study-subject-edit-modal > .btn.secondary {
  display: none;
}

.study-subject-editor {
  display: grid;
  gap: 12px;
}

.study-subject-editor > p {
  font-size: 0.78rem;
}

.study-subject-edit-list {
  display: grid;
  gap: 7px;
}

.study-subject-edit-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.study-subject-edit-row.active {
  border-radius: 11px;
  background: #f1f8ff;
  padding: 5px;
}

.study-subject-edit-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf2f7;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.study-subject-edit-row input {
  min-width: 0;
  min-height: 40px;
  border: 1px solid #d8e1ea;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
}

.study-subject-edit-row input:focus {
  border-color: #69a9d8;
  outline: 3px solid rgba(7, 93, 164, 0.12);
}

.study-subject-edit-row input:disabled {
  background: #f3f7fa;
  color: var(--muted);
}

.study-subject-delete-button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: #fff0ee;
  color: #a44c43;
  padding: 7px 9px;
  font-size: 0.68rem;
  font-weight: 900;
}

.study-subject-delete-button:disabled {
  background: #e7f3fb;
  color: var(--accent-strong);
  opacity: 1;
}

.study-subject-add-button {
  min-height: 42px;
  border: 1px dashed #9dbbd2;
  border-radius: 11px;
  background: #f7fbff;
  color: var(--accent-strong);
  font-weight: 900;
}

.study-timer-fullscreen-mode {
  overflow: hidden;
}

html.study-timer-fullscreen-mode {
  scrollbar-gutter: auto;
  background: #071d31;
  color-scheme: dark;
}

.study-timer-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 80;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow-y: auto;
  background:
    radial-gradient(circle at 16% 12%, rgba(47, 156, 214, 0.22) 0 120px, transparent 121px),
    radial-gradient(circle at 90% 85%, rgba(69, 172, 169, 0.16) 0 150px, transparent 151px),
    linear-gradient(160deg, #071d31 0%, #0a2942 58%, #0c3552 100%);
  color: #f2f8fc;
  scrollbar-color: rgba(132, 191, 218, 0.55) transparent;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.study-timer-fullscreen::-webkit-scrollbar-track {
  background: transparent;
}

.study-timer-fullscreen::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(132, 191, 218, 0.55);
  background-clip: padding-box;
}

.study-timer-fullscreen-head {
  width: min(760px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
}

.study-timer-fullscreen-head > div {
  display: grid;
  gap: 3px;
}

.study-timer-fullscreen-head span {
  color: #83d2ee;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.study-timer-fullscreen-head strong {
  color: #f7fbfe;
  font-size: 0.96rem;
}

.study-timer-fullscreen-close {
  min-height: 38px;
  border: 1px solid rgba(202, 229, 242, 0.3);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.09);
  color: #e9f5fb;
  padding: 8px 11px;
  font-size: 0.72rem;
  font-weight: 900;
}

.study-timer-fullscreen-main {
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  margin: 0 auto;
  padding: 34px 0 18px;
  text-align: center;
}

.study-timer-fullscreen-status {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #bdd2df;
  padding: 7px 11px;
  font-size: 0.72rem;
  font-weight: 900;
}

.study-timer-fullscreen-status.running {
  background: rgba(61, 205, 154, 0.16);
  color: #7ce0b9;
}

.study-timer-fullscreen-main h2 {
  max-width: 100%;
  margin: 4px 0 0;
  overflow: hidden;
  color: #f5fbff;
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-timer-fullscreen-clock {
  color: #f8fcff;
  font-size: clamp(4rem, 18vw, 8.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  line-height: 1;
  text-shadow: 0 0 38px rgba(82, 184, 228, 0.2);
}

.study-timer-fullscreen-main > p {
  margin: 0;
  color: #a9c3d3;
  font-size: 0.8rem;
  font-weight: 800;
}

.study-timer-fullscreen-actions {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.study-timer-fullscreen-actions .btn {
  width: 100%;
  min-height: 48px;
  margin: 0;
}

.study-timer-fullscreen-actions .btn.secondary {
  border-color: rgba(202, 229, 242, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #f1f8fc;
}

.study-timer-fullscreen-total {
  min-width: 210px;
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px solid rgba(190, 222, 237, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
}

.study-timer-fullscreen-total span {
  color: #9eb9c9;
  font-size: 0.68rem;
  font-weight: 800;
}

.study-timer-fullscreen-total time {
  color: #f5fbff;
  font-size: 1.12rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 430px) {
  .study-cafe-my-seat-card {
    min-height: 112px;
    padding-block: 8px;
  }

  .study-cafe-my-seat-fullscreen-button {
    width: auto;
    min-height: 32px;
    padding: 6px 9px;
  }

  .study-cafe-my-seat-actions {
    top: 11px;
    right: 14px;
    bottom: 11px;
  }

  .study-cafe-my-seat-title {
    padding-right: 72px;
  }

  .study-cafe-my-seat-idle-buttons {
    gap: 6px;
  }

  .study-cafe-my-seat-title > strong {
    font-size: 1.06rem;
  }

  .study-timer-fullscreen-main {
    padding-top: 26px;
  }

  .study-timer-fullscreen-actions {
    gap: 7px;
  }

  .study-timer-fullscreen-actions .btn {
    padding-inline: 7px;
    font-size: 0.78rem;
  }
}

.study-cafe-subject-picker {
  display: grid;
  gap: 12px;
}

.study-cafe-subject-picker > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.study-cafe-subject-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.study-cafe-subject-option {
  position: relative;
  min-height: 50px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #f7fbff;
  color: var(--accent-strong);
  padding: 10px;
  font-weight: 900;
}

.study-cafe-subject-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px rgba(7, 93, 164, 0.14);
}

.info-modal-panel.study-cafe-todo-redirect-modal {
  width: min(380px, 100%);
}

.study-cafe-todo-redirect {
  display: grid;
  gap: 10px;
}

.study-cafe-todo-redirect-seat {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 6px 9px;
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 900;
}

.study-cafe-todo-redirect > p {
  font-size: 0.84rem;
}

.study-cafe-todo-redirect > p.subtle {
  font-size: 0.72rem;
}

.study-cafe-subject-stop-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #efc8c2;
  border-radius: 12px;
  background: #fff3f1;
  color: #a94339;
  padding: 10px 12px;
  font-weight: 900;
}

.study-cafe-subject-stop-button:focus-visible {
  outline: 3px solid rgba(182, 66, 53, 0.16);
  outline-offset: 2px;
}

.study-cafe-idle-release-notice > p {
  margin: 0;
}

.study-todo-item.pending {
  opacity: 0.72;
}

.study-cafe-subject-option.recent::after {
  content: "최근";
  position: absolute;
  right: 5px;
  top: 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 2px 5px;
  font-size: 0.56rem;
}

.study-cafe-member-detail {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.info-modal-panel.study-cafe-member-modal {
  width: min(390px, 100%);
  border-radius: 22px;
  padding: 20px;
}

.study-cafe-member-avatar-stage {
  position: relative;
  width: 100%;
  min-height: 210px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, transparent 0 72%, rgba(116, 140, 158, 0.12) 72% 73%, transparent 73%),
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96) 0 31%, transparent 32%),
    linear-gradient(145deg, #eaf6ff, #d9edff);
  box-shadow: inset 0 0 0 1px rgba(7, 93, 164, 0.08);
}

.study-cafe-member-seat-scene {
  position: relative;
  width: 126px;
  height: 126px;
  transform: translateY(5px) scale(1.48);
  transform-origin: center center;
}

.study-cafe-member-avatar-stage.has-status-message {
  min-height: 238px;
}

.study-cafe-member-avatar-stage.has-status-message .study-cafe-member-seat-scene {
  transform: translateY(28px) scale(1.48);
}

.study-cafe-member-seat-scene::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -7px;
  height: 16px;
  border-radius: 50%;
  background: rgba(55, 80, 98, 0.14);
  filter: blur(2px);
}

.study-cafe-member-profile {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.study-cafe-member-profile > strong {
  color: #173f64;
  font-size: 1.2rem;
}

.study-cafe-member-profile > span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-member-status-message {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 3;
  width: min(calc(100% - 24px), 320px);
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #dce9f4;
  border-radius: 13px;
  background: #f5faff;
  color: #244d70;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
}

.study-cafe-member-status-message::before {
  content: none;
}

.study-cafe-member-status-message::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #dce9f4;
  border-bottom: 1px solid #dce9f4;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.study-cafe-member-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.study-cafe-member-chips span {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 900;
}

.study-cafe-member-chips .status.studying {
  background: #e5f7ef;
  color: #19734d;
}

.study-cafe-member-chips .status.paused {
  background: #fff0d7;
  color: #9a620c;
}

.study-cafe-member-chips .status.seated {
  background: #e9eef5;
  color: #536579;
}

.study-cafe-member-info-list {
  width: 100%;
  display: grid;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e1ebf5;
  border-radius: 13px;
  background: #e1ebf5;
}

.study-cafe-member-info-list > div {
  min-height: 45px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #f8fbff;
  padding: 10px 12px;
}

.study-cafe-member-info-list dt {
  color: #647589;
  font-size: 0.74rem;
  font-weight: 800;
}

.study-cafe-member-info-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #244563;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-member-info-list time {
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

.student-study-cafe-access-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  border-radius: 18px;
  background: #fff;
  padding: 30px 22px;
  text-align: center;
}

.study-cafe-access-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--accent-soft);
  font-size: 1.8rem;
}

.student-study-cafe-access-card h2 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.student-study-cafe-access-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.student-study-cafe-access-card .btn {
  width: 100%;
}

body.study-timer-fullscreen-mode .student-study-timer-page {
  animation: none;
  transform: none;
}

@keyframes study-cafe-writing-left {
  from {
    transform: rotate(-16deg) translateY(0);
  }
  to {
    transform: rotate(-11deg) translate(1px, 1px);
  }
}

@keyframes study-cafe-writing-right {
  from {
    transform: rotate(16deg) translateY(0);
  }
  to {
    transform: rotate(11deg) translate(-1px, 1px);
  }
}

@keyframes study-cafe-head-nod {
  0%,
  18%,
  100% {
    transform: translateY(0) rotate(0);
  }
  28%,
  42% {
    transform: translateY(2px) rotate(2deg);
  }
  52% {
    transform: translateY(1px) rotate(-1deg);
  }
}

@keyframes study-cafe-body-breathe {
  0%,
  100% {
    transform: translateY(0) scaleX(1);
  }
  50% {
    transform: translateY(1px) scaleX(1.035);
  }
}

@keyframes study-cafe-shadow-breathe {
  0%,
  100% {
    opacity: 0.65;
    transform: scaleX(0.92);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.08);
  }
}

@keyframes study-cafe-book-page {
  0%,
  72%,
  100% {
    transform: perspective(40px) rotateX(0);
  }
  82% {
    transform: perspective(40px) rotateX(13deg) skewX(-2deg);
  }
}

@keyframes study-cafe-cup-steam {
  0% {
    opacity: 0;
    transform: translateY(3px) scale(0.8);
  }
  35% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translate(2px, -7px) scale(1.15);
  }
}

@keyframes study-cafe-focus-glow {
  0%,
  100% {
    transform: scale(0.86);
    opacity: 0.72;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .study-cafe-avatar-arm,
  .study-cafe-avatar-shadow,
  .study-cafe-avatar-body,
  .study-cafe-avatar-head,
  .study-cafe-avatar-face,
  .study-cafe-avatar-hair,
  .study-cafe-desk-book,
  .study-cafe-desk-cup::after,
  .study-cafe-floating-action,
  .study-cafe-countdown-number,
  .study-cafe-seat-grid.room-changed,
  .study-cafe-seat-grid.ranking-updated,
  body.student-study-mode .student-study-todo-page,
  body.student-study-mode .student-study-cafe-page,
  body.student-study-mode .student-study-timer-page,
  body.student-study-mode .student-study-ranking-page,
  body.student-study-mode .student-study-character-page {
    animation: none;
  }

  .study-cafe-footer-menu .footer-icon,
  .study-cafe-footer-menu::before,
  .study-cafe-footer-menu button::after,
  .study-cafe-footer-menu a::after {
    transition: none;
  }

  .student-study-route-enter {
    animation: none;
  }

  .study-cafe-room-tab {
    transition: none;
  }

  .normal-student-footer,
  .study-cafe-footer-menu,
  body.student-study-mode .normal-student-footer,
  body.student-study-mode .study-cafe-footer-menu {
    transition: none;
  }

  .normal-student-footer [data-route="study-cafe"],
  .study-cafe-footer-menu [data-route="study-cafe"] {
    transition: none;
  }

  .study-timer-weekly-bar-track i {
    transition: none;
  }
}

.study-cafe-admin-page {
  gap: 16px;
}

.study-cafe-admin-head,
.study-cafe-admin-section,
.study-cafe-admin-error {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(10, 41, 78, 0.07);
}

.study-cafe-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
}

.study-cafe-admin-head > div:first-child {
  min-width: 0;
}

.study-cafe-admin-head > div:first-child > span {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.study-cafe-admin-head h2 {
  margin: 5px 0 4px;
  font-size: 1.38rem;
}

.study-cafe-admin-head p,
.study-cafe-admin-section-head p,
.study-cafe-admin-error p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.study-cafe-admin-head-actions {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.study-cafe-admin-head-actions > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.study-cafe-admin-head-actions .btn {
  width: auto;
  min-width: 106px;
  margin: 0;
}

.study-cafe-admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.study-cafe-admin-stat {
  min-width: 0;
  display: grid;
  gap: 7px;
  border: 1px solid #dfe9f3;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f4f9fe);
  padding: 16px 18px;
}

.study-cafe-admin-stat > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.study-cafe-admin-stat strong {
  min-width: 0;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 1.42rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-admin-stat small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.study-cafe-admin-section {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.study-cafe-admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.study-cafe-admin-section-head h3 {
  margin: 0 0 3px;
  font-size: 1.06rem;
}

.study-cafe-admin-section-head p {
  font-size: 0.82rem;
}

.study-cafe-admin-section-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.study-cafe-admin-room-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid #dce7f1;
  border-radius: 14px;
  background: #f3f7fb;
}

.study-cafe-admin-room-tab {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #60758a;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}

.study-cafe-admin-room-tab strong {
  font-size: 0.86rem;
}

.study-cafe-admin-room-tab span {
  border-radius: 999px;
  background: #e4ebf2;
  padding: 3px 7px;
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-cafe-admin-room-tab:hover {
  background: #fff;
  color: var(--accent-strong);
}

.study-cafe-admin-room-tab:focus-visible {
  outline: 3px solid rgba(0, 111, 191, 0.24);
  outline-offset: 2px;
}

.study-cafe-admin-room-tab.active {
  border-color: #9fc9ea;
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 5px 14px rgba(18, 67, 108, 0.09);
}

.study-cafe-admin-room-tab.active span {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.study-cafe-admin-private-room-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 2px 8px;
  scrollbar-width: thin;
}

.study-cafe-admin-private-room-tab {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  min-width: 132px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #f8fbfe;
  color: #60758a;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.study-cafe-admin-private-room-tab strong {
  max-width: 180px;
  overflow: hidden;
  color: #153451;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-admin-private-room-tab span {
  font-size: 0.7rem;
  font-weight: 850;
}

.study-cafe-admin-private-room-tab.active {
  border-color: #76b7e5;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 5px 14px rgba(18, 67, 108, 0.09);
}

.study-cafe-admin-private-room-tab:focus-visible {
  outline: 3px solid rgba(0, 111, 191, 0.24);
  outline-offset: 2px;
}

.study-cafe-admin-room {
  display: grid;
  gap: 10px;
}

.study-cafe-admin-room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.study-cafe-admin-room-head strong {
  color: #153451;
}

.study-cafe-admin-room-head span {
  color: #6f8192;
  font-size: 0.78rem;
  font-weight: 800;
}

.study-cafe-admin-private-room {
  border: 1px solid #dce7f1;
  border-radius: 15px;
  background: linear-gradient(145deg, #fbfdff, #f2f7fb);
  padding: 14px;
}

.study-cafe-admin-private-room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.study-cafe-admin-private-room-head strong {
  color: #153451;
}

.study-cafe-admin-private-room-head p,
.study-cafe-admin-private-room-waiting {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.study-cafe-admin-private-room-head > span {
  flex: 0 0 auto;
  color: #5d7287;
  font-size: 0.74rem;
  font-weight: 850;
}

.study-cafe-admin-seat-grid.private {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.study-cafe-admin-seat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.study-cafe-admin-seat {
  min-width: 0;
  min-height: 174px;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid #dce7f1;
  border-radius: 14px;
  background: #f8fbfe;
  padding: 13px;
}

.study-cafe-admin-seat.empty {
  place-content: center;
  justify-items: center;
  border-style: dashed;
  color: var(--muted);
  text-align: center;
}

.study-cafe-admin-seat.occupied {
  border-color: #9fc9ea;
  background: #f2f9ff;
}

.study-cafe-admin-seat.disconnected,
.study-cafe-admin-member.disconnected {
  border-color: #e4c5bc;
  background: #fff8f5;
}

.study-cafe-admin-seat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.study-cafe-admin-seat-number {
  width: fit-content;
  border-radius: 7px;
  background: var(--accent-strong);
  color: #fff;
  padding: 4px 7px;
  font-size: 0.7rem;
  font-weight: 900;
}

.study-cafe-admin-seat.empty .study-cafe-admin-seat-number {
  background: #8c9aab;
}

.study-cafe-admin-seat > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-admin-seat > p {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-admin-seat > time {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-cafe-admin-subject {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  color: #46627d;
  padding: 4px 7px;
  font-size: 0.7rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-admin-status {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf1f5;
  color: #657384;
  padding: 4px 7px;
  font-size: 0.65rem;
  font-weight: 900;
  white-space: nowrap;
}

.study-cafe-admin-status.running {
  background: #ddf6e9;
  color: #08734a;
}

.study-cafe-admin-status.paused {
  background: #fff2ce;
  color: #946000;
}

.study-cafe-admin-status.seated {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.study-cafe-admin-status.disconnected {
  background: #f8e4e0;
  color: var(--danger);
}

.study-cafe-admin-seat-actions,
.study-cafe-admin-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.study-cafe-admin-seat-actions .mini-btn,
.study-cafe-admin-member-actions .mini-btn {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 0.68rem;
}

.study-cafe-admin-member-list {
  display: grid;
  gap: 8px;
}

.study-cafe-admin-member {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e4ebf2;
  border-radius: 13px;
  background: #fff;
  padding: 11px 12px;
}

.study-cafe-admin-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.study-cafe-admin-avatar.mint {
  background: #38a286;
}

.study-cafe-admin-avatar.purple {
  background: #8168bf;
}

.study-cafe-admin-avatar.orange {
  background: #d97d3d;
}

.study-cafe-admin-avatar.rose {
  background: #c75f75;
}

.study-cafe-admin-avatar.blue {
  background: #4b8fce;
}

.study-cafe-admin-member-main {
  min-width: 0;
}

.study-cafe-admin-member-main > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.study-cafe-admin-member-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-admin-member-main > div > span:not(.study-cafe-admin-status) {
  color: var(--muted);
  font-size: 0.7rem;
}

.study-cafe-admin-member-main p {
  min-width: 0;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cafe-admin-member-time {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.study-cafe-admin-member-time span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
}

.study-cafe-admin-member-time strong {
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.study-cafe-admin-error {
  display: grid;
  justify-items: start;
  gap: 9px;
  padding: 24px;
}

.study-cafe-admin-error .btn {
  width: auto;
}

.study-cafe-admin-empty {
  padding: 28px 16px;
}

.study-cafe-admin-history-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.study-cafe-admin-history-tools > .btn {
  width: auto;
  min-width: 132px;
  margin: 0;
}

.study-cafe-admin-history-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 210px)) auto;
  align-items: end;
  gap: 10px;
}

.study-cafe-admin-history-filters .field {
  margin: 0;
}

.study-cafe-admin-history-filters input {
  min-height: 42px;
}

.study-cafe-admin-history-submit .btn {
  width: auto;
  min-width: 88px;
  margin: 0;
}

.study-cafe-admin-history-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #f0c5bd;
  border-radius: 11px;
  background: #fff7f5;
  color: var(--danger);
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.study-cafe-admin-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  background: #f2f8fd;
  color: #5d7287;
  padding: 11px 14px;
  font-size: 0.8rem;
  font-weight: 800;
}

.study-cafe-admin-history-summary strong {
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.study-cafe-admin-history-table {
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 13px;
}

.study-cafe-admin-history-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) minmax(120px, auto);
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #e7edf3;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
  font: inherit;
}

button.study-cafe-admin-history-row {
  cursor: pointer;
}

.study-cafe-admin-history-row:last-child {
  border-bottom: 0;
}

.study-cafe-admin-history-row.heading {
  background: #f4f7fa;
  color: #65788b;
  font-size: 0.73rem;
  font-weight: 900;
}

button.study-cafe-admin-history-row:hover,
button.study-cafe-admin-history-row.active {
  background: #f0f8ff;
}

button.study-cafe-admin-history-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(0, 111, 191, 0.24);
  outline-offset: -3px;
}

.study-cafe-admin-history-row > :last-child {
  justify-self: end;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

.study-cafe-admin-history-inline-detail {
  border-bottom: 1px solid #dfe8f1;
  background: #f4f9fd;
  padding: 12px;
}

.study-cafe-admin-history-inline-detail:last-child {
  border-bottom: 0;
}

.study-cafe-admin-history-detail {
  display: grid;
  gap: 12px;
  border: 1px solid #b8d5e9;
  border-radius: 14px;
  background: #f8fcff;
  padding: 15px;
}

.study-cafe-admin-history-detail-head,
.study-cafe-admin-history-day-head,
.study-cafe-admin-history-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.study-cafe-admin-history-detail-head h4 {
  margin: 0;
  color: #153451;
  font-size: 0.98rem;
}

.study-cafe-admin-history-detail-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.study-cafe-admin-history-days {
  display: grid;
  gap: 9px;
}

.study-cafe-admin-history-day {
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 11px;
  background: #fff;
}

.study-cafe-admin-history-day-head {
  background: #f1f6fa;
  padding: 9px 11px;
  font-size: 0.78rem;
}

.study-cafe-admin-history-day-head span {
  color: var(--accent-strong);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-cafe-admin-history-sessions {
  display: grid;
}

.study-cafe-admin-history-session {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) repeat(2, minmax(105px, auto)) minmax(84px, auto);
  border-top: 1px solid #edf1f5;
  padding: 9px 11px;
  color: #60758a;
  font-size: 0.74rem;
}

.study-cafe-admin-history-session:first-child {
  border-top: 0;
}

.study-cafe-admin-history-session strong {
  justify-self: end;
  color: #153451;
  font-variant-numeric: tabular-nums;
}

.study-cafe-admin-history-subject {
  min-width: 0;
  overflow: hidden;
  color: #38556f;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .study-cafe-admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-cafe-admin-seat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-cafe-admin-history-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .study-cafe-admin-history-tools > .btn {
    align-self: flex-end;
  }
}

@media (max-width: 680px) {
  .study-cafe-admin-head,
  .study-cafe-admin-section-head,
  .study-cafe-admin-private-room-head {
    align-items: stretch;
    flex-direction: column;
  }

  .study-cafe-admin-private-room-head > span {
    align-self: flex-start;
  }

  .study-cafe-admin-head-actions {
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
  }

  .study-cafe-admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-cafe-admin-room-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-cafe-admin-seat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-cafe-admin-seat {
    min-height: 0;
  }

  .study-cafe-admin-member {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .study-cafe-admin-member-actions {
    grid-column: 2 / -1;
  }

  .study-cafe-admin-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-cafe-admin-history-submit {
    grid-column: 1 / -1;
  }

  .study-cafe-admin-history-submit .btn,
  .study-cafe-admin-history-tools > .btn {
    width: 100%;
  }

  .study-cafe-admin-history-row {
    grid-template-columns: minmax(90px, 1fr) minmax(115px, 1.25fr) auto;
    gap: 8px;
    padding: 11px 10px;
    font-size: 0.78rem;
  }

  .study-cafe-admin-history-session {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .study-cafe-admin-history-session > :nth-child(3),
  .study-cafe-admin-history-session > :nth-child(4) {
    justify-self: end;
  }
}

.student-device-card {
  grid-template-columns: minmax(0, 1fr);
}

.student-push-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  cursor: pointer;
  user-select: none;
}

.student-settings-link {
  width: 100%;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.student-settings-chevron {
  color: #8b9aaa;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}

.student-mypage .student-policy-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
  padding: 4px 0 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.student-mypage .student-policy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: inherit;
  text-decoration: none;
}

.student-mypage .student-policy-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.student-mypage .student-policy-links a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

body.student-online-mode .student-mypage .student-policy-links {
  color: #c9d8e5;
}

.student-push-settings-page {
  gap: 12px;
}

.student-push-settings-back {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 4px 2px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.student-push-settings-card {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.student-push-setting-list {
  border-top: 8px solid var(--bg);
}

.student-push-setting-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 18px;
  border-top: 1px solid #e7eef7;
  padding: 14px 0;
}

.student-push-setting-row:first-child,
.student-push-setting-row.master {
  border-top: 0;
}

.student-push-setting-row strong {
  display: block;
  font-size: 0.98rem;
}

.student-push-setting-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.student-push-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.student-push-toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c8d2dc;
  transition: background 160ms ease;
}

.student-push-toggle-track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(30, 52, 70, 0.24);
  transition: transform 160ms ease;
}

.student-push-toggle input:checked + .student-push-toggle-track {
  background: #168565;
}

.student-push-toggle input:checked + .student-push-toggle-track::after {
  transform: translateX(18px);
}

.student-push-toggle input:focus-visible + .student-push-toggle-track {
  outline: 3px solid rgba(30, 120, 205, 0.24);
  outline-offset: 2px;
}

.student-push-toggle:has(input:disabled) {
  cursor: default;
  opacity: 0.58;
}

.student-push-optin-prompt {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: var(--student-toast-bottom);
  width: min(430px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d6e3ec;
  border-radius: 16px;
  background: #fff;
  padding: 13px 14px;
  box-shadow: 0 12px 30px rgba(31, 54, 72, 0.18);
  transform: translateX(-50%);
}

.student-push-optin-prompt strong {
  min-width: 0;
  color: #20384c;
  font-size: 0.92rem;
  line-height: 1.35;
}

.student-push-optin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.student-push-optin-actions .btn {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.student-push-admin-status,
.student-push-direct-head,
.student-push-target-summary,
.student-push-send-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.student-push-admin-form {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.student-push-direct-targets {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.student-push-direct-targets[hidden] {
  display: none;
}

.student-push-direct-head input {
  min-width: 0;
  flex: 1;
}

.student-push-direct-head strong {
  white-space: nowrap;
}

.student-push-student-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.student-push-student-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  cursor: pointer;
}

.student-push-student-option input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.student-push-student-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.student-push-student-option small {
  color: #0d6d4d;
  font-weight: 900;
}

.student-push-target-summary {
  grid-column: 1 / -1;
  justify-content: flex-start;
  border-radius: 11px;
  background: #eef6fd;
  padding: 11px 13px;
}

.student-push-target-summary span {
  color: #42657f;
  font-weight: 800;
}

.student-push-send-actions {
  justify-content: flex-end;
}

.student-push-history {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.student-push-history h3 {
  margin: 0;
}

@media (max-width: 700px) {
  .student-push-send-actions .btn {
    width: 100%;
  }

  .student-push-direct-head {
    align-items: stretch;
    flex-direction: column;
  }

  .student-push-student-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .student-push-optin-prompt {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .student-push-optin-actions {
    justify-content: flex-end;
  }
}

.student-device-manager-modal {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
}

.student-device-manager-content,
.student-device-list {
  display: grid;
  gap: 10px;
}

.student-device-list {
  max-height: min(58dvh, 520px);
  overflow: auto;
}

.student-device-item {
  display: grid;
  gap: 8px;
  border: 1px solid #dce6f1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px;
}

.student-device-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.student-device-item p {
  margin: 0;
}

.student-device-item small {
  color: var(--muted);
  font-weight: 800;
}

.student-device-item .mini-btn {
  justify-self: end;
}

.history-modal-panel {
  width: min(420px, 100%);
}

.history-modal-panel.outing-history-modal {
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
}

.history-modal-panel.penalty-detail-modal {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}

.history-modal-panel.penalty-detail-modal .wide-cell {
  min-width: 280px;
  max-width: 520px;
}

.student-history-list {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 520px);
  overflow: auto;
}

.outing-history-modal .student-history-list {
  max-height: min(62dvh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.outing-history-modal .student-history-list::-webkit-scrollbar {
  display: none;
}

.student-history-item {
  display: grid;
  gap: 4px;
  border-top: 1px solid #e7eef7;
  padding: 12px 0 4px;
}

.student-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  min-width: 0;
}

.student-history-row span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.student-history-row strong {
  min-width: 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  text-align: right;
}

body:not([data-app-mode="teacher"]) .panel {
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(10, 41, 78, 0.1);
}

body:not([data-app-mode="teacher"]) .panel h2 {
  margin-bottom: 16px;
}

body:not([data-app-mode="teacher"]) .form-grid {
  grid-template-columns: 1fr;
  gap: 13px;
}

body:not([data-app-mode="teacher"]) .field.full {
  gap: 10px;
}

body:not([data-app-mode="teacher"]) .time-field {
  max-width: 180px;
}

body:not([data-app-mode="teacher"]) .time-field input {
  min-height: 42px;
  padding-inline: 10px;
}

body:not([data-app-mode="teacher"]) .btn {
  width: 100%;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .app-frame {
    grid-template-columns: 1fr;
    min-height: 100svh;
    min-width: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    min-width: 0;
  }

  .brand {
    margin-bottom: 12px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .brand strong {
    font-size: 0.98rem;
  }

  .brand span {
    font-size: 0.82rem;
  }

  .nav-section {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .weekly-question-count-row,
  .exam-file-row {
    grid-template-columns: 1fr;
  }

  .weekly-answer-table {
    width: 100%;
  }

  .weekly-answer-table .excel-table {
    width: 100%;
  }

  .grade-input-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .grade-bulk-action-buttons {
    justify-content: flex-start;
  }

  .student-grade-card-grid {
    grid-template-columns: 1fr;
  }

  body[data-app-mode="teacher"] .nav-list,
  body:not([data-app-mode="teacher"]) .nav-list {
    grid-template-columns: 1fr;
  }

  .nav-list button {
    text-align: center;
    min-height: 44px;
    padding: 9px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  body[data-app-mode="teacher"] .sidebar {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 8px;
    overflow: hidden;
  }

  body[data-app-mode="teacher"] .brand {
    margin-bottom: 8px;
    min-width: 0;
  }

  body[data-app-mode="teacher"] .brand span {
    display: none;
  }

  body[data-app-mode="teacher"] .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-app-mode="teacher"].teacher-guest .sidebar {
    position: static;
  }

  body[data-app-mode="teacher"].teacher-guest .nav-list {
    display: none;
  }

  body[data-app-mode="teacher"] .nav-list {
    display: flex !important;
    grid-template-columns: none;
    grid-auto-flow: column;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: calc(100vw - 24px);
    max-height: 44px;
    padding: 0 0 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body[data-app-mode="teacher"] .nav-list::-webkit-scrollbar {
    display: none;
  }

  body[data-app-mode="teacher"] .info-modal.weekly-answer-modal {
    inset: 96px 0 0 0;
    padding: 12px;
  }

  body[data-app-mode="teacher"] .info-modal.weekly-answer-modal .weekly-answer-modal-panel {
    height: 100%;
    border-radius: 12px 12px 0 0;
    padding: 14px;
  }

  body[data-app-mode="teacher"] .nav-list button {
    width: auto !important;
    flex: 0 0 auto !important;
    min-height: 36px;
    padding: 7px 11px;
    font-size: 0.82rem;
  }

  .stat-groups,
  .grid.stats,
  .grid.two,
  .module-grid,
  .form-grid,
  .penalty-student-picker,
  .teacher-tools,
  .teacher-search,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding: 14px 14px 28px;
    min-width: 0;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  body[data-app-mode="teacher"] .topbar {
    gap: 10px;
  }

  body[data-app-mode="teacher"] .topbar > div:first-child {
    min-width: 0;
  }

  body[data-app-mode="teacher"] .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
  }

  body[data-app-mode="teacher"] .top-actions[hidden] {
    display: none;
  }

  body[data-app-mode="teacher"].teacher-guest .topbar {
    display: none;
  }

  body[data-app-mode="teacher"].teacher-guest .main-shell {
    padding-top: 18px;
  }

  body[data-app-mode="teacher"] .teacher-auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 20px 18px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(10, 41, 78, 0.08);
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 0.72rem;
  }

  h1 {
    font-size: 1.55rem;
  }

  h2 {
    font-size: 1.18rem;
  }

  h3 {
    font-size: 1rem;
  }

  .panel,
  .outing-card,
  .student-hero {
    box-shadow: 0 10px 28px rgba(10, 41, 78, 0.08);
  }

  .panel {
    padding: 16px;
  }

  .student-hero {
    padding: 17px;
  }

  .student-hero h2 {
    margin-bottom: 6px;
  }

  .student-hero p,
  .subtle,
  .outing-meta {
    font-size: 0.92rem;
  }

  .field {
    gap: 6px;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  textarea {
    min-height: 86px;
  }

  .btn,
  .icon-btn {
    width: 100%;
    justify-content: center;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .outing-head {
    align-items: flex-start;
  }

  .badge {
    flex-shrink: 0;
  }

  body[data-app-mode="teacher"] .table-wrap,
  body[data-app-mode="teacher"] .excel-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  body[data-app-mode="teacher"] .responsive-table,
  body[data-app-mode="teacher"] .excel-table {
    display: block;
    min-width: 0;
    width: 100%;
  }

  body[data-app-mode="teacher"] .responsive-table thead,
  body[data-app-mode="teacher"] .excel-table thead {
    display: none;
  }

  body[data-app-mode="teacher"] .responsive-table tbody,
  body[data-app-mode="teacher"] .excel-table tbody {
    display: grid;
    gap: 10px;
  }

  body[data-app-mode="teacher"] .responsive-table tr,
  body[data-app-mode="teacher"] .excel-table tr {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
  }

  body[data-app-mode="teacher"] .responsive-table td,
  body[data-app-mode="teacher"] .excel-table td {
    display: grid;
    grid-template-columns: minmax(72px, 34%) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 9px 0;
    background: transparent;
    font-size: 0.9rem;
  }

  body[data-app-mode="teacher"] .responsive-table td:last-child,
  body[data-app-mode="teacher"] .excel-table td:last-child {
    border-bottom: 0;
  }

  body[data-app-mode="teacher"] .responsive-table td::before,
  body[data-app-mode="teacher"] .excel-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.5;
  }

  body[data-app-mode="teacher"] .responsive-table td[colspan],
  body[data-app-mode="teacher"] .excel-table td[colspan] {
    display: block;
  }

  body[data-app-mode="teacher"] .responsive-table td[colspan]::before,
  body[data-app-mode="teacher"] .excel-table td[colspan]::before {
    display: none;
  }

  body[data-app-mode="teacher"] .responsive-table tr:hover td,
  body[data-app-mode="teacher"] .excel-table tr:hover td {
    background: transparent;
  }

  body[data-app-mode="teacher"] .wide-cell {
    min-width: 0;
    max-width: none;
  }

  body[data-app-mode="teacher"] .teacher-outing-table .outing-name-cell,
  body[data-app-mode="teacher"] .teacher-outing-table .outing-reason-cell,
  body[data-app-mode="teacher"] .teacher-outing-table .outing-photo-cell,
  body[data-app-mode="teacher"] .teacher-outing-table .outing-date-cell,
  body[data-app-mode="teacher"] .teacher-outing-table .outing-expected-cell,
  body[data-app-mode="teacher"] .teacher-outing-table .outing-time-cell,
  body[data-app-mode="teacher"] .teacher-outing-table .outing-status-cell {
    min-width: 0;
    width: auto;
    white-space: normal;
  }

  body[data-app-mode="teacher"] .action-cell,
  body[data-app-mode="teacher"] .student-admin-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  body[data-app-mode="teacher"] .teacher-action-stack {
    display: flex;
    flex: 1 1 160px;
    gap: 6px;
    flex-wrap: wrap;
  }

  body[data-app-mode="teacher"] .action-cell::before,
  body[data-app-mode="teacher"] .student-admin-actions::before {
    flex: 0 0 min(34%, 112px);
  }

  body[data-app-mode="teacher"] .student-action-menu {
    flex: 1 1 160px;
    max-width: 240px;
  }

  body[data-app-mode="teacher"] .student-action-menu-trigger {
    width: 100%;
  }

  body[data-app-mode="teacher"] .student-action-menu-list {
    left: 0;
    right: auto;
    width: min(220px, calc(100vw - 54px));
  }

  body[data-app-mode="teacher"] .mini-btn {
    min-height: 34px;
    padding: 7px 10px;
    margin: 0;
  }

  body[data-app-mode="teacher"] .attendance-photo-thumb {
    width: 100%;
    justify-content: flex-start;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }

}

@media (max-width: 720px) {
  .weekly-answer-header {
    grid-template-columns: 1fr;
  }

  .weekly-answer-header-actions {
    justify-content: stretch;
  }

  .weekly-question-count-tools {
    min-width: 0;
  }

  .weekly-question-count-controls {
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .nav-list button {
    font-size: 0.82rem;
    padding-inline: 4px;
  }

  .brand {
    gap: 10px;
  }

  .main-shell {
    padding-inline: 12px;
  }

  .panel,
  .outing-card,
  .student-hero {
    border-radius: 10px;
  }

  body:not([data-app-mode="teacher"]) .sidebar {
    padding: 16px 14px 6px;
  }

  body:not([data-app-mode="teacher"]) .main-shell {
    padding: 8px 14px var(--student-content-bottom);
  }

  .student-weekly-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .student-weekly-header-title {
    grid-column: 1 / -1;
  }

  .student-weekly-week-select {
    justify-self: start;
  }

  .student-grade-action-list {
    gap: 8px;
  }

  .student-grade-action-card {
    min-height: 72px;
    padding: 12px;
  }

  body:not([data-app-mode="teacher"]) .panel {
    padding: 16px;
    border-radius: 12px;
  }

  body:not([data-app-mode="teacher"]) .student-weekly-back-panel {
    padding: 14px 16px;
  }

  body:not([data-app-mode="teacher"]) .student-weekly-back-button {
    width: auto;
    justify-self: end;
  }

  body:not([data-app-mode="teacher"]) .time-field {
    max-width: 160px;
  }

  .student-grade-overview {
    padding: 18px 16px 16px;
  }

  .student-grade-overview .student-grade-overview-grid {
    width: 100%;
  }

  .student-grade-subject-card {
    padding: 10px;
  }

  .student-grade-subject-card .detail-grid {
    gap: 7px;
  }

  .student-grade-subject-card .detail-item,
  .student-grade-overview .detail-item {
    padding: 10px 9px;
  }

  .student-answer-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
  }

  .student-answer-head {
    min-height: 44px;
  }

  .answer-choice-row {
    gap: 5px;
  }

  .answer-choice {
    min-height: 44px;
  }

  .student-answer-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .student-answer-page-nav {
    gap: 6px;
  }

  .student-answer-nav .btn {
    min-height: 42px;
    padding-inline: 8px;
    font-size: 0.84rem;
  }

  .student-answer-review-button {
    width: 100%;
  }

  .answer-sheet-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .answer-sheet-cell {
    min-height: 50px;
  }
}

/* Graded answer sheet uses the same board shape as the submit review sheet. */
.info-modal-panel.student-graded-answer-modal {
  width: min(430px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 36px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  border-radius: 16px;
  padding: 18px;
}

.info-modal-panel.student-graded-answer-modal > strong {
  font-size: 1.08rem;
  line-height: 1.25;
}

.info-modal-panel.student-graded-answer-modal > .btn {
  min-height: 48px;
  border-radius: 8px;
}

.info-modal-panel.student-graded-answer-modal .student-graded-answer-sheet {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.info-modal-panel.student-graded-answer-modal .student-graded-answer-summary {
  gap: 6px;
}

.info-modal-panel.student-graded-answer-modal .student-graded-answer-summary > div {
  border-color: rgba(0, 91, 172, 0.18);
  border-radius: 8px;
  background: #f7fbff;
  padding: 9px 6px;
}

.info-modal-panel.student-graded-answer-modal .student-graded-answer-summary span {
  font-size: 0.68rem;
  line-height: 1.1;
}

.info-modal-panel.student-graded-answer-modal .student-graded-answer-summary strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.info-modal-panel.student-graded-answer-modal .student-graded-answer-board {
  max-height: min(492px, calc(100dvh - 246px));
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  gap: 7px;
  padding: 1px 2px 1px 0;
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell {
  min-height: 72px;
  gap: 3px;
  border-color: rgba(0, 91, 172, 0.2);
  background: #fbfdff;
  padding: 7px 4px;
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell > span {
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1;
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell > strong {
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1;
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell.correct > strong {
  color: var(--accent-strong);
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell.wrong {
  border-color: rgba(240, 68, 56, 0.58);
  background: #fff8f8;
  color: #b42318;
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell.wrong > span,
.info-modal-panel.student-graded-answer-modal .graded-answer-cell.wrong > strong {
  color: #b42318;
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell > em {
  color: var(--accent-strong);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.info-modal-panel.student-graded-answer-modal .graded-answer-cell.wrong > em {
  color: #b42318;
}

@media (max-width: 430px) {
  .info-modal {
    padding: 12px;
  }

  .info-modal-panel.student-graded-answer-modal {
    width: min(390px, calc(100vw - 24px));
    padding: 16px;
  }

  .info-modal-panel.student-graded-answer-modal .student-graded-answer-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .info-modal-panel.student-graded-answer-modal .graded-answer-cell {
    min-height: 68px;
    padding: 6px 3px;
  }

  .info-modal-panel.student-graded-answer-modal .graded-answer-cell > strong {
    font-size: 1rem;
  }
}

/* Student responsive layouts: mobile defaults, tablet from 768px, desktop from 1200px. */
@media (min-width: 768px) {
  body:not([data-app-mode="teacher"]) .sidebar {
    padding: 24px 24px 10px;
  }

  body:not([data-app-mode="teacher"]) .brand,
  body:not([data-app-mode="teacher"]) .main-shell {
    width: min(760px, calc(100% - 48px));
  }

  body:not([data-app-mode="teacher"]) .main-shell {
    padding: 8px 0 var(--student-content-bottom);
  }

  body:not([data-app-mode="teacher"]) .toast,
  body:not([data-app-mode="teacher"]) .student-footer-menu {
    width: min(720px, calc(100% - 48px));
  }

  body.student-study-mode .student-study-todo-page,
  body.student-study-mode .student-study-timer-page,
  body.student-study-mode .student-study-ranking-page,
  body.student-study-mode .student-study-character-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }

  .study-todo-date-navigation,
  .study-todo-calendar-page-head,
  .study-todo-month-calendar,
  .study-todo-calendar-selected-date,
  .study-todo-date-loading,
  .study-todo-progress-card,
  .study-todo-subject-list {
    grid-column: 1 / -1;
  }

  .study-todo-subject-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-timer-page-head,
  .study-timer-mode-tabs,
  .study-timer-stats-view,
  .study-timer-footnote,
  .study-timer-fullscreen {
    grid-column: 1 / -1;
  }

  .study-timer-total-card {
    min-height: 230px;
  }

  .study-ranking-page-head,
  .study-ranking-period-tabs,
  .study-ranking-date-bar,
  .study-ranking-footnote {
    grid-column: 1 / -1;
  }

  .study-ranking-podium-section,
  .study-ranking-summary {
    grid-column: 1;
  }

  .study-ranking-list-card {
    grid-column: 2;
    grid-row: 4 / span 2;
  }

  .study-character-footnote {
    grid-column: 1 / -1;
  }

  .student-study-character-page .study-character-shop-link {
    grid-column: 1 / -1;
  }

  .study-character-preview-card,
  .study-character-options-card {
    align-self: stretch;
  }

  .study-character-options-card {
    align-content: center;
  }

  .study-cafe-seat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px 9px;
    padding: 12px 12px 16px;
  }

  .study-cafe-room .study-cafe-my-seat-card {
    gap: 9px;
    margin-inline: 11px;
  }

  .study-cafe-my-seat-subject-button {
    width: auto;
    min-width: 136px;
    justify-self: end;
    padding-inline: 18px;
  }

  .study-cafe-floating-menu-button {
    right: max(24px, calc((100vw - 760px) / 2 + 12px));
    width: auto;
    min-width: 112px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    padding: 0 15px;
  }

  .study-cafe-floating-menu-button > span {
    font-size: 1.25rem;
    line-height: 1;
  }

  .study-cafe-floating-menu-button > small {
    margin-top: 0;
    font-size: 0.68rem;
  }

  .study-cafe-floating-action-menu {
    right: max(24px, calc((100vw - 760px) / 2 + 12px));
    bottom: calc(var(--student-footer-bottom) + 136px);
  }
}

@media (min-width: 1200px) {
  body.student-study-mode .brand,
  body.student-study-mode .main-shell {
    width: min(1120px, calc(100% - 64px));
  }

  body.student-study-mode .study-cafe-footer-menu {
    width: min(880px, calc(100% - 64px));
  }

  .study-cafe-floating-menu-button {
    right: max(24px, calc((100vw - 1120px) / 2));
    bottom: calc(var(--student-footer-bottom) + 15px);
  }

  .study-cafe-floating-action-menu {
    right: max(24px, calc((100vw - 1120px) / 2));
    bottom: calc(var(--student-footer-bottom) + 76px);
  }

  body.student-study-mode .student-study-timer-page {
    grid-template-columns: minmax(340px, 0.8fr) minmax(560px, 1.45fr);
  }

  body.student-study-mode .student-study-ranking-page {
    grid-template-columns: minmax(380px, 0.85fr) minmax(560px, 1.35fr);
  }

  body.student-study-mode .student-study-character-page {
    width: min(920px, 100%);
    grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
    margin-inline: auto;
  }

  .study-todo-subject-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .study-cafe-seat-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px 10px;
    padding: 14px 14px 18px;
  }

  .study-cafe-room .study-cafe-my-seat-card {
    gap: 10px;
    margin-inline: 13px;
  }
}

body.student-study-mode .sidebar {
  display: none;
}

body.student-study-mode .main-shell {
  padding-top: 8px;
}
.lecture-application-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid #d8e3ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(39, 65, 91, 0.08);
}

.lecture-application-entry-card strong {
  display: block;
  margin-bottom: 5px;
  color: #18344d;
  font-size: 17px;
}

.lecture-application-entry-card p {
  margin: 0;
  color: #64788b;
  line-height: 1.55;
}

.lecture-application-status-card {
  padding: 20px;
  border: 1px solid #ead9aa;
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdf7, #fff9e9);
  box-shadow: 0 10px 28px rgba(91, 72, 25, 0.08);
}

.lecture-application-status-card.status-approved {
  border-color: #bde5d6;
  background: linear-gradient(145deg, #fbfffd, #effbf6);
}

.lecture-application-status-card.status-rejected,
.lecture-application-status-card.status-cancelled {
  border-color: #efc8cb;
  background: linear-gradient(145deg, #fffdfd, #fff2f3);
}

.lecture-application-status-content {
  display: grid;
  gap: 12px;
}

.lecture-application-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lecture-application-status-content h3,
.lecture-application-status-content p {
  margin: 0;
}

.lecture-application-status-content h3 {
  color: #18344d;
  font-size: 18px;
}

.lecture-application-status-content > p {
  color: #64788b;
  line-height: 1.6;
}

.lecture-application-status-meta {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 2px 0 0;
  font-size: 0.88rem;
}

.lecture-application-status-meta dt,
.lecture-application-status-meta dd {
  margin: 0;
}

.lecture-application-status-meta dt {
  color: #718395;
}

.lecture-application-status-meta dd {
  color: #29445c;
  font-weight: 700;
}

.lecture-application-approved-number {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 13px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #cce8dc;
}

.lecture-application-approved-number span {
  color: #64788b;
  font-size: 0.8rem;
}

.lecture-application-approved-number strong {
  color: #0d6d4d;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}

.lecture-application-status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.lecture-application-status-error {
  color: #a44833 !important;
  font-size: 0.82rem;
}

.lecture-application-push-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #d6e4f0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
}

.lecture-application-push-box.enabled {
  border-color: #bde5d6;
  background: #f3fcf8;
}

.lecture-application-push-box strong {
  display: block;
  margin-bottom: 3px;
  color: #18344d;
  font-size: 0.92rem;
}

.lecture-application-push-box p,
.lecture-application-push-note {
  margin: 0;
  color: #64788b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.lecture-application-push-note.error {
  color: #a44833;
}

.info-modal-panel.lecture-application-modal {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
}

.lecture-application-details {
  min-width: 0;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.interview-application-entry {
  gap: 12px;
  padding: 16px;
  border: 2px solid #238c7b;
  border-radius: 14px;
  background: #e1f5f0;
  color: #125c50;
}

.interview-application-entry h3,
.interview-application-entry p {
  margin: 0;
}

.interview-application-entry p {
  line-height: 1.6;
}

.interview-application-entry .interview-application-link {
  background: #125c50;
  color: #fff;
  text-decoration: none;
}

.lecture-application-form,
.lecture-application-form .field,
.lecture-application-form input,
.lecture-application-form select,
.lecture-application-form textarea {
  min-width: 0;
  max-width: 100%;
}

.lecture-application-form input[type="date"] {
  display: block;
  width: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.lecture-application-form .student-auth-result {
  grid-column: 1 / -1;
}

.lecture-phone-verification {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #d9e4ec;
  border-radius: 14px;
  background: #f6f9fb;
}

.phone-verification-request-row,
.phone-verification-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.phone-verification-button {
  min-width: 108px;
  min-height: 44px;
  padding-inline: 14px;
  white-space: nowrap;
}

.phone-verification-status {
  min-height: 20px;
  margin: 0;
  color: #64788b;
  font-size: 0.76rem;
  line-height: 1.5;
}

.phone-verification-status.pending {
  color: #315f7d;
  font-weight: 700;
}

.phone-verification-status.pending[data-countdown]::after {
  content: " · " attr(data-countdown) " 남음";
}

.phone-verification-status.success {
  color: #237452;
  font-weight: 800;
}

.phone-verification-status.error {
  color: #a44833;
  font-weight: 700;
}

@media (max-width: 520px) {
  .phone-verification-request-row,
  .phone-verification-code-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone-verification-button {
    width: 100%;
  }
}

.lecture-application-agreements {
  display: grid;
  gap: 10px;
}

.lecture-application-agreement {
  overflow: hidden;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  background: #f5f8fb;
}

.lecture-application-consent {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.lecture-application-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.lecture-application-agreement-details {
  border-top: 1px solid #dfe7ef;
}

.lecture-application-agreement-details summary {
  padding: 10px 14px;
  color: #315f7d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lecture-application-agreement-content {
  padding: 2px 14px 14px;
  color: #3f5060;
  font-size: 13px;
  line-height: 1.65;
}

.lecture-application-agreement-content h4 {
  margin: 8px 0 10px;
  color: #1e3344;
  font-size: 14px;
}

.lecture-application-agreement-content dl,
.lecture-application-agreement-content ol,
.lecture-application-agreement-content p {
  margin: 0;
}

.lecture-application-agreement-content dt {
  margin-top: 9px;
  color: #253e52;
  font-weight: 800;
}

.lecture-application-agreement-content dd {
  margin: 2px 0 0;
}

.lecture-application-agreement-content ol {
  padding-left: 20px;
}

.lecture-application-agreement-content li + li,
.lecture-application-agreement-content p {
  margin-top: 9px;
}

.lecture-application-actions,
.lecture-application-admin-controls,
.lecture-application-admin-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lecture-application-actions {
  justify-content: flex-end;
}

.lecture-application-admin-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.lecture-application-admin-head p {
  margin: 2px 0;
}

.lecture-application-admin-controls select {
  min-width: 120px;
}

.lecture-application-table-wrap .responsive-table th {
  white-space: nowrap;
}

.lecture-application-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.lecture-application-row-actions .mini-btn {
  min-width: 68px;
}

.badge.lecture-application-pending {
  color: #8a5b00;
  background: #fff3cf;
}

.badge.lecture-application-approved {
  color: #0d6d4d;
  background: #dff7ed;
}

.badge.lecture-application-rejected,
.badge.lecture-application-cancelled {
  color: #9f3941;
  background: #fde8ea;
}

.lecture-application-detail {
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1.8fr);
  gap: 0;
  margin: 12px 0 18px;
  overflow: hidden;
  border: 1px solid #dfe7ee;
  border-radius: 14px;
}

.lecture-application-detail dt,
.lecture-application-detail dd {
  margin: 0;
  padding: 11px 13px;
  border-bottom: 1px solid #e7edf2;
}

.lecture-application-detail dt {
  color: #526b80;
  background: #f5f8fb;
  font-weight: 700;
}

.lecture-application-detail dd {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .lecture-application-entry-card,
  .lecture-application-admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  .lecture-application-entry-card .btn,
  .lecture-application-status-actions .btn,
  .lecture-application-admin-controls,
  .lecture-application-admin-controls select,
  .lecture-application-admin-controls .mini-btn {
    width: 100%;
  }

  .lecture-application-status-actions {
    flex-direction: column;
  }

  .lecture-application-push-box {
    align-items: stretch;
    flex-direction: column;
  }

  .lecture-application-push-box .btn,
  .lecture-application-push-box .mini-btn {
    width: 100%;
  }

  .lecture-application-detail {
    grid-template-columns: 1fr;
  }

  .lecture-application-detail dt,
  .lecture-application-detail dd {
    border-bottom: 0;
  }

  .lecture-application-detail dd {
    border-bottom: 1px solid #e7edf2;
  }
}

/* Lecture subject question board */
.question-board-page { position: relative; display: grid; gap: 14px !important; padding-bottom: 20px; }
.question-board-list-page { gap: 0 !important; padding: 17px 16px 24px; border: 1px solid rgba(203,218,227,.72); border-radius: 18px; background: #edf2f4; box-shadow: 0 8px 24px rgba(3,20,36,.12); }
.question-board-head { position: relative; margin: -4px -18px 0; padding: 22px 18px 18px; background: linear-gradient(145deg, #f7fbff 0%, #edf6ff 62%, #f7f3ff 100%); border-bottom: 1px solid #dce9f5; }
.question-board-head.compact { margin: 0; padding: 0; border: 0; background: transparent; }
.question-board-kicker { display: block; margin-bottom: 5px; color: #3782bd; font-size: .69rem; font-weight: 900; letter-spacing: .12em; }
.question-board-head h2, .question-write-card h2 { margin: 0; color: #183752; font-size: 1.42rem; line-height: 1.3; }
.question-board-head > p, .question-write-card > p { margin: 7px 0 0; color: #6a8194; font-size: .82rem; line-height: 1.55; }
.question-board-search { position: relative; margin-top: 16px; }
.question-board-head.compact .question-board-search { margin-top: 0; }
.question-board-search.open { display: flex; align-items: center; min-height: 52px; border-radius: 999px; background: #f5f6f7; box-shadow: 0 8px 24px rgba(38,84,122,.07); }
.question-board-search input { min-height: 52px; padding: 0 48px; border: 0; border-radius: 999px; background: transparent; box-shadow: none; }
.question-board-search input:focus { border-color: transparent; box-shadow: none; }
.question-board-search-button { position: absolute; right: 8px; top: 50%; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #00a982; transform: translateY(-50%); cursor: pointer; touch-action: manipulation; }
.question-board-search-button:active { background: #e9f2f8; }
.question-board-search-trigger { position: absolute; right: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #1d2933; box-shadow: none; cursor: pointer; touch-action: manipulation; }
.question-board-search-trigger:active { background: #e9f2f8; }
.question-board-search-back { position: absolute; left: 8px; top: 50%; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #64717a; transform: translateY(-50%); cursor: pointer; touch-action: manipulation; }
.question-board-search-back:active { background: #e7e9eb; }
.question-board-search-back-icon { position: relative; width: 18px; height: 14px; display: block; border-top: 1.8px solid transparent; }
.question-board-search-back-icon::before { content: ""; position: absolute; left: 1px; top: 6px; width: 17px; height: 1.8px; border-radius: 2px; background: currentColor; }
.question-board-search-back-icon::after { content: ""; position: absolute; left: 1px; top: 2px; width: 9px; height: 9px; border-left: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); }
.question-board-search-icon { position: relative; width: 15px; height: 15px; display: block; border: 2px solid currentColor; border-radius: 50%; pointer-events: none; }
.question-board-search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 6px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
.question-filter-scroll { display: flex; gap: 7px; margin: 0 -16px; padding: 2px 16px 15px; overflow-x: auto; scrollbar-width: none; }
.question-filter-scroll::-webkit-scrollbar { display: none; }
.question-filter-button { flex: 0 0 auto; min-height: 38px; padding: 8px 14px; border: 1px solid #e0e3e6; border-radius: 99px; background: #fff; color: #30373d; font-size: .76rem; font-weight: 700; cursor: pointer; }
.question-filter-button.active { border-color: #182027; background: #182027; color: #fff; box-shadow: none; }
.question-status-tabs { display: flex; gap: 6px; }
.question-status-tabs .question-filter-button { min-height: 30px; padding: 5px 11px; border: 0; background: #eef3f7; box-shadow: none; font-size: .7rem; }
.question-status-tabs .question-filter-button.active { background: #dceeff; color: #146ca9; }
.question-board-list-section { display: grid; gap: 0; border-top: 1px solid #d9e1e5; }
.question-board-list-head, .question-comments-head { display: flex; align-items: center; justify-content: space-between; color: #24445f; }
.question-board-list-head { padding: 13px 0 5px; }
.question-board-list-head > span, .question-comments-head > span { color: #8a9aaa; font-size: .72rem; }
.question-post-list { overflow: hidden; border: 1px solid #e1e9ef; border-radius: 16px; background: #fff; }
.question-post-card { width: 100%; display: grid; gap: 8px; padding: 16px; border: 0; border-bottom: 1px solid #e7edf2; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.question-post-card:last-child { border-bottom: 0; }
.question-post-card:active { background: #f7fafc; }
.question-post-board-list { display: grid; gap: 10px; margin: 8px 0 0; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.question-post-skeleton-list { display: grid; gap: 10px; margin: 8px 0 0; }
.question-post-skeleton { min-height: 112px; display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid #d9e1e5; border-radius: 16px; background: #f5f8f9; }
.question-post-skeleton > span { display: block; overflow: hidden; border-radius: 999px; background: linear-gradient(100deg, rgba(111,135,149,.1) 20%, rgba(255,255,255,.58) 42%, rgba(111,135,149,.1) 64%); background-size: 240% 100%; animation: question-board-skeleton 1.05s ease-in-out infinite; }
.question-post-skeleton-subject { width: 42px; height: 19px; }
.question-post-skeleton-title { width: min(76%, 250px); height: 17px; }
.question-post-skeleton-meta { width: min(48%, 155px); height: 11px; margin-top: 2px; }
@keyframes question-board-skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .question-post-skeleton > span { animation: none; } }
.question-post-row { appearance: none; width: 100%; min-height: 112px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; gap: 12px; padding: 16px; border: 1px solid #d9e1e5; border-radius: 16px; background: #f5f8f9; color: inherit; box-shadow: 0 4px 14px rgba(25,53,70,.06); text-align: left; cursor: pointer; }
.question-post-row:first-child { border-top: 0; }
.question-post-row:last-child { border-bottom: 1px solid #d9e1e5; }
.question-post-row:active { background: #f7f9fb; }
.question-post-row:focus-visible { outline: 2px solid #2e88c9; outline-offset: -2px; }
.question-post-main { min-width: 0; display: grid; align-content: start; gap: 8px; }
.question-post-row-labels { min-height: 22px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.question-post-card-top, .question-admin-detail-head { display: flex; align-items: center; gap: 7px; }
.question-subject-tag, .question-status-badge, .teacher-answer-badge, .question-hidden-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border-radius: 7px; font-size: .65rem; font-weight: 900; }
.question-subject-tag { min-height: 21px; padding: 3px 7px; border-radius: 5px; background: #f0f2f3; color: #7b858d; font-weight: 750; }
.question-status-badge.open { background: #fff4dc; color: #9b6712; }
.question-status-badge.answered { background: #e8f7ef; color: #24764b; }
.question-post-title { color: #1f3548; font-size: .98rem; line-height: 1.42; }
.question-post-row .question-post-title { display: -webkit-box; overflow: hidden; color: #172731; font-size: .95rem; font-weight: 750; line-height: 1.48; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.question-post-preview { display: -webkit-box; margin: 0; overflow: hidden; color: #677b8c; font-size: .78rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.question-post-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; color: #92a0ac; font-size: .67rem; }
.question-post-row .question-post-meta { align-items: center; gap: 5px 8px; margin-top: auto; color: #929aa1; font-size: .7rem; }
.question-post-author { color: #747d84; }
.question-comment-count { color: #477797 !important; font-weight: 800; }
.question-post-comment-summary { align-self: end; min-width: 28px; min-height: 24px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 1px 2px 0; border-radius: 0; background: transparent; color: #85919a; text-align: right; }
.question-post-comment-summary strong { color: #6f7b84; font-size: .72rem; font-weight: 700; line-height: 1; }
.question-post-comment-icon { position: relative; width: 13px; height: 11px; display: block; border: 1.5px solid currentColor; border-radius: 4px; }
.question-post-comment-icon::after { content: ""; position: absolute; left: 2px; bottom: -4px; width: 4px; height: 4px; border-left: 1.5px solid currentColor; transform: skewY(-38deg); background: #edf2f4; }
.question-write-button { position: fixed; right: 20px; right: max(20px, calc((100vw - 420px) / 2 + 20px)); bottom: 100px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 35; min-height: 48px; padding: 11px 17px; border: 0; border-radius: 99px; background: #187f77; color: #fff; font-size: .86rem; font-weight: 900; box-shadow: 0 8px 20px rgba(20,91,86,.22); cursor: pointer; pointer-events: auto; touch-action: manipulation; }
.question-board-empty, .question-board-loading { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 26px; border: 1px dashed #d7e2eb; border-radius: 16px; background: #fbfdff; color: #8193a2; text-align: center; }
.question-board-empty strong { color: #486174; }
.question-board-empty p { margin: 0; font-size: .78rem; }
.question-board-list-empty { min-height: 0; grid-template-columns: 38px minmax(0,1fr); place-items: center start; align-content: initial; gap: 12px; padding: 18px 16px; border-style: solid; background: #fff; text-align: left; box-shadow: 0 5px 18px rgba(35,68,95,.04); }
.question-board-empty-stack { display: grid; gap: 12px; }
.question-board-list-empty > div { min-width: 0; display: grid; gap: 4px; }
.question-board-empty-icon { position: relative; width: 36px; height: 36px; display: block; border-radius: 12px; background: #edf5fb; }
.question-board-empty-icon::before { content: ""; position: absolute; left: 9px; top: 9px; width: 18px; height: 14px; border: 2px solid #7ca3bf; border-radius: 5px; }
.question-board-empty-icon::after { content: ""; position: absolute; left: 13px; top: 21px; width: 7px; height: 6px; border-left: 2px solid #7ca3bf; transform: skewY(-38deg); background: #edf5fb; }
.question-board-guide { padding: 16px; border: 1px solid #e3ebf1; border-radius: 14px; background: linear-gradient(135deg,#f8fbfe,#f1f7fb); color: #60798d; }
.question-board-guide strong { display: block; margin-bottom: 5px; color: #375a75; font-size: .78rem; }
.question-board-guide p { margin: 0; font-size: .72rem; line-height: 1.55; }
.question-board-loading { grid-auto-flow: column; min-height: 120px; }
.question-back-button { justify-self: start; min-height: 36px; padding: 7px 12px; border: 1px solid #d9e3eb; border-radius: 99px; background: #fff; color: #4e6c83; font-size: .75rem; font-weight: 800; cursor: pointer; }
.question-detail-card, .question-comments-section, .question-write-card { display: grid; gap: 14px; padding: 18px; border: 1px solid #e0e8ee; border-radius: 18px; background: #fff; box-shadow: 0 8px 25px rgba(35,68,95,.06); }
.question-detail-page { margin: 0; padding: 14px; border: 1px solid rgba(173,197,211,.42); border-radius: 22px; background: linear-gradient(180deg,#eef4f7 0%,#e7eff3 100%); gap: 14px !important; }
.question-detail-page .question-back-button { margin-bottom: 0; }
.question-detail-page .question-detail-card,
.question-detail-page .question-comments-section { padding: 18px; border: 1px solid #d8e4eb; border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 8px 22px rgba(25,66,91,.07); }
.question-detail-page .question-comments-section { padding-top: 18px; }
.question-detail-card h2 { margin: 0; color: #1b354b; font-size: 1.25rem; line-height: 1.45; }
.question-detail-body, .question-comment-body { color: #344e63; font-size: .87rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.question-detail-body { min-height: 100px; padding-top: 14px; border-top: 1px solid #edf1f4; }
.question-detail-page .question-detail-body { padding-top: 14px; border-top: 1px solid #e5edf2; }
.question-detail-actions, .question-comment-actions, .question-write-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.question-comment-list { display: grid; gap: 10px; }
.question-comment { display: grid; gap: 9px; padding: 13px; border: 1px solid #e5ebf0; border-radius: 13px; background: #fbfcfd; }
.question-comment.teacher { border-color: #bddcf3; background: #f1f8fe; }
.question-detail-page .question-comment { padding: 14px; border: 1px solid #dfe8ed; border-radius: 14px; background: #f7fafb; }
.question-detail-page .question-comment.teacher { border-color: #c7deeb; background: #eef7fb; }
.question-comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #324e64; font-size: .73rem; }
.question-comment-head > span:last-child { margin-left: auto; color: #94a2ad; font-size: .65rem; }
.teacher-answer-badge { background: #d8edfc; color: #176da8; }
.question-comment-empty { padding: 28px 12px; border-radius: 12px; background: #f7f9fb; color: #8495a3; font-size: .78rem; text-align: center; }
.question-reply-form, .question-write-form, .question-admin-reply { display: grid; gap: 11px; }
.question-reply-form textarea, .question-write-form textarea, .question-admin-reply textarea { resize: vertical; line-height: 1.6; }
.question-reply-form .btn { justify-self: end; }
.question-comment-action { padding: 2px 0; border: 0; background: transparent; color: #748898; font-size: .67rem; font-weight: 800; cursor: pointer; }
.question-write-card { gap: 8px; }
.question-write-form { margin-top: 12px; }
.question-image-picker { display: grid; gap: 10px; padding: 14px; border: 1px solid #dfe8ee; border-radius: 14px; background: #f8fafb; }
.question-image-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.question-image-picker-head span, .question-image-picker > small { color: #7a8b98; font-size: .76rem; }
.question-image-add { display: inline-flex; width: fit-content; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid #c8d8e4; border-radius: 10px; background: #fff; color: #42657f; font-size: .84rem; font-weight: 850; cursor: pointer; }
.question-image-add span:first-child { font-size: 1.2rem; line-height: 1; }
.question-image-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.question-image-preview-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.question-image-preview-list.empty { display: block; padding: 13px; border: 1px dashed #ccd8e0; border-radius: 10px; color: #8a98a3; text-align: center; font-size: .78rem; }
.question-image-preview { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 11px; background: #e9eef2; }
.question-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.question-image-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(22, 34, 43, .78); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.question-post-image-count { width: fit-content; margin-top: -2px; padding: 4px 8px; border-radius: 999px; background: #edf5fa; color: #52738b; font-size: .7rem; font-weight: 850; }
.question-post-row .question-post-image-count { display: inline-flex; align-items: center; gap: 4px; margin-top: 0; padding: 0; border-radius: 0; background: transparent; color: #6d8495; font-size: .68rem; font-weight: 800; }
.question-post-row .question-post-image-count::before { content: ""; width: 12px; height: 10px; display: inline-block; border: 1.5px solid currentColor; border-radius: 3px; background: linear-gradient(145deg, transparent 52%, currentColor 53% 61%, transparent 62%); opacity: .75; }
.question-detail-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.question-detail-image-link { display: block; overflow: hidden; border-radius: 12px; background: #edf1f4; }
.question-detail-image-link:first-child:last-child { grid-column: 1 / -1; }
.question-detail-image-link img { display: block; width: 100%; max-height: 620px; object-fit: contain; }
.question-write-subject-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 4px; border: 0; border-bottom: 1px solid #dfe7ed; background: transparent; color: #20384c; font-size: 1rem; font-weight: 900; text-align: left; cursor: pointer; }
.question-write-subject-chevron { width: 11px; height: 11px; margin-right: 5px; border-right: 2px solid #47647a; border-bottom: 2px solid #47647a; transform: rotate(45deg) translateY(-3px); }
.question-subject-picker-overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center; }
.question-subject-picker-backdrop { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: rgba(20,31,40,.48); cursor: pointer; }
.question-subject-picker-sheet { position: relative; z-index: 1; width: min(100%, 420px); max-height: min(78svh, 720px); display: grid; grid-template-rows: auto auto minmax(0,1fr); padding: 9px 0 max(18px, env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -12px 34px rgba(19,39,55,.18); overflow: hidden; }
.question-subject-picker-handle { width: 38px; height: 5px; justify-self: center; border-radius: 99px; background: #e3e8ec; }
.question-subject-picker-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 62px; padding: 10px 54px; }
.question-subject-picker-head h2 { margin: 0; color: #20384c; font-size: 1.14rem; }
.question-subject-picker-close { position: absolute; right: 18px; top: 50%; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #536b7d; font-size: 1.55rem; line-height: 1; transform: translateY(-50%); cursor: pointer; }
.question-subject-options { min-height: 0; padding: 0 18px; overflow-y: auto; overscroll-behavior: contain; }
.question-subject-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 2px; border: 0; border-bottom: 1px solid #edf1f4; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.question-subject-option:last-child { border-bottom: 0; }
.question-subject-option:active { background: #f6f9fb; }
.question-subject-option-copy { min-width: 0; display: grid; gap: 5px; }
.question-subject-option-copy strong { color: #243b4d; font-size: .94rem; }
.question-subject-option-copy small { overflow: hidden; color: #81919e; font-size: .72rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.question-subject-option-arrow { flex: 0 0 auto; color: #9aa8b2; font-size: 1.45rem; }
.question-admin-report-alert { padding: 11px 13px; border: 1px solid #f0d2a0; border-radius: 10px; background: #fff8e9; color: #8a5c16; font-weight: 800; }
.question-admin-report-list { display: grid; gap: 10px; }
.question-admin-report-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid #ead8b9; border-radius: 12px; background: #fffbf4; }
.question-admin-report-item p { margin: 4px 0; color: #5f6670; }
.question-admin-report-item small { color: #8f999f; }
.question-board-admin-page .question-filter-scroll { margin: 12px 0 0; padding: 0 0 5px; }
.question-board-admin-page .question-status-tabs { margin-top: 8px; }
.question-admin-card.hidden-content, .question-comment.hidden-content { opacity: .58; }
.question-hidden-badge { background: #fbe4e4; color: #a94444; }
.question-admin-detail-head { margin-top: 14px; }

@media (max-width: 370px) {
  .study-cafe-footer-menu button, .study-cafe-footer-menu a { font-size: .5rem; }
  .question-write-button { right: 14px; }
}

@media (max-width: 520px) {
  .question-detail-images { grid-template-columns: 1fr; }
  .question-detail-image-link:first-child:last-child { grid-column: auto; }
}
.study-cafe-shop-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--room-accent, #347a78) 34%, white);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #245c63;
  padding: 4px 10px 4px 5px;
  white-space: nowrap;
}

.study-cafe-shop-chip > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f6c957;
  box-shadow: inset 0 -2px 0 rgba(133, 91, 12, 0.16);
  color: #654710;
  font-size: 0.7rem;
  font-weight: 900;
}

.study-cafe-shop-chip strong { font-size: 0.76rem; }

.student-study-cafe-page .study-cafe-shop-chip::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-left: 2px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.student-study-shop-page {
  width: min(760px, 100%);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  padding-bottom: calc(var(--student-footer-height) + var(--student-footer-bottom) + 28px);
}

.study-shop-page-head,
.study-character-shop-link,
.study-shop-point-card,
.study-shop-status-card,
.study-shop-history {
  border: 1px solid rgba(69, 111, 123, 0.16);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(39, 74, 86, 0.08);
}

.study-shop-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
}

.study-shop-page-head > div {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.study-shop-page-head > div span {
  color: #758b94;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.study-shop-page-head > div strong {
  color: #245c63;
  font-size: 1.25rem;
}

.study-shop-point-card {
  display: grid;
  gap: 8px;
  background: linear-gradient(145deg, #edf8f7, #f8fbff);
  padding: 17px;
}

.study-shop-point-card > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.study-shop-point-card > div:first-child span,
.study-shop-point-card small { color: #58717d; }
.study-shop-point-card > div:first-child strong { color: #256e70; font-size: 1.2rem; }
.study-shop-point-card p { margin: 0; color: #345b66; font-size: 0.83rem; }

.study-shop-point-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(52, 122, 120, 0.14);
}

.study-shop-point-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b8e8a, #f1bd4b);
  transition: width 220ms ease;
}

.study-shop-category-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 5px;
  scrollbar-width: none;
}

.study-shop-category-tabs::-webkit-scrollbar { display: none; }

.study-shop-category-button {
  min-height: 36px;
  flex: 0 0 auto;
  border: 1px solid #cfdee2;
  border-radius: 999px;
  background: #fff;
  color: #55717b;
  padding: 7px 13px;
  font-size: 0.78rem;
  font-weight: 800;
}

.study-shop-category-button.active {
  border-color: #477f8c;
  background: #477f8c;
  color: #fff;
}

.study-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.study-shop-item-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 9px;
  border: 1px solid #d9e5e8;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.study-shop-item-card.equipped {
  border-color: #5b9b95;
  box-shadow: 0 0 0 2px rgba(91, 155, 149, 0.12);
}

.study-shop-item-preview {
  min-height: 94px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #edf5f6, #fff8e7);
  font-size: 2.5rem;
}

.study-shop-item-preview.slot-hair {
  position: relative;
  overflow: hidden;
  min-height: 104px;
}

.study-shop-item-preview.slot-hair .study-cafe-avatar {
  top: 20px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) scale(1.15);
  transform-origin: center center;
}

.study-shop-hair-hint {
  margin: 0;
  color: #d2e4e9;
  font-size: .75rem;
  line-height: 1.5;
}

.study-shop-item-preview.item-outfit-coast-guard-uniform {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.9) 0 18px, transparent 19px),
    linear-gradient(180deg, #f2f5fa 0 65%, #d9e2ee 66%);
  font-size: 0;
}

.study-shop-item-preview.item-outfit-coast-guard-uniform::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 50%;
  width: 54px;
  height: 62px;
  border: 3px solid #090d1b;
  border-radius: 17px 17px 10px 10px;
  background:
    radial-gradient(circle at 50% 48%, #d8ae3e 0 2px, #8d6b2e 2.2px, transparent 2.7px),
    radial-gradient(circle at 50% 66%, #d8ae3e 0 2px, #8d6b2e 2.2px, transparent 2.7px),
    radial-gradient(circle at 50% 83%, #d8ae3e 0 2px, #8d6b2e 2.2px, transparent 2.7px),
    radial-gradient(ellipse at 35% 19%, #e2bd4c 0 2px, transparent 2.5px),
    radial-gradient(ellipse at 65% 19%, #e2bd4c 0 2px, transparent 2.5px),
    linear-gradient(#090c15, #090c15) 6px 24px / 13px 5px no-repeat,
    repeating-linear-gradient(90deg, #c83b35 0 3px, #e2b938 3px 6px, #3070a9 6px 9px, #4aa27d 9px 12px) 35px 24px / 14px 8px no-repeat,
    radial-gradient(circle at 42px 38px, #b64038 0 2px, #a6aa9e 2.5px 4px, transparent 4.5px),
    linear-gradient(#080b16, #080b16) 5px 36px / 15px 2px no-repeat,
    linear-gradient(#080b16, #080b16) 34px 36px / 15px 2px no-repeat,
    linear-gradient(90deg, transparent 0 44%, #080b14 45% 55%, transparent 56%) 0 0 / 100% 25px no-repeat,
    linear-gradient(58deg, transparent 0 47%, #121827 48% 60%, transparent 61%) left top / 50% 29px no-repeat,
    linear-gradient(-58deg, transparent 0 47%, #121827 48% 60%, transparent 61%) right top / 50% 29px no-repeat,
    linear-gradient(145deg, #242d47, #0c1122 78%);
  box-shadow: inset 0 -8px 0 #070a15, 0 6px 9px rgba(8, 15, 31, 0.28);
  transform: translateX(-50%);
}

.study-shop-item-preview.item-outfit-coast-guard-uniform::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 31px;
  left: 50%;
  width: 78px;
  height: 38px;
  border: 4px solid #0a0e1d;
  border-radius: 18px 18px 24px 24px;
  background:
    linear-gradient(90deg, transparent 0 5px, #e1ba47 5px 27px, transparent 27px 51px, #e1ba47 51px 73px, transparent 73px) 0 1px / 100% 5px no-repeat,
    linear-gradient(90deg, transparent 0 7px, #f3d25c 7px 26px, transparent 26px 52px, #f3d25c 52px 71px, transparent 71px) 0 6px / 100% 2px no-repeat,
    linear-gradient(180deg, #222b44, #0c1122 72%);
  transform: translateX(-50%);
}

.study-shop-item-preview.item-head-coast-guard-dress-cap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #eaf1f6, #f8f3e4);
  font-size: 0;
}

.study-shop-item-preview.item-head-coast-guard-dress-cap::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  z-index: 2;
  width: 68px;
  height: 41px;
  border: 3px solid #080b13;
  border-radius: 50% 50% 20% 20% / 38% 38% 18% 18%;
  background:
    url("./coast-guard-eagle-emblem.svg") center 3px / 48px 29px no-repeat,
    repeating-linear-gradient(135deg, #aeb5bc 0 2px, #e2e5e7 2px 3px, #707985 3px 5px) 0 29px / 100% 8px no-repeat,
    linear-gradient(180deg, #202638, #0a0d16 75%);
  box-shadow: inset 0 -2px 0 #d2aa36, 0 5px 9px rgba(12, 18, 28, 0.26);
  transform: translateX(-50%);
}

.study-shop-item-preview.item-head-coast-guard-dress-cap::after {
  content: "";
  position: absolute;
  top: 50px;
  left: 50%;
  z-index: 3;
  width: 82px;
  height: 22px;
  border: 3px solid #080b13;
  border-radius: 45% 45% 55% 55% / 30% 30% 70% 70%;
  background:
    linear-gradient(180deg, #dcb43c 0 3px, #6f5517 3px 5px, #181d2a 5px 100%);
  box-shadow: 0 5px 6px rgba(12, 18, 28, 0.24);
  transform: translateX(-50%);
}

.study-shop-item-copy { min-width: 0; display: grid; gap: 3px; }
.study-shop-item-copy > span { color: #6a858d; font-size: 0.66rem; font-weight: 800; }
.study-shop-item-copy > strong { color: #243f48; font-size: 0.92rem; }
.study-shop-item-copy p { margin: 0; color: #71858c; font-size: 0.72rem; line-height: 1.45; }

.study-shop-item-button,
.study-character-shop-button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: #477f8c;
  color: #fff;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.study-shop-item-button:disabled { background: #c5d1d4; color: #6b7c82; }
.study-shop-item-button.unequip { border: 1px solid #b7cbd0; background: #f4f8f9; color: #47646c; }
.study-shop-item-button.unequip:hover,
.study-shop-item-button.unequip:focus-visible { border-color: #7ea4aa; background: #e8f1f2; }
.study-shop-item-shortage { color: #a85b4d; font-size: 0.66rem; text-align: center; }

.study-shop-empty,
.study-shop-status-card {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 180px;
  padding: 24px;
  text-align: center;
}

.study-shop-status-card > span { font-size: 2rem; }
.study-shop-empty p,
.study-shop-status-card p { margin: 0; color: #71858c; }

.study-shop-history { overflow: hidden; }
.study-shop-history summary { cursor: pointer; padding: 15px 17px; color: #365d68; font-weight: 800; }
.study-shop-history > p { margin: 0; padding: 0 17px 17px; color: #71858c; }
.study-shop-history-list { border-top: 1px solid #e3ebed; }
.study-shop-history-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 17px; border-bottom: 1px solid #edf2f3; }
.study-shop-history-list > div:last-child { border-bottom: 0; }
.study-shop-history-list span { display: grid; gap: 2px; }
.study-shop-history-list small { color: #819298; }
.study-shop-history-list b.earned { color: #23806f; }
.study-shop-history-list b.spent { color: #a35a4e; }

.study-character-shop-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
}

.study-character-shop-link > div { display: grid; gap: 3px; }
.study-character-shop-link > div span { color: #71858c; font-size: 0.75rem; }
.study-character-shop-button { flex: 0 0 auto; }

.study-cafe-cosmetic {
  position: absolute;
  z-index: 9;
  display: grid;
  place-items: center;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(23, 47, 55, 0.2));
}

.study-cafe-avatar .study-cafe-cosmetic.head {
  top: -10px;
  left: 50%;
  font-size: 19px;
  transform: translateX(-50%);
}

.study-cafe-avatar-head > .study-cafe-avatar-face,
.study-cafe-avatar-head > .study-cafe-avatar-hair {
  animation: none;
}

.study-cafe-avatar .study-cafe-cosmetic.head.item-head-navy-cap,
.study-cafe-avatar .study-cafe-cosmetic.head.item-head-bucket-hat,
.study-cafe-avatar .study-cafe-cosmetic.head.item-head-coast-guard-dress-cap {
  transform: translateX(-50%) scale(0.88);
  transform-origin: center bottom;
}

.study-cafe-avatar .study-cafe-cosmetic.head.item-head-navy-cap,
.study-cafe-avatar .study-cafe-cosmetic.head.item-head-bucket-hat {
  /* Use the same item.icon as the shop instead of a different CSS drawing. */
  top: -13px;
  left: 24.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  font-size: 30px;
  line-height: 1;
}

.study-cafe-avatar .study-cafe-cosmetic.head.item-head-coast-guard-dress-cap {
  top: -5px;
  left: 24.5px;
  z-index: 10;
  width: 38px;
  height: 24px;
  font-size: 0;
  filter: drop-shadow(0 2px 1px rgba(6, 10, 18, 0.3));
}

.study-cafe-avatar .study-cafe-cosmetic.head.item-head-coast-guard-dress-cap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 17px;
  border: 1px solid #060811;
  border-radius: 50% 50% 20% 20% / 38% 38% 18% 18%;
  background:
    url("./coast-guard-eagle-emblem.svg") center 1px / 23px 14px no-repeat,
    repeating-linear-gradient(135deg, #aeb5bc 0 1px, #737c87 1px 2px) 0 12px / 100% 4px no-repeat,
    linear-gradient(180deg, #202638, #090c15 78%);
}

.study-cafe-avatar .study-cafe-cosmetic.head.item-head-coast-guard-dress-cap::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 9px;
  border: 1px solid #060811;
  border-radius: 45% 45% 55% 55% / 30% 30% 70% 70%;
  background: linear-gradient(180deg, #dcb43c 0 2px, #171c29 2px 100%);
}

.study-cafe-desk-cosmetics {
  position: absolute;
  inset: 0;
  z-index: 9;
  container-type: inline-size;
  pointer-events: none;
}

.study-cafe-desk-cosmetics .study-cafe-cosmetic {
  top: auto;
  bottom: 15px;
  display: block;
  width: 14px;
  height: 14px;
  font-size: 0;
  line-height: 0;
  filter: drop-shadow(0 1px 1px rgba(47, 38, 29, 0.2));
}

/* Fill the left/right back corners first, then the front corners. */
.study-cafe-desk-cosmetics .study-cafe-cosmetic:nth-child(1) { left: 1px; }
.study-cafe-desk-cosmetics .study-cafe-cosmetic:nth-child(2) { right: 1px; }
.study-cafe-desk-cosmetics .study-cafe-cosmetic:nth-child(3) { left: 1px; --desk-item-bottom: 0px; }
.study-cafe-desk-cosmetics .study-cafe-cosmetic:nth-child(4) { right: 1px; --desk-item-bottom: 0px; }

.study-cafe-seat .study-cafe-desk-cosmetics .study-cafe-cosmetic,
.study-cafe-my-seat-character .study-cafe-desk-cosmetics .study-cafe-cosmetic {
  transform: scale(0.68);
  transform-origin: center bottom;
}

.study-cafe-desk:has(.study-cafe-desk-cosmetics) .study-cafe-desk-book {
  left: 50%;
  width: min(31px, 42%);
  margin-left: max(-15.5px, -21%);
}

/* The second equipped item takes the cup's corner. */
.study-cafe-desk:has(.study-cafe-desk-cosmetics > :nth-child(2)) .study-cafe-desk-cup { opacity: 0; }

.study-cafe-desk-cosmetics .item-desk-sprout {
  bottom: 14px;
  width: 16px;
  height: 10px;
  border: 1px solid #a95f69;
  border-radius: 4px 4px 8px 8px;
  background:
    radial-gradient(circle at 35% 52%, #70434c 0 1px, transparent 1.5px),
    radial-gradient(circle at 65% 52%, #70434c 0 1px, transparent 1.5px),
    linear-gradient(90deg, #f6a8ac, #ffd0bf 54%, #eb929f);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.42);
}

.study-cafe-desk-cosmetics .item-desk-sprout::before {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 8px;
  width: 4px;
  height: 11px;
  border-radius: 999px;
  background: #5ca66d;
}

.study-cafe-desk-cosmetics .item-desk-sprout::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 16px;
  height: 10px;
  background:
    radial-gradient(ellipse at 24% 72%, #8bd49a 0 34%, transparent 38%),
    radial-gradient(ellipse at 50% 28%, #72c487 0 35%, transparent 39%),
    radial-gradient(ellipse at 77% 72%, #59ad73 0 34%, transparent 38%);
}

.study-cafe-desk-cosmetics .item-desk-lamp {
  bottom: 15px;
  width: 20px;
  height: 5px;
  border: 1px solid #9d6f82;
  border-radius: 50%;
  background: #e9a9bf;
  box-shadow: 0 1px 0 rgba(92, 61, 72, 0.22);
}

.study-cafe-desk-cosmetics .item-desk-lamp::before {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 4px;
  width: 6px;
  height: 14px;
  border: 1px solid #d0a176;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(90deg, #ffe8c5, #fff8e7 55%, #f4cf9e);
}

.study-cafe-desk-cosmetics .item-desk-lamp::after {
  content: "";
  position: absolute;
  left: -1px;
  bottom: 15px;
  width: 22px;
  height: 11px;
  border: 1px solid #a75e78;
  border-radius: 13px 13px 6px 6px;
  background:
    radial-gradient(circle at 30% 48%, #ffe8ef 0 2px, transparent 2.5px),
    radial-gradient(circle at 68% 38%, #ffe8ef 0 2px, transparent 2.5px),
    linear-gradient(180deg, #f6a8c1, #dd789c);
  box-shadow: 0 3px 7px rgba(255, 188, 116, 0.3);
}

.study-cafe-desk-cosmetics .item-desk-tumbler {
  bottom: 15px;
  width: 15px;
  height: 13px;
  border: 1px solid #778ab6;
  border-radius: 3px 3px 7px 7px;
  background: linear-gradient(90deg, #cfe5ff, #f8fbff 56%, #b5d4f4);
  box-shadow: inset 0 2px 0 #7e604e, 0 1px 0 rgba(53, 72, 107, 0.2);
}

.study-cafe-desk-cosmetics .item-desk-tumbler::before {
  content: "♥";
  position: absolute;
  left: 4px;
  top: 3px;
  color: #ef7891;
  font-size: 7px;
  line-height: 1;
}

.study-cafe-desk-cosmetics .item-desk-tumbler::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 3px;
  width: 6px;
  height: 7px;
  border: 2px solid #8ba6ca;
  border-left: 0;
  border-radius: 0 5px 5px 0;
}

.study-cafe-desk-cosmetics .item-desk-clock {
  bottom: 15px;
  width: 17px;
  height: 17px;
  border: 2px solid #9a75b6;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, #695170 0 1px, transparent 1.5px),
    radial-gradient(circle at 66% 38%, #695170 0 1px, transparent 1.5px),
    linear-gradient(145deg, #fff7ff, #ead8f4);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.48), 0 2px 0 -1px #70567c;
}

.study-cafe-desk-cosmetics .item-desk-clock::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -7px;
  width: 19px;
  height: 9px;
  background: #b990cf;
  clip-path: polygon(0 100%, 15% 0, 36% 100%, 64% 100%, 85% 0, 100% 100%);
}

.study-cafe-desk-cosmetics .item-desk-clock::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 5px;
  height: 4px;
  border-left: 1px solid #6d5877;
  border-bottom: 1px solid #6d5877;
  transform: rotate(-18deg);
}

.study-cafe-chair-back[class*="shop-chair-"] {
  top: 65px;
  width: 41px;
  height: 47px;
  border-width: 3px;
  border-radius: 13px 13px 8px 8px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), 0 4px 7px rgba(31, 48, 58, 0.24);
}

.study-cafe-chair-back[class*="shop-chair-"]::after {
  right: 6px;
  bottom: 8px;
  left: 6px;
  height: 3px;
  background: rgba(255, 255, 255, 0.36);
}

.study-cafe-chair-back.shop-chair-navy {
  border-color: #172d4b;
  border-radius: 15px 15px 7px 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 0 18%, transparent 18% 82%, rgba(255, 255, 255, 0.13) 82%),
    linear-gradient(145deg, #6886ad, #263d60 72%);
  box-shadow: inset 0 0 0 2px rgba(182, 211, 245, 0.32), -3px 3px 0 #203552, 3px 3px 0 #203552, 0 5px 8px rgba(24, 43, 68, 0.3);
}

.study-cafe-chair-back.shop-chair-mint {
  border-color: #34796c;
  border-radius: 18px 18px 10px 10px;
  background:
    radial-gradient(circle at 30% 32%, rgba(255, 255, 255, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 32%, rgba(255, 255, 255, 0.72) 0 2px, transparent 3px),
    linear-gradient(145deg, #a9e4d2, #4b9c89 72%);
  box-shadow: inset 0 0 0 3px rgba(224, 255, 247, 0.46), 0 5px 9px rgba(50, 119, 105, 0.28);
}

.study-cafe-chair-back.shop-chair-rose {
  border-color: #91485d;
  border-radius: 50% 50% 11px 11px / 22% 22% 11px 11px;
  background:
    radial-gradient(circle at 32% 36%, #ffe2e8 0 2px, transparent 3px),
    radial-gradient(circle at 68% 36%, #ffe2e8 0 2px, transparent 3px),
    radial-gradient(circle at 50% 61%, #f7bdc8 0 2px, transparent 3px),
    linear-gradient(145deg, #edb2bd, #aa5369 76%);
  box-shadow: inset 0 0 0 3px rgba(255, 226, 232, 0.38), 0 5px 9px rgba(126, 55, 75, 0.29);
}

.study-cafe-chair-back.shop-chair-premium {
  top: auto;
  bottom: 34px;
  width: min(96px, 70%);
  height: auto;
  aspect-ratio: 48 / 43;
  border-width: 4px;
  border-color: #8b6414;
  border-radius: 25px 25px 10px 10px;
  background:
    radial-gradient(circle at 50% 34%, #fff2aa 0 3px, transparent 4px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 45%),
    linear-gradient(145deg, #ffd96f, #a86f16 78%);
  box-shadow: inset 0 0 0 4px rgba(255, 247, 195, 0.64), -5px 5px 0 #8e681b, 5px 5px 0 #8e681b, 0 8px 13px rgba(92, 62, 10, 0.4);
}

.study-cafe-chair-back.shop-chair-premium::before {
  content: "◆";
  position: absolute;
  top: -14px;
  left: 50%;
  color: #f6c744;
  font-size: clamp(12px, 14%, 18px);
  line-height: 1;
  text-shadow: 0 1px 0 #7e5910;
  transform: translateX(-50%);
}

.study-shop-item-preview.slot-chair {
  --chair-preview-border: #263d60;
  --chair-preview-top: #6886ad;
  --chair-preview-bottom: #263d60;
  position: relative;
  overflow: hidden;
  font-size: 0;
}

.study-shop-item-preview.slot-chair::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 50%;
  width: 48px;
  height: 52px;
  border: 4px solid var(--chair-preview-border);
  border-radius: 15px 15px 8px 8px;
  background: linear-gradient(145deg, var(--chair-preview-top), var(--chair-preview-bottom));
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3), 0 5px 8px rgba(35, 54, 65, 0.22);
  transform: translateX(-50%);
}

.study-shop-item-preview.slot-chair::after {
  content: "";
  position: absolute;
  z-index: 3;
  bottom: 15px;
  left: 50%;
  width: 60px;
  height: 18px;
  border: 4px solid var(--chair-preview-border);
  border-radius: 9px 9px 13px 13px;
  background: var(--chair-preview-top);
  box-shadow: -18px 14px 0 -7px var(--chair-preview-border), 18px 14px 0 -7px var(--chair-preview-border);
  transform: translateX(-50%);
}

.study-shop-item-preview.item-chair-navy {
  --chair-preview-border: #172d4b;
  --chair-preview-top: #6886ad;
  --chair-preview-bottom: #263d60;
  background: linear-gradient(145deg, #dbe8f7, #8aa5c8);
}

.study-shop-item-preview.item-chair-navy::before {
  border-radius: 12px 12px 5px 5px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0 20%, transparent 20% 80%, rgba(255, 255, 255, 0.15) 80%),
    linear-gradient(145deg, var(--chair-preview-top), var(--chair-preview-bottom));
}

.study-shop-item-preview.item-chair-mint {
  --chair-preview-border: #34796c;
  --chair-preview-top: #a9e4d2;
  --chair-preview-bottom: #4b9c89;
  background: linear-gradient(145deg, #e3faf3, #91d5c3);
}

.study-shop-item-preview.item-chair-mint::before {
  width: 52px;
  border-radius: 24px 24px 11px 11px;
  background:
    radial-gradient(circle at 30% 34%, #effffb 0 3px, transparent 4px),
    radial-gradient(circle at 70% 34%, #effffb 0 3px, transparent 4px),
    linear-gradient(145deg, var(--chair-preview-top), var(--chair-preview-bottom));
}

.study-shop-item-preview.item-chair-rose {
  --chair-preview-border: #91485d;
  --chair-preview-top: #edb2bd;
  --chair-preview-bottom: #aa5369;
  background: linear-gradient(145deg, #fff0f3, #e4a5b2);
}

.study-shop-item-preview.item-chair-rose::before {
  width: 54px;
  height: 55px;
  border-radius: 50% 50% 10px 10px / 28% 28% 10px 10px;
  background:
    radial-gradient(circle at 32% 38%, #ffe8ed 0 3px, transparent 4px),
    radial-gradient(circle at 68% 38%, #ffe8ed 0 3px, transparent 4px),
    radial-gradient(circle at 50% 64%, #f8c3cd 0 3px, transparent 4px),
    linear-gradient(145deg, var(--chair-preview-top), var(--chair-preview-bottom));
}

.study-shop-item-preview.item-chair-premium {
  --chair-preview-border: #8b6414;
  --chair-preview-top: #ffd96f;
  --chair-preview-bottom: #a86f16;
  background: linear-gradient(145deg, #fff8d9, #efc85c);
}

.study-shop-item-preview.item-chair-premium::before {
  top: 10px;
  width: 57px;
  height: 59px;
  border-width: 5px;
  border-radius: 20px 20px 7px 7px;
  background:
    radial-gradient(circle at 50% 34%, #fff5b8 0 5px, transparent 6px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 44%),
    linear-gradient(145deg, var(--chair-preview-top), var(--chair-preview-bottom));
  box-shadow: inset 0 0 0 4px rgba(255, 248, 202, 0.48), -4px 3px 0 #9c741f, 4px 3px 0 #9c741f, 0 6px 9px rgba(92, 62, 10, 0.3);
}

.study-shop-item-preview.item-chair-premium::after {
  width: 67px;
  border-width: 5px;
}

.study-cafe-desk-cosmetics .study-cafe-cosmetic[class*="item-desk-"] {
  bottom: var(--desk-item-bottom, 14px);
  width: min(13px, 18cqi);
  height: min(13px, 18cqi);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: initial;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: min(12px, 16cqi);
  font-style: normal;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(47, 38, 29, 0.2));
}

.study-cafe-desk-cosmetics .study-cafe-cosmetic[class*="item-desk-"]::before,
.study-cafe-desk-cosmetics .study-cafe-cosmetic[class*="item-desk-"]::after {
  content: none;
}

.study-cafe-seat .study-cafe-desk-cosmetics .study-cafe-cosmetic[class*="item-desk-"],
.study-cafe-my-seat-character .study-cafe-desk-cosmetics .study-cafe-cosmetic[class*="item-desk-"] {
  transform: none;
}

@media (min-width: 700px) {
  .study-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .study-cafe-room-toolbar-actions { flex-wrap: wrap; }
  .study-cafe-shop-chip { min-height: 30px; padding-right: 8px; }
  .study-cafe-shop-chip > span { width: 21px; height: 21px; }
  .study-character-shop-link { align-items: flex-start; }
  .study-character-shop-link > div span { max-width: 190px; }
}

.readonly-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 800;
}

.teacher-account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

/* Online student surface hierarchy: one background, one content-card level. */
body.student-online-mode:not(.student-home-route) .content-area {
  gap: 12px;
}

body.student-online-mode:not(.student-home-route) .study-timer-page-head,
body.student-online-mode:not(.student-home-route) .study-ranking-page-head {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 7px 3px 9px;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .study-timer-page-head h2,
body.student-online-mode:not(.student-home-route) .study-ranking-page-head h2 {
  color: #fff;
}

body.student-online-mode:not(.student-home-route) .study-timer-page-head > div span,
body.student-online-mode:not(.student-home-route) .study-ranking-page-head > div span {
  color: #9fd3e7;
}

body.student-online-mode:not(.student-home-route) .study-timer-active-chip,
body.student-online-mode:not(.student-home-route) .study-ranking-my-chip {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

body.student-online-mode:not(.student-home-route) .study-ranking-back-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

body.student-online-mode:not(.student-home-route) .question-board-head:not(.compact) {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 2px 0 18px;
}

body.student-online-mode:not(.student-home-route) .question-board-head:not(.compact) h2 {
  color: #f5f8fa;
  font-size: 1.25rem;
  font-weight: 800;
}

body.student-online-mode:not(.student-home-route) .question-board-head:not(.compact) > p {
  color: rgba(224,235,242,.72);
  font-size: .78rem;
}

body.student-online-mode:not(.student-home-route) .question-board-kicker {
  display: none;
}

body.student-online-mode:not(.student-home-route) .question-board-page > .question-filter-scroll {
  margin: 0 -16px;
  padding: 2px 16px 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.student-online-mode:not(.student-home-route) .question-board-page > .question-filter-scroll .question-filter-button {
  border-color: rgba(211,228,238,.28);
  background: rgba(255,255,255,.08);
  color: #dce8ef;
}

body.student-online-mode:not(.student-home-route) .question-board-page > .question-filter-scroll .question-filter-button.active {
  border-color: #226f78;
  background: #226f78;
  color: #fff;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .question-board-list-page {
  padding: 8px 2px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .question-board-search-trigger {
  color: #edf5f8;
}

body.student-online-mode:not(.student-home-route) .question-board-list-section {
  border-top-color: rgba(218,232,240,.18);
}

body.student-online-mode:not(.student-home-route) .question-board-list-head,
body.student-online-mode:not(.student-home-route) .question-comments-head {
  color: #edf5f8;
}

body.student-online-mode:not(.student-home-route) .question-board-list-head > span {
  color: rgba(218,231,238,.62);
}

body.student-online-mode:not(.student-home-route) .question-board-page .question-post-card,
body.student-online-mode:not(.student-home-route) .question-post-row {
  appearance: none;
  border: 1px solid rgba(232,241,245,.28) !important;
  border-radius: 16px;
  background: rgba(219,231,236,.92) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 3px 10px rgba(2,18,33,.055);
  backdrop-filter: blur(8px);
}

body.student-online-mode:not(.student-home-route) .question-board-page .question-post-card:active,
body.student-online-mode:not(.student-home-route) .question-post-row:active {
  background: rgba(231,239,242,.96) !important;
}

body.student-online-mode:not(.student-home-route) .question-post-skeleton {
  border-color: rgba(232,241,245,.22);
  background: rgba(219,231,236,.82);
  box-shadow: 0 3px 10px rgba(2,18,33,.04);
}

body.student-online-mode:not(.student-home-route) .question-post-row .question-post-title {
  color: #142f43;
}

body.student-online-mode:not(.student-home-route) .question-post-row .question-post-meta,
body.student-online-mode:not(.student-home-route) .question-post-author,
body.student-online-mode:not(.student-home-route) .question-post-comment-summary,
body.student-online-mode:not(.student-home-route) .question-post-comment-summary strong {
  color: #607887;
}

body.student-online-mode:not(.student-home-route) .question-subject-tag {
  background: rgba(26,75,100,.09);
  color: #526d7c;
}

body.student-online-mode:not(.student-home-route) .question-post-comment-icon::after {
  background: #dbe7ec;
}

body.student-online-mode:not(.student-home-route) .question-board-list-empty,
body.student-online-mode:not(.student-home-route) .question-board-guide {
  border-color: rgba(216,230,238,.18);
  background: rgba(255,255,255,.06);
  box-shadow: none;
  color: rgba(220,232,239,.72);
}

body.student-online-mode:not(.student-home-route) .question-board-list-empty strong,
body.student-online-mode:not(.student-home-route) .question-board-guide strong {
  color: #edf5f8;
}

body.student-online-mode:not(.student-home-route) .question-detail-page {
  margin: 0;
  padding: 4px 2px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-back-button {
  border-color: rgba(211,228,238,.22);
  background: rgba(255,255,255,.08);
  color: #dce8ef;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-detail-card,
body.student-online-mode:not(.student-home-route) .question-detail-page .question-comments-section {
  padding: 18px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-detail-card {
  padding: 14px 0 24px;
  border: 0;
  border-bottom: 1px solid rgba(211,228,238,.2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-detail-card h2,
body.student-online-mode:not(.student-home-route) .question-detail-page .question-comments-head {
  color: #f3f6f8;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-detail-card h2 {
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.5;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-subject-tag {
  min-height: 0;
  padding: 0;
  background: transparent;
  color: rgba(190,211,222,.62);
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-post-meta {
  color: rgba(194,213,223,.66);
  font-size: .68rem;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-detail-body,
body.student-online-mode:not(.student-home-route) .question-detail-page .question-comment-body {
  color: rgba(231,239,244,.86);
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-detail-body {
  min-height: 0;
  border-top-color: rgba(218,232,240,.16);
  font-size: .88rem;
  line-height: 1.8;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-detail-actions .mini-btn {
  min-height: 28px;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: rgba(205,220,228,.62);
  font-size: .68rem;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-comment {
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid rgba(216,230,238,.14);
  border-radius: 0;
  background: transparent;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-comment.teacher {
  border-color: rgba(92,176,181,.34);
  background: rgba(42,140,130,.12);
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-comment-head {
  color: #e8f1f5;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-comment-empty {
  border: 1px solid rgba(216,230,238,.14);
  background: rgba(255,255,255,.055);
  color: rgba(220,232,239,.68);
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-reply-form textarea {
  min-height: 86px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: #f2f6f8;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-reply-form textarea::placeholder {
  color: rgba(215,228,235,.62);
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-reply-form .btn {
  width: auto;
  min-width: 96px;
  min-height: 40px;
  justify-self: end;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: #218c83;
  color: #fff;
  box-shadow: none;
}

body.student-online-mode:not(.student-home-route) .question-detail-page .question-reply-form {
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(211,228,238,.2);
  border-radius: 14px;
  background: rgba(137,174,193,.09);
}

body.student-online-mode:not(.student-home-route) .student-push-settings-back {
  border-bottom-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

body.student-online-mode:not(.student-home-route) .panel,
body.student-online-mode:not(.student-home-route) .student-profile-card,
body.student-online-mode:not(.student-home-route) .student-history-button-card,
body.student-online-mode:not(.student-home-route) .student-push-settings-card,
body.student-online-mode:not(.student-home-route) .student-notice-detail,
body.student-online-mode:not(.student-home-route) .student-notification-list,
body.student-online-mode:not(.student-home-route) .student-notification-empty,
body.student-online-mode:not(.student-home-route) .study-character-preview-card,
body.student-online-mode:not(.student-home-route) .study-character-options-card,
body.student-online-mode:not(.student-home-route) .study-todo-progress-card,
body.student-online-mode:not(.student-home-route) .study-todo-subject-card,
body.student-online-mode:not(.student-home-route) .study-todo-month-calendar {
  border: 1px solid #d5e0e7;
  box-shadow: none;
}

/* Planner and My use one restrained navy/mint surface palette. */
body.student-online-mode .student-planner-view-switch {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

body.student-online-mode .student-planner-view-option {
  color: rgba(232, 241, 247, 0.76);
}

body.student-online-mode .student-planner-view-option.active {
  background: #fff;
  color: #17475f;
  box-shadow: none;
}

body.student-online-mode .study-todo-calendar-button,
body.student-online-mode .study-todo-calendar-back,
body.student-online-mode .study-todo-month-calendar-head button {
  background: #edf3f5;
  color: #24566c;
}

body.student-online-mode .study-cafe-planner-entry-guide,
body.student-online-mode .study-cafe-planner-entry-guide.ready {
  border-color: #d4e2e3;
  background: #f4f8f8;
}

body.student-online-mode .study-cafe-planner-entry-guide.ready {
  border-color: #b9d9d2;
}

body.student-online-mode .study-cafe-planner-entry-copy > span,
body.student-online-mode .study-todo-progress-card > div strong {
  color: #176d68;
}

body.student-online-mode .study-todo-progress-card {
  border-color: #d4e2e3;
  background: #f4f8f8;
}

body.student-online-mode .study-todo-progress-track {
  background: #d9e8e5;
}

body.student-online-mode .study-todo-progress-track i {
  background: #2b8d83;
}

body.student-online-mode .study-todo-current-subject,
body.student-online-mode .study-todo-goal-result.on-time {
  background: #e3f1ee;
  color: #176d68 !important;
}

body.student-online-mode .study-todo-add-button,
body.student-online-mode .study-todo-submit-button {
  background: #24566c;
  box-shadow: none;
}

body.student-online-mode .student-mypage .student-profile-card,
body.student-online-mode .student-mypage .student-history-button-card {
  border-color: #d5e0e7;
  background: #fff;
}

body.student-online-mode .student-mypage .student-avatar {
  background: #e3f1ee;
  color: #176d68;
}

body.student-online-mode .student-mypage .student-profile-item {
  border-top-color: #e3eaee;
}

body.student-online-mode .student-mypage .student-profile-note {
  background: #f3f6f7;
}

body.student-online-mode .student-mypage .mini-btn {
  border-color: #cbdeda;
  background: #edf5f3;
  color: #176d68;
}

body.student-online-mode .student-mypage .student-settings-chevron {
  color: #4a7c7a;
}

body.student-online-mode .normal-student-footer button.active,
body.student-online-mode .normal-student-footer a.active,
body.student-online-mode .normal-student-footer button:active,
body.student-online-mode .normal-student-footer a:active {
  background: #e3f1ee;
  color: #176d68;
}

/* Brand dark UI for Planner and My: simple hierarchy with one RONPARK accent. */
body.student-online-mode {
  --online-brand-accent: #2a8c82;
  --online-ui-surface: #163a59;
  --online-ui-surface-strong: #1b4263;
  --online-ui-text: #f2f4f6;
  --online-ui-muted: #9bb1c3;
  --online-ui-line: rgba(255, 255, 255, 0.09);
}

body.student-online-mode .student-planner-view-switch {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px;
}

body.student-online-mode .student-planner-view-option {
  color: var(--online-ui-muted);
}

body.student-online-mode .student-planner-view-option.active {
  background: var(--online-brand-accent);
  color: #fff;
}

body.student-online-mode .study-todo-calendar-button,
body.student-online-mode .study-todo-calendar-back,
body.student-online-mode .study-todo-month-calendar-head button {
  border: 0;
  background: rgba(255, 255, 255, 0.09);
  color: #dce9f3;
}

body.student-online-mode .student-planner-month-button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.student-online-mode .study-todo-date-navigation,
body.student-online-mode .study-todo-progress-card,
body.student-online-mode .study-todo-subject-card,
body.student-online-mode .study-todo-month-calendar,
body.student-online-mode .study-cafe-planner-entry-guide,
body.student-online-mode .study-cafe-planner-entry-guide.ready {
  border: 1px solid var(--online-ui-line);
  background: var(--online-ui-surface);
  box-shadow: none;
}

body.student-online-mode .study-todo-date-arrow {
  background: rgba(255, 255, 255, 0.07);
  color: #dce9f3;
}

body.student-online-mode .study-todo-date-current strong,
body.student-online-mode .study-todo-month-calendar-head strong,
body.student-online-mode .study-todo-calendar-selected-date strong,
body.student-online-mode .study-todo-subject-head strong,
body.student-online-mode .study-cafe-planner-entry-copy > strong {
  color: var(--online-ui-text);
}

body.student-online-mode .study-todo-progress-card > div span,
body.student-online-mode .study-todo-progress-card p,
body.student-online-mode .study-todo-subject-head span,
body.student-online-mode .study-todo-calendar-selected-date span,
body.student-online-mode .study-cafe-planner-entry-copy > p,
body.student-online-mode .study-cafe-planner-entry-waiting,
body.student-online-mode .study-todo-date-loading {
  color: var(--online-ui-muted);
}

body.student-online-mode .study-todo-progress-card > div strong,
body.student-online-mode .study-cafe-planner-entry-copy > span {
  color: #83d0c5;
}

body.student-online-mode .study-todo-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

body.student-online-mode .study-todo-progress-track i {
  background: var(--online-brand-accent);
}

body.student-online-mode .study-todo-goal-select,
body.student-online-mode .study-todo-input {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--online-ui-surface-strong);
  color: var(--online-ui-text);
}

body.student-online-mode .study-todo-item {
  background: rgba(255, 255, 255, 0.055);
}

body.student-online-mode .study-todo-item > span {
  color: #dce7ef;
}

body.student-online-mode .study-todo-delete-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--online-ui-muted);
}

body.student-online-mode .study-todo-add-button,
body.student-online-mode .study-todo-submit-button {
  background: var(--online-brand-accent);
}

body.student-online-mode .study-todo-current-subject,
body.student-online-mode .study-todo-goal-result.on-time {
  background: rgba(42, 140, 130, 0.19);
  color: #83d0c5 !important;
}

body.student-online-mode .study-todo-month-weekdays span,
body.student-online-mode .study-todo-month-legend,
body.student-online-mode .study-todo-month-day {
  color: var(--online-ui-muted);
}

body.student-online-mode .study-todo-month-day.selected {
  border-color: var(--online-brand-accent);
  background: var(--online-brand-accent);
  color: #fff;
}

body.student-online-mode .student-mypage .student-profile-card,
body.student-online-mode .student-mypage .student-history-button-card {
  border: 1px solid var(--online-ui-line);
  background: var(--online-ui-surface);
  box-shadow: none;
}

body.student-online-mode .student-mypage .student-profile-head h2,
body.student-online-mode .student-mypage .student-profile-item strong,
body.student-online-mode .student-mypage .student-history-head h2 {
  color: var(--online-ui-text);
}

body.student-online-mode .student-mypage .student-profile-head span,
body.student-online-mode .student-mypage .student-profile-item span,
body.student-online-mode .student-mypage .student-history-head span {
  color: var(--online-ui-muted);
}

body.student-online-mode .student-mypage .student-avatar {
  background: rgba(42, 140, 130, 0.2);
  color: #83d0c5;
}

body.student-online-mode .student-mypage .student-profile-item {
  border-top-color: var(--online-ui-line);
}

body.student-online-mode .student-mypage .student-profile-note {
  background: rgba(255, 255, 255, 0.055);
  color: var(--online-ui-muted);
}

body.student-online-mode .student-mypage .mini-btn {
  border: 0;
  background: rgba(42, 140, 130, 0.18);
  color: #83d0c5;
}

body.student-online-mode .student-mypage .student-settings-chevron {
  color: #74bbb3;
}

body.student-online-mode .normal-student-footer {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(14, 42, 67, 0.96);
  box-shadow: 0 8px 24px rgba(0, 12, 28, 0.18);
  backdrop-filter: blur(16px);
}

body.student-online-mode .normal-student-footer button,
body.student-online-mode .normal-student-footer a {
  color: #8fa6b9;
}

body.student-online-mode .normal-student-footer button.active,
body.student-online-mode .normal-student-footer a.active,
body.student-online-mode .normal-student-footer button:active,
body.student-online-mode .normal-student-footer a:active {
  background: rgba(42, 140, 130, 0.2);
  color: #83d0c5;
}

/* Planner uses a brighter tonal surface while keeping the shared navy app background. */
body.student-online-mode .student-planner-view-switch {
  border: 1px solid rgba(207, 226, 232, 0.34);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.student-online-mode .student-planner-view-option {
  color: rgba(239, 246, 249, 0.82);
}

body.student-online-mode .student-planner-view-option.active {
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 2px 7px rgba(7, 31, 50, 0.14);
}

body.student-online-mode .student-planner-solo-title {
  border-color: rgba(207, 226, 232, 0.28);
  background: rgba(255, 255, 255, 0.09);
  color: #f2f6f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.student-online-mode .study-todo-calendar-button,
body.student-online-mode .study-todo-calendar-back,
body.student-online-mode .study-todo-month-calendar-head button,
body.student-online-mode .study-todo-date-arrow {
  background: #dce7ea;
  color: #214b60;
}

body.student-online-mode .study-todo-date-navigation,
body.student-online-mode .study-todo-progress-card,
body.student-online-mode .study-todo-subject-card,
body.student-online-mode .study-todo-month-calendar,
body.student-online-mode .study-cafe-planner-entry-guide,
body.student-online-mode .study-cafe-planner-entry-guide.ready {
  border-color: #d0dde2;
  background: #e9f0f2;
}

body.student-online-mode .study-todo-date-current strong,
body.student-online-mode .study-todo-month-calendar-head strong,
body.student-online-mode .study-todo-calendar-selected-date strong,
body.student-online-mode .study-todo-subject-head strong,
body.student-online-mode .study-cafe-planner-entry-copy > strong {
  color: #173b52;
}

body.student-online-mode .study-todo-progress-card > div span,
body.student-online-mode .study-todo-progress-card p,
body.student-online-mode .study-todo-subject-head span,
body.student-online-mode .study-todo-calendar-selected-date span,
body.student-online-mode .study-cafe-planner-entry-copy > p,
body.student-online-mode .study-cafe-planner-entry-waiting,
body.student-online-mode .study-todo-date-loading {
  color: #60798c;
}

body.student-online-mode .study-todo-progress-card > div strong,
body.student-online-mode .study-cafe-planner-entry-copy > span {
  color: #1f766f;
}

body.student-online-mode .study-todo-progress-track {
  background: #d3e2e1;
}

body.student-online-mode .study-todo-goal-select,
body.student-online-mode .study-todo-input {
  border-color: #cad8de;
  background: #f7f9fa;
  color: #24465a;
}

body.student-online-mode .study-todo-item {
  background: #dde7ea;
}

body.student-online-mode .study-todo-item > span {
  color: #29495c;
}

body.student-online-mode .study-todo-delete-button {
  background: #d3dfe3;
  color: #637988;
}

body.student-online-mode .study-todo-current-subject,
body.student-online-mode .study-todo-goal-result.on-time {
  background: #d8ebe7;
  color: #176d68 !important;
}

body.student-online-mode .study-todo-month-weekdays span,
body.student-online-mode .study-todo-month-legend,
body.student-online-mode .study-todo-month-day {
  color: #607486;
}

/* My uses the same bright blue-gray surfaces as Planner. */
body.student-online-mode .student-mypage .student-profile-card,
body.student-online-mode .student-mypage .student-history-button-card,
body.student-online-mode .student-mypage .student-install-card {
  border: 1px solid #d0dde2;
  background: #e9f0f2;
  box-shadow: none;
}

body.student-online-mode .student-mypage .student-profile-head h2,
body.student-online-mode .student-mypage .student-profile-item strong,
body.student-online-mode .student-mypage .student-history-head h2,
body.student-online-mode .student-mypage .student-install-card strong {
  color: #173b52;
}

body.student-online-mode .student-mypage .student-profile-head span,
body.student-online-mode .student-mypage .student-profile-item span,
body.student-online-mode .student-mypage .student-history-head span,
body.student-online-mode .student-mypage .student-install-card p {
  color: #60798c;
}

body.student-online-mode .student-mypage .student-avatar {
  background: #d8ebe7;
  color: #176d68;
}

body.student-online-mode .student-mypage .student-profile-item {
  border-top-color: #d3dfe3;
}

body.student-online-mode .student-mypage .student-profile-note {
  background: #dde7ea;
  color: #60798c;
}

body.student-online-mode .student-mypage .mini-btn,
body.student-online-mode .student-mypage .student-install-card .btn.secondary {
  border: 1px solid #bdd7d2;
  background: #d8ebe7;
  color: #176d68;
}

body.student-online-mode .student-mypage .student-settings-chevron {
  color: #2a7770;
}

.student-home .student-interview-registration {
  border: 2px solid #238c7b;
  background: #e1f5f0;
  padding: 16px;
  box-shadow: 0 3px 10px rgba(18, 92, 80, 0.12);
  text-decoration: none;
}

.student-home .student-interview-registration .lecture-home-shortcut-icon {
  background: #c2e9df;
  color: #125c50;
}

.student-home .student-interview-registration .lecture-home-shortcut-copy strong {
  color: #125c50;
  font-size: 0.95rem;
  line-height: 1.5;
}

.student-home .student-interview-registration .lecture-home-shortcut-copy > span {
  color: #27675b;
  font-size: 0.78rem;
  font-weight: 700;
}

.student-home .student-interview-registration .lecture-home-shortcut-chevron {
  color: #125c50;
  font-weight: 700;
}

.student-home .student-interview-registration:hover,
.student-home .student-interview-registration:active {
  background: #c2e9df;
}

.student-home .student-interview-registration:focus-visible {
  outline: 3px solid #125c50;
  outline-offset: 3px;
}

/* Curriculum tab follows Planner's bright surfaces and clear item boundaries. */
body.student-online-mode .student-planner-hub.curriculum .curriculum-subject-tabs {
  gap: 5px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  padding: 5px;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-subject-tab {
  flex: 1 0 auto;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(239, 246, 249, 0.82);
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-subject-tab.active {
  background: #2a8c82;
  color: #fff;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-overview-card,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card,
body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-section,
body.student-online-mode .student-planner-hub.curriculum .curriculum-after-lecture-section,
body.student-online-mode .student-planner-hub.curriculum .curriculum-task-card {
  border: 1px solid #d0dde2;
  background: #e9f0f2;
  box-shadow: none;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-subject-mark,
body.student-online-mode .student-planner-hub.curriculum .curriculum-subject-mark.indigo,
body.student-online-mode .student-planner-hub.curriculum .curriculum-subject-mark.teal,
body.student-online-mode .student-planner-hub.curriculum .curriculum-subject-mark.violet {
  background: #2a8c82;
  box-shadow: none;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-overview-copy h3,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-title,
body.student-online-mode .student-planner-hub.curriculum .curriculum-detail-section-head strong,
body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-copy span,
body.student-online-mode .student-planner-hub.curriculum .curriculum-finish-copy strong,
body.student-online-mode .student-planner-hub.curriculum .curriculum-task-copy strong {
  color: #173b52;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-overview-copy p,
body.student-online-mode .student-planner-hub.curriculum .curriculum-overview-progress,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-topline small,
body.student-online-mode .student-planner-hub.curriculum .curriculum-detail-section-head small,
body.student-online-mode .student-planner-hub.curriculum .curriculum-finish-copy span,
body.student-online-mode .student-planner-hub.curriculum .curriculum-task-copy span {
  color: #60798c;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-overview-progress strong,
body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-copy strong {
  color: #1f766f;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-progress-track {
  background: #d3e2e1;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-progress-track i {
  background: #2a8c82;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-list {
  gap: 12px;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-list::before {
  display: none;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-phase-label {
  color: #84c9c0;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-phase-label span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-phase-label i {
  background: rgba(255, 255, 255, 0.14);
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card {
  min-height: 104px;
  padding: 14px 15px 14px 4px;
  border-radius: 16px;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card.current {
  border-color: #72b9b1;
  background: #f1f6f7;
  box-shadow: inset 0 0 0 1px rgba(42, 140, 130, 0.12);
  transform: none;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card.completed {
  border-color: #bdd8d3;
  background: #e3eeed;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card.locked {
  border-color: #d0dbe0;
  background: #dfe7ea;
  opacity: 1;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card::after {
  background: #b8c8cf;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card.current::after,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card.completed::after {
  background: #2a8c82;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card.current .curriculum-stage-node,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-card.completed .curriculum-stage-node {
  border-color: #2a8c82;
  background: #2a8c82;
  color: #fff;
  box-shadow: none;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-meta > span {
  border-color: #cad8de;
  background: #f5f8f9;
  color: #60798c;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-meta > span.active,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-meta > span.done,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-status.current,
body.student-online-mode .student-planner-hub.curriculum .curriculum-stage-status.completed {
  border-color: #bdd8d3;
  background: #d8ebe7;
  color: #176d68;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-section,
body.student-online-mode .student-planner-hub.curriculum .curriculum-after-lecture-section {
  border-radius: 16px;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-detail-section-head {
  border-bottom-color: #cfdbdf;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-section-number,
body.student-online-mode .student-planner-hub.curriculum .curriculum-section-count.completed {
  background: #d8ebe7;
  color: #176d68;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-list,
body.student-online-mode .student-planner-hub.curriculum .curriculum-finish-list {
  display: grid;
  gap: 8px;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-row,
body.student-online-mode .student-planner-hub.curriculum .curriculum-finish-task {
  min-height: 58px;
  border: 1px solid #d4e0e4;
  border-radius: 12px;
  background: #f7f9fa;
  padding: 9px 11px;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-check,
body.student-online-mode .student-planner-hub.curriculum .curriculum-finish-icon,
body.student-online-mode .student-planner-hub.curriculum .curriculum-task-check {
  border-color: #afc3cb;
  background: #fff;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-lecture-row.completed .curriculum-lecture-check,
body.student-online-mode .student-planner-hub.curriculum .curriculum-finish-task.completed .curriculum-finish-icon,
body.student-online-mode .student-planner-hub.curriculum .curriculum-task-card.completed .curriculum-task-check {
  border-color: #2a8c82;
  background: #2a8c82;
}

body.student-online-mode .student-planner-hub.curriculum .curriculum-task-card.completed {
  border-color: #bdd8d3;
  background: #e3eeed;
}

.student-exam-number-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.student-exam-number-toolbar {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.student-exam-number-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 44px;
}

.student-exam-number-count {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.student-exam-number-table-wrap table {
  min-width: 760px;
}

.student-exam-number-table-wrap th:nth-child(4),
.student-exam-number-table-wrap td:nth-child(4) {
  width: min(280px, 34vw);
}

.student-exam-number-table-wrap th:last-child,
.student-exam-number-table-wrap td:last-child {
  width: 84px;
  text-align: center;
}

.student-exam-number-actions .mini-btn {
  min-width: 64px;
}

.student-exam-number-input {
  width: 100%;
  min-width: 180px;
  font-variant-numeric: tabular-nums;
}

.student-exam-number-table-wrap tr.is-dirty td {
  background: #fffaf0;
}

@media (max-width: 760px) {
  .student-exam-number-toolbar {
    grid-template-columns: 1fr;
  }

  .student-exam-number-summary {
    justify-content: space-between;
  }

  .student-exam-number-summary .btn {
    flex: 0 0 auto;
  }
}
/* Final mock exam reading plan for online-managed and internet students. */
.final-scope-home-entry {
  width: 100%;
  min-height: 72px;
  border-color: #b7a9da;
  background: linear-gradient(135deg, #fbf9ff 0%, #e9e1f7 100%);
}

.final-scope-home-entry .lecture-home-shortcut-icon {
  background: #ddd2f1;
  color: #7055a6;
}

.student-planner-view-switch.three-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-planner-view-switch.three-options .student-planner-view-option {
  padding: 0 5px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.info-modal-panel.final-scope-guide-panel {
  width: min(380px, 100%);
  gap: 14px;
  border: 1px solid #d7e2eb;
  border-radius: 20px;
  padding: 20px;
}

.final-scope-guide-content {
  display: grid;
  gap: 14px;
}

.final-scope-guide-kicker {
  color: #2a8c82;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.final-scope-guide-title {
  color: #173449;
  font-size: 1rem;
  line-height: 1.55;
}

.final-scope-guide-highlight {
  border-radius: 3px;
  background: linear-gradient(transparent 48%, #e7ff55 48%);
  padding: 0 2px;
}

.final-scope-guide-content > p {
  margin: 0;
  color: #60798c;
  font-size: 0.78rem;
  line-height: 1.55;
}

.final-scope-guide-list {
  display: grid;
  gap: 7px;
}

.final-scope-guide-table-head,
.final-scope-guide-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}

.final-scope-guide-table-head {
  padding: 0 11px 2px;
  color: #718596;
  font-size: 0.63rem;
  font-weight: 900;
}

.final-scope-guide-row {
  align-items: center;
  border-radius: 11px;
  background: #f1f6f8;
  padding: 10px 11px;
}

.final-scope-guide-row span {
  color: #60798c;
  font-size: 0.7rem;
  font-weight: 850;
}

.final-scope-guide-row strong {
  color: #173b52;
  font-size: 0.78rem;
}

.final-scope-guide-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
}

.final-scope-plan {
  width: 100%;
  min-width: 0;
  padding-bottom: 12px;
}

.final-scope-round-strip-wrap {
  position: sticky;
  z-index: 5;
  top: 0;
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(12, 43, 72, 0.96);
  backdrop-filter: blur(14px);
}

.final-scope-round-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px;
  scrollbar-width: none;
}

.final-scope-round-strip::-webkit-scrollbar {
  display: none;
}

.final-scope-round-button {
  flex: 0 0 auto;
  min-width: 54px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #a9bcc9;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.final-scope-round-button.active {
  border-color: #178f85;
  background: #178f85;
  color: #fff;
}

.final-scope-plan-content {
  padding: 0 0 18px;
}

.final-scope-round-summary,
.final-scope-subject-card,
.final-scope-empty {
  overflow: hidden;
  border: 1px solid #d0dde2;
  border-radius: 16px;
  background: #e9f0f2;
  color: #173b52;
}

.final-scope-summary-main {
  padding: 20px;
}

.final-scope-summary-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #60798c;
  font-size: 0.78rem;
  font-weight: 750;
}

.final-scope-summary-kicker span:last-child {
  border: 1px solid #bdd8d3;
  border-radius: 999px;
  background: #d8ebe7;
  padding: 6px 9px;
  color: #176d68;
  font-size: 0.72rem;
}

.final-scope-summary-main h2 {
  margin: 12px 0 0;
  color: #173b52;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.final-scope-summary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #cfdbdf;
  background: #dfe9ec;
}

.final-scope-summary-stat {
  padding: 14px 20px;
}

.final-scope-summary-stat + .final-scope-summary-stat {
  border-left: 1px solid #cfdbdf;
}

.final-scope-summary-stat span {
  display: block;
  margin-bottom: 4px;
  color: #60798c;
  font-size: 0.68rem;
}

.final-scope-summary-stat strong {
  color: #1f766f;
  font-size: 0.8rem;
}

.final-scope-section-caption {
  display: flex;
  justify-content: space-between;
  margin: 18px 2px 10px;
  color: #9bb1c3;
  font-size: 0.72rem;
}

.final-scope-subject-list {
  display: grid;
  gap: 10px;
}

.final-scope-subject-card[open] {
  border-color: #72b9b1;
  background: #f1f6f7;
}

.final-scope-subject-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
}

.final-scope-subject-card summary::-webkit-details-marker {
  display: none;
}

.final-scope-subject-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #2a8c82;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.final-scope-subject-copy {
  min-width: 0;
  flex: 1;
}

.final-scope-subject-copy strong,
.final-scope-subject-copy span {
  display: block;
}

.final-scope-subject-copy strong {
  margin-bottom: 4px;
  font-size: 0.86rem;
}

.final-scope-subject-copy span {
  overflow: hidden;
  color: #60798c;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-scope-chevron {
  color: #8095a2;
  font-size: 1.2rem;
  transition: transform 0.18s ease;
}

.final-scope-subject-card[open] .final-scope-chevron {
  transform: rotate(90deg);
}

.final-scope-unit-list {
  display: grid;
  margin: 0;
  padding: 0 14px 10px;
  list-style: none;
}

.final-scope-unit-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid #cfdbdf;
  padding: 13px 0;
}

.final-scope-unit-code {
  align-self: start;
  border: 1px solid #bdd8d3;
  border-radius: 8px;
  background: #d8ebe7;
  padding: 5px 6px;
  color: #176d68;
  font-size: 0.66rem;
  font-weight: 850;
  text-align: center;
}

.final-scope-unit-text {
  min-width: 0;
  color: #173b52;
  font-size: 0.76rem;
  font-weight: 620;
  line-height: 1.62;
  word-break: keep-all;
}

.final-scope-empty {
  padding: 24px 18px;
  color: #60798c;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}
.feedback-hub-page { max-width: 740px; margin: 0 auto; padding: 20px 16px 110px; color: #203e49; background: #f7fbfc; min-height: 70vh; border-radius: 20px; }
.feedback-hub-page h2 { margin: 14px 0 8px; font-size: 25px; }
.feedback-hub-lead { color: #59717d; font-size: 14px; line-height: 1.6; }
.feedback-hub-back, .feedback-hub-link { border: 0; background: transparent; color: #367483; padding: 10px 0; cursor: pointer; text-align: left; font: inherit; }
.feedback-hub-tabs { display: flex; gap: 8px; margin: 20px 0; }
.feedback-hub-tabs button { flex: 1; min-height: 46px; border: 1px solid #bcd3d9; border-radius: 12px; background: white; color: #456b78; font: inherit; cursor: pointer; }
.feedback-hub-tabs button[aria-pressed="true"] { color: white; background: #467f8d; border-color: #467f8d; }
.feedback-hub-content { min-width: 0; }
.feedback-hub-cards { display: grid; gap: 14px; margin: 14px 0; }
.feedback-hub-card, .feedback-hub-detail { padding: 18px; border: 1px solid #d5e3e7; background: white; border-radius: 16px; overflow-wrap: anywhere; }
.feedback-hub-card h3, .feedback-hub-detail h3 { margin: 12px 0; font-size: 19px; line-height: 1.5; }
.feedback-hub-card .feedback-hub-card-heading { margin-bottom: 0; }
.feedback-hub-title-button { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.feedback-hub-title-button:hover { color: #367483; }
.feedback-hub-title-button:focus-visible { outline: 2px solid #467f8d; outline-offset: 5px; border-radius: 3px; }
.feedback-hub-card p { font-size: 14px; color: #59717d; line-height: 1.6; }
.feedback-hub-badge { display: inline-block; background: #e5f3ef; color: #267961; padding: 5px 8px; font-size: 11px; border-radius: 7px; }
.feedback-hub-images { display: flex; overflow-x: auto; gap: 10px; scroll-snap-type: x mandatory; }
.feedback-hub-images button { flex: 0 0 85%; max-width: 400px; border: 0; background: #eef5f7; border-radius: 12px; padding: 0; overflow: hidden; cursor: zoom-in; scroll-snap-align: start; }
.feedback-hub-images button:only-child { flex-basis: 100%; max-width: none; }
.feedback-hub-images img { width: 100%; max-height: 380px; object-fit: contain; display: block; }
.feedback-hub-description { white-space: pre-wrap; line-height: 1.8; font-size: 14px; }
.feedback-hub-question { background: #edf6f8; padding: 14px; border-radius: 10px; line-height: 1.7; white-space: pre-wrap; font-size: 14px; }
.feedback-hub-board, .feedback-hub-content > .study-cafe-feedback-modal { background: white; border-radius: 16px; padding: 16px; margin-top: 16px; }
.feedback-hub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.info-modal-panel.feedback-hub-admin { width: min(740px, calc(100vw - 28px)); max-height: 90dvh; overflow-y: auto; }
.feedback-hub-editor { display: grid; gap: 14px; }
.feedback-hub-field { display: grid; gap: 8px; font-size: 14px; }
.feedback-hub-field input, .feedback-hub-field textarea { box-sizing: border-box; width: 100%; border: 1px solid #c9d8df; border-radius: 10px; padding: 12px; font: inherit; background: white; color: #203e49; }
.feedback-hub-field textarea { resize: vertical; }
.feedback-hub-publish { display: flex; align-items: center; gap: 8px; }
.feedback-hub-editor p { font-size: 13px; line-height: 1.6; color: #59717d; margin: 0; }
.feedback-hub-image-editor { display: flex; gap: 10px; flex-wrap: wrap; }
.feedback-hub-image-editor > div { width: 90px; display: grid; gap: 5px; }
.feedback-hub-image-editor img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }
.feedback-hub button:disabled { cursor: default; opacity: .55; }
.study-cafe-feedback-delete-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.study-cafe-feedback-delete { border: 0; background: transparent; color: #9b4646; padding: 8px 2px; min-height: 36px; font: inherit; font-size: 12px; cursor: pointer; }
.study-cafe-feedback-delete:disabled { opacity: .5; cursor: default; }
.study-cafe-feedback-delete-status { color: #876168; font-size: 12px; }
.study-cafe-feedback-reply-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #456b78; font-size: 12px; }
.study-cafe-feedback-text-button[data-icon-only],
.study-cafe-feedback-reply-refresh[data-icon-only] { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid #dce8ec; border-radius: 50%; color: #628793; background: #fff; cursor: pointer; }
.study-cafe-feedback-text-button[data-icon-only]:hover,
.study-cafe-feedback-reply-refresh[data-icon-only]:hover { background: #edf5f7; color: #316d7b; }
.study-cafe-feedback-refresh-icon { display: block; width: 16px; height: 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 7v5h-5M19.5 12a7.5 7.5 0 1 0-1.8 4.9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.study-cafe-feedback-text-button[aria-busy="true"] .study-cafe-feedback-refresh-icon,
.study-cafe-feedback-reply-refresh[aria-busy="true"] .study-cafe-feedback-refresh-icon { animation: feedback-refresh-spin 1s linear infinite; }
@keyframes feedback-refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .study-cafe-feedback-refresh-icon { animation: none !important; } }
.student-reward-modal {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.student-reward-copy { display: grid; gap: 14px; text-align: left; }
.student-reward-copy p { margin: 0; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.student-reward-challenge-copy { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: #f1f7f3; color: #244335; }
.student-reward-help > .student-reward-copy { margin-top: 14px; }
.student-reward-method { display: grid; gap: 8px; min-width: 0; padding: 14px 16px; border-radius: 14px; background: #f1f7f3; color: #244335; }
.student-reward-method-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.student-reward-method-points { padding: 3px 9px; border-radius: 999px; background: #dfeee4; color: #245d50; font-weight: 800; white-space: nowrap; }
.student-reward-method p { font-size: 14px; }
.student-reward-method-details { font-size: 12px; color: #50695c; }
.student-reward-method-details > summary { padding: 4px 0; color: inherit; cursor: pointer; font-weight: 600; }
.student-reward-method-details ul { display: grid; gap: 5px; margin: 8px 0 0; padding-left: 18px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.student-reward-copy .student-reward-method-note { padding: 0 4px; font-size: 12px; color: #64756c; }
.info-modal-panel.student-reward-celebration {
  width: min(410px, calc(100vw - 32px));
  padding: 26px 24px 22px;
  border: 1px solid #e8eadc;
  border-radius: 28px;
  background: linear-gradient(160deg, #fffdf5, #fff 58%, #f4faf7);
  box-shadow: 0 28px 90px #102c3438;
  gap: 16px;
  animation: student-reward-panel-in 420ms cubic-bezier(.16, 1, .3, 1) both;
}
.student-reward-celebration > strong { text-align: center; color: #244c47; line-height: 1.5; }
.student-reward-celebration .student-reward-copy { gap: 16px; }
.student-reward-hero { display: grid; justify-items: center; gap: 7px; text-align: center; }
.student-reward-art { position: relative; width: min(280px, 100%); height: 148px; display: grid; place-items: center; isolation: isolate; }
.student-reward-halo { position: absolute; width: 144px; height: 144px; border-radius: 50%; background: radial-gradient(circle, #ffe49b99, #fff1c440 55%, transparent 72%); animation: student-reward-halo-in 900ms ease-out both; }
.student-reward-coin {
  position: relative; display: grid; place-items: center; width: 88px; height: 88px;
  border: 3px solid #e3ab37; border-radius: 50%; overflow: hidden;
  background: linear-gradient(140deg, #fff3b5 4%, #ffda69 40%, #edb740 100%);
  box-shadow: 0 6px 0 #c68f29, 0 15px 24px #ceab5840, inset 0 0 0 5px #ffe699;
  animation: student-reward-coin-in 850ms cubic-bezier(.22, .8, .3, 1) both;
}
.student-reward-coin::before { content: ""; position: absolute; inset: 9px; border: 1px solid #d9a034b3; border-radius: inherit; }
.student-reward-coin::after { content: ""; position: absolute; inset: -25%; background: linear-gradient(110deg, transparent 35%, #ffffffb3 48%, transparent 60%); transform: translateX(-120%); animation: student-reward-shine 900ms 500ms ease-out both; }
.student-reward-coin > span { font: 800 46px/1 system-ui, sans-serif; color: #ab7217; text-shadow: 0 2px 0 #fff0a4; }
.student-reward-medal { position: absolute; left: calc(50% + 20px); top: 92px; display: grid; place-items: center; width: 31px; height: 31px; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #387e69; box-shadow: 0 4px 10px #244c4724; animation: student-reward-pop 420ms 500ms both; }
.student-reward-spark { position: absolute; color: #d9a936; font-size: 24px; animation: student-reward-pop 500ms 250ms both; }
.student-reward-spark.spark-left { left: calc(50% - 83px); top: 35px; }
.student-reward-spark.spark-right { right: calc(50% - 84px); bottom: 28px; font-size: 17px; animation-delay: 420ms; }
.student-reward-confetti { position: absolute; left: calc(50% - 3px); top: 62px; width: 6px; height: 10px; border-radius: 2px; background: var(--confetti-color); opacity: 0; animation: student-reward-confetti-out 1250ms var(--delay) ease-out both; pointer-events: none; }
.student-reward-confetti:nth-of-type(3n) { width: 7px; height: 7px; border-radius: 50%; }
.student-reward-kicker { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #788271; }
.student-reward-amount { display: flex; align-items: baseline; justify-content: center; gap: 3px; font: 800 clamp(42px, 12vw, 52px)/1.12 system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.05em; color: #245d50; }
.student-reward-unit { margin-left: 4px; font-size: .55em; letter-spacing: 0; }
.student-reward-received { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 7px 12px; background: #eaf4ed; border-radius: 999px; font-size: 11px; color: #3f7862; animation: student-reward-pop 400ms 750ms both; }
.student-reward-celebration p.student-reward-message { text-align: center; color: #687670; font-size: 13px; }
.student-reward-celebration .student-reward-challenge-copy { gap: 7px; padding: 14px 16px; background: #eef4ee; border: 1px solid #e1eade; }
.student-reward-celebration .student-reward-challenge-copy strong { font-size: 13px; color: #35564c; }
.student-reward-celebration .student-reward-challenge-copy p { font-size: 12px; color: #5e7468; }
.info-modal-panel.student-reward-celebration > .btn.secondary,
body.student-online-mode .info-modal-panel.student-reward-celebration > .btn.secondary { min-height: 46px; border: 0; border-radius: 13px; background: #306d5e; color: #fff; font-weight: 700; }
.info-modal-panel.student-reward-celebration > .btn.secondary:hover,
body.student-online-mode .info-modal-panel.student-reward-celebration > .btn.secondary:hover { background: #265b4f; }
@keyframes student-reward-panel-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes student-reward-coin-in { 0% { opacity: 0; transform: translateY(22px) rotate(-24deg) scale(.45); } 55% { opacity: 1; transform: translateY(-8px) rotate(8deg) scale(1.08); } 78% { transform: translateY(3px) rotate(-3deg) scale(.98); } 100% { opacity: 1; transform: none; } }
@keyframes student-reward-halo-in { from { opacity: 0; transform: scale(.45); } to { opacity: 1; transform: scale(1); } }
@keyframes student-reward-pop { from { opacity: 0; transform: translateY(5px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes student-reward-shine { to { transform: translateX(120%); } }
@keyframes student-reward-confetti-out { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 15% { opacity: .95; } 65% { opacity: .8; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--turn)); } }
@media (max-height: 700px) {
  .info-modal-panel.student-reward-celebration { padding: 20px; gap: 12px; }
  .student-reward-art { height: 116px; }
  .student-reward-medal { top: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .student-reward-celebration, .student-reward-celebration *, .student-reward-celebration *::after { animation: none !important; }
  .student-reward-confetti { display: none; }
}
/* Existing study-cafe agents: admin-only management modal. */
.bot-admin-modal { width: min(1080px, calc(100vw - 32px)); max-width: 1080px; }
.bot-admin { display: grid; gap: 16px; }
.bot-admin-entry, .bot-admin-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bot-admin-detail-head { justify-content: flex-start; }
.bot-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.bot-admin-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid #dce3ed; border-radius: 16px; padding: 20px; background: #fff; min-width: 0; }
.bot-admin-card h3, .bot-admin-card h4, .bot-admin-card p { margin: 0; overflow-wrap: anywhere; }
.bot-admin-card .btn { margin-top: auto; }
.bot-admin-card small { color: #526176; }
.bot-admin-status { width: fit-content; padding: 4px 9px; border-radius: 20px; background: #eef1f5; font-size: 12px; }
.bot-admin-status.on { background: #e5f5ee; color: #1a6c49; }
.bot-admin-balance { font-size: 26px; color: #243c6c; }
.bot-admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.bot-admin-item-icon { font-size: 34px; }
.bot-admin-checkout { padding: 20px; border: 1px solid #bac9df; border-radius: 16px; background: #f6f9fe; }
.bot-admin-checkout > .btn { margin: 4px; }
.bot-admin-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bot-admin-settings label { display: grid; gap: 6px; font-size: 14px; }
.bot-admin-settings input, .bot-admin-settings select { width: 100%; min-height: 42px; border: 1px solid #cdd6e2; border-radius: 8px; padding: 8px 10px; }
.bot-admin-settings > p { grid-column: 1 / -1; }
.bot-admin-history { max-height: 300px; overflow-y: auto; padding: 0 12px; background: #f6f8fb; border-radius: 10px; font-size: 13px; }
.bot-admin-preview { position: relative; width: 150px; height: 140px; flex: 0 0 150px; }
.bot-admin-preview > .study-cafe-seat-visual { position: absolute; inset: 0; width: 150px; height: 140px; transform: none; }
.bot-admin button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 600px) {
  .bot-admin-settings { grid-template-columns: 1fr; }
  .bot-admin-entry { align-items: flex-start; flex-direction: column; }
  .bot-admin-grid { grid-template-columns: 1fr; }
}

.student-mypage .student-policy-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
  padding: 4px 0 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.student-mypage .student-policy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: inherit;
  text-decoration: none;
}

.student-mypage .student-policy-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.student-mypage .student-policy-links a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

body.student-online-mode .student-mypage .student-policy-links {
  color: #c9d8e5;
}
