/* 《你好！新視界》— 視界學院視覺色系：米白 60 / 墨綠 30 / 古金 8 */
:root {
  color-scheme: light;
  --bg: #F7F3E8; --surface: #FFFDF8; --surface-2: #F1EAD8;
  --ink: #1E2A1A; --sage: #3A4A32; --moss: #7A8C5A; --text: #5A6552; --muted: #8C9478;
  --line: #E4DEC9; --gold: #C9A961; --gold-light: #F5E8B8; --gold-ink: #8A6E2F; --gold-deep: #A8893F;
  /* 相容舊命名 */
  --primary: var(--sage); --primary-deep: var(--ink); --on-primary: var(--gold-light);
  --amber: var(--gold); --amber-soft: var(--gold-light); --amber-ink: var(--gold-ink);
  --ok: #3A7A3A; --danger: #C43D3D;
  --shadow: 0 1px 2px rgba(30,42,26,.05), 0 10px 26px rgba(30,42,26,.07);
  --font-display: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-family: var(--font-body); color: var(--text); font-size: 15px; line-height: 1.75; -webkit-text-size-adjust: 100%; position: relative; }
/* 水彩暈染底 */
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 8% 6%, rgba(201,169,97,.18), transparent 70%),
    radial-gradient(50% 35% at 96% 18%, rgba(122,140,90,.14), transparent 70%),
    radial-gradient(55% 40% at 50% 100%, rgba(201,169,97,.12), transparent 70%),
    var(--bg); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 16px; font-weight: 500; white-space: nowrap; min-height: 44px; }
.btn:hover { border-color: var(--gold); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--sage); border-color: var(--sage); color: var(--gold-light); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-amber { background: var(--gold-light); border-color: var(--gold); color: var(--gold-ink); }
.btn-danger { color: var(--danger); }
.btn-sm { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 10px; }
.btn svg { width: 17px; height: 17px; flex: none; }
.input { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 13px; min-height: 46px; font-size: 16px; color: var(--ink); }
textarea.input { resize: vertical; min-height: 72px; field-sizing: content; max-height: 380px; line-height: 1.65; }
.input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,169,97,.28); background: var(--surface); }
/* 深底金字的主視覺 */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 24px 24px; color: var(--gold-light); background: linear-gradient(145deg, #2A3A24 0%, var(--ink) 60%, #141C11 100%); }
.hero .eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .34em; color: var(--gold); }
.hero h1 { font-family: var(--font-display); font-weight: 900; font-size: 36px; line-height: 1.2; margin: 8px 0 4px; color: var(--gold-light); letter-spacing: .03em; }
.hero .tag { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .2em; color: var(--gold); }
.hero .compass { position: absolute; right: -28px; top: -28px; width: 190px; height: 190px; opacity: .55; pointer-events: none; }
.hero .wave { position: absolute; right: 22px; bottom: 20px; display: flex; gap: 5px; align-items: center; opacity: .8; }
.hero .wave i { display: block; width: 4px; border-radius: 3px; background: var(--gold); animation: wave 1.6s ease-in-out infinite; }
.hero .wave i:nth-child(2n) { animation-delay: .2s; } .hero .wave i:nth-child(3n) { animation-delay: .4s; }
@keyframes wave { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .hero .wave i { animation: none; } }
/* 金線＋菱形節點分隔 */
.rule { display: flex; align-items: center; gap: 8px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule i { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.bracket { font-family: var(--font-display); font-weight: 900; color: var(--ink); }
.bracket::before { content: "【"; color: var(--gold); } .bracket::after { content: "】"; color: var(--gold); }
.notice { border-radius: 12px; padding: 10px 14px; font-size: 14px; background: var(--gold-light); border: 1px solid var(--gold); color: var(--gold-ink); }
.err { color: var(--danger); background: #FBE7E2; border: 1px solid #EBB3A8; border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.muted { color: var(--muted); font-size: 13.5px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 20; background: var(--ink); color: var(--gold-light); padding: 10px 18px; border-radius: 999px; font-size: 14.5px; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }
[hidden] { display: none !important; }
