:root {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #18312e;
  background: #edf2f0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --accent: #0f6f63;
  --accent-dark: #0a554c;
  --accent-soft: #dcece8;
  --ink: #18312e;
  --muted: #667a76;
  --line: #d7dfdc;
  --surface: #ffffff;
  --surface-subtle: #f6f8f7;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #edf2f0; }
body { margin: 0; min-width: 320px; min-height: 100dvh; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, input, textarea, select { outline: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { box-shadow: 0 0 0 3px rgba(15, 111, 99, .22); }
::selection { color: #fff; background: #0f6f63; }
* { scrollbar-color: #96aaa5 transparent; scrollbar-width: thin; }

.app-shell { min-height: 100dvh; }
.topbar { height: 72px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 250px; }
.brand-mark { width: 42px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 12px; font-weight: 800; font-size: 12px; letter-spacing: -.02em; }
.brand div { display: grid; gap: 1px; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.save-state { color: var(--muted); font-size: 12px; margin-right: 4px; }
.save-state.error { color: #8a2525; font-weight: 700; }

.button { min-height: 40px; border-radius: 10px; padding: 0 15px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:active { transform: translateY(1px); }
.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: #fff; border-color: var(--line); }
.button.secondary:hover { background: var(--surface-subtle); border-color: #b8c7c3; }
.button:disabled { cursor: not-allowed; opacity: .4; }

.workspace { min-height: calc(100dvh - 72px); display: grid; grid-template-columns: 232px minmax(620px, 1fr) 410px; max-width: 1760px; margin: 0 auto; }
.step-nav { border-right: 1px solid var(--line); background: #f7f9f8; padding: 26px 16px; }
.project-label { padding: 0 10px 22px; display: grid; gap: 5px; border-bottom: 1px solid var(--line); }
.project-label small, .project-label span { color: var(--muted); font-size: 11px; }
.project-label strong { font-size: 14px; line-height: 1.45; }
.step-nav ol { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 4px; }
.step-nav li button { width: 100%; min-height: 61px; padding: 10px; border: 0; border-radius: 12px; background: transparent; display: grid; grid-template-columns: 30px 1fr 16px; align-items: center; text-align: left; gap: 9px; cursor: pointer; }
.step-nav li button:hover { background: #eef3f1; }
.step-nav li button.active { background: var(--accent-soft); color: var(--accent-dark); }
.step-nav li button > span:nth-child(2) { display: grid; gap: 2px; }
.step-nav li button strong { font-size: 13px; }
.step-nav li button small { color: var(--muted); font-size: 10px; }
.step-nav li button b { font-size: 12px; font-weight: 600; }
.step-index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; border: 1px solid #c6d2cf; font-size: 12px; font-weight: 700; }
.step-nav .active .step-index { color: #fff; background: var(--accent); border-color: var(--accent); }
.template-lock { margin-top: 22px; padding: 13px; display: flex; align-items: flex-start; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.template-lock > span { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: var(--accent-dark); background: var(--accent-soft); font-size: 10px; font-weight: 700; }
.template-lock strong { font-size: 12px; }
.template-lock p { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 4px 0 0; }

.editor { min-width: 0; background: #fff; display: flex; flex-direction: column; }
.editor-section { width: min(840px, calc(100% - 64px)); margin: 0 auto; padding: 42px 0 28px; flex: 1; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.section-heading h1 { margin: 0 0 8px; font-size: clamp(24px, 2.1vw, 31px); line-height: 1.2; letter-spacing: -.025em; }
.section-heading h1 small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.section-token small { font-size: 8px; font-weight: 600; }
.en-copy { margin-top: 2px !important; color: #7b8b87 !important; font-size: 11px !important; }
.section-heading p { max-width: 55ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.section-token { min-width: 48px; height: 48px; padding: 0 9px; flex: 0 0 auto; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 14px; font-size: 11px; font-weight: 700; }
.form-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field-label { display: flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 700; }
.field-label small { color: var(--muted); font-size: 9px; font-weight: 500; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #cbd6d3; background: #fff; border-radius: 10px; padding: 11px 12px; color: var(--ink); font-size: 13px; transition: border-color .16s ease, box-shadow .16s ease; }
.field textarea { resize: vertical; min-height: 98px; line-height: 1.65; }
.field select { min-height: 42px; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #93aaa4; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field-hint { color: var(--muted); font-size: 10px; line-height: 1.5; }
.theme-block { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.mini-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.mini-heading strong { font-size: 13px; }
.mini-heading strong small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.mini-heading small { color: var(--muted); font-size: 10px; }
.theme-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.theme-options button { min-height: 54px; display: grid; grid-template-columns: 21px 1fr auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.theme-options button:hover { background: var(--surface-subtle); }
.theme-options button.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15, 111, 99, .1); }
.theme-options button > span { width: 20px; height: 20px; border-radius: 7px; }
.theme-options button strong { display: grid; gap: 1px; font-size: 11px; }
.theme-options button strong small { color: var(--muted); font-size: 8px; font-weight: 500; }
.theme-options button i { color: var(--accent); font-size: 9px; font-style: normal; }

.pair-list { display: grid; gap: 16px; }
.pair-row { display: grid; grid-template-columns: 48px 176px 1fr; gap: 16px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.pair-number { display: grid; justify-items: center; gap: 5px; }
.pair-number span { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 9px; font-size: 12px; font-weight: 700; }
.pair-number small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.pair-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.asset-tile { height: 110px; position: relative; overflow: hidden; padding: 0; border: 1px dashed #aebfba; border-radius: 11px; background: #f3f6f5; cursor: pointer; }
.asset-tile img { width: 100%; height: 100%; object-fit: cover; }
.asset-placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 2px; color: #284b46; }
.asset-placeholder b { font-size: 25px; }
.asset-placeholder small { font-size: 9px; }
.asset-action { position: absolute; inset: auto 5px 5px; min-height: 25px; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(18, 49, 46, .82); border-radius: 7px; font-size: 9px; opacity: 0; transition: opacity .16s ease; }
.asset-tile:hover .asset-action, .asset-tile:focus-visible .asset-action { opacity: 1; }
.pair-fields .field { margin-bottom: 11px; }
.pair-fields .field:last-child { margin-bottom: 0; }
.pair-fields input { padding: 9px 10px; }
.info-callout { margin-top: 17px; padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; color: #385954; background: #eef5f3; border-radius: 12px; }
.info-callout strong { flex: 0 0 auto; color: var(--accent-dark); font-size: 11px; }
.info-callout p { margin: 0; font-size: 11px; line-height: 1.65; }

.collab-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 7px; margin-bottom: 28px; }
.collab-flow > div { min-height: 78px; padding: 11px; display: grid; align-content: center; gap: 5px; background: var(--surface-subtle); border-radius: 12px; text-align: center; }
.collab-flow span { color: var(--accent); font-size: 10px; font-weight: 700; }
.collab-flow strong { font-size: 11px; line-height: 1.45; }
.collab-flow > b { color: #8ba09b; font-size: 13px; }
.example-prompts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; }
.example-prompts strong { margin-right: 3px; font-size: 11px; }
.example-prompts button { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--accent-dark); font-size: 11px; cursor: pointer; }
.example-prompts button:hover { background: var(--accent-soft); }

.review-list { border-top: 1px solid var(--line); }
.review-list > div { min-height: 68px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.review-list span:nth-child(2) { display: grid; gap: 4px; }
.review-list strong { font-size: 12px; }
.review-list small { color: var(--muted); font-size: 10px; }
.review-list button { min-height: 40px; padding: 0 9px; border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; }
.check { color: var(--accent); font-weight: 800; }
.review-list .waiting .check { color: #9a4e16; }
.palette-dot { width: 18px; height: 18px; border-radius: 6px; }
.error-box, .success-box { margin-top: 18px; padding: 13px 15px; border-radius: 12px; font-size: 11px; }
.error-box { color: #7b2929; background: #fae9e8; }
.error-box p { margin: 4px 0 0; }
.success-box { color: #174f47; background: #e4f2ee; }
.publish-card { width: 100%; margin-top: 18px; padding: 18px; display: grid; grid-template-columns: 46px 1fr 22px; align-items: center; gap: 14px; text-align: left; color: #fff; background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer; box-shadow: 0 12px 30px rgba(15, 86, 77, .18); transition: transform .16s ease, background .16s ease; }
.publish-card:hover { background: var(--accent-dark); transform: translateY(-1px); }
.publish-card:active { transform: translateY(1px); }
.publish-card > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .14); font-size: 10px; font-weight: 700; }
.publish-card strong { font-size: 14px; }
.publish-card p { margin: 4px 0 0; color: #d8efeb; font-size: 10px; line-height: 1.6; }
.release-note { color: var(--muted); font-size: 10px; line-height: 1.65; }
.editor-footer { height: 66px; padding: 0 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); z-index: 10; }
.editor-footer > span { color: var(--muted); font-size: 10px; }

.preview-panel { background: #e9eeec; padding: 22px 26px; overflow: auto; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.preview-heading > div { display: flex; align-items: baseline; gap: 8px; }
.preview-heading span { font-size: 12px; font-weight: 700; }
.preview-heading small { color: var(--muted); font-size: 9px; }
.preview-heading button { min-height: 38px; padding: 0 11px; border: 1px solid #c8d3d0; border-radius: 8px; background: #fff; font-size: 10px; cursor: pointer; }
.phone-shell { width: 332px; height: 643px; margin: 0 auto; padding: 12px; position: relative; background: #16312e; border-radius: 38px; box-shadow: 0 24px 50px rgba(39, 64, 59, .2); }
.phone-speaker { width: 74px; height: 19px; border-radius: 0 0 13px 13px; background: #16312e; position: absolute; z-index: 4; top: 11px; left: 50%; transform: translateX(-50%); }
.phone-screen { width: 100%; height: 100%; overflow: hidden; position: relative; border-radius: 28px; background: #fff; }
.preview-note { width: 332px; margin: 14px auto 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

.play-screen { --game-accent: #0f6f63; --game-soft: #dcece8; --game-ink: #123c37; --game-bg: #fbfcfb; --game-sun: #ffd45a; --game-coral: #ff7a73; --game-sky: #66c7ef; width: 100%; height: 100%; min-height: 0; padding: 40px 22px 24px; position: relative; overflow-x: hidden; overflow-y: auto; color: var(--game-ink); background: var(--game-bg); display: flex; flex-direction: column; }
.play-screen.compact { font-size: 90%; }
.welcome { isolation: isolate; align-items: center; justify-content: flex-start; padding: 22px 22px 24px; overflow: hidden; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--game-soft) 82%, #fff) 0%, #fff9ec 61%, var(--game-bg) 100%); }
.welcome::before { content: ""; width: 240px; height: 240px; position: absolute; z-index: -2; top: -126px; left: -112px; border-radius: 50%; background: color-mix(in srgb, var(--game-sky) 28%, transparent); }
.welcome::after { content: ""; width: 190px; height: 190px; position: absolute; z-index: -2; right: -92px; bottom: 54px; border-radius: 50%; background: color-mix(in srgb, var(--game-sun) 32%, #fff); }
.museum-tag { color: var(--game-accent); font-size: 13px; font-weight: 700; }
.dual-text { display: inline-grid; gap: 2px; }
.dual-text small { display: block; color: inherit; font-size: .72em; font-weight: 500; opacity: .72; }
.museum-tag .dual-text small { font-size: 10px; }
.welcome-brand { width: 100%; min-height: 34px; display: flex; align-items: center; gap: 8px; padding-right: 112px; color: var(--game-ink); text-align: left; }
.welcome-brand > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--game-accent); border-radius: 12px 12px 12px 4px; box-shadow: 0 6px 13px color-mix(in srgb, var(--game-accent) 24%, transparent); font-size: 10px; font-weight: 900; }
.welcome-brand strong { font-size: 12px; letter-spacing: -.01em; }
.playful-sky { position: absolute; z-index: -1; inset: 74px 0 auto; height: 164px; pointer-events: none; }
.playful-sky i { position: absolute; display: block; border-radius: 50%; }
.playful-sky i:nth-child(1) { width: 16px; height: 16px; left: 25px; top: 18px; background: var(--game-sun); }
.playful-sky i:nth-child(2) { width: 10px; height: 10px; right: 35px; top: 4px; background: var(--game-coral); }
.playful-sky i:nth-child(3) { width: 8px; height: 28px; right: 24px; bottom: 21px; border-radius: 6px; background: var(--game-sky); transform: rotate(34deg); }
.playful-sky i:nth-child(4) { width: 22px; height: 8px; left: 21px; bottom: 7px; border-radius: 6px; background: var(--game-coral); transform: rotate(-25deg); }
.welcome-art { width: 208px; height: 171px; margin: 17px 0 9px; position: relative; display: grid; place-items: center; border-radius: 42px 42px 31px 31px; background: color-mix(in srgb, var(--game-soft) 76%, #fff); box-shadow: 0 18px 36px color-mix(in srgb, var(--game-accent) 18%, transparent); animation: welcome-rise .55s cubic-bezier(.16,1,.3,1) both; }
.welcome-art::after { content: ""; width: 126px; height: 14px; position: absolute; left: 41px; bottom: 17px; border-radius: 50%; background: color-mix(in srgb, var(--game-accent) 17%, transparent); filter: blur(2px); }
.museum-building { width: 132px; height: 88px; position: absolute; z-index: 1; bottom: 27px; color: #fff; background: var(--game-accent); border-radius: 10px 10px 24px 24px; box-shadow: 0 12px 20px color-mix(in srgb, var(--game-accent) 24%, transparent); }
.museum-roof { width: 140px; height: 38px; position: absolute; left: -8px; top: -34px; background: var(--game-accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.museum-column { width: 14px; height: 44px; position: absolute; bottom: 17px; border-radius: 7px 7px 3px 3px; background: rgba(255,255,255,.88); }
.museum-column:nth-of-type(2) { left: 20px; }
.museum-column:nth-of-type(3) { left: 55px; }
.museum-column:nth-of-type(4) { right: 20px; }
.museum-building > b { width: 32px; height: 32px; position: absolute; z-index: 2; left: 50px; top: -16px; display: grid; place-items: center; color: var(--game-accent); background: #fff; border-radius: 11px; font-size: 14px; }
.museum-face { width: 54px; height: 27px; position: absolute; z-index: 3; left: 39px; bottom: 4px; }
.museum-face > i { width: 6px; height: 8px; position: absolute; top: 0; border-radius: 50%; background: #fff; }
.museum-face > i:first-child { left: 10px; }
.museum-face > i:nth-child(2) { right: 10px; }
.museum-face > b { width: 18px; height: 9px; position: absolute; left: 18px; top: 9px; border: 3px solid #fff; border-top: 0; border-radius: 0 0 14px 14px; }
.artifact-token { width: 46px; height: 46px; position: absolute; z-index: 3; right: -11px; bottom: 20px; display: grid; place-items: center; color: #5d4100; background: var(--game-sun); border: 4px solid #fff; border-radius: 16px 16px 16px 5px; box-shadow: 0 8px 17px rgba(64,47,12,.18); font-size: 17px; font-weight: 800; transform: rotate(7deg); animation: artifact-float 2.7s ease-in-out infinite; }
.spark { position: absolute; display: block; border-radius: 50%; background: var(--game-accent); }
.spark-one { width: 10px; height: 10px; left: 21px; top: 31px; }
.spark-two { width: 7px; height: 7px; right: 28px; top: 25px; background: #ff9c8c; }
.spark-three { width: 13px; height: 13px; left: 28px; bottom: 26px; background: #ffd86e; }
.welcome-copy { display: grid; justify-items: center; }
.adventure-ribbon { margin-bottom: 5px; color: var(--game-accent); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.welcome-copy .museum-tag { max-width: 290px; margin-bottom: 6px; padding: 5px 11px; border-radius: 999px; color: #6a3f00; background: color-mix(in srgb, var(--game-sun) 58%, #fff); font-size: 11px; }
.welcome h1 { max-width: 310px; margin: 0; font-size: 30px; line-height: 1.16; letter-spacing: -.025em; text-wrap: balance; }
.welcome h1::after { content: ""; width: 72px; height: 7px; margin: 8px auto 0; display: block; border-radius: 6px; background: linear-gradient(90deg, var(--game-coral) 0 32%, var(--game-sun) 32% 66%, var(--game-sky) 66%); }
.welcome-copy p { max-width: 292px; margin: 7px 0 12px; color: color-mix(in srgb, var(--game-ink) 82%, #fff); font-size: 13px; line-height: 1.5; }
.welcome h2, .complete h2 { max-width: 280px; margin: 0; font-size: 25px; line-height: 1.3; letter-spacing: -.02em; }
.role-note { width: 100%; max-width: 310px; min-height: 72px; margin-bottom: 13px; padding: 10px 12px; display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; gap: 5px; color: var(--game-ink); background: #fff; border-radius: 16px; box-shadow: 0 9px 22px color-mix(in srgb, var(--game-accent) 13%, transparent); text-align: left; }
.role-step { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 7px; }
.role-step > b { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; background: var(--game-accent); border-radius: 10px 10px 10px 4px; font-size: 11px; box-shadow: 0 4px 8px color-mix(in srgb, var(--game-accent) 20%, transparent); }
.role-step:last-child > b { color: #6a3f00; background: var(--game-sun); border-radius: 10px 10px 4px 10px; }
.role-step > span { display: grid; gap: 2px; }
.role-step strong { color: var(--game-ink); font-size: 10px; line-height: 1.25; }
.role-step small { color: color-mix(in srgb, var(--game-ink) 68%, #fff); font-size: 8px; line-height: 1.35; }
.role-link { width: 20px; height: 2px; position: relative; display: block; border-radius: 2px; background: color-mix(in srgb, var(--game-accent) 58%, #fff); }
.role-link::after { content: ""; width: 9px; height: 12px; position: absolute; right: -2px; top: -5px; background: var(--game-accent); clip-path: polygon(0 0, 100% 50%, 0 100%, 30% 50%); }
.welcome-start { width: 100%; max-width: 310px; min-height: 58px; padding: 0 13px 0 20px; display: flex; align-items: center; justify-content: space-between; border-radius: 18px; box-shadow: 0 13px 25px color-mix(in srgb, var(--game-accent) 28%, transparent); font-size: 16px; }
.welcome-start > b { width: 34px; height: 34px; position: relative; display: block; color: var(--game-accent); background: #fff; border-radius: 12px; }
.start-arrow::before { content: ""; width: 11px; height: 2px; position: absolute; left: 10px; top: 16px; border-radius: 2px; background: var(--game-accent); }
.start-arrow::after { content: ""; width: 9px; height: 12px; position: absolute; left: 15px; top: 11px; background: var(--game-accent); clip-path: polygon(0 0, 100% 50%, 0 100%, 30% 50%); }
@keyframes welcome-rise { from { opacity: .55; transform: translateY(14px) scale(.96); } }
@keyframes artifact-float { 50% { transform: translateY(-6px) rotate(3deg); } }
.game-primary { min-height: 50px; padding: 0 22px; color: #fff; background: var(--game-accent); border: 0; border-radius: 15px; box-shadow: 0 9px 18px color-mix(in srgb, var(--game-accent) 24%, transparent); font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .16s cubic-bezier(.2,.8,.2,1), filter .16s ease, box-shadow .16s ease; }
.game-primary small { margin-left: 4px; font-size: 10px; font-weight: 600; opacity: .8; }
.game-primary:hover { filter: brightness(.92); }
.game-primary:active { transform: translateY(2px) scale(.98); box-shadow: 0 4px 10px color-mix(in srgb, var(--game-accent) 18%, transparent); }
.board-screen { padding-top: 72px; background: linear-gradient(180deg, color-mix(in srgb, var(--game-soft) 52%, #fff) 0 106px, var(--game-bg) 106px 100%); }
.game-head { min-height: 58px; position: relative; display: flex; justify-content: space-between; align-items: center; margin: 0 -3px 20px; padding: 0 4px 13px; }
.game-head::after { content: ""; height: 5px; position: absolute; left: 4px; right: 4px; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, var(--game-coral), var(--game-sun), var(--game-sky)); opacity: .82; }
.game-head > div { display: grid; gap: 2px; }
.game-head small { color: #526762; font-size: 12px; }
.game-head strong { font-size: 16px; }
.game-head > span { padding: 9px 11px; color: var(--game-ink); background: #fff; border-radius: 12px 12px 12px 5px; box-shadow: 0 5px 13px color-mix(in srgb, var(--game-accent) 12%, transparent); font-size: 12px; font-weight: 800; }
.memory-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; perspective: 900px; }
.game-card { min-height: 136px; position: relative; padding: 0; border: 0; border-radius: 18px; background: transparent; transform-style: preserve-3d; cursor: pointer; transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .25s ease; }
.game-card.is-open, .game-card.is-matched { transform: rotateY(180deg); }
.game-card.is-matched { opacity: .68; }
.game-card.is-matched::after { content: ""; width: 25px; height: 25px; position: absolute; z-index: 4; right: 8px; top: 7px; background: #fff; clip-path: polygon(7% 48%, 22% 32%, 42% 52%, 79% 13%, 95% 29%, 42% 83%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.18)); }
.card-face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; border-radius: 18px; overflow: hidden; }
.card-back { color: #fff; background: var(--game-accent); box-shadow: 0 9px 18px color-mix(in srgb, var(--game-accent) 24%, transparent); }
.card-back::before { content: ""; width: 84px; height: 84px; position: absolute; right: -34px; top: -33px; border-radius: 50%; background: color-mix(in srgb, var(--game-sun) 72%, transparent); }
.card-back::after { content: ""; position: absolute; inset: 9px; border: 2px dashed rgba(255,255,255,.48); border-radius: 13px; }
.card-back i { width: 43px; height: 43px; z-index: 1; display: grid; place-items: center; color: var(--game-accent); background: #fff; border-radius: 14px 14px 14px 5px; box-shadow: 0 6px 12px rgba(0,0,0,.11); font-size: 18px; font-style: normal; font-weight: 800; }
.card-front { padding: 9px; transform: rotateY(180deg); align-content: center; gap: 6px; }
.card-front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-front strong { font-size: 30px; }
.card-front > .dual-text { position: relative; z-index: 1; align-self: end; padding: 5px 8px; color: var(--game-ink); background: rgba(255,255,255,.92); border-radius: 7px; font-size: 11px; font-weight: 700; }
.card-front > .single-label { position: relative; z-index: 1; align-self: end; padding: 6px 9px; color: var(--game-ink); background: rgba(255,255,255,.94); border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,.07); font-size: 12px; font-weight: 800; }
.game-tip { margin: 17px auto 0; max-width: 290px; padding: 9px 13px; color: #445d57; background: color-mix(in srgb, var(--game-soft) 62%, #fff); border-radius: 12px; text-align: center; font-size: 12px; line-height: 1.5; }
.game-tip small { display: block; font-size: 9px; opacity: .75; }
.game-tip.feedback { color: var(--game-accent); font-weight: 700; }
.handoff { position: absolute; inset: 0; z-index: 8; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--game-ink) 56%, transparent); }
.handoff-sheet { width: 100%; max-height: 100%; flex: 0 0 auto; padding: 26px 22px 22px; position: relative; overflow-x: hidden; overflow-y: auto; background: linear-gradient(180deg, color-mix(in srgb, var(--game-sun) 30%, #fff), #fff 42%); border-radius: 28px 28px 0 0; text-align: center; animation: sheet-in .28s cubic-bezier(.16,1,.3,1) both; }
.handoff-sheet::before { content: ""; width: 42px; height: 5px; position: absolute; top: 10px; left: calc(50% - 21px); border-radius: 5px; background: color-mix(in srgb, var(--game-accent) 24%, #fff); }
@keyframes sheet-in { from { transform: translateY(18px); opacity: .5; } }
.handoff-icon { width: 60px; height: 40px; margin: 0 auto 7px; display: flex; align-items: center; justify-content: center; }
.handoff-icon b { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: var(--game-accent); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 6px 13px color-mix(in srgb, var(--game-accent) 20%, transparent); font-size: 9px; }
.handoff-icon b:last-child { margin-left: -12px; color: #6a3f00; background: var(--game-sun); }
.handoff-sheet > small { color: var(--game-ink); font-size: 12px; font-weight: 700; }
.handoff-sheet h3 { margin: 3px 0 6px; font-size: 20px; }
.handoff-sheet p { margin: 0 auto 8px; max-width: 280px; font-size: 13px; line-height: 1.5; }
.prompt-text { display: grid; margin: 0 auto 8px; max-width: 280px; font-size: 13px; line-height: 1.45; }
.discovery-note { margin-bottom: 10px; padding: 9px; color: #526762; background: #f2f5f4; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.handoff-sheet .game-primary { min-height: 48px; }
.complete { isolation: isolate; align-items: center; justify-content: center; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--game-soft) 72%, #fff), #fff9ec 100%); }
.complete::before, .complete::after { content: ""; width: 170px; height: 170px; position: absolute; z-index: -1; border-radius: 50%; }
.complete::before { left: -95px; top: 70px; background: color-mix(in srgb, var(--game-sky) 26%, transparent); }
.complete::after { right: -98px; bottom: 80px; background: color-mix(in srgb, var(--game-coral) 18%, transparent); }
.complete-mark { width: 72px; height: 72px; margin-bottom: 15px; position: relative; display: block; background: var(--game-accent); border: 6px solid #fff; border-radius: 24px 24px 24px 8px; box-shadow: 0 12px 24px color-mix(in srgb, var(--game-accent) 26%, transparent); transform: rotate(-4deg); animation: success-pop .58s cubic-bezier(.16,1,.3,1) both; }
.complete-mark::after { content: ""; width: 34px; height: 34px; position: absolute; left: 13px; top: 12px; background: #fff; clip-path: polygon(7% 48%, 22% 32%, 42% 52%, 79% 13%, 95% 29%, 42% 83%); }
@keyframes success-pop { from { transform: rotate(-10deg) scale(.7); filter: blur(3px); } }
.celebration-bursts { position: absolute; z-index: -1; inset: 76px 18px auto; height: 220px; pointer-events: none; }
.celebration-bursts i { width: 10px; height: 24px; position: absolute; border-radius: 8px; background: var(--game-coral); animation: confetti-in .7s cubic-bezier(.16,1,.3,1) both; }
.celebration-bursts i:nth-child(1) { left: 8%; top: 24%; transform: rotate(-26deg); }
.celebration-bursts i:nth-child(2) { left: 22%; top: 4%; width: 11px; height: 11px; background: var(--game-sky); transform: rotate(15deg); }
.celebration-bursts i:nth-child(3) { left: 34%; top: 16%; height: 18px; background: var(--game-sun); transform: rotate(32deg); }
.celebration-bursts i:nth-child(4) { right: 34%; top: 4%; width: 12px; height: 12px; background: var(--game-coral); transform: rotate(-18deg); }
.celebration-bursts i:nth-child(5) { right: 20%; top: 17%; background: var(--game-sky); transform: rotate(24deg); }
.celebration-bursts i:nth-child(6) { right: 7%; top: 38%; height: 18px; background: var(--game-sun); transform: rotate(-32deg); }
.celebration-bursts i:nth-child(7) { left: 2%; top: 61%; width: 9px; height: 9px; background: var(--game-sun); }
.celebration-bursts i:nth-child(8) { right: 3%; top: 72%; width: 11px; height: 11px; background: var(--game-coral); }
.celebration-bursts i:nth-child(9) { left: 49%; top: -4%; width: 9px; height: 19px; background: var(--game-sky); }
@keyframes confetti-in { from { opacity: 0; scale: .4; } }
.complete .museum-tag { margin-bottom: 7px; }
.shared-question { width: 100%; max-width: 310px; margin: 20px 0 14px; padding: 17px; background: #fff; border-radius: 16px 16px 16px 6px; box-shadow: 0 8px 20px color-mix(in srgb, var(--game-accent) 12%, transparent); text-align: left; }
.shared-question small { color: var(--game-ink); font-size: 12px; font-weight: 700; }
.shared-question p { margin: 6px 0 0; font-size: 14px; line-height: 1.65; }
.shared-question > .dual-text { margin-top: 6px; font-size: 14px; line-height: 1.55; }
.attempt-copy { color: #526762; font-size: 12px; }
.replay-button { min-width: 166px; }

.standalone { min-height: 100dvh; padding: 24px; display: grid; place-items: center; background: #e8efec; }
.back-to-editor { position: fixed; top: 20px; left: 20px; z-index: 10; min-height: 40px; padding: 0 13px; border: 1px solid #c7d3cf; border-radius: 10px; background: #fff; font-size: 12px; cursor: pointer; }
.standalone-phone { width: min(100%, 390px); height: min(780px, calc(100dvh - 48px)); overflow: hidden; position: relative; border-radius: 28px; background: #fff; box-shadow: 0 24px 60px rgba(32, 67, 60, .18); }
.publish-overlay { position: fixed; z-index: 80; inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(17,43,38,.58); backdrop-filter: blur(4px); }
.publish-dialog { width: min(100%, 430px); padding: 26px; position: relative; display: grid; justify-items: center; color: var(--ink); background: #fff; border-radius: 20px; box-shadow: 0 28px 80px rgba(11,42,36,.3); text-align: center; animation: dialog-in .22s ease both; }
@keyframes dialog-in { from { opacity: .4; transform: translateY(10px) scale(.98); } }
.dialog-close { width: 38px; height: 38px; position: absolute; top: 12px; right: 12px; border: 0; border-radius: 10px; color: var(--muted); background: var(--surface-subtle); font-size: 22px; cursor: pointer; }
.publish-success { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 14px; font-size: 22px; font-weight: 800; }
.publish-dialog h2 { margin: 12px 0 7px; display: grid; gap: 3px; font-size: 21px; }
.publish-dialog h2 small { color: var(--muted); font-size: 10px; font-weight: 500; }
.publish-dialog > p { max-width: 330px; margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.publish-qr { width: 196px; height: 196px; padding: 10px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--muted); font-size: 10px; }
.publish-qr img, .publish-qr canvas { width: 176px!important; height: 176px!important; }
.publish-url { width: 100%; margin-top: 15px; display: grid; gap: 6px; text-align: left; }
.publish-url span { color: var(--muted); font-size: 9px; font-weight: 700; }
.publish-url input { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface-subtle); font-size: 11px; }
.publish-actions { width: 100%; margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.publish-actions a { text-decoration: none; }
.loading-player { color: var(--ink); }
.player-loading, .player-error { padding: 28px; display: grid; justify-items: center; gap: 7px; text-align: center; background: #fff; border-radius: 18px; box-shadow: 0 18px 50px rgba(32,67,60,.15); }
.player-loading > span { width: 36px; height: 36px; border: 4px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.player-loading strong, .player-error strong { font-size: 15px; }
.player-loading small, .player-error small { color: var(--muted); font-size: 10px; }
.player-error .button { margin-top: 8px; text-decoration: none; }

/* v2 — bilingual configuration and reusable templates */
.game-language { position: absolute; z-index: 7; top: 14px; right: 14px; padding: 4px; display: flex; gap: 2px; border: 0; border-radius: 12px; background: rgba(255,255,255,.95); box-shadow: 0 6px 16px color-mix(in srgb, var(--game-accent) 12%, transparent); }
.game-language button { min-height: 30px; padding: 0 9px; border: 0; border-radius: 8px; color: #50655f; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.game-language button.active { color: #fff; background: var(--game-accent); }
.single-label { line-height: 1.25; }
.brand strong small { margin-left: 4px; color: var(--muted); font-size: 9px; font-weight: 500; }
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.template-card { min-height: 176px; padding: 18px; display: grid; grid-template-columns: 50px 1fr; align-content: start; gap: 13px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.template-card:hover { border-color: #9db0ab; transform: translateY(-2px); }
.template-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,111,99,.1); }
.template-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--accent-dark); background: var(--accent-soft); border-radius: 14px; font-size: 17px; font-weight: 800; }
.template-card > span:nth-child(2) { display: grid; gap: 2px; }
.template-card strong { font-size: 15px; }
.template-card small { color: var(--muted); font-size: 10px; }
.template-card p { min-height: 48px; margin: 10px 0 0; color: #526762; font-size: 11px; line-height: 1.55; }
.template-card p em { color: #81908d; font-size: 9px; font-style: normal; }
.template-card > b { grid-column: 2; color: var(--accent); font-size: 10px; }

.bilingual-field { margin-bottom: 18px; padding: 13px; background: var(--surface-subtle); border: 1px solid #e2e8e6; border-radius: 13px; }
.field-title { margin-bottom: 10px; display: flex; align-items: baseline; gap: 7px; }
.field-title strong { font-size: 12px; }
.field-title small { color: var(--muted); font-size: 9px; }
.language-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.language-control { min-width: 0; display: grid; grid-template-columns: 31px 1fr; align-items: stretch; }
.language-control > span { display: grid; place-items: center; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid #cbd6d3; border-right: 0; border-radius: 9px 0 0 9px; font-size: 9px; font-weight: 800; }
.language-control input, .language-control textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #cbd6d3; border-radius: 0 9px 9px 0; color: var(--ink); background: #fff; font-size: 12px; outline: none; }
.language-control textarea { min-height: 80px; resize: vertical; line-height: 1.55; }
.language-control input:focus, .language-control textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15,111,99,.12); }
.textarea-control > span { align-content: start; padding-top: 12px; }
.bilingual-field > .field-hint { display: block; margin-top: 8px; }
.form-grid.two > .bilingual-field { margin-bottom: 20px; }
.customize-row { margin-top: 16px; padding: 14px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 12px; align-items: end; background: #f6f8f7; border-radius: 13px; }
.switch-row { min-height: 42px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-row input { width: 19px; height: 19px; accent-color: var(--accent); }
.switch-row span { display: grid; gap: 2px; }
.switch-row strong { font-size: 11px; }
.switch-row small { color: var(--muted); font-size: 9px; }
.color-field, .symbol-field { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.color-field input { width: 100%; height: 34px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.symbol-field select { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sound-row { width: fit-content; margin-top: 12px; }

.asset-pair-large { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.asset-pair-large > div { display: grid; gap: 8px; }
.asset-pair-large > div > strong { font-size: 12px; }
.asset-pair-large > div > strong small { color: var(--muted); font-size: 9px; font-weight: 500; }
.asset-pair-large .asset-tile { height: 210px; }
.spot-config { display: grid; gap: 12px; }
.spot-config > article { padding: 14px; display: grid; grid-template-columns: 34px 190px 1fr; gap: 13px; align-items: start; border: 1px solid var(--line); border-radius: 13px; }
.spot-index, .item-number { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 9px; font-size: 11px; font-weight: 800; }
.spot-sliders { display: grid; gap: 8px; padding-top: 4px; }
.spot-sliders label { display: grid; grid-template-columns: 12px 1fr 34px; gap: 5px; align-items: center; color: var(--muted); font-size: 10px; }
.spot-sliders input { accent-color: var(--accent); }
.spot-sliders output { text-align: right; }
.spot-config .bilingual-field { margin: 0; padding: 10px; }
.spot-config .language-pair { grid-template-columns: 1fr; gap: 7px; }

.category-config { margin-bottom: 18px; }
.classify-items { display: grid; gap: 12px; }
.classify-items > article { padding: 13px; display: grid; grid-template-columns: 34px 110px 1fr; gap: 13px; align-items: start; border: 1px solid var(--line); border-radius: 13px; }
.classify-items .asset-tile { height: 116px; }
.classify-items .bilingual-field { margin-bottom: 9px; padding: 10px; }
.classify-items .field { margin: 0; }

.ar-explainer { margin-bottom: 20px; padding: 18px; display: flex; gap: 14px; align-items: center; background: #ecf4f2; border-radius: 14px; }
.scan-glyph { width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 15px; font-weight: 800; }
.ar-explainer strong { font-size: 13px; }
.ar-explainer p { margin: 5px 0 2px; color: #49635e; font-size: 11px; line-height: 1.55; }
.ar-explainer small { color: var(--muted); font-size: 9px; }
.ar-content-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.ar-content-grid .asset-tile { height: 220px; }

/* player: spot the difference */
.spot-screen, .classify-screen { padding: 72px 16px 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--game-soft) 52%, #fff) 0 106px, var(--game-bg) 106px 100%); }
.spot-pictures { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spot-pictures > div > small { width: max-content; display: block; margin: 0 0 7px 3px; padding: 4px 7px; color: var(--game-ink); background: #fff; border-radius: 8px 8px 8px 3px; box-shadow: 0 4px 10px color-mix(in srgb, var(--game-accent) 10%, transparent); font-size: 9px; font-weight: 800; }
.spot-pictures > div:last-child > small { color: #6a3f00; background: color-mix(in srgb, var(--game-sun) 56%, #fff); }
.spot-image { aspect-ratio: 4 / 5; position: relative; overflow: hidden; border: 4px solid #fff; border-radius: 18px; background: #f0e7d8; box-shadow: 0 8px 18px color-mix(in srgb, var(--game-accent) 15%, transparent); }
.spot-image img { width: 100%; height: 100%; object-fit: cover; }
.spot-fallback { width: 100%; height: 100%; position: relative; background: linear-gradient(150deg,#efe1c6,#dce8e1); }
.vase { width: 58px; height: 77px; position: absolute; left: 50%; top: 48%; transform: translate(-50%,-50%); border: 7px solid #537d72; border-radius: 12px 12px 28px 28px; }
.vase::before { content:""; width: 25px; height: 18px; position: absolute; left: 50%; top: -25px; transform: translateX(-50%); border: 6px solid #537d72; border-bottom: 0; }
.vase i { position:absolute; inset:18px 6px auto; height:6px; background:#b67657; border-radius:8px; }
.spot-fallback.changed .vase i { background:#67528d; transform:rotate(5deg); }
.sun-dot { width:18px; height:18px; position:absolute; left:16%; top:20%; border-radius:50%; background:#b67657; }
.spot-fallback.changed .sun-dot { opacity:0; }
.wave { position:absolute; right:13%; top:28%; color:#537d72; font-size:27px; font-weight:800; }
.spot-fallback.changed .wave { transform:rotate(180deg); color:#a9454c; }
.spot-fallback b { position:absolute; left:44%; bottom:10%; color:#8a6500; font-size:18px; }
.spot-fallback.changed b::after { content:"•"; position:absolute; right:-12px; top:-5px; }
.hotspot { width:44px; height:44px; position:absolute; z-index:3; transform:translate(-50%,-50%); border:2px solid transparent; border-radius:50%; background:transparent; cursor:pointer; }
.hotspot:focus-visible { border-color:#fff; box-shadow:0 0 0 3px var(--game-accent); }
.hotspot.found { display:grid; place-items:center; color:#fff; background:var(--game-coral); border:4px solid #fff; font-size:17px; font-weight:800; box-shadow:0 6px 13px rgba(85,35,32,.24); animation: found-pop .34s cubic-bezier(.16,1,.3,1) both; }
@keyframes found-pop { from { scale: .55; } }

/* player: classification */
.object-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.object-card { min-height:100px; padding:8px 5px; display:grid; place-items:center; align-content:center; gap:5px; border:4px solid #fff; border-radius:17px; color:var(--game-ink); background:var(--item-color); box-shadow:0 7px 15px color-mix(in srgb, var(--game-accent) 13%, transparent); cursor:pointer; transition:transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s ease; }
.object-card img { width:58px; height:50px; object-fit:cover; border-radius:11px; }
.object-card b { font-size:24px; }
.object-card .dual-text, .object-card .single-label { font-size:9px; text-align:center; }
.object-card.selected { border-color:var(--game-accent); box-shadow:0 10px 19px color-mix(in srgb, var(--game-accent) 22%, transparent); transform:translateY(-4px) rotate(-1deg); }
.object-card.placed { opacity:.28; }
.category-targets { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.category-targets button { min-height:76px; padding:10px; display:grid; grid-template-columns:31px 1fr; align-items:center; gap:8px; border:2px dashed color-mix(in srgb, var(--game-accent) 58%, #fff); border-radius:16px; color:var(--game-ink); background:color-mix(in srgb, var(--game-soft) 74%, #fff); cursor:pointer; text-align:left; }
.category-targets button:disabled { opacity:.62; cursor:default; }
.category-targets button > span:first-child { width:31px; height:31px; display:grid; place-items:center; border-radius:11px 11px 11px 4px; color:#fff; background:var(--game-accent); font-size:12px; font-weight:800; }
.category-targets .dual-text, .category-targets .single-label { font-size:10px; font-weight:700; }

/* player: fixed-marker AR */
.ar-launch, .ar-reveal { align-items:center; justify-content:center; text-align:center; }
.scanner-demo { width:230px; height:230px; position:relative; display:grid; place-items:center; border-radius:18px; background:linear-gradient(145deg,#dce6e2,#fcfcfb); overflow:hidden; box-shadow:inset 0 0 0 2px rgba(255,255,255,.8); }
.scanner-demo::before,.scanner-demo::after,.scanner-demo span::before,.scanner-demo span::after { content:""; width:48px; height:48px; position:absolute; border-color:var(--game-accent); border-style:solid; }
.scanner-demo::before { left:15px; top:15px; border-width:4px 0 0 4px; }
.scanner-demo::after { right:15px; top:15px; border-width:4px 4px 0 0; }
.scanner-demo span::before { left:15px; bottom:15px; border-width:0 0 4px 4px; }
.scanner-demo span::after { right:15px; bottom:15px; border-width:0 4px 4px 0; }
.scanner-demo i { width:90px; height:90px; display:grid; place-items:center; border:12px solid #111; color:#111; background:#fff; font-size:21px; font-style:normal; font-weight:900; }
.ar-launch h2 { display:grid; gap:3px; margin:20px 0 7px; font-size:22px; }
.ar-launch h2 small { color:#647671; font-size:11px; font-weight:500; }
.ar-launch > p { max-width:290px; margin:2px 0; color:#536762; font-size:12px; line-height:1.55; }
.link-button { margin-top:18px; display:inline-flex; align-items:center; text-decoration:none; }
.game-secondary { min-height:42px; margin-top:8px; padding:0 15px; border:1px solid var(--game-accent); border-radius:11px; color:var(--game-accent); background:#fff; font-size:11px; font-weight:700; cursor:pointer; }
.marker-link { margin-top:13px; color:var(--game-accent); font-size:10px; }
.scan-success { width:52px; height:52px; margin-bottom:6px; display:grid; place-items:center; color:#fff; background:var(--game-accent); border-radius:15px; font-size:24px; font-weight:800; }
.ar-reveal > small { color:var(--game-accent); font-size:10px; font-weight:700; }
.ar-reveal > img { width:190px; height:190px; margin:16px 0; object-fit:contain; border-radius:18px; background:var(--game-soft); }
.ar-object { width:160px; height:160px; margin:16px 0; display:grid; place-items:center; color:var(--game-accent); background:var(--game-soft); border-radius:24px; font-size:56px; font-weight:800; animation:ar-float 2.4s ease-in-out infinite; }
@keyframes ar-float { 50% { transform:translateY(-7px) rotate(2deg); } }
.ar-reveal h2 { margin:0 0 10px; font-size:22px; }
.ar-copy { max-width:300px; color:#485f59; font-size:12px; line-height:1.55; }
.ar-reveal .shared-question { margin:14px 0; font-size:11px; }

.compact-host .play-screen { min-height:100%; }
.compact-host .spot-screen,.compact-host .classify-screen { padding-top:68px; }

@media (max-width: 1380px) {
  .workspace { grid-template-columns: 218px minmax(560px, 1fr) 380px; }
  .phone-shell,.preview-note { width:320px; }
}

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 210px minmax(500px, 1fr); }
  .preview-panel { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .topbar { height: auto; min-height: 66px; padding: 12px 14px; }
  .brand { min-width: 0; }
  .brand small, .save-state, .top-actions .secondary { display: none; }
  .top-actions .button { padding: 0 11px; }
  .workspace { display: block; }
  .step-nav { position: sticky; top: 65px; z-index: 12; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .project-label, .template-lock { display: none; }
  .step-nav ol { display: flex; width: max-content; margin: 0; gap: 5px; }
  .step-nav li button { min-height: 42px; grid-template-columns: 25px auto; padding: 6px 10px; }
  .step-nav li button > b, .step-nav li button small { display: none; }
  .step-index { width: 24px; height: 24px; border-radius: 7px; }
  .editor-section { width: calc(100% - 28px); padding: 28px 0 92px; }
  .section-heading { margin-bottom: 23px; }
  .section-token { display: none; }
  .form-grid.two, .theme-options { grid-template-columns: 1fr; }
  .template-grid, .language-pair, .asset-pair-large { grid-template-columns: 1fr; }
  .customize-row { grid-template-columns: 1fr 1fr; }
  .spot-config > article { grid-template-columns: 34px 1fr; }
  .spot-config > article .bilingual-field { grid-column:2; }
  .classify-items > article { grid-template-columns:34px 90px 1fr; }
  .ar-content-grid { grid-template-columns:1fr; }
  .ar-content-grid .asset-tile { height:180px; }
  .mini-heading { align-items: flex-start; gap: 8px; }
  .mini-heading small { max-width: 150px; text-align: right; }
  .pair-row { grid-template-columns: 36px 1fr; padding: 13px; }
  .pair-assets, .pair-fields { grid-column: 2; }
  .collab-flow { grid-template-columns: 1fr 1fr; }
  .collab-flow > b { display: none; }
  .editor-footer { position: fixed; left: 0; right: 0; bottom: 0; height: 65px; padding: 0 14px; }
  .preview-panel { padding: 24px 14px 88px; }
  .phone-shell { width: min(332px, calc(100vw - 28px)); height: auto; aspect-ratio: 332 / 643; }
  .preview-note { width: min(332px, calc(100vw - 28px)); }
  .standalone { padding: 0; }
  .standalone-phone { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  .back-to-editor { top: 12px; left: 12px; min-height: 36px; background: rgba(255,255,255,.94); }
}

@media (max-width: 520px) {
  .customize-row { grid-template-columns:1fr; }
  .classify-items > article { grid-template-columns:32px 1fr; }
  .classify-items > article > div:last-child { grid-column:2; }
  .classify-items .asset-tile { height:140px; }
}

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