:root {
  --forest: #174b3b;
  --forest-deep: #10372c;
  --forest-soft: #e8f1ed;
  --coral: #d9634f;
  --coral-soft: #f8e5df;
  --gold: #c59a44;
  --ink: #1f2925;
  --muted: #66736d;
  --paper: #fffdf8;
  --surface: #ffffff;
  --line: #dce5e0;
  --shadow: 0 22px 55px rgba(23, 75, 59, 0.12);
  --header-h: 78px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: #f5f8f6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top left, #fff8ef 0, transparent 34%), #f5f8f6; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  padding: 10px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(23, 75, 59, 0.1);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 54px; height: 54px; object-fit: contain; border-radius: 16px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { color: var(--forest); font-size: 18px; letter-spacing: 0.02em; }
.brand-copy small { color: var(--muted); font-size: 12px; }

.menu-button { width: 46px; height: 46px; display: grid; place-content: center; gap: 5px; border: 0; border-radius: 14px; background: var(--forest); cursor: pointer; }
.menu-button span { width: 20px; height: 2px; border-radius: 99px; background: #fff; }
.site-menu { position: fixed; top: 0; right: 0; z-index: 80; width: min(390px, 92vw); height: 100vh; padding: 24px; overflow-y: auto; background: var(--paper); box-shadow: -28px 0 60px rgba(20, 47, 38, 0.2); transform: translateX(110%); transition: transform 0.22s ease; }
.site-menu.open { transform: translateX(0); }
.menu-backdrop { position: fixed; inset: 0; z-index: 70; border: 0; background: rgba(10, 29, 23, 0.42); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.menu-backdrop.open { opacity: 1; pointer-events: auto; }
.menu-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.menu-heading strong { color: var(--forest); font-size: 22px; }
.menu-heading button { border: 0; background: transparent; font-size: 34px; color: var(--muted); cursor: pointer; }
.menu-group { padding: 20px 0; border-bottom: 1px solid var(--line); }
.menu-group > p, .menu-account > p { margin: 0 0 10px; color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.menu-group a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 12px; border-radius: 14px; }
.menu-group a:hover, .menu-group a.active { background: var(--forest-soft); }
.menu-group span { display: grid; gap: 3px; }
.menu-group b { color: var(--forest-deep); }
.menu-group small { color: var(--muted); }
.menu-group em { font-style: normal; color: var(--muted); font-size: 11px; background: #edf0ee; border-radius: 999px; padding: 5px 8px; white-space: nowrap; }
.menu-account { padding-top: 20px; }
.menu-account > span { display: block; margin-bottom: 12px; color: var(--muted); word-break: break-all; }
.menu-login-link { display: block; margin-top: 20px; padding: 13px; border-radius: 13px; text-align: center; color: #fff; background: var(--forest); font-weight: 800; }

main { width: min(1220px, calc(100% - 32px)); margin: 0 auto; padding: clamp(28px, 5vw, 60px) 0 70px; }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }

.auth-layout { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(22px, 4vw, 52px); align-items: stretch; }
.hero-panel, .auth-card, .section-block, .dashboard-hero, .practice-shell, .verification-card, .static-card { background: rgba(255,255,255,0.96); border: 1px solid rgba(23,75,59,0.1); box-shadow: var(--shadow); }
.hero-panel { min-height: 650px; padding: clamp(38px, 6vw, 76px); border-radius: 34px; background: linear-gradient(145deg, rgba(255,253,248,0.98), rgba(232,241,237,0.95)); }
.hero-panel h1 { margin: 10px 0 18px; color: var(--forest-deep); font-size: clamp(44px, 6vw, 76px); line-height: 1.08; letter-spacing: -0.04em; }
.hero-copy { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.plan-promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0; }
.plan-promise-grid article { padding: 18px; border: 1px solid rgba(23,75,59,0.12); border-radius: 18px; background: rgba(255,255,255,0.78); }
.plan-promise-grid strong { display: block; color: var(--forest); font-size: 26px; }
.plan-promise-grid span { color: var(--muted); font-size: 13px; }
.hero-benefits { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-benefits span { padding: 9px 12px; border-radius: 999px; background: var(--coral-soft); color: #874437; font-size: 13px; font-weight: 700; }

.auth-card { align-self: center; padding: 30px; border-radius: 28px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 26px; padding: 5px; border-radius: 13px; background: #eef3f0; }
.auth-tab { border: 0; border-radius: 10px; padding: 11px; color: var(--muted); background: transparent; font-weight: 800; cursor: pointer; }
.auth-tab.active { background: #fff; color: var(--forest); box-shadow: 0 4px 14px rgba(23,75,59,0.1); }
.auth-card h2 { margin: 0 0 8px; font-size: 30px; color: var(--forest-deep); }
.auth-card > p { color: var(--muted); line-height: 1.7; }
label { display: grid; gap: 7px; margin: 14px 0; color: var(--ink); font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid #cad7d0; border-radius: 12px; padding: 12px 13px; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23,75,59,0.1); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 18px; border: 0; border-radius: 12px; font-weight: 850; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-full { width: 100%; }
.button-primary { color: #fff; background: var(--forest); }
.button-secondary { color: #fff; background: var(--coral); }
.button-outline { color: var(--forest); background: #fff; border: 1px solid var(--forest); }
.button-light { color: var(--forest); background: #fff; }
.button-google { color: #26342e; background: #fff; border: 1px solid var(--line); }
.google-g { display: grid; place-content: center; width: 25px; height: 25px; border-radius: 50%; color: #4285f4; font-weight: 900; }
.text-button { border: 0; padding: 8px 0; color: var(--forest); background: transparent; font-weight: 800; cursor: pointer; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-note { margin-top: 18px; padding: 13px; border-radius: 12px; background: #f5f1e7; font-size: 12px; }
.message { min-height: 22px; margin: 10px 0 0; color: #a44a3d; font-size: 13px; line-height: 1.6; }
.message.success { color: #26704e; }

.verification-view { min-height: 65vh; display: grid; place-items: center; }
.verification-card { width: min(600px, 100%); padding: 44px; border-radius: 30px; text-align: center; }
.verification-card img { width: 82px; height: 82px; object-fit: contain; }
.verification-card h1 { margin: 8px 0 15px; color: var(--forest-deep); }
.verification-card p { color: var(--muted); line-height: 1.8; }
.verification-actions { display: grid; gap: 10px; margin-top: 24px; }

.dashboard { display: grid; gap: 24px; }
.dashboard-hero { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; padding: clamp(26px, 5vw, 48px); border-radius: 30px; background: linear-gradient(135deg, #fffdf8, #edf5f1); }
.dashboard-hero h1 { margin: 5px 0 10px; color: var(--forest-deep); font-size: clamp(32px, 5vw, 54px); }
.dashboard-hero p { color: var(--muted); }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; }
.dashboard-stats article { min-width: 132px; padding: 17px; border-radius: 17px; background: rgba(255,255,255,.92); border: 1px solid var(--line); }
.dashboard-stats span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.dashboard-stats strong { color: var(--forest); font-size: 17px; }
.notice-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; border-radius: 18px; color: #fff; background: var(--forest); }
.notice-banner p { margin: 5px 0 0; color: rgba(255,255,255,.82); }
.section-block { padding: clamp(24px, 4vw, 38px); border-radius: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.section-heading h2 { margin: 0; color: var(--forest-deep); font-size: clamp(24px, 4vw, 36px); }
.section-intro { margin: 12px 0 25px; color: var(--muted); line-height: 1.75; }
.soft-badge, .status-badge { display: inline-flex; align-items: center; width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.soft-badge { color: var(--forest); background: var(--forest-soft); }
.status-badge { color: #fff; background: var(--forest); }
.status-badge.locked { color: var(--muted); background: #edf0ee; }
.status-badge.trial { color: #874437; background: var(--coral-soft); }
.coach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.coach-card { display: flex; flex-direction: column; min-height: 255px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.coach-card.locked { opacity: .74; }
.coach-card-top { display: flex; align-items: center; justify-content: space-between; }
.coach-icon { display: grid; place-content: center; width: 48px; height: 48px; border-radius: 15px; color: #fff; background: var(--forest); font-size: 14px; font-weight: 900; }
.coach-card h3 { margin: 19px 0 8px; color: var(--forest-deep); font-size: 20px; }
.coach-card p { flex: 1; margin: 0 0 18px; color: var(--muted); line-height: 1.7; font-size: 13px; }

.admin-panel { border-color: rgba(197,154,68,.45); }
.admin-search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin: 22px 0 8px; }
.admin-search-row label { margin: 0; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.admin-card { padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.admin-card h3 { margin: 0 0 15px; color: var(--forest-deep); }
.admin-card hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.checkbox-line { display: flex; grid-template-columns: none; align-items: center; gap: 9px; }
.checkbox-line input { width: auto; }
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { margin: 18px 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; }
legend { padding: 0 7px; color: var(--forest); font-size: 13px; font-weight: 850; }
.coach-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coach-check-grid label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px; border-radius: 10px; background: #f5f8f6; font-weight: 700; }
.coach-check-grid input { width: auto; }
.admin-summary { padding: 13px; border-radius: 12px; color: var(--muted); background: #f5f8f6; line-height: 1.7; }
.audit-list { max-height: 330px; overflow: auto; display: grid; gap: 9px; }
.audit-item { padding: 11px; border: 1px solid var(--line); border-radius: 11px; font-size: 12px; }
.audit-item strong { display: block; color: var(--forest); }
.audit-item span { color: var(--muted); }

.practice-view { max-width: 900px; margin: 0 auto; }
.practice-shell { margin-top: 12px; padding: clamp(22px, 5vw, 38px); border-radius: 28px; }
.practice-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.practice-topbar h2 { margin: 5px 0; color: var(--forest-deep); }
.progress-track { height: 8px; margin: 18px 0 25px; overflow: hidden; border-radius: 99px; background: #e8eeeb; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--coral); transition: width .2s ease; }
.question-card { text-align: center; }
.question-card h3 { margin: 15px 0; color: var(--forest-deep); font-size: clamp(36px, 7vw, 64px); }
.question-meta { color: var(--muted); }
.question-image-wrap { height: 220px; margin-bottom: 15px; }
.question-image { max-width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }
.answer-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 650px; margin: 22px auto; }
.answer-option { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; cursor: pointer; }
.answer-option.correct { border-color: #4f986f; background: #e2f2e8; }
.answer-option.wrong { border-color: #cb7162; background: #fae5e1; }
.answer-input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 650px; margin: 22px auto; }
.answer-feedback { min-height: 25px; color: var(--coral); font-weight: 850; white-space: pre-line; }
.sentence-practice { max-width: 690px; margin: 25px auto 15px; padding: 20px; border-radius: 18px; text-align: left; background: #f6f1e8; }
.sentence-practice h4 { margin: 0 0 5px; color: var(--forest-deep); }
.sentence-practice p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.sentence-practice textarea { margin-bottom: 10px; resize: vertical; }
.sentence-result { margin-top: 14px; padding: 15px; border-radius: 13px; background: #fff; line-height: 1.75; }
.sentence-result strong { color: var(--forest); }
.practice-result { padding: 42px 15px; text-align: center; }
.practice-result strong { display: block; margin: 18px 0; color: var(--forest); font-size: 62px; }

.static-view { display: grid; gap: 18px; }
.static-card { padding: clamp(32px, 6vw, 70px); border-radius: 32px; }
.static-card h1 { margin: 8px 0 15px; max-width: 800px; color: var(--forest-deep); font-size: clamp(38px, 6vw, 66px); line-height: 1.12; }
.static-card > p:not(.eyebrow) { max-width: 760px; color: var(--muted); font-size: 17px; line-height: 1.85; }
.static-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.static-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.static-feature-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.static-feature-grid h2 { margin: 0 0 8px; color: var(--forest-deep); font-size: 19px; }
.static-feature-grid p { margin: 0; color: var(--muted); line-height: 1.7; }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; }
  .hero-panel { min-height: auto; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .coach-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .static-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --header-h: 68px; }
  .site-header { padding: 8px 14px; }
  .brand-logo { width: 45px; height: 45px; }
  .brand-copy strong { font-size: 15px; }
  main { width: min(100% - 22px, 1220px); padding-top: 24px; }
  .hero-panel, .auth-card, .section-block, .dashboard-hero, .practice-shell, .static-card { border-radius: 22px; }
  .hero-panel { padding: 32px 24px; }
  .hero-panel h1 { font-size: 42px; }
  .plan-promise-grid { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .coach-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .admin-search-row { grid-template-columns: 1fr; }
  .date-grid, .coach-check-grid { grid-template-columns: 1fr; }
  .answer-options, .answer-input-row { grid-template-columns: 1fr; }
  .notice-banner { align-items: flex-start; flex-direction: column; }
}


/* 試用接近到期時的柔性提醒；不遮擋會員操作。 */
.notice-banner.notice-soft {
  background: #f5f0df;
  border-color: #dfcc83;
}

.notice-banner.notice-urgent {
  background: #fff3df;
  border-color: #e1aa55;
}

.notice-banner.notice-ended {
  background: #f7ece8;
  border-color: #d8a291;
}

/* 0727B：多本混合練球、好壞球與音效控制 */
.coach-card { cursor: default; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.coach-card.selectable { cursor: pointer; }
.coach-card.selectable:hover { transform: translateY(-2px); border-color: rgba(23,75,59,.35); box-shadow: 0 14px 30px rgba(23,75,59,.10); }
.coach-card.selected { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23,75,59,.10); background: linear-gradient(150deg, #fff, #f1f7f4); }
.coach-select-line { display: flex; grid-template-columns: none; align-items: center; gap: 9px; margin: 0; padding: 11px 12px; border-radius: 12px; color: var(--forest); background: var(--forest-soft); font-weight: 850; cursor: pointer; }
.coach-select-line input { width: 18px; height: 18px; accent-color: var(--forest); }
.coach-locked-action { margin-top: auto; }
.coach-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #f7faf8; }
.coach-selection-bar > div:first-child { display: grid; gap: 4px; }
.coach-selection-bar strong { color: var(--forest-deep); }
.coach-selection-bar span { color: var(--muted); font-size: 13px; }
.coach-selection-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.practice-status { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.ball-score { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; color: #874437; background: var(--coral-soft); font-size: 12px; font-weight: 900; }
.sound-toggle { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--forest); background: #fff; font-size: 12px; font-weight: 850; cursor: pointer; }
.sound-toggle[aria-pressed="false"] { color: var(--muted); background: #edf0ee; }
.question-source { display: inline-flex; margin-bottom: 8px; padding: 5px 9px; border-radius: 999px; color: var(--muted); background: #f0f4f2; font-size: 11px; font-weight: 800; }
.question-scenario { display: inline-flex; margin-bottom: 8px; padding: 5px 9px; border-radius: 999px; color: #765338; background: #f8edda; font-size: 11px; font-weight: 800; }
.answer-feedback.good-ball { color: #26704e; }
.answer-feedback.bad-ball { color: #a44a3d; }
.sentence-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sentence-result.basic-result { border: 1px solid var(--line); }
.sentence-result.basic-good { background: #eaf5ee; }
.sentence-result.basic-bad { background: #f9e9e5; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.practice-result #practice-summary-copy { max-width: 650px; margin: 0 auto 22px; color: var(--muted); line-height: 1.8; }

@media (max-width: 760px) {
  .coach-selection-bar { align-items: stretch; flex-direction: column; }
  .coach-selection-actions { justify-content: stretch; }
  .coach-selection-actions .button { flex: 1 1 180px; }
  .practice-topbar { align-items: flex-start; }
  .practice-status { justify-content: flex-start; }
  .sentence-actions .button { width: 100%; }
}


/* 0731：自選題型、持久壞球區與清楚題目顯示 */
.practice-mode-panel { margin: 24px 0; padding: 20px; border: 1px solid rgba(23,75,59,.14); border-radius: 20px; background: #fbfcfb; }
.practice-mode-panel legend { padding: 0 8px; color: var(--forest-deep); font-weight: 900; }
.practice-mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.practice-mode-grid label { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid rgba(23,75,59,.12); border-radius: 14px; background: #fff; cursor: pointer; }
.practice-mode-grid label:has(input:checked) { border-color: var(--forest); box-shadow: 0 0 0 2px rgba(23,75,59,.08); }
.practice-mode-grid input { margin-top: 3px; }
.practice-mode-grid span { display: grid; gap: 4px; }
.practice-mode-grid strong { color: var(--forest-deep); }
.practice-mode-grid small { color: var(--muted); line-height: 1.45; }
.practice-mode-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.practice-mode-actions strong { margin-left: auto; color: var(--forest); }
.bad-ball-section { scroll-margin-top: 90px; }
.bad-ball-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bad-ball-grid article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 20px; border: 1px solid rgba(23,75,59,.12); border-radius: 18px; background: #fff; }
.bad-ball-grid article .button { grid-column: 1 / -1; }
.bad-ball-grid h3 { margin: 0 0 4px; color: var(--forest-deep); }
.bad-ball-grid p { margin: 0; color: var(--muted); }
.bad-ball-grid > article > strong { font-size: 34px; color: #a44a3d; }
.bad-ball-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #f9e9e5; color: #a44a3d; font-weight: 900; }
@media (max-width: 760px) {
  .practice-mode-grid { grid-template-columns: 1fr 1fr; }
  .bad-ball-grid { grid-template-columns: 1fr; }
  .practice-mode-actions strong { width: 100%; margin-left: 0; }
}
@media (max-width: 460px) {
  .practice-mode-grid { grid-template-columns: 1fr; }
}


/* 0733 會員總覽與批次匯入 */
.member-center { margin-top: 22px; }
.member-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.member-stat-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.member-stat-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.member-stat-grid strong { color: var(--forest); font-size: 24px; }
.member-toolbar { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(170px, 1fr) auto; gap: 10px; align-items: end; }
.member-toolbar label { margin: 0; }
.member-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.member-table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.member-table { width: 100%; min-width: 960px; border-collapse: collapse; font-size: 13px; }
.member-table th, .member-table td { padding: 12px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.member-table th { background: #f4f8f5; color: var(--forest-deep); position: sticky; top: 0; z-index: 1; }
.member-table tbody tr:last-child td { border-bottom: 0; }
.member-row { cursor: pointer; }
.member-row:hover, .member-row:focus { background: #f5faf7; outline: none; }
.member-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 22px; }
.collector-import-card { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(160px, 1fr) minmax(210px, 1fr) auto; gap: 12px; align-items: end; padding: 20px; border: 1px solid rgba(197,154,68,.45); border-radius: 18px; background: #fffcf5; }
.collector-import-card h3 { margin: 0 0 5px; color: var(--forest-deep); }
.collector-import-card p { margin: 0; color: var(--muted); }
.collector-import-card label { margin: 0; }
.collector-import-card .message { grid-column: 1 / -1; }
.admin-divider { margin: 30px 0 22px; border: 0; border-top: 1px solid var(--line); }
.compact-heading h3 { margin: 3px 0 0; color: var(--forest-deep); }
#profile-name-form { width: min(420px, 100%); margin: 20px auto 0; text-align: left; }

@media (max-width: 980px) {
  .member-stat-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .member-toolbar { grid-template-columns: 1fr 1fr; }
  .member-toolbar-actions { grid-column: 1 / -1; }
  .collector-import-card { grid-template-columns: 1fr 1fr; }
  .collector-import-card > div { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .member-stat-grid, .member-toolbar, .collector-import-card { grid-template-columns: 1fr; }
  .member-toolbar-actions, .collector-import-card > div, .collector-import-card .message { grid-column: auto; }
  .member-toolbar-actions .button { flex: 1; }
}

/* WURA0736: free browser pronunciation and operations controls */
.pronunciation-actions { display:flex; gap:.65rem; flex-wrap:wrap; margin:.75rem 0 .25rem; }
.pronunciation-actions.hidden { display:none; }
.pronunciation-message { min-height:1.2em; margin-top:.25rem; }
#repair-book-entitlements-button { margin-top:.75rem; }


/* 0738：通知信狀態、批次邀請與 iPhone 小螢幕相容 */
.mail-status-box { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbf9; }
.mail-status-box strong { color: var(--forest-deep); }
.mail-status-box p { margin: 8px 0 12px; color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) {
  .practice-mode-panel { min-width: 0; padding: 14px; overflow: hidden; }
  .practice-mode-grid { display: grid; grid-template-columns: minmax(0, 1fr) !important; width: 100%; }
  .practice-mode-grid label { width: 100%; min-width: 0; box-sizing: border-box; align-items: flex-start; }
  .practice-mode-grid label > span { display: block; min-width: 0; width: 100%; writing-mode: horizontal-tb; word-break: normal; overflow-wrap: break-word; }
  .practice-mode-grid strong, .practice-mode-grid small { display: block; width: 100%; writing-mode: horizontal-tb; white-space: normal; }
}


/* WURA_ADMIN_CONTROL_CENTER_1.0.0 */
.wura-admin-route #dashboard-view > :not(#admin-panel) { display: none !important; }
.wura-admin-route #dashboard-view { padding-top: 24px; }
.wura-admin-route #admin-panel { display: block !important; }
.admin-control-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.admin-control-header h1 { margin: 4px 0 8px; color: var(--forest-deep); }
.admin-control-header p:last-child { margin: 0; color: var(--muted); line-height: 1.7; }
.admin-workspace-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.admin-workspace-nav a { padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--forest); background: #fff; font-weight: 850; text-decoration: none; }
.admin-workspace-nav a.active { color: #fff; background: var(--forest); border-color: var(--forest); }
.admin-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.admin-product-grid article { padding: 18px; border: 1px solid rgba(23,75,59,.16); border-radius: 18px; background: #f8fbf9; }
.admin-product-grid article.is-draft { background: #faf8f2; border-color: rgba(197,154,68,.38); }
.admin-product-grid span { display: inline-flex; margin-bottom: 8px; padding: 4px 8px; border-radius: 999px; color: var(--forest); background: var(--forest-soft); font-size: 11px; font-weight: 900; }
.admin-product-grid strong { display: block; color: var(--forest-deep); font-size: 19px; }
.admin-product-grid p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.admin-staff-workspace { margin-top: 22px; }
.staff-role-form { margin-bottom: 18px; }
.staff-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.staff-role-grid label { display: flex; grid-template-columns: none; align-items: center; gap: 9px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.staff-role-grid input { width: 18px; height: 18px; accent-color: var(--forest); }
.staff-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.staff-table { min-width: 900px; }
.admin-access-note { padding: 28px; border: 1px solid rgba(197,154,68,.4); border-radius: 18px; background: #fffcf5; }
.admin-access-note h2 { margin-top: 0; color: var(--forest-deep); }
.admin-access-note p { margin-bottom: 0; color: var(--muted); line-height: 1.7; }
@media (max-width: 760px) {
  .admin-control-header { flex-direction: column; }
  .admin-product-grid, .staff-role-grid { grid-template-columns: 1fr; }
  .admin-workspace-nav a { flex: 1 1 190px; text-align: center; }
}

/* Dedicated Admin Hosting */
html,body{background:#f3f6f2}
#home-page,.home-mobile-cta{display:none!important}
.wura-admin-route #dashboard-view{max-width:1480px;margin:0 auto;padding:24px}
.wura-admin-route #admin-panel{display:block!important}
.wura-admin-route #dashboard-view>:not(#admin-panel){display:none!important}
.site-header{border-bottom:1px solid #d9e2dc}
.site-header .brand-copy strong{font-size:1.02rem}
.site-header .brand-copy small{display:none}
@media(max-width:720px){.wura-admin-route #dashboard-view{padding:12px}}
