:root {
  --night: #111419;
  --night-2: #1C2028;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --amber: #D88040;
  --amber-hi: #F0A267;
  --amber-dim: rgba(216, 128, 64, 0.16);
  --paper: #F6F2EA;
  --ink: #1C2028;
  --text: #F2EEE8;
  --muted: #9C9A96;
  --ok: #5BD69C;
  --danger: #FF7A6B;
  --r: 20px;
  --sans: "Noto Sans TC", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Noto Serif TC", "Noto Sans TC", serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--night); color: var(--text); }
body { font-family: var(--sans); min-height: 100dvh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ── atmosphere ─────────────────────────────────────────── */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; width: 140vmax; height: 140vmax; right: -70vmax; top: -82vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,128,64,.34) 0%, rgba(216,128,64,.10) 30%, transparent 58%);
  animation: breathe 9s ease-in-out infinite; }
.rings { position: absolute; width: 130vmin; height: 130vmin; right: -48vmin; top: -52vmin; animation: spin 120s linear infinite; }
.rings circle { fill: none; stroke: rgba(216,128,64,.14); stroke-width: .35; }
.rings circle:nth-child(2) { stroke-dasharray: 2 3; }
.grain { position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .85; } }
@keyframes spin { to { transform: rotate(360deg); } }

.app { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 20px 28px; min-height: 100dvh; display: flex; flex-direction: column; }

.top { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.logo { height: 22px; width: auto; }
.progress { display: flex; gap: 5px; }
.progress i { width: 18px; height: 3px; border-radius: 3px; background: var(--line-2); transition: background .4s, width .4s var(--ease); }
.progress i.on { background: var(--amber); width: 26px; }

/* ── panels ─────────────────────────────────────────────── */
.panel { display: none; flex: 1; flex-direction: column; padding-top: 18px; }
.panel.active { display: flex; animation: enter .55s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.eyebrow { margin: 10px 0 0; font-size: 12px; letter-spacing: .14em; color: var(--amber); font-weight: 500; }
.display { font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 12vw, 54px); line-height: 1.08; margin: 12px 0 0; letter-spacing: -.01em; }
.display em, h2.q em { font-style: normal; background: linear-gradient(100deg, var(--amber) 0%, var(--amber-hi) 50%, var(--amber) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 5s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }
.lede { color: #C9C5BD; font-size: 15.5px; line-height: 1.7; margin: 16px 0 0; }
.lede b { color: var(--text); font-weight: 500; }
.sub { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.fine { color: #75736F; font-size: 11.5px; line-height: 1.6; margin: auto 0 0; padding-top: 22px; }
.center { text-align: center; }

/* ── method tiles ───────────────────────────────────────── */
.methods { display: grid; gap: 10px; margin-top: 28px; }
.method { display: grid; grid-template-columns: 48px 1fr 20px; align-items: center; gap: 14px; text-align: left; padding: 16px 16px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--line); cursor: pointer; transition: transform .25s var(--ease), background .25s, border-color .25s; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.method:active { transform: scale(.98); }
.method.hero { background: linear-gradient(135deg, rgba(216,128,64,.24), rgba(216,128,64,.06) 60%); border-color: rgba(216,128,64,.45); padding: 20px 16px; }
.m-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.method.hero .m-ico { background: var(--amber); border-color: transparent; color: var(--night); }
.m-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-txt b { display: block; font-size: 17px; font-weight: 700; }
.m-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.method.hero .m-txt small { color: #E2C3A8; }
.m-go { color: var(--amber); font-size: 18px; }

/* ── step head ──────────────────────────────────────────── */
.step-head { display: flex; gap: 12px; align-items: center; }
.step-head h2 { margin: 0; font-size: 21px; font-weight: 700; }
.step-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.back { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); cursor: pointer; font-size: 17px; }

/* ── camera ─────────────────────────────────────────────── */
.viewfinder { position: relative; margin-top: 18px; border-radius: 24px; overflow: hidden; aspect-ratio: 3 / 4; background: #07090C; border: 1px solid var(--line); }
.viewfinder video, .viewfinder .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf-mask { position: absolute; inset: 0; display: grid; place-items: center; }
.vf-card { position: relative; width: 84%; aspect-ratio: 1.75; border-radius: 14px; box-shadow: 0 0 0 999px rgba(7,9,12,.55); overflow: hidden; transition: box-shadow .4s; }
.vf-card .c { position: absolute; width: 26px; height: 26px; border: 3px solid var(--amber); }
.c.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.c.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.c.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.c.br { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.sweep { position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(180deg, transparent, rgba(216,128,64,.28), transparent); animation: sweep 2.4s ease-in-out infinite; }
.viewfinder.reading .sweep { animation-duration: .9s; }
.viewfinder.reading .vf-card { box-shadow: 0 0 0 999px rgba(7,9,12,.78), 0 0 40px rgba(216,128,64,.55); }
@keyframes sweep { to { top: 100%; } }
.vf-reading { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(17,20,25,.82); border: 1px solid var(--line-2); font-size: 13.5px; white-space: nowrap; backdrop-filter: blur(10px); }
.dots { display: flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; transform: translateY(-2px); } }
.shutter-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 20px; }
.shutter-row .pill-btn:first-child { justify-self: start; } .shutter-row .pill-btn:last-child { justify-self: end; }
.pill-btn { padding: 10px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--text); background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.shutter span { width: 60px; height: 60px; border-radius: 50%; background: var(--amber); transition: transform .15s; }
.shutter:active span { transform: scale(.86); }
.shutter:disabled { opacity: .4; }
.hint { color: var(--muted); font-size: 13px; text-align: center; min-height: 20px; margin: 12px 0 0; }

/* ── voice ──────────────────────────────────────────────── */
.voice-stage { display: flex; flex-direction: column; align-items: center; margin-top: 18px; gap: 14px; flex: 1; }
.say-hint { width: 100%; padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px dashed var(--line-2); color: #C9C5BD; font-size: 14px; line-height: 1.6; }
#wave { width: 100%; height: 80px; }
.mic { width: 108px; height: 108px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--night);
  background: radial-gradient(circle at 35% 30%, var(--amber-hi), var(--amber) 60%); box-shadow: 0 0 0 10px rgba(216,128,64,.12), 0 18px 50px rgba(216,128,64,.35); transition: transform .2s; }
.mic svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mic.live { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 22px rgba(216,128,64,.06), 0 18px 60px rgba(216,128,64,.5); transform: scale(1.04); } }
.lang-row { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.lang { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); cursor: pointer; }
.lang.on { background: var(--text); color: var(--night); font-weight: 500; }
.transcript { min-height: 52px; text-align: center; font-size: 17px; line-height: 1.6; margin: 0; color: var(--text); }
.transcript .interim { color: var(--muted); }

/* ── paste ──────────────────────────────────────────────── */
textarea { width: 100%; margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line-2); font-size: 15px; line-height: 1.6; resize: none; outline: none; }
textarea:focus { border-color: var(--amber); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 13.5px; margin: 16px auto 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ── buttons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 18px; border-radius: 16px; font-size: 15.5px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--amber); color: #17130F; }
.btn.ghost { background: var(--glass); border-color: var(--line-2); color: var(--text); font-weight: 500; font-size: 14px; }
.btn.block { width: 100%; margin-top: 14px; }
.btn.glow { box-shadow: 0 12px 40px rgba(216,128,64,.35); }
.err { color: var(--danger); font-size: 13.5px; margin: 12px 0 0; text-align: center; }

/* ── digital business card ──────────────────────────────── */
.tilt { perspective: 1000px; margin-top: 22px; }
.bizcard { position: relative; border-radius: 22px; padding: 20px 20px 18px; overflow: hidden; transform-style: preserve-3d; transition: transform .2s ease-out;
  background: linear-gradient(150deg, #2A303B 0%, #1A1E26 55%, #15181E 100%); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 70px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); }
.bizcard.materialize { animation: materialize 1s var(--ease) both; }
@keyframes materialize { from { opacity: 0; transform: rotateX(28deg) translateY(30px) scale(.92); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.bc-glow { position: absolute; width: 260px; height: 260px; right: -110px; top: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(216,128,64,.4), transparent 65%); pointer-events: none; }
.bc-top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.bc-src { font-size: 11px; letter-spacing: .08em; color: var(--amber); border: 1px solid rgba(216,128,64,.4); padding: 3px 9px; border-radius: 999px; }
.bc-sym { width: 26px; height: 26px; }
.bizcard input { display: block; width: 100%; background: transparent; border: 0; outline: none; padding: 2px 0; border-bottom: 1px dashed transparent; }
.bizcard input:focus { border-bottom-color: var(--amber); }
.bizcard input::placeholder { color: rgba(255,255,255,.28); }
.bc-name { font-family: var(--serif); font-weight: 900; font-size: 28px; margin-top: 18px; }
.bc-title { font-size: 14px; color: #C9C5BD; margin-top: 2px; }
.bc-company { font-size: 15px; font-weight: 500; margin-top: 10px; }
.bc-lines { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.bc-lines label { display: grid; grid-template-columns: 96px 1fr; align-items: center; font-size: 12px; color: var(--muted); }
.bc-lines input { font-family: var(--mono); font-size: 14px; color: var(--text); }
.typing::after { content: "▍"; color: var(--amber); animation: blink 1s infinite; }
.card-thumb { width: 92px; border-radius: 8px; margin: 14px auto 0; display: block; opacity: .7; border: 1px solid var(--line); }
.reread { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.reread[hidden] { display: none; }
.reread .btn { width: 100%; margin-top: 0; min-height: 46px; font-size: 14px; }

/* ── questions ──────────────────────────────────────────── */
h2.q { font-family: var(--serif); font-weight: 900; font-size: 32px; line-height: 1.2; margin: 12px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { padding: 12px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); cursor: pointer; font-size: 15px; transition: all .2s var(--ease); }
.chip.on { background: var(--amber); color: #17130F; border-color: var(--amber); font-weight: 600; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(216,128,64,.3); }
.levels { display: grid; gap: 8px; margin-top: 22px; }
.level { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line-2); cursor: pointer; font-size: 15px; }
.level .bar { display: flex; gap: 3px; }
.level .bar i { width: 6px; height: 18px; border-radius: 2px; background: var(--line-2); }
.level .bar i.f { background: var(--amber); }
.level.on { border-color: var(--amber); background: var(--amber-dim); }
.consent { margin-top: 22px; display: grid; gap: 12px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 12.5px; line-height: 1.6; color: #B5B1AA; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--amber); margin: 1px 0 0; }

/* ── generating ─────────────────────────────────────────── */
.gen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; }
.gen-orb { position: relative; width: 150px; height: 150px; }
.gen-orb i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--amber); opacity: 0; animation: ripple 2.4s var(--ease) infinite; }
.gen-orb i:nth-child(2) { animation-delay: .8s; } .gen-orb i:nth-child(3) { animation-delay: 1.6s; }
.gen-orb::after { content: ""; position: absolute; inset: 48px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--amber-hi), var(--amber)); box-shadow: 0 0 60px rgba(216,128,64,.7); }
@keyframes ripple { from { transform: scale(.35); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }
.gen-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 14.5px; color: var(--muted); }
.gen-steps li { display: flex; gap: 10px; align-items: center; opacity: .35; transition: all .4s; }
.gen-steps li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.gen-steps li.on { opacity: 1; color: var(--text); }
.gen-steps li.on::before { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 12px var(--amber); }

/* ── AI 起步卡 (light, paper) ───────────────────────────── */
.startcard { margin-top: 6px; border-radius: 24px; background: var(--paper); color: var(--ink); padding: 22px 20px 20px; position: relative; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: rise-card .9s var(--ease) both; }
@keyframes rise-card { from { opacity: 0; transform: translateY(40px) rotate(-2deg) scale(.95); } to { opacity: 1; transform: none; } }
.startcard::before { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(216,128,64,.35), transparent 65%); }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.sc-kicker { font-size: 11px; letter-spacing: .14em; color: #B8652A; font-weight: 600; }
.sc-for { font-family: var(--serif); font-weight: 900; font-size: 24px; line-height: 1.25; margin-top: 6px; }
.sc-meta { font-size: 12px; color: #6B6F78; margin-top: 4px; }
.sc-stage { flex: none; text-align: center; border: 1.5px solid var(--ink); border-radius: 14px; padding: 8px 10px 7px; }
.sc-stage b { display: block; font-family: var(--serif); font-size: 17px; font-weight: 900; }
.sc-stage small { font-size: 10px; color: #6B6F78; letter-spacing: .1em; }
.sc-pilot { margin-top: 18px; padding: 16px; border-radius: 16px; background: var(--ink); color: var(--text); position: relative; }
.sc-pilot .lbl { font-size: 11px; letter-spacing: .12em; color: var(--amber); }
.sc-pilot h3 { margin: 6px 0 0; font-size: 20px; font-weight: 700; }
.sc-pilot p { margin: 6px 0 0; font-size: 13.5px; color: #C9C5BD; line-height: 1.6; }
.sc-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; counter-reset: s; }
.sc-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 14px; line-height: 1.55; counter-increment: s; }
.sc-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--amber); color: #fff; font-family: var(--mono); font-size: 12px; display: grid; place-items: center; }
.sc-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid #DCD5C8; font-size: 13px; line-height: 1.6; }
.sc-row b { display: block; font-size: 11px; letter-spacing: .1em; color: #B8652A; font-weight: 600; margin-bottom: 2px; }
.sc-row ul { margin: 0; padding-left: 18px; }
.sc-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-ideas span { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid #DCD5C8; }
.sc-foot { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; color: #8A8D94; }
.sc-foot img { height: 14px; }
.actions { margin-top: 6px; }

.foot { margin-top: 26px; display: flex; justify-content: space-between; font-size: 11px; color: #6E6C68; }
.foot a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
