:root {
  color-scheme: light;
  --red: #9a2022;
  --red-deep: #6f1215;
  --gold: #d99c38;
  --ink: #2d1c17;
  --muted: #7b6256;
  --paper: #fff9ed;
  --jade: #1f7056;
  --line: rgba(128, 71, 35, 0.18);
  --skin-main: #9a2022;
  --skin-deep: #571013;
  --skin-accent: #ffd178;
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: #e7d8bd; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(222, 165, 81, .2), transparent 26rem),
    linear-gradient(145deg, #eee1c9, #d9c4a3);
}

body[data-skin="study"] { --skin-main: #1e5e99; --skin-deep: #12365d; --skin-accent: #ffd05d; }
body[data-skin="health"] { --skin-main: #b5302d; --skin-deep: #6d1716; --skin-accent: #ffe1aa; }
body[data-skin="luck"] { --skin-main: #25231f; --skin-deep: #080909; --skin-accent: #e3ab42; }
body.access-active,
body.onboarding-active { overflow: hidden; }
body.access-active .onboarding,
body.access-active .app-shell,
body.access-active .app-view,
body.access-active .bottom-nav,
body.onboarding-active .app-shell,
body.onboarding-active .app-view,
body.onboarding-active .bottom-nav { visibility: hidden; }

.app-view[hidden], .dragon-splash[hidden], .access-gate[hidden] { display: none; }

.access-gate {
  position: fixed;
  z-index: 80;
  inset: 0;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(34px, env(safe-area-inset-bottom));
  color: #fff8e9;
  background:
    radial-gradient(circle at 16% 10%, rgba(224, 159, 47, .28), transparent 25rem),
    radial-gradient(circle at 92% 92%, rgba(158, 28, 29, .3), transparent 30rem),
    linear-gradient(145deg, #1b1110, #301715 55%, #190e0d);
}
.access-header { width: min(100%, 900px); margin: 0 auto 28px; display:flex; align-items:center; justify-content:space-between; }
.access-brand .nfc-mark { background:#d29a3c; color:#2a1913; }
.access-brand small { color:rgba(255,244,222,.58); }
.access-badge { padding:7px 11px; border:1px solid rgba(232,189,106,.38); border-radius:999px; color:#efc36d; font-size:12px; font-weight:800; letter-spacing:.08em; }
.access-layout { width:min(100%,900px); margin:0 auto; display:grid; grid-template-columns:minmax(260px,.78fr) minmax(340px,1.22fr); overflow:hidden; border:1px solid rgba(255,221,154,.16); border-radius:34px 8px 34px 8px; background:rgba(255,250,237,.055); box-shadow:0 28px 70px rgba(0,0,0,.3); }
.access-visual { position:relative; min-height:650px; display:grid; align-content:center; justify-items:center; overflow:hidden; padding:32px 20px; background:radial-gradient(circle at 50% 42%,rgba(255,220,142,.2),transparent 13rem),linear-gradient(155deg,#8f191b,#4b0e10 72%); }
.access-visual::before { content:""; position:absolute; inset:18px; border:1px solid rgba(255,220,142,.26); border-radius:26px 6px 26px 6px; }
.access-visual > * { position:relative; z-index:1; }
.access-visual span { align-self:start; padding:6px 10px; border:1px solid rgba(255,230,173,.34); border-radius:999px; color:#ffe2a0; font-size:12px; font-weight:800; letter-spacing:.18em; }
.access-visual img { width:min(100%,300px); filter:drop-shadow(0 24px 25px rgba(25,0,0,.38)); }
.access-visual b { color:#ffd887; font:700 22px/1.4 "STKaiti","KaiTi",serif; letter-spacing:.12em; }
.access-card { padding:clamp(28px,5vw,56px); color:#3b241c; background:#fff8eb; }
.access-card .eyebrow { color:#9a2022; }
.access-card h1 { margin:10px 0 14px; color:#3d231a; font-size:clamp(38px,7vw,56px); line-height:1.14; }
.access-card h1 em { color:#a32224; font-style:normal; }
.access-intro { margin:0; color:#81695d; font-size:16px; line-height:1.8; }
.access-steps { margin:26px 0; padding:0; display:grid; grid-template-columns:repeat(3,1fr); list-style:none; }
.access-steps li { position:relative; display:grid; justify-items:center; gap:7px; color:#a48d7e; font-size:12px; font-weight:800; }
.access-steps li:not(:last-child)::after { content:""; position:absolute; top:14px; left:64%; width:72%; height:1px; background:#dfccae; }
.access-steps i { position:relative; z-index:1; width:29px; height:29px; display:grid; place-items:center; border:1px solid #d9c2a0; border-radius:50%; color:#8b715e; background:#fff8eb; font-style:normal; }
.access-steps li.active { color:#962123; }
.access-steps li.active i { border-color:#a82325; color:#fff6dd; background:#a82325; box-shadow:0 0 0 5px rgba(168,35,37,.1); }
.tap-required { padding:24px 20px; border:1px dashed #d9b77b; border-radius:22px 6px 22px 6px; background:#fff1d5; text-align:center; }
.tap-orbit { width:82px; height:82px; margin:0 auto 13px; display:grid; place-items:center; border:1px solid #d9a653; border-radius:50%; box-shadow:0 0 0 9px rgba(217,166,83,.1),0 0 0 18px rgba(217,166,83,.06); }
.tap-orbit .nfc-mark { width:48px; height:48px; display:grid; place-items:center; color:#ffe5a7; background:#9c2022; font:700 21px "STKaiti",serif; }
.tap-required h2,.setup-pending h2 { margin:12px 0 6px; font-size:20px; }
.tap-required p,.setup-pending p { margin:0; color:#80695b; font-size:14px; line-height:1.7; }
.secondary-button { width:100%; margin-top:18px; padding:13px 16px; border:1px solid #cba260; border-radius:12px 4px 12px 4px; color:#8c1b1d; background:#fffaf0; font-weight:800; cursor:pointer; }
.verification-state,.verified-tag,.setup-pending { display:flex; align-items:center; gap:14px; padding:17px; border:1px solid #e0c895; border-radius:18px 5px 18px 5px; background:#fff1d3; }
.verification-state b,.verified-tag b { display:block; margin-bottom:4px; }
.verification-state p,.verified-tag small { margin:0; color:#8d7565; font-size:13px; }
.verify-spinner { flex:0 0 34px; height:34px; border:3px solid #ead8b6; border-top-color:#a52325; border-radius:50%; animation:verifySpin .8s linear infinite; }
.activation-form { display:grid; gap:14px; }
.activation-form label { display:grid; gap:7px; color:#5a3c2f; font-size:14px; font-weight:800; }
.activation-form input { width:100%; min-width:0; padding:13px 14px; border:1px solid #d9c6aa; border-radius:12px 4px 12px 4px; color:#39231b; background:#fffdf8; outline:none; }
.activation-form input:focus { border-color:#ab3030; box-shadow:0 0 0 3px rgba(171,48,48,.1); }
.verified-tag { margin-bottom:2px; color:#356c55; border-color:#bad9c9; background:#edf8f1; }
.verified-tag > span { flex:0 0 34px; height:34px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#287154; font-weight:900; }
.code-row { display:grid; grid-template-columns:1fr auto; gap:8px; }
.code-row button { min-width:112px; border:0; border-radius:11px 4px 11px 4px; color:#fff6df; background:#802023; font-size:13px; font-weight:800; cursor:pointer; }
.code-row button:disabled { opacity:.55; cursor:default; }
.consent-row { grid-template-columns:auto 1fr!important; align-items:start; gap:9px!important; color:#80695b!important; font-size:13px!important; font-weight:400!important; line-height:1.6; }
.consent-row input { width:18px; height:18px; margin-top:1px; accent-color:#972124; }
.activation-error { min-height:20px; margin:0; color:#b32627; font-size:13px; }
.setup-pending > span { flex:0 0 44px; height:44px; display:grid; place-items:center; border:3px double #d49e3d; border-radius:50%; color:#ffe6a7; background:#922124; font:700 22px "STKaiti",serif; }
.demo-hint { margin:15px 0 0; padding:11px 12px; border-radius:10px; color:#6e563f; background:#f2e7d0; font-size:12px; line-height:1.65; }
.tap-required[hidden], .verification-state[hidden], .activation-form[hidden], .setup-pending[hidden] { display:none; }

@keyframes verifySpin { to { transform:rotate(360deg); } }

.dragon-splash {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #fff4d7;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 197, 76, .28), transparent 20rem),
    radial-gradient(circle at 12% 16%, rgba(255, 84, 40, .22), transparent 16rem),
    linear-gradient(145deg, #400509, #9d1418 52%, #4b070b);
  text-align: center;
  overflow: hidden;
}
.dragon-splash[data-celebration="1"] { background: radial-gradient(circle at 50% 44%, rgba(255,210,92,.3), transparent 20rem), linear-gradient(145deg,#62110b,#bd281d 52%,#59100b); }
.dragon-splash[data-celebration="2"] { background: radial-gradient(circle at 50% 44%, rgba(255,221,117,.28), transparent 20rem), linear-gradient(145deg,#561018,#9e1730 52%,#3c0a18); }
.dragon-splash[data-celebration="3"] { background: radial-gradient(circle at 50% 44%, rgba(255,197,76,.3), transparent 20rem), linear-gradient(145deg,#33100a,#7d2510 52%,#2d0b07); }
.splash-status { position: relative; z-index: 8; margin-bottom: 14px; color: #ffd989; font-size: 13px; font-weight: 800; letter-spacing: .14em; transition: .35s ease; }
.login-video-stage {
  position: relative;
  z-index: 6;
  grid-area: 2 / 1;
  width: min(88vw, 430px);
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 96px);
  overflow: hidden;
  border: 2px solid rgba(255, 218, 128, .7);
  border-radius: 28px 8px 28px 8px;
  background: #230707;
  box-shadow: 0 28px 80px rgba(24, 0, 0, .62), inset 0 0 0 6px rgba(255, 221, 143, .08);
  opacity: 1;
  transform: scale(1);
  transition: opacity .45s ease, transform .55s ease;
}
.login-video-stage video { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center center; background: #230707; cursor: pointer; }
.login-video-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(28,0,0,.08), transparent 45%, rgba(28,0,0,.72)); }
.login-video-retry { position:absolute; z-index:4; top:50%; left:50%; min-width:190px; min-height:52px; padding:12px 20px; border:2px solid #f1c46b; border-radius:999px; color:#5b100e; background:linear-gradient(180deg,#fff2bd,#e7b957); font-size:15px; font-weight:900; box-shadow:0 14px 36px rgba(26,0,0,.48); transform:translate(-50%,-50%); }
.login-video-retry[hidden] { display:none; }
.login-video-retry:active { transform:translate(-50%,-50%) scale(.96); }
.login-video-brand { position: absolute; z-index: 2; top: 18px; left: 18px; display: grid; gap: 4px; padding: 10px 13px; border: 1px solid rgba(255,221,139,.42); border-radius: 14px 4px 14px 4px; background: rgba(55,7,8,.62); text-align: left; backdrop-filter: blur(8px); }
.login-video-brand small { color: #ffd887; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.login-video-brand strong { color: #fff6df; font: 700 22px/1.25 "STKaiti","KaiTi",serif; letter-spacing: .05em; }
.login-video-actions { position: absolute; z-index: 3; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); left: 14px; display: flex; justify-content: space-between; gap: 10px; }
.login-video-actions button { min-height: 42px; padding: 9px 14px; border: 1px solid rgba(255,224,151,.52); border-radius: 999px; color: #fff3d1; background: rgba(52,7,8,.68); font-size: 13px; font-weight: 800; box-shadow: 0 8px 20px rgba(20,0,0,.24); backdrop-filter: blur(9px); }
.login-video-actions button:active { transform: scale(.97); }
.blessing-gate { position: relative; z-index: 5; grid-area: 2 / 1; width: min(78vw, 350px); height: min(108vw, 480px); display: grid; place-items: center; perspective: 900px; opacity: 0; visibility: hidden; transform: scale(.88); transition: opacity .45s ease, transform .55s ease, visibility 0s .55s; }
.dragon-splash.blessing-phase .login-video-stage { pointer-events: none; opacity: 0; transform: scale(1.08); }
.dragon-splash.blessing-phase .blessing-gate { opacity: 1; visibility: visible; transform: scale(1); transition-delay: .16s, .16s, 0s; }
.dragon-splash.video-failed .login-video-stage video { opacity: .72; }
.blessing-scroll { position: absolute; inset: 6% 12%; display: grid; place-content: center; gap: 17px; padding: 30px 22px; color: #7d1714; background: linear-gradient(90deg,#e5c174,#fff2bd 10%,#fff8d7 50%,#fff2bd 90%,#d8aa56); border: 5px double #efb83f; box-shadow: 0 24px 60px rgba(35,0,0,.46), inset 0 0 38px rgba(144,72,12,.18); opacity: 0; transform: scale(.76); transition: .68s .3s cubic-bezier(.16,.84,.24,1); }
.blessing-scroll::before, .blessing-scroll::after { content:""; position:absolute; left:-12px; right:-12px; height:21px; border:3px solid #f2c14c; border-radius:50%; background:linear-gradient(#8f1715,#c62b22,#7b100f); box-shadow:0 5px 10px rgba(68,0,0,.28); }
.blessing-scroll::before { top:-12px; }
.blessing-scroll::after { bottom:-12px; }
.blessing-scroll small { color:#9b5c27; font-size:14px; font-weight:800; letter-spacing:.28em; }
.blessing-scroll strong { font:700 clamp(48px,14vw,72px)/1.22 "STKaiti","KaiTi",serif; letter-spacing:.08em; text-shadow:0 2px 0 #fff0b8; }
.blessing-scroll em { color:#9d6a35; font-size:12px; font-style:normal; letter-spacing:.1em; }
.gate-panel { position:absolute; z-index:4; top:0; bottom:0; width:52%; display:grid; place-content:center; gap:32px; border:4px double #f4bd44; color:#ffe49a; background:linear-gradient(90deg,#75100e,#c52b20 50%,#86120f); box-shadow:0 18px 40px rgba(45,0,0,.5), inset 0 0 25px rgba(255,212,106,.16); font:700 42px/1 "STKaiti","KaiTi",serif; text-shadow:0 3px 0 #7a100e; transition:1.05s .18s cubic-bezier(.18,.8,.22,1); }
.gate-panel::after { content:""; position:absolute; inset:10px; border:1px solid rgba(255,218,122,.5); }
.gate-left { right:50%; transform-origin:right center; }
.gate-right { left:50%; transform-origin:left center; }
.dragon-splash.opened .gate-left { transform:translateX(-112%) rotateY(13deg); }
.dragon-splash.opened .gate-right { transform:translateX(112%) rotateY(-13deg); }
.dragon-splash.opened .blessing-scroll { opacity:1; transform:scale(1); }
.festive-glow { position:absolute; inset:0; background:repeating-conic-gradient(from 0deg at 50% 48%,rgba(255,220,116,.08) 0 6deg,transparent 6deg 18deg); animation:glowTurn 9s linear infinite; }
.fireworks i { position:absolute; width:8px; height:8px; border-radius:50%; opacity:0; box-shadow:0 -40px #ffd36e,28px -28px #fff0b0,40px 0 #ff8a4f,28px 28px #ffd36e,0 40px #fff0b0,-28px 28px #ff8a4f,-40px 0 #ffd36e,-28px -28px #fff0b0; }
.dragon-splash.blessing-phase .fireworks i { animation:firework 1.35s .55s ease-out both; }
.fireworks i:nth-child(1){left:17%;top:22%}.fireworks i:nth-child(2){right:17%;top:18%;animation-delay:.85s}.fireworks i:nth-child(3){left:13%;bottom:22%;animation-delay:1.25s}.fireworks i:nth-child(4){right:13%;bottom:20%;animation-delay:1.55s}
.gold-confetti i { position:absolute; top:-12%; width:7px; height:19px; border-radius:2px; background:#ffd66f; }
.dragon-splash.blessing-phase .gold-confetti i { animation:confettiFall 2.7s .25s ease-in both; }
.gold-confetti i:nth-child(1){left:8%;animation-delay:.2s}.gold-confetti i:nth-child(2){left:21%;background:#ff7b45;animation-delay:.7s}.gold-confetti i:nth-child(3){left:34%;animation-delay:1.1s}.gold-confetti i:nth-child(4){left:46%;background:#fff0ae;animation-delay:.35s}.gold-confetti i:nth-child(5){left:58%;animation-delay:.9s}.gold-confetti i:nth-child(6){left:69%;background:#ff7b45;animation-delay:.5s}.gold-confetti i:nth-child(7){left:82%;animation-delay:1.25s}.gold-confetti i:nth-child(8){left:93%;background:#fff0ae;animation-delay:.15s}
.dragon-splash.leaving { animation: splashLeave .5s ease forwards; }

button, input { font: inherit; }
select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.onboarding {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(30px, env(safe-area-inset-bottom));
  color: #fff8e9;
  background:
    radial-gradient(circle at 92% 8%, rgba(235, 177, 77, .22), transparent 25rem),
    radial-gradient(circle at 0 100%, rgba(194, 48, 46, .22), transparent 30rem),
    #211713;
  transition: opacity .38s ease, visibility .38s ease;
}

.onboarding[hidden] { display: none; }
.onboarding-header { width: min(100%, 760px); margin: 0 auto 42px; display: flex; align-items: center; justify-content: space-between; }
.onboarding-brand .nfc-mark { background: #d29a3c; color: #2a1913; }
.onboarding-brand small { color: rgba(255, 244, 222, .56); }
.register-mark { padding: 7px 11px; border: 1px solid rgba(232, 189, 106, .35); border-radius: 999px; color: #e8bd6a; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.step-meter { display: flex; gap: 7px; }
.step-meter i { width: 27px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.18); transition: .25s ease; }
.step-meter i.active { width: 46px; background: #e5ad4f; }
.onboarding-step { display: none; width: min(100%, 760px); margin: 0 auto; }
.onboarding-step.active { display: block; animation: stepIn .42s ease both; }
.onboarding .eyebrow { color: #e7b85d; }
.onboarding h1 { max-width: 600px; font-size: clamp(38px, 9vw, 58px); }
.onboarding h1 em { color: #e7b85d; }
.onboarding-intro { max-width: 540px; margin-bottom: 26px; color: rgba(255, 246, 228, .66); font-size: 16px; line-height: 1.7; }

.skin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.skin-fieldset { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0 0 18px; border: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.skin-fieldset legend { width: 100%; margin-bottom: 14px; padding: 0; }
.skin-fieldset legend strong, .skin-fieldset legend small { display: block; }
.skin-fieldset legend strong { font-size: 16px; }
.skin-fieldset legend small { margin-top: 4px; color: rgba(255,255,255,.52); font-size: 12px; font-weight: 400; }
.skin-card { position: relative; display: block; min-height: 260px; overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 24px 6px 24px 6px; color: white; background: #49211d; text-align: left; cursor: pointer; box-shadow: 0 16px 28px rgba(0,0,0,.18); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.skin-card:active { transform: scale(.98); }
.skin-card:has(input:checked) { border-color: #f2c66d; box-shadow: 0 0 0 3px rgba(242,198,109,.2), 0 16px 28px rgba(0,0,0,.23); }
.skin-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.skin-card input:focus-visible ~ .skin-image { outline: 3px solid #f2c66d; outline-offset: -4px; }
.skin-card.study { background: #194d78; }
.skin-card.health { background: #8f2524; }
.skin-card.luck { background: #101212; }
.skin-image { display: block; height: 176px; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.18), transparent 55%); }
.skin-image img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 9px rgba(0,0,0,.28)); transform: scale(1.08); }
.skin-copy { display: block; padding: 12px 13px 16px; border-top: 1px solid rgba(255,255,255,.12); }
.skin-copy small, .skin-copy strong, .skin-copy em { display: block; }
.skin-copy small { margin-bottom: 3px; color: #f1c66e; font-size: 11px; letter-spacing: .08em; }
.skin-copy strong { font: 700 19px "STKaiti", "KaiTi", serif; }
.skin-copy em { margin-top: 5px; color: rgba(255,255,255,.57); font-size: 11px; font-style: normal; }
.skin-card > i { position: absolute; top: 11px; right: 11px; width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; color: #2a1913; background: #f2c66d; font: 800 16px sans-serif; opacity: 0; transform: scale(.7); transition: .2s ease; }
.skin-card input:checked ~ i { opacity: 1; transform: scale(1); }

.back-button { margin-bottom: 20px; padding: 9px 0; border: 0; color: #e6ba69; background: transparent; font-weight: 700; }
.chosen-dragon { float: right; width: 155px; margin: -12px 0 10px 22px; text-align: center; }
.chosen-dragon img { width: 145px; height: 145px; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0,0,0,.35)); }
.chosen-dragon small, .chosen-dragon strong { display: block; }
.chosen-dragon small { color: rgba(255,255,255,.5); font-size: 11px; }
.chosen-dragon strong { margin-top: 4px; color: #e8bd6a; font: 700 18px "STKaiti", serif; }
.register-form { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); border-radius: 6px 28px 6px 28px; }
.register-form label { font-size: 14px; font-weight: 700; }
.register-form input, .register-form select { width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: #fff9eb; background: #35231e; outline: 0; }
.register-form input:focus, .register-form select:focus { border-color: #e7b85d; box-shadow: 0 0 0 3px rgba(231,184,93,.13); }
.register-form .zodiac-preview, .register-form .save-button { grid-column: 1 / -1; }
.register-form .zodiac-preview { border-color: rgba(255,255,255,.12); }
.register-form .zodiac-preview strong { color: #e8bd6a; }
.register-form .save-button { background: linear-gradient(#d8a245, #aa7021); color: #271712; }
/* 隐私政策同意行（注册表单是深色底，需单独配色，不能复用浅色闸门里的 .consent-row） */
.register-form .register-consent { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 9px; color: rgba(255, 255, 255, .72); font-size: 13px; font-weight: 400; line-height: 1.65; }
.register-form .register-consent input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; border: 0; background: transparent; accent-color: #e7b85d; }
.register-form .register-consent a { color: #e8bd6a; text-decoration: underline; text-underline-offset: 2px; }
.birthday-reason { grid-column: 1 / -1; padding: 15px 16px; border-left: 3px solid #e5ad4f; background: rgba(229,173,79,.08); }
.birthday-reason b { color: #efc976; font-size: 14px; }
.birthday-reason p { margin: 5px 0 0; color: rgba(255,255,255,.62); font-size: 13px; line-height: 1.65; }
.skin-error { grid-column: 1 / -1; min-height: 0; margin: -5px 0 0; color: #ffb3a8; font-size: 13px; font-weight: 700; }
.skin-error:empty { display: none; }

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px 112px;
  background:
    linear-gradient(rgba(255, 250, 239, .97), rgba(255, 250, 239, .98)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(125, 71, 37, .05) 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(125, 71, 37, .05) 32px);
  box-shadow: 0 0 50px rgba(61, 35, 15, .16);
  overflow: hidden;
}

.topbar, .date-row, .section-heading, .brand, .profile-chip, .outfit-card { display: flex; align-items: center; }
.topbar { justify-content: space-between; margin-bottom: 18px; }
.brand { gap: 10px; }
.brand b { display: block; font-family: "STKaiti", "KaiTi", serif; font-size: 18px; letter-spacing: .06em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.nfc-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff5dc; }
.nfc-mark svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.profile-chip { border: 1px solid rgba(154, 32, 34, .22); color: var(--red-deep); background: #fff4dd; border-radius: 999px; padding: 8px 12px; gap: 8px; font-weight: 700; }
.profile-chip i { width: 7px; height: 7px; border-radius: 50%; background: #d89d38; box-shadow: 0 0 0 4px rgba(216, 157, 56, .17); }

.date-row { justify-content: space-between; color: var(--muted); font-size: 13px; padding-bottom: 10px; }
.date-row time { font-weight: 700; color: #68463a; }

.fortune-hero {
  position: relative;
  min-height: 338px;
  margin: 0 -2px 22px;
  padding: 30px 22px;
  border-radius: 30px 30px 82px 30px;
  color: #fff8ea;
  /* 旧内核浏览器回退：不支持 color-mix() 时整条含它的 background 会作废，先给一条无 color-mix 的等价渐变兜底 */
  background: linear-gradient(145deg, var(--skin-main), var(--skin-deep));
  background:
    radial-gradient(circle at 75% 18%, rgba(255, 208, 99, .26), transparent 30%),
    linear-gradient(145deg, var(--skin-main) 0%, color-mix(in srgb, var(--skin-main) 72%, var(--skin-deep)) 68%, var(--skin-deep) 100%);
  border: 1px solid rgba(255, 216, 141, .48);
  box-shadow: 0 18px 44px rgba(95, 22, 23, .24), inset 0 0 0 5px rgba(255, 236, 195, .06);
  overflow: hidden;
}

.fortune-hero::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255, 224, 165, .18); border-radius: 23px 23px 73px 23px; pointer-events: none; }
.fortune-hero .eyebrow { color: #ffdca2; }
.hero-copy { position: relative; z-index: 2; max-width: 58%; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(39px, 10vw, 52px); line-height: 1.05; letter-spacing: .04em; text-shadow: 0 2px 10px rgba(48, 0, 0, .2); }
h1 em { color: var(--skin-accent); font-style: normal; }
.summary { position: relative; z-index: 2; max-width: 62%; color: rgba(255, 246, 225, .84); font-size: 15px; line-height: 1.75; }
.dragon { position: absolute; z-index: 1; width: 64%; max-height: 315px; right: -48px; bottom: -20px; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(42, 0, 0, .28)); }
.score-seal { position: absolute; z-index: 3; right: 14px; top: 16px; width: 78px; height: 78px; display: grid; place-content: center; justify-items: center; border-radius: 50%; color: #7a1719; background: #ffe1a5; border: 3px double #9d2424; box-shadow: 0 7px 20px rgba(52, 3, 4, .25); transform: rotate(5deg); }
.score-seal small { font-size: 10px; }
.score-seal strong { font: 800 26px/1 Georgia, serif; }
.score-seal span { font-size: 11px; font-weight: 800; }
.cloud { position: absolute; border: 1px solid rgba(255, 216, 142, .17); border-radius: 50%; }
.cloud-one { width: 130px; height: 130px; left: -56px; bottom: -48px; }
.cloud-two { width: 78px; height: 78px; right: 75px; top: 120px; }

.quick-signals { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px 0 22px; border-bottom: 1px solid var(--line); }
.quick-signals > div { text-align: center; padding: 0 10px; border-right: 1px solid var(--line); }
.quick-signals > div:last-child { border: 0; }
.quick-signals small, .quick-signals strong { display: block; }
.quick-signals small { margin: 7px 0 3px; color: var(--muted); font-size: 12px; }
.quick-signals strong { font-size: 14px; white-space: nowrap; }
.signal-icon { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--red); border: 1px solid rgba(154, 32, 34, .25); font: 700 13px "STKaiti", serif; }
.color-dot { background: #a62d2f; box-shadow: inset 0 0 0 7px #fff0d7; }
.basis-strip { margin-top: 16px; padding: 13px 15px; border-left: 3px solid var(--gold); background: rgba(217,156,56,.08); }
.basis-strip span { display: block; color: #8f551d; font-size: 13px; font-weight: 800; }
.basis-strip p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.guidance, .four-fortunes { padding-top: 28px; }
.section-heading { justify-content: space-between; margin-bottom: 15px; }
.section-heading span { color: #a07660; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.section-heading h2 { margin: 2px 0 0; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; }
.section-heading .personalized-tag { border: 1px solid rgba(31, 112, 86, .25); border-radius: 999px; padding: 6px 9px; color: var(--jade); letter-spacing: 0; background: rgba(31, 112, 86, .06); }
.guidance-grid { display: grid; gap: 10px; }
.guidance-grid article { display: flex; gap: 14px; padding: 18px; border-left: 4px solid; background: #fff; box-shadow: 0 8px 22px rgba(90, 55, 28, .07); }
.guidance-grid article > b { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; font: 700 20px "STKaiti", serif; }
.guidance-grid h3 { margin-bottom: 5px; font-size: 17px; }
.guidance-grid p { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.do-card { border-color: var(--jade) !important; }
.do-card > b { background: var(--jade); }
.avoid-card { border-color: #c87a35 !important; }
.avoid-card > b { background: #c87a35; }

.outfit-card { gap: 17px; margin-top: 28px; padding: 21px 18px; color: #fff8e8; background: #263b35; border-radius: 5px 28px 5px 28px; box-shadow: 0 12px 30px rgba(35, 57, 50, .18); }
.outfit-visual { flex: 0 0 82px; height: 94px; display: grid; place-items: center; background: #9e2c2f; border: 1px solid rgba(255,255,255,.24); transform: rotate(-2deg); }
.outfit-visual svg { width: 58px; fill: none; stroke: #ffe5af; stroke-width: 2; stroke-linejoin: round; }
.outfit-copy span { color: #ddb86f; font-size: 12px; font-weight: 700; }
.outfit-copy h2 { margin: 5px 0 6px; font: 700 19px/1.45 "STKaiti", serif; }
.outfit-copy p { margin: 0; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.55; }

.fortune-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fortune-bar { padding: 15px; background: #fff; border: 1px solid var(--line); }
.bar-title { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.bar-title strong { font-family: Georgia, serif; color: var(--red); }
.bar-track { height: 6px; overflow: hidden; background: #eadfcd; }
.bar-track i { display: block; height: 100%; width: var(--score); background: linear-gradient(90deg, #b72c2f, #e8ad46); }
.disclaimer { margin: 24px 0 0; text-align: center; color: #a18b7e; font-size: 12px; }
.classic-note { margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.classic-note summary { padding: 13px 0; color: #7c4c32; cursor: pointer; font-size: 13px; font-weight: 800; }
.classic-note p { margin: -2px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.true-dragon-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px 112px;
  /* 旧内核回退：去掉 color-mix 光晕层，保留羊皮纸底色 */
  background:
    linear-gradient(rgba(255,250,239,.97), rgba(255,250,239,.99)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(125,71,37,.05) 32px);
  background:
    radial-gradient(circle at 88% 3%, color-mix(in srgb, var(--skin-main) 16%, transparent), transparent 22rem),
    linear-gradient(rgba(255,250,239,.97), rgba(255,250,239,.99)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(125,71,37,.05) 32px);
  box-shadow: 0 0 50px rgba(61,35,15,.16);
}
.true-dragon-topbar { margin-bottom: 18px; }
.true-dragon-mark { display: grid; place-items: center; font: 700 17px "STKaiti", serif; }
.heritage-badge { padding: 7px 10px; border: 1px solid #d7b779; border: 1px solid color-mix(in srgb, var(--skin-main) 30%, #d7b779); border-radius: 999px; color: var(--skin-main); background: #fff6e4; font-size: 12px; font-weight: 800; }
.true-dragon-hero { position: relative; min-height: 430px; overflow: hidden; border-radius: 7px 34px 7px 34px; color: #fff7e7; background: #251412; box-shadow: 0 20px 42px rgba(62,29,18,.24); }
.true-dragon-hero::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 25%,rgba(28,10,8,.18) 48%,rgba(25,8,7,.94) 100%); }
.true-dragon-hero img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.true-dragon-hero-copy { position:absolute; z-index:2; left:22px; right:22px; bottom:24px; }
.true-dragon-hero .eyebrow { margin-bottom:8px; color:#f2c66e; }
.true-dragon-hero h1 { margin:0; font-size:clamp(36px,10vw,50px); line-height:1.08; }
.true-dragon-hero h1 em { color:#ffd477; }
.true-dragon-hero-copy > p:last-child { margin:13px 0 0; color:rgba(255,247,231,.78); font-size:15px; line-height:1.75; }
.dragon-blessing-card { position:relative; margin-top:16px; overflow:hidden; padding:22px 20px; border:3px double #dba23f; border-radius:24px 7px 24px 7px; color:#fff5dc; background:linear-gradient(135deg,var(--skin-main),var(--skin-deep)); box-shadow:0 14px 30px rgba(91,28,20,.16); }
.dragon-blessing-card::after { content:"福"; position:absolute; right:-8px; bottom:-28px; color:rgba(255,230,166,.1); font:700 110px/1 "STKaiti",serif; }
.dragon-blessing-card span { position:relative; z-index:1; color:var(--skin-accent); font-size:12px; font-weight:800; letter-spacing:.12em; }
.dragon-blessing-card h2 { position:relative; z-index:1; margin:7px 0 8px; font:700 25px/1.35 "STKaiti",serif; }
.dragon-blessing-card p { position:relative; z-index:1; margin:0; color:rgba(255,247,231,.76); font-size:15px; line-height:1.8; }
.dragon-facts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.dragon-facts article { min-height:105px; display:grid; align-content:center; gap:7px; padding:16px; border:1px solid var(--line); border-radius:5px 19px 5px 19px; background:#fffdf7; box-shadow:0 8px 18px rgba(74,38,20,.07); }
.dragon-facts strong { color:var(--skin-main); font:700 25px/1 Georgia,serif; }
.dragon-facts span { color:var(--muted); font-size:13px; line-height:1.45; }
.dragon-story-card { margin-top:28px; padding:26px 21px; border-top:4px solid var(--skin-main); background:#fffdf8; box-shadow:0 15px 34px rgba(75,39,21,.1); }
.dragon-story-card .eyebrow { color:#b98637; }
.dragon-story-card h2 { margin:7px 0 14px; font:700 27px/1.35 "STKaiti",serif; color:#41291f; }
.dragon-story-card p { margin:0 0 13px; color:#71594c; font-size:15px; line-height:1.9; }
.dragon-story-card p:last-child { margin-bottom:0; }
.dragon-heritage-card { display:flex; gap:15px; align-items:flex-start; margin-top:14px; padding:20px; border:1px solid #ddc9a8; border-radius:20px 5px 20px 5px; background:#f7ead2; }
.heritage-seal { flex:0 0 46px; height:46px; display:grid; place-items:center; border:3px double #e0aa4e; border-radius:50%; color:#ffe3a5; background:var(--skin-main); font:700 24px "STKaiti",serif; }
.dragon-heritage-card h2 { margin:0 0 6px; color:#58372a; font:700 21px/1.4 "STKaiti",serif; }
.dragon-heritage-card p { margin:0; color:#806353; font-size:14px; line-height:1.75; }
.dragon-gallery { margin-top:30px; }
.dragon-gallery-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.dragon-gallery figure { margin:0; overflow:hidden; border-radius:5px 18px 5px 18px; background:#2d1b16; box-shadow:0 9px 20px rgba(57,29,17,.13); }
.dragon-gallery figure.gallery-wide { grid-column:1 / -1; }
.dragon-gallery img { display:block; width:100%; aspect-ratio:1 / 1; object-fit:cover; }
.dragon-gallery .gallery-wide img { aspect-ratio:16 / 10; }
.dragon-gallery figcaption { min-height:68px; padding:11px 12px 12px; color:#f8ead3; font-size:13px; line-height:1.55; }
/* 视频跳转链接与角标：整图可点，右下角小徽标提示"这是视频入口" */
.dragon-gallery .gallery-video-link { position:relative; display:block; }
.dragon-gallery .gallery-video-link:active img { opacity:.82; }
.dragon-gallery .gallery-play-badge { position:absolute; right:9px; bottom:9px; padding:4px 9px; border-radius:999px; background:rgba(30,14,9,.72); color:#f4d9a0; font-size:11px; letter-spacing:.04em; backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); box-shadow:0 2px 8px rgba(0,0,0,.28); }
/* 图库提示行 */
.gallery-hint { margin:-4px 0 10px; color:rgba(248,234,211,.6); font-size:12.5px; }
.dragon-source-note { margin-top:22px; }
.dragon-source-note p { font-size:13px; }

.draw-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px 112px;
  background:
    radial-gradient(circle at 15% 5%, rgba(213,150,53,.13), transparent 24rem),
    linear-gradient(rgba(255,250,239,.97), rgba(255,250,239,.98)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(125,71,37,.05) 32px);
  box-shadow: 0 0 50px rgba(61,35,15,.16);
}
.draw-topbar { margin-bottom: 20px; }
.draw-mark { font: 700 18px "STKaiti", serif; }
.draw-count { padding: 7px 10px; border-radius: 999px; color: #8b5e2a; background: #f5e6c9; font-size: 12px; font-weight: 800; }
.draw-hero { position: relative; min-height: 295px; overflow: hidden; padding: 28px 22px; border-radius: 30px 30px 7px 30px; color: #fff4db; background: linear-gradient(145deg, #2d1713, #771a1d); box-shadow: 0 18px 38px rgba(70,20,17,.2); }
.draw-hero-copy { position: relative; z-index: 2; max-width: 62%; }
.draw-hero .eyebrow { color: #e3ad54; }
.draw-hero h1 { font-size: 41px; }
.draw-hero p { color: rgba(255,246,226,.65); font-size: 14px; line-height: 1.7; }
.lot-cylinder { position: absolute; right: -5px; bottom: -12px; width: 142px; height: 210px; border: 3px double #e1a849; border-radius: 18px 18px 55px 55px; background: linear-gradient(90deg, #7c181a, #bd3433 48%, #6f1114); box-shadow: -10px 18px 25px rgba(0,0,0,.28); transform: rotate(6deg); }
.lot-cylinder::before { content: ""; position: absolute; left: 12px; right: 12px; top: -15px; height: 29px; border: 2px solid #d59d43; border-radius: 50%; background: #3a1713; }
.lot-cylinder i { position: absolute; top: -53px; width: 7px; height: 84px; border-radius: 5px; background: #d6a452; transform-origin: bottom; }
.lot-cylinder i:nth-child(1) { left: 33px; transform: rotate(-8deg); }
.lot-cylinder i:nth-child(2) { left: 61px; transform: rotate(2deg); }
.lot-cylinder i:nth-child(3) { left: 87px; transform: rotate(9deg); }
.lot-cylinder i:nth-child(4) { left: 108px; transform: rotate(15deg); }
.lot-cylinder b { position: absolute; inset: 55px 37px auto; height: 64px; display: grid; place-items: center; color: #6f1717; background: #f1c66c; border: 3px double #762022; font: 700 34px "STKaiti", serif; }
.checkin-card { margin-top: 16px; padding: 18px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 24px rgba(77,42,20,.08); }
.checkin-card > div { display: flex; align-items: center; gap: 12px; }
.checkin-card > div > span { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #a52527; background: #f6e5d6; font-size: 22px; }
.checkin-card p, .checkin-card strong, .checkin-card small { display: block; margin: 0; }
.checkin-card small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.checkin-card button { width: 100%; margin-top: 15px; padding: 14px; border: 0; border-radius: 8px; color: #fff6e2; background: linear-gradient(#a92a2c, #7d171a); font-weight: 800; box-shadow: 0 8px 18px rgba(130,24,26,.18); }
.checkin-card button:disabled { color: #876f61; background: #e8ded0; box-shadow: none; }
.lot-result { margin-top: 18px; overflow: hidden; border: 1px solid rgba(133,75,35,.2); background: #fffefa; box-shadow: 0 18px 36px rgba(76,42,22,.12); }
.lot-result > header { display: flex; justify-content: space-between; padding: 13px 17px; color: #ffedcb; background: #842024; }
.lot-result > header span { font-weight: 800; }
.lot-result > header small { color: rgba(255,245,223,.68); }
.lot-poem { padding: 26px 22px 22px; text-align: center; background: linear-gradient(#fff7e7, #fffdf8); border-bottom: 1px solid var(--line); }
.lot-poem b { display: block; color: #8c2022; font: 700 30px "STKaiti", serif; letter-spacing: .12em; }
.lot-poem p { max-width: 290px; margin: 13px auto 0; color: #60463b; font: 700 18px/1.8 "STKaiti", serif; white-space: pre-line; }
.lot-explanation { padding: 22px; }
.lot-explanation h2 { margin-bottom: 9px; font: 700 22px "STKaiti", serif; }
.lot-explanation > p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.lot-actions { display: grid; gap: 8px; margin-top: 15px; }
.lot-actions span { padding: 10px 12px; border-left: 3px solid #d49a3b; color: #594137; background: #fff5e3; font-size: 13px; line-height: 1.5; }
.lot-result footer { padding: 12px 18px; color: #85674f; background: #f3e8d5; font-size: 12px; text-align: center; }
.draw-classics { margin-top: 22px; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 480px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 9px 10px max(9px, env(safe-area-inset-bottom)); background: rgba(255, 250, 239, .96); border-top: 1px solid rgba(108, 58, 30, .16); box-shadow: 0 -9px 26px rgba(72, 43, 20, .08); backdrop-filter: blur(14px); }
.bottom-nav button { position: relative; display: grid; justify-items: center; gap: 3px; border: 0; color: #8b776b; background: transparent; padding: 4px 0; }
.bottom-nav span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font: 700 16px "STKaiti", serif; }
.bottom-nav b { font-size: 12px; }
.bottom-nav .active { color: var(--red); }
.bottom-nav .active span { color: #fff1d8; background: var(--red); box-shadow: 0 5px 12px rgba(154, 32, 34, .25); }

dialog { width: min(calc(100% - 34px), 420px); padding: 0; border: 0; border-radius: 28px 28px 8px 8px; color: var(--ink); background: var(--paper); box-shadow: 0 28px 70px rgba(40, 18, 11, .34); }
dialog::backdrop { background: rgba(35, 15, 11, .65); backdrop-filter: blur(5px); }
dialog form { position: relative; padding: 32px 26px 26px; }
.close-button { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #7d665b; background: #eee1ca; font-size: 24px; }
.dialog-emblem { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 50%; color: #ffe2a7; background: var(--red); border: 3px double #e4b35d; font: 700 28px "STKaiti", serif; }
dialog h2 { margin: 0 0 8px; font: 700 30px "STKaiti", serif; }
.dialog-intro { color: var(--muted); font-size: 14px; line-height: 1.6; }
dialog label { display: block; margin-top: 18px; font-size: 14px; font-weight: 700; }
dialog input { width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid #d9c6aa; border-radius: 8px; color: var(--ink); background: #fff; outline: 0; }
dialog select { width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid #d9c6aa; border-radius: 8px; color: var(--ink); background: #fff; outline: 0; }
dialog input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(154, 32, 34, .1); }
.zodiac-preview { display: flex; justify-content: space-between; margin: 18px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.zodiac-preview strong { color: var(--red); }
.save-button { width: 100%; border: 0; border-radius: 9px; padding: 15px; color: #fff6e5; background: linear-gradient(#ac2b2d, #85191c); box-shadow: 0 9px 20px rgba(133, 25, 28, .2); font-weight: 800; }
.change-skin-button { width: 100%; margin-top: 10px; border: 1px solid #d9c6aa; border-radius: 9px; padding: 13px; color: var(--red); background: transparent; font-weight: 800; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 96px; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 999px; color: white; background: rgba(45, 28, 23, .92); opacity: 0; pointer-events: none; transition: .25s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 370px) {
  .app-shell { padding-inline: 14px; }
  .true-dragon-shell { padding-inline: 14px; }
  .fortune-hero { min-height: 320px; padding-inline: 18px; }
  .true-dragon-hero { min-height: 390px; }
  .true-dragon-hero-copy { left: 17px; right: 17px; bottom: 20px; }
  .true-dragon-hero h1 { font-size: 34px; }
  .dragon-gallery-grid { grid-template-columns: 1fr; }
  .dragon-gallery figure.gallery-wide { grid-column: auto; }
  .dragon-gallery img, .dragon-gallery .gallery-wide img { aspect-ratio: 4 / 3; }
  .summary { max-width: 67%; }
  .dragon { width: 69%; right: -53px; }
  .quick-signals strong { font-size: 12px; }
  .fortune-bars { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .access-gate { padding-inline: 13px; }
  .access-header { margin-bottom: 16px; }
  .access-layout { display:block; border-radius:26px 6px 26px 6px; }
  .access-visual { min-height:245px; padding:22px 18px; }
  .access-visual img { width:190px; margin:-10px 0; }
  .access-visual b { font-size:18px; }
  .access-card { padding:27px 20px 30px; }
  .access-card h1 { font-size:39px; }
  .access-intro { font-size:15px; }
  .onboarding-header { margin-bottom: 30px; }
  .skin-card { min-height: 232px; }
  .skin-image { height: 150px; }
  .register-form { grid-template-columns: 1fr; }
  .register-form .zodiac-preview, .register-form .save-button, .skin-fieldset, .birthday-reason, .skin-error { grid-column: 1; }
}

@media (max-width: 370px) {
  .access-brand small { max-width:142px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .access-badge { padding-inline:8px; }
  .access-steps span { font-size:11px; }
  .code-row { grid-template-columns:1fr; }
  .code-row button { min-height:44px; }
  .skin-grid { gap: 9px; }
  .skin-card { min-height: 214px; }
  .skin-image { height: 137px; }
  .skin-copy { padding-inline: 10px; }
  .skin-copy strong { font-size: 17px; }
  .skin-copy em { font-size: 10px; }
  .chosen-dragon { width: 128px; }
  .chosen-dragon img { width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: no-preference) {
  .dragon { animation: arrive .75s cubic-bezier(.2,.9,.3,1) both; }
  .score-seal { animation: seal .55s .35s cubic-bezier(.2,.9,.3,1.2) both; }
  @keyframes arrive { from { opacity: 0; transform: translate(24px, 20px) scale(.92); } }
  @keyframes seal { from { opacity: 0; transform: rotate(14deg) scale(.7); } }
  @keyframes stepIn { from { opacity: 0; transform: translateY(10px); } }
  @keyframes splashLeave { to { opacity: 0; transform: scale(1.04); } }
  @keyframes glowTurn { to { transform:rotate(360deg); } }
  @keyframes firework { 0%{opacity:0;transform:scale(.15)} 28%{opacity:1} 100%{opacity:0;transform:scale(1.35)} }
  @keyframes confettiFall { 0%{opacity:0;transform:translateY(-8vh) rotate(0)} 12%{opacity:1} 100%{opacity:0;transform:translateY(112vh) rotate(560deg)} }
}

@media (prefers-reduced-motion: reduce) {
  .gate-panel, .blessing-scroll { transition-duration: .01s; }
  .fireworks i, .gold-confetti i, .festive-glow { animation: none; }
}
