:root {
  color-scheme: light;
  --ink: #242a31;
  --muted: #78818a;
  --faint: #a0a8b0;
  --surface: rgba(250, 251, 252, .88);
  --surface-solid: #f7f8f9;
  --surface-soft: rgba(233, 237, 240, .82);
  --line: rgba(69, 81, 93, .12);
  --accent: #647582;
  --accent-strong: #435867;
  --accent-soft: #dce4e9;
  --good: #627a6b;
  --warn: #9a7854;
  --danger: #9a6668;
  --shadow: 0 18px 55px rgba(32, 40, 47, .12);
  --glass: rgba(247, 249, 250, .68);
  font-family: "Clear Han Serif", "Noto Serif SC", "Songti SC", serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: #e8ebee;
  font-family: "Clear Han Serif", "Noto Serif SC", "Songti SC", serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8ebed;
  --muted: #a9b1b7;
  --faint: #818b93;
  --surface: rgba(42, 49, 55, .9);
  --surface-solid: #2b3238;
  --surface-soft: rgba(56, 64, 71, .78);
  --line: rgba(218, 227, 233, .11);
  --accent: #b0bdc6;
  --accent-strong: #d0dbe1;
  --accent-soft: #3c4952;
  --good: #9bb7a3;
  --warn: #d0b28d;
  --danger: #d39a9d;
  --shadow: 0 18px 55px rgba(0, 0, 0, .3);
  --glass: rgba(47, 55, 62, .72);
}

button, input, textarea, select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(110, 137, 153, .5);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.stage {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 22px;
}

.login-view, .phone-view {
  position: relative;
  width: min(100%, 430px);
  height: min(932px, calc(100dvh - 44px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 38px;
  background:
    radial-gradient(ellipse at 15% 8%, rgba(255, 255, 255, .82), transparent 48%),
    linear-gradient(155deg, #e8ecef, #cbd2d8 52%, #e6e9eb);
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .login-view,
body[data-theme="dark"] .phone-view {
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(ellipse at 10% 6%, rgba(113, 125, 135, .28), transparent 49%),
    linear-gradient(155deg, #343b41, #242a2f 55%, #343b40);
}

.login-view {
  display: block;
  overflow-y: auto;
  padding: 28px;
  scrollbar-width: thin;
}

.login-card {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  padding: 34px 28px 26px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 30px;
  background: var(--glass);
  box-shadow: 0 22px 55px rgba(41, 50, 58, .1);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  text-align: center;
}

.academy-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 17px;
  place-items: center;
  border: 1px solid rgba(87, 105, 119, .22);
  border-radius: 21px;
  color: var(--accent-strong);
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(213,221,226,.7));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 8px 18px rgba(58,69,78,.12);
  font-size: 30px;
  font-weight: 600;
}

.academy-name, .app-overline {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
}

.login-card h1 {
  margin: 7px 0 4px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: .06em;
}

.login-subtitle {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 13px;
}

.login-form, .form-stack {
  display: grid;
  gap: 14px;
  text-align: left;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface-solid);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input::placeholder, textarea::placeholder { color: var(--faint); }

.form-message {
  min-height: 16px;
  margin: -3px 0;
  color: var(--danger);
  font-size: 12px;
}

.primary-button, .secondary-button, .quiet-button, .danger-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.primary-button {
  color: #f8fafb;
  background: #586b78;
  box-shadow: 0 7px 16px rgba(58, 73, 83, .17);
}
body[data-theme="dark"] .primary-button { color: #1e252a; background: #bdc9d0; }
.secondary-button { border-color: var(--line); background: var(--surface-soft); }
.quiet-button { border-color: var(--line); background: transparent; color: var(--muted); }
.danger-button { color: var(--danger); border-color: rgba(154,102,104,.2); background: rgba(154,102,104,.07); }
.primary-button:hover, .secondary-button:hover, .quiet-button:hover, .danger-button:hover { transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled, .quiet-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.demo-entry { width: 100%; margin-top: 10px; }
.prototype-note { margin: 14px 0 0; color: var(--faint); font-size: 11px; line-height: 1.65; }
.rank-draw-card { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.24); text-align: left; }
.rank-draw-heading, .study-course-heading, .study-time-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rank-draw-heading h2 { margin: 0; font-size: 14px; }
.rank-draw-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.rank-draw-count { padding: 5px 9px; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font: 600 11px Arial,sans-serif; white-space: nowrap; }
.rank-draw-results { display: grid; gap: 6px; margin-top: 12px; }
.rank-result { display: flex; min-height: 43px; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; }
.rank-result > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: var(--accent-strong); background: var(--accent-soft); }
.rank-result strong { flex: 1; font-size: 10px; font-weight: 600; }
.rank-result small { color: var(--muted); font-size: 9px; }
.rank-result.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(100,117,130,.13); }
.rank-result:disabled { cursor: default; }
.rank-draw-actions { display: flex; gap: 7px; margin-top: 10px; }
.rank-draw-actions button { min-height: 37px; flex: 1; padding: 6px 7px; font-size: 10px; }
.rank-draw-card .tiny { min-height: 15px; margin: 8px 0 0; }

.phone-view {
  --phone-pad-top: max(12px, env(safe-area-inset-top));
  color: var(--ink);
  background:
    radial-gradient(ellipse at 18% 7%, rgba(255,255,255,.74), transparent 48%),
    radial-gradient(ellipse at 88% 62%, rgba(188,199,206,.34), transparent 45%),
    linear-gradient(145deg, #e2e6e9 0%, #ccd3d8 54%, #e2e6e8 100%);
  isolation: isolate;
}

body[data-theme="dark"] .phone-view {
  background:
    radial-gradient(ellipse at 18% 7%, rgba(131,144,154,.26), transparent 48%),
    radial-gradient(ellipse at 88% 62%, rgba(89,101,111,.2), transparent 45%),
    linear-gradient(145deg, #313940 0%, #242a30 54%, #333a40 100%);
}

.wallpaper-glow {
  position: absolute;
  z-index: -1;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.wallpaper-glow-a { top: 17%; left: -34%; background: rgba(255,255,255,.62); }
.wallpaper-glow-b { right: -48%; bottom: 9%; background: rgba(135,153,166,.22); }

.system-bar {
  position: absolute;
  z-index: 10;
  top: var(--phone-pad-top);
  right: 25px;
  left: 25px;
  display: flex;
  height: 25px;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}
.system-time { letter-spacing: .02em; }
.system-status { display: flex; align-items: center; gap: 7px; }
.signal-icon { display: inline-flex; height: 12px; align-items: end; gap: 2px; }
.signal-icon i { display: block; width: 3px; border-radius: 2px; background: currentColor; }
.signal-icon i:nth-child(1) { height: 4px; }
.signal-icon i:nth-child(2) { height: 7px; }
.signal-icon i:nth-child(3) { height: 9px; }
.signal-icon i:nth-child(4) { height: 12px; }
.wifi-icon { font-size: 16px; transform: rotate(45deg); }
.battery { position: relative; display: inline-flex; width: 21px; height: 11px; padding: 1.5px; border: 1px solid currentColor; border-radius: 3px; }
.battery::after { position: absolute; top: 3px; right: -3px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: currentColor; content: ""; }
.battery span { width: 86%; border-radius: 1px; background: currentColor; }
.battery-percent { margin-left: -4px; font-size: 10px; font-weight: 600; }

.dynamic-island {
  position: absolute;
  z-index: 11;
  top: var(--phone-pad-top);
  left: 50%;
  width: 92px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: rgba(25, 29, 32, .93);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.dynamic-island span {
  position: absolute;
  top: 8px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #536e78, #15191d 72%);
}

.system-actions { position: absolute; z-index: 9; top: 50px; right: 21px; display: flex; gap: 8px; }
.glass-button {
  display: inline-grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 14px;
  color: var(--ink);
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 5px 15px rgba(34,43,51,.08);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  cursor: pointer;
}
.theme-toggle { font-size: 17px; }

.home-screen, .app-screen {
  position: absolute;
  inset: 0;
  padding-top: calc(var(--phone-pad-top) + 53px);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
.home-screen { overflow: auto; scrollbar-width: none; }
.home-screen::-webkit-scrollbar, .app-content::-webkit-scrollbar { display: none; }
.home-content { padding: 0 21px 28px; }

.home-greeting { margin: 2px 0 15px; padding-right: 92px; }
.home-date { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.home-greeting h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: .04em; }
.home-caption { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: 0 8px 24px rgba(38,48,57,.08);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 18px;
  color: var(--accent-strong);
  background: linear-gradient(145deg, #fff, #d9e0e4);
  font-size: 18px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-main { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; gap: 7px; }
.profile-name { overflow: hidden; margin: 0; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rank-badge, .status-pill, .tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.22);
  font-size: 10px;
  white-space: nowrap;
}
.rank-badge { color: var(--accent-strong); background: var(--accent-soft); letter-spacing: .08em; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.profile-edit { min-width: 35px; min-height: 35px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; cursor: pointer; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 20px 2px 11px; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.section-heading span { color: var(--faint); font-size: 11px; }

.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 7px; }
.app-icon-button {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}
.app-icon {
  position: relative;
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 19px;
  color: #53636e;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(220,226,230,.76));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 16px rgba(52,63,71,.12);
  font-family: Arial, sans-serif;
  font-size: 23px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.app-icon-button:hover .app-icon { transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 11px 20px rgba(52,63,71,.16); }
.app-icon-label { max-width: 74px; overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.app-icon-button.is-locked { opacity: .48; cursor: default; }
.app-icon-button.is-locked .app-icon { filter: grayscale(.6); }
.app-icon-button.is-locked:hover .app-icon { transform: none; }
.locked-mark { position: absolute; right: -4px; bottom: -3px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: #737d84; font-size: 10px; }

.announcement-card, .home-note, .surface-card, .list-card, .detail-card, .wallet-card, .empty-state, .module-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(37,47,55,.045);
}
.announcement-card { padding: 14px; }
.announcement-row { display: flex; align-items: flex-start; gap: 10px; }
.announcement-symbol { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--accent-strong); background: var(--accent-soft); }
.announcement-title { margin: 0; font-size: 12px; font-weight: 600; }
.announcement-copy { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.home-note { margin-top: 13px; padding: 12px 14px; color: var(--muted); font-size: 11px; line-height: 1.65; }

.app-screen { display: flex; flex-direction: column; }
.phone-view.has-app .system-actions { display: none; }
.app-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 17px 12px;
}
.back-button { font-family: Arial, sans-serif; font-size: 27px; line-height: 1; }
.app-heading { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; }
.app-mark { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 14px; background: var(--glass); font-family: Arial,sans-serif; font-size: 17px; }
.app-heading h2 { overflow: hidden; margin: 2px 0 0; font-size: 18px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.app-overline { font-size: 9px; letter-spacing: .08em; }
.app-menu-button { font-size: 13px; letter-spacing: .08em; }
.app-content { min-height: 0; flex: 1; overflow: auto; padding: 0 17px 25px; scrollbar-width: none; }

.welcome-panel { padding: 15px; border: 1px solid rgba(255,255,255,.52); border-radius: 20px; background: var(--glass); }
.welcome-panel h3 { margin: 0 0 5px; font-size: 16px; font-weight: 600; }
.welcome-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.action-row .primary-button, .action-row .secondary-button, .action-row .quiet-button { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.segmented { display: flex; gap: 4px; overflow-x: auto; margin: 14px 0; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(120,132,140,.08); scrollbar-width: none; }
.segmented button { min-height: 33px; flex: 1 0 auto; padding: 5px 9px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 7px rgba(35,43,50,.08); }
.section-title { margin: 17px 2px 8px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.stack { display: grid; gap: 9px; }
.surface-card, .list-card, .detail-card, .module-card { padding: 13px; }
.list-card { display: flex; align-items: center; gap: 11px; }
.list-copy { min-width: 0; flex: 1; }
.list-title { margin: 0; font-size: 13px; font-weight: 600; }
.list-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.list-action { min-height: 33px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 11px; color: var(--accent-strong); background: var(--surface-soft); font-size: 11px; cursor: pointer; }
.empty-state { padding: 22px 16px; text-align: center; }
.empty-symbol { display: grid; width: 42px; height: 42px; margin: 0 auto 10px; place-items: center; border-radius: 15px; color: var(--accent); background: var(--accent-soft); font-size: 19px; }
.empty-state h3 { margin: 0; font-size: 14px; font-weight: 600; }
.empty-state p { max-width: 270px; margin: 6px auto 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.status-pill { font-size: 10px; }
.status-pill.pending { color: var(--warn); }
.status-pill.complete { color: var(--good); }
.status-pill.locked { color: var(--danger); }
.subtle { color: var(--muted); }
.tiny { color: var(--faint); font-size: 10px; line-height: 1.6; }
.body-copy { color: var(--muted); font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.body-copy p { margin: 0 0 8px; }
.body-copy p:last-child { margin-bottom: 0; }
.divider { height: 1px; margin: 11px 0; background: var(--line); }
.fee-row, .data-row, .ledger-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.data-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.data-row:last-child { border-bottom: 0; }
.ledger-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-amount { font-family: Arial, sans-serif; font-size: 13px; font-weight: 600; }
.ledger-amount.debit { color: var(--danger); }
.ledger-amount.credit { color: var(--good); }
.wallet-card { padding: 17px; border-color: rgba(255,255,255,.42); background: linear-gradient(145deg, rgba(75,91,103,.93), rgba(104,119,129,.82)); color: #f2f5f6; }
.wallet-label { color: rgba(245,248,249,.72); font-size: 11px; }
.wallet-balance { margin: 5px 0 13px; font-family: Arial,sans-serif; font-size: 31px; font-weight: 500; letter-spacing: -.03em; }
.wallet-foot { display: flex; justify-content: space-between; gap: 10px; color: rgba(245,248,249,.75); font-size: 10px; }
.post-card { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.post-head { display: flex; align-items: center; gap: 8px; }
.mini-avatar { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 11px; color: var(--accent-strong); background: var(--accent-soft); font-size: 12px; }
.post-head-copy { min-width: 0; flex: 1; }
.post-author { margin: 0; font-size: 11px; font-weight: 600; }
.post-time { margin: 3px 0 0; color: var(--faint); font-size: 10px; }
.post-body { margin: 11px 0; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; align-items: center; gap: 11px; border-top: 1px solid var(--line); padding-top: 9px; }
.post-actions button { min-height: 28px; padding: 3px 7px; border: 0; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.comment-list { display: grid; gap: 6px; margin-top: 10px; }
.comment { padding: 8px 9px; border-radius: 11px; color: var(--muted); background: var(--surface-soft); font-size: 11px; line-height: 1.6; }
.chat-list { display: grid; gap: 8px; }
.chat-room { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; text-align: left; }
.chat-room:hover, .list-card:hover { border-color: rgba(100,117,130,.28); }
.chat-bubble { max-width: 82%; margin: 8px 0; padding: 9px 11px; border-radius: 15px; background: var(--surface); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.chat-bubble.mine { margin-left: auto; background: var(--accent-soft); }
.line-chat-shell { display: flex; min-height: calc(100% - 30px); flex-direction: column; margin: 0 -4px; background: rgba(211,213,215,.42); }
.line-chat-header { display: flex; min-height: 60px; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(80,88,94,.12); background: rgba(245,245,245,.78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.line-back { width: 28px; height: 34px; border: 0; color: #58636b; background: transparent; font: 28px/1 Arial,sans-serif; cursor: pointer; }
.line-chat-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #4e5e68; background: #d8dfe3; font-size: 14px; }
.line-chat-heading { display: grid; min-width: 0; flex: 1; gap: 3px; }
.line-chat-heading strong { overflow: hidden; color: #30363a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.line-chat-heading small { color: #7d858a; font: 10px Arial,sans-serif; }
.line-chat-more { color: #737b81; font: 13px Arial,sans-serif; letter-spacing: 2px; }
.line-chat-shell .action-row { padding: 0 9px; }
.chat-image { display: block; max-width: 100%; max-height: 180px; margin-top: 5px; border-radius: 10px; }
.chat-history { min-height: 34vh; max-height: 48vh; overflow: auto; margin-top: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 18px; background-color: var(--surface-soft); background-position: center; background-size: cover; }
.line-chat-history { flex: 1; min-height: 36vh; max-height: none; margin: 0; padding: 14px 11px; border: 0; border-radius: 0; background-color: #d3d3d5; }
.line-chat-history .chat-bubble { width: fit-content; max-width: 82%; padding: 7px 10px; border: 0; border-radius: 13px; color: #111; background: #fff; box-shadow: none; }
.line-chat-history .chat-bubble.mine { margin-left: auto; color: #444; background: #e9e9e9; }
.line-chat-history .chat-bubble .tiny { color: #929292; font: 9px Arial,sans-serif; text-align: right; }
.line-chat-history .empty-state { border: 0; background: rgba(255,255,255,.42); box-shadow: none; }
.line-chat-shell .chat-compose { position: sticky; bottom: 0; align-items: center; margin: auto 0 0; padding: 9px 8px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(80,88,94,.12); background: rgba(211,213,215,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.line-chat-shell .chat-compose textarea { min-height: 38px; max-height: 88px; border-color: rgba(80,88,94,.08); border-radius: 999px; color: #222; background: #f5f5f5; }
.line-chat-shell .chat-compose .secondary-button { min-width: 37px; min-height: 37px; border: 0; border-radius: 50%; color: #626b72; background: #eceeef; }
.line-send-button { min-width: 38px !important; min-height: 38px !important; padding: 0 !important; border-radius: 50% !important; color: #fff !important; background: #687a84 !important; font-family: Arial,sans-serif; }
body[data-theme="dark"] .line-chat-shell { background: rgba(52,59,64,.65); }
body[data-theme="dark"] .line-chat-header { background: rgba(48,55,60,.82); }
body[data-theme="dark"] .line-chat-heading strong { color: #e7ecef; }
body[data-theme="dark"] .line-chat-history { background-color: #454c51; }
body[data-theme="dark"] .line-chat-history .chat-bubble { color: #25292c; }
body[data-theme="dark"] .line-chat-history .chat-bubble.mine { color: #303438; }
body[data-theme="dark"] .line-chat-shell .chat-compose { background: rgba(61,68,73,.94); }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-compose { position: sticky; bottom: -25px; display: flex; gap: 7px; align-items: end; margin: 14px -1px 0; padding: 9px 0 3px; background: linear-gradient(180deg, transparent, var(--surface-solid) 20%); }
.chat-compose textarea { min-height: 39px; max-height: 100px; flex: 1; padding: 9px 11px; border-radius: 14px; }
.chat-compose button { min-width: 40px; min-height: 40px; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.module-card { text-align: left; cursor: pointer; }
.module-card:hover { border-color: rgba(100,117,130,.3); }
.module-symbol { display: grid; width: 31px; height: 31px; margin-bottom: 8px; place-items: center; border-radius: 11px; color: var(--accent-strong); background: var(--accent-soft); }
.module-card strong { display: block; font-size: 12px; font-weight: 600; }
.module-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.study-intro { margin-bottom: 12px; padding: 15px; border: 1px solid rgba(255,255,255,.5); border-radius: 18px; background: var(--glass); }
.study-intro h3, .study-course h3, .study-player h3 { margin: 5px 0; font-size: 15px; }
.study-intro > p:last-child, .study-grade-note { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.study-course { margin: 9px 0; }
.study-course-heading h3 { margin: 3px 0; }
.study-course-heading > strong { color: var(--accent-strong); font: 600 17px Arial,sans-serif; }
.progress-track { height: 7px; overflow: hidden; margin: 9px 0; border-radius: 99px; background: var(--surface-soft); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #748995, #a9b7bf); transition: width .2s ease; }
.study-lessons { display: grid; gap: 7px; margin-top: 12px; }
.study-lesson { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 13px; }
.study-lesson .list-copy strong { display: block; font-size: 10px; }
.lesson-play { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--accent-strong); background: var(--accent-soft); font-size: 10px; }
.study-player { margin-top: 8px; }
.study-placeholder, .study-video { display: grid; width: 100%; aspect-ratio: 16 / 9; margin: 13px 0; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, #dce2e6, #bbc5cb); object-fit: contain; }
.study-placeholder { color: #485761; text-align: center; }
.study-placeholder span { font-size: 32px; }
.study-placeholder strong, .study-placeholder small { display: block; }
.study-placeholder small { margin-top: 4px; font-size: 9px; }
.study-player-controls { display: flex; gap: 7px; }
.study-player-controls button { min-height: 36px; flex: 1; padding: 5px 7px; font-size: 10px; }
.study-time-row { margin-top: 10px; color: var(--muted); font: 10px Arial,sans-serif; }
.study-time-row strong { color: var(--accent-strong); }
.study-grade-note { padding: 9px 10px; border-radius: 11px; background: var(--surface-soft); }
.simple-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.simple-table th, .simple-table td { min-width: 70px; padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.simple-table th { color: var(--muted); font-weight: 500; background: var(--surface-soft); }
.simple-table tr:last-child td { border-bottom: 0; }
.back-link { min-height: 34px; padding: 5px 0; border: 0; color: var(--accent-strong); background: transparent; cursor: pointer; }
.warning-box { padding: 11px 12px; border: 1px solid rgba(154,120,84,.2); border-radius: 13px; color: var(--warn); background: rgba(154,120,84,.07); font-size: 11px; line-height: 1.65; }
.error-box { padding: 11px 12px; border: 1px solid rgba(154,102,104,.2); border-radius: 13px; color: var(--danger); background: rgba(154,102,104,.07); font-size: 11px; line-height: 1.65; }
.phone-dock {
  position: absolute;
  z-index: 12;
  right: 25px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 25px;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-around;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 22px;
  box-shadow: 0 9px 24px rgba(34,44,52,.12);
}
.phone-dock button { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 15px; color: var(--accent-strong); background: rgba(255,255,255,.26); font-family: Arial,sans-serif; font-size: 20px; cursor: pointer; }
.phone-dock button:hover { background: rgba(255,255,255,.52); }
.home-indicator { position: absolute; z-index: 13; bottom: max(7px, env(safe-area-inset-bottom)); left: 50%; width: 95px; height: 4px; transform: translateX(-50%); border-radius: 5px; background: rgba(36,42,49,.66); }
body[data-theme="dark"] .home-indicator { background: rgba(235,240,243,.65); }

.modal {
  width: min(390px, calc(100vw - 28px));
  max-height: min(85dvh, 780px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  background: var(--surface-solid);
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
.modal::backdrop { background: rgba(25,31,36,.42); backdrop-filter: blur(5px); }
.modal-panel { padding: 20px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.modal-header h2 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.modal-close { min-width: 34px; min-height: 34px; border: 0; border-radius: 11px; color: var(--muted); background: var(--surface-soft); cursor: pointer; }
.modal-actions { display: flex; justify-content: end; gap: 8px; margin-top: 15px; }
.toast {
  position: absolute;
  z-index: 30;
  right: 30px;
  bottom: 99px;
  left: 30px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
  color: #f5f7f8;
  background: rgba(42,51,58,.91);
  box-shadow: 0 10px 24px rgba(20,28,33,.2);
  font-size: 11px;
  text-align: center;
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 520px) {
  .stage { display: block; min-height: 100dvh; padding: 0; }
  .login-view, .phone-view { width: 100%; height: 100dvh; min-height: 560px; border: 0; border-radius: 0; box-shadow: none; }
  .login-view { padding: 22px; }
  .home-content { padding-right: 18px; padding-left: 18px; }
  .app-header { padding-right: 14px; padding-left: 14px; }
  .app-content { padding-right: 14px; padding-left: 14px; }
}

@media (max-height: 730px) and (min-width: 521px) {
  .stage { padding: 12px; }
  .login-view, .phone-view { height: calc(100dvh - 24px); min-height: 620px; }
  .home-screen, .app-screen { padding-top: 63px; }
  .app-grid { gap: 10px 6px; }
  .app-icon { width: 49px; height: 49px; border-radius: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.admin-terminal { width: min(900px, calc(100vw - 24px)); max-width: 900px; max-height: min(92dvh, 980px); }
.admin-shell { display: flex; min-height: min(78dvh, 760px); flex-direction: column; padding: 22px; }
.admin-shell .modal-header { align-items: center; margin-bottom: 12px; }
.admin-shell .modal-header h2 { margin-top: 3px; font-size: 20px; }
.admin-warning { padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface-soft); font-size: 10px; line-height: 1.6; }
.admin-main-tabs, .admin-content-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); scrollbar-width: none; }
.admin-main-tabs button, .admin-content-tabs button { min-height: 34px; flex: 0 0 auto; padding: 6px 12px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.admin-main-tabs button.active, .admin-content-tabs button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 8px rgba(35,43,50,.1); }
.admin-message { min-height: 17px; margin: 0 2px 5px; color: var(--good); font-size: 11px; }
.admin-message.is-error { color: var(--danger); }
.admin-content { min-height: 0; flex: 1; overflow: auto; padding: 0 2px 5px; scrollbar-width: thin; }
.admin-content-tabs { margin-top: 0; }
.admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 0; }
.admin-section-heading h3 { margin: 0; font-size: 14px; }
.admin-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.admin-section-heading > .secondary-button { min-height: 34px; padding: 6px 10px; font-size: 10px; white-space: nowrap; }
.admin-section-heading.compact { margin-top: 19px; }
.admin-form { margin: 10px 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 11px; }
.admin-form-grid label { min-width: 0; }
.admin-form-grid input, .admin-form-grid select { min-height: 38px; padding: 8px 10px; border-radius: 11px; font-size: 11px; }
.admin-form-grid textarea { min-height: 76px; padding: 9px 10px; border-radius: 11px; font-size: 11px; line-height: 1.6; }
.admin-form-grid .admin-wide { grid-column: 1 / -1; }
.admin-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.admin-form-actions button { min-height: 35px; padding: 6px 11px; font-size: 10px; }
.admin-record-list { display: grid; gap: 7px; }
.admin-record { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.admin-record-copy { min-width: 0; flex: 1; }
.admin-record-copy strong, .admin-record-copy span, .admin-record-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.admin-record-copy strong { font-size: 11px; }
.admin-record-copy span, .admin-record-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.admin-record-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.admin-record-actions .list-action { min-height: 30px; padding: 4px 8px; }
.admin-empty { padding: 18px 12px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 11px; text-align: center; }
.admin-target-select { margin: 8px 0 11px; }
.admin-target-select select { min-height: 38px; padding: 8px 10px; border-radius: 11px; font-size: 11px; }
.admin-help { margin: 7px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
@media (max-width: 600px) {
  .admin-shell { min-height: 84dvh; padding: 16px 13px; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-form-grid .admin-wide { grid-column: auto; }
  .admin-record { align-items: flex-start; }
  .admin-record-actions { flex-direction: column; }
}

/* 静谧独白 2.0：黑白照片壁纸、半透明灰玻璃和统一的圆角比例。 */
:root {
  color-scheme: light;
  --ink: #f7f7f7;
  --muted: rgba(247,247,247,.76);
  --faint: rgba(247,247,247,.55);
  --surface: rgba(43,44,46,.55);
  --surface-solid: rgba(42,43,45,.88);
  --surface-soft: rgba(255,255,255,.14);
  --line: rgba(255,255,255,.25);
  --accent: #dedede;
  --accent-strong: #fff;
  --accent-soft: rgba(255,255,255,.17);
  --good: #c3d2c7;
  --warn: #ded0b8;
  --danger: #e2bebe;
  --shadow: 0 18px 55px rgba(0,0,0,.32);
  --glass: rgba(54,55,57,.56);
  font-family: "Clear Han Serif", "Noto Serif SC", "Songti SC", serif;
}

body { color: var(--ink); background: #111; }
body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #fafafa;
  --muted: rgba(250,250,250,.75);
  --faint: rgba(250,250,250,.52);
  --surface: rgba(22,23,24,.7);
  --surface-solid: rgba(27,28,29,.91);
  --surface-soft: rgba(255,255,255,.1);
  --line: rgba(255,255,255,.2);
  --accent: #e5e5e5;
  --accent-strong: #fff;
  --accent-soft: rgba(255,255,255,.13);
  --good: #c3d2c7;
  --warn: #ded0b8;
  --danger: #e2bebe;
  --shadow: 0 18px 55px rgba(0,0,0,.42);
  --glass: rgba(23,24,26,.68);
}

.login-view.has-wallpaper, .phone-view.has-wallpaper {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.phone-view.has-wallpaper .wallpaper-glow { display: none; }
.login-view.has-wallpaper { border-color: rgba(255,255,255,.36); }
.phone-view.has-wallpaper { border-color: rgba(255,255,255,.32); }

/* 登录框沿用参考图里的白色账号卡片，其余手机页面统一使用烟灰色玻璃。 */
.login-card {
  --ink: #242426;
  --muted: #696a6d;
  --faint: #929396;
  --surface: rgba(255,255,255,.92);
  --surface-soft: rgba(30,31,33,.08);
  --line: rgba(25,26,28,.12);
  --accent: #26272a;
  --accent-strong: #222326;
  --accent-soft: rgba(35,36,39,.1);
  color: #242426;
  border-color: rgba(255,255,255,.72);
  border-radius: 26px;
  background: rgba(250,250,250,.9);
  box-shadow: 0 22px 55px rgba(0,0,0,.18);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}
.login-card input, .login-card textarea, .login-card select { color: #222; background: rgba(255,255,255,.94); }
.login-card .primary-button { color: #fff; background: #202124; }
.login-card .secondary-button { color: #27282a; background: rgba(30,31,33,.08); }
.login-card .rank-draw-card { background: rgba(255,255,255,.4); }
.login-card .rank-result { color: #27282a; background: rgba(255,255,255,.76); }
.login-card .rank-draw-count { color: #353638; background: rgba(35,36,38,.1); }

.phone-view { color: var(--ink); }
.system-bar { color: rgba(28,29,31,.88); text-shadow: 0 1px 2px rgba(255,255,255,.45); }
body[data-theme="dark"] .system-bar { color: rgba(250,250,250,.92); text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.profile-card, .weather-widget, .announcement-card, .home-note,
.surface-card, .list-card, .detail-card, .empty-state, .module-card, .post-card,
.chat-room, .welcome-panel, .study-intro, .table-wrap, .admin-form, .admin-record,
.admin-warning, .line-chat-shell, .line-chat-header, .line-chat-history, .chat-history,
.phone-dock, .modal {
  border-color: var(--line);
  background-color: var(--surface);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}
.profile-card { border-radius: 23px; }
.weather-widget {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(74,75,77,.58), rgba(43,44,46,.51));
  color: var(--ink);
}
.weather-place, .weather-main, .weather-card-top, .weather-main > div { display: flex; align-items: center; }
.weather-place { gap: 7px; font-size: 11px; }
.weather-symbol { font-size: 15px; }
.weather-time { margin-left: auto; color: var(--muted); font-size: 10px; }
.weather-main { gap: 12px; margin-top: 6px; }
.weather-main > strong { font: 300 38px/1 Arial,sans-serif; letter-spacing: -.05em; }
.weather-main > div { align-items: flex-start; flex-direction: column; gap: 4px; }
.weather-main b { font-size: 12px; font-weight: 500; }
.weather-main small, .weather-updated { color: var(--muted); font-size: 9px; }
.weather-updated { margin-top: 5px; }

.app-grid { gap: 15px 7px; }
.app-icon-button { gap: 6px; }
.app-icon {
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 18px;
  color: #f8f8f8;
  background: linear-gradient(145deg, #929396, #28292b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.52), 0 7px 18px rgba(0,0,0,.32);
}
.app-icon-image { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.app-icon-fallback { position: relative; z-index: 1; opacity: 0; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.app-icon.fallback-visible .app-icon-fallback { opacity: 1; }
.app-icon-label { color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.6); }
.app-icon-button:hover .app-icon { box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 10px 22px rgba(0,0,0,.38); }
.locked-mark { z-index: 2; }
.announcement-card { padding: 14px; border-radius: 23px; }
.announcement-symbol, .module-symbol, .empty-symbol, .mini-avatar, .lesson-play, .app-mark {
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
}
.announcement-title, .section-heading h2, .home-greeting h1, .home-date, .home-caption { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.38); }
.announcement-copy, .profile-meta, .weather-updated, .list-subtitle, .post-time, .section-heading span { color: var(--muted); }
.rank-badge, .status-pill, .tag { color: #fff; background: rgba(255,255,255,.13); }
.rank-badge { background: rgba(35,36,38,.5); }

.app-header { color: var(--ink); }
.app-overline, .app-heading h2 { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.glass-button, .back-button, .profile-edit, .app-menu-button {
  border-color: rgba(255,255,255,.32);
  color: #fff;
  background: rgba(55,56,58,.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.welcome-panel, .surface-card, .list-card, .detail-card, .module-card, .empty-state, .post-card, .chat-room, .study-intro, .table-wrap {
  border: 1px solid var(--line);
  border-radius: 21px;
}
.wallet-card { border: 1px solid rgba(255,255,255,.25); background: linear-gradient(145deg, rgba(54,55,57,.82), rgba(107,108,110,.63)); }
.ledger-row, .data-row { border-color: var(--line); }
.line-chat-shell { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.line-chat-header, .line-chat-history, .line-chat-shell .chat-compose { color: #fff; background: rgba(49,50,52,.65); }
.line-chat-heading strong, .line-chat-heading small, .line-back, .line-chat-more { color: #fff; }
.line-chat-history .chat-bubble { color: #262729; background: rgba(255,255,255,.88); }
.line-chat-history .chat-bubble.mine { color: #fff; background: rgba(92,93,95,.92); }
.line-chat-shell .chat-compose textarea { color: #242426; background: rgba(255,255,255,.92); }
.line-chat-shell .chat-compose .secondary-button { color: #242426; background: rgba(255,255,255,.84); }
.line-send-button { color: #fff !important; background: #252629 !important; }
.chat-bubble { border: 1px solid rgba(255,255,255,.16); }
.chat-bubble.mine { background: rgba(255,255,255,.17); }
.chat-compose { background: linear-gradient(180deg, transparent, rgba(31,32,34,.85) 35%); }
.progress-track { background: rgba(255,255,255,.15); }
.progress-track span { background: linear-gradient(90deg, #d2d2d2, #fff); }
.study-placeholder, .study-video { background: rgba(34,35,37,.68); }
.simple-table th { color: #fff; background: rgba(255,255,255,.12); }
.simple-table td { border-color: var(--line); }

input, textarea, select {
  color: #242426;
  border-color: rgba(255,255,255,.55);
  background: rgba(250,250,250,.92);
}
input::placeholder, textarea::placeholder { color: #8a8b8d; }
label { color: var(--muted); }
.primary-button { color: #fff; background: #222326; box-shadow: 0 7px 17px rgba(0,0,0,.2); }
.secondary-button, .quiet-button, .list-action { color: #fff; border-color: var(--line); background: rgba(255,255,255,.12); }
.danger-button { color: #f1d2d2; background: rgba(133,78,80,.26); }
.segmented, .admin-main-tabs, .admin-content-tabs { border-color: var(--line); background: rgba(30,31,33,.46); }
.segmented button.active, .admin-main-tabs button.active, .admin-content-tabs button.active { color: #242426; background: rgba(255,255,255,.88); }
.phone-dock {
  right: 18px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 18px;
  min-height: 78px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 29px;
  background: rgba(88,89,91,.56);
  box-shadow: 0 10px 28px rgba(0,0,0,.24);
}
.phone-dock button { width: 60px; height: 60px; overflow: hidden; border: 1px solid rgba(255,255,255,.34); border-radius: 19px; color: #fff; background: rgba(255,255,255,.1); }
.phone-dock button:hover { background: rgba(255,255,255,.2); }
.home-indicator { background: rgba(255,255,255,.82); box-shadow: 0 1px 5px rgba(0,0,0,.25); }
.dock-app-image { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.modal { border-color: rgba(255,255,255,.3); background: rgba(43,44,46,.94); }
.modal-header h2, .admin-section-heading h3 { color: #fff; }
.admin-record-copy strong { color: #fff; }
.admin-empty { border-color: var(--line); color: var(--muted); }
.admin-form-grid input, .admin-form-grid select, .admin-form-grid textarea, .admin-target-select select { color: #242426; background: rgba(250,250,250,.93); }
.toast { border-color: rgba(255,255,255,.26); background: rgba(30,31,33,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.bank-card-list { display: grid; gap: 10px; }
.bank-card {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(140deg, rgba(79,80,82,.83), rgba(28,29,31,.88));
  box-shadow: 0 8px 22px rgba(0,0,0,.2);
}
.bank-card-top { display: flex; align-items: center; gap: 9px; }
.bank-card-top > div { display: grid; gap: 3px; }
.bank-card-top strong { font-size: 12px; }
.bank-card-top small, .bank-card-foot { color: rgba(255,255,255,.7); font-size: 9px; }
.bank-card-mark { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 11px; font: 600 15px Arial,sans-serif; }
.bank-card-number { font: 500 17px/1.3 Arial,sans-serif; letter-spacing: .08em; }
.bank-card-foot { display: flex; justify-content: space-between; gap: 8px; }

@media (max-width: 520px) {
  .phone-dock { right: 14px; left: 14px; }
  .phone-dock button { width: 58px; height: 58px; }
  .app-icon { width: 57px; height: 57px; border-radius: 18px; }
}

/* Two-page phone desktop and liquid glass widgets */
.home-screen { overflow: hidden; padding: calc(var(--phone-pad-top) + 48px) 0 92px; }
.home-content { height: 100%; padding: 0 14px; }
.home-pages { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.home-pages::-webkit-scrollbar { display: none; }
.home-page { position: relative; display: flex; width: 100%; min-width: 100%; height: 100%; flex: 0 0 100%; flex-direction: column; gap: 9px; overflow: hidden; padding: 0 5px 3px; scroll-snap-align: start; }
.home-topline { display: flex; min-height: 24px; align-items: center; gap: 10px; color: #fff; text-shadow: 0 1px 5px #0008; font-size: 10px; }
.home-topline > span { margin-right: auto; }
.home-wordmark-image { width: 45px; height: 29px; object-fit: contain; }
.home-topline button { width: 25px; height: 25px; border: 1px solid #ffffff50; border-radius: 50%; color: #fff; background: #ffffff27; }
.home-widget-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(102px, 1fr) minmax(76px, .72fr); gap: 8px; flex: 0 0 194px; }
.home-widget { position: relative; min-width: 0; overflow: hidden; border: 1px solid #ffffff56; border-radius: 21px; color: #fff; background-color: #373a3d88; background-position: center; background-size: cover; box-shadow: 0 9px 28px #0003, inset 0 1px #ffffff70; }
.liquid-glass { isolation: isolate; backdrop-filter: blur(15px) saturate(1.4); -webkit-backdrop-filter: blur(15px) saturate(1.4); }
.liquid-glass::after { position: absolute; z-index: 1; inset: 0; border: 1px solid #ffffff50; border-radius: inherit; background: linear-gradient(145deg,#ffffff21,transparent 37%,#16191d20 100%); box-shadow: inset 0 1px #ffffff4f,inset 0 -1px #1112; content: ""; pointer-events: none; }
.liquid-glass-canvas { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; opacity: .72; mix-blend-mode: screen; pointer-events: none; }
.hero-widget { grid-row: 1; grid-column: 1; padding: 11px 12px; background-repeat: no-repeat; }
.widget-kicker, .quote-widget > small { position: relative; z-index: 2; font: 600 7px/1.3 Arial,sans-serif; letter-spacing: .12em; opacity: .8; }
.hero-widget h2 { position: relative; z-index: 2; max-width: 180px; margin: 9px 0 12px; font: 700 20px/1.12 Arial,sans-serif; letter-spacing: -.04em; text-shadow: 0 2px 8px #0007; }
.widget-profile { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; width: max-content; max-width: 100%; padding: 4px 8px 4px 4px; border-radius: 18px; background: #ffffff25; font-size: 9px; }
.widget-avatar { display: grid; width: 22px; height: 22px; overflow: hidden; place-items: center; border-radius: 50%; color: #fff; background: #3338; font-size: 9px; }
.widget-avatar img { width: 100%; height: 100%; object-fit: cover; }
.widget-heart { margin-left: 12px; font-size: 15px; }
.widget-edit-hit { position: absolute; z-index: 3; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; }
.widget-image-edit { position: absolute; z-index: 4; top: 6px; right: 7px; width: 25px; height: 25px; border: 1px solid #ffffff55; border-radius: 50%; color: white; background: #25262966; cursor: pointer; }
.date-widget { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; justify-content: center; padding: 11px; }
.date-widget small, .date-widget span { color: #ffffffc5; font-size: 8px; }
.date-widget strong { margin: 4px 0; font: 600 38px/1 Arial,sans-serif; letter-spacing: -.06em; }
.home-weather { grid-row: 2; grid-column: 1; margin: 0; padding: 8px 10px; }
.home-weather .weather-place { font-size: 8px; }
.home-weather .weather-main { gap: 7px; margin-top: 2px; }
.home-weather .weather-main > strong { font-size: 28px; }
.home-weather .weather-main b { font-size: 8px; }
.home-weather .weather-main small { font-size: 7px; }
.home-announcements { grid-row: 2; grid-column: 2; padding: 8px; }
.home-announcements .section-heading { margin: 0 0 4px; }
.home-announcements .section-heading h2 { font-size: 9px; }
.home-announcements .section-heading span { font-size: 7px; }
.home-announcements .announcement-row { gap: 5px; }
.home-announcements .announcement-symbol { width: 17px; height: 17px; border-radius: 7px; font-size: 8px; }
.home-announcements .announcement-title { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.home-announcements .announcement-copy { display: -webkit-box; overflow: hidden; margin-top: 2px; font-size: 7px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-app-heading { flex: 0 0 17px; margin: 0; }
.home-app-heading h2 { font-size: 12px; }
.home-app-heading span { font-size: 8px; }
.home-app-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-auto-rows: minmax(73px,1fr); gap: 4px 5px; align-content: space-around; flex: 1; margin: 0; }
.home-app-grid .app-icon { width: clamp(42px,14vw,54px); height: clamp(42px,14vw,54px); border-radius: 16px; }
.home-app-grid .app-icon-label { max-width: 74px; font-size: 8px; }
.home-profile-line { display: flex; min-height: 27px; align-items: center; gap: 6px; color: #fff; font-size: 8px; text-shadow: 0 1px 5px #0009; }
.home-profile-line .rank-badge { margin-left: auto; }
.home-profile-line button { padding: 4px 8px; border: 1px solid #ffffff55; border-radius: 12px; color: #fff; background: #ffffff22; font-size: 8px; }
.home-page-dots { position: absolute; z-index: 12; bottom: calc(79px + env(safe-area-inset-bottom)); left: 50%; display: flex; gap: 9px; transform: translateX(-50%); }
.home-page-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #ffffff77; }
.home-page-dots button.active { width: 17px; border-radius: 8px; background: #fff; }
.quote-widget { flex: 0 0 132px; padding: 17px; background-repeat: no-repeat; }
.quote-widget h2 { position: relative; z-index: 2; max-width: 250px; margin: 12px 0 6px; font-size: 24px; text-shadow: 0 2px 9px #0008; }
.quote-widget p { position: relative; z-index: 2; margin: 0; font-size: 9px; }
.home-app-grid-second { flex: 1; grid-auto-rows: minmax(67px,1fr); }
.account-widget { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; flex: 0 0 93px; padding: 11px 14px; }
.account-widget-top { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; font-size: 9px; }
.account-widget > strong { font-size: 14px; }
.account-widget > span { align-self: center; font-size: 8px; }
.account-widget > button { grid-column: 1/-1; justify-self: end; padding: 3px 8px; border: 1px solid #ffffff50; border-radius: 10px; color: white; background: #ffffff20; font-size: 8px; }
.home-page-caption { color: #fff; text-align: center; font-size: 8px; text-shadow: 0 1px 5px #0009; }
.rank-badge-glyph { display: inline-flex; align-items: center; gap: 4px; }
.rank-badge-glyph img { width: 19px; height: 19px; object-fit: contain; }
.rank-badge-glyph > span { font-size: 8px; letter-spacing: .04em; }
.rank-inline-glyph { width:12px;height:12px;vertical-align:-2px;object-fit:contain; }

/* Full-screen app behavior and bottom-only in-app navigation */
.phone-view.has-app .phone-dock { display: none !important; }
.phone-view.has-app #app-screen { padding-bottom: 0; }
.phone-view.has-app .home-indicator { z-index: 20; }
.app-content { position: relative; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.app-screen > .legacy-bottom-nav,.app-content > .segmented { position: absolute; z-index: 18; right: 14px; bottom: calc(15px + env(safe-area-inset-bottom)); left: 14px; margin: 0; padding: 5px; border: 1px solid #ffffff64; border-radius: 20px; background: #dadde0b8; box-shadow: 0 8px 28px #0002; backdrop-filter: blur(25px) saturate(1.5); -webkit-backdrop-filter: blur(25px) saturate(1.5); }
.app-screen > .legacy-bottom-nav button,.app-content > .segmented button { min-height: 38px; font-size: 10px; }
.app-bottom-nav,.app-screen > .legacy-bottom-nav { position: absolute; z-index: 18; right: 13px; bottom: calc(14px + env(safe-area-inset-bottom)); left: 13px; display: flex; min-height: 57px; align-items: center; justify-content: space-around; padding: 5px 7px; border: 1px solid #ffffff70; border-radius: 23px; background: #d9dcdfc7; box-shadow: 0 8px 28px #0002; backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }
.app-bottom-nav button { display: flex; min-width: 52px; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; color: #626a70; background: transparent; font-size: 8px; }
.app-bottom-nav button > span { font: 17px/1 Arial,sans-serif; }
.app-bottom-nav button.active { color: #1e2428; font-weight: 700; }
.app-bottom-nav button.active > span { transform: translateY(-1px); }
.app-screen .app-header { padding-top: 0; }
.app-screen .back-button { width: 39px; height: 39px; border-radius: 50%; }
.wallet-credits { display: flex; align-items: baseline; gap: 9px; margin-top: 12px; padding-top: 9px; border-top: 1px solid #ffffff3b; }
.wallet-credits span,.wallet-credits small { font-size: 10px; opacity: .75; }
.wallet-credits strong { font-size: 20px; }

/* LINE chat: hand-drawn paper, soft gray sent bubbles and transaction cards */
.line-app-view,.viscord-view,.vove-view,.resale-view,.encyclopedia-view,.bonds-view { position: relative; min-height: 100%; padding-bottom: 72px; }
.line-panel-title,.resale-header { display:flex; align-items:center; justify-content:space-between; padding: 2px 2px 13px; }
.line-panel-title small,.resale-header small,.encyclopedia-header small,.vove-header small,.viscord-banner small { color: #8b9297; font: 600 8px/1.4 Arial,sans-serif; letter-spacing: .12em; }
.line-panel-title h3,.resale-header h3,.encyclopedia-header h3,.vove-header h3,.viscord-banner h3 { margin:3px 0 0; color: #292d30; font-size:22px; }
.line-add-button { width:34px;height:34px;border:0;border-radius:12px;color:#fff;background:#2a2c2e;font:21px Arial,sans-serif; }
.line-chat-list,.line-contact-list,.line-moments-cover,.line-moment-card,.line-me-card,.line-settings-list,.vove-answer,.archive-card,.bond-network-card,.viscord-channel,.permission-card,.resale-card,.checkin-card,.encyclopedia-entry { border:1px solid #e7e8e8;border-radius:18px;background:#fbfbfa;box-shadow:0 7px 20px #20232608; }
.line-chat-list,.line-contact-list { overflow:hidden; }
.line-room-row { display:flex;align-items:center;border-bottom:1px solid #ededeb; }
.line-room-row:last-child { border-bottom:0; }
.line-room-open { display:flex;min-width:0;flex:1;align-items:center;gap:10px;padding:12px;border:0;background:transparent;text-align:left; }
.line-room-open > span:nth-child(2) { display:grid;min-width:0;flex:1;gap:4px; }
.line-room-open strong,.line-contact-row strong { overflow:hidden;color:#2a2d30;font-size:11px;text-overflow:ellipsis;white-space:nowrap; }
.line-room-open small,.line-contact-row small { color:#8b9195;font-size:8px; }
.line-avatar { display:grid;width:39px;height:39px;flex:0 0 auto;overflow:hidden;place-items:center;border-radius:14px;color:#fff;background:linear-gradient(140deg,#858a8d,#383b3e);font-size:14px; }
.line-avatar img { width:100%;height:100%;object-fit:cover; }
.line-room-delete { width:28px;height:34px;border:0;color:#989b9d;background:transparent;font-size:16px; }
.line-contact-row { display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid #ededeb; }
.line-contact-row > div { display:grid;min-width:0;flex:1;gap:4px; }
.line-search { margin:0 0 9px; }
.line-search input,.archive-search { min-height:37px;border:1px solid #e4e5e5;border-radius:14px;background:#f3f4f4;font-size:10px; }
.line-student-directory { margin-top:10px;color:#757d82;font-size:10px; }
.line-student-directory summary { padding:8px 4px;cursor:pointer; }
.line-muted { padding:16px;color:#92999e;font-size:10px; }
.line-moments-cover { display:flex;height:116px;align-items:flex-end;padding:13px;color:white;background-position:center;background-size:cover;font-size:13px;text-shadow:0 1px 7px #000a; }
.line-moment-toolbar { display:flex;justify-content:flex-end;margin:9px 0; }
.line-moment-card { margin-bottom:9px;padding:12px; }
.line-moment-head { display:flex;align-items:center;gap:8px; }
.line-moment-head > div { display:grid;gap:4px; }
.line-moment-head strong { font-size:10px; }
.line-moment-head small { color:#92989c;font-size:8px; }
.line-moment-card > p { color:#373b3e;font-size:11px;line-height:1.65;white-space:pre-wrap; }
.line-moment-image { width:100%;max-height:220px;object-fit:cover;border-radius:12px; }
.line-moment-actions { display:flex;gap:6px;margin-top:9px; }
.line-comments { padding:8px 10px;border-radius:10px;background:#f1f2f2;color:#62686c;font-size:9px; }
.line-me-card,.vove-profile { display:flex;flex-direction:column;align-items:center;margin-bottom:12px;padding:20px;text-align:center; }
.line-me-avatar { display:grid;width:62px;height:62px;overflow:hidden;place-items:center;border-radius:21px;color:white;background:#54595d;font-size:22px; }
.line-me-avatar img { width:100%;height:100%;object-fit:cover; }
.line-me-card h3,.vove-profile h3 { margin:10px 0 2px;color:#2d3134; }
.line-me-card p,.vove-profile p { color:#7f878c;font-size:10px; }
.line-me-meta { display:flex;align-items:center;gap:8px; }
.line-settings-list { overflow:hidden; }
.line-setting-row { display:block;width:100%;padding:14px;border:0;border-bottom:1px solid #eee;color:#34383a;background:transparent;text-align:left;font-size:10px; }
.line-thread-view { display:flex;height:100%;min-height:0;flex-direction:column;margin:-4px -4px 0; }
.line-thread-head { display:flex;flex:0 0 auto;align-items:center;gap:8px;padding:5px 6px 9px;border-bottom:1px solid #e7e7e5; }
.line-thread-head > button { width:31px;height:31px;border:0;border-radius:50%;color:#323639;background:#eceeed;font-size:19px; }
.line-thread-head > div { display:grid;min-width:0;flex:1;gap:3px; }
.line-thread-head strong { overflow:hidden;color:#2e3235;font-size:11px;text-overflow:ellipsis;white-space:nowrap; }
.line-thread-head small { color:#92979a;font-size:8px; }
.line-thread-tools { display:flex;flex:0 0 auto;gap:5px;overflow-x:auto;padding:7px 2px; }
.line-thread-tools button { min-height:28px;padding:4px 8px;border:1px solid #e5e6e6;border-radius:11px;color:#62696d;background:#fafafa;font-size:8px;white-space:nowrap; }
.line-thread-background { display:flex;min-height:0;flex:1;overflow:auto;border:1px solid #e2e3e1;border-radius:17px;background:#f3f2ef url("./assets/line-doodle.svg") repeat;background-size:220px 220px; }
.line-thread-messages { display:flex;width:100%;flex-direction:column;gap:8px;padding:12px 9px; }
.line-message-row { display:flex;max-width:88%;flex-direction:column;align-items:flex-start; }
.line-message-row.mine { align-self:flex-end;align-items:flex-end; }
.line-bubble { max-width:100%;padding:9px 11px;border:1px solid #e2e3e0;border-radius:15px 15px 15px 5px;color:#35383a;background:#fff;font-size:10px;line-height:1.6;overflow-wrap:anywhere;box-shadow:0 2px 5px #00000008; }
.line-bubble.mine { border-color:#d8d9d7;border-radius:15px 15px 5px 15px;background:#d7d8d6; }
.line-message-meta { margin:3px 5px 0;color:#8c9295;font:8px Arial,sans-serif; }
.transfer-chat-card { display:grid;min-width:147px;gap:5px; }
.transfer-chat-card > small { color:#858c90;font-size:8px; }
.transfer-chat-card > strong { color:#2f3437;font:600 20px Arial,sans-serif; }
.transfer-chat-card > span,.transfer-chat-card > b { color:#646b70;font-size:9px; }
.transfer-actions { display:flex;gap:6px;margin-top:5px; }
.transfer-actions button { min-height:29px;padding:4px 8px;font-size:8px; }
.line-day-divider { align-self:center;padding:4px 9px;border-radius:10px;color:#777e82;background:#ffffffa8;font-size:8px; }
.line-thread-empty { align-self:center;margin:auto;color:#8d9295;font-size:9px; }
.line-compose { display:flex;flex:0 0 auto;align-items:flex-end;gap:6px;margin-top:8px;padding:6px;border:1px solid #e2e3e1;border-radius:19px;background:#fdfdfc; }
.line-compose > button { width:31px;height:32px;flex:0 0 auto;border:0;border-radius:50%;color:#555c60;background:#e9eae8;font-size:15px; }
.line-compose > button[type="submit"] { color:#fff;background:#303437; }
.line-compose textarea { min-height:32px;max-height:90px;flex:1;padding:8px 5px;border:0;border-radius:0;background:transparent;font-size:10px;resize:none; }
.readonly-note { color:#92989c;font-size:8px;line-height:1.55; }

/* Reference-style school archive, club, question box and secondhand pages */
.encyclopedia-header,.vove-header { padding:4px 2px 12px; }
.encyclopedia-header p,.vove-header p { color:#7d858a;font-size:9px;line-height:1.5; }
.encyclopedia-entry { margin:0 0 8px;overflow:hidden; }
.encyclopedia-entry summary { display:grid;grid-template-columns:1fr auto;gap:5px;padding:12px;cursor:pointer; }
.encyclopedia-entry summary strong { color:#32373a;font-size:11px; }
.encyclopedia-entry summary span { color:#92999d;font-size:8px; }
.encyclopedia-entry summary small { grid-column:1/-1;color:#7d858a;font-size:9px; }
.encyclopedia-entry > p { margin:0;padding:0 12px 13px;color:#596166;font-size:10px;line-height:1.8;white-space:pre-wrap; }
.archive-search { margin-bottom:7px; }
.archive-card { margin:0 0 8px;overflow:hidden; }
.archive-card summary { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;cursor:pointer; }
.archive-card summary strong { color:#34383b;font-size:11px; }
.archive-card summary span { color:#858d92;font-size:8px; }
.archive-body { padding:0 12px 13px;color:#61696e;font-size:9px;line-height:1.7; }
.archive-body p { margin:9px 0;white-space:pre-wrap; }
.archive-body b { color:#343a3e; }
.archive-body mark { padding:0 2px;border-radius:3px;color:#303639;background:#dce4e8; }
.archive-photo { width:calc(50% - 4px);max-height:150px;margin:2px;border-radius:10px;object-fit:cover; }
.bond-network-card { padding:8px; }
.bond-network { width:100%;height:auto; }
.bond-edge { stroke:#9da7ad;stroke-width:1.2;opacity:.7; }
.bond-edge.public { stroke-dasharray:0; }
.bond-node circle { fill:#f0f2f2;stroke:#9ca7ad;stroke-width:1.4; }
.bond-node.center circle { fill:#3d454a;stroke:#fff;stroke-width:3; }
.bond-node text { fill:#343a3e;font-size:8px;text-anchor:middle;font-family:Arial,sans-serif; }
.bond-node.center text { fill:white; }
.bond-legend { display:flex;justify-content:space-around;color:#899196;font-size:7px; }
.viscord-banner { margin-bottom:9px;padding:14px;border-radius:18px;color:white;background:linear-gradient(135deg,#354047,#77838a); }
.viscord-banner small,.viscord-banner h3,.viscord-banner p { color:white; }
.viscord-banner h3 { font-size:17px; }
.viscord-banner p { margin:4px 0 0;font-size:9px;opacity:.8; }
.viscord-body { min-height:220px; }
.channel-title { padding:10px;border-bottom:1px solid #e9eaea;color:#62696d;font-size:9px; }
.channel-title span { font-size:15px; }
.viscord-message { display:flex;gap:8px;padding:12px 8px;border-bottom:1px solid #ededed; }
.viscord-avatar { display:grid;width:29px;height:29px;flex:0 0 auto;place-items:center;border-radius:10px;color:white;background:#6b747a;font-size:10px; }
.viscord-message > div { min-width:0; }
.viscord-message strong { font-size:9px; }
.viscord-message small { color:#8c9397;font-size:7px; }
.viscord-message p { margin:5px 0 0;color:#646c70;font-size:9px;line-height:1.6; }
.viscord-compose { display:flex;gap:6px;padding:8px; }
.viscord-compose input { min-height:34px;font-size:9px; }
.viscord-compose button { border:0;border-radius:11px;padding:0 12px;color:white;background:#454e54;font-size:9px; }
.permission-card { margin-top:9px;padding:12px;color:#596166;font-size:9px;line-height:1.6; }
.permission-card b { color:#353a3e; }
.permission-card .secondary-button { margin:4px 4px 0 0;min-height:30px;color:#3b4145;font-size:8px; }
.vove-answer { margin-bottom:9px;padding:12px; }
.vove-answer-head { display:flex;align-items:center;gap:8px; }
.vove-answer-head strong { flex:1;color:#454b4f;font-size:9px; }
.vove-answer-head small { color:#92999d;font-size:8px; }
.vove-avatar { display:grid;width:33px;height:33px;overflow:hidden;place-items:center;border:0;border-radius:50%;color:#fff;background:#687178;font-size:11px; }
.vove-avatar img { width:100%;height:100%;object-fit:cover; }
.vove-avatar.large { width:57px;height:57px; }
.vove-answer > p { margin:11px 0;color:#454b4f;font-size:11px;line-height:1.65; }
.vove-profile { min-height:160px;justify-content:center;color:#fff;background-position:center;background-size:cover; }
.vove-profile h3,.vove-profile p { color:#fff; }
.vove-profile > button:last-child { border:1px solid #ffffff70;border-radius:11px;padding:7px 11px;color:#fff;background:#ffffff20;font-size:8px; }
.vove-toggle-row { display:flex;align-items:center;justify-content:space-between;padding:12px;border-bottom:1px solid #e7e9e9;color:#42484c;font-size:10px; }
.switch { width:38px;height:22px;padding:2px;border:0;border-radius:20px;background:#c8cdcf; }
.switch i { display:block;width:18px;height:18px;border-radius:50%;background:white;transition:transform .15s ease; }
.switch.on { background:#68767e; }
.switch.on i { transform:translateX(16px); }
.resale-header h3 { margin-top:4px; }
.resale-plus { width:43px;height:43px;border:0;border-radius:50%;color:#fff;background:#31373b;font:24px Arial,sans-serif;box-shadow:0 5px 15px #0002; }
.resale-bottom-nav { overflow:visible; }
.resale-bottom-nav .resale-plus-center { display:grid;width:45px;height:45px;min-width:45px;flex:0 0 45px;place-items:center;transform:translateY(-11px);border:3px solid #f5f6f6;border-radius:50%;color:#fff;background:#30363a;box-shadow:0 4px 12px #0003;font:24px/1 Arial,sans-serif; }
.resale-card { display:flex;gap:10px;margin-bottom:9px;padding:9px; }
.resale-cover { display:grid;width:76px;min-height:86px;flex:0 0 auto;place-items:center;border-radius:13px;color:#646e73;background:linear-gradient(145deg,#eaeded,#d4d9dc);font-size:17px; }
.resale-info { min-width:0;flex:1; }
.resale-title-row { display:flex;justify-content:space-between;gap:5px; }
.resale-title-row strong { overflow:hidden;color:#34393c;font-size:10px;text-overflow:ellipsis;white-space:nowrap; }
.resale-title-row span { color:#3f494f;font:600 11px Arial,sans-serif;white-space:nowrap; }
.resale-info p { display:-webkit-box;overflow:hidden;margin:6px 0;color:#767e82;font-size:8px;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
.resale-meta,.resale-actions { display:flex;align-items:center;justify-content:space-between;gap:5px; }
.resale-meta { color:#8d9498;font-size:7px; }
.resale-actions { margin-top:6px; }
.resale-actions button { min-height:27px;padding:3px 7px;font-size:8px; }
.checkin-card { display:flex;flex-direction:column;align-items:center;padding:21px;text-align:center; }
.checkin-mark { display:grid;width:62px;height:62px;place-items:center;border-radius:21px;color:#fff;background:#4c555b;font:28px Arial,sans-serif; }
.checkin-card > strong { margin-top:13px;font-size:14px; }
.checkin-card > p { color:#858d91;font-size:9px; }
.checkin-card > button { width:100%;margin:9px 0; }
.checkin-credit { display:grid;grid-template-columns:1fr auto;align-items:center;width:100%;margin-top:8px;padding-top:11px;border-top:1px solid #e8e9e8;color:#7e878b;text-align:left;font-size:9px; }
.checkin-credit strong { grid-column:2;grid-row:1/3;color:#343a3d;font:600 22px Arial,sans-serif; }

/* Manager workspace */
.admin-toolbar-label { margin:7px 0;padding:7px 10px;border:1px solid #ffffff1e;border-radius:11px;color:#c5cbd0;background:#ffffff08;font-size:9px; }
.admin-console { display:grid;grid-template-columns:88px minmax(0,1fr);gap:10px;min-height:420px; }
.admin-side-nav { display:grid;align-content:start;gap:4px; }
.admin-side-item { min-height:37px;padding:5px;border:0;border-radius:11px;color:#b8c0c5;background:transparent;text-align:left;font-size:9px; }
.admin-side-item.active { color:#252a2d;background:#e7eaeb; }
.admin-main-area { min-width:0; }
.admin-global-search { position:relative;margin-bottom:9px; }
.admin-global-search label { color:#acb5bb;font-size:8px; }
.admin-global-search input { min-height:35px;font-size:9px; }
.admin-search-popover { position:absolute;z-index:30;top:100%;right:0;left:0;display:grid;max-height:180px;overflow:auto;border:1px solid #ffffff42;border-radius:12px;background:#34393deb;backdrop-filter:blur(18px); }
.admin-search-popover button { display:grid;gap:3px;padding:9px;border:0;border-bottom:1px solid #ffffff12;color:#f0f1f2;background:transparent;text-align:left; }
.admin-search-popover small { color:#b0b7bc;font-size:8px; }
.admin-section-body { min-width:0; }
.admin-stat-grid { display:grid;grid-template-columns:1fr 1fr;gap:7px; }
.admin-stat-grid article { display:grid;gap:8px;padding:12px;border:1px solid #ffffff24;border-radius:14px;background:#ffffff0b; }
.admin-stat-grid small { color:#b4bcc1;font-size:8px; }
.admin-stat-grid strong { color:#fff;font-size:17px; }
.admin-inline-tabs,.admin-shortcuts { display:flex;flex-wrap:wrap;gap:5px;margin:8px 0; }
.admin-inline-tabs button,.admin-shortcuts button { min-height:29px;padding:4px 7px;border:1px solid #ffffff2c;border-radius:10px;color:#d0d6da;background:#ffffff0b;font-size:8px; }
.admin-target-select { margin:8px 0;color:#aeb7bc; }
.admin-system-row { display:grid;gap:5px;margin:12px 0;padding:10px;border:1px solid #ffffff22;border-radius:12px;color:#e0e4e6;font-size:9px; }
.admin-system-row label { display:flex;align-items:center;gap:7px;color:#fff; }
.admin-system-row input { width:16px;min-height:16px; }
.admin-record-list { max-height:340px;overflow:auto; }
.admin-club-detail { margin:7px 0;padding:9px;border:1px solid #ffffff22;border-radius:13px;background:#ffffff08;color:#dce1e4; }
.admin-club-detail > summary { display:flex;justify-content:space-between;gap:7px;cursor:pointer;font-size:9px; }
.admin-club-detail > summary span { color:#aeb7bc;font-size:8px; }
.academic-audit-card { margin-top:12px;padding:12px;border:1px solid #e2e5e6;border-radius:15px;color:#535d62;background:#f8f9f9;font-size:9px; }
.academic-audit-card strong { color:#30383d; }
.academic-audit-card p { margin:7px 0 0;line-height:1.5; }
.veddit-moderator-actions { display:flex;gap:5px;margin-top:9px;padding-top:8px;border-top:1px solid #e6e8e8; }
.veddit-moderator-actions button { min-height:27px;padding:4px 7px;border:1px solid #e1e4e4;border-radius:9px;color:#626a6e;background:#f7f8f8;font-size:8px; }
.vove-reveal { display:grid;gap:5px;margin:9px 0;padding:9px;border-radius:12px;color:#6f777c;background:#f1f3f3;font-size:8px; }
.vove-reveal b { color:#40474b; }
.vove-reveal small { color:#92999d;line-height:1.5; }

.intro-video-overlay { position:fixed;z-index:1000;inset:0;display:grid;place-items:center;background:#090a0b; }
.intro-video { width:100%;height:100%;object-fit:cover; }
.intro-skip { position:absolute;right:22px;bottom:calc(22px + env(safe-area-inset-bottom));padding:8px 13px;border:1px solid #ffffff72;border-radius:18px;color:white;background:#1118;backdrop-filter:blur(14px);font-size:10px; }

@media (max-width: 520px) {
  .stage { padding:0; }
  .home-screen { padding-bottom:calc(88px + env(safe-area-inset-bottom)); }
  .home-page { gap:7px; }
  .home-widget-grid { flex-basis:178px;grid-template-rows:minmax(94px,1fr) minmax(70px,.72fr);gap:6px; }
  .home-app-grid { grid-auto-rows:minmax(65px,1fr); }
  .home-app-grid .app-icon { width:47px;height:47px;border-radius:15px; }
  .home-app-grid .app-icon-label { font-size:7px; }
  .quote-widget { flex-basis:112px; }
  .account-widget { flex-basis:80px; }
  .app-content { padding-right:13px;padding-left:13px; }
  .admin-console { grid-template-columns:66px minmax(0,1fr);gap:7px; }
  .admin-side-item { padding:5px 3px;font-size:8px; }
}

/* Second desktop page follows the supplied widget-first layout. */
.home-page-two-top { display:grid; grid-template-columns:1.08fr .92fr; gap:8px; flex:0 0 166px; min-height:0; }
.home-page-two-top > .quote-widget { min-height:0; height:100%; padding:14px 12px; }
.quote-widget h2 { margin:10px 0 5px; font-size:20px; }
.quote-widget p { max-width:95%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quote-widget-profile { position:relative; z-index:2; display:flex; width:max-content; max-width:100%; align-items:center; gap:6px; margin-top:auto; padding:4px 8px 4px 4px; border-radius:18px; background:#ffffff30; font-size:8px; }
.quote-widget-profile > span:last-child { margin-left:8px; font-size:13px; }
.home-page-two-top .home-app-grid-second { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(68px,1fr)); gap:4px; align-content:space-between; flex:none; min-height:0; margin:0; }
.home-page-two-top .app-icon-button { align-self:center; }
.spec-widget { display:flex; flex:0 0 61px; align-items:center; justify-content:space-between; gap:8px; padding:8px 13px; border-color:#ffffff80; color:#34373a; background-color:#e9e9e6b8; }
.spec-widget > div { position:relative; z-index:2; display:grid; gap:2px; font:700 7px/1.2 Georgia,serif; letter-spacing:.035em; }
.spec-widget > p { position:relative; z-index:2; max-width:40%; margin:0; overflow:hidden; color:#505458; font-size:8px; text-align:right; text-overflow:ellipsis; }
.home-app-grid-mid { flex:0 0 79px; grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-rows:74px; gap:3px 5px; align-content:center; }
.lucky-widget { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 9px; flex:1 1 auto; min-height:137px; padding:10px 12px; background-repeat:no-repeat; }
.lucky-widget .account-widget-top { grid-column:1/-1; margin-bottom:1px; }
.lucky-account-copy { position:relative; z-index:2; display:grid; align-content:start; gap:4px; color:#fff; text-shadow:0 1px 5px #0009; }
.lucky-account-copy strong { font-size:14px; }
.lucky-account-copy span { font-size:8px; }
.lucky-apps { position:relative; z-index:3; display:flex; align-self:start; gap:4px; }
.lucky-apps .app-icon-button { width:42px; min-width:42px; gap:2px; }
.lucky-apps .app-icon { width:38px; height:38px; border-radius:12px; }
.lucky-apps .app-icon-label { max-width:42px; overflow:hidden; font-size:6px; text-overflow:ellipsis; white-space:nowrap; }
.lucky-profile-edit { position:relative; z-index:4; align-self:end; grid-column:1/-1; justify-self:end; padding:4px 8px; border:1px solid #ffffff50; border-radius:11px; color:#fff; background:#ffffff20; font-size:8px; }
.lucky-widget .widget-image-edit { z-index:5; top:auto; right:8px; bottom:39px; }
@media (max-width:520px) {
  .home-page-two-top { flex-basis:160px; gap:6px; }
  .home-page-two-top .home-app-grid-second { grid-template-rows:repeat(2,minmax(64px,1fr)); }
  .spec-widget { flex-basis:58px; padding:7px 10px; }
  .home-app-grid-mid { flex-basis:76px; grid-auto-rows:72px; }
  .lucky-widget { min-height:130px; }
}
@media (max-height:780px) {
  .home-page-two-top { flex-basis:142px; }
  .home-page-two-top .home-app-grid-second { grid-template-rows:repeat(2,minmax(56px,1fr)); }
  .spec-widget { flex-basis:52px; }
  .home-app-grid-mid { flex-basis:70px; grid-auto-rows:68px; }
  .lucky-widget { min-height:112px; }
}
.line-thread-background.custom-chat-background { background-position:center !important; background-size:cover !important; background-repeat:no-repeat !important; }
.phone-view.has-nested-page #app-screen > .app-header { display:none; }
.phone-view.has-nested-page #app-screen > .app-content { overflow:hidden; padding:0 10px 8px; }
.phone-view.has-nested-page .line-thread-view { height:100%; margin:0; }

.intro-video{object-fit:contain;background:#000}.intro-play{position:absolute;z-index:5;top:50%;left:50%;transform:translate(-50%,-50%);padding:18px;border:0;border-radius:22px;background:#fff;color:#111}.archive-photo-preview{display:flex;gap:10px;flex-wrap:wrap}.archive-photo-preview img{width:120px;height:140px;object-fit:contain;border-radius:12px}

#home-screen{padding:0!important}#home-content{height:100%;padding:0!important}.reference-desktop{width:100%;height:100%;border:0;flex:0 0 100%;scroll-snap-align:start}#phone-view:not(.has-app)>.phone-dock,#phone-view:not(.has-app)>.system-bar{visibility:hidden}#home-pages{height:100%;padding:0;gap:0}
