:root {
  --ink: #132238;
  --muted: #5a6b7d;
  --paper: #f3f7f4;
  --card: #ffffff;
  --line: #d5e0d9;
  --teal: #0f7a6a;
  --teal-deep: #0a554a;
  --coral: #d3543c;
  --gold: #c9972a;
  --ok: #1f8a4c;
  --bad: #c0392b;
  --shadow: 0 18px 50px rgba(19, 34, 56, 0.08);
  --radius: 18px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "ZCOOL XiaoWei", "Noto Sans SC", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d8efe8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #f7e8d2 0%, transparent 45%),
    linear-gradient(180deg, #eef5f1 0%, var(--paper) 40%, #e8f0eb 100%);
}

.hidden { display: none !important; }
.view { min-height: 100vh; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.auth-hero .brand {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  color: var(--teal-deep);
  margin: 0 0 1rem;
}
.auth-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 400;
}
.auth-hero .lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 28rem;
  line-height: 1.7;
}

.auth-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.tab {
  flex: 1;
  border: 1px solid var(--line);
  background: #f7faf8;
  border-radius: 999px;
  padding: 0.65rem;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
}
.tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.admin-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #f7faf8;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  color: var(--muted);
  white-space: nowrap;
}
.admin-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 700;
}
.admin-tab.active .hot-meta { color: rgba(255, 255, 255, 0.88); }
.admin-panel { display: grid; gap: 0.85rem; }
.admin-panel.hidden { display: none !important; }

.link-btn {
  border: 0;
  background: none;
  color: var(--teal-deep);
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.agree-row { margin: 0.25rem 0 0.5rem; }
.agreement-dialog {
  width: min(640px, 100%);
  max-height: min(85vh, 820px);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem 1.25rem;
  display: grid;
  gap: 0.75rem;
}
.agreement-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.agreement-dialog-head h3 { margin: 0; color: var(--teal-deep); }
.agreement-body {
  margin: 0;
  padding: 0.9rem 1rem;
  max-height: 55vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7faf8;
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink);
}
.agreement-editor {
  width: 100%;
  min-height: 320px;
  font: inherit;
  line-height: 1.55;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: vertical;
}
.pricing-cost-note {
  margin: 0.35rem 0 0;
  color: var(--teal-deep);
  font-weight: 600;
}

.quiz-runner { display: grid; gap: 0.85rem; }
.quiz-progress-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}
.quiz-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.quiz-card .option.selected {
  border-color: var(--teal);
  background: rgba(46, 125, 98, 0.1);
  box-shadow: 0 0 0 2px rgba(46, 125, 98, 0.15);
}
.essay-point-label {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.55rem;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.essay-point-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
  background: #fff;
}
.essay-point-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 125, 98, 0.12);
}
.essay-tip-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #f4f8f6;
  border-radius: 10px;
}
.quiz-tip-panel {
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fffdf8;
}
.quiz-summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
}
.quiz-summary-card h3 { margin: 0 0 0.4rem; color: var(--teal-deep); }
.quiz-result-list { display: grid; gap: 0.55rem; }
.quiz-result-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem 0.95rem;
  font: inherit;
  cursor: pointer;
}
.quiz-result-item.ok {
  border-color: rgba(26, 122, 76, 0.45);
  background: #f3faf6;
  color: #145a3a;
}
.quiz-result-item.bad {
  border-color: #c62828;
  background: #fff5f5;
  color: #b71c1c;
  font-weight: 600;
}
.quiz-result-item.bad .hot-meta { color: #c62828; }
.quiz-result-item:hover { filter: brightness(0.98); }
.hot-item-btn.wrong-hot {
  border: 1px solid #c62828;
  background: #fff5f5;
  border-radius: 12px;
}
.hot-item-btn.wrong-hot .hot-rank,
.hot-item-btn.wrong-hot .hot-count { color: #c62828; font-weight: 700; }
.auth-form { display: grid; gap: 0.9rem; }
.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.auth-form input, select, textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #fbfcfb;
  color: var(--ink);
}
.auth-form input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(15, 122, 106, 0.25);
  border-color: var(--teal);
}
.hint { color: var(--muted); font-size: 0.85rem; margin: 0; }
.captcha-row, .sms-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}
.captcha-row .grow, .sms-row .grow { flex: 1; min-width: 0; }
.captcha-img-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: #fff;
  cursor: pointer;
  height: 42px;
  width: 120px;
  overflow: hidden;
  flex-shrink: 0;
}
.captcha-img-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.captcha-dialog {
  width: min(400px, 100%);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem 1.25rem;
  display: grid;
  gap: 0.85rem;
}
.captcha-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.captcha-dialog-head h3 {
  margin: 0;
  color: var(--teal-deep);
  font-size: 1.05rem;
}
.captcha-dialog .hint { margin: -0.25rem 0 0; }
.captcha-dialog .captcha-row { align-items: stretch; }
.captcha-dialog .captcha-img-btn { height: 44px; align-self: flex-end; }
.captcha-dialog-msg {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--coral);
}
.captcha-dialog-msg.ok { color: var(--ok); }
.sms-row .btn { flex-shrink: 0; white-space: nowrap; min-width: 7.5rem; }
.settings-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.25rem;
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.settings-card label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.settings-card input:not([type="checkbox"]),
.settings-card textarea,
.settings-card select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  min-height: 44px;
}
.settings-card input:not([type="checkbox"]):focus,
.settings-card textarea:focus,
.settings-card select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 122, 106, 0.12);
}
.settings-card label.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
}
.settings-card label.check-row input {
  width: auto;
  min-height: 0;
  margin-top: 0.2rem;
  padding: 0;
}
.msg { min-height: 1.2em; color: var(--coral); margin: 0.75rem 0 0; font-size: 0.9rem; }
.msg.ok { color: var(--ok); }

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  border-color: transparent;
  color: #fff;
}
.btn.lg { padding: 0.95rem 1.4rem; font-size: 1.05rem; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: #f0c7c2; }
.btn.ok { color: var(--ok); border-color: #b7e0c6; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  background: rgba(243, 247, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.brand-mini {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--teal-deep);
  white-space: nowrap;
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-desktop {
  display: none;
  gap: 0.35rem;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.nav-drawer {
  display: none;
}
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.nav-drawer-title {
  margin: 0;
  font-weight: 700;
  color: var(--teal-deep);
}
.nav-btn {
  border: none;
  background: transparent;
  font: inherit;
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
}
.nav-btn.active {
  background: #dff0ea;
  color: var(--teal-deep);
  font-weight: 700;
}
.userbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  flex-shrink: 0;
}
.userbox #user-name {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.userbox-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.vip-badge {
  flex-shrink: 0;
  border: none;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #c62828, #e53935);
  box-shadow: 0 1px 4px rgba(198, 40, 40, 0.35);
  cursor: pointer;
  line-height: 1.35;
}
.vip-badge.hidden { display: none; }
.vip-gate-tip {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  color: #a45b3b;
}
.vip-gate-tip.hidden { display: none; }
.vip-gate-tip a {
  color: var(--teal-deep);
  font-weight: 600;
  cursor: pointer;
}
.pricing-wrap { overflow-x: auto; margin-bottom: 1rem; }
.vip-price-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}
.vip-price-table th,
.vip-price-table td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: center;
  vertical-align: middle;
}
.vip-price-table th:first-child,
.vip-price-table td:first-child {
  text-align: left;
  font-weight: 600;
  background: #f4f8f6;
  color: var(--teal-deep);
  min-width: 8.5rem;
}
.vip-price-table thead th {
  background: #e8f3ef;
  font-weight: 700;
}
.vip-price-now { font-size: 1.15rem; font-weight: 800; color: var(--teal-deep); }
.vip-price-was {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
}
.feat-yes { color: #1a7a4c; font-weight: 800; font-size: 1.05rem; }
.feat-no { color: #c62828; font-weight: 800; font-size: 1.05rem; }
.feat-meta { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 400; margin-top: 0.15rem; }
.vip-pay-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(20, 32, 28, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.vip-pay-overlay.hidden { display: none; }
.vip-pay-dialog {
  width: min(400px, 100%);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem 1.4rem;
  text-align: center;
}
.vip-pay-dialog h3 { margin: 0 0 0.5rem; color: var(--teal-deep); }
.vip-pay-dialog .sub { margin: 0 0 0.85rem; }
.vip-pay-qr {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
  min-height: 180px;
  align-items: center;
}
.vip-pay-qr img,
.vip-pay-qr canvas { max-width: 220px; border-radius: 8px; }
.vip-pay-qr-canvas {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.vip-pay-qr-canvas table { margin: 0 auto; }
.vip-pay-status { margin: 0.65rem 0 0; font-size: 0.9rem; color: var(--muted); min-height: 1.25rem; }
.vip-pay-status.bad { color: #a45b3b; }
.vip-ent-grid {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.88rem;
}
.vip-ent-row { display: flex; justify-content: space-between; gap: 0.5rem; }
.admin-vip-plans {
  display: grid;
  gap: 1rem;
}
.admin-vip-plan-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 0;
  display: grid;
  gap: 0.85rem;
}
.admin-vip-plan-card h4 {
  margin: 0;
  color: var(--teal-deep);
  font-size: 1.05rem;
}
.admin-vip-plan-card .plan-grid {
  display: grid;
  gap: 0.75rem 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.admin-vip-plan-card .plan-flags {
  display: grid;
  gap: 0.55rem 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  padding: 0.75rem 0.85rem;
  background: #f4f8f6;
  border-radius: 12px;
}
.admin-vip-plan-card label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.admin-vip-plan-card label.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  color: var(--ink);
}
.admin-vip-plan-card label.check-row input {
  width: auto;
  margin-top: 0.2rem;
  min-height: 0;
  padding: 0;
}
.admin-vip-plan-card input:not([type="checkbox"]),
.admin-vip-plan-card textarea,
.admin-vip-plan-card select {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  min-height: 44px;
  background: #fff;
}
.admin-vip-plan-card textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.45;
}
.admin-vip-plan-card input:focus,
.admin-vip-plan-card textarea:focus,
.admin-vip-plan-card select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 122, 106, 0.12);
}
.admin-vip-plan-card .plan-note-label { grid-column: 1 / -1; }
.btn-sm { padding: 0.45rem 0.7rem; font-size: 0.88rem; }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(19, 34, 56, 0.4);
  z-index: 90;
}
.bottom-nav { display: none; }

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.tips-home-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tips-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1rem;
  align-items: start;
}
.tips-nav {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  display: grid;
  gap: 0.35rem;
  max-height: min(70vh, 720px);
  overflow: auto;
}
.tips-nav-item {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  font: inherit;
  color: inherit;
}
.tips-nav-item:hover { background: #f3f8f5; }
.tips-nav-item.active {
  background: #e7f3ec;
  border-color: #c5ddd0;
}
.tips-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem 1.4rem;
  min-height: 240px;
}
.tips-article-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}
.tips-section { margin-bottom: 1.25rem; }
.tips-section h4 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--teal-deep, #0f7a6a);
}
.tips-block {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  background: #f6faf8;
  border-radius: 10px;
}
.tips-block-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.tips-block ul {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.65;
}
@media (max-width: 800px) {
  .tips-layout { grid-template-columns: 1fr; }
  .tips-nav {
    max-height: none;
    grid-template-columns: 1fr;
  }
}
.account-shell {
  width: 100%;
  max-width: 720px;
}
.account-tabs { margin-bottom: 1rem; }
.account-panel { display: grid; gap: 1rem; }
.account-panel.hidden { display: none !important; }
.account-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem;
  width: 100%;
  max-width: none;
  margin-bottom: 0;
  box-sizing: border-box;
}
.account-card .section-title { margin: 0 0 0.75rem; }
.account-card .section-title + .section-title,
.account-card .vip-info + .section-title,
.account-hint + .section-title { margin-top: 1.25rem; }
.account-hint { margin: -0.25rem 0 1rem; }
.account-user { margin: 0 0 1rem; color: var(--muted); }
.account-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1.15rem;
}
.account-field {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  background: #f4f8f6;
  border-radius: 10px;
  min-width: 0;
}
.account-label {
  font-size: 0.8rem;
  color: var(--muted);
}
.account-field b {
  font-size: 0.98rem;
  word-break: break-all;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.account-orders-wrap { width: 100%; }
.account-orders-table { padding: 0; overflow-x: auto; }
.account-orders-table .data-table { min-width: 860px; }
.mono-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  max-width: 180px;
}
.dispute-dialog {
  width: min(480px, 100%);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem 1.4rem;
  text-align: left;
}
.dispute-dialog h3 { margin: 0 0 0.35rem; color: var(--teal-deep); }
.dispute-dialog .sub { margin: 0 0 1rem; }
.dispute-handle-box {
  padding: 0.75rem 0.85rem;
  background: #f4f8f6;
  border-radius: 10px;
}
.dispute-handle-text {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
}
.account-order-card,
.account-dispute-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fafcfb;
  display: grid;
  gap: 0.45rem;
}
.account-order-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}
.account-order-meta {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}
.account-form,
.order-dispute-form {
  display: grid;
  gap: 0.85rem;
}
.account-form label,
.order-dispute-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.account-form input,
.order-dispute-form input,
.order-dispute-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  min-height: 46px;
  background: #fff;
}
.order-dispute-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}
.account-form input:focus,
.order-dispute-form input:focus,
.order-dispute-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 125, 98, 0.12);
}
.order-dispute-form {
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}
.order-dispute-form .account-actions { margin-top: 0.15rem; }
.vip-info {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0;
  padding: 0.75rem 0.85rem;
  background: #f4f8f6;
  border-radius: 10px;
  font-size: 0.92rem;
}
.vip-on { color: #1a7a4c; font-weight: 600; }
.vip-off { color: #a45b3b; font-weight: 600; }
@media (max-width: 640px) {
  .account-profile-grid { grid-template-columns: 1fr; }
}
.referral-code-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.referral-stats {
  display: flex;
  gap: 1.25rem;
  margin: 0.85rem 0;
  font-size: 0.95rem;
}
.qr-wrap {
  display: grid;
  justify-items: start;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400 !important;
}
.check-row input { width: auto; margin-top: 0.2rem; }
.api-sample {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  background: #f7faf8;
  border-radius: 10px;
  font-size: 0.8rem;
  overflow: auto;
  white-space: pre-wrap;
}
.settings-card .sms-row input.grow,
.settings-card .grow { flex: 1; min-width: 0; width: 100%; }

.plan-settings-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.35rem;
  margin-bottom: 1.5rem;
}
.plan-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}
.plan-presets .preset.active {
  background: #dff0ea;
  border-color: var(--teal);
  color: var(--teal-deep);
}
.plan-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.plan-fields label, .check-row {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.plan-fields input[type="number"] {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: #fbfcfb;
  color: var(--ink);
  width: 100%;
}
.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.check-row input { width: auto; }

.site-footer {
  margin-top: 2.5rem;
  padding: 1.25rem 0 0.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.site-footer a:hover {
  color: var(--teal-deep);
  text-decoration: underline;
}

.correct-panel {
  margin-top: 0.85rem;
  padding: 0.95rem 1rem;
  border: 1px dashed #e0b4ab;
  border-radius: 14px;
  background: #fff8f6;
}
.correct-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.correct-label input,
.correct-label select,
.correct-label textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.correction-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  background: #fbfcfb;
}
.correction-card h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}
.correction-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.55rem;
}
.correction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 0.55rem 0 0.75rem;
}
.correction-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.92rem;
}
.correction-box b { display: block; margin-bottom: 0.25rem; color: var(--muted); font-size: 0.8rem; }
.correction-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.correction-status.pending { background: #fff4de; color: #8a6a16; }
.correction-status.accepted { background: #e5f6ec; color: var(--ok); }
.correction-status.rejected { background: #fdeceb; color: var(--bad); }

@media (max-width: 900px) {
  .correction-grid { grid-template-columns: 1fr; }
}

.home-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.home-hero > div:first-child,
.stat-grid, .q-card, .practice-head, .day-cell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.home-hero > div:first-child { padding: 1.6rem; }
.eyebrow {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 0.5rem;
}
h2 { font-family: var(--display); font-weight: 400; margin: 0 0 0.5rem; font-size: 2rem; }
.sub { color: var(--muted); line-height: 1.6; margin: 0 0 1.2rem; }
.section-title { font-size: 1.1rem; margin: 0 0 0.8rem; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem;
}
.stat {
  background: #f7fbf9;
  border-radius: 14px;
  padding: 0.9rem;
}
.stat b { display: block; font-size: 1.45rem; margin-top: 0.2rem; }
.stat span { color: var(--muted); font-size: 0.85rem; }

.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.55rem;
}
.day-cell {
  padding: 0.7rem 0.4rem;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease;
}
.day-cell:hover { transform: translateY(-2px); }
.day-cell strong { display: block; font-size: 1.05rem; }
.day-cell small { color: var(--muted); }
.day-cell.done { background: #e5f6ec; border-color: #b7e0c6; }
.day-cell.current { outline: 2px solid var(--teal); }

.practice-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
}
.progress-bar {
  height: 8px;
  background: #dde8e2;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}
#practice-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), #2aa88f);
  transition: width .25s ease;
}

.q-card {
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  animation: rise .35s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.q-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #eef5f1;
  color: var(--muted);
}
.badge.review { background: #fff4de; color: #8a6a16; }
.badge.choice { background: #dff0ea; color: var(--teal-deep); }
.badge.essay { background: #fde8e2; color: #9a3d2c; }
.q-module { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.5rem; }
.q-stem {
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 1.05rem;
  margin: 0 0 1rem;
}
.options { display: grid; gap: 0.55rem; }
.option {
  text-align: left;
  border: 1px solid var(--line);
  background: #fbfcfb;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font: inherit;
  line-height: 1.5;
}
.option:hover:not(:disabled) { border-color: var(--teal); background: #f0faf7; }
.option.correct {
  border-color: var(--ok);
  background: #e8f8ee;
  color: var(--ok);
  font-weight: 700;
}
.option.wrong {
  border-color: var(--bad);
  background: #fdeceb;
  color: var(--bad);
}
.option:disabled { cursor: default; }

.feedback {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f7faf8;
  line-height: 1.65;
  white-space: pre-wrap;
}
.feedback.ok { border-color: #b7e0c6; background: #eefaf3; }
.feedback.bad { border-color: #f0c7c2; background: #fff5f3; }
.actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.9rem; }
.essay-box textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  margin-bottom: 0.75rem;
}
.essay-hint {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.essay-parts { display: grid; gap: 0.65rem; margin-bottom: 0.75rem; }
.essay-part-label {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.essay-field {
  width: 100%;
  text-align: left;
  min-height: 3.2rem;
  padding: 0.7rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
  cursor: pointer;
}
.essay-field.filled { color: var(--ink); border-style: solid; background: #fff; }
.essay-field.active {
  border-color: #3d7a5c;
  box-shadow: 0 0 0 3px rgba(61, 122, 92, 0.12);
}
.essay-chip-panel {
  margin: 0.5rem 0 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f7f5;
}
.essay-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.essay-selected, .essay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  min-height: 2rem;
}
.chip {
  border: 1px solid #c9d8cf;
  background: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
}
.chip:hover { border-color: #3d7a5c; }
.chip.selected {
  background: #e7f3ec;
  border-color: #3d7a5c;
}
.chip.picked {
  background: #d8eee3;
  border-color: #2f6b50;
  box-shadow: inset 0 0 0 1px #2f6b50;
  opacity: 1;
}
.essay-part-block {
  margin: 0.85rem 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #d7e4dc;
}
.essay-part-block:last-child { border-bottom: none; }
.essay-preamble { margin-bottom: 0.75rem; }
.essay-part-stem { margin: 0 0 0.55rem; }
.essay-chip-inline {
  margin-top: 0.55rem;
}
.essay-expand-actions {
  margin-top: 0.75rem;
}
.essay-expand-detail {
  margin-top: 0.75rem;
  padding-top: 0.25rem;
}
.essay-expand-detail .essay-part-block {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--line);
}
.essay-expand-detail .essay-part-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.essay-expand-actions .btn-ai-essay-expand-detail {
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
}
.essay-expand-actions .btn-ai-essay-expand {
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(15, 122, 106, 0.28);
  border: 2px solid var(--teal-deep);
}
.essay-expand-actions .btn-ai-essay-expand:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.essay-expand-panel {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #f0faf7;
  border: 1px solid #c5e4da;
}
.essay-expand-panel.hidden { display: none; }
.essay-expand-label {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  color: var(--teal-deep);
  font-weight: 600;
}
.essay-field[disabled] {
  cursor: default;
  opacity: 1;
}

.hot-item-btn {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: transparent;
}
.hot-item-btn:hover { background: #f3f8f5; }

.qdm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(20, 32, 28, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.qdm-overlay.hidden { display: none; }
.qdm-dialog {
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: var(--card);
  border-radius: 16px 16px 12px 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.25rem;
}
.qdm-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.qdm-title { margin: 0 0 0.25rem; font-size: 1.05rem; }
.qdm-meta { margin: 0; }
.detail-options { margin: 0.75rem 0; }
.detail-opt { margin: 0.35rem 0; line-height: 1.5; }
body.modal-open { overflow: hidden; }
.ai-detail {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
}
.ai-content {
  white-space: pre-wrap;
  line-height: 1.65;
  margin: 0;
  font-family: inherit;
  font-size: 0.95rem;
}

@media (min-width: 720px) {
  .qdm-overlay { align-items: center; }
  .qdm-dialog { border-radius: 16px; }
}
.empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.chart-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.25rem;
}
.chart-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.chart-card canvas { max-height: 280px; }

.hot-list, .table-wrap, .admin-detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}
.hot-item, .table-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e8efeA;
}
.hot-item:last-child, .table-row:last-child { border-bottom: none; }
.hot-rank {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #dff0ea;
  color: var(--teal-deep);
  display: grid; place-items: center;
  font-weight: 700;
}
.hot-meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.hot-count { font-weight: 700; color: var(--coral); white-space: nowrap; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #e8efea;
  vertical-align: top;
}
.data-table th { color: var(--muted); font-weight: 600; }
.data-table tr:hover td { background: #f7fbf9; }
.day-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.day-mini span {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.35rem;
  text-align: center;
  font-size: 0.78rem;
  background: #fbfcfb;
}
.day-mini span.done { background: #e5f6ec; border-color: #b7e0c6; }
.admin-only.hidden { display: none !important; }

/* Desktop: horizontal nav in topbar */
@media (min-width: 901px) {
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }
  .nav-desktop { display: flex; }
  .nav-drawer,
  .nav-backdrop,
  .bottom-nav,
  .menu-toggle { display: none !important; }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav-desktop { display: none !important; }

  .nav-backdrop[hidden] { display: none !important; }
  .nav-backdrop:not([hidden]) { display: block; }

  .nav-drawer {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    z-index: 100;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.25rem;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    background: #f7fbf9;
    border-right: 1px solid var(--line);
    box-shadow: 8px 0 30px rgba(19, 34, 56, 0.18);
    transform: translate3d(-105%, 0, 0);
    transition: transform .22s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none;
  }
  .nav-drawer.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-drawer .nav-btn {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    font-size: 1.05rem;
    min-height: 48px;
  }

  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(10px);
  }
  .bottom-nav-btn {
    border: none;
    background: transparent;
    font: inherit;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.15rem;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .bottom-nav-btn .bn-ico {
    font-size: 1.05rem;
    line-height: 1;
  }
  .bottom-nav-btn.active {
    color: var(--teal-deep);
    font-weight: 700;
  }

  main {
    padding: 1rem 0.85rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .auth-shell, .home-hero, .chart-grid { grid-template-columns: 1fr; }
  .auth-shell { padding: 1.25rem 1rem 2rem; gap: 1.25rem; }
  .auth-hero h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .auth-hero .lead { font-size: 0.95rem; }
  .auth-panel { padding: 1.25rem; border-radius: 22px; }

  .practice-head {
    flex-direction: column;
    padding: 1rem;
  }
  h2 { font-size: 1.55rem; }
  .q-card { padding: 1rem; }
  .q-stem { font-size: 1rem; }
  .option { padding: 0.95rem 0.85rem; font-size: 0.98rem; }
  .q-top { flex-wrap: wrap; }

  .day-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 0.4rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; padding: 0.75rem; }
  .stat b { font-size: 1.25rem; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0.75rem; }
  .data-table { min-width: 560px; }
  .hot-item {
    grid-template-columns: 40px 1fr auto;
    gap: 0.5rem;
  }
  .plan-fields { grid-template-columns: 1fr; }
  .userbox #user-name { display: none; }
  .userbox-identity .vip-badge { display: inline-flex; }
  .btn.lg { width: 100%; }
}

@media (max-width: 420px) {
  .btn-sm { padding: 0.4rem 0.55rem; }
  .bottom-nav-btn span:not(.bn-ico) { font-size: 0.65rem; }
}

/* ---- 中考倒计时 / 首页关怀 / 技巧滚动 / Toast ---- */
.zhongkao-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  padding: 0.65rem 1rem;
  text-align: center;
  background: linear-gradient(90deg, #0f7a6a, #1a9b86 45%, #0a554a);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(10, 85, 74, 0.25);
}
.zhongkao-banner strong { font-weight: 800; letter-spacing: 0.02em; }
.zhongkao-banner.urgent {
  background: linear-gradient(90deg, #c45a2c, #d3543c 50%, #a33b28);
}
.home-encourage {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff8ef, #eef8f4);
  border: 1px solid #e2d3b8;
  box-shadow: var(--shadow);
}
.encourage-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 700;
}
.encourage-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--teal-deep);
  font-family: var(--display);
}
.tips-marquee {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.tips-marquee-tag {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #dff0ea;
  color: var(--teal-deep);
  font-size: 0.78rem;
  font-weight: 700;
}
.tips-marquee-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
#tips-marquee-text {
  display: inline-block;
  animation: tips-slide 0.55s ease;
  font-size: 0.92rem;
  color: var(--muted);
}
@keyframes tips-slide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-study-panel {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem 1.25rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.home-visit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.home-visit-card {
  text-align: left;
  border: 1px solid var(--line);
  background: #f7fbf9;
  border-radius: 14px;
  padding: 0.85rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.home-visit-card:hover { border-color: var(--teal); background: #eef8f4; }
.home-visit-title { font-weight: 700; color: var(--teal-deep); margin-bottom: 0.25rem; }
.home-visit-days { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.35rem; }
.home-visit-hint { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.home-soft-reminders { margin-bottom: 1rem; }
.soft-reminder {
  margin: 0.4rem 0;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #fff7f2;
  border-left: 3px solid #e8a07a;
  color: #6b4a3a;
  font-size: 0.92rem;
  line-height: 1.55;
}
.home-browse-chart-card { margin-top: 0.5rem; }
.browse-progress-bar-wrap { margin: 0.35rem 0 0; color: var(--teal-deep); }
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  max-width: min(90vw, 22rem);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: rgba(19, 34, 56, 0.92);
  color: #fff;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  text-align: center;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast.ok { background: rgba(15, 122, 106, 0.95); }
.app-toast.bad { background: rgba(192, 57, 43, 0.95); }
@media (max-width: 760px) {
  .home-visit-stats { grid-template-columns: 1fr; }
  .zhongkao-banner { font-size: 0.92rem; padding: 0.55rem 0.75rem; }
  .tips-marquee { border-radius: 14px; }
}
