:root {
  --sky: #bfeaf5;
  --sky-deep: #8fd4e5;
  --paper: #fffdf0;
  --paper-shadow: #f7c7bd;
  --coral: #ff466d;
  --coral-dark: #df3159;
  --orange: #ff9d4a;
  --navy: #294c67;
  --ink: #3e4b50;
  --muted: #778b8e;
  --green: #178b72;
  --line: rgba(70, 92, 93, .16);
  --danger: #b7384e;
  --serif: "Kaiti SC", "STKaiti", "FangSong", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #173f47; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); font-family: var(--sans); background: #173f47; }
button, input, select { font: inherit; }
button, label, summary, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.desktop-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 244, 182, .2), transparent 24%),
    radial-gradient(circle at 80% 78%, rgba(103, 204, 185, .22), transparent 30%),
    linear-gradient(135deg, #102e36, #214c50 48%, #123b43);
}

.h5-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: clip;
  background:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(180deg, #c8eff7 0%, #b8e9f2 52%, #90d1d4 100%);
  background-size: 38px 38px, 38px 38px, auto;
  box-shadow: 0 0 70px rgba(0,0,0,.36);
}

.h5-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  min-height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  color: #20282b;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.h5-bar button { height: 46px; padding: 0; border: 0; color: #263336; background: transparent; font-size: 31px; line-height: 1; }
.h5-bar div { min-width: 0; text-align: center; }
.h5-bar b, .h5-bar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h5-bar b { font-size: 15px; letter-spacing: .05em; }
.h5-bar span { margin-top: 2px; color: #8a9899; font-size: 9px; }
#bar-home { font-size: 16px; letter-spacing: 2px; }

.scene { position: absolute; z-index: 0; top: 58px; left: 0; width: 100%; height: calc(100svh - 58px); overflow: hidden; pointer-events: none; }
.cloud { position: absolute; width: 130px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.7); filter: blur(.2px); }
.cloud::before, .cloud::after { content: ""; position: absolute; bottom: 0; border-radius: 50%; background: inherit; }
.cloud::before { left: 22px; width: 58px; height: 48px; }
.cloud::after { right: 16px; width: 48px; height: 38px; }
.cloud-a { top: 13%; left: -32px; transform: scale(.8); }
.cloud-b { top: 32%; right: -50px; transform: scale(.62); opacity: .65; }
.hill { position: absolute; bottom: -90px; width: 360px; height: 230px; border-radius: 50% 50% 0 0; transform: rotate(-12deg); }
.hill-a { left: -150px; background: #228f79; }
.hill-b { right: -180px; bottom: -110px; background: #4cae7f; transform: rotate(18deg); }
.leaf { position: absolute; color: #127e68; font-size: 76px; line-height: 1; transform: rotate(25deg) scaleX(.45); text-shadow: 22px 22px 0 #4dae80, -12px 38px 0 #1d9875; }
.leaf-a { left: -24px; bottom: 13%; }
.leaf-b { right: -30px; bottom: 6%; transform: rotate(-30deg) scaleX(.5); }
.leaf-c { right: -28px; top: 25%; color: rgba(32,143,114,.55); transform: rotate(20deg) scaleX(.32); }
.blossom { position: absolute; color: #ff7992; font-size: 34px; text-shadow: 22px -19px 0 #ffd3d9, 40px 7px 0 #ff9cad; }
.blossom-a { top: 7%; right: 12px; transform: rotate(20deg); }
.blossom-b { bottom: 18%; left: 15px; transform: rotate(-20deg) scale(.7); opacity: .8; }

.progress { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; width: calc(100% - 34px); margin: 12px auto -2px; padding: 7px 12px; color: var(--navy); border: 1px solid rgba(255,255,255,.5); border-radius: 99px; background: rgba(255,255,255,.36); backdrop-filter: blur(8px); }
.progress-copy { font-size: 10px; letter-spacing: .1em; }
.progress-copy b { color: var(--coral); font-size: 13px; }
.paw-dots { display: flex; gap: 7px; }
.paw-dots i { display: block; width: 8px; height: 8px; border: 1px solid rgba(41,76,103,.42); border-radius: 50%; background: transparent; transition: .25s ease; }
.paw-dots i.is-on { border-color: var(--coral); background: var(--coral); transform: scale(1.15); }

.screen { position: relative; z-index: 2; min-height: calc(100svh - 58px); padding: 24px 17px calc(36px + env(safe-area-inset-bottom)); animation: page-in .42s cubic-bezier(.2,.75,.25,1); }
@keyframes page-in { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }

.cover-screen { display: flex; flex-direction: column; align-items: center; min-height: calc(100svh - 58px); padding-top: 36px; text-align: center; }
.cover-brand { align-self: flex-start; display: grid; place-content: center; width: 86px; height: 70px; margin-left: 7px; color: var(--coral); border: 2px solid currentColor; border-radius: 8px; background: rgba(255,255,255,.8); transform: rotate(-2deg); box-shadow: 3px 3px 0 rgba(255,70,109,.15); }
.cover-brand span { font: 700 8px/1 var(--sans); letter-spacing: .15em; }
.cover-brand b { margin-top: 5px; font: 700 13px/1 var(--serif); }
.season-copy { margin: -30px 0 20px 90px; color: var(--coral); font: 700 14px/1.6 var(--serif); letter-spacing: .16em; }
.cover-screen h1 { margin: 8px 0 0; color: var(--coral); font: 900 clamp(60px, 18vw, 78px)/.98 var(--serif); letter-spacing: -.08em; text-shadow: 0 5px 0 white, 3px 0 0 white, -3px 0 0 white, 0 10px 18px rgba(255,70,109,.16); transform: rotate(-2deg); }
.cover-screen h1 span { display: block; font-size: .72em; letter-spacing: .1em; }
.hero-paws { position: relative; width: 285px; height: 250px; margin-top: 22px; }
.hero-paw { position: absolute; width: 152px; margin: 0; padding: 9px 9px 12px; border: 3px solid white; border-radius: 22px 27px 18px 24px; background: #fffaf0; box-shadow: 0 14px 22px rgba(28,83,81,.18); }
.hero-paw.cat { top: 17px; left: 4px; transform: rotate(-9deg); }
.hero-paw.dog { top: 43px; right: 1px; transform: rotate(8deg); }
.hero-paw figcaption { padding-top: 8px; color: var(--navy); font: 700 9px var(--sans); letter-spacing: .1em; }
.hero-heart { position: absolute; z-index: 2; left: 129px; top: 120px; display: grid; place-items: center; width: 44px; height: 44px; color: white; border-radius: 50%; background: var(--coral); font-size: 32px; box-shadow: 0 5px 15px rgba(255,70,109,.35); }
.render { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #f5eadb; }
.render > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.render.atlas > img { position: absolute; width: 400%; height: 300%; max-width: none; left: calc(var(--col) * -100%); top: calc(var(--row) * -100%); object-fit: fill; }

.heart-button { position: relative; display: grid; place-items: center; width: 88px; height: 88px; margin: -6px 0 42px; padding: 0; color: white; border: 0; border-radius: 19px 4px 19px 4px; background: linear-gradient(135deg, #ff6f86, var(--coral-dark)); transform: rotate(45deg); box-shadow: 0 11px 25px rgba(228,49,89,.42); animation: heart-beat 2.2s ease-in-out infinite; }
.heart-button::before, .heart-button::after { content: ""; position: absolute; width: 88px; height: 88px; border-radius: 50%; background: inherit; }
.heart-button::before { top: -43px; left: 0; }
.heart-button::after { top: 0; left: -43px; }
.heart-button span, .heart-button small { position: absolute; z-index: 2; width: 118px; transform: rotate(-45deg); }
.heart-button span { margin-top: -20px; font: 700 17px var(--serif); }
.heart-button small { margin-top: 12px; font-size: 7px; letter-spacing: .18em; }
@keyframes heart-beat {
  0%, 100% { box-shadow: 0 11px 25px rgba(228,49,89,.42); }
  50% { box-shadow: 0 14px 34px rgba(228,49,89,.62); }
}
.cover-foot { margin: auto 0 0; color: rgba(30,76,85,.7); font-size: 9px; }

.paper-card { position: relative; width: 100%; padding: 34px 25px 30px; border: 1px solid rgba(255,255,255,.85); border-radius: 42px 52px 39px 48px / 38px 46px 43px 51px; background:
  radial-gradient(circle at 20% 10%, rgba(255,255,255,.9), transparent 30%),
  linear-gradient(135deg, #fffef4, #fff9e8);
  box-shadow: 8px 9px 0 rgba(247,199,189,.88), 0 22px 38px rgba(48,91,87,.2); }
.paper-card::before { content: ""; position: absolute; inset: 8px; z-index: -1; border: 1px dashed rgba(235,177,163,.35); border-radius: inherit; }
.guide-screen { display: grid; align-items: center; }
.guide-card { padding-top: 48px; }
.floating-paws { position: absolute; top: -24px; left: 50%; color: #ff8194; font-size: 24px; letter-spacing: -3px; transform: translateX(-50%) rotate(-10deg); text-shadow: 0 8px 0 #ffb1ba; }
.card-kicker { margin: 0 0 8px; color: var(--coral); font-size: 8px; font-weight: 800; letter-spacing: .17em; }
.paper-card h2 { margin: 0; color: #3c4b4f; font: 700 27px/1.25 var(--serif); }
.guide-lead { margin: 20px 0 16px; font-size: 14px; line-height: 1.8; text-align: center; }
.guide-lead strong { color: var(--coral); }
.guide-list { margin: 0; padding: 0; list-style: none; }
.guide-list li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px dashed rgba(71,98,101,.18); }
.guide-list b { display: grid; place-items: center; width: 42px; height: 42px; color: white; border-radius: 50%; background: var(--coral); font-size: 9px; text-align: center; }
.guide-list span { align-self: center; color: #58696c; font-size: 12px; line-height: 1.6; }
.guide-card aside { margin: 18px 0; padding: 12px 14px; color: #7b665f; border: 1px solid #f2d9c4; border-radius: 14px; background: #fff3db; font-size: 10px; line-height: 1.7; }

.coral-button { width: 100%; min-height: 54px; padding: 12px 18px; color: white; border: 0; border-radius: 99px; background: linear-gradient(90deg, var(--coral), #ff725f); box-shadow: inset 0 2px 0 rgba(255,255,255,.38), 0 8px 15px rgba(230,56,88,.22); font-weight: 800; letter-spacing: .04em; }
.coral-button:active { transform: translateY(1px); }

.subject-screen, .vision-screen, .supplement-screen { padding-top: 23px; }
.flow-card { padding-top: 28px; border-radius: 36px 44px 38px 45px / 31px 44px 35px 47px; }
.species-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 16px; }
.species-option { min-width: 0; padding: 13px 7px 12px; color: var(--ink); border: 2px solid transparent; border-radius: 22px; background: #edf7f3; transition: .18s ease; }
.species-option.is-active { color: var(--coral-dark); border-color: var(--coral); background: #fff2ed; box-shadow: 0 5px 12px rgba(255,70,109,.14); }
.animal-face { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 7px; color: white; border: 3px solid white; border-radius: 45% 45% 50% 50%; background: linear-gradient(145deg, #efa45d, #bc6d47); box-shadow: 0 5px 10px rgba(88,63,45,.2); font: 800 19px var(--serif); }
.species-option[data-species="dog"] .animal-face { background: linear-gradient(145deg, #9d755c, #5d473d); }
.species-option b, .species-option small { display: block; }
.species-option b { font: 700 17px var(--serif); }
.species-option small { margin-top: 3px; color: #819093; font-size: 8px; }

.photo-picker { position: relative; display: grid; place-items: center; width: 132px; height: 132px; margin: 18px auto 24px; overflow: hidden; color: #8f907a; border: 6px solid white; border-radius: 50%; background: #f1ecd8; box-shadow: 0 8px 18px rgba(67,84,79,.16); text-align: center; cursor: pointer; }
.photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-picker img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker span b, .photo-picker span strong, .photo-picker span small { display: block; }
.photo-picker span b { color: var(--coral); font-size: 34px; font-weight: 300; line-height: 1; }
.photo-picker span strong { margin-top: 5px; font-size: 12px; }
.photo-picker span small { margin-top: 4px; font-size: 7px; }
.photo-picker em { position: absolute; right: 15px; bottom: 10px; padding: 4px 7px; color: white; border-radius: 99px; background: rgba(40,67,72,.75); font-size: 7px; font-style: normal; }
.line-field { position: relative; display: grid; grid-template-columns: 48px 1fr; align-items: center; min-height: 54px; border-bottom: 2px solid #ef8e9a; }
.line-field > span { color: var(--coral-dark); font: 700 14px var(--serif); }
.line-field input, .line-field select { width: 100%; min-width: 0; padding: 12px 4px; color: var(--ink); border: 0; outline: 0; background: transparent; }
.line-field small { position: absolute; right: 4px; bottom: -17px; color: #9a9c91; font-size: 7px; }
.welfare-check, .ai-consent { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; margin: 34px 0 10px; padding: 11px; border-radius: 12px; background: #fff4e7; font-size: 10px; line-height: 1.55; }
.ai-consent { margin-top: 0; color: #3d6665; border: 1px solid #c9e6dc; background: #edf8f3; }
.ai-consent b, .ai-consent span { display: block; }
.ai-consent b { margin-bottom: 2px; color: var(--green); font-size: 11px; }
.welfare-check input, .ai-consent input, .health-check input { accent-color: var(--coral); }
.ai-start span, .ai-start small { display: block; }
.ai-start small { margin-top: 4px; color: rgba(255,255,255,.8); font-size: 7px; font-weight: 500; letter-spacing: .12em; }
.inline-status { min-height: 20px; margin: 8px 2px 4px; color: var(--danger); font-size: 10px; }

.vision-card { overflow: hidden; }
.vision-lead, .supplement-lead { margin: 10px 0 18px; color: #6c7f81; font-size: 10px; line-height: 1.7; }
.supplement-lead strong { color: var(--coral-dark); }
.vision-stage { position: relative; width: min(260px, 86%); aspect-ratio: 1; margin: 18px auto 22px; overflow: hidden; border: 7px solid white; border-radius: 34px; background: #eadfce; box-shadow: 0 12px 25px rgba(44,76,78,.18); }
.vision-stage img { width: 100%; height: 100%; object-fit: cover; }
.vision-stage::after { content: "AI VISUAL"; position: absolute; top: 14px; left: 14px; padding: 5px 8px; color: white; border-radius: 99px; background: rgba(26,65,70,.72); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.vision-stage > b { position: absolute; right: 12px; bottom: 12px; padding: 6px 9px; color: white; border-radius: 99px; background: rgba(222,47,87,.86); font-size: 8px; }
.scan-frame { position: absolute; inset: 30px; border: 2px solid rgba(255,255,255,.88); border-radius: 28px; box-shadow: 0 0 0 999px rgba(26,70,70,.08); }
.scan-frame::before, .scan-frame::after { content: ""; position: absolute; width: 34px; height: 34px; border-color: var(--coral); }
.scan-frame::before { top: -3px; left: -3px; border-top: 4px solid var(--coral); border-left: 4px solid var(--coral); border-radius: 8px 0 0; }
.scan-frame::after { right: -3px; bottom: -3px; border-right: 4px solid var(--coral); border-bottom: 4px solid var(--coral); border-radius: 0 0 8px; }
.scan-line { position: absolute; z-index: 2; left: 30px; right: 30px; top: 36px; height: 2px; background: linear-gradient(90deg, transparent, #ff315f, transparent); box-shadow: 0 0 10px #ff315f; animation: vision-scan 2.1s ease-in-out infinite; }
@keyframes vision-scan { 50% { transform: translateY(180px); } }
.vision-steps { margin: 0; padding: 0; list-style: none; }
.vision-steps li { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: center; min-height: 34px; color: #8b9898; font-size: 9px; }
.vision-steps i { display: grid; place-items: center; width: 16px; height: 16px; border: 2px solid #ccd6d2; border-radius: 50%; }
.vision-steps li.is-active { color: var(--navy); font-weight: 700; }
.vision-steps li.is-active i { border-color: var(--coral); border-top-color: transparent; animation: spin .7s linear infinite; }
.vision-steps li.is-done { color: var(--green); }
.vision-steps li.is-done i { color: white; border-color: var(--green); background: var(--green); }
.vision-steps li.is-done i::after { content: "✓"; font-size: 8px; }
@keyframes spin { to { transform: rotate(1turn); } }
.vision-status { min-height: 18px; margin: 12px 0 0; color: var(--coral-dark); font-size: 9px; line-height: 1.6; text-align: center; }
.vision-error { margin-top: 14px; padding: 16px; color: #75514f; border: 1px solid #f3c1bc; border-radius: 16px; background: #fff0eb; text-align: center; }
.vision-error b { color: var(--danger); font: 700 15px var(--serif); }
.vision-error p { margin: 7px 0 12px; font-size: 9px; line-height: 1.65; }
.vision-error button { padding: 9px 14px; color: white; border: 0; border-radius: 99px; background: var(--coral); font-size: 9px; font-weight: 700; }

.supplement-card .select-grid { margin-top: 10px; }
.supplement-card .select-grid label { grid-template-columns: minmax(85px, .65fr) 1fr; }

.evidence-target { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin: 15px 0 12px; padding: 11px 12px; color: var(--navy); border-radius: 13px; background: #eaf7f3; font-size: 11px; font-weight: 700; }
.evidence-target code { padding: 4px 6px; color: var(--green); border-radius: 5px; background: white; font-size: 7px; }
.select-grid { display: grid; gap: 8px; }
.select-grid label { display: grid; grid-template-columns: minmax(92px, .72fr) 1fr; align-items: center; padding: 4px 8px 4px 12px; border: 1px solid #e6dfcb; border-radius: 12px; background: rgba(255,255,255,.74); font-size: 10px; }
.select-grid select { width: 100%; min-width: 0; padding: 9px 6px; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 10px; }
.health-check { display: grid; grid-template-columns: 18px 1fr; gap: 8px; margin-top: 12px; padding: 10px; color: #7f4d4d; border: 1px solid #f2c9c3; border-radius: 12px; background: #fff1ed; font-size: 8px; line-height: 1.55; }
.health-check b, .health-check span { display: block; }
.health-check b { font-size: 10px; }
.coral-button.generate span, .coral-button.generate small { display: block; }
.coral-button.generate small { margin-top: 4px; font-size: 7px; font-weight: 500; letter-spacing: .12em; }

.result-screen { padding: 0 0 calc(28px + env(safe-area-inset-bottom)); background:
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,0)),
  var(--sky); }
.result-sky { position: relative; min-height: 590px; padding: 38px 28px 58px; overflow: hidden; text-align: center; }
.result-sky::before, .result-sky::after { content: ""; position: absolute; width: 220px; height: 70px; border-radius: 50%; background: rgba(255,255,255,.52); }
.result-sky::before { top: 108px; left: -145px; }
.result-sky::after { right: -135px; bottom: 56px; }
.result-owner { display: inline-block; margin: 0; padding: 7px 15px; color: var(--navy); border-radius: 99px; background: rgba(255,255,255,.58); font: 700 11px var(--serif); }
.result-sky h2 { margin: 19px auto 4px; max-width: 340px; color: var(--coral-dark); font: 900 37px/1.18 var(--serif); text-shadow: 0 3px 0 white; }
.result-meta { margin: 8px 0; color: var(--navy); font-size: 9px; }
.result-portrait { position: absolute; z-index: 3; right: calc(50% - 135px); bottom: 55px; width: 78px; height: 78px; overflow: hidden; border: 5px solid white; border-radius: 50%; background: #fff2da; box-shadow: 0 8px 18px rgba(41,76,103,.18); }
.result-portrait img { width: 100%; height: 100%; object-fit: cover; }
.result-visual { position: relative; z-index: 2; width: 250px; margin: 26px auto 0; transform: none; }
.result-visual .render { border: 9px solid white; border-radius: 38px; box-shadow: 0 18px 32px rgba(41,76,103,.22); }
.result-visual > span:last-child { display: inline-block; margin-top: 12px; padding: 6px 10px; color: var(--navy); border-radius: 99px; background: rgba(255,255,255,.62); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.result-card { width: calc(100% - 28px); margin: -18px auto 0; padding: 28px 18px; border-radius: 34px 38px 29px 42px; }
.lead-reading { margin-bottom: 18px; padding: 17px 15px; color: white; border-radius: 18px; background: linear-gradient(135deg, var(--coral-dark), var(--coral)); text-align: center; }
.lead-reading small { display: block; margin-bottom: 5px; color: rgba(255,255,255,.76); font-size: 7px; letter-spacing: .16em; }
.lead-reading b { display: block; font: 700 20px var(--serif); }
.lead-reading p { margin: 7px 0 0; font-size: 10px; line-height: 1.65; }
.vision-proof, .evidence-box, .reading-sections article, .conflict-box { margin-top: 12px; padding: 15px; border-radius: 16px; background: rgba(255,255,255,.76); box-shadow: inset 0 0 0 1px rgba(74,98,97,.08); }
.vision-proof { border: 1px solid #cbe9df; background: #edf8f3; }
.vision-proof h3, .evidence-box h3, .reading-sections h3, .conflict-box h3 { margin: 0 0 9px; color: var(--navy); font: 700 16px var(--serif); }
.vision-proof p { display: grid; gap: 5px; margin: 0; }
.vision-proof p span { position: relative; padding-left: 13px; color: #53696b; font-size: 9px; line-height: 1.6; }
.vision-proof p span::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.vision-proof small { display: block; margin-top: 9px; color: #78908d; font-size: 7px; line-height: 1.5; }
.evidence-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 0; border-top: 1px dashed #d9d8c7; }
.evidence-row b { color: var(--coral-dark); font-size: 9px; }
.evidence-row span { grid-column: 1; color: #59696c; font-size: 10px; }
.evidence-row small { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--green); font-size: 7px; }
.empty-evidence { color: #7f8d8d; font-size: 9px; line-height: 1.65; }
.reading-sections article p, .conflict-box p { margin: 0; color: #58686b; font-size: 10px; line-height: 1.75; }
.reading-sections article small { display: block; margin-top: 8px; color: #a08c7e; font-size: 7px; line-height: 1.5; }
.conflict-box { border: 1px solid #f2b9b5; background: #fff0eb; }
.conflict-box h3, .conflict-box b { color: var(--danger); }
.receipt { margin-top: 13px; padding: 12px; border: 1px dashed #b9b9a7; border-radius: 13px; color: #68797b; background: rgba(255,253,239,.52); }
.receipt summary { cursor: pointer; font-size: 9px; font-weight: 700; }
.receipt pre { overflow: auto; margin: 10px 0 0; white-space: pre-wrap; word-break: break-word; font-size: 7px; line-height: 1.6; }
.result-actions { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 7px; margin-top: 18px; }
.result-actions button { min-width: 0; padding: 11px 5px; color: var(--coral-dark); border: 1px solid var(--coral); border-radius: 99px; background: white; font-size: 9px; font-weight: 700; }
.result-actions button:nth-child(2) { color: white; background: var(--coral); }
.result-disclaimer { margin: 24px 20px 0; color: rgba(40,74,80,.7); font-size: 8px; line-height: 1.7; text-align: center; }

.poster-screen { padding: 22px 14px calc(30px + env(safe-area-inset-bottom)); background: #203f48; }
.poster-wrap { padding: 18px; border-radius: 25px; background: #fffdf1; text-align: center; }
.poster-wrap h2 { margin: 4px 0 15px; font: 700 24px var(--serif); }
.poster-wrap > img { display: block; width: 100%; height: auto; border: 1px solid #eadccc; background: var(--sky); box-shadow: 0 10px 25px rgba(0,0,0,.16); }
.poster-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.poster-actions button, .poster-actions a { display: grid; place-items: center; min-height: 46px; color: var(--coral-dark); border: 1px solid var(--coral); border-radius: 99px; background: white; font-size: 11px; font-weight: 700; text-decoration: none; }
.poster-actions a { color: white; background: var(--coral); }

.loading-overlay { position: fixed; z-index: 90; inset: 0; display: grid; place-content: center; justify-items: center; color: white; background: rgba(35,67,73,.78); backdrop-filter: blur(8px); }
.loading-overlay strong, .loading-overlay span { display: block; margin-top: 14px; }
.loading-overlay strong { font: 700 18px var(--serif); }
.loading-overlay span { margin-top: 5px; color: rgba(255,255,255,.7); font-size: 9px; }
.loading-paw { position: relative; width: 88px; height: 80px; animation: paw-wiggle 1.1s ease-in-out infinite; }
.loading-paw i, .loading-paw b { position: absolute; display: block; border-radius: 50%; background: var(--coral); box-shadow: inset 0 3px 5px rgba(255,255,255,.28); }
.loading-paw i { width: 22px; height: 28px; top: 0; }
.loading-paw i:nth-child(1) { left: 0; transform: rotate(-20deg); }
.loading-paw i:nth-child(2) { left: 23px; top: -8px; }
.loading-paw i:nth-child(3) { right: 20px; top: -8px; }
.loading-paw i:nth-child(4) { right: -2px; transform: rotate(20deg); }
.loading-paw b { left: 15px; bottom: 0; width: 60px; height: 48px; border-radius: 50% 50% 44% 44%; }
@keyframes paw-wiggle { 50% { transform: translateY(-8px) rotate(4deg); } }

.share-overlay { position: fixed; z-index: 100; inset: 0; display: flex; flex-direction: column; align-items: flex-end; padding: calc(78px + env(safe-area-inset-top)) 28px 30px; color: white; background: rgba(31,53,60,.78); backdrop-filter: blur(6px); text-align: right; }
.share-arrow { margin-right: 7px; color: #ff9aad; font-size: 72px; line-height: .8; transform: rotate(-13deg); }
.share-overlay div:nth-child(2) { max-width: 250px; margin-top: 18px; }
.share-overlay b, .share-overlay span { display: block; }
.share-overlay b { font: 700 22px/1.35 var(--serif); }
.share-overlay span { margin-top: 8px; color: rgba(255,255,255,.74); font-size: 10px; line-height: 1.6; }
.share-overlay button { margin-top: 18px; padding: 11px 17px; color: white; border: 1px solid rgba(255,255,255,.65); border-radius: 99px; background: var(--coral); font-size: 10px; }
.share-overlay .share-dismiss { color: rgba(255,255,255,.75); border: 0; background: transparent; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); max-width: min(320px, calc(100vw - 32px)); padding: 10px 15px; color: white; border-radius: 99px; background: rgba(36,61,67,.92); box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 10px; text-align: center; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

:focus-visible { outline: 3px solid #1d6f8a; outline-offset: 3px; }

@media (max-width: 359px) {
  .screen { padding-inline: 12px; }
  .paper-card { padding-inline: 18px; }
  .cover-screen h1 { font-size: 58px; }
  .hero-paws { transform: scale(.92); }
}

@media (min-width: 700px) {
  .h5-shell { min-height: calc(100vh - 30px); margin-block: 15px; border: 7px solid rgba(255,255,255,.68); border-radius: 28px; box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 34px 100px rgba(0,0,0,.48); }
  .h5-bar { border-radius: 21px 21px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
