@charset "UTF-8";

:root {
  color-scheme: light;
  --page: #f7f7f2;
  --ink: #30312f;
  --muted: #6f706a;
  --line: #e5e5dc;
  --purple: #8370bd;
  --purple-dark: #705da9;
  --mint: #dfebd9;
  font-family: "Avenir Next", Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, .board:focus-visible { outline: 3px solid #8472bf; outline-offset: 5px; }
button { transition: background .18s, box-shadow .18s, opacity .18s, transform .18s; }
button:active:not(:disabled) { transform: translateY(2px); }
button:disabled:active { transform: none; }
svg { display: inline-block; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-library, [hidden] { display: none !important; }
.app-shell { max-width: 1120px; margin: auto; padding: 0 28px; }
.site-header { height: 91px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { text-decoration: none; color: var(--ink); font-size: 24px; font-weight: 750; letter-spacing: -1.1px; display: flex; align-items: center; gap: 10px; }
.brand-dot { color: var(--purple); }
.brand-mark { width: 26px; height: 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; transform: rotate(-8deg); }
.brand-mark i { background: var(--purple); border-radius: 3px; }
.brand-mark i:last-child { background: #bfd0b2; }
.header-note { font-size: 10px; letter-spacing: 2.4px; color: #989891; margin-left: 8px; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.icon-button { background: transparent; border: 0; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.icon-button:hover { background: #eaeae3; }
.header-divider { width: 1px; height: 18px; background: #ddded5; }
.help-button { background: none; border: 0; font-size: 12px; padding: 10px 0; letter-spacing: .3px; }
.help-button span { display: inline-block; margin-left: 8px; font-size: 18px; }
.intro { display: flex; justify-content: space-between; align-items: center; padding-top: 36px; }
.title-line { display: flex; align-items: center; gap: 22px; }
h1 { font-size: 100px; line-height: 1.08; letter-spacing: -8px; margin: 0; font-weight: 800; }
.title-period { color: #a49bc4; }
.edition { display: inline-flex; gap: 9px; align-items: center; padding: 8px 10px; background: var(--mint); color: #607952; font-size: 9px; font-weight: 750; letter-spacing: 1.1px; border-radius: 5px; transform: rotate(-8deg); margin-top: 9px; white-space: nowrap; }
.edition .icon { width: 13px; height: 13px; }
.intro-title > p { margin: 11px 0 0 4px; font-size: 15px; letter-spacing: 2px; color: #74766d; }
.small-period { color: var(--purple); }
.scores { display: flex; gap: 12px; padding-top: 17px; }
.score-box { width: 130px; min-height: 94px; padding: 17px 20px 12px; background: #efeee9; border: 1px solid #e9e8e1; border-radius: 13px; position: relative; }
.score-label { display: block; color: #82817a; font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
.score-box strong { font-size: min(32px, calc(160px / var(--score-digits, 4))); line-height: 1.45; font-weight: 650; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.best-score { background: #edebf3; border-color: #e5e1ee; }
.best-score .score-label { color: #8a7eaa; }
.best-score .score-label > span { margin-right: 2px; }
.best-score strong { color: #776599; }
#score-gain { position: absolute; right: 16px; top: 34px; color: #7e66b3; font-size: 18px; font-weight: 700; opacity: 0; pointer-events: none; }
#score-gain.animate { animation: score-rise .75s ease-out both; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 302px; gap: 48px; margin-top: 32px; align-items: center; }
.board-stage { height: 483px; position: relative; isolation: isolate; }
.stage-caption { position: absolute; top: 13px; left: 5px; color: #a3a39a; font-size: 9px; letter-spacing: 1.7px; }
.stage-orbit { position: absolute; width: 445px; max-width: 84%; aspect-ratio: 1; border: 1px dashed #dddcd7; border-radius: 50%; top: 7px; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, #e8e6f0 0, #eeedf1 36%, transparent 68%); z-index: -1; }
.stage-orbit::after { content: ""; position: absolute; inset: -24px; border: 1px solid #ecebe5; border-radius: 50%; }
.stage-star { position: absolute; font-weight: 400; color: #a8a0bb; z-index: 1; }
.star-one { top: 45px; right: 27px; font-size: 34px; transform: rotate(12deg); }
.star-two { bottom: 83px; left: 13px; font-size: 28px; color: #b0b8a5; }
.scene { width: min(79%, 432px); aspect-ratio: 1; position: absolute; left: 50%; top: 43%; transform: translate(-50%, -50%); perspective: 1100px; }
.board { width: 100%; height: 100%; position: relative; border-radius: 20px; background: #dddce7; border: 1px solid #e9e8f0; transform: rotateX(32deg) rotateZ(-9deg); transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2,.8,.2,1); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; --board-padding: 16px; --gap: 12px; }
.board:active { cursor: grabbing; }
.board-base { position: absolute; inset: -1px; border-radius: 20px; background: #bcb9cc; transform: translateZ(-18px); box-shadow: 3px 21px 26px -7px #57506633, 9px 45px 55px -15px #57506624; }
.board-edge { position: absolute; background: #c0bccf; }
.board-edge-front { top: calc(100% - 4px); left: 5px; right: 5px; height: 18px; transform-origin: top center; transform: rotateX(-90deg); }
.board-edge-right { left: calc(100% - 4px); top: 5px; bottom: 5px; width: 18px; transform-origin: left center; transform: rotateY(90deg); background: #cbc7d9; }
.cells, .tiles { position: absolute; inset: var(--board-padding); transform-style: preserve-3d; }
.cells { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: var(--gap); }
.grid-row { display: contents; }
.cell { border-radius: 12px; background: #cac8d7; box-shadow: inset 0 2px 5px #76708c17, 0 1px 0 #efedf6; }
.tiles { pointer-events: none; }
.tile { position: absolute; width: calc((100% - 3 * var(--gap)) / 4); height: calc((100% - 3 * var(--gap)) / 4); left: calc(var(--col) * (25% + var(--gap) / 4)); top: calc(var(--row) * (25% + var(--gap) / 4)); transform-style: preserve-3d; transform: translateZ(1px); transition: left .13s ease-in-out, top .13s ease-in-out; --depth: 19px; }
.tile-face { position: absolute; inset: 0; background: var(--tile-color); color: var(--tile-ink); display: flex; justify-content: center; align-items: center; font-family: "Avenir Next", Avenir, Arial, sans-serif; font-size: 43px; font-weight: 750; letter-spacing: -2px; border-radius: 11px; border: 1px solid #ffffff44; box-shadow: inset 0 2px 1px #ffffff55; transform: translateZ(var(--depth)); backface-visibility: hidden; text-shadow: 0 1px 0 #ffffff22; }
.tile::before, .tile::after { content: ""; position: absolute; background: var(--tile-side); }
.tile::before { top: calc(100% - 7px); left: 0; right: 0; height: calc(var(--depth) + 1px); border-radius: 0 0 5px 5px; transform-origin: top center; transform: rotateX(90deg); box-shadow: 0 4px 8px #4c465122; }
.tile::after { left: calc(100% - 7px); top: 1px; bottom: 1px; width: var(--depth); border-radius: 0 5px 5px 0; transform-origin: left center; transform: rotateY(-90deg); filter: brightness(1.055); }
.tile.digits-3 .tile-face { font-size: 34px; }
.tile.digits-4 .tile-face { font-size: 28px; letter-spacing: -1.4px; }
.tile.digits-5 .tile-face { font-size: 21px; letter-spacing: -1px; }
.tile.new-tile { animation: tile-appear .22s cubic-bezier(.2,.9,.3,1.3) both; }
.tile.merged-tile { animation: tile-merge .25s ease-out both; }
.tile.combining { z-index: 2; }
[data-value] { --tile-color: #8170ac; --tile-side: #615080; --tile-ink: #fff9ff; }
[data-value="2"] { --tile-color: #eeede7; --tile-side: #c6c2b9; --tile-ink: #6e6b69; }
[data-value="4"] { --tile-color: #e4e0ed; --tile-side: #bcb1cd; --tile-ink: #78668d; }
[data-value="8"] { --tile-color: #cfc4e5; --tile-side: #a595c0; --tile-ink: #665080; }
[data-value="16"] { --tile-color: #b5a2d5; --tile-side: #8c78af; --tile-ink: #ffffff; }
[data-value="32"] { --tile-color: #a0b998; --tile-side: #738e6c; --tile-ink: #fff; }
[data-value="64"] { --tile-color: #83a78d; --tile-side: #5d8265; --tile-ink: #fff; }
[data-value="128"] { --tile-color: #e1b875; --tile-side: #b18b4f; --tile-ink: #fff; }
[data-value="256"] { --tile-color: #d9a476; --tile-side: #b17c53; --tile-ink: #fff; }
[data-value="512"] { --tile-color: #d98f87; --tile-side: #b46966; --tile-ink: #fff; }
[data-value="1024"] { --tile-color: #bb849e; --tile-side: #916079; --tile-ink: #fff; }
[data-value="2048"] { --tile-color: #8a76b6; --tile-side: #67508e; --tile-ink: #fff; }
.flat-view .board { transform: rotateX(0deg) rotateZ(0deg); }
.stage-bottom { position: absolute; left: 5px; right: 0; bottom: 2px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.board-note { font-size: 10px; letter-spacing: .5px; color: #92918a; display: flex; align-items: center; gap: 7px; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #93a98b; flex-shrink: 0; }
.view-toggle { border: 0; background: none; display: flex; align-items: center; gap: 7px; font-size: 10px; color: #82807f; padding: 9px 0 9px 10px; }
.view-toggle .icon { width: 15px; height: 15px; }
.switch-track { width: 26px; height: 15px; background: #a497c3; border-radius: 9px; display: inline-flex; align-items: center; padding: 3px; margin-left: 1px; }
.switch-track i { width: 9px; height: 9px; border-radius: 50%; background: white; transform: translateX(11px); transition: transform .2s; }
.view-toggle[aria-checked="false"] .switch-track { background: #c4c4bc; }
.view-toggle[aria-checked="false"] .switch-track i { transform: translateX(0); }
.control-panel { padding-top: 8px; }
.goal-card { background: #eeefe6; border: 1px solid #e6e8dc; border-radius: 15px; padding: 23px 23px 20px; }
.goal-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: #858d78; }
.eyebrow { font-size: 8px; font-weight: 600; letter-spacing: 1.55px; }
.goal-heading .icon { width: 17px; height: 17px; }
.goal-card h2 { margin: 17px 0 9px; font-size: 25px; font-weight: 500; letter-spacing: .5px; }
.goal-card h2 > span { font-weight: 750; letter-spacing: -.8px; color: #62775a; }
.goal-card > p { font-size: 10px; color: #939486; line-height: 1.8; margin: 0 0 25px; }
.progress-track { height: 5px; border-radius: 3px; background: #dddfd2; overflow: hidden; }
#progress-fill { width: 9.09%; height: 100%; background: #98ac88; border-radius: inherit; transition: width .4s ease; }
.progress-labels { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 9px; color: #929587; }
.progress-labels strong { font-size: 11px; color: #6e7f60; margin-left: 5px; font-weight: 700; }
.game-actions { display: grid; gap: 11px; margin-top: 23px; }
.button { min-height: 49px; border-radius: 9px; border: 1px solid transparent; padding: 11px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 500; letter-spacing: .5px; width: 100%; }
.button-primary { color: #fff; background: var(--purple); box-shadow: 0 3px 0 #655199; }
.button-primary:hover { background: var(--purple-dark); }
.button-primary:active { box-shadow: 0 1px 0 #655199; }
.button-primary .icon { width: 19px; height: 19px; }
.button-secondary { background: transparent; border-color: #dedfd5; color: #72736c; }
.button-secondary:hover:not(:disabled) { background: #eeeeE6; }
.button-secondary > span { display: inline-flex; align-items: center; gap: 10px; }
.button-secondary .icon { width: 16px; height: 16px; }
kbd { font: 10px "Avenir Next", sans-serif; border: 1px solid #d6d7cf; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; color: #94958b; }
.control-guide { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.direction-pad { width: 88px; display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(2, 25px); gap: 4px; flex-shrink: 0; }
.direction-pad button { border: 1px solid #dfdfd7; background: #fafaf5; box-shadow: 0 2px 0 #ddded3; border-radius: 5px; color: #929585; font-family: Arial, sans-serif; font-size: 13px; padding: 0; }
.direction-pad button:hover { background: #e6e1ef; color: var(--purple-dark); }
.direction-pad button:first-child { grid-column: 2; }
.direction-pad button:nth-child(2) { grid-column: 1; }
.control-guide strong { font-size: 10px; font-weight: 500; }
.control-guide p { font-size: 9px; color: #92948a; line-height: 1.9; margin: 5px 0 0; }
.session-meta { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; color: #a0a096; font-size: 9px; }
.session-meta strong { color: #777c6c; font-weight: 650; padding: 0 4px; font-variant-numeric: tabular-nums; }
.session-meta > span:last-child > span { margin-left: 5px; }
.tile-journey { display: flex; align-items: center; gap: 30px; padding: 23px 27px; border: 1px solid #e6e5dd; border-radius: 12px; margin: 32px 0 30px; background: #f3f3ec; }
.journey-caption { display: flex; gap: 12px; align-items: center; color: #8f9287; line-height: 1.9; font-size: 9px; }
.journey-caption > .icon { color: #b0b59e; width: 24px; height: 24px; }
.journey-caption strong { color: #6e7363; font-size: 10px; font-weight: 500; }
.journey-tiles { display: flex; justify-content: center; align-items: center; gap: 17px; flex: 1; }
.mini-tile { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; background: var(--tile-color); color: var(--tile-ink); box-shadow: 0 4px 0 var(--tile-side), inset 0 1px 0 #ffffff80; border-radius: 6px; font-size: 14px; font-weight: 700; font-family: "Avenir Next", Arial, sans-serif; transform: rotate(-6deg); flex-shrink: 0; }
.journey-tiles .mini-tile { opacity: .53; transition: opacity .3s, transform .3s; }
.journey-tiles .mini-tile.reached { opacity: 1; }
.journey-tiles .journey-goal { width: 46px; font-size: 12px; transform: rotate(6deg); opacity: .85; }
.journey-dot, .journey-more { color: #b9baaf; font-size: 14px; letter-spacing: 2px; }
.journey-end { font-size: 8px; letter-spacing: 1.3px; color: #9fa391; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 20px 0 27px; font-size: 9px; color: #a4a69c; letter-spacing: .3px; }
#save-status { display: flex; align-items: center; gap: 7px; }
.footer-signature { font-size: 8px; letter-spacing: 1px; }
.game-overlay { position: absolute; inset: 0 0 37px; display: flex; align-items: center; justify-content: center; z-index: 5; border-radius: 22px; background: #f7f7f2b8; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.end-card { text-align: center; max-width: 300px; padding: 25px; }
.end-symbol { display: block; color: #9382b6; font-size: 46px; margin-bottom: 10px; }
.end-card .eyebrow { color: #8b7f9e; }
.end-card h2 { font-size: 30px; letter-spacing: -1px; margin: 12px 0; }
.end-card p { font-size: 12px; color: #868478; line-height: 1.9; }
.end-card .button { margin-top: 12px; }
.confetti { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: 7px; height: 12px; top: -15px; background: var(--confetti-color); animation: confetti-fall 2.5s ease-in var(--delay) both; }
.modal { width: min(430px, calc(100% - 36px)); border: 1px solid #e4e1dc; padding: 35px; border-radius: 20px; background: #f9f9f4; color: var(--ink); box-shadow: 0 30px 100px #39304833; }
.modal::backdrop { background: #35313d50; backdrop-filter: blur(5px); }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal .eyebrow { color: #9181ac; font-size: 8px; }
.modal h2 { font-size: 25px; letter-spacing: -.5px; margin: 16px 0; }
.modal p { font-size: 12px; line-height: 2; color: #84847a; }
.modal p strong { font-weight: 550; color: #6e677a; }
.merge-example { display: flex; justify-content: center; gap: 18px; align-items: center; padding: 20px 0 25px; }
.merge-example .mini-tile { width: 52px; height: 48px; font-size: 24px; }
.merge-example b { font-size: 18px; color: #a8a89a; font-weight: 400; }
.shortcut-row { display: flex; gap: 30px; margin: 20px 0 24px; font-size: 10px; color: #939388; }
.shortcut-row kbd { margin-right: 6px; }
.dialog-actions { display: flex; gap: 12px; margin-top: 26px; }
.dialog-actions .button { justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes tile-appear { from { opacity: 0; transform: translateZ(1px) scale(.4); } to { opacity: 1; transform: translateZ(1px) scale(1); } }
@keyframes tile-merge { 0%,100% { transform: translateZ(1px) scale(1); } 50% { transform: translateZ(11px) scale(1.09); } }
@keyframes score-rise { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-48px); } }
@keyframes confetti-fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(510px) rotate(540deg); opacity: 0; } }

@media (min-width: 1300px) { .app-shell { padding: 0; } .play-layout { grid-template-columns: minmax(0, 1fr) 306px; gap: 78px; } }
@media (max-width: 1000px) {
  .play-layout { gap: 26px; grid-template-columns: minmax(0, 1fr) 275px; }
  .scene { width: 84%; }
  .board-stage { height: 451px; }
  .stage-caption { font-size: 8px; }
  .star-one { right: 4px; top: 37px; }
  .tile-face { font-size: 35px; }
  .tile.digits-3 .tile-face { font-size: 29px; }
  .tile.digits-4 .tile-face { font-size: 23px; }
  .tile.digits-5 .tile-face { font-size: 17px; }
  .journey-end { display: none; }
  .journey-tiles { gap: 14px; }
  .board-note { font-size: 9px; letter-spacing: 0; }
}
@media (max-width: 740px) {
  .app-shell { max-width: 530px; padding: 0 23px; }
  .site-header { height: 73px; }
  .brand { font-size: 21px; }
  .brand-mark { width: 23px; height: 23px; }
  .header-note { display: none; }
  .header-actions { gap: 12px; }
  .help-button { font-size: 11px; }
  .intro { padding-top: 27px; align-items: flex-start; }
  .title-line { gap: 10px; align-items: flex-start; position: relative; }
  h1 { font-size: clamp(52px, 15vw, 74px); letter-spacing: -5px; line-height: 1; }
  .edition { font-size: 6px; letter-spacing: .5px; gap: 4px; padding: 5px 6px; position: absolute; top: -12px; left: 105px; }
  .edition .icon { width: 9px; height: 9px; }
  .intro-title > p { font-size: 10px; letter-spacing: 1px; margin: 10px 0 0 2px; }
  .scores { gap: 7px; padding-top: 4px; }
  .score-box { width: 73px; min-height: 69px; border-radius: 9px; padding: 11px 9px 7px; }
  .score-label { font-size: 8px; letter-spacing: .2px; }
  .score-box strong { font-size: min(24px, calc(96px / var(--score-digits, 4))); letter-spacing: -.5px; }
  #score-gain { font-size: 14px; top: 24px; }
  .play-layout { display: flex; flex-direction: column; gap: 16px; margin-top: 25px; }
  .board-stage { width: 100%; height: min(104vw, 465px); }
  .scene { width: 82%; max-width: 362px; top: 46%; }
  .board { --board-padding: 12px; --gap: 10px; border-radius: 16px; }
  .board-base { border-radius: 16px; }
  .cell { border-radius: 9px; }
  .tile { --depth: 16px; }
  .tile-face { border-radius: 9px; font-size: 34px; letter-spacing: -1px; }
  .tile.digits-3 .tile-face { font-size: 27px; }
  .tile.digits-4 .tile-face { font-size: 21px; letter-spacing: -.9px; }
  .tile.digits-5 .tile-face { font-size: 16px; letter-spacing: -.5px; }
  .stage-caption { top: 5px; left: 2px; font-size: 7px; }
  .stage-orbit { top: 27px; width: 83%; }
  .stage-orbit::after { inset: -15px; }
  .star-one { top: 33px; right: 5px; font-size: 25px; }
  .star-two { bottom: 65px; left: 2px; font-size: 22px; }
  .stage-bottom { bottom: 0; left: 0; }
  .board-note { font-size: 9px; }
  .view-toggle { font-size: 9px; }
  .control-panel { width: 100%; padding-top: 0; display: grid; grid-template-columns: 1fr; }
  .game-actions { grid-row: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 11px; margin-top: 0; }
  .button { min-height: 47px; font-size: 11px; padding: 11px 14px; }
  .button-secondary > span { gap: 7px; }
  .goal-card { grid-row: 2; margin-top: 23px; padding: 18px 20px; }
  .goal-heading { float: right; margin-top: 3px; }
  .goal-heading .eyebrow { display: none; }
  .goal-card h2 { font-size: 20px; margin: 0 0 5px; }
  .goal-card > p { font-size: 10px; margin-bottom: 17px; }
  .control-guide { justify-content: center; gap: 24px; margin-top: 24px; }
  .direction-pad { width: 115px; grid-template-columns: repeat(3, 35px); grid-template-rows: repeat(2, 31px); gap: 5px; }
  .control-guide strong { font-size: 11px; }
  .control-guide p { font-size: 10px; }
  .session-meta { margin-top: 24px; }
  .tile-journey { margin-top: 26px; margin-bottom: 24px; padding: 18px 12px; justify-content: center; }
  .journey-caption { display: none; }
  .journey-tiles { gap: 9px; }
  .journey-dot { font-size: 10px; }
  .mini-tile { width: 30px; height: 29px; font-size: 12px; border-radius: 5px; }
  .journey-tiles .journey-goal { width: 40px; font-size: 10px; }
  .journey-more { letter-spacing: 0; }
  footer { font-size: 8px; gap: 12px; padding-top: 17px; }
  .footer-signature { display: none; }
  .modal { padding: 31px 25px; }
}
@media (max-width: 370px) {
  .app-shell { padding: 0 17px; }
  h1 { font-size: 52px; letter-spacing: -4px; }
  .edition { left: 72px; }
  .score-box { width: 65px; padding-inline: 7px; }
  .score-box strong { font-size: min(21px, calc(88px / var(--score-digits, 4))); }
  .board { --board-padding: 10px; --gap: 8px; }
  .journey-tiles { gap: 9px; }
  .journey-dot { display: none; }
  .tile-face { font-size: 29px; }
  .tile.digits-4 .tile-face { font-size: 18px; }
  .board-stage { height: 104vw; }
  .end-card { padding: 14px; }
  .end-symbol { font-size: 32px; }
  .end-card h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
  .confetti { display: none; }
}

/* Company entry points keep the game independent while sharing its language. */
#return-home { color: #606955; font-size: 11px; text-decoration: none; white-space: nowrap; }
#return-home:hover { text-decoration: underline; }
#game-language { font-size: 11px; }
.is-embedded #return-home, .is-embedded #game-language { display: none; }
.help-button > span[data-game-text] { font-size: inherit; margin-left: 0; }
.explorer-badge { display: flex; align-items: center; gap: 17px; margin-top: 28px; padding: 21px 25px; border: 1px solid #b9cca4; border-radius: 12px; background: #e8f1dc; color: #435c32; }
.explorer-symbol { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #a9c38d; border-radius: 50%; background: #d0edaa; font-size: 27px; }
.explorer-badge strong { font-size: 17px; font-weight: 600; }
.explorer-badge p { font-size: 12px; margin: 5px 0; }
.explorer-badge small { font-size: 10px; color: #5e714f; }
html[lang="en"] .intro-title > p { letter-spacing: .3px; }
html[lang="en"] .goal-heading .eyebrow { letter-spacing: .6px; }
html[lang="en"] .session-meta { flex-wrap: wrap; gap: 5px; }
@media (max-width: 700px) {
  .site-header { gap: 10px; }
  #return-home { font-size: 9px; }
  .header-actions { gap: 9px; }
  html:not(.is-embedded) .header-note { display: none; }
  .explorer-badge { padding: 17px; gap: 12px; }
  html[lang="en"] .intro-title > p { font-size: 12px; }
  html[lang="en"] .board-note { font-size: 9px; }
  .journey-tiles { gap: 5px; }
}
@media (max-width: 370px) {
  html:not(.is-embedded) .brand { font-size: 18px; gap: 7px; }
  html:not(.is-embedded) .header-divider { display: none; }
  html[lang="en"] .help-button { font-size: 10px; }
  html[lang="en"] .score-label { font-size: 9px; letter-spacing: .5px; }
}
