:root {
  --deep: #061b19;
  --ink: #0b2926;
  --muted: #667572;
  --paper: #f3f7f0;
  --white: #fff;
  --lime: #c6f45d;
  --mint: #86efd0;
  --aqua: #3dc7a5;
  --red: #ff7967;
  --line: rgba(11,41,38,.14);
  --shadow: 0 28px 70px rgba(6,27,25,.14);
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 8% 0%, rgba(134,239,208,.27), transparent 30rem), radial-gradient(circle at 95% 92%, rgba(198,244,93,.2), transparent 34rem), var(--paper); font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; padding: 0 clamp(20px,5vw,72px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 11px; font-weight: 900; font-size: 19px; width: max-content; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.brand-eye { width: 32px; height: 25px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 70% 30% 70% 30%; transform: rotate(45deg); }
.brand-eye i { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); transform: rotate(-45deg); box-shadow: 0 0 0 2px var(--ink); }
.top-progress { display: flex; align-items: center; }
.progress-dot { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); border: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.progress-dot.active, .progress-dot.done { color: var(--deep); border-color: var(--lime); background: var(--lime); }
.progress-line { width: 38px; height: 1px; background: var(--line); }
.sound-button { justify-self: end; border: 0; color: var(--muted); background: transparent; font-size: 13px; }
main { flex: 1; }
.screen { display: none; min-height: calc(100vh - 118px); padding: clamp(30px,5vw,68px) clamp(20px,6vw,90px); animation: arrive .35s ease both; }
.screen.active { display: grid; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kicker { margin: 0 0 14px; color: #167768; font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(52px,7vw,96px); line-height: .98; letter-spacing: -.065em; }
h1 em { color: #15796a; font-style: normal; }
h2 { margin: 0; font-size: clamp(30px,4vw,50px); letter-spacing: -.045em; }
.intro { max-width: 660px; margin: 26px 0; color: var(--muted); font-size: clamp(17px,1.6vw,21px); line-height: 1.8; }
.primary, .secondary, .skip { min-height: 52px; padding: 0 22px; border-radius: 14px; border: 0; font-weight: 900; transition: transform .18s ease, filter .18s ease; }
.primary { color: var(--deep); background: var(--lime); }
.secondary { color: var(--ink); background: #e9efe8; border: 1px solid var(--line); }
.skip { color: var(--muted); background: transparent; font-weight: 600; }
.primary:hover, .secondary:hover, .skip:hover { transform: translateY(-2px); filter: brightness(.98); }
#screen-start { grid-template-columns: 1.1fr minmax(330px,.7fr); gap: clamp(36px,7vw,100px); align-items: center; }
.science-note { margin-top: 36px; display: grid; grid-template-columns: 62px 1fr; max-width: 680px; padding-top: 20px; border-top: 1px solid var(--line); }
.science-note span { color: #167768; font-weight: 900; }
.science-note p { margin: 0; color: var(--muted); line-height: 1.7; }
.start-panel { padding: 30px; border-radius: 26px; background: rgba(255,255,255,.86); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.start-panel > label, .anchor-form label { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.urge-number { display: flex; align-items: baseline; gap: 4px; }
.urge-number strong { font-size: 64px; line-height: 1; letter-spacing: -.06em; }
.urge-number span { color: var(--muted); }
input[type="range"] { width: 100%; accent-color: #15796a; }
.scale { display: flex; justify-content: space-between; margin: 4px 0 26px; color: var(--muted); font-size: 12px; }
.task-input, .anchor-form input:not([type="range"]) { width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--ink); background: var(--white); font-size: 17px; }
.task-input:focus, .anchor-form input:focus { border-color: #15796a; box-shadow: 0 0 0 3px rgba(21,121,106,.12); }
.quick-tasks, .step-suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 24px; }
.quick-tasks button, .step-suggestions button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; }
.start-panel .primary { width: 100%; }
.adaptive-hint { margin: 12px 0 0; color: #167768; text-align: center; font-size: 12px; font-weight: 700; }
.plan-preview { margin-top: 14px; padding: 14px; border: 1px solid rgba(21,121,106,.18); border-radius: 13px; background: rgba(134,239,208,.12); }
.plan-preview div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-preview span { color: var(--muted); font-size: 11px; font-weight: 800; }
.plan-preview strong { color: #15796a; font-size: 12px; }
.plan-preview p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.utility-actions { display: flex; justify-content: center; gap: 16px; margin-top: 12px; }
.text-button { padding: 3px; border: 0; color: #167768; background: transparent; font-size: 12px; font-weight: 800; }
.text-button:hover { text-decoration: underline; }
.boundary { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 11px; }
.game-screen { grid-template-rows: auto 1fr auto; }
.adaptive-strip { display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; margin-top: 18px; padding: 9px 12px; border: 1px solid rgba(21,121,106,.16); border-radius: 10px; background: rgba(255,255,255,.48); }
.adaptive-strip span { color: #15796a; font-size: 11px; font-weight: 900; }
.adaptive-strip p { margin: 0; color: var(--muted); font-size: 12px; }
.adaptive-strip strong { color: var(--ink); font-size: 12px; }
.stage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.stage-time, .score-box { display: flex; align-items: baseline; gap: 5px; }
.stage-time strong, .score-box strong { font-size: 48px; letter-spacing: -.06em; }
.stage-time span, .score-box span { color: var(--muted); font-size: 13px; }
.breath-stage { display: grid; place-items: center; align-content: center; }
.breath-orb { width: min(36vw,300px); aspect-ratio: 1; display: grid; place-content: center; border: 0; border-radius: 50%; color: var(--deep); background: radial-gradient(circle at 35% 28%, #f2ffd1 0 10%, var(--lime) 32%, var(--mint) 68%, #1e8b78 100%); box-shadow: 0 0 0 28px rgba(134,239,208,.12), 0 30px 80px rgba(21,121,106,.24); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(.78); } 40% { transform: scale(1); } }
.breath-orb span { font-size: 32px; font-weight: 900; }
.breath-orb small { font-size: 72px; font-weight: 900; letter-spacing: -.06em; }
.breath-stage > p { margin: 38px 0 16px; color: var(--muted); text-align: center; }
.cycle-track { display: flex; gap: 8px; }
.cycle-track span { width: 34px; height: 5px; border-radius: 99px; background: var(--line); }
.cycle-track span.done { background: #15796a; }
.rule-row { align-self: start; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: 13px; }
.rule-row span { padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); }
.rule-go { color: #147a63 !important; background: rgba(134,239,208,.22); }
.rule-stop { color: #bc4c40 !important; background: rgba(255,121,103,.12); }
.inhibit-arena { display: grid; place-items: center; align-content: center; min-height: 420px; }
.stimulus-card { width: min(46vw,270px); aspect-ratio: 1; display: grid; place-content: center; gap: 10px; border: 0; border-radius: 34px; color: var(--deep); background: var(--mint); box-shadow: var(--shadow); transition: transform .12s ease, opacity .12s ease, background .12s ease; }
.stimulus-card.stop { color: white; background: var(--red); }
.stimulus-card.hidden { opacity: 0; transform: scale(.86); pointer-events: none; }
.stimulus-card span { font-size: 70px; }
.stimulus-card strong { font-size: 26px; }
#feedback-text { min-height: 28px; margin-top: 28px; color: var(--muted); font-weight: 800; }
.anchor-grid { width: min(1040px,100%); margin: auto; display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px,6vw,84px); align-items: center; }
.task-summary { padding: 34px; border-radius: 26px; color: white; background: var(--deep); box-shadow: var(--shadow); }
.task-summary span { color: var(--mint); font-size: 13px; font-weight: 900; }
.task-summary h3 { margin: 18px 0; font-size: clamp(32px,4vw,52px); line-height: 1.16; letter-spacing: -.05em; }
.task-summary p { margin: 0; color: rgba(255,255,255,.62); line-height: 1.7; }
.anchor-form { padding: 30px; border-radius: 26px; background: white; box-shadow: var(--shadow); }
.anchor-form > label:not(:first-child) { margin-top: 26px; }
.inline-range { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; }
.inline-range strong { font-size: 30px; }
.inline-range span { color: var(--muted); }
.anchor-form .primary { width: 100%; margin-top: 22px; }
.result-screen { place-items: center; text-align: center; }
.result-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%; color: var(--deep); background: var(--lime); font-size: 28px; font-weight: 900; }
.result-screen h1 { font-size: clamp(42px,5vw,66px); }
.result-screen h1 em { display: inline-block; max-width: 850px; }
.result-task { margin: 14px 0 18px; color: var(--muted); font-size: 16px; }
.result-metrics { width: min(920px,100%); display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 30px 0 18px; }
.result-metrics article { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.68); }
.result-metrics span, .result-metrics small { display: block; color: var(--muted); font-size: 12px; }
.result-metrics strong { display: block; margin: 7px 0; font-size: 30px; }
.result-metrics i { font-style: normal; }
.result-actions { width: min(560px,100%); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.protection-card { width: min(860px,100%); margin: 0 0 16px; padding: 22px; border: 1px solid rgba(21,121,106,.2); border-radius: 20px; text-align: left; background: white; box-shadow: 0 18px 50px rgba(6,27,25,.08); }
.protection-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mini-label { color: #15796a; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.protection-head h3 { margin: 6px 0 0; font-size: 23px; letter-spacing: -.025em; }
.status-pill { flex: none; padding: 7px 10px; border-radius: 999px; color: var(--muted); background: #edf1ed; font-size: 11px; font-weight: 900; }
.status-pill.connected { color: #0d6d5d; background: rgba(134,239,208,.25); }
.status-pill.missing { color: #9b4b3f; background: rgba(255,121,103,.12); }
.protection-copy { margin: 12px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.protection-card fieldset { margin: 0 0 16px; padding: 0; border: 0; }
.protection-card legend { margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 900; }
.duration-options { display: flex; gap: 8px; }
.duration-options label { flex: 1; }
.duration-options input,.block-options input { position: absolute; opacity: 0; pointer-events: none; }
.duration-options span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.duration-options input:checked + span { color: var(--deep); border-color: #15796a; background: rgba(134,239,208,.2); box-shadow: inset 0 0 0 1px #15796a; }
.block-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.block-options label > span { display: block; min-height: 66px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.block-options b,.block-options small { display: block; }
.block-options b { margin-bottom: 5px; font-size: 13px; }
.block-options small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.block-options input:checked + span { border-color: #15796a; background: rgba(134,239,208,.16); box-shadow: inset 0 0 0 1px #15796a; }
.custom-block { margin: 2px 0 18px; }
.custom-block label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.custom-block label b { font-size: 12px; }
.custom-block label span,.custom-block > small { color: var(--muted); font-size: 10px; }
.custom-block textarea { width: 100%; min-height: 58px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--ink); background: white; font: inherit; font-size: 12px; line-height: 1.5; }
.custom-block textarea:focus { border-color: #15796a; box-shadow: 0 0 0 3px rgba(21,121,106,.12); }
.custom-block > small { display: block; margin-top: 6px; }
.custom-block > small.error { color: #a94036; }
.protection-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 9px; }
.protection-card > .text-button { display: block; margin: 12px auto 0; }
.back-home { margin-bottom: 2px; }
.ai-explain { width: min(760px,100%); margin: 0 0 18px; padding: 16px 18px; border: 1px solid rgba(21,121,106,.18); border-radius: 15px; text-align: left; background: rgba(134,239,208,.12); }
.ai-explain-head { display: flex; justify-content: space-between; gap: 12px; color: #15796a; font-size: 12px; font-weight: 900; }
.ai-explain p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.ai-explain details { margin-top: 8px; color: #15796a; font-size: 12px; }
.ai-explain summary { cursor: pointer; font-weight: 800; }
.anti-loop { margin: 16px 0 0; color: #15796a; font-size: 12px; font-weight: 800; }
.honesty { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.focus-screen { place-items: center; text-align: center; color: white; background: var(--deep); }
.focus-ring { width: 220px; aspect-ratio: 1; display: grid; place-content: center; margin-bottom: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 0 0 24px rgba(134,239,208,.06); }
.focus-ring strong { font-size: 52px; letter-spacing: -.05em; }
.focus-ring span { color: var(--mint); font-size: 13px; }
.focus-screen .kicker { color: var(--mint); }
.focus-screen h1 { font-size: clamp(46px,6vw,76px); }
.focus-screen p:not(.kicker) { color: rgba(255,255,255,.68); font-size: 19px; }
.dark { margin-top: 20px; color: white; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.focus-actions { display: flex; gap: 10px; margin-top: 20px; }
.focus-actions .dark { margin-top: 0; }
.focus-data-note { max-width: 580px; font-size: 12px !important; }
.active-protection { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border: 1px solid rgba(134,239,208,.25); border-radius: 12px; background: rgba(134,239,208,.08); }
.active-protection span { color: var(--mint); font-size: 11px; font-weight: 900; }
.active-protection strong { color: white; font-size: 12px; }
.unlock-link { margin-top: 14px; color: rgba(255,255,255,.62); }
.data-dialog { width: min(760px,calc(100% - 32px)); padding: 30px; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.data-dialog::backdrop { background: rgba(6,27,25,.62); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 16px; right: 18px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: rgba(11,41,38,.06); font-size: 24px; }
.data-dialog h2 { font-size: 36px; }
.dialog-intro { color: var(--muted); line-height: 1.6; }
.data-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 22px 0; }
.data-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.data-grid span,.data-grid small { display: block; color: var(--muted); font-size: 11px; }
.data-grid strong { display: block; margin: 6px 0; font-size: 27px; }
.data-method { padding: 16px; border-radius: 14px; color: white; background: var(--deep); }
.data-method p { margin: 7px 0 0; color: rgba(255,255,255,.68); font-size: 12px; line-height: 1.65; }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.danger { color: #a94036; }
.install-steps { margin: 20px 0; padding-left: 22px; color: var(--muted); line-height: 1.9; }
.install-steps code { padding: 2px 5px; border-radius: 5px; background: rgba(11,41,38,.07); }
.download-link { display: grid; place-items: center; min-height: 52px; text-decoration: none; }
.onboarding-dialog { width: min(900px,calc(100% - 32px)); }
.onboarding-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 22px 0; }
.onboarding-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.onboarding-grid article > span { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%; color: var(--deep); background: var(--lime); font-size: 13px; font-weight: 900; }
.onboarding-grid strong { display: block; font-size: 15px; }
.onboarding-grid p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.focuspet-setup { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 18px; border-radius: 16px; color: white; background: var(--deep); }
.focuspet-setup strong { color: var(--mint); }
.focuspet-setup p { max-width: 620px; margin: 7px 0 0; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.65; }
.focuspet-setup .download-link { min-width: 190px; }
.onboarding-actions { justify-content: flex-end; gap: 18px; }
.unlock-dialog label { display: block; margin: 18px 0 8px; font-size: 12px; font-weight: 800; }
.unlock-dialog select { width: 100%; height: 50px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; }
.unlock-dialog #confirm-unlock { width: 100%; margin-top: 14px; }
footer { height: 46px; padding: 0 clamp(20px,5vw,72px); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 9; transform: translate(-50%,20px); opacity: 0; padding: 12px 18px; border-radius: 12px; color: white; background: var(--deep); transition: .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 760px) {
  .topbar { height: 62px; grid-template-columns: 1fr auto; }
  .top-progress { display: none; }
  .sound-button { font-size: 11px; }
  .screen { min-height: calc(100vh - 104px); padding: 28px 20px; }
  #screen-start { grid-template-columns: 1fr; }
  .start-copy h1 { font-size: 58px; }
  .science-note { margin-top: 20px; }
  .stage-head { align-items: center; }
  .stage-time strong, .score-box strong { font-size: 34px; }
  .breath-orb { width: 230px; }
  .anchor-grid { grid-template-columns: 1fr; padding-top: 26px; }
  .result-metrics { grid-template-columns: 1fr; }
  .result-actions { grid-template-columns: 1fr; }
  .protection-head { flex-direction: column; }
  .block-options { grid-template-columns: 1fr; }
  .protection-actions { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr 1fr; }
  .onboarding-grid { grid-template-columns: 1fr; }
  .focuspet-setup { grid-template-columns: 1fr; }
  .focuspet-setup .download-link { min-width: 0; }
  .focus-actions { width: 100%; flex-direction: column; }
  footer { justify-content: center; }
  footer span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
