:root {
  --ink: #5a4232;
  --muted: #a1876b;
  --cream: #f7ead6;
  --paper: #fffdf6;
  --orange: #d94a3d;
  --orange-dark: #b8503e;
  --mint: #bfe0c8;
  --mint-dark: #3f7050;
  --yellow: #ffb64d;
  --line: rgba(90, 66, 50, 0.12);
  --shadow: inset 0 2px 3px rgba(255,255,255,.88), inset 0 -5px 9px rgba(160,120,80,.13), 0 12px 30px rgba(140,100,60,.14);
  --display-font: "ZCOOL QingKe HuangYou", ui-rounded, "SF Pro Rounded", "PingFang SC", sans-serif;
  --body-font: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  --cream-gel: linear-gradient(170deg, #fffdf6, #f2e4cc);
  --red-gel: linear-gradient(165deg, #ff8a70, #d94a3d);
  --yellow-gel: radial-gradient(circle at 33% 26%, #fff8dc, #ffe08a 42%, #ffb64d 85%, #f09638);
  --mint-gel: linear-gradient(165deg, #dff0e2, #bfe0c8);
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--cream);   overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 14%, rgba(243, 198, 87, 0.18), transparent 25rem),
    radial-gradient(circle at 92% 86%, rgba(117, 185, 159, 0.2), transparent 27rem),
    var(--cream);
}

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

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .42;
  pointer-events: none;
}
.ambient-one { left: -13rem; top: 22%; border: 1px solid var(--orange); }
.ambient-two { right: -10rem; bottom: 4%; border: 1px solid var(--mint-dark); }

.app-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: calc(100vh - 70px); }

.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 700 14px/1 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: .18em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px 12px 16px 16px; color: var(--paper); background: var(--orange); font-size: 19px; letter-spacing: 0; transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--ink); }
.mode-pill { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.45); color: var(--muted); font-size: 12px; font-weight: 600; }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: #58a486; box-shadow: 0 0 0 4px rgba(88,164,134,.13); }
.sim-mode .mode-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(239,112,76,.13); }

.setup-view { min-height: calc(100vh - 160px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; gap: clamp(40px, 8vw, 110px); padding: 70px 0 76px; }
.eyebrow { margin: 0 0 17px; color: var(--orange-dark); font-size: 11px; font-weight: 700; letter-spacing: .22em; }
.setup-copy h1, .session-head h1 { margin: 0; font: 700 clamp(43px, 5.25vw, 69px)/1.07 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: -.035em; }
.setup-copy h1 em { color: var(--orange); font-style: normal; }
.lede { width: min(560px, 100%); margin: 25px 0 39px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.challenge-form { width: min(570px, 100%); }
fieldset { margin: 0 0 25px; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 12px; color: var(--ink); font-size: 13px; font-weight: 700; }
legend span { margin-right: 7px; color: var(--orange); font-family: ui-rounded, "SF Pro Rounded", sans-serif; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { position: relative; display: flex; align-items: center; min-height: 92px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,248,.64); cursor: pointer; transition: border-color .2s, transform .2s, background .2s, box-shadow .2s; }
.choice-card:hover { transform: translateY(-2px); border-color: rgba(239,112,76,.34); }
.choice-card:has(input:focus-visible) { outline: 3px solid rgba(239,112,76,.25); outline-offset: 2px; }
.choice-card:has(input:checked) { border-color: var(--orange); background: var(--paper); box-shadow: 0 8px 30px rgba(217,84,53,.1); }
.choice-card input, .target-choices input { position: absolute; opacity: 0; pointer-events: none; }
.choice-icon { position: relative; flex: 0 0 auto; width: 52px; height: 52px; margin-right: 14px; border-radius: 17px; background: var(--mint); }
.choice-icon > img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(120,80,50,.24)); }
.choice-icon:has(> img)::before,
.choice-icon > img ~ i,
.choice-icon > img ~ b { visibility: hidden; }
.choice-icon::before { content: ""; position: absolute; left: 21px; top: 8px; width: 10px; height: 10px; border: 3px solid var(--ink); border-radius: 50%; }
.choice-icon i, .choice-icon b { position: absolute; display: block; background: var(--ink); border-radius: 4px; transform-origin: center; }
.squat-icon i { left: 23px; top: 20px; width: 5px; height: 17px; transform: rotate(-17deg); }
.squat-icon b { left: 14px; top: 34px; width: 25px; height: 5px; transform: rotate(5deg); box-shadow: 7px 8px 0 -1px var(--ink); }
.jump-icon { background: #f7dda0; }
.jump-icon i { left: 23px; top: 19px; width: 5px; height: 22px; box-shadow: -7px 18px 0 -1px var(--ink), 7px 18px 0 -1px var(--ink); }
.jump-icon b { left: 12px; top: 19px; width: 29px; height: 5px; transform: rotate(-48deg); }
.jump-icon b::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; transform: rotate(96deg); }
.punch-icon { background: #f5c8aa; }
.punch-icon i { left: 22px; top: 19px; width: 5px; height: 21px; transform: rotate(18deg); }
.punch-icon b { left: 12px; top: 23px; width: 31px; height: 5px; transform: rotate(-15deg); }
.highknees-icon { background: #bfe2cf; }
.highknees-icon i { left: 23px; top: 19px; width: 5px; height: 23px; transform: rotate(-9deg); }
.highknees-icon b { left: 18px; top: 32px; width: 25px; height: 5px; transform: rotate(-38deg); box-shadow: -8px 8px 0 -1px var(--ink); }
.choice-text { display: flex; flex-direction: column; gap: 5px; }
.choice-text strong { font-size: 16px; }
.choice-text small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.input-choice-card { min-height: 84px; }
.input-choice-card .choice-text small { letter-spacing: 0; line-height: 1.35; }
.input-choice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; margin-right: 13px; border-radius: 14px; color: var(--mint-dark); background: var(--mint); font-size: 25px; font-weight: 700; }
.camera-choice-icon { color: #8c6720; background: #f7dda0; font-size: 18px; }
.input-choice-card.motion-unsupported { cursor: not-allowed; opacity: .48; transform: none; }
.motion-only-hint { margin: 9px 2px 0; color: var(--orange-dark); font-size: 12px; line-height: 1.5; }
.choice-check { position: absolute; right: 14px; top: 13px; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 50%; color: transparent; font-size: 11px; }
.choice-card:has(input:checked) .choice-check { color: #fff; border-color: var(--orange); background: var(--orange); }
.target-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.target-choices label { position: relative; cursor: pointer; }
.target-choices label span { display: flex; justify-content: center; align-items: baseline; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,248,.64); color: var(--muted); font-size: 13px; transition: .2s; }
.target-choices strong { color: var(--ink); font: 700 21px/1 ui-rounded, "SF Pro Rounded", sans-serif; }
.target-choices label:has(input:checked) span { border-color: var(--ink); color: var(--ink); background: var(--paper); box-shadow: inset 0 -3px 0 var(--mint); }
.target-choices label:has(input:focus-visible) span { outline: 3px solid rgba(239,112,76,.25); outline-offset: 2px; }
.start-button { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 3px; padding: 17px 18px 17px 24px; border: 0; border-radius: 17px; color: white; background: var(--ink); font-weight: 700; cursor: pointer; box-shadow: 0 10px 0 rgba(23,49,46,.1); transition: transform .2s, background .2s; }
.start-button:hover { transform: translateY(-2px); background: #234440; }
.start-button:active { transform: translateY(2px); }
.mode-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-actions .start-button { margin-top: 0; }
.create-duo-button { display: flex; min-height: 58px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 11px 18px; border: 1px solid var(--orange); border-radius: 17px; color: var(--orange-dark); background: var(--paper); font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 10px 0 rgba(239,112,76,.1); transition: transform .2s, background .2s; }
.create-duo-button:hover { transform: translateY(-2px); background: #fff8ee; }
.create-duo-button:active { transform: translateY(2px); }
.create-duo-button small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 700; }
.button-arrow { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: var(--ink); background: var(--mint); font-size: 17px; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: var(--muted); font-size: 11px; }
.privacy-note span { color: var(--mint-dark); font-size: 9px; }

.hero-egg { position: relative; min-height: 500px; display: grid; place-items: center; }
.hero-egg::before { content: ""; position: absolute; width: 350px; height: 350px; border-radius: 50%; background: var(--mint); opacity: .57; }
.egg-mini { position: relative; z-index: 2; width: 224px; height: 292px; overflow: hidden; border: 3px solid var(--ink); border-radius: 50% 50% 47% 47% / 61% 61% 39% 39%; background: linear-gradient(120deg, #fffdf2 15%, #f8e7bd 72%); box-shadow: inset -22px -15px 0 rgba(239,112,76,.1), 12px 19px 0 rgba(23,49,46,.1); transform: rotate(4deg); animation: egg-float 4.5s ease-in-out infinite; }
.egg-mini-shine { position: absolute; left: 44px; top: 55px; width: 26px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.68); transform: rotate(22deg); }
.egg-mini-spot { position: absolute; border-radius: 50%; background: rgba(239,112,76,.22); }
.spot-a { width: 30px; height: 22px; right: 43px; top: 65px; transform: rotate(17deg); }
.spot-b { width: 42px; height: 29px; left: 53px; bottom: 66px; transform: rotate(-14deg); }
.spot-c { width: 19px; height: 14px; right: 49px; bottom: 52px; }
.hero-egg p { position: absolute; z-index: 3; right: 5%; bottom: 8%; margin: 0; padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.85); color: var(--muted); font-size: 10px; line-height: 1.4; text-align: center; box-shadow: 0 10px 30px rgba(23,49,46,.08); transform: rotate(4deg); }
.hero-egg p strong { color: var(--orange); font: 700 20px ui-rounded, "SF Pro Rounded", sans-serif; }
.orbit { position: absolute; z-index: 1; width: 385px; height: 190px; border: 1px dashed rgba(23,49,46,.22); border-radius: 50%; transform: rotate(-16deg); }
.orbit-two { width: 410px; height: 240px; transform: rotate(56deg); }
.spark { position: absolute; z-index: 3; color: var(--orange); font-size: 27px; }
.spark-one { left: 9%; top: 26%; animation: blink 2s ease-in-out infinite; }
.spark-two { right: 9%; top: 18%; color: var(--yellow); font-size: 19px; animation: blink 2s .8s ease-in-out infinite; }

.session-view { padding: 41px 0 70px; }
.session-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 28px; }
.session-head > div:nth-child(2) { text-align: center; }
.session-head .eyebrow { margin-bottom: 7px; }
.session-head h1 { font-size: clamp(32px, 4vw, 48px); }
.ghost-button { justify-self: start; padding: 10px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.ghost-button span { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 5px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); }
.session-status { justify-self: end; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.session-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(243,198,87,.17); }
.session-status.ready span { background: #58a486; box-shadow: 0 0 0 4px rgba(88,164,134,.16); }
.session-status.done span { background: var(--orange); box-shadow: 0 0 0 4px rgba(239,112,76,.16); }
.mute-button { display: grid; place-items: center; width: 31px; height: 31px; margin-right: 3px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,253,248,.72); font-size: 15px; line-height: 1; cursor: pointer; }
.mute-button:focus-visible { outline: 3px solid rgba(239,112,76,.25); outline-offset: 2px; }
.session-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 18px; }
.camera-card, .hatch-card { border: 1px solid var(--line); border-radius: 28px; background: rgba(255,253,248,.8); box-shadow: var(--shadow); }
.camera-card { padding: 13px; }
.camera-viewport { position: relative; overflow: hidden; aspect-ratio: 4/3; border-radius: 20px; color: white; background: #182724; }
#cameraVideo, #poseCanvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#poseCanvas { z-index: 2; }
.camera-loading, .camera-error, .sim-visual, .motion-visual { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 58px; text-align: center; }
.camera-loading { background: radial-gradient(circle at 50% 40%, #2a4841, #162622 70%); }
.loader { width: 45px; height: 45px; margin-bottom: 19px; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--mint); border-radius: 50%; animation: spin 1s linear infinite; }
.camera-loading strong, .camera-error strong { font: 700 18px ui-rounded, "SF Pro Rounded", sans-serif; }
.camera-loading small { margin-top: 8px; color: rgba(255,255,255,.58); font-size: 11px; }
.camera-error { padding: 30px; background: #20352f; }
.camera-error > span { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 16px; border: 1px solid var(--orange); border-radius: 50%; color: var(--orange); font: 700 21px ui-rounded, "SF Pro Rounded", sans-serif; }
.camera-error p { max-width: 340px; color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.6; }
.camera-error button { margin-top: 8px; padding: 10px 22px; border: 0; border-radius: 99px; color: var(--ink); background: var(--mint); font-size: 12px; font-weight: 700; cursor: pointer; }
.camera-label { position: absolute; z-index: 5; left: 15px; top: 15px; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 99px; background: rgba(10,23,20,.46); backdrop-filter: blur(7px); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.camera-label i { width: 6px; height: 6px; border-radius: 50%; background: #70d5aa; box-shadow: 0 0 0 3px rgba(112,213,170,.15); }
.pose-debug { position: absolute; z-index: 5; right: 15px; top: 15px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(10,23,20,.46); backdrop-filter: blur(7px); color: rgba(255,255,255,.78); font: 600 10px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .03em; }
.guide-copy { position: absolute; z-index: 5; bottom: 14px; left: 50%; width: max-content; max-width: calc(100% - 30px); padding: 9px 14px; border-radius: 99px; background: rgba(10,23,20,.62); backdrop-filter: blur(7px); color: rgba(255,255,255,.86); font-size: 11px; transform: translateX(-50%); }
.sim-visual { overflow: hidden; background: radial-gradient(circle, #34594f 0, #1b312b 65%, #14231f 100%); }
.sim-rings, .sim-rings i { position: absolute; inset: 50% auto auto 50%; width: 290px; height: 290px; border: 1px solid rgba(201,230,214,.12); border-radius: 50%; transform: translate(-50%,-50%); }
.sim-rings i:nth-child(1) { width: 210px; height: 210px; }
.sim-rings i:nth-child(2) { width: 370px; height: 370px; }
.sim-rings i:nth-child(3) { width: 470px; height: 470px; }
.sim-key { position: relative; z-index: 2; display: grid; place-items: center; width: 112px; height: 112px; border: 1px solid rgba(255,255,255,.24); border-radius: 34px; background: rgba(255,255,255,.08); box-shadow: inset 0 -8px 0 rgba(0,0,0,.14), 0 20px 50px rgba(0,0,0,.2); animation: key-pulse 2s infinite; }
.sim-key span { display: grid; place-items: center; width: 72px; height: 46px; border: 1px solid rgba(255,255,255,.28); border-radius: 13px; color: var(--mint); font: 700 12px ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: .13em; }
.sim-visual p { z-index: 2; max-width: 88%; margin: 24px 0 5px; font: 700 19px ui-rounded, "SF Pro Rounded", sans-serif; line-height: 1.25; overflow-wrap: anywhere; }
.sim-visual small { z-index: 2; max-width: 88%; color: rgba(255,255,255,.56); line-height: 1.35; }
.motion-visual { --motion-level: 0; overflow: hidden; background: radial-gradient(circle at 50% 45%, #315a50 0, #1b312b 62%, #14231f 100%); }
.motion-rings, .motion-rings i { position: absolute; left: 50%; top: 46%; width: 270px; height: 270px; border: 1px solid rgba(201,230,214,.13); border-radius: 50%; transform: translate(-50%,-50%) scale(calc(1 + var(--motion-level) * .035)); transition: transform .09s linear; }
.motion-rings i:nth-child(1) { width: 190px; height: 190px; }
.motion-rings i:nth-child(2) { width: 355px; height: 355px; }
.motion-rings i:nth-child(3) { width: 455px; height: 455px; }
.motion-orb { position: relative; z-index: 2; display: grid; place-items: center; width: 124px; height: 124px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b6, var(--yellow) 25%, var(--orange) 74%); box-shadow: 0 0 calc(36px + var(--motion-level) * 4px) rgba(243,198,87,.38); transform: translateY(calc(var(--motion-level) * -5px)) scale(calc(1 + var(--motion-level) * .025)); transition: transform .09s linear, box-shadow .09s linear; }
.motion-orb i { width: 38px; height: 19px; border-radius: 50%; background: rgba(255,255,255,.36); transform: rotate(-28deg) translate(4px,-19px); }
.orb3d { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.motion-orb.has-orb3d { border-color: transparent; background: transparent; }
.motion-orb.has-orb3d > i { visibility: hidden; }
.motion-visual p { z-index: 2; margin: 23px 0 5px; font: 700 19px ui-rounded, "SF Pro Rounded", sans-serif; }
.motion-visual > small { z-index: 2; color: rgba(255,255,255,.57); }
.camera-error .motion-enable-button { position: relative; z-index: 6; }
.motion-debug { position: absolute; z-index: 5; right: 15px; top: 15px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(10,23,20,.46); color: rgba(255,255,255,.78); font: 600 10px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .03em; }
.motion-visual.motion-counted .motion-orb { animation: motion-count-pulse .42s ease-out, toy-squish 1.5s ease-in-out infinite; }
.counter-row { min-height: 108px; display: flex; align-items: center; gap: 20px; padding: 14px 15px 2px; }
.counter-block { min-width: 145px; }
.counter-block > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.counter-block > div { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.counter-block strong { font: 700 54px/1 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: -.04em; }
.counter-block b { color: var(--muted); font: 600 16px ui-rounded, "SF Pro Rounded", sans-serif; }
.input-feedback { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.input-feedback i { width: 8px; height: 8px; border: 2px solid var(--muted); border-radius: 50%; }
.input-feedback.active { color: var(--orange-dark); }
.input-feedback.active i { border-color: var(--orange); background: var(--orange); box-shadow: 0 0 0 5px rgba(239,112,76,.12); }
.sim-add-button { margin-left: auto; padding: 13px 17px; border: 0; border-radius: 14px; color: white; background: var(--orange); font-size: 11px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 0 #c95033; transition: transform .12s, box-shadow .12s; }
.sim-add-button span { font: 700 18px ui-rounded, "SF Pro Rounded", sans-serif; vertical-align: -1px; margin-right: 3px; }
.sim-add-button:active { transform: translateY(4px); box-shadow: 0 2px 0 #c95033; }
.sim-add-button:disabled { filter: grayscale(.5); cursor: default; opacity: .55; }

.hatch-card { position: relative; overflow: hidden; min-height: 620px; padding: 25px; background: linear-gradient(160deg, rgba(255,253,248,.94), rgba(242,236,220,.92)); }
.hatch-meta { position: relative; z-index: 10; display: flex; justify-content: space-between; align-items: flex-start; }
.hatch-meta > div { display: flex; flex-direction: column; }
.hatch-meta span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.hatch-meta strong { margin-top: 2px; color: var(--orange); font: 700 36px ui-rounded, "SF Pro Rounded", sans-serif; }
.hatch-meta p { margin: 5px 0 0; padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; }
.hatch-scene { position: relative; height: 395px; display: grid; place-items: center; }
.glow-disc { position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(201,230,214,.56); transition: transform .5s, background .5s; }
.hatch-scene[data-stage="2"] .glow-disc { transform: scale(1.04); background: rgba(243,198,87,.22); }
.hatch-scene[data-stage="3"] .glow-disc { transform: scale(1.09); background: rgba(239,112,76,.16); }
.hatch-scene[data-stage="4"] .glow-disc { animation: hatch-glow 1.2s ease-out both; background: rgba(243,198,87,.3); }
.egg { position: absolute; z-index: 3; left: 50%; top: 52%; width: 184px; height: 235px; overflow: hidden; transform: translate(-50%,-50%); transition: transform .55s cubic-bezier(.22,.82,.38,1), opacity .4s; }
.egg-surface { position: absolute; left: 0; top: 0; width: 184px; height: 235px; overflow: hidden; border: 3px solid var(--ink); border-radius: 50% 50% 47% 47% / 61% 61% 39% 39%; background: linear-gradient(125deg, #fffdf2 10%, #f8e4b4 75%); box-shadow: inset -18px -12px 0 rgba(239,112,76,.11), 8px 12px 0 rgba(23,49,46,.09); }
.egg-right { opacity: 0; pointer-events: none; }
.egg-shine { position: absolute; left: 35px; top: 42px; width: 21px; height: 61px; border-radius: 50%; background: rgba(255,255,255,.67); transform: rotate(22deg); }
.egg-spot { position: absolute; border-radius: 50%; background: rgba(239,112,76,.21); }
.egg-spot-a { right: 36px; top: 55px; width: 27px; height: 19px; transform: rotate(14deg); }
.egg-spot-b { left: 42px; bottom: 54px; width: 35px; height: 25px; transform: rotate(-13deg); }
.egg-spot-c { right: 38px; bottom: 42px; width: 16px; height: 12px; }
.cracks { position: absolute; z-index: 4; left: 50%; top: 52%; width: 184px; height: 235px; overflow: visible; pointer-events: none; transform: translate(-50%,-50%); }
.cracks path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 180; stroke-dashoffset: 180; }
.crack-stage { opacity: 0; transition: opacity .25s; }
.hatch-scene[data-stage="1"] .crack-one, .hatch-scene[data-stage="2"] .crack-one, .hatch-scene[data-stage="3"] .crack-one { opacity: 1; }
.hatch-scene[data-stage="2"] .crack-two, .hatch-scene[data-stage="3"] .crack-two { opacity: 1; }
.hatch-scene[data-stage="3"] .crack-three { opacity: 1; }
.hatch-scene[data-stage="1"] .crack-one path, .hatch-scene[data-stage="2"] .crack-stage path, .hatch-scene[data-stage="3"] .crack-stage path { animation: draw-crack .45s ease-out forwards; }
.hatch-scene[data-stage="2"] .egg, .hatch-scene[data-stage="3"] .egg { animation: egg-wobble .65s ease-in-out; }
.pet-image { position: absolute; z-index: 2; left: 50%; top: 49%; width: min(78%, 290px); max-height: 270px; object-fit: contain; opacity: 0; filter: drop-shadow(7px 10px 0 rgba(23,49,46,.1)); transform: translate(-50%,-28%) scale(.35); transform-origin: 50% 85%; }
.hatch-scene[data-stage="4"] .pet-image { z-index: 6; animation: pet-arrive 1s .18s cubic-bezier(.17,.89,.32,1.28) both, pet-bob 2.6s 1.2s ease-in-out infinite; }
.hatch-scene[data-stage="4"] .egg-left { clip-path: polygon(0 0, 100% 0, 100% 43%, 76% 51%, 58% 45%, 39% 55%, 17% 46%, 0 53%); transform: translate(-103%,-36%) rotate(-25deg); }
.hatch-scene[data-stage="4"] .egg-right { opacity: 1; clip-path: polygon(0 43%, 17% 46%, 39% 55%, 58% 45%, 76% 51%, 100% 43%, 100% 100%, 0 100%); transform: translate(10%,1%) rotate(19deg); }
.hatch-scene[data-stage="4"] .cracks { opacity: 0; }
.scene-spark { position: absolute; z-index: 7; color: var(--orange); opacity: 0; font-size: 20px; }
.scene-spark-a { left: 18%; top: 30%; }
.scene-spark-b { right: 17%; top: 18%; color: var(--yellow); }
.scene-spark-c { right: 20%; bottom: 22%; color: var(--mint-dark); font-size: 32px; }
.hatch-scene[data-stage="4"] .scene-spark { animation: sparkle-pop .65s .5s ease-out both; }
.hatch-scene[data-stage="4"] .scene-spark-b { animation-delay: .7s; }
.hatch-scene[data-stage="4"] .scene-spark-c { animation-delay: .85s; }
.egg3d {
  --egg3d-size: 350px;
  display: none;
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 52%;
  width: min(90%, var(--egg3d-size));
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(120,80,50,.16));
  pointer-events: none;
  transform: translate(-50%,-50%);
  transform-origin: center;
}
.hatch-scene[data-stage="0"] > .egg3d[data-egg-stage="0"],
.duo-egg[data-stage="0"] > .egg3d[data-egg-stage="0"] { display: block; }
.hatch-scene[data-stage="1"] > .egg3d[data-egg-stage="1"],
.duo-egg[data-stage="1"] > .egg3d[data-egg-stage="1"] { display: block; animation: egg3d-pulse-1 .38s ease-out; }
.hatch-scene[data-stage="2"] > .egg3d[data-egg-stage="2"],
.duo-egg[data-stage="2"] > .egg3d[data-egg-stage="2"] { display: block; animation: egg3d-pulse-2 .38s ease-out; }
.hatch-scene[data-stage="3"] > .egg3d[data-egg-stage="3"],
.duo-egg[data-stage="3"] > .egg3d[data-egg-stage="3"] { display: block; animation: egg3d-pulse-3 .38s ease-out; }
.hatch-scene[data-stage="4"] > .egg3d[data-egg-stage="4"],
.duo-egg[data-stage="4"] > .egg3d[data-egg-stage="4"] { display: block; animation: egg3d-pulse-4 .42s ease-out; }
.hatch-scene > .egg3d ~ .egg,
.hatch-scene > .egg3d ~ .cracks,
.duo-egg > .egg3d ~ .duo-shell,
.duo-egg > .egg3d ~ .duo-cracks { visibility: hidden; }
.confetti { position: absolute; z-index: 9; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: 35%; width: 7px; height: 14px; border-radius: 3px; animation: confetti-fall 1.8s var(--delay) ease-out both; transform: rotate(var(--rotate)); }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(23,49,46,.09); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--yellow)); transition: width .35s cubic-bezier(.2,.8,.2,1); }
.encouragement { min-height: 34px; margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.solo-set-tracker { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 11px 13px; border: 1px solid rgba(23,49,46,.1); border-radius: 18px; background: rgba(255,253,248,.68); }
.solo-set-tracker[hidden] { display: none; }
.solo-set-icons { display: flex; flex: 0 0 auto; gap: 7px; }
.solo-set-icons > span { position: relative; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: rgba(23,49,46,.07); }
.solo-set-icons img { width: 32px; height: 32px; object-fit: contain; filter: grayscale(1); opacity: .28; transition: filter .2s, opacity .2s, transform .2s; }
.solo-set-icons .completed img { filter: none; opacity: 1; transform: scale(1.04); }
.solo-set-icons .completed::after { position: absolute; right: -3px; top: -4px; display: grid; width: 16px; height: 16px; place-items: center; border: 2px solid #fffdf8; border-radius: 50%; color: white; background: var(--mint-dark); content: "\2713"; font-size: 9px; font-weight: 900; line-height: 1; }
.solo-set-tracker p { min-width: 0; margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.45; }
.pet-name { position: relative; z-index: 11; margin: -24px 0 12px; color: var(--orange-dark); font: 800 25px/1.2 ui-rounded, "SF Pro Rounded", sans-serif; text-align: center; }
.again-button { position: absolute; z-index: 12; left: 50%; bottom: 19px; padding: 11px 18px; border: 0; border-radius: 99px; color: white; background: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; transform: translateX(-50%); }
.again-button span { margin-left: 5px; color: var(--mint); }
.count-pop { animation: count-pop .3s ease-out; }

footer { width: min(1180px, calc(100% - 48px)); height: 70px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; letter-spacing: .15em; }
footer span { color: var(--ink); font: 700 10px ui-rounded, "SF Pro Rounded", sans-serif; }

@keyframes egg-float { 0%,100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(1deg) translateY(-13px); } }
@keyframes blink { 0%,100% { opacity: .4; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(18deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes key-pulse { 50% { transform: translateY(5px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.14), 0 12px 34px rgba(0,0,0,.2); } }
@keyframes draw-crack { to { stroke-dashoffset: 0; } }
@keyframes egg-wobble { 0%,100% { transform: translate(-50%,-50%) rotate(0); } 25% { transform: translate(-50%,-50%) rotate(-2.5deg); } 75% { transform: translate(-50%,-50%) rotate(2.5deg); } }
@keyframes hatch-glow { 0% { transform: scale(.6); opacity: 1; } 60% { transform: scale(1.45); opacity: .7; } 100% { transform: scale(1.15); opacity: 1; } }
@keyframes pet-arrive { from { opacity: 0; transform: translate(-50%,-22%) scale(.28); } to { opacity: 1; transform: translate(-50%,-53%) scale(1); } }
@keyframes pet-bob { 0%,100% { transform: translate(-50%,-53%) scale(1) rotate(-1deg); } 50% { transform: translate(-50%,-57%) scale(1) rotate(1deg); } }
@keyframes sparkle-pop { 0% { opacity: 0; transform: scale(.2) rotate(0); } 60% { opacity: 1; transform: scale(1.35) rotate(45deg); } 100% { opacity: .85; transform: scale(1) rotate(80deg); } }
@keyframes confetti-fall { 0% { opacity: 0; transform: translate(0,-20px) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--drift), 260px) rotate(520deg); } }
@keyframes count-pop { 0% { transform: scale(1); color: var(--ink); } 45% { transform: scale(1.25); color: var(--orange); } 100% { transform: scale(1); color: var(--ink); } }
@keyframes motion-count-pulse { 0% { filter: brightness(1); } 45% { filter: brightness(1.35); box-shadow: 0 0 85px rgba(243,198,87,.9); } 100% { filter: brightness(1); } }
@keyframes egg3d-pulse-1 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 48% { transform: translate(-50%,-50%) scale(1.045); } }
@keyframes egg3d-pulse-2 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 48% { transform: translate(-50%,-50%) scale(1.045); } }
@keyframes egg3d-pulse-3 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 48% { transform: translate(-50%,-50%) scale(1.045); } }
@keyframes egg3d-pulse-4 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 48% { transform: translate(-50%,-50%) scale(1.055); } }

@media (max-width: 900px) {
  .setup-view { grid-template-columns: 1fr; padding-top: 50px; }
  .hero-egg { order: -1; min-height: 360px; }
  .hero-egg::before { width: 280px; height: 280px; }
  .egg-mini { width: 175px; height: 228px; }
  .orbit { width: 310px; }
  .orbit-two { width: 330px; }
  .session-grid { grid-template-columns: 1fr; }
  .hatch-card { min-height: 595px; }
}

@media (max-width: 620px) {
  .app-shell, footer { width: min(100% - 28px, 1180px); }
  .topbar { height: 72px; }
  .brand { font-size: 12px; }
  .mode-pill { padding: 8px 10px; }
  .setup-view { padding: 32px 0 50px; gap: 28px; }
  .hero-egg { min-height: 290px; }
  .hero-egg::before { width: 230px; height: 230px; }
  .egg-mini { width: 142px; height: 187px; }
  .orbit { width: 260px; height: 130px; }
  .orbit-two { width: 275px; height: 180px; }
  .hero-egg p { right: 0; bottom: 2%; }
  .setup-copy h1 { font-size: 40px; }
  .lede { margin: 19px 0 29px; font-size: 15px; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-card { min-height: 79px; padding: 13px 15px; }
  .session-view { padding-top: 26px; }
  .session-head { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .session-head > div:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .session-status { grid-column: 2; }
  .camera-card, .hatch-card { border-radius: 23px; }
  .counter-row { flex-wrap: wrap; gap: 10px; }
  .counter-block { min-width: 120px; }
  .counter-block strong { font-size: 47px; }
  .sim-add-button { flex: 1 0 100%; margin: 0 0 9px; }
  .hatch-card { padding: 20px; }
  .hatch-scene { height: 360px; }
  .solo-set-tracker { gap: 11px; padding-inline: 10px; }
  .solo-set-icons { gap: 5px; }
  .solo-set-icons > span { width: 34px; height: 34px; }
  footer p { display: none; }
}

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

/* Phase 2 · 双人房间 */
.open-room-link { color: var(--orange-dark); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.open-room-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.room-view { min-height: calc(100vh - 158px); padding: clamp(42px, 7vw, 86px) 0 72px; }
.room-join-card { width: min(720px, 100%); margin: 4vh auto 0; padding: clamp(28px, 5vw, 58px); border: 1px solid var(--line); border-radius: 34px; background: rgba(255,253,248,.8); box-shadow: var(--shadow); text-align: center; }
.room-egg-entry { display: flex; min-height: min(680px, calc(100vh - 190px)); flex-direction: column; align-items: center; justify-content: center; }
.room-egg-entry .eyebrow { margin-bottom: 4px; }
.room-join-card h1 { margin: 0; font: 700 clamp(40px, 5.3vw, 68px)/1.08 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: -.04em; }
.room-join-card h1 em { color: var(--orange); font-style: normal; }
.room-lede { width: min(580px, 100%); margin: 24px auto; color: var(--muted); font-size: 16px; line-height: 1.75; }
.room-connection { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; margin: 4px auto 22px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.54); font-size: 12px; font-weight: 700; }
.room-connection i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(243,198,87,.16); }
.room-connection.ready i { background: #58a486; box-shadow: 0 0 0 4px rgba(88,164,134,.14); }
.room-connection.error i { background: var(--orange); box-shadow: 0 0 0 4px rgba(239,112,76,.14); }
.room-start-button { width: min(420px, 100%); margin: 0 auto; }
.room-start-button b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.room-start-button:disabled { cursor: wait; opacity: .66; }
.room-partner-online { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.room-partner-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(110,127,121,.12); }
.room-partner-online.online { color: var(--mint-dark); }
.room-partner-online.online i { background: #58a486; box-shadow: 0 0 0 4px rgba(88,164,134,.14); }
.room-invite-panel { display: grid; min-width: min(320px, 100%); margin: 14px 0 0; place-items: center; }
.room-invite-panel > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.room-invite-panel > strong { margin: 5px 0 10px; color: var(--ink); font: 800 34px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.room-invite-button, .screen-share-button { padding: 10px 17px; border: 0; border-radius: 99px; color: white; background: var(--orange); font-size: 12px; font-weight: 800; cursor: pointer; }
.room-invite-secondary { margin-left: 8px; color: var(--orange-dark, #c4502e); background: transparent; border: 1px solid rgba(239,112,76,.45); }
.room-invite-link { margin: 6px auto 8px; max-width: 320px; font-size: 11px; color: var(--muted, #7a746a); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.room-invite-panel > small, .share-feedback { min-height: 16px; margin-top: 7px; color: var(--mint-dark); font-size: 10px; font-weight: 700; letter-spacing: 0; }
.room-egg-start { width: min(360px, 92vw); height: 350px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.room-egg-start:focus-visible { outline: 3px solid rgba(239,112,76,.35); outline-offset: -16px; border-radius: 50%; }
.room-egg-start:disabled { cursor: default; }
.room-entry-duo-egg { display: block; height: 350px; }
.duo-egg.room-entry-duo-egg .egg3d { --egg3d-size: 365px; }
.room-entry-duo-egg .duo-shell { width: 190px; height: 247px; }
.room-entry-duo-egg .duo-egg-glow { width: 290px; height: 290px; }
.room-egg-start:not(:disabled) .duo-shell-left { animation: room-entry-breathe 2.25s ease-in-out infinite; }
.room-egg-start:not(:disabled) .egg3d { animation: room-entry-breathe 2.25s ease-in-out infinite; }
.room-tap-hint { margin: -16px 0 15px; color: var(--orange-dark); font-size: 14px; font-weight: 800; letter-spacing: .04em; animation: tap-hint-breathe 2.25s ease-in-out infinite; }

.room-challenge { width: min(930px, 100%); margin: 0 auto; }
.room-challenge-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.room-challenge-head h1 { margin: 0; font: 700 clamp(34px, 5vw, 60px)/1.04 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: -.035em; }
.room-phone-grid { display: grid; grid-template-columns: minmax(280px, .84fr) minmax(360px, 1.16fr); gap: 18px; }
.room-action-card, .room-partner-card { position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,253,248,.86); box-shadow: var(--shadow); }
.room-action-card { display: flex; min-height: 560px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.room-motion-orb { --motion-level: 0; position: relative; display: grid; place-items: center; width: 174px; height: 174px; margin-bottom: 30px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff4b5, var(--yellow) 36%, var(--orange) 100%); box-shadow: 0 18px 55px rgba(239,112,76,.25); transform: translateY(calc(var(--motion-level) * -3px)); transition: transform .08s linear; }
.room-motion-orb::before, .room-motion-orb::after { content: ""; position: absolute; inset: -17px; border: 1px solid rgba(239,112,76,.25); border-radius: inherit; animation: room-orb-pulse 2.4s ease-out infinite; }
.room-motion-orb::after { inset: -35px; animation-delay: .8s; }
.room-motion-orb > i { position: absolute; left: 36px; top: 27px; width: 29px; height: 55px; border-radius: 50%; background: rgba(255,255,255,.45); transform: rotate(34deg); }
.room-motion-orb > span { position: relative; z-index: 3; color: var(--ink); font-size: 42px; font-style: normal; }
.room-motion-orb.has-orb3d { background: transparent; }
.room-motion-orb.has-orb3d > i { visibility: hidden; }
.room-motion-orb.sim > span { font-size: 30px; }
.room-motion-orb.sim > span::after { content: "SIM"; font: 800 17px ui-monospace, monospace; letter-spacing: .1em; }
.room-motion-orb.sim > span { font-size: 0; }
.room-motion-orb.counted { animation: motion-count-pulse .34s ease-out, room-toy-squish 1.5s ease-in-out infinite; }
.room-action-guide { min-height: 48px; margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.6; }
.room-motion-debug { margin: 0 0 10px; color: var(--muted); font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.room-own-count { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 5px 0 20px; }
.room-own-count strong { font: 800 72px/1 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: -.05em; }
.room-own-count span { color: var(--muted); font-size: 18px; font-weight: 700; }
.room-sim-add { width: 100%; margin: 0; }
.room-motion-enable { margin-top: 8px; }
.room-partner-card { min-height: 560px; }
.room-count-partner { display: flex; flex-direction: column; justify-content: center; }
.room-count-partner h2 { margin: 0 0 54px; font: 800 clamp(30px, 4.2vw, 48px)/1.12 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: -.035em; }
.duo-progress-row { margin-bottom: 17px; }
.duo-progress-row > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.duo-progress-row b { color: var(--ink); font-size: 12px; letter-spacing: 0; }
.progress-track.partner span { background: linear-gradient(90deg, var(--mint-dark), var(--mint)); }
.room-shared-copy { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 5px; padding-top: 16px; border-top: 1px solid var(--line); }
.room-shared-copy strong { color: var(--orange-dark); font-size: 13px; }
.room-shared-copy span { color: var(--muted); font-size: 11px; font-weight: 700; text-align: right; }

.duo-egg { position: relative; width: 100%; height: 330px; overflow: hidden; }
.duo-egg .egg3d { --egg3d-size: 292px; top: 50%; }
.duo-egg-glow { position: absolute; left: 50%; top: 50%; width: 230px; height: 230px; border-radius: 50%; background: rgba(201,230,214,.58); transform: translate(-50%,-50%); transition: transform .5s, background .5s; }
.duo-shell { position: absolute; z-index: 3; left: 50%; top: 50%; width: 150px; height: 195px; overflow: hidden; border: 3px solid var(--ink); border-radius: 50% 50% 47% 47% / 61% 61% 39% 39%; background: linear-gradient(125deg,#fffdf2 10%,#f8e4b4 75%); box-shadow: inset -15px -10px 0 rgba(239,112,76,.11), 7px 10px 0 rgba(23,49,46,.09); transform: translate(-50%,-50%); transition: transform .6s cubic-bezier(.22,.82,.38,1), opacity .3s; }
.duo-shell-right { opacity: 0; }
.duo-shell i { position: absolute; left: 28px; top: 34px; width: 17px; height: 49px; border-radius: 50%; background: rgba(255,255,255,.68); transform: rotate(22deg); }
.duo-shell b, .duo-shell em { position: absolute; border-radius: 50%; background: rgba(239,112,76,.21); }
.duo-shell b { right: 27px; top: 47px; width: 24px; height: 17px; transform: rotate(14deg); }
.duo-shell em { left: 33px; bottom: 43px; width: 29px; height: 21px; transform: rotate(-13deg); }
.duo-cracks { position: absolute; z-index: 4; left: 50%; top: 50%; width: 150px; height: 195px; overflow: visible; transform: translate(-50%,-50%); }
.duo-cracks path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.duo-egg[data-stage="1"] .duo-crack-one, .duo-egg[data-stage="2"] .duo-crack-one, .duo-egg[data-stage="3"] .duo-crack-one { opacity: 1; }
.duo-egg[data-stage="2"] .duo-crack-two, .duo-egg[data-stage="3"] .duo-crack-two { opacity: 1; }
.duo-egg[data-stage="3"] .duo-crack-three { opacity: 1; }
.duo-egg[data-stage="2"] .duo-shell, .duo-egg[data-stage="3"] .duo-shell { animation: duo-egg-wobble .7s ease-in-out; }
.duo-pet { position: absolute; z-index: 2; left: 50%; top: 50%; width: min(78%, 270px); max-height: 235px; object-fit: contain; opacity: 0; filter: drop-shadow(6px 8px 0 rgba(23,49,46,.1)); transform: translate(-50%,-20%) scale(.2); }
.duo-spark { position: absolute; z-index: 7; opacity: 0; color: var(--orange); font-size: 24px; }
.duo-spark-a { left: 19%; top: 25%; }
.duo-spark-b { right: 18%; top: 17%; color: var(--yellow); font-size: 31px; }
.duo-egg[data-stage="4"] .duo-egg-glow { background: rgba(243,198,87,.32); animation: hatch-glow 1.2s ease-out both; }
.duo-egg[data-stage="4"] .duo-pet { z-index: 6; animation: duo-pet-arrive 1s .18s cubic-bezier(.17,.89,.32,1.28) both, duo-pet-bob 2.7s 1.2s ease-in-out infinite; }
.duo-egg[data-stage="4"] .duo-shell-left { clip-path: polygon(0 0,100% 0,100% 43%,76% 51%,58% 45%,39% 55%,17% 46%,0 53%); transform: translate(-106%,-38%) rotate(-24deg); }
.duo-egg[data-stage="4"] .duo-shell-right { opacity: 1; clip-path: polygon(0 43%,17% 46%,39% 55%,58% 45%,76% 51%,100% 43%,100% 100%,0 100%); transform: translate(5%,3%) rotate(18deg); }
.duo-egg[data-stage="4"] .duo-cracks { opacity: 0; }
.duo-egg[data-stage="4"] .duo-spark { animation: sparkle-pop .65s .55s ease-out both; }
.duo-egg[data-stage="4"] .duo-spark-b { animation-delay: .72s; }

.room-result { width: min(720px, 100%); margin: 0 auto; }
.room-result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.room-result-head .eyebrow { margin: 0; }
.room-result-card { padding: 24px 30px 32px; border: 1px solid var(--line); border-radius: 30px; background: rgba(255,253,248,.86); box-shadow: var(--shadow); text-align: center; }
.room-result-card .room-duo-egg { height: 360px; }
.room-result-card .room-duo-egg .egg3d { --egg3d-size: 320px; }
.room-result-status { margin: 2px 0 24px; color: var(--ink); font: 800 21px/1.4 ui-rounded, "SF Pro Rounded", sans-serif; }
.room-signature-panel { max-width: 560px; margin: 22px auto 16px; padding: 18px; border-radius: 22px; background: var(--mint-gel); box-shadow: inset 0 2px 3px rgba(255,255,255,.75), inset 0 -4px 6px rgba(70,120,85,.2), 0 6px 12px rgba(90,140,105,.16); text-align: left; }
.room-signature-title { margin: 0 0 12px; color: var(--mint-dark); font: 400 19px/1.3 var(--display-font); text-align: center; }
.room-signature-fields { display: grid; gap: 10px; }
.room-signature-fields label { display: grid; gap: 5px; color: var(--mint-dark); font-size: 11px; font-weight: 800; }
.room-signature-fields input { width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.72); box-shadow: inset 0 2px 4px rgba(70,120,85,.12); font: 14px/1.4 var(--body-font); }
.room-signature-submit, .room-signature-saved { width: 100%; padding: 11px 14px; border: 0; border-radius: 13px; color: #fff; background: var(--red-gel); box-shadow: inset 0 2px 4px rgba(255,255,255,.4), inset 0 -4px 6px rgba(140,30,20,.35), 0 5px 10px rgba(217,74,61,.24); font: 400 15px/1.2 var(--display-font); cursor: pointer; }
.room-signature-submit:disabled { cursor: wait; opacity: .65; }
.room-signature-saved { color: var(--mint-dark); background: rgba(255,255,255,.72); box-shadow: inset 0 2px 3px rgba(255,255,255,.8), 0 4px 9px rgba(70,120,85,.14); }
.room-signature-feedback { min-height: 18px; margin: 8px 0 0; color: var(--orange-dark); font-size: 12px; font-weight: 800; text-align: center; }
.room-result-partner { width: min(420px, 100%); margin: 0 auto 26px; text-align: left; }
.room-pet-name, .screen-pet-name { position: relative; z-index: 11; margin: -36px 0 12px; color: var(--orange-dark); font: 800 30px/1.2 ui-rounded, "SF Pro Rounded", sans-serif; }
.room-reveal-button { width: min(420px, 100%); padding: 17px 22px; border: 0; border-radius: 18px; color: white; background: var(--orange); font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 7px 0 #c95033; transition: transform .12s, box-shadow .12s; }
.room-reveal-button:active { transform: translateY(4px); box-shadow: 0 3px 0 #c95033; }

/* 大屏房间 */
.screen-shell { width: min(1440px, calc(100% - 64px)); min-height: 100vh; margin: 0 auto; }
.screen-topbar { height: 82px; }
.screen-controls { display: flex; align-items: center; gap: 12px; }
.screen-sound-button { padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.48); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.screen-view { padding: 35px 0 48px; }
.screen-room-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; }
.screen-room-head h1 { margin: 0; font: 700 clamp(39px, 4.2vw, 65px)/1.04 ui-rounded, "SF Pro Rounded", sans-serif; letter-spacing: -.04em; }
.screen-room-head > div:first-child > p:not(.eyebrow) { max-width: 690px; margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.screen-room-note { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.room-code-panel { display: flex; align-items: center; gap: 22px; padding: 14px 22px 14px 14px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.qr-code { display: grid; width: 148px; height: 148px; place-items: center; overflow: hidden; border-radius: 12px; background: white; }
.qr-code img, .qr-code canvas { display: block; max-width: 100%; height: auto; }
.room-code-panel span, .room-code-panel small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.room-code-panel strong { display: block; margin: 4px 0 8px; font: 800 46px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.room-code-panel small { letter-spacing: 0; }
.screen-share-button { display: block; margin-top: 12px; padding: 8px 13px; font-size: 10px; }
.room-code-panel .share-feedback { min-height: 13px; margin-top: 5px; color: var(--mint-dark); }
.qr-fallback { margin-top: 18px; padding: 13px 18px; border: 1px solid rgba(239,112,76,.3); border-radius: 14px; background: rgba(255,253,248,.72); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.qr-fallback strong { margin-right: 8px; color: var(--orange-dark); }
.screen-game-grid { display: grid; grid-template-columns: minmax(230px,.72fr) minmax(400px,1.2fr) minmax(230px,.72fr); align-items: stretch; gap: 18px; margin-top: 32px; }
.player-slot, .shared-egg-card { min-height: 480px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,253,248,.82); box-shadow: var(--shadow); }
.player-slot { position: relative; padding: 25px; text-align: center; }
.player-slot[data-connected="false"] { box-shadow: none; opacity: .72; }
.player-slot-head { display: flex; align-items: center; justify-content: space-between; color: var(--orange-dark); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.player-slot-head b { color: var(--muted); font-size: 10px; letter-spacing: 0; }
.player-avatar { position: relative; display: grid; width: 96px; height: 96px; margin: 48px auto 22px; place-items: center; border-radius: 31px 31px 42px 42px; background: linear-gradient(165deg, #fff6df, #ffe3ae); box-shadow: inset 0 2px 4px #fff, inset 0 -4px 7px rgba(190,130,50,.22), 6px 7px 0 var(--ink); transform: rotate(-3deg); }
.player-avatar img { width: 74px; height: 74px; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(120,70,40,.28)); }
.player-avatar .avatar-check { position: absolute; right: -8px; top: -8px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #fff; background: var(--mint-dark); font-size: 15px; box-shadow: 0 3px 7px rgba(40,80,60,.4); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .25s cubic-bezier(.34,1.56,.64,1); }
.player-slot.is-complete .player-avatar { background: linear-gradient(165deg, #ffe9b0, #ffd679); box-shadow: inset 0 2px 4px #fff, inset 0 -4px 7px rgba(190,130,50,.3), 0 0 0 4px rgba(224,179,76,.55), 6px 7px 0 var(--ink); }
.player-slot.is-complete .avatar-check { opacity: 1; transform: scale(1); }
.player-slot[data-connected="false"] .player-avatar img { filter: grayscale(1) opacity(.45); }
.player-avatar.second { transform: rotate(3deg); }
.player-slot h2 { margin: 0 0 8px; font: 800 23px ui-rounded, sans-serif; }
.player-slot > p { min-height: 22px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.player-count { margin: 32px 0 17px; }
.player-count strong { font: 800 62px/1 ui-rounded, sans-serif; }
.player-count span { margin-left: 6px; color: var(--muted); font-size: 16px; font-weight: 700; }
.player-complete { margin-top: 15px; color: var(--mint-dark); font-size: 12px; font-weight: 800; }
.shared-egg-card { padding: 24px 28px; }
.shared-egg-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.shared-egg-meta strong { color: var(--orange-dark); font: 800 28px ui-rounded, sans-serif; }
.screen-duo-egg { height: 370px; }
.screen-duo-egg .egg3d { --egg3d-size: 340px; }
.screen-duo-egg .duo-shell { width: 176px; height: 228px; }
.screen-duo-egg .duo-cracks { width: 176px; height: 228px; }
.screen-duo-egg .duo-egg-glow { width: 285px; height: 285px; }
.screen-duo-egg .duo-pet { width: min(82%, 340px); max-height: 285px; }
.screen-pet-name { margin-top: -64px; }
.shared-rule { padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }

@keyframes room-orb-pulse { 0% { opacity: .72; transform: scale(.88); } 75%,100% { opacity: 0; transform: scale(1.14); } }
@keyframes room-entry-breathe { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-53%) scale(1.035); } }
@keyframes tap-hint-breathe { 0%,100% { opacity: .58; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes duo-egg-wobble { 0%,100% { transform: translate(-50%,-50%) rotate(0); } 25% { transform: translate(-50%,-50%) rotate(-2.5deg); } 75% { transform: translate(-50%,-50%) rotate(2.5deg); } }
@keyframes duo-pet-arrive { from { opacity: 0; transform: translate(-50%,-18%) scale(.2); } to { opacity: 1; transform: translate(-50%,-60%) scale(1); } }
@keyframes duo-pet-bob { 0%,100% { transform: translate(-50%,-60%) rotate(-1deg); } 50% { transform: translate(-50%,-65%) rotate(1deg); } }

@media (max-width: 1000px) {
  .screen-game-grid { grid-template-columns: 1fr 1.3fr 1fr; }
  .player-slot, .shared-egg-card { min-height: 440px; }
  .player-avatar { margin-top: 38px; }
  .screen-duo-egg { height: 330px; }
}

@media (max-width: 820px) {
  .room-phone-grid { grid-template-columns: 1fr; }
  .room-action-card { min-height: 480px; }
  .screen-room-head { grid-template-columns: 1fr; }
  .room-code-panel { justify-self: stretch; }
  .screen-game-grid { grid-template-columns: 1fr 1fr; }
  .shared-egg-card { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 620px) {
  .mode-actions { grid-template-columns: 1fr; }
  footer { gap: 12px; }
  footer > span { display: none; }
  .room-view { padding-top: 30px; }
  .room-join-card { padding: 28px 20px; border-radius: 25px; }
  .room-egg-entry { min-height: calc(100vh - 180px); }
  .room-join-card h1 { font-size: 38px; }
  .room-challenge-head { align-items: center; }
  .room-challenge-head h1 { font-size: 32px; }
  .room-phone-grid { gap: 13px; }
  .room-action-card, .room-partner-card { min-height: auto; padding: 22px; border-radius: 23px; }
  .room-action-card { padding-top: 50px; padding-bottom: 34px; }
  .room-motion-orb { width: 142px; height: 142px; }
  .room-own-count strong { font-size: 61px; }
  .room-duo-egg { height: 300px; }
  .room-entry-duo-egg { height: 330px; }
  .room-egg-start { height: 330px; }
  .room-result-card { padding: 18px 20px 28px; }
  .room-shared-copy { align-items: flex-start; flex-direction: column; }
  .room-shared-copy span { text-align: left; }
  .screen-shell { width: min(100% - 28px, 1440px); }
  .screen-topbar { height: auto; min-height: 74px; gap: 14px; }
  .screen-controls { gap: 7px; }
  .screen-sound-button { display: none; }
  .screen-view { padding-top: 25px; }
  .screen-room-head { gap: 24px; }
  .screen-room-head h1 { font-size: 39px; }
  .room-code-panel { align-items: center; padding: 11px; }
  .qr-code { width: 112px; height: 112px; }
  .room-code-panel strong { font-size: 32px; }
  .screen-game-grid { grid-template-columns: 1fr; }
  .shared-egg-card, .player-slot { grid-column: auto; min-height: auto; }
  .shared-egg-card { grid-row: 1; }
  .player-slot { padding-bottom: 25px; }
  .player-avatar { width: 70px; height: 70px; margin: 25px auto 17px; }
  .player-count { margin: 20px 0 12px; }
  .screen-duo-egg { height: 340px; }
}

/* 2026-08-26 修复+强化：窄屏 sim 按钮吃掉龙珠；进度数字标注明显化 */
@media (max-width: 620px) {
  .room-sim-add { flex: 0 0 auto; }
}
.room-own-count strong { color: var(--orange-dark); }
.room-own-count span { font-size: 22px; font-weight: 800; color: var(--ink); }
.duo-progress-row b { font-size: 22px; font-weight: 800; color: var(--orange-dark); }
.room-shared-copy strong { font-size: 30px; font-weight: 800; display: block; margin-bottom: 2px; }

/* 协作人数选择 (2026-08-27 N 人房) */
.room-size-row { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; }
.room-size-label { color: var(--muted); font-size: 12px; font-weight: 700; margin-right: 3px; }
.room-size-row label { position: relative; cursor: pointer; }
.room-size-row input { position: absolute; opacity: 0; pointer-events: none; }
.room-size-row label span { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,253,248,.64); color: var(--muted); font-size: 13px; font-weight: 700; transition: .15s; }
.room-size-row label:has(input:checked) span { border-color: var(--orange); color: var(--orange-dark); background: var(--paper); box-shadow: inset 0 -2px 0 var(--orange); }

/* 孵化完成弹提示 (2026-08-27 先到先玩) */
.hatch-toast { position: fixed; left: 50%; top: 18px; z-index: 60; transform: translate(-50%, -80px); padding: 14px 22px; border-radius: 99px; color: #fff; background: var(--ink); font-size: 15px; font-weight: 800; box-shadow: 0 14px 40px rgba(23,49,46,.3); opacity: 0; transition: transform .45s cubic-bezier(.2,1.4,.4,1), opacity .35s; pointer-events: none; }
.hatch-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* 退出房间按钮 (Phase 3) */
.room-exit-button { display: inline-block; margin-top: 14px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; transition: .15s; }
.room-exit-button:hover { border-color: rgba(239,112,76,.45); color: var(--orange-dark); }

/* Phase 4 · 3D 玩具工房（方向 F） */
html {
  background: #f7ead6;
}

body {
  color: var(--ink);
  background: radial-gradient(130% 80% at 50% -10%, #fff8ec, #f7ead6 55%, #f0ddc2);
  background-attachment: fixed;
}

.ambient {
  border: 0;
  filter: blur(28px);
  opacity: .34;
}
.ambient-one { background: rgba(255,138,112,.28); }
.ambient-two { background: rgba(191,224,200,.72); }

.brand,
.brand-mark,
.mode-pill,
.eyebrow,
.setup-copy h1,
.pet-stage h2,
legend,
.choice-text strong,
.target-choices strong,
.room-size-row label span,
.start-button,
.create-duo-button,
.button-arrow,
.session-head h1,
.ghost-button,
.sim-visual p,
.motion-visual p,
.sim-add-button,
.again-button,
.room-invite-button,
.screen-share-button,
.room-tap-hint,
.room-challenge-head h1,
.room-own-count,
.room-count-partner h2,
.room-shared-copy strong,
.room-result-status,
.room-pet-name,
.room-reveal-button,
.screen-room-head h1,
.room-code-panel strong,
.player-slot-head,
.player-slot h2,
.player-count,
.shared-egg-meta strong,
.screen-pet-name,
.shared-rule,
.hatch-meta strong,
.pet-name,
.screen-sound-button {
  font-family: var(--display-font);
}

.topbar {
  border-bottom-color: rgba(90,66,50,.1);
}
.brand {
  color: var(--orange-dark);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .12em;
}
.brand-mark {
  color: #fff;
  background: var(--red-gel);
  border-radius: 12px;
  font-size: 22px;
  font-weight: 400;
  transform: rotate(-3deg);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.55), inset 0 -3px 4px rgba(140,30,20,.35), 0 5px 10px rgba(217,74,61,.28);
}
.mode-pill,
.screen-sound-button,
.mute-button,
.session-status,
.ghost-button span {
  border: 0;
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.14), 0 4px 9px rgba(140,100,60,.12);
}
.mode-pill { font-size: 13px; font-weight: 400; }
.mode-dot,
.room-connection.ready i,
.room-partner-online.online i,
.session-status.ready span {
  background: #70a77f;
  box-shadow: 0 0 0 4px rgba(112,167,127,.15);
}

.setup-view {
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, .96fr);
  gap: clamp(34px, 6vw, 82px);
  padding: 54px 0 70px;
}
.eyebrow {
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 400;
}
.setup-copy h1,
.session-head h1,
.room-challenge-head h1,
.screen-room-head h1 {
  color: var(--ink);
  font-weight: 400;
  letter-spacing: .005em;
}
.setup-copy h1 em { color: var(--orange); }
.lede { color: var(--muted); }
legend { font-size: 15px; font-weight: 400; }
legend span { color: var(--orange); font-family: var(--display-font); }

.choice-card,
.target-choices label span,
.room-size-row label span {
  border: 0;
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -4px 6px rgba(160,120,80,.16), 0 5px 11px rgba(140,100,60,.12);
}
.choice-card { border-radius: 21px; }
.choice-card:hover { border-color: transparent; box-shadow: inset 0 2px 3px #fff, inset 0 -4px 6px rgba(160,120,80,.16), 0 8px 16px rgba(140,100,60,.17); }
.choice-card:has(input:checked),
.target-choices label:has(input:checked) span,
.room-size-row label:has(input:checked) span {
  border: 0;
  color: #7a4a12;
  background: linear-gradient(165deg, #ffeaa6, #ffbf58);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.72), inset 0 -4px 6px rgba(190,110,20,.3), 0 7px 15px rgba(255,182,77,.32);
}
.choice-card:has(input:checked) .choice-check {
  border-color: #d88927;
  background: linear-gradient(165deg,#ffcc67,#e99a30);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.7), inset 0 -2px 3px rgba(150,80,10,.24);
}
.choice-icon,
.input-choice-icon {
  background: var(--mint-gel);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.7), inset 0 -3px 5px rgba(70,120,85,.2), 0 4px 8px rgba(90,140,105,.15);
}
.jump-icon,
.camera-choice-icon { background: linear-gradient(165deg,#fff0b5,#ffd67b); }
.punch-icon { background: linear-gradient(165deg,#f8d4bd,#efab83); }
.highknees-icon { background: linear-gradient(165deg,#d5ecdf,#a9d4bd); }
.choice-text strong { font-size: 18px; font-weight: 400; }
.choice-text small,
.privacy-note,
.lede { font-family: var(--body-font); }
.target-choices strong { font-weight: 400; }
.room-size-row { margin-top: 3px; }
.room-size-row label span {
  padding: 9px 17px;
  font-size: 15px;
  font-weight: 400;
}

.start-button,
.sim-add-button,
.room-invite-button,
.screen-share-button,
.room-reveal-button,
.again-button {
  border: 0;
  color: #fff;
  background: var(--red-gel);
  box-shadow: inset 0 3px 5px rgba(255,255,255,.45), inset 0 -5px 8px rgba(140,30,20,.4), 0 10px 22px rgba(217,74,61,.3);
}
.start-button { border-radius: 20px; font-size: 18px; font-weight: 400; }
.start-button:hover,
.sim-add-button:hover,
.room-reveal-button:hover { background: var(--red-gel); filter: saturate(1.04) brightness(1.02); }
.start-button:active,
.sim-add-button:active,
.room-reveal-button:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.38), inset 0 -3px 5px rgba(140,30,20,.35), 0 4px 9px rgba(217,74,61,.24);
}
.create-duo-button {
  border: 0;
  border-radius: 17px;
  color: var(--muted);
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.16), 0 5px 10px rgba(140,100,60,.12);
  font-size: 16px;
  font-weight: 400;
}
.create-duo-button:hover { background: var(--cream-gel); }
.button-arrow {
  color: #7a4a12;
  background: linear-gradient(165deg,#ffe08a,#ffb64d);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.7), inset 0 -3px 4px rgba(190,110,20,.3);
}

/* 首页宠物舞台 */
.hero-egg.pet-stage {
  position: relative;
  display: flex;
  min-height: 700px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 38px 25px 28px;
  border-radius: 30px;
  background:
    radial-gradient(78% 52% at 50% 34%, rgba(255,236,178,.95), rgba(255,224,150,.42) 52%, transparent 74%),
    radial-gradient(120% 100% at 50% 0%, #fffdf6, #f6ecd9);
  box-shadow: inset 0 2px 6px rgba(255,255,255,.86), inset 0 -7px 13px rgba(160,120,80,.13), 0 16px 34px rgba(140,100,60,.15);
  text-align: center;
}
.hero-egg.pet-stage::before { content: none; }
.pet-stage-badge {
  position: relative;
  z-index: 5;
  align-self: center;
  margin: 10px 0 0;
  padding: 8px 13px;
  border-radius: 99px;
  color: #8a6d54;
  background: rgba(255,255,255,.68);
  box-shadow: inset 0 1px 2px #fff, 0 3px 7px rgba(120,90,60,.14);
  font-family: var(--display-font);
  font-size: 13px;
}
.hero-egg.pet-stage > * { position: relative; z-index: 1; }
.hero-egg.pet-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  box-shadow: inset 0 2px 6px rgba(255,255,255,.86), inset 0 -7px 13px rgba(160,120,80,.13);
  pointer-events: none;
}
.pet-stage-spotlight {
  position: relative;
  display: grid;
  width: 100%;
  height: 460px;
  place-items: center;
}
.pet-stage-spotlight::before {
  content: "";
  position: absolute;
  width: min(118%, 470px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 200deg, rgba(255,255,255,.5) 0deg, transparent 26deg, rgba(255,255,255,.42) 52deg, transparent 78deg, rgba(255,255,255,.5) 104deg, transparent 130deg, rgba(255,255,255,.42) 156deg, transparent 182deg, rgba(255,255,255,.5) 208deg, transparent 234deg, rgba(255,255,255,.42) 260deg, transparent 286deg, rgba(255,255,255,.5) 312deg, transparent 338deg),
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.96), rgba(255,222,132,.5) 46%, rgba(255,196,110,.18) 66%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 45%, #000 52%, transparent 78%);
}
.pet-stage-spotlight::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 14px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(50% 100% at 50% 50%, rgba(120,80,50,.3), rgba(120,80,50,.1) 58%, transparent 76%);
}
.pet-stage-star {
  position: relative;
  z-index: 2;
  width: min(136%, 560px);
  max-height: 560px;
  margin-top: -96px;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 22px 26px rgba(120,70,40,.32));
  animation: toy-pet-bob 3.6s ease-in-out infinite;
}
.pet-stage h2 {
  position: relative;
  z-index: 3;
  margin: -26px 0 6px;
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 0 rgba(255,253,246,.9);
}
.pet-stage h2 em { color: var(--orange); font-style: normal; }
.pet-stage > p {
  position: relative;
  z-index: 3;
  right: auto;
  bottom: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  transform: none;
}
.pet-shelf {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}
.pet-shelf > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 19px;
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -4px 6px rgba(160,120,80,.18), 0 5px 10px rgba(140,100,60,.14);
}
.pet-shelf img { width: 46px; max-height: 48px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(120,70,40,.28)); }
.pet-shelf b { color: #c9ab88; font: 400 26px/1 var(--display-font); }

/* 单人挑战与蛋舞台 */
.camera-card,
.hatch-card,
.room-join-card,
.room-action-card,
.room-partner-card,
.room-result-card,
.player-slot,
.shared-egg-card,
.room-code-panel {
  border: 0;
  background:
    radial-gradient(78% 52% at 50% 34%, rgba(255,236,178,.95), rgba(255,224,150,.42) 52%, transparent 74%),
    radial-gradient(120% 100% at 50% 0%, #fffdf6, #f6ecd9);
  box-shadow: var(--shadow);
}
.camera-card,
.hatch-card,
.room-action-card,
.room-partner-card,
.player-slot,
.shared-egg-card { border-radius: 29px; }
.camera-viewport {
  background: #6b4c3b;
  box-shadow: inset 0 3px 8px rgba(70,38,22,.28), 0 3px 0 rgba(255,255,255,.7);
}
.camera-loading,
.sim-visual,
.motion-visual { background: radial-gradient(circle at 50% 40%, #8e6950, #5e4334 70%); }
.camera-error { background: #634535; }
.camera-label,
.pose-debug,
.motion-debug,
.guide-copy { background: rgba(71,45,31,.62); }
.loader { border-top-color: #ffe08a; }
.sim-key {
  background: rgba(255,248,236,.13);
  box-shadow: inset 0 3px 5px rgba(255,255,255,.16), inset 0 -8px 10px rgba(65,35,20,.2), 0 18px 45px rgba(45,25,15,.22);
}
.motion-orb {
  background: var(--yellow-gel);
  box-shadow: inset 0 5px 9px rgba(255,255,255,.64), inset 0 -8px 14px rgba(190,110,20,.38), 0 0 calc(34px + var(--motion-level) * 4px) rgba(255,182,77,.42);
  animation: toy-squish 1.5s ease-in-out infinite;
}
.motion-orb.has-orb3d {
  background: transparent;
  box-shadow: 0 0 calc(34px + var(--motion-level) * 4px) rgba(255,182,77,.42);
}
.motion-orb.has-orb3d::after { display: none; }
.motion-orb::after {
  content: "";
  width: 72px;
  height: 72px;
  background: url("./assets/eggy.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 8px rgba(120,60,20,.3));
}
.counter-block strong,
.room-own-count strong,
.player-count strong {
  color: #d94a3d;
  font-family: var(--display-font);
  font-weight: 400;
  text-shadow: 0 3px 0 rgba(255,255,255,.82), 0 8px 18px rgba(217,74,61,.22);
}
.counter-block strong { font-size: 66px; }
.hatch-card { background: radial-gradient(120% 100% at 50% 0%, #fffdf6, #f3e4cc); }
.glow-disc,
.duo-egg-glow {
  background: radial-gradient(circle at 50% 45%, rgba(255,224,138,.74), rgba(255,182,77,.25) 56%, transparent 72%);
}
.egg-surface,
.duo-shell {
  border-color: rgba(90,66,50,.72);
  background: linear-gradient(125deg,#fffdf2 10%,#f8e4b4 75%);
  box-shadow: inset 0 4px 7px rgba(255,255,255,.72), inset -18px -13px 0 rgba(217,74,61,.1), 0 10px 15px rgba(120,80,50,.14);
}
.progress-track {
  height: 16px;
  background: #eadbc2;
  box-shadow: inset 0 2px 4px rgba(140,100,60,.25), 0 1px 0 rgba(255,255,255,.7);
}
.progress-track span,
.progress-track.partner span {
  background: linear-gradient(180deg,#ffb0a0,#d94a3d);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.5), inset 0 -2px 3px rgba(140,30,20,.22);
}
.hatch-meta p,
.input-feedback,
.session-status {
  border: 0;
  border-radius: 99px;
}
.again-button { position: absolute; }
.solo-duo-cta { box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.16), 0 5px 10px rgba(140,100,60,.12); }

/* 房间挑战、等待与揭晓 */
.room-join-card { border-radius: 30px; }
.room-connection,
.room-invite-panel,
.room-partner-online,
.room-exit-button {
  border: 0;
  border-radius: 99px;
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.14), 0 4px 9px rgba(140,100,60,.11);
}
.room-partner-online { padding: 8px 13px; }
.room-invite-panel { padding: 16px 18px; }
.room-exit-button { padding: 9px 15px; }
.room-entry-duo-egg .duo-egg-glow { background: radial-gradient(circle, rgba(255,224,138,.7), rgba(255,182,77,.2) 58%, transparent 72%); }
.room-motion-orb {
  background: var(--yellow-gel);
  box-shadow: inset 0 5px 9px rgba(255,255,255,.65), inset 0 -9px 15px rgba(190,110,20,.4), 0 0 calc(34px + var(--motion-level) * 4px) rgba(255,182,77,.45);
  transform: translateY(calc(var(--motion-level) * -3px)) scaleX(calc(1 + var(--motion-level) * .035)) scaleY(calc(1 - var(--motion-level) * .018));
  animation: room-toy-squish 1.5s ease-in-out infinite;
}
.room-motion-orb.has-orb3d {
  background: transparent;
  box-shadow: 0 0 calc(34px + var(--motion-level) * 4px) rgba(255,182,77,.45);
}
.room-motion-orb::before,
.room-motion-orb::after { border-color: rgba(255,182,77,.22); }
.room-motion-orb:not(.sim) > span {
  width: 84px;
  height: 84px;
  background: url("./assets/eggy.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 8px rgba(120,60,20,.3));
  font-size: 0;
}
.room-motion-orb.has-orb3d:not(.sim) > span { background: none; filter: none; }
.room-motion-orb.has-orb3d.sim > span {
  padding: 7px 9px 7px 11px;
  border-radius: 99px;
  background: rgba(70,38,22,.66);
  color: #fff8e8;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(45,25,15,.55);
}
.room-action-guide { color: var(--mint-dark); font-family: var(--display-font); font-size: 16px; font-weight: 400; }
.room-motion-debug { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.room-own-count strong { font-size: 92px; }
.room-own-count span { color: #c9ab88; font-family: var(--display-font); font-size: 24px; font-weight: 400; }
.room-count-partner h2 { margin-bottom: 34px; font-weight: 400; }
.room-count-partner .duo-progress-row,
.room-result-partner {
  position: relative;
  padding: 14px 15px 14px 73px;
  border-radius: 20px;
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.15), 0 5px 10px rgba(140,100,60,.13);
}
.room-count-partner .duo-progress-row::before,
.room-result-partner::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 46px;
  height: 46px;
  background: url("./assets/eggy.png") center / contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(120,70,40,.28));
  transform: translateY(-50%);
}
body[data-player-slot="1"] .room-count-partner .duo-progress-row::before,
body[data-player-slot="1"] .room-result-partner::before { background-image: url("./assets/tato.png"); }
body[data-player-slot="2"] .room-count-partner .duo-progress-row::before,
body[data-player-slot="2"] .room-result-partner::before { background-image: url("./assets/eggy.png"); }
body[data-player-slot="3"] .room-count-partner .duo-progress-row::before,
body[data-player-slot="3"] .room-result-partner::before { background-image: url("./assets/mochi.png"); }
body[data-player-slot="4"] .room-count-partner .duo-progress-row::before,
body[data-player-slot="4"] .room-result-partner::before { background-image: url("./assets/tato.png"); }
.duo-progress-row > div:first-child { margin-bottom: 9px; }
.duo-progress-row b { color: var(--orange); font-family: var(--display-font); font-size: 20px; font-weight: 400; }
.room-shared-copy {
  margin-top: 17px;
  padding: 15px 17px;
  border: 0;
  border-radius: 18px;
  color: var(--mint-dark);
  background: var(--mint-gel);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.72), inset 0 -3px 5px rgba(70,120,85,.24), 0 5px 12px rgba(90,140,105,.18);
}
.room-shared-copy strong { color: var(--mint-dark); font-size: 27px; font-weight: 400; }
.room-shared-copy span { color: var(--mint-dark); }
.room-result-status { font-size: 24px; font-weight: 400; }
.room-reveal-button { font-size: 18px; font-weight: 400; }
.room-pet-name,
.screen-pet-name { color: var(--orange); font-size: 34px; font-weight: 400; }
.hatch-toast {
  color: var(--mint-dark);
  background: var(--mint-gel);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.7), inset 0 -3px 5px rgba(70,120,85,.24), 0 12px 30px rgba(90,140,105,.24);
  font-family: var(--display-font);
  font-size: 17px;
}

/* 观赛大屏：槽位软胶化、共同蛋舞台化 */
.screen-room-head h1 { font-weight: 400; }
.room-code-panel { border-radius: 28px; }
.qr-code {
  padding: 8px;
  border-radius: 18px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,.8), inset 0 -3px 6px rgba(160,120,80,.13);
}
.room-code-panel strong { color: var(--orange); font-family: var(--display-font); font-weight: 400; }
.player-slot[data-connected="false"] { box-shadow: var(--shadow); opacity: .72; }
.player-avatar {
  width: 104px;
  height: 104px;
  border-radius: 34px;
  background: var(--cream-gel) url("./assets/eggy.png") center / 82px auto no-repeat;
  box-shadow: inset 0 2px 3px #fff, inset 0 -5px 7px rgba(160,120,80,.17), 0 8px 15px rgba(140,100,60,.15);
  font-size: 0;
  transform: rotate(-2deg);
}
#playerSlot2 .player-avatar { background-image: url("./assets/tato.png"); transform: rotate(2deg); }
#playerSlot3 .player-avatar { background-image: url("./assets/mochi.png"); transform: rotate(-2deg); }
#playerSlot4 .player-avatar { background-image: url("./assets/eggy.png"); transform: rotate(2deg); }
.player-slot h2 { font-size: 26px; font-weight: 400; }
.player-count strong { font-size: 72px; }
.shared-egg-card {
  background: radial-gradient(120% 100% at 50% 0%, #fffdf6, #f3e4cc);
  box-shadow: inset 0 2px 6px rgba(255,255,255,.86), inset 0 -7px 13px rgba(160,120,80,.13), 0 16px 34px rgba(140,100,60,.15);
}
.shared-rule {
  padding: 14px 16px;
  border: 0;
  border-radius: 18px;
  color: var(--mint-dark);
  background: var(--mint-gel);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.72), inset 0 -3px 5px rgba(70,120,85,.24), 0 5px 12px rgba(90,140,105,.18);
  font-size: 16px;
  font-weight: 400;
}

footer { border-top-color: rgba(90,66,50,.1); }
footer span { font-family: var(--display-font); color: var(--ink); }

@keyframes toy-pet-bob {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}
@keyframes toy-squish {
  0%,100% { transform: translateY(calc(var(--motion-level) * -5px)) scaleX(calc(1 + var(--motion-level) * .025)) scaleY(calc(1 - var(--motion-level) * .012)); }
  50% { transform: translateY(calc(var(--motion-level) * -5px)) scaleX(calc(1.045 + var(--motion-level) * .025)) scaleY(calc(.955 - var(--motion-level) * .012)); }
}
@keyframes room-toy-squish {
  0%,100% { transform: translateY(calc(var(--motion-level) * -3px)) scaleX(calc(1 + var(--motion-level) * .035)) scaleY(calc(1 - var(--motion-level) * .018)); }
  50% { transform: translateY(calc(var(--motion-level) * -3px)) scaleX(calc(1.045 + var(--motion-level) * .035)) scaleY(calc(.955 - var(--motion-level) * .018)); }
}

@media (max-width: 900px) {
  .setup-view { grid-template-columns: 1fr; }
  .hero-egg.pet-stage { min-height: 660px; padding: 34px 16px 24px; }
  .pet-stage-spotlight { height: 430px; }
  .pet-stage-star { width: min(118%, 400px); max-height: 440px; }
}

@media (max-width: 620px) {
  .app-shell,
  footer { width: min(100% - 24px, 1180px); }
  .topbar { gap: 12px; }
  .brand { gap: 8px; font-size: 13px; letter-spacing: .09em; }
  .brand-mark { width: 32px; height: 32px; }
  .mode-pill { flex: 0 0 auto; max-width: 47%; }
  .mode-pill > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .setup-view { padding-top: 22px; gap: 25px; }
  .hero-egg.pet-stage {
    width: 100%;
    min-height: 590px;
    padding: 30px 12px 22px;
    border-radius: 28px;
  }
  .pet-stage-badge { font-size: 11px; padding: 6px 11px; }
  .pet-stage-spotlight { height: 375px; }
  .pet-stage-spotlight::before { width: min(126%, 400px); }
  .pet-stage-star { width: min(140%, 470px); max-height: 470px; margin-top: -86px; }
  .pet-stage h2 { margin-top: -22px; font-size: clamp(32px, 9.2vw, 44px); }
  .pet-stage > p { max-width: 310px; font-size: 12px; }
  .pet-shelf { gap: 6px; margin-top: 14px; }
  .pet-shelf > span { width: 48px; height: 48px; border-radius: 16px; }
  .pet-shelf img { width: 38px; max-height: 40px; }
  .setup-copy h1 { font-size: 42px; }
  .choice-card { min-height: 82px; }
  .exercise-choices .choice-card { padding-inline: 12px; }
  .exercise-choices .choice-icon { margin-right: 10px; }
  .exercise-choices .choice-text strong { font-size: 16px; }
  .room-size-row { flex-wrap: wrap; }
  .room-size-label { flex: 1 0 100%; }
  .room-size-row label { flex: 1; }
  .room-size-row label span { display: block; padding: 11px 8px; text-align: center; }
  .camera-card,
  .hatch-card,
  .room-action-card,
  .room-partner-card,
  .room-result-card { border-radius: 24px; }
  .camera-card { padding: 9px; }
  .counter-row { padding-inline: 10px; }
  .counter-block strong { font-size: 58px; }
  .room-view { padding-top: 22px; }
  .room-join-card { padding: 24px 14px; }
  .room-egg-entry { min-height: calc(100svh - 125px); }
  .room-invite-panel { min-width: 0; width: 100%; }
  .room-egg-start { width: min(100%, 340px); }
  .room-challenge-head { margin-bottom: 18px; }
  .room-challenge-head h1 { font-size: 35px; }
  .room-action-card { padding: 34px 16px 28px; }
  .room-motion-orb { width: 150px; height: 150px; margin-bottom: 24px; }
  .room-own-count strong { font-size: 78px; }
  .room-partner-card { padding: 22px 16px; }
  .room-count-partner h2 { margin-bottom: 25px; font-size: 33px; }
  .room-count-partner .duo-progress-row,
  .room-result-partner { padding-left: 68px; }
  .room-shared-copy { align-items: center; }
  .room-shared-copy strong { font-size: 24px; }
  .room-shared-copy span { text-align: right; }
  .room-result-card { padding: 16px 14px 25px; }
  .room-result-status { font-size: 21px; }
  .screen-shell { width: min(100% - 24px, 1440px); }
  .screen-room-head h1 { font-size: 41px; }
  .room-code-panel { gap: 12px; overflow: hidden; }
  .room-code-panel > div:last-child { min-width: 0; }
  .room-code-panel strong { font-size: 30px; letter-spacing: .1em; }
  .room-code-panel small { overflow-wrap: anywhere; }
  .player-avatar { width: 88px; height: 88px; background-size: 70px auto; }
  .player-count strong { font-size: 64px; }
  .screen-duo-egg { height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .pet-stage-star,
  .motion-orb,
  .room-motion-orb,
  .egg3d { animation: none !important; }
}

/* 语言切换器 + 顶栏控制组 (Phase 6 收尾) */
.topbar-controls { display: flex; align-items: center; gap: 10px; }
.language-switcher { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: linear-gradient(170deg,#fffdf6,#f2e4cc); box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.16), 0 3px 7px rgba(140,100,60,.12); }
.language-switcher button { min-width: 34px; padding: 6px 9px; border: 0; border-radius: 99px; background: transparent; color: #a1876b; font-size: 12px; font-weight: 800; cursor: pointer; }
.language-switcher button[aria-pressed="true"] { background: linear-gradient(165deg,#ffe08a,#ffb64d); color: #7a4a12; box-shadow: inset 0 2px 3px rgba(255,255,255,.7), inset 0 -3px 4px rgba(190,110,20,.3); }
@media (max-width: 620px) {
  .topbar-controls { gap: 7px; }
  .language-switcher button { min-width: 30px; padding: 5px 7px; font-size: 11px; }
  .topbar-controls .mode-pill { display: none; }
}

/* 单按钮循环语言切换 (2026-08-27 用户反馈:三并排太占空间) */
.lang-cycle { min-width: 44px; padding: 9px 13px; border: 0; border-radius: 99px; background: linear-gradient(165deg,#ffe08a,#ffb64d); color: #7a4a12; font-size: 13px; font-weight: 900; cursor: pointer; box-shadow: inset 0 2px 3px rgba(255,255,255,.7), inset 0 -3px 5px rgba(190,110,20,.3), 0 4px 9px rgba(255,182,77,.35); transition: transform .12s; }
.lang-cycle:active { transform: scale(.94); }

/* 孵化结果操作区重排 (2026-08-30 用户反馈: 两按钮挤在一起) — 通栏堆叠, 组队为主行动 */
.solo-duo-cta { position: static; display: block; width: 100%; margin: 18px 0 0; padding: 15px; border: 0; border-radius: 18px; background: linear-gradient(165deg,#ff8a70,#d94a3d); color: #fff; font-size: 15px; font-weight: 900; text-align: center; cursor: pointer; box-shadow: inset 0 3px 5px rgba(255,255,255,.45), inset 0 -5px 8px rgba(140,30,20,.4), 0 8px 18px rgba(217,74,61,.35); }
.again-button { position: static; display: block; width: 100%; margin: 10px 0 0; padding: 12px; border: 0; border-radius: 16px; background: linear-gradient(170deg,#fffdf6,#f2e4cc); color: #a1876b; font-size: 13px; font-weight: 800; text-align: center; cursor: pointer; transform: none; box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.16), 0 4px 8px rgba(140,100,60,.12); }
.again-button span { margin-left: 4px; color: #c9ab88; }

/* 完成用时（防作弊社交审计：20 个动作用了几秒一目了然） */
.hatch-duration { margin: 6px 0 0; text-align: center; font-size: 12px; font-weight: 800; color: #b99c78; letter-spacing: 0.04em; }
.hatch-level-up { margin: 8px 0 0; color: var(--orange-dark); font: 800 14px/1.45 ui-rounded, "SF Pro Rounded", sans-serif; text-align: center; }

/* Phase 8 · partner collection and birth certificate */
.setup-companion-column { min-width: 0; }
.partner-collection {
  margin-top: 18px;
  padding: 18px;
  border-radius: 25px;
  background: radial-gradient(120% 100% at 50% 0%, #fffdf6, #f3e4cc);
  box-shadow: inset 0 2px 5px rgba(255,255,255,.9), inset 0 -6px 10px rgba(160,120,80,.13), 0 12px 25px rgba(140,100,60,.14);
}
.partner-collection-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.partner-collection-head h2 { margin: 0; color: var(--ink); font: 400 25px/1 var(--display-font); }
.partner-collection-head > span {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 99px;
  color: #8a6d54;
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.14), 0 3px 7px rgba(140,100,60,.11);
  font: 400 13px/1 var(--display-font);
}
.partner-collection-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 88px;
  gap: 11px;
  overflow-x: auto;
  padding: 3px 3px 10px;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(184,80,62,.32) transparent;
}
.collection-pet {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--cream-gel);
  box-shadow: inset 0 3px 5px #fff, inset 0 -6px 9px rgba(160,120,80,.18), 0 7px 13px rgba(140,100,60,.16);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
}
.collection-pet:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: inset 0 3px 5px #fff, inset 0 -6px 9px rgba(160,120,80,.18), 0 10px 17px rgba(140,100,60,.2); }
.collection-pet:active { transform: translateY(2px) scale(.97); }
.collection-pet:focus-visible { outline: 4px solid rgba(217,74,61,.24); outline-offset: 3px; }
.collection-pet.is-rare { box-shadow: inset 0 0 0 3px #e6ad38, inset 0 3px 5px #fff, inset 0 -6px 9px rgba(190,110,20,.2), 0 7px 15px rgba(210,147,34,.3); }
.collection-pet img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(120,70,40,.25)); }
.collection-pet.level-2 { outline: 2px solid rgba(240,151,98,.35); filter: drop-shadow(0 0 5px rgba(240,151,98,.2)); }
.collection-pet.level-3 { outline: 2px solid rgba(235,133,69,.52); filter: drop-shadow(0 0 7px rgba(235,133,69,.32)); }
.collection-pet.level-4 { outline: 3px solid rgba(229,116,45,.65); filter: drop-shadow(0 0 9px rgba(229,116,45,.43)); }
.collection-pet.level-5 { outline: 3px solid rgba(224,179,76,.9); filter: drop-shadow(0 0 12px rgba(224,179,76,.72)); }
.collection-count,
.collection-level {
  position: absolute;
  z-index: 2;
  border-radius: 99px;
  color: #fffdf6;
  background: #b85a43;
  box-shadow: 0 2px 5px rgba(80,40,25,.2);
  font: 800 10px/1 var(--body-font);
  pointer-events: none;
}
.collection-count { top: -2px; right: -2px; padding: 5px 6px; }
.collection-level { bottom: -3px; left: 50%; padding: 4px 7px; transform: translateX(-50%); white-space: nowrap; }
.collection-pet.level-5 .collection-level { color: #68420b; background: #ffd76f; }

body.certificate-open { overflow: hidden; }
.certificate-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  overflow-y: auto;
  background: rgba(74,49,34,.48);
  backdrop-filter: blur(9px);
}
.birth-certificate {
  position: relative;
  display: grid;
  width: min(620px, 100%);
  max-height: calc(100svh - 48px);
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px 28px;
  overflow-y: auto;
  padding: 38px;
  border: 0;
  border-radius: 34px;
  color: var(--ink);
  background: radial-gradient(120% 100% at 50% 0%, #fffdf6, #f2e1c7);
  box-shadow: inset 0 4px 7px rgba(255,255,255,.95), inset 0 -11px 18px rgba(160,120,80,.16), 0 28px 70px rgba(60,35,22,.3);
}
.birth-certificate::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 12px;
  border: 2px solid rgba(184,80,62,.16);
  border-radius: 25px;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.85), 0 2px 0 rgba(255,255,255,.65);
}
.certificate-close {
  position: absolute;
  z-index: 4;
  right: 18px;
  top: 17px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--orange-dark);
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.18), 0 5px 10px rgba(140,100,60,.15);
  font: 400 25px/1 var(--display-font);
  cursor: pointer;
}
.certificate-close:focus-visible { outline: 4px solid rgba(217,74,61,.24); outline-offset: 2px; }
.certificate-stamp {
  position: absolute;
  z-index: 4;
  right: 34px;
  bottom: 25px;
  display: grid;
  width: 78px;
  height: 78px;
  padding: 12px;
  place-items: center;
  border: 3px double rgba(184,80,62,.48);
  border-radius: 50%;
  color: rgba(184,80,62,.68);
  font: 400 14px/1.15 var(--display-font);
  text-align: center;
  transform: rotate(-10deg);
}
.certificate-pet-frame {
  position: relative;
  z-index: 1;
  display: grid;
  width: 180px;
  height: 180px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 34%, #fffdf8, #f9dfa5 64%, #eebc5b);
  box-shadow: inset 0 5px 8px rgba(255,255,255,.85), inset 0 -9px 13px rgba(190,110,20,.22), 0 10px 20px rgba(140,100,60,.18);
}
.certificate-pet-frame img { width: 145px; height: 145px; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(120,70,40,.25)); }
.certificate-title-row { position: relative; z-index: 1; display: flex; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; padding-right: 28px; }
.certificate-title-row p { margin: 0 0 8px; color: var(--orange-dark); font: 400 12px/1 var(--display-font); letter-spacing: .18em; text-transform: uppercase; }
.certificate-title-row h2 { margin: 0; overflow-wrap: anywhere; color: var(--ink); font: 400 clamp(34px, 6vw, 50px)/1.05 var(--display-font); }
.certificate-title-row > div > span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.certificate-rare {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 11px;
  border-radius: 99px;
  color: #7a4a12;
  background: linear-gradient(165deg,#ffeaa6,#ffbf58);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.72), inset 0 -3px 5px rgba(190,110,20,.28), 0 5px 10px rgba(210,147,34,.22);
  font: 400 13px/1 var(--display-font);
}
.certificate-details { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; gap: 9px; margin: 0; }
.certificate-details > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,253,246,.56); box-shadow: inset 0 2px 3px rgba(255,255,255,.86), inset 0 -3px 5px rgba(160,120,80,.1); }
.certificate-details dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.certificate-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ink); font: 400 17px/1.35 var(--display-font); }
.certificate-partner-row {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 48px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 92px 10px 14px;
  border-radius: 18px;
  color: var(--mint-dark);
  background: var(--mint-gel);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.75), inset 0 -4px 6px rgba(70,120,85,.2), 0 6px 12px rgba(90,140,105,.16);
  font: 400 16px/1.35 var(--display-font);
}
.certificate-partner-row button,
.certificate-partner-row input { min-width: 0; max-width: 100%; border: 0; border-radius: 9px; color: var(--orange-dark); background: rgba(255,255,255,.5); font: inherit; text-align: center; }
.certificate-partner-row button { padding: 5px 8px; border-bottom: 2px dashed rgba(184,80,62,.38); cursor: pointer; }
.certificate-partner-row button.is-placeholder { color: var(--muted); font-family: var(--body-font); font-size: 11px; font-weight: 700; }
.certificate-partner-row input { width: min(230px, 100%); padding: 7px 9px; outline: 3px solid rgba(217,74,61,.2); }
.certificate-signatures { position: relative; z-index: 2; display: grid; grid-column: 1 / -1; gap: 5px; color: var(--mint-dark); font: 400 16px/1.35 var(--display-font); text-align: center; }
.certificate-signatures p { margin: 0; overflow-wrap: anywhere; }
.certificate-growth,
.certificate-equipment,
.certificate-memory {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
}
.certificate-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.certificate-section-head h3 { margin: 0; color: var(--ink); font: 400 18px/1.2 var(--display-font); }
.certificate-section-head strong { color: var(--orange-dark); font: 400 19px/1 var(--display-font); }
.certificate-growth-track { height: 10px; overflow: hidden; border-radius: 99px; background: rgba(160,120,80,.17); box-shadow: inset 0 2px 3px rgba(100,70,45,.12); }
.certificate-growth-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ef704c,#f3c657); transition: width .25s ease; }
.certificate-growth > p { margin: 7px 0 0; color: var(--muted); font-size: 11px; font-weight: 800; text-align: right; }
.certificate-equipment > ul { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.certificate-equipment li { display: flex; min-width: 0; min-height: 82px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 7px 3px; border-radius: 14px; background: rgba(255,253,246,.62); text-align: center; }
.certificate-equipment li > span { font-size: 27px; line-height: 1; }
.certificate-equipment li > strong { overflow-wrap: anywhere; color: var(--ink); font-size: 10px; line-height: 1.15; }
.certificate-equipment li > small { min-height: 20px; color: var(--muted); font-size: 8px; line-height: 1.2; }
.certificate-equipment li.is-locked { filter: grayscale(1); opacity: .42; }
.certificate-memory > ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.certificate-memory button { width: 100%; padding: 9px 12px; border: 0; border-radius: 11px; color: var(--ink); background: rgba(255,253,246,.58); font: 700 11px/1.35 var(--body-font); text-align: left; cursor: pointer; }
.certificate-memory button:hover,
.certificate-memory button.is-active { color: var(--orange-dark); background: rgba(255,242,213,.9); }
.certificate-memory button.memory-expand { color: var(--mint-dark); text-align: center; }

@media (max-width: 900px) {
  .setup-companion-column { order: -1; }
}

@media (max-width: 480px) {
  .partner-collection { padding: 15px; border-radius: 22px; }
  .partner-collection-head h2 { font-size: 22px; }
  .certificate-overlay { padding: 10px; }
  .birth-certificate {
    max-height: calc(100svh - 20px);
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 50px 22px 24px;
    border-radius: 27px;
  }
  .birth-certificate::before { inset: 8px; border-radius: 21px; }
  .certificate-pet-frame { width: 140px; height: 140px; margin: 0 auto; }
  .certificate-pet-frame img { width: 114px; height: 114px; }
  .certificate-title-row { align-items: center; padding: 0; text-align: center; }
  .certificate-title-row h2 { font-size: 37px; }
  .certificate-details { grid-column: 1; }
  .certificate-details > div { grid-template-columns: 88px minmax(0, 1fr); gap: 8px; padding: 10px 11px; }
  .certificate-details dd { font-size: 15px; }
  .certificate-partner-row { grid-column: 1; flex-wrap: wrap; padding: 11px 14px 82px; }
  .certificate-growth,
  .certificate-equipment,
  .certificate-memory { grid-column: 1; }
  .certificate-equipment > ul { gap: 4px; }
  .certificate-equipment li { min-height: 75px; padding-inline: 2px; }
  .certificate-equipment li > span { font-size: 23px; }
  .certificate-equipment li > strong { font-size: 8px; }
  .certificate-equipment li > small { font-size: 7px; }
  .certificate-stamp { right: 50%; bottom: 23px; width: 62px; height: 62px; font-size: 12px; transform: translateX(50%) rotate(-9deg); }
}

/* 分享图按钮 + 长按保存遮罩 */
.certificate-share { display: block; width: 100%; grid-column: 1 / -1; margin: 14px 0 0; padding: 13px; border: 0; border-radius: 16px; background: linear-gradient(165deg,#ff8a70,#d94a3d); color: #fff; font-family: inherit; font-size: 14px; font-weight: 900; cursor: pointer; box-shadow: inset 0 3px 5px rgba(255,255,255,.45), inset 0 -5px 8px rgba(140,30,20,.4), 0 6px 14px rgba(217,74,61,.3); }
.share-overlay { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(48,32,20,.55); backdrop-filter: blur(6px); }
.share-panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 340px; width: 100%; }
.share-image { width: 100%; border-radius: 0; box-shadow: 0 18px 40px rgba(48,32,20,.4); }
.share-hint { margin: 0; color: #fffdf6; font-size: 13px; font-weight: 800; text-shadow: 0 1px 3px rgba(48,32,20,.5); }
.share-system { padding: 11px 26px; border: 0; border-radius: 14px; background: #fffdf6; color: #b0543f; font-family: inherit; font-size: 13px; font-weight: 900; cursor: pointer; box-shadow: 0 6px 14px rgba(48,32,20,.3); }
.share-close { position: static; align-self: flex-end; width: 38px; height: 38px; background: rgba(255,253,246,.94); box-shadow: 0 4px 12px rgba(48,32,20,.3); }

/* 印章是纯装饰，不得拦截点击（2026-08-31 实测挡住分享按钮） */
.certificate-stamp { pointer-events: none; }

/* 印章入驻薄荷条右侧（2026-08-31：原卡底锚定与分享按钮相撞 + 手机端 82px 预留空条显空） */
.certificate-partner-row { position: relative; min-height: 64px; padding-right: 84px; }
.certificate-stamp { position: absolute; right: 10px; top: 50%; bottom: auto; width: 62px; height: 62px; font-size: 12px; transform: translateY(-50%) rotate(-9deg); }
@media (max-width: 480px) {
  .certificate-partner-row { padding: 11px 84px 11px 14px; }
}

/* 戳一下宠物：软胶被捏的挤压回弹 */
#certificatePetImage { cursor: pointer; transform-origin: 50% 92%; }
.pet-squish { animation: pet-squish 0.42s cubic-bezier(.34,1.56,.64,1); }
@keyframes pet-squish {
  0% { transform: scale(1, 1); }
  28% { transform: scale(1.14, 0.84); }
  55% { transform: scale(0.94, 1.08); }
  78% { transform: scale(1.03, 0.98); }
  100% { transform: scale(1, 1); }
}

.privacy-link { color: inherit; opacity: .7; font-size: 12px; text-decoration: none; }
.privacy-link:hover { opacity: 1; }

/* Phase 12 · trainer-level locks and combo training */
.combo-icon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  overflow: hidden;
  padding: 3px;
  background: linear-gradient(145deg, #f7dda0, #bfe2cf);
}
.combo-icon > img {
  position: static;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(120,80,50,.2));
}
.quad-combo-icon { grid-template-rows: repeat(2, 1fr); }
.combo-choice-card .choice-text { min-width: 0; }
.combo-choice-card .choice-text strong { line-height: 1.18; }
.choice-text .unlock-copy {
  color: var(--orange-dark);
  letter-spacing: 0;
  line-height: 1.25;
}
.choice-card.is-locked,
.choice-card.is-locked:hover {
  cursor: not-allowed;
  filter: grayscale(.9);
  opacity: .48;
  transform: none;
}
.trainer-level-hint {
  margin: -2px 0 11px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.target-choices label { display: flex; min-width: 0; flex-direction: column; }
.target-choices label > .unlock-copy {
  margin: 5px 2px 0;
  color: var(--orange-dark);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.target-choices label.is-locked {
  cursor: not-allowed;
  filter: grayscale(.9);
  opacity: .48;
}
.combo-transition {
  position: relative;
  z-index: 20;
  width: fit-content;
  max-width: 100%;
  margin: -13px auto 18px;
  padding: 11px 20px;
  border-radius: 999px;
  color: #fffdf6;
  background: linear-gradient(165deg, #ff8a70, #d94a3d);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.35), 0 8px 22px rgba(217,74,61,.3);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}
.combo-transition.is-visible { animation: combo-transition-show 2s ease both; }
@keyframes combo-transition-show {
  0% { opacity: 0; transform: translateY(-8px) scale(.96); }
  12%, 76% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(.98); }
}

@media (max-width: 480px) {
  .trainer-level-hint { font-size: 11px; }
  .target-choices { gap: 9px; }
  .target-choices label span { padding-inline: 8px; }
  .combo-transition { margin-top: -8px; padding: 10px 15px; border-radius: 16px; font-size: 12px; }
}

/* 证明卡里的真·邀请入口（澄清"填名字≠邀请"的误解） */
.certificate-invite { grid-column: 1 / -1; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: #fbf5e8; }
.certificate-invite p { margin: 0 0 10px; color: #a1876b; font-size: 12px; line-height: 1.6; }
.certificate-invite-button { width: 100%; padding: 11px; border: 0; border-radius: 14px; background: linear-gradient(170deg,#fffdf6,#f2e4cc); color: #b0543f; font-family: inherit; font-size: 13px; font-weight: 900; cursor: pointer; box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.16), 0 4px 8px rgba(140,100,60,.12); }

/* 3D 装备图（替代 emoji，与宠物同一软胶质感）；未解锁去色 */
.certificate-equipment li > span { display: grid; place-items: center; width: 38px; height: 38px; }
.equipment-image { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(140,100,60,.22)); }
.certificate-equipment li.is-locked .equipment-image { filter: grayscale(1) opacity(.42); }

/* 每日孵化额度提示 */
.daily-quota-hint { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.daily-quota-hint.is-full { color: #b0543f; }

/* 已解锁装备下面写明它带来的能力（不再只是勋章） */
.certificate-equipment li > small.is-perk { color: #b0543f; font-weight: 800; }

/* Phase 13 · 底部标签栏 + 设置面板 */
body.has-tab-bar .app-shell { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
body.has-tab-bar footer { margin-bottom: calc(92px + env(safe-area-inset-bottom)); }
body.settings-open { overflow: hidden; }

.settings-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--orange-dark);
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.16), 0 4px 9px rgba(140,100,60,.12);
  font: 400 21px/1 var(--display-font);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
}
.settings-button:hover { transform: rotate(8deg) translateY(-1px); }
.settings-button:active { transform: rotate(8deg) translateY(2px); box-shadow: inset 0 2px 3px #fff, inset 0 -2px 4px rgba(160,120,80,.18), 0 2px 5px rgba(140,100,60,.11); }
.settings-button:focus-visible,
.tab-bar button:focus-visible,
.settings-sheet button:focus-visible,
.settings-sheet a:focus-visible { outline: 4px solid rgba(217,74,61,.24); outline-offset: 2px; }

.setup-view {
  display: block;
  min-height: calc(100vh - 158px);
  padding: 0;
}
.tab-panel { min-width: 0; outline: none; }
.practice-panel { padding: 54px 0 70px; }
.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, .96fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
}
.training-status-card {
  margin: -17px 0 25px;
  padding: 13px 16px;
  border-radius: 18px;
  color: var(--mint-dark);
  background: var(--mint-gel);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.75), inset 0 -4px 6px rgba(70,120,85,.18), 0 5px 11px rgba(90,140,105,.14);
}
.training-status-card .trainer-level-hint,
.training-status-card .daily-quota-hint { margin: 0; }
.training-status-card .daily-quota-hint { margin-top: 5px; }
.solo-mode-action { grid-template-columns: 1fr; }
.solo-mode-action .create-duo-button {
  align-items: center;
  color: #fff;
  background: var(--red-gel);
  box-shadow: inset 0 3px 5px rgba(255,255,255,.45), inset 0 -5px 8px rgba(140,30,20,.4), 0 9px 20px rgba(217,74,61,.3);
  text-align: center;
}
.solo-mode-action .create-duo-button:hover { background: var(--red-gel); filter: saturate(1.04) brightness(1.02); }
.solo-mode-action .create-duo-button small { color: rgba(255,255,255,.76); }

.collection-panel,
.together-panel { padding: clamp(34px, 7vw, 78px) 0 70px; }
.collection-panel .partner-collection {
  width: min(860px, 100%);
  min-height: min(620px, calc(100svh - 250px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 32px;
}
.collection-panel .partner-collection-head { align-items: end; margin-bottom: 30px; }
.collection-panel .partner-collection-head .eyebrow { margin-bottom: 8px; }
.collection-panel .partner-collection-head h2 { font-size: clamp(34px, 5vw, 50px); }
.collection-panel .partner-collection-grid {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  justify-items: center;
  gap: 22px 15px;
  overflow: visible;
  padding: 8px 3px;
}
.collection-empty {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.collection-empty img { width: 128px; height: 128px; object-fit: contain; filter: grayscale(.2) drop-shadow(0 9px 10px rgba(120,70,40,.18)); opacity: .72; }
.collection-empty p { max-width: 420px; margin: 20px 0 17px; color: var(--muted); font: 400 21px/1.5 var(--display-font); }
.collection-empty button {
  padding: 12px 24px;
  border: 0;
  border-radius: 99px;
  color: #fff;
  background: var(--red-gel);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.4), inset 0 -4px 6px rgba(140,30,20,.34), 0 7px 15px rgba(217,74,61,.26);
  font: 400 16px/1 var(--display-font);
  cursor: pointer;
}

.together-card {
  display: grid;
  width: min(920px, 100%);
  min-height: auto;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(30px, 7vw, 80px);
  margin: 0 auto;
  padding: clamp(30px, 6vw, 64px);
  border-radius: 34px;
  background: radial-gradient(120% 100% at 50% 0%, #fffdf6, #f3e4cc);
  box-shadow: var(--shadow);
}
.together-visual { position: relative; display: grid; min-height: 330px; place-items: center; }
.together-visual::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255,224,138,.72), rgba(255,182,77,.22) 58%, transparent 72%); }
.together-visual img { position: relative; z-index: 2; object-fit: contain; filter: drop-shadow(0 13px 15px rgba(120,70,40,.22)); }
.together-visual img:first-child { --motion-level: 0; width: 250px; animation: toy-squish 1.8s ease-in-out infinite; }
.together-visual img:last-child { position: absolute; right: 8%; bottom: 10%; width: 100px; animation: toy-pet-bob 3.2s .25s ease-in-out infinite; }
.together-copy h2 { margin: 0; color: var(--ink); font: 400 clamp(36px, 5vw, 56px)/1.08 var(--display-font); }
.together-copy > p:not(.eyebrow) { margin: 18px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.together-copy .room-size-row { margin-bottom: 18px; }
.together-create-button { margin: 0; }
.together-screen-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 13px;
  padding: 13px 16px;
  border-radius: 17px;
  color: var(--orange-dark);
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.16), 0 4px 9px rgba(140,100,60,.12);
  font: 400 15px/1.2 var(--display-font);
  text-decoration: none;
}

.tab-bar {
  position: fixed;
  z-index: 900;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  width: min(520px, calc(100% - 28px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  background: rgba(247,234,214,.94);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.88), inset 0 -5px 8px rgba(160,120,80,.13), 0 15px 38px rgba(90,55,34,.22);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}
.tab-bar button {
  display: flex;
  min-width: 0;
  min-height: 66px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 8px 6px;
  border: 0;
  border-radius: 21px;
  color: var(--muted);
  background: transparent;
  font: 400 13px/1.15 var(--display-font);
  cursor: pointer;
  transition: color .18s, transform .18s, box-shadow .18s, background .18s;
}
.tab-bar button img { width: 32px; height: 32px; object-fit: contain; filter: grayscale(.5) opacity(.72) drop-shadow(0 2px 2px rgba(120,70,40,.16)); transition: filter .18s, transform .18s; }
.tab-bar button[aria-selected="true"] {
  color: #fff;
  background: var(--red-gel);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.42), inset 0 -4px 6px rgba(140,30,20,.35), 0 7px 15px rgba(217,74,61,.27);
}
.tab-bar button[aria-selected="true"] img { filter: drop-shadow(0 3px 3px rgba(95,30,20,.22)); transform: translateY(-1px) scale(1.05); }
.room-mode .tab-bar,
.room-mode .settings-button { display: none !important; }

.settings-overlay {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 22px 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(74,49,34,.42);
  backdrop-filter: blur(8px);
  animation: settings-overlay-in .2s ease-out both;
}
.settings-sheet {
  width: min(620px, 100%);
  max-height: min(820px, calc(100svh - 34px));
  overflow-y: auto;
  padding: 13px 24px 26px;
  border-radius: 31px 31px 25px 25px;
  color: var(--ink);
  background: radial-gradient(120% 100% at 50% 0%, #fffdf6, #f2e1c7);
  box-shadow: inset 0 3px 6px rgba(255,255,255,.9), inset 0 -8px 13px rgba(160,120,80,.14), 0 24px 65px rgba(60,35,22,.32);
  animation: settings-sheet-in .32s cubic-bezier(.22,.88,.32,1.05) both;
}
.settings-handle { width: 48px; height: 5px; margin: 0 auto 15px; border-radius: 99px; background: rgba(90,66,50,.2); }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.settings-head .eyebrow { margin-bottom: 5px; }
.settings-head h2 { margin: 0; font: 400 38px/1 var(--display-font); }
.settings-close {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--orange-dark);
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.17), 0 4px 9px rgba(140,100,60,.13);
  font: 400 25px/1 var(--display-font);
  cursor: pointer;
}
.settings-list { display: grid; gap: 9px; }
.settings-row {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 18px;
  color: inherit;
  background: rgba(255,253,246,.6);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.86), inset 0 -3px 5px rgba(160,120,80,.1);
  text-decoration: none;
}
.settings-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: var(--orange-dark); background: var(--cream-gel); box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.15); font: 400 18px/1 var(--display-font); }
.settings-row-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.settings-row-copy strong { font: 400 17px/1.25 var(--display-font); }
.settings-row-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.settings-language-row { align-items: flex-start; }
.settings-language-options { display: flex; gap: 6px; margin-top: 7px; }
.settings-language-options button {
  min-width: 48px;
  padding: 8px 11px;
  border: 0;
  border-radius: 99px;
  color: var(--muted);
  background: var(--cream-gel);
  box-shadow: inset 0 2px 3px #fff, inset 0 -3px 5px rgba(160,120,80,.14), 0 3px 7px rgba(140,100,60,.1);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.settings-language-options button[aria-pressed="true"] { color: #fff; background: var(--red-gel); box-shadow: inset 0 2px 3px rgba(255,255,255,.4), inset 0 -3px 5px rgba(140,30,20,.32), 0 4px 8px rgba(217,74,61,.24); }
.settings-toggle { position: relative; width: 54px; height: 32px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 99px; background: #ddcdb5; box-shadow: inset 0 3px 5px rgba(120,80,50,.2); cursor: pointer; transition: background .18s; }
.settings-toggle span { position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fffdf6; box-shadow: 0 3px 7px rgba(90,55,34,.22); transition: transform .2s cubic-bezier(.22,.88,.32,1.15); }
.settings-toggle[aria-checked="true"] { background: var(--orange); }
.settings-toggle[aria-checked="true"] span { transform: translateX(22px); }
.settings-link > span:last-child { color: var(--muted); font: 400 25px/1 var(--display-font); }
.settings-version-row { background: var(--mint-gel); }
.settings-version-row .settings-icon { color: #fff; background: var(--red-gel); }

@keyframes settings-overlay-in { from { opacity: 0; } }
@keyframes settings-sheet-in { from { opacity: 0; transform: translateY(55px) scale(.985); } }

@media (max-width: 900px) {
  .practice-layout { grid-template-columns: 1fr; }
  .practice-layout .setup-companion-column { order: -1; }
  .together-card { grid-template-columns: 1fr; }
  .together-visual { min-height: 270px; }
}

@media (max-width: 480px) {
  body.has-tab-bar .app-shell { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  body.has-tab-bar footer { margin-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .app-shell,
  footer { width: min(100% - 20px, 1180px); }
  .topbar-controls { gap: 6px; }
  .lang-cycle { min-width: 40px; padding-inline: 10px; }
  .settings-button { width: 40px; height: 40px; }
  .practice-panel { padding: 20px 0 48px; }
  .training-status-card { margin-top: -12px; }
  .collection-panel,
  .together-panel { padding: 22px 0 45px; }
  .collection-panel .partner-collection { min-height: calc(100svh - 205px); padding: 22px 15px; border-radius: 26px; }
  .collection-panel .partner-collection-head { align-items: flex-start; margin-bottom: 22px; }
  .collection-panel .partner-collection-head h2 { font-size: 34px; }
  .collection-panel .partner-collection-head > span { margin-top: 3px; white-space: nowrap; }
  .collection-panel .partner-collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px 5px; }
  .collection-empty { min-height: 360px; }
  .collection-empty p { font-size: 18px; }
  .together-card { min-height: calc(100svh - 205px); gap: 18px; padding: 25px 16px; border-radius: 27px; }
  .together-visual { min-height: 220px; }
  .together-visual::before { width: 215px; height: 215px; }
  .together-visual img:first-child { width: 195px; }
  .together-visual img:last-child { width: 78px; }
  .together-copy h2 { font-size: 39px; }
  .together-copy > p:not(.eyebrow) { margin: 13px 0 21px; font-size: 13px; }
  .tab-bar { bottom: calc(8px + env(safe-area-inset-bottom)); width: calc(100% - 16px); gap: 4px; padding: 6px; border-radius: 24px; }
  .tab-bar button { min-height: 61px; gap: 2px; padding-inline: 3px; border-radius: 19px; font-size: 11px; white-space: nowrap; }
  .tab-bar button img { width: 30px; height: 30px; }
  .settings-overlay { padding: 10px 8px max(8px, env(safe-area-inset-bottom)); }
  .settings-sheet { max-height: calc(100svh - 16px); padding: 11px 14px 18px; border-radius: 27px 27px 21px 21px; }
  .settings-head h2 { font-size: 34px; }
  .settings-row { min-height: 64px; padding: 10px; }
  .settings-icon { width: 38px; height: 38px; border-radius: 12px; }
  .settings-row-copy strong { font-size: 16px; }
  .settings-language-options button { min-width: 43px; padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .settings-overlay,
  .settings-sheet,
  .together-visual img { animation: none !important; }
}

/* 3D 界面图标（齿轮与设置面板各行）——与宠物/装备同一软胶质感 */
.settings-button img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(140,100,60,.25)); }
.settings-icon.has-3d { padding: 5px; }
.settings-icon.has-3d img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(140,100,60,.2)); }

/* 小屏（≤380px）+ 长文语言：防止会话页控件折行与文字重叠（2026-08-31 跨机型扫描） */
@media (max-width: 380px) {
  .sim-visual p { margin-top: 14px; font-size: 16px; }
  .sim-visual small { font-size: 11px; }
  .session-head { gap: 8px; }
  .back-button, #backButton { flex: 0 0 auto; white-space: nowrap; font-size: 12px; }
  .mode-pill { max-width: 54%; }
  .mode-pill > span:last-child { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .session-kicker { font-size: 11px; letter-spacing: .12em; }
}

/* 声音开关已收进设置面板，页面内的喇叭按钮全部退役（2026-09-01 用户反馈：视觉冗余） */
.mute-button { display: none; }

/* 半身主视觉冲出卡片后其透明像素会拦截顶栏点击（齿轮被挡）——装饰图不参与命中 */
.pet-stage-star, .pet-stage-spotlight { pointer-events: none; }

/* 调试读数（传感器数值/状态）默认对玩家隐藏；URL 加 ?debug=1 显示，供真机调参 */
.motion-debug, .room-motion-debug, .pose-debug { display: none; }
.debug-view .motion-debug, .debug-view .room-motion-debug, .debug-view .pose-debug { display: block; }

/* 输入方式收敛为一行分段控件（2026-09-01 UX 减法 B1）——多数人永远用默认的手持感应 */
.input-choices { display: flex; gap: 8px; }
.input-choice-card { flex: 1; min-height: 0; flex-direction: row; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-radius: 14px; }
.input-choice-card .input-choice-icon { display: none; }
.input-choice-card .choice-text small { display: none; }
.input-choice-card .choice-text strong { font-size: 13px; }
.input-choice-card .choice-check { position: static; width: 16px; height: 16px; font-size: 10px; }
.motion-only-hint { font-size: 11px; }
