:root {
  --ink: #173f3b;
  --ink-soft: #42645f;
  --cream: #fff8e8;
  --paper: #fffdf5;
  --coral: #f2674a;
  --coral-dark: #d94c33;
  --mango: #f9b52f;
  --leaf: #3f9c72;
  --leaf-dark: #28785a;
  --sky: #8dd5d2;
  --purple: #7553a6;
  --shadow: 0 18px 50px rgba(34, 70, 62, .16);
  --soft-shadow: 0 9px 22px rgba(34, 70, 62, .13);
  --radius-xl: 30px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .5) 0 8%, transparent 8.2%),
    linear-gradient(145deg, #cce9dc 0%, #f5d6a5 58%, #f4b48f 100%);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; }
button { color: inherit; touch-action: manipulation; user-select: none; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(242, 103, 74, .34); outline-offset: 3px; }

.app-shell {
  position: relative;
  width: min(100%, 720px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 90px rgba(23, 63, 59, .25);
}

.ambient { position: absolute; border-radius: 999px; pointer-events: none; filter: blur(2px); }
.ambient-one { width: 210px; height: 210px; top: -92px; right: -74px; background: rgba(249, 181, 47, .56); }
.ambient-two { width: 170px; height: 170px; left: -96px; bottom: 12%; background: rgba(141, 213, 210, .36); }

.screen { position: relative; z-index: 1; min-height: 100dvh; display: none; }
.screen.is-active { display: flex; flex-direction: column; animation: screen-in .35s ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }

.topbar, .game-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) 20px 10px;
}

.icon-button, .round-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.profile-chip, .coin-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  padding: 5px 9px 5px 6px;
  background: rgba(255, 253, 245, .84);
  box-shadow: 0 7px 18px rgba(34, 70, 62, .09);
  cursor: pointer;
}

.profile-chip { justify-self: start; font-size: 13px; font-weight: 750; }
.profile-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: white; background: var(--leaf); font-size: 12px; font-weight: 900; }
.coin-chip { font-size: 15px; }
.coin-chip strong { min-width: 28px; text-align: right; }
.coin-mark { display: grid; place-items: center; width: 31px; height: 31px; }
.coin-mark img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(111, 75, 15, .24)); }
.plus-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: white; background: var(--leaf); font-weight: 900; }

.home-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3vh 24px max(24px, env(safe-area-inset-bottom));
}

.brand-lockup { align-self: stretch; position: relative; padding: 5px 8px 0; z-index: 2; }
.brand-kicker, .modal-kicker { color: var(--coral); font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.brand-lockup h1 { margin: 2px 0 7px; font-size: clamp(52px, 14vw, 84px); line-height: .86; letter-spacing: -.08em; }
.brand-lockup h1 em { color: var(--coral); font-style: normal; }
.brand-lockup p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.market-illustration {
  position: relative;
  width: min(92%, 410px);
  height: clamp(190px, 34vh, 285px);
  margin: -9px auto 2px;
}
.hero-art { width: 100%; height: 100%; display: block; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 16px 18px rgba(40, 83, 67, .13)); }

.level-card { width: min(100%, 450px); display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; padding: 13px 16px; border: 1px solid rgba(23,63,59,.08); border-radius: 20px; background: rgba(255,255,255,.62); backdrop-filter: blur(8px); }
.level-card small, .level-card strong { display: block; }
.level-card small { color: var(--ink-soft); font-size: 11px; }
.level-card strong { margin-top: 2px; font-size: 19px; }
.level-stamps { display: flex; gap: 6px; }
.stamp { width: 30px; height: 30px; display: grid; place-items: center; border: 2px dashed rgba(23,63,59,.22); border-radius: 50%; color: rgba(23,63,59,.38); font-weight: 900; }
.stamp.is-filled { color: white; border-style: solid; border-color: var(--coral); background: var(--coral); transform: rotate(-8deg); }

.play-button, .primary-button, .secondary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}
.play-button { width: min(100%, 450px); min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 15px; color: white; background: linear-gradient(135deg, var(--coral), #fa8b54); box-shadow: 0 13px 0 var(--coral-dark), 0 24px 35px rgba(217, 76, 51, .25); text-align: left; }
.play-button:active { transform: translateY(6px); box-shadow: 0 7px 0 var(--coral-dark), 0 15px 25px rgba(217, 76, 51, .22); }
.play-icon { width: 43px; height: 43px; display: grid; place-items: center; background: white; border-radius: 50%; }
.play-icon::after { content: ""; width: 0; height: 0; margin-left: 4px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 14px solid var(--coral); }
.play-button strong, .play-button small { display: block; }
.play-button strong { font-size: 23px; letter-spacing: .17em; }
.play-button small { margin-top: 1px; font-size: 9px; opacity: .82; letter-spacing: .16em; }
.text-button { border: 0; padding: 13px 20px; background: transparent; color: var(--ink-soft); font-weight: 800; cursor: pointer; }

.game-screen { background: linear-gradient(#dff2e9 0 17%, var(--cream) 42%); }
.game-topbar { grid-template-columns: auto 1fr auto; padding-bottom: 8px; }
.pause-button { color: white; background: var(--coral); box-shadow: 0 5px 0 var(--coral-dark); }
.level-heading { text-align: center; line-height: 1; }
.level-heading small { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 10px; letter-spacing: .23em; }
.level-heading strong { font-size: 21px; letter-spacing: .05em; }
.coin-chip.compact { justify-self: end; }

.game-status { position: relative; padding: 1px 22px 10px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 11px; color: var(--ink-soft); }
.progress-copy strong { color: var(--ink); }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(23,63,59,.12); }
.progress-track span { position: relative; display: block; width: 0; height: 100%; overflow: hidden; border-radius: inherit; background: linear-gradient(90deg, var(--leaf), #7ac56f); transition: width .35s ease; }
.progress-track span::after { content: ""; position: absolute; inset: 0; width: 44%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: progress-glint 2.8s ease-in-out infinite; }
@keyframes progress-glint { from { transform: translateX(-120%); } to { transform: translateX(340%); } }
.combo-pill { position: absolute; z-index: 4; right: 24px; top: 21px; opacity: 0; transform: translateY(5px) scale(.8); padding: 5px 9px; border-radius: 999px; color: white; background: var(--coral); font-size: 10px; font-weight: 900; transition: .2s ease; }
.combo-pill.is-visible { opacity: 1; transform: translateY(0) scale(1); }

.market-board { padding: 0 15px; }
.board-awning { position: relative; z-index: 3; height: 34px; display: flex; padding: 0 5px; filter: drop-shadow(0 6px 5px rgba(58,48,31,.16)); }
.board-awning i { flex: 1; border-radius: 8px 8px 13px 13px; background: var(--paper); }
.board-awning i:nth-child(odd) { background: var(--coral); }
.shelf-wrap { position: relative; margin-top: -3px; padding: 13px 9px 35px; border: 6px solid #7b5031; border-bottom-width: 15px; border-radius: 8px 8px 20px 20px; background: linear-gradient(165deg, rgba(255,255,255,.93), rgba(216,237,224,.92)); box-shadow: inset 0 0 0 4px #b77d4e, var(--shadow); }
.shelf-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 calc((100% / var(--columns, 6)) - 2px), rgba(80,104,95,.12) calc((100% / var(--columns, 6)) - 2px) calc(100% / var(--columns, 6))); }
.fruit-board { position: relative; z-index: 1; min-height: 180px; display: grid; grid-template-columns: repeat(var(--columns, 6), minmax(0, 1fr)); align-items: end; gap: 4px; }
.fruit-stack { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 1px; }
.fruit-token { position: relative; width: min(47px, 100%); aspect-ratio: 1; display: grid; place-items: center; border: 0; padding: 0; border-radius: 46% 54% 50% 50%; background: transparent; filter: drop-shadow(0 4px 3px rgba(36,56,45,.16)); transition: transform .2s ease, filter .2s ease, opacity .2s ease; }
.fruit-token img { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.fruit-token.is-exposed { cursor: pointer; animation: fruit-ready 2s ease-in-out infinite; }
.fruit-token.is-exposed::after { content: ""; position: absolute; inset: 1px; border-radius: 50%; border: 2px solid rgba(255,255,255,.8); box-shadow: 0 0 0 2px rgba(63,156,114,.25); }
.fruit-token.is-special img { filter: drop-shadow(0 0 7px rgba(255,232,117,.9)) drop-shadow(0 5px 4px rgba(47,61,52,.18)); }
.fruit-token.is-special::before { content: ""; position: absolute; z-index: -1; inset: -5px; border-radius: 50%; opacity: .72; background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.85), transparent 28%, rgba(255,255,255,.7), transparent 62%); animation: special-glint 2.8s linear infinite; }
.fruit-token.special-golden.is-exposed::after { border-color: #fff3a3; box-shadow: 0 0 0 3px rgba(243,173,34,.3), 0 0 18px rgba(243,173,34,.55); }
.fruit-token.special-rainbow.is-exposed::after { border-color: #fff; box-shadow: 0 0 0 3px rgba(139,104,189,.28), 0 0 18px rgba(89,199,193,.65); }
@keyframes special-glint { to { transform: rotate(360deg); } }
.fruit-token.is-tutorial-target { z-index: 3; animation: tutorial-fruit 1.05s ease-in-out infinite; }
.fruit-token.is-tutorial-target::after { inset: -3px; border: 3px solid #fff4a9; box-shadow: 0 0 0 4px rgba(249,181,47,.28), 0 0 19px rgba(249,181,47,.62); }
.tutorial-pointer { position: absolute; z-index: 6; left: 50%; top: -26px; width: 27px; height: 27px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: linear-gradient(145deg, #ff9169, var(--coral)); box-shadow: 0 6px 13px rgba(217,76,51,.3); transform: translateX(-50%); animation: tutorial-pointer .8s ease-in-out infinite; }
.tutorial-pointer::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 8px; height: 8px; border-right: 3px solid var(--coral); border-bottom: 3px solid var(--coral); transform: translateX(-50%) rotate(45deg); }
.tutorial-pointer .ui-icon { width: 14px; height: 14px; }
@keyframes tutorial-fruit { 50% { transform: translateY(-5px) scale(1.08); filter: saturate(1.15) drop-shadow(0 8px 7px rgba(217,76,51,.2)); } }
@keyframes tutorial-pointer { 50% { transform: translate(-50%, -5px) scale(1.06); } }
.fruit-token:not(.is-exposed) { pointer-events: none; filter: saturate(.88) drop-shadow(0 3px 2px rgba(36,56,45,.13)); }
.fruit-token.is-exposed:hover { transform: translateY(-4px) scale(1.07); filter: drop-shadow(0 7px 5px rgba(36,56,45,.24)); }
.fruit-token.is-removing { visibility: hidden; transform: none; opacity: 0; transition: none; animation: none; }
.fruit-token.just-dropped { animation: fruit-drop .5s cubic-bezier(.18,.82,.22,1.2) both; }
@keyframes fruit-ready { 50% { transform: translateY(-2px); } }
@keyframes fruit-drop { from { transform: translateY(-42px) scale(.92); opacity: .25; } 70% { transform: translateY(4px) scale(1.03); opacity: 1; } to { transform: none; opacity: 1; } }
.wood-shelf { position: absolute; z-index: 2; left: -10px; right: -10px; bottom: 10px; height: 23px; display: flex; justify-content: space-around; border-radius: 6px; background: linear-gradient(#bd8250, #805033); border: 3px solid #6a432b; box-shadow: 0 5px 8px rgba(68,44,28,.22); }
.wood-shelf span { width: 3px; background: rgba(89,52,28,.24); }

.zone-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.zone-label span { font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.zone-label small { color: var(--ink-soft); font-size: 9px; }
.zone-label em { display: inline-block; margin-left: 4px; padding: 2px 6px; border-radius: 999px; color: white; background: var(--coral); font-size: 8px; font-style: normal; letter-spacing: .02em; vertical-align: 1px; }
.zone-label small b { color: var(--coral-dark); }
.buffer-zone { padding: 11px 20px 3px; }
.buffer-slots { display: flex; justify-content: center; gap: 5px; }
.buffer-slot { position: relative; width: min(45px, 11vw); aspect-ratio: 1; display: grid; place-items: center; border: 2px dashed rgba(23,63,59,.21); border-radius: 13px; padding: 0; color: rgba(23,63,59,.35); background: rgba(255,255,255,.66); font-size: clamp(21px, 6vw, 31px); }
.buffer-slot.is-locked { border-style: solid; color: white; background: #47706a; font-size: 15px; }
.buffer-slot.has-fruit { overflow: hidden; border-style: solid; border-color: var(--basket-edge); background: color-mix(in srgb, var(--hold-color), white 34%); box-shadow: 0 4px 0 color-mix(in srgb, var(--basket-edge), #173f3b 24%), var(--soft-shadow); animation: slot-pop .3s cubic-bezier(.18,.82,.22,1.2) both; }
.buffer-slot.is-removing .buffer-fruit-image { visibility: hidden; }
.buffer-slot.has-fruit::after { content: "HOLD"; position: absolute; right: 2px; bottom: 2px; padding: 1px 4px; border-radius: 999px; color: white; background: rgba(23,63,59,.78); font-size: 6px; font-weight: 900; line-height: 1.25; }
.buffer-fruit-image { position: relative; z-index: 1; width: 88%; height: 88%; display: block; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(23,63,59,.2)); }
.lock-shape { position: relative; width: 15px; height: 12px; margin-top: 5px; border-radius: 3px; background: #ffe285; box-shadow: inset 0 -2px rgba(143, 93, 15, .22); }
.lock-shape::before { content: ""; position: absolute; width: 9px; height: 9px; left: 3px; top: -8px; border: 3px solid #ffe285; border-bottom: 0; border-radius: 8px 8px 0 0; }
@keyframes slot-pop { from { transform: scale(.7); } }
.buffer-slot.just-parked { animation: park-bounce .55s cubic-bezier(.18,.82,.22,1.2) both; }
@keyframes park-bounce { 0% { transform: translateY(-18px) scale(.72); opacity: 0; } 60% { transform: translateY(3px) scale(1.08); } 100% { transform: none; opacity: 1; } }

.basket-zone { padding: 10px 18px 7px; }
.dispatch-guide { display: flex; align-items: center; justify-content: center; gap: 7px; margin: -1px 0 9px; color: var(--ink-soft); font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.dispatch-guide i { position: relative; width: 34px; height: 1px; background: rgba(23,63,59,.28); }
.dispatch-guide i::after { content: ""; position: absolute; right: -1px; top: -3px; width: 6px; height: 6px; border-top: 1px solid rgba(23,63,59,.38); border-right: 1px solid rgba(23,63,59,.38); transform: rotate(45deg); }
.basket-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.basket { position: relative; min-height: 132px; border: 0; padding: 0; color: var(--ink); background: transparent; box-shadow: none; cursor: default; overflow: visible; transition: transform .18s ease, filter .18s ease; }
.basket::before { content: ""; position: absolute; z-index: 0; inset: 20% 3% 4%; border: 2px solid color-mix(in srgb, var(--basket-edge), transparent 58%); border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--basket-bg), white 18%) 0 42%, transparent 74%); filter: blur(.2px); opacity: .78; transition: .18s ease; }
.basket-art { position: absolute; z-index: 1; inset: 0; display: block; pointer-events: none; }
.basket-shell { position: absolute; z-index: 1; width: 74%; aspect-ratio: 1; left: 13%; top: -8px; display: block; object-fit: contain; transform: scaleX(1.28); transform-origin: center 65%; filter: drop-shadow(0 8px 5px rgba(78,50,20,.23)); }
.basket .basket-fruit { position: absolute; z-index: 2; width: clamp(43px, 10vw, 58px); aspect-ratio: 1; left: 50%; top: 29%; display: block; object-fit: contain; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 3px rgba(0,0,0,.18)); }
.basket-lip { position: absolute; z-index: 3; width: 55%; height: 12px; left: 22.5%; top: 48%; border: 2px solid #835126; border-radius: 999px; background: linear-gradient(#f3c46e 0 42%, #bd7a31 46% 100%); box-shadow: inset 0 2px rgba(255,244,181,.75), 0 2px 3px rgba(64,41,20,.16); transform: perspective(50px) rotateX(7deg); }
.basket .basket-name { position: absolute; z-index: 4; left: 21%; right: 21%; bottom: 29px; display: block; overflow: hidden; padding: 2px 3px; border: 1px solid color-mix(in srgb, var(--basket-edge), #75481f 42%); border-radius: 999px; background: rgba(255,253,239,.9); box-shadow: 0 2px 4px rgba(74,48,24,.13); font-size: 9px; font-weight: 950; letter-spacing: .06em; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.basket-status { position: absolute; z-index: 4; left: 27%; right: 27%; bottom: 13px; display: block; padding: 2px 4px; border-radius: 999px; color: white; background: var(--leaf); font-size: 7px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.basket.is-waiting { filter: saturate(.62); }
.basket.is-waiting .basket-status { color: rgba(255,255,255,.82); background: #78918c; }
.basket.is-ready { animation: basket-ready 2.2s ease-in-out infinite; }
.basket.is-ready::before { opacity: 1; box-shadow: 0 0 0 4px rgba(255,255,255,.72), 0 0 0 7px color-mix(in srgb, var(--basket-edge), transparent 72%); }
@keyframes basket-ready { 50% { transform: translateY(-2px); } }
.basket-capacity { position: absolute; z-index: 4; left: 22%; right: 22%; bottom: 3px; display: flex; justify-content: center; gap: 2px; }
.basket-capacity i { width: 6px; height: 6px; border-radius: 50%; background: rgba(23,63,59,.16); box-shadow: inset 0 1px 1px rgba(23,63,59,.1); }
.basket-capacity i.is-filled { background: var(--coral); }
.basket-count { position: absolute; z-index: 5; right: 7px; top: 4px; min-width: 28px; padding: 3px 5px; border: 2px solid rgba(255,255,255,.78); border-radius: 999px; color: white; background: rgba(23,63,59,.88); box-shadow: 0 3px 7px rgba(23,63,59,.18); font-size: 7px; font-weight: 900; }

.booster-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: auto; padding: 9px 14px max(12px, env(safe-area-inset-bottom)); background: var(--ink); }
.booster { position: relative; min-width: 0; display: grid; justify-items: center; gap: 1px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; padding: 6px 4px; color: white; background: rgba(255,255,255,.07); cursor: pointer; }
.booster-icon { width: 36px; height: 36px; display: block; }
.booster-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }
.booster-copy strong, .booster-copy small { display: block; text-align: center; white-space: nowrap; }
.booster-copy strong { font-size: 10px; }
.booster-copy small { display: none; color: rgba(255,255,255,.55); font-size: 8px; }
.booster b { position: absolute; right: 4px; top: 4px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; color: var(--ink); background: var(--mango); font-size: 9px; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: max(100px, calc(env(safe-area-inset-bottom) + 90px)); max-width: min(85vw, 430px); opacity: 0; pointer-events: none; transform: translate(-50%, 15px); padding: 10px 17px; border-radius: 999px; color: white; background: rgba(23,63,59,.94); box-shadow: var(--soft-shadow); font-size: 12px; font-weight: 750; text-align: center; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; background: rgba(13,42,38,.62); backdrop-filter: blur(7px); }
.modal { z-index: 51; width: min(calc(100% - 36px), 450px); max-height: min(84dvh, 700px); margin: auto; border: 0; border-radius: var(--radius-xl); padding: 29px 25px 24px; color: var(--ink); background: var(--paper); box-shadow: 0 28px 75px rgba(16,45,41,.34); }
.modal[open] { animation: modal-in .26s cubic-bezier(.2,.8,.2,1) both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.modal::backdrop { background: transparent; }
.modal-close { position: absolute; top: 13px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: white; background: var(--coral); font-size: 22px; font-weight: 900; cursor: pointer; }
.modal h2 { margin: 5px 0 18px; font-size: clamp(24px, 7vw, 34px); letter-spacing: -.04em; }
.modal p { color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.guide-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0 0 21px; padding: 0; }
.guide-list li { min-width: 0; min-height: 86px; display: grid; place-items: center; gap: 3px; border: 1px solid rgba(23,63,59,.08); border-radius: 18px; padding: 7px 6px; background: linear-gradient(145deg, #fff, #f0f5ec); text-align: center; }
.guide-list li:last-child { grid-column: 1 / -1; min-height: 76px; grid-template-columns: 72px auto; justify-content: center; padding-inline: 16px; }
.guide-list strong { display: block; overflow: hidden; font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.guide-icon { width: 49px; height: 49px; display: flex; align-items: center; justify-content: center; }
.guide-icon img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(23,63,59,.13)); }
.guide-icon.guide-pair { width: 64px; }
.guide-icon.guide-pair img { width: 40px; height: 40px; margin-inline: -5px; }
.guide-icon.guide-cluster { position: relative; width: 62px; height: 58px; }
.guide-icon.guide-cluster img { position: absolute; width: 32px; height: 32px; }
.guide-icon.guide-cluster img:nth-child(1) { top: 0; left: 15px; }
.guide-icon.guide-cluster img:nth-child(2) { bottom: 0; left: 0; }
.guide-icon.guide-cluster img:nth-child(3) { right: 0; bottom: 0; }
.guide-icon.special-pair img { width: 46px; height: 46px; }
.primary-button, .secondary-button { width: 100%; min-height: 51px; padding: 11px 17px; }
.primary-button { color: white; background: var(--coral); box-shadow: 0 6px 0 var(--coral-dark); }
.secondary-button { margin-top: 11px; color: var(--ink); background: #e7f1e9; box-shadow: 0 5px 0 #c9dccd; }
.setting-list { display: grid; gap: 9px; margin-bottom: 20px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border: 0; border-radius: 15px; padding: 9px 13px; background: #f0f3eb; font-weight: 800; cursor: pointer; }
.toggle { width: 42px; height: 24px; padding: 3px; border-radius: 999px; background: #b7c2bd; transition: .2s; }
.toggle::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: .2s; }
.toggle.is-on { background: var(--leaf); }
.toggle.is-on::after { transform: translateX(18px); }
.input-label { display: grid; gap: 7px; margin-bottom: 18px; color: var(--ink-soft); font-size: 11px; font-weight: 850; }
.input-label input { width: 100%; min-height: 50px; border: 2px solid #d7e4da; border-radius: 14px; padding: 9px 13px; color: var(--ink); background: white; font-size: 16px; }
.shop-modal { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(23,63,59,.22) transparent; }
.shop-modal::-webkit-scrollbar { width: 5px; }
.shop-modal::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(23,63,59,.22); }
.shop-grid { display: grid; gap: 8px; }
.store-grid { display: grid; gap: 9px; }
.store-product { min-width: 0; min-height: 72px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid #e2e8df; border-radius: 18px; padding: 7px 10px 7px 7px; color: var(--ink); background: linear-gradient(145deg, #fff, #f4f7f0); box-shadow: 0 5px 13px rgba(23,63,59,.07); text-align: left; cursor: pointer; }
.store-product.is-featured { border-color: rgba(242,103,74,.45); background: linear-gradient(145deg, #fff7e5, #ffe7bd); }
.store-product:disabled { opacity: .52; cursor: default; filter: grayscale(.35); }
.store-product-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 15px; color: white; background: linear-gradient(145deg, var(--coral), #e4513b); box-shadow: inset 0 1px rgba(255,255,255,.35), 0 4px 9px rgba(216,75,50,.18); }
.store-product-icon .ui-icon { width: 21px; height: 21px; }
.store-product-icon.art-icon { overflow: visible; background: transparent; box-shadow: none; }
.store-product-icon.art-icon img { width: 112%; height: 112%; display: block; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(23,63,59,.14)); }
.store-product-icon.coin-product { overflow: hidden; background: #fff2bd; }
.store-product-icon.coin-product img { width: 90%; height: 90%; object-fit: contain; }
.store-product-copy { min-width: 0; }
.store-product-copy b { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.store-product > strong { padding: 6px 8px; border-radius: 999px; color: #734906; background: var(--mango); font-size: 10px; white-space: nowrap; }
.rewarded-offer { width: 100%; min-height: 57px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; margin: 12px 0; border: 1px solid rgba(63,156,114,.35); border-radius: 17px; padding: 7px 11px; color: white; background: linear-gradient(145deg, #4ca77a, #28755b); box-shadow: 0 5px 0 #1d5a47, 0 9px 17px rgba(34,107,80,.15); text-align: left; cursor: pointer; }
.rewarded-offer:disabled { opacity: .55; box-shadow: none; cursor: default; }
.rewarded-offer > img { width: 38px; height: 38px; display: block; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0,0,0,.16)); }
.rewarded-offer span b { display: block; font-size: 12px; }
.rewarded-offer > strong { padding: 5px 8px; border-radius: 999px; color: var(--ink); background: var(--mango); font-size: 10px; }
.shop-item { min-width: 0; min-height: 62px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 2px solid #e6e9dd; border-radius: 17px; padding: 7px 10px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.shop-item-icon { width: 42px; height: 42px; display: block; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(23,63,59,.13)); }
.shop-item span { font-weight: 800; }
.shop-item strong { display: inline-flex; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 999px; color: #744a06; background: #ffdf73; }
.shop-item strong img { width: 16px; height: 16px; object-fit: contain; }
.coin-shop-grid .shop-item { min-height: 54px; padding: 5px 9px; font-size: 11px; }
.coin-shop-grid .shop-item strong { padding: 5px 7px; font-size: 9px; }
.stacked-actions { display: grid; }
.pause-modal { text-align: center; }
.result-modal { text-align: center; overflow: visible; }
.result-burst { width: 98px; height: 98px; display: grid; place-items: center; margin: -78px auto 15px; border: 8px solid var(--paper); border-radius: 50%; background: var(--mango); box-shadow: var(--shadow); overflow: hidden; }
.result-burst img { width: 88%; height: 88%; display: block; object-fit: contain; }
.result-burst.muted { background: #cce7df; }
.mastery-rating { display: flex; justify-content: center; gap: 8px; margin: 10px 0 5px; }
.mastery-rating i { width: 35px; height: 35px; display: grid; place-items: center; border: 2px solid rgba(23,63,59,.08); border-radius: 50%; color: rgba(23,63,59,.18); background: #eef1e9; transform: rotate(-9deg) scale(.84); transition: .25s cubic-bezier(.2,.8,.2,1); }
.mastery-rating i:nth-child(2) { transform: translateY(-4px) scale(.84); }
.mastery-rating i:nth-child(3) { transform: rotate(9deg) scale(.84); }
.mastery-rating i.is-earned { color: white; border-color: rgba(255,255,255,.82); background: linear-gradient(145deg, #65bc82, var(--leaf)); box-shadow: 0 6px 13px rgba(40,120,90,.24); transform: rotate(-9deg) scale(1); }
.mastery-rating i:nth-child(2).is-earned { transform: translateY(-4px) scale(1.08); }
.mastery-rating i:nth-child(3).is-earned { transform: rotate(9deg) scale(1); }
.mastery-rating .ui-icon { width: 18px; height: 18px; }
.tutorial-reward { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 11px 0 -7px; padding: 9px 11px; border: 2px solid rgba(249,181,47,.34); border-radius: 16px; color: #704705; background: linear-gradient(145deg, #fff5c8, #ffe399); box-shadow: 0 7px 15px rgba(165,108,13,.12); }
.tutorial-reward[hidden] { display: none; }
.tutorial-reward > .ui-icon { width: 18px; height: 18px; color: var(--coral); }
.tutorial-reward > b { margin-right: 3px; font-size: 11px; }
.tutorial-reward span { display: inline-flex; align-items: center; gap: 2px; padding: 3px 6px; border-radius: 999px; background: rgba(255,255,255,.5); font-size: 10px; }
.tutorial-reward span img, .tutorial-reward span .ui-icon { width: 15px; height: 15px; object-fit: contain; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 18px 0; }
.result-stats span { padding: 12px 7px; border-radius: 15px; background: #eff3e9; color: var(--ink-soft); font-size: 10px; }
.result-stats strong { display: block; margin-top: 3px; color: var(--ink); font-size: 17px; }
.rewarded-action { display: flex; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(145deg, #4ca77a, #28755b); box-shadow: 0 6px 0 #1d5a47; }
.rewarded-action .ui-icon { width: 21px; height: 21px; }
.rewarded-action b { min-width: 46px; padding: 4px 7px; border-radius: 999px; color: var(--ink); background: var(--mango); font-size: 10px; }
.rewarded-action:disabled { opacity: .55; box-shadow: 0 3px 0 #1d5a47; cursor: default; }

.mock-ad-modal, .purchase-modal { text-align: center; }
.mock-ad-stage { position: relative; overflow: hidden; margin: 10px 0 20px; border-radius: 23px; padding: 27px 18px 21px; color: white; background: radial-gradient(circle at 78% 20%, rgba(255,224,115,.42), transparent 30%), linear-gradient(145deg, #245a51, #173f3b); box-shadow: inset 0 1px rgba(255,255,255,.13); }
.mock-ad-stage::after { content: "TEST"; position: absolute; right: -23px; top: 13px; width: 90px; padding: 3px 0; color: var(--ink); background: var(--mango); font-size: 8px; font-weight: 950; letter-spacing: .18em; transform: rotate(38deg); }
.mock-ad-mark, .purchase-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 11px; border: 2px solid rgba(255,255,255,.65); border-radius: 50%; color: white; background: linear-gradient(145deg, var(--coral), #e34d38); box-shadow: 0 9px 18px rgba(0,0,0,.18); }
.mock-ad-mark .ui-icon, .purchase-mark .ui-icon { width: 28px; height: 28px; }
.mock-ad-stage h2 { margin: 5px 0 8px; font-size: 25px; letter-spacing: -.02em; }
.mock-ad-stage h2 + .mock-ad-progress { margin-top: 18px; }
.mock-ad-progress { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.mock-ad-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mango), #fff0a7); }
.mock-ad-modal #mock-ad-action:disabled { color: rgba(255,255,255,.7); background: #78918c; box-shadow: 0 6px 0 #526e69; }
.purchase-mark { margin-top: 8px; color: white; background: linear-gradient(145deg, #4ca77a, #28755b); }
.purchase-mark img { width: 84%; height: 84%; display: block; object-fit: contain; }
.purchase-modal h2 { margin-bottom: 7px; }
.purchase-price { display: inline-block; margin: 3px 0 21px; padding: 7px 14px; border-radius: 999px; color: #704705; background: var(--mango); font-size: 15px; }

.fx-layer { position: fixed; z-index: 80; inset: 0; overflow: hidden; pointer-events: none; }
.fruit-fly { position: fixed; display: block; object-fit: contain; filter: drop-shadow(0 7px 7px rgba(23,63,59,.27)); will-change: transform, opacity; }
.fruit-fly.is-auto-harvest { z-index: 3; filter: drop-shadow(0 0 10px rgba(255,238,128,.95)) drop-shadow(0 8px 8px rgba(23,63,59,.28)); }
.floating-score { position: fixed; transform: translate(-50%, 0); padding: 4px 9px; border: 2px solid white; border-radius: 999px; color: white; background: var(--score-color, var(--coral)); box-shadow: 0 5px 13px rgba(23,63,59,.25); font-size: 15px; font-weight: 950; animation: score-float .72s cubic-bezier(.2,.75,.24,1) both; }
.floating-score.is-auto-harvest { padding: 6px 12px; border-width: 3px; color: #4f3600; background: linear-gradient(145deg, #fff5a8, #f9b52f); box-shadow: 0 0 0 5px rgba(249,181,47,.17), 0 8px 20px rgba(94,61,7,.28); font-size: 18px; }
@keyframes score-float { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.55); } 30% { opacity: 1; transform: translate(-50%, -8px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -48px) scale(.92); } }
.skill-callout { position: fixed; z-index: 4; left: 50%; top: clamp(112px, 19vh, 158px); min-width: 128px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 11px; padding: 9px 13px 8px 15px; border: 2px solid rgba(255,255,255,.92); border-radius: 18px; color: white; background: linear-gradient(145deg, #4ca77a, #28755b); box-shadow: 0 12px 28px rgba(23,63,59,.25); text-align: left; transform: translateX(-50%); animation: skill-callout 1.02s cubic-bezier(.16,.86,.25,1) both; }
.skill-callout::after { content: ""; position: absolute; inset: -7px; z-index: -1; border: 2px solid rgba(255,255,255,.3); border-radius: 23px; }
.skill-callout span { grid-row: 1 / span 2; font-size: 14px; font-weight: 950; letter-spacing: .06em; white-space: nowrap; }
.skill-callout strong { color: #fff3a3; font-size: 18px; line-height: 1; }
.skill-callout b { color: rgba(255,255,255,.72); font-size: 9px; line-height: 1; }
.skill-callout.tier-2 { background: linear-gradient(145deg, #f58455, #dd4f37); }
.skill-callout.tier-3 { padding-inline: 18px 15px; background: linear-gradient(145deg, #8b68bd, #604090); box-shadow: 0 0 0 7px rgba(249,181,47,.14), 0 14px 32px rgba(66,38,103,.31); }
.skill-ring { position: fixed; z-index: 2; width: 62px; height: 62px; margin: -31px 0 0 -31px; border: 5px solid var(--ring-color, var(--leaf)); border-radius: 50%; box-shadow: 0 0 0 3px white, 0 0 22px var(--ring-color, var(--leaf)); animation: skill-ring .62s ease-out both; }
.skill-ring.tier-3 { border-width: 7px; }
body.skill-hit .combo-pill.is-visible { animation: combo-pop .5s cubic-bezier(.2,.8,.2,1) both; }
body.skill-hit-major .market-board { animation: skill-board-hit .42s ease both; }
@keyframes skill-callout { 0% { opacity: 0; transform: translate(-50%, 22px) scale(.5) rotate(-3deg); } 22% { opacity: 1; transform: translate(-50%, 0) scale(1.1) rotate(1deg); } 72% { opacity: 1; transform: translate(-50%, -4px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -22px) scale(.92); } }
@keyframes skill-ring { from { opacity: .9; transform: scale(.25); } to { opacity: 0; transform: scale(2.15); } }
@keyframes combo-pop { 35% { transform: scale(1.3) rotate(5deg); filter: brightness(1.15); } }
@keyframes skill-board-hit { 30% { transform: scale(1.008); filter: saturate(1.17) brightness(1.03); } 62% { transform: scale(.998); } }
.celebration-particle { position: fixed; width: 9px; height: 13px; margin: -5px 0 0 -4px; border-radius: 3px; background: var(--burst-color); box-shadow: 0 1px 2px rgba(23,63,59,.12); animation: particle-burst .72s cubic-bezier(.12,.72,.18,1) var(--burst-delay, 0ms) both; }
.celebration-particle:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }
@keyframes particle-burst { 0% { opacity: 0; transform: translate3d(0,0,0) scale(.4) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--burst-x),var(--burst-y),0) scale(1) rotate(var(--burst-r)); } }
body.basket-complete .shelf-wrap { animation: shelf-cheer .48s ease both; }
body.basket-complete .progress-track { animation: progress-cheer .48s ease both; }
body.auto-harvesting .shelf-wrap { animation: auto-harvest-glow .8s ease-in-out infinite alternate; }
body.auto-harvesting .basket-zone { animation: auto-basket-glow .7s ease-in-out infinite alternate; }
@keyframes shelf-cheer { 35% { transform: translateY(-2px) scale(1.006); filter: saturate(1.12); } }
@keyframes progress-cheer { 40% { box-shadow: 0 0 0 5px rgba(63,156,114,.13); } }
@keyframes auto-harvest-glow { to { filter: saturate(1.14) brightness(1.035); } }
@keyframes auto-basket-glow { to { filter: drop-shadow(0 0 10px rgba(249,181,47,.28)); } }

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition-duration: .01ms !important; }

@media (hover: hover) {
  .fruit-token.is-exposed:hover { transform: translateY(-4px) scale(1.07); }
  .booster:hover { background: rgba(255,255,255,.13); }
}

@media (max-width: 480px) {
  .game-topbar { padding: max(12px, env(safe-area-inset-top)) 14px 6px; }
  .round-button { width: 42px; height: 42px; }
  .coin-chip.compact { min-height: 38px; }
  .game-status { padding: 1px 15px 7px; }
  .market-board { padding-inline: 9px; }
  .board-awning { height: 29px; }
  .shelf-wrap { padding: 9px 6px 32px; border-width: 5px; border-bottom-width: 13px; }
  .fruit-board { min-height: 172px; gap: 1px; }
  .fruit-token { width: min(44px, 100%); }
  .buffer-zone { padding: 10px 12px 4px; }
  .buffer-slots { gap: 4px; }
  .buffer-slot { width: min(43px, 10.9vw); border-radius: 11px; }
  .basket-zone { padding: 9px 11px 7px; }
  .basket-row { gap: 7px; }
  .basket { min-height: 120px; }
  .basket-shell { width: 78%; left: 11%; top: -4px; transform: scaleX(1.22); }
  .basket .basket-fruit { width: clamp(37px, 11vw, 48px); top: 29%; }
  .basket-lip { width: 58%; left: 21%; top: 48%; height: 10px; }
  .booster-bar { padding-inline: 9px; }
}

@media (max-width: 370px) {
  .level-heading strong { font-size: 18px; }
  .coin-chip.compact .plus-mark { display: none; }
  .zone-label small { font-size: 8px; }
  .dispatch-guide { margin-bottom: 7px; font-size: 7px; }
  .basket { min-height: 112px; }
  .basket .basket-name { font-size: 8px; }
  .basket-status { font-size: 7px; }
}

@media (min-width: 560px) {
  .home-content { padding-inline: 55px; }
  .game-screen { padding-inline: 18px; }
  .game-topbar { padding-inline: 13px; }
  .fruit-board { min-height: 245px; }
  .fruit-token { width: min(52px, 100%); }
  .booster-copy small { display: block; }
  .booster { grid-template-columns: auto 1fr; justify-items: start; align-items: center; padding: 7px 10px; }
  .booster-copy strong, .booster-copy small { text-align: left; }
}

@media (max-height: 740px) {
  .home-content { padding-top: 0; }
  .market-illustration { height: 205px; }
  .brand-lockup h1 { font-size: 53px; }
  .fruit-board { min-height: 148px; }
  .fruit-token { width: min(39px, 100%); }
  .basket { min-height: 104px; }
  .basket-shell { width: 70%; left: 15%; top: -2px; }
  .basket .basket-fruit { width: 35px; top: 28%; }
  .basket-lip { width: 53%; left: 23.5%; top: 47%; height: 9px; }
  .basket .basket-name { bottom: 24px; }
  .basket-status { bottom: 9px; }
  .basket-capacity { bottom: -1px; }
  .game-status { padding-bottom: 6px; }
  .buffer-zone, .basket-zone { padding-top: 6px; }
}

@media (max-height: 680px) and (max-width: 480px) {
  .game-topbar { padding-top: max(7px, env(safe-area-inset-top)); padding-bottom: 3px; }
  .round-button { width: 38px; height: 38px; font-size: 18px; }
  .coin-chip.compact { min-height: 34px; }
  .coin-chip.compact .coin-mark { width: 27px; height: 27px; }
  .game-status { padding-bottom: 4px; }
  .progress-copy { margin-bottom: 3px; }
  .progress-track { height: 7px; }
  .board-awning { height: 24px; }
  .shelf-wrap { padding-top: 5px; padding-bottom: 27px; border-bottom-width: 11px; }
  .fruit-board { min-height: 128px; }
  .fruit-token { width: min(32px, 100%); }
  .wood-shelf { bottom: 8px; height: 19px; }
  .buffer-zone { padding-top: 4px; padding-bottom: 1px; }
  .zone-label { margin-bottom: 4px; }
  .buffer-slot { width: min(38px, 10.2vw); }
  .basket-zone { padding-top: 5px; padding-bottom: 5px; }
  .dispatch-guide { display: none; }
  .basket { min-height: 88px; }
  .basket-shell { width: 66%; left: 17%; top: 0; }
  .basket .basket-fruit { width: 29px; top: 26%; }
  .basket-lip { width: 50%; left: 25%; top: 45%; height: 8px; }
  .basket .basket-name { left: 20%; right: 20%; bottom: 21px; padding-block: 1px; font-size: 7px; }
  .basket-status { left: 25%; right: 25%; bottom: 8px; padding-block: 1px; font-size: 6px; }
  .basket-capacity { bottom: -1px; }
  .booster-bar { padding-top: 5px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .booster { padding-block: 3px; }
  .booster-icon { width: 30px; height: 30px; }
}

/* Minimal icon-first presentation */
.ui-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }

body { background: radial-gradient(circle at 18% 14%, rgba(255,255,255,.66) 0 9%, transparent 9.2%), linear-gradient(145deg, #cbe8dc, #f6e2b4 58%, #f5bd9d); }
.app-shell { width: min(100%, 540px); background: #fffaf0; box-shadow: 0 0 80px rgba(23,63,59,.22); }
.ambient-one { opacity: .48; }
.ambient-two { opacity: .55; }

.icon-button, .round-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.72); color: var(--ink); background: rgba(255,255,255,.76); box-shadow: 0 7px 18px rgba(34,70,62,.12), inset 0 1px rgba(255,255,255,.9); backdrop-filter: blur(10px); }
.icon-button .ui-icon, .round-button .ui-icon { width: 21px; height: 21px; }
.profile-chip { min-width: 42px; width: 42px; min-height: 42px; justify-content: center; padding: 0; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.66); }
.profile-avatar { width: 30px; height: 30px; color: white; background: linear-gradient(145deg, var(--leaf), #63b884); box-shadow: inset 0 1px rgba(255,255,255,.35); }
.profile-avatar .ui-icon { width: 17px; height: 17px; }
.coin-chip { min-height: 40px; padding: 4px 7px 4px 4px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.78); backdrop-filter: blur(10px); }
.coin-mark { width: 29px; height: 29px; }
.plus-mark { width: 20px; height: 20px; }
.plus-mark .ui-icon { width: 12px; height: 12px; stroke-width: 3; }

.home-content { padding-top: 1vh; }
.brand-lockup { text-align: center; padding-top: 0; }
.brand-kicker { font-size: 9px; letter-spacing: .28em; }
.brand-lockup h1 { margin-top: 5px; font-size: clamp(50px, 13vw, 68px); line-height: .88; }
.market-illustration { height: clamp(200px, 37vh, 292px); margin-top: -12px; }
.level-card { width: auto; min-width: 154px; gap: 18px; margin: -2px 0 18px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.85); border-radius: 999px; background: rgba(255,255,255,.66); box-shadow: 0 8px 22px rgba(34,70,62,.1); }
.level-orb { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.level-orb .ui-icon { width: 17px; height: 17px; color: var(--coral); }
.level-orb strong { margin: 0; font-size: 17px; line-height: 1; }
.level-stamps { gap: 5px; }
.stamp { width: 8px; height: 8px; border: 0; background: rgba(23,63,59,.16); }
.stamp.is-filled { background: var(--coral); box-shadow: 0 0 0 3px rgba(242,103,74,.16); transform: none; }
.play-button { position: relative; width: 84px; min-height: 84px; border: 3px solid rgba(255,255,255,.9); border-radius: 50%; color: white; background: linear-gradient(145deg, #ff8566, var(--coral)); box-shadow: 0 9px 0 var(--coral-dark), 0 20px 34px rgba(217,76,51,.3), inset 0 2px rgba(255,255,255,.3); }
.play-button .ui-icon { width: 39px; height: 39px; margin-left: 4px; fill: rgba(255,255,255,.12); stroke-width: 2.3; }
.play-level { position: absolute; right: -5px; bottom: 0; min-width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid #fff8e8; border-radius: 50%; color: var(--ink); background: var(--mango); box-shadow: 0 4px 10px rgba(93,58,13,.25); font-size: 10px; font-weight: 950; }
.play-button:active { transform: translateY(5px); box-shadow: 0 4px 0 var(--coral-dark), 0 12px 24px rgba(217,76,51,.25); }
.help-button { width: 38px; height: 38px; display: grid; place-items: center; margin-top: 21px; border: 0; border-radius: 50%; color: var(--ink-soft); background: rgba(255,255,255,.55); cursor: pointer; }
.help-button .ui-icon { width: 20px; height: 20px; }

.game-screen { background: linear-gradient(180deg, #def1e8 0 20%, #fffaf0 48%); }
.game-topbar { min-height: 66px; padding: max(12px, env(safe-area-inset-top)) 15px 6px; }
.pause-button { color: white; border-color: rgba(255,255,255,.4); background: linear-gradient(145deg, #ff8062, var(--coral)); box-shadow: 0 5px 0 var(--coral-dark), 0 9px 18px rgba(217,76,51,.2); }
.level-heading { justify-self: center; min-width: 62px; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; background: rgba(255,255,255,.58); box-shadow: 0 7px 18px rgba(34,70,62,.08); }
.level-heading .ui-icon { width: 17px; height: 17px; color: var(--coral); }
.level-heading strong { font-size: 18px; line-height: 1; letter-spacing: 0; }
.level-heading small, .level-orb small { margin-left: -4px; color: var(--ink-soft); font-size: 8px; font-weight: 900; }

.game-status { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; padding: 4px 17px 10px; }
.progress-icon { width: 21px; height: 21px; color: var(--leaf); stroke-width: 2.2; }
.progress-track { position: relative; height: 15px; overflow: hidden; border: 2px solid rgba(255,255,255,.72); background: rgba(23,63,59,.1); box-shadow: inset 0 2px 4px rgba(23,63,59,.08); }
.progress-track > span { position: absolute; inset: 0 auto 0 0; }
.progress-track > strong { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; color: rgba(23,63,59,.82); font-size: 8px; font-weight: 950; letter-spacing: .08em; text-shadow: 0 1px rgba(255,255,255,.8); }
.combo-pill { position: relative; right: auto; top: auto; min-width: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 4px 7px; color: white; background: linear-gradient(145deg, #ff8062, var(--coral)); }
.combo-pill .ui-icon { width: 13px; height: 13px; }
.combo-pill b { font-size: 9px; }

.market-board { padding-inline: 11px; }
.board-awning { height: 27px; }
.shelf-wrap { padding: 9px 6px 30px; border-width: 5px; border-bottom-width: 13px; box-shadow: inset 0 0 0 3px #b77d4e, 0 14px 28px rgba(70,45,27,.18); }
.fruit-board { min-height: clamp(170px, 35vh, 244px); gap: 2px; }
.fruit-token { width: min(48px, 100%); }
.fruit-token.is-exposed::after { inset: 0; border-color: rgba(255,255,255,.95); box-shadow: 0 0 0 2px rgba(63,156,114,.24), 0 5px 13px rgba(43,101,77,.16); }

.buffer-zone { position: relative; padding: 23px 13px 4px; }
.zone-icon-row { position: absolute; top: 1px; left: 17px; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.zone-icon-row .ui-icon { width: 16px; height: 16px; color: var(--leaf); }
.zone-icon-row output { min-width: 30px; padding: 2px 6px; border-radius: 999px; color: white; background: rgba(23,63,59,.78); font-size: 7px; font-weight: 950; letter-spacing: .06em; }
.zone-icon-row output.is-pressure { background: #df971d; animation: buffer-count-pulse .9s ease-in-out infinite alternate; }
.zone-icon-row output.is-critical { background: #e85f4b; animation: buffer-count-pulse .48s ease-in-out infinite alternate; }
.buffer-slots { gap: 4px; }
.buffer-slot { width: min(42px, 10.4vw); border-color: rgba(23,63,59,.16); border-radius: 12px; background: rgba(255,255,255,.5); font-size: 18px; }
.buffer-slots.is-pressure .buffer-slot:not(.has-fruit):not(.is-locked) { border-color: #e1a12d; background: rgba(255,231,168,.72); }
.buffer-slots.is-critical .buffer-slot.has-fruit { box-shadow: 0 4px 0 color-mix(in srgb, var(--basket-edge), #173f3b 24%), 0 0 0 2px rgba(232,95,75,.32); }
.buffer-slot.has-fruit::after { content: ""; width: 6px; height: 6px; right: 3px; bottom: 3px; padding: 0; background: var(--leaf); box-shadow: 0 0 0 2px rgba(255,255,255,.78); }

.basket-zone { position: relative; padding: 9px 12px 4px; }
.basket-meta { display: none; }
.basket-meta .ui-icon { width: 13px; height: 13px; }
.basket-meta b { min-width: 9px; font-size: 8px; text-align: center; }
.basket-row { gap: 6px; }

@keyframes buffer-count-pulse {
  from { transform: scale(1); box-shadow: 0 0 0 rgba(232,95,75,0); }
  to { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(232,95,75,.13); }
}
.basket { min-height: 113px; }
.basket::before { inset: 18% 4% 3%; border-color: color-mix(in srgb, var(--basket-edge), transparent 66%); background: radial-gradient(ellipse, color-mix(in srgb, var(--basket-bg), white 28%) 0 46%, transparent 75%); }
.basket-shell { width: 76%; left: 12%; top: -4px; transform: scaleX(1.24); }
.basket .basket-fruit { width: clamp(37px, 10vw, 50px); top: 29%; }
.basket-lip { top: 49%; width: 56%; left: 22%; height: 10px; }
.basket-ready-count { position: absolute; z-index: 5; left: 7px; top: 5px; min-width: 27px; height: 21px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 0 5px; border: 2px solid rgba(255,255,255,.78); border-radius: 999px; color: white; background: var(--leaf); box-shadow: 0 3px 8px rgba(23,63,59,.16); }
.basket-ready-count .ui-icon { width: 11px; height: 11px; }
.basket-ready-count b { font-size: 8px; }
.basket.is-waiting .basket-ready-count { background: #78918c; }
.basket-count { right: 7px; top: 5px; min-width: 30px; padding: 3px 5px; font-size: 8px; }

.booster-bar { grid-template-columns: repeat(3, 58px); justify-content: center; gap: 17px; margin-top: auto; padding: 9px 12px max(11px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); background: linear-gradient(180deg, #214f49, #173f3b); box-shadow: 0 -10px 25px rgba(23,63,59,.11); }
.booster { width: 58px; height: 53px; display: grid; place-items: center; padding: 3px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(255,255,255,.07); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.booster-icon { width: 44px; height: 44px; }
.booster > b { right: -4px; top: -4px; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0; border: 2px solid #214f49; box-shadow: 0 3px 8px rgba(0,0,0,.2); }

.toast { min-width: 0; max-width: 76%; padding: 9px 15px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 11px; letter-spacing: .04em; backdrop-filter: blur(10px); }
.modal-close { display: grid; place-items: center; }
.modal-close .ui-icon { width: 18px; height: 18px; }

@media (max-width: 390px) {
  .game-topbar { padding-inline: 11px; }
  .coin-chip.compact { gap: 4px; }
  .coin-chip.compact .plus-mark { display: none; }
  .fruit-board { min-height: 166px; }
  .basket { min-height: 102px; }
  .basket-shell { width: 72%; left: 14%; }
  .basket .basket-fruit { width: 35px; }
  .buffer-slot { width: min(39px, 10.1vw); }
}

@media (max-height: 700px) {
  .game-topbar { min-height: 54px; padding-top: max(7px, env(safe-area-inset-top)); padding-bottom: 3px; }
  .game-status { padding-bottom: 5px; }
  .board-awning { height: 22px; }
  .fruit-board { min-height: 130px; }
  .fruit-token { width: min(34px, 100%); }
  .buffer-zone { padding-top: 19px; padding-bottom: 1px; }
  .buffer-slot { width: min(36px, 9.7vw); }
  .basket { min-height: 88px; }
  .basket-shell { width: 66%; left: 17%; top: 0; }
  .basket .basket-fruit { width: 29px; top: 27%; }
  .basket-lip { top: 46%; height: 8px; }
  .booster-bar { padding-top: 5px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .booster { width: 52px; height: 46px; }
  .booster-icon { width: 38px; height: 38px; }
}

/* Individual four-slot basket art and cargo animation */
.basket { min-height: 106px; }
.basket::before { inset: 17px 3% 1px; border: 1px solid color-mix(in srgb, var(--basket-edge), transparent 76%); border-radius: 28px; background: radial-gradient(ellipse at 50% 68%, color-mix(in srgb, var(--basket-bg), white 45%), rgba(255,255,255,.42) 64%, transparent 72%); box-shadow: 0 8px 18px color-mix(in srgb, var(--basket-edge), transparent 85%); }
.basket-art { inset: 0; }
.basket-skin { position: absolute; width: 108%; height: 108%; left: -4%; top: -3%; display: block; object-fit: contain; pointer-events: none; filter: drop-shadow(0 7px 5px rgba(60,43,24,.22)); }
.basket-skin-back { z-index: 1; }
.basket-skin-front { z-index: 3; clip-path: inset(48% 0 0 0); }
.basket-cargo { --cargo-size: 35px; position: absolute; z-index: 2; width: 62%; height: 42%; left: 19%; top: 26%; display: block; pointer-events: none; background-repeat: no-repeat; filter: drop-shadow(0 3px 2px rgba(27,41,31,.24)); }
.basket-cargo[data-count="1"] { background-image: var(--cargo-fruit); background-position: center bottom; background-size: var(--cargo-size) var(--cargo-size); }
.basket-cargo[data-count="2"] { background-image: var(--cargo-fruit), var(--cargo-fruit); background-position: 31% bottom, 69% bottom; background-size: var(--cargo-size) var(--cargo-size), var(--cargo-size) var(--cargo-size); }
.basket-cargo[data-count="3"] { background-image: var(--cargo-fruit), var(--cargo-fruit), var(--cargo-fruit); background-position: center 1px, 20% bottom, 80% bottom; background-size: var(--cargo-size) var(--cargo-size), var(--cargo-size) var(--cargo-size), var(--cargo-size) var(--cargo-size); }
.basket-cargo[data-count="4"] { background-image: var(--cargo-fruit), var(--cargo-fruit), var(--cargo-fruit), var(--cargo-fruit); background-position: center 0, 18% bottom, 82% bottom, center bottom; background-size: var(--cargo-size) var(--cargo-size), var(--cargo-size) var(--cargo-size), var(--cargo-size) var(--cargo-size), var(--cargo-size) var(--cargo-size); }
.basket-capacity { z-index: 5; left: 30%; right: 30%; bottom: 5px; gap: 3px; }
.basket-capacity i { width: 8px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.62); box-shadow: inset 0 1px 2px rgba(23,63,59,.16), 0 0 0 1px rgba(23,63,59,.08); }
.basket-capacity i.is-filled { background: var(--basket-edge); box-shadow: 0 0 0 1px rgba(255,255,255,.62); }
.basket-ready-count { left: 4px; top: 3px; }
.basket-count { right: 4px; top: 3px; }
.basket.basket-enter { animation: basket-arrive .46s cubic-bezier(.18,.82,.22,1.18) both; }
.basket.basket-receive .basket-cargo { animation: cargo-settle .5s cubic-bezier(.16,.8,.22,1.2) both; }
.basket.basket-full .basket-art { animation: basket-full-pop .34s cubic-bezier(.17,.84,.28,1.25) both; }
.basket.basket-full::before { box-shadow: 0 0 0 5px rgba(255,255,255,.76), 0 0 0 8px color-mix(in srgb, var(--basket-edge), transparent 72%); }
.basket.is-departing { animation: basket-depart .26s ease-in both; pointer-events: none; }
.basket.is-clearing { animation: basket-clear .31s cubic-bezier(.32,.02,.58,1) both; pointer-events: none; }
.basket.is-clearing .basket-art { filter: brightness(1.08) saturate(.9); }
@keyframes basket-arrive { from { transform: translateY(34px) scale(.76); opacity: 0; } 70% { transform: translateY(-3px) scale(1.04); opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes cargo-settle { from { opacity: .2; translate: 0 -25px; scale: 1.25; } 65% { opacity: 1; translate: 0 3px; scale: .94; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes basket-full-pop { 45% { transform: translateY(-5px) scale(1.08); filter: brightness(1.1); } }
@keyframes basket-depart { to { transform: translateY(38px) scale(.72) rotate(-2deg); opacity: 0; } }
@keyframes basket-clear { 35% { transform: translateY(-4px) scale(1.04); opacity: 1; } to { transform: translateY(-30px) scale(.76) rotate(2deg); opacity: 0; } }

@media (max-height: 700px) {
  .basket { min-height: 91px; }
  .basket-skin { width: 101%; height: 101%; left: -.5%; top: 0; }
  .basket-cargo { top: 25%; }
  .basket-cargo { --cargo-size: 29px; }
  .basket-capacity { bottom: 4px; }
}

/* Premium market lobby */
.home-screen {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 13%, rgba(249,181,47,.28) 0 11%, transparent 11.4%),
    linear-gradient(180deg, #245b51 0 36%, #edf3d9 36.2%, #fff8e8 73%);
}
.home-screen::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: -12%;
  right: -12%;
  top: 29%;
  height: 100px;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, #245b51 0 42%, rgba(36,91,81,0) 43%);
  pointer-events: none;
}
.home-screen .topbar,
.home-screen .home-content { position: relative; z-index: 1; }
.home-screen .topbar { min-height: 67px; padding: max(14px, env(safe-area-inset-top)) 17px 7px; }
.home-screen .icon-button,
.home-screen .profile-chip {
  color: white;
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.11);
  box-shadow: inset 0 1px rgba(255,255,255,.14), 0 8px 20px rgba(6,35,30,.18);
}
.home-screen .profile-chip { justify-self: center; }
.home-screen .profile-avatar { background: linear-gradient(145deg, #f6c74d, #e9932e); }
.home-screen .coin-chip { border-color: rgba(255,255,255,.92); background: rgba(255,253,245,.94); box-shadow: 0 8px 20px rgba(6,35,30,.18); }
.home-content { justify-content: flex-start; padding: 0 18px max(28px, env(safe-area-inset-bottom)); }
.brand-lockup { align-self: auto; z-index: 4; margin: 1px 0 -15px; padding: 0 20px; }
.brand-lockup h1 { display: flex; align-items: baseline; justify-content: center; gap: 7px; margin: 0; color: white; font-size: clamp(46px, 12.5vw, 67px); line-height: .96; letter-spacing: -.09em; text-shadow: 0 5px 0 rgba(13,57,50,.28), 0 14px 28px rgba(7,42,36,.24); }
.brand-lockup h1 span { color: #fff8df; }
.brand-lockup h1 em { color: #ffd15b; }

.market-illustration {
  position: relative;
  z-index: 2;
  width: min(94%, 455px);
  height: clamp(252px, 41vh, 335px);
  margin: 0 auto;
  border: 5px solid rgba(255,255,255,.9);
  border-radius: 32px;
  background: #fff1cc;
  box-shadow: 0 22px 48px rgba(24,62,53,.24), inset 0 0 0 1px rgba(23,63,59,.08);
  transform: rotate(-.35deg);
}
.market-illustration::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 26px;
  box-shadow: inset 0 -28px 35px rgba(31,77,64,.08), inset 0 1px rgba(255,255,255,.9);
  pointer-events: none;
}
.hero-art { border-radius: 27px; object-fit: cover; mix-blend-mode: normal; filter: none; }
.home-fruit { position: absolute; z-index: 3; width: 59px; height: 59px; object-fit: contain; border: 4px solid rgba(255,255,255,.92); border-radius: 50%; background: #fff9e9; box-shadow: 0 10px 22px rgba(31,77,64,.22); animation: home-fruit-float 3.2s ease-in-out infinite; }
.home-fruit-left { left: -22px; bottom: 28px; transform: rotate(-9deg); }
.home-fruit-right { right: -20px; top: 68px; transform: rotate(8deg); animation-delay: -1.5s; }
@keyframes home-fruit-float { 50% { translate: 0 -6px; } }

.home-dock {
  position: relative;
  z-index: 5;
  width: min(92%, 430px);
  margin: -31px auto 0;
  padding: 25px 14px 15px;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 29px;
  background: linear-gradient(160deg, rgba(255,255,255,.97), rgba(255,248,226,.96));
  box-shadow: 0 20px 42px rgba(43,73,61,.19), inset 0 1px rgba(255,255,255,1);
  backdrop-filter: blur(12px);
}
.home-dock .level-card { width: 100%; min-width: 0; margin: 0 0 10px; padding: 3px 8px 6px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.home-dock .level-orb { gap: 7px; }
.home-dock .level-orb .ui-icon { width: 19px; height: 19px; }
.home-dock .level-orb strong { font-size: 21px; }
.home-dock .level-orb small { font-size: 9px; }
.home-dock .level-stamps { gap: 7px; }
.home-dock .stamp { width: 9px; height: 9px; background: #dbe4d8; box-shadow: inset 0 1px 2px rgba(23,63,59,.1); }
.home-dock .stamp.is-filled { background: var(--coral); box-shadow: 0 0 0 3px rgba(242,103,74,.14); }

.home-dock .play-button {
  position: relative;
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 51px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  padding: 8px 15px 8px 10px;
  border: 2px solid rgba(255,255,255,.88);
  border-radius: 23px;
  color: white;
  background: linear-gradient(145deg, #ff825f, #ef5c43);
  box-shadow: 0 8px 0 #c94430, 0 16px 27px rgba(210,70,46,.26), inset 0 1px rgba(255,255,255,.32);
}
.home-dock .play-button:active { transform: translateY(4px); box-shadow: 0 4px 0 #c94430, 0 10px 18px rgba(210,70,46,.22); }
.play-glyph { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 17px; color: var(--coral); background: #fffaf0; box-shadow: 0 6px 13px rgba(114,43,28,.2), inset 0 1px white; }
.play-glyph .ui-icon { width: 29px; height: 29px; margin-left: 3px; fill: rgba(242,103,74,.11); stroke-width: 2.4; }
.play-track { display: flex; align-items: center; justify-content: center; gap: 7px; }
.play-track i { width: 18px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.46); box-shadow: inset 0 1px rgba(255,255,255,.25); }
.play-track i:nth-child(2) { width: 31px; background: rgba(255,255,255,.8); }
.play-track i:nth-child(3) { width: 10px; }
.home-dock .play-level { display: none; }
.play-arrow { width: 26px !important; height: 26px !important; margin: 0 !important; fill: none !important; stroke-width: 2.5 !important; }
.home-dock .help-button { position: absolute; right: -11px; bottom: -19px; width: 42px; height: 42px; margin: 0; border: 3px solid #fffaf0; color: white; background: linear-gradient(145deg, #4ca77a, #28755b); box-shadow: 0 8px 17px rgba(31,77,64,.25); }
.home-music-pulse { position: absolute; left: -10px; bottom: -17px; width: 43px; height: 32px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 3px solid #fffaf0; border-radius: 999px; background: #245b51; box-shadow: 0 8px 17px rgba(31,77,64,.22); }
.home-music-pulse i { width: 3px; height: 5px; border-radius: 99px; background: #ffd15b; }
body.music-playing .home-music-pulse i { animation: music-pulse .72s ease-in-out infinite alternate; }
body.music-playing .home-music-pulse i:nth-child(2) { animation-delay: -.25s; }
body.music-playing .home-music-pulse i:nth-child(3) { animation-delay: -.5s; }
@keyframes music-pulse { to { height: 17px; } }

@media (max-width: 390px) {
  .home-content { padding-inline: 14px; }
  .brand-lockup h1 { font-size: 47px; }
  .market-illustration { width: 93%; }
  .home-fruit { width: 50px; height: 50px; }
  .home-fruit-left { left: -16px; }
  .home-fruit-right { right: -15px; }
  .home-dock { width: 91%; }
}

@media (max-height: 700px) {
  .home-screen .topbar { min-height: 55px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand-lockup { margin-bottom: -12px; }
  .brand-lockup h1 { font-size: 43px; }
  .market-illustration { height: 230px; }
  .home-fruit { width: 48px; height: 48px; }
  .home-dock { margin-top: -27px; padding-top: 22px; padding-bottom: 11px; }
  .home-dock .level-card { margin-bottom: 6px; }
  .home-dock .play-button { min-height: 61px; }
  .play-glyph { width: 43px; height: 43px; }
}

/* v27 · Native-game material pass */
:root {
  --paper-art: url("assets/generated/backgrounds/ui-paper-v27.webp");
  --wood-deep: #174c45;
  --wood-mid: #287466;
  --wood-edge: #0e3934;
  --gold-edge: #e5a33b;
  --native-shadow: 0 14px 28px rgba(22, 55, 47, .22), 0 4px 8px rgba(22, 55, 47, .16);
}

body {
  background-color: #173f3b;
  background-image:
    linear-gradient(115deg, rgba(12,49,44,.78), rgba(71,116,80,.24) 46%, rgba(121,70,43,.45)),
    url("assets/generated/backgrounds/bg-home-v27.webp");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

.app-shell {
  background: #f9edcf var(--paper-art) center / 360px repeat;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 0 7px rgba(15,57,50,.24), 0 0 90px rgba(8,35,31,.56);
}

.ambient { display: none; }

.home-screen {
  background-color: #f5e6bc;
  background-image:
    linear-gradient(180deg, rgba(12,57,49,.2), rgba(255,247,218,.02) 31%, rgba(255,244,210,.12) 72%, rgba(13,57,50,.12)),
    url("assets/generated/backgrounds/bg-home-v27.webp");
  background-position: center;
  background-size: cover;
}

.home-screen::before {
  inset: 0;
  height: auto;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 30%, rgba(8,45,39,.14) 100%),
    linear-gradient(180deg, rgba(5,44,38,.32), transparent 19%, transparent 80%, rgba(18,57,46,.18));
}

.home-screen .topbar {
  padding-top: max(15px, env(safe-area-inset-top));
}

.home-screen .icon-button,
.home-screen .profile-chip,
.round-button {
  border: 2px solid rgba(255,245,208,.82);
  color: #fff9e5;
  background:
    linear-gradient(145deg, rgba(72,133,113,.96), rgba(20,75,67,.98));
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.22),
    inset 0 -3px 0 rgba(7,45,40,.38),
    0 5px 0 #0d3c36,
    0 10px 20px rgba(7,39,34,.28);
}

.home-screen .icon-button:active,
.home-screen .profile-chip:active,
.round-button:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px rgba(255,255,255,.16), 0 2px 0 #0d3c36, 0 6px 12px rgba(7,39,34,.22);
}

.home-screen .profile-avatar {
  background: radial-gradient(circle at 34% 26%, #ffe895, #e8a632 58%, #b96d20 100%);
  box-shadow: inset 0 2px rgba(255,255,255,.5), 0 2px 4px rgba(70,39,9,.25);
}

.coin-chip,
.home-screen .coin-chip {
  border: 2px solid rgba(255,255,255,.92);
  background:
    linear-gradient(rgba(255,252,235,.88), rgba(255,245,211,.9)),
    var(--paper-art) center / 250px;
  box-shadow: inset 0 2px rgba(255,255,255,.8), inset 0 -2px rgba(170,116,42,.12), 0 5px 0 rgba(124,79,29,.22), 0 10px 20px rgba(16,55,48,.2);
}

.plus-mark {
  border: 1px solid rgba(255,255,255,.55);
  background: linear-gradient(145deg, #67bd83, #2b805d);
  box-shadow: inset 0 1px rgba(255,255,255,.3), 0 2px 3px rgba(22,77,59,.26);
}

.brand-lockup {
  margin-top: 2px;
  margin-bottom: -18px;
}

.brand-lockup h1 {
  -webkit-text-stroke: 1px rgba(10,63,56,.42);
  text-shadow:
    0 3px 0 #174f47,
    0 6px 0 rgba(11,54,48,.34),
    0 14px 24px rgba(12,52,46,.3);
}

.brand-lockup h1 span { color: #fff6d7; }
.brand-lockup h1 em { color: #ffd167; }

.market-illustration {
  width: min(98%, 465px);
  height: clamp(265px, 42vh, 345px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.market-illustration::after { display: none; }

.hero-art {
  border-radius: 0;
  object-fit: contain;
  mix-blend-mode: normal;
  filter: drop-shadow(0 17px 10px rgba(21,64,52,.28)) saturate(1.04);
}

.home-fruit {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 8px 5px rgba(20,59,49,.3));
  box-shadow: none;
}

.home-dock {
  margin-top: -42px;
  padding: 28px 14px 16px;
  border: 3px solid #164f47;
  border-radius: 28px;
  background:
    linear-gradient(rgba(255,252,234,.92), rgba(247,230,189,.94)),
    var(--paper-art) center / 300px repeat;
  background-blend-mode: multiply;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.72),
    inset 0 -5px 0 rgba(145,92,37,.12),
    0 8px 0 #0f403a,
    0 20px 32px rgba(10,48,41,.3);
  backdrop-filter: none;
}

.home-dock::before {
  content: "";
  position: absolute;
  left: 25px;
  right: 25px;
  top: 10px;
  height: 5px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, #d99a40 0 20px, #f1c76c 20px 35px);
  box-shadow: inset 0 1px rgba(255,255,255,.45), 0 2px 3px rgba(104,61,20,.2);
}

.home-dock .play-button,
.primary-button {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,248,222,.88);
  background:
    radial-gradient(circle at 22% 15%, rgba(255,255,255,.28), transparent 22%),
    linear-gradient(160deg, #ff9069, #f05b42 62%, #d94531);
  box-shadow:
    inset 0 2px rgba(255,255,255,.3),
    inset 0 -4px rgba(157,43,27,.22),
    0 8px 0 #b83c2c,
    0 15px 23px rgba(140,49,32,.27);
}

.home-dock .play-button::after,
.primary-button::after {
  content: "";
  position: absolute;
  inset: 3px 8% auto;
  height: 28%;
  border-radius: 999px;
  background: linear-gradient(rgba(255,255,255,.2), transparent);
  pointer-events: none;
}

.play-glyph {
  border: 2px solid rgba(151,74,36,.14);
  background:
    linear-gradient(rgba(255,255,255,.72), rgba(255,241,205,.72)),
    var(--paper-art) center / 180px;
  box-shadow: inset 0 2px #fff, inset 0 -3px rgba(176,108,40,.12), 0 5px 8px rgba(105,47,25,.24);
}

.home-dock .help-button,
.home-music-pulse {
  border-color: #f8edcf;
  background: linear-gradient(160deg, #3c8b77, #145348);
  box-shadow: inset 0 2px rgba(255,255,255,.18), 0 5px 0 #0d3d36, 0 10px 16px rgba(17,58,50,.24);
}

.game-screen {
  background-color: #f5e6bd;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,247,220,.12) 62%, rgba(17,74,65,.08)),
    url("assets/generated/backgrounds/bg-game-v27.webp");
  background-position: center;
  background-size: cover;
}

.game-topbar,
.game-status,
.market-board,
.buffer-zone,
.basket-zone,
.booster-bar { position: relative; z-index: 1; }

.game-topbar {
  margin: 0 9px;
  padding-inline: 7px;
}

.level-heading {
  border: 2px solid rgba(255,250,228,.9);
  color: #fff9e8;
  background: linear-gradient(160deg, rgba(58,126,108,.97), rgba(20,78,69,.98));
  box-shadow: inset 0 2px rgba(255,255,255,.2), inset 0 -3px rgba(6,46,40,.28), 0 5px 0 #0d413a, 0 10px 18px rgba(11,55,48,.22);
}

.level-heading small { color: rgba(255,250,229,.78); }
.level-heading .ui-icon { color: #ffd369; }

.game-status {
  margin: 1px 14px 9px;
  padding: 8px 10px;
  border: 2px solid rgba(255,250,227,.8);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255,251,230,.76), rgba(242,225,184,.78)),
    var(--paper-art) center / 260px;
  background-blend-mode: multiply;
  box-shadow: inset 0 2px rgba(255,255,255,.72), 0 5px 0 rgba(111,71,33,.16), 0 10px 18px rgba(21,62,53,.15);
}

.progress-track {
  border-color: rgba(255,250,229,.9);
  background: rgba(42,83,71,.18);
  box-shadow: inset 0 3px 5px rgba(37,75,64,.18), 0 1px rgba(255,255,255,.7);
}

.progress-track span {
  background: linear-gradient(180deg, #8ed08b, #43a36f 58%, #2b805d);
  box-shadow: inset 0 2px rgba(255,255,255,.35), inset 0 -2px rgba(22,95,63,.22);
}

.market-board {
  margin-inline: 9px;
  padding: 0 4px;
  filter: drop-shadow(0 13px 14px rgba(67,43,23,.19));
}

.board-awning {
  padding-inline: 8px;
  filter: drop-shadow(0 4px 2px rgba(84,48,24,.2));
}

.board-awning i {
  border: 1px solid rgba(111,71,34,.2);
  background:
    linear-gradient(175deg, rgba(255,255,255,.48), rgba(241,221,177,.18)),
    var(--paper-art) center / 180px;
  box-shadow: inset 0 -4px rgba(127,83,39,.1);
}

.board-awning i:nth-child(odd) {
  border-color: rgba(126,45,31,.28);
  background: linear-gradient(160deg, #ff8b68, #ef5d45 70%, #d94a35);
  box-shadow: inset 0 2px rgba(255,255,255,.3), inset 0 -4px rgba(133,35,27,.18);
}

.shelf-wrap {
  border-color: #714326;
  background:
    linear-gradient(rgba(255,253,237,.78), rgba(221,237,216,.7)),
    var(--paper-art) center / 310px repeat;
  background-blend-mode: multiply;
  box-shadow:
    inset 0 0 0 3px #c58a52,
    inset 0 6px rgba(255,255,255,.58),
    0 8px 0 #60371f,
    0 16px 25px rgba(66,42,23,.24);
}

.shelf-wrap::before {
  opacity: .72;
  background: repeating-linear-gradient(90deg, transparent 0 calc((100% / var(--columns, 6)) - 2px), rgba(65,94,75,.13) calc((100% / var(--columns, 6)) - 2px) calc(100% / var(--columns, 6)));
}

.wood-shelf {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 22px, rgba(91,47,23,.06) 22px 24px),
    linear-gradient(180deg, #d59658 0 22%, #a76538 56%, #744126 100%);
  border-color: #5c321e;
  box-shadow: inset 0 3px rgba(255,225,175,.38), inset 0 -4px rgba(76,38,19,.18), 0 6px 8px rgba(68,40,22,.28);
}

.buffer-zone {
  margin: 12px 16px 5px;
  padding: 27px 10px 10px;
  border: 2px solid rgba(109,71,34,.32);
  border-radius: 20px;
  background:
    linear-gradient(rgba(255,251,229,.76), rgba(239,220,180,.76)),
    var(--paper-art) center / 250px;
  background-blend-mode: multiply;
  box-shadow: inset 0 2px rgba(255,255,255,.68), inset 0 -4px rgba(139,88,38,.1), 0 5px 0 rgba(105,64,28,.15), 0 10px 18px rgba(26,69,57,.14);
}

.zone-icon-row { top: 5px; left: 13px; }

.buffer-slot {
  border-color: rgba(82,89,64,.24);
  background:
    linear-gradient(rgba(255,255,255,.56), rgba(240,227,194,.4)),
    var(--paper-art) center / 150px;
  box-shadow: inset 0 2px rgba(255,255,255,.7), inset 0 -2px rgba(105,73,35,.08);
}

.buffer-slot.is-locked {
  border-color: rgba(255,245,213,.45);
  background: linear-gradient(155deg, #437a70, #1f5b51);
  box-shadow: inset 0 2px rgba(255,255,255,.13), inset 0 -3px rgba(7,44,39,.22), 0 3px 0 #123f39;
}

.basket-zone {
  margin: 6px 11px 7px;
  padding: 10px 7px 8px;
  border: 2px solid rgba(255,251,230,.7);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255,249,226,.52), rgba(233,214,176,.42)),
    var(--paper-art) center / 300px;
  background-blend-mode: multiply;
  box-shadow: inset 0 2px rgba(255,255,255,.72), inset 0 -4px rgba(117,72,31,.08), 0 8px 18px rgba(24,64,54,.14);
}

.basket::before {
  border-width: 2px;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(255,255,255,.72), color-mix(in srgb, var(--basket-bg), white 46%) 55%, color-mix(in srgb, var(--basket-bg), transparent 58%) 74%);
  box-shadow: inset 0 2px rgba(255,255,255,.6), 0 6px 13px color-mix(in srgb, var(--basket-edge), transparent 80%);
}

.basket-ready-count,
.basket-count {
  border-color: rgba(255,249,225,.92);
  box-shadow: inset 0 1px rgba(255,255,255,.25), 0 3px 0 rgba(12,59,51,.25), 0 6px 9px rgba(20,63,53,.17);
}

.booster-bar {
  margin: auto 8px 0;
  border: 3px solid #0d3d37;
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 34px, rgba(2,31,27,.05) 34px 37px),
    linear-gradient(180deg, #397b6d, #1c5a50 48%, #123f39);
  box-shadow: inset 0 3px rgba(255,255,255,.14), inset 0 -4px rgba(3,33,29,.22), 0 -7px 16px rgba(22,61,52,.14);
}

.booster {
  border: 2px solid rgba(255,245,211,.38);
  background: linear-gradient(155deg, rgba(255,255,255,.14), rgba(7,47,41,.22));
  box-shadow: inset 0 2px rgba(255,255,255,.14), inset 0 -3px rgba(3,34,29,.2), 0 4px 0 rgba(5,40,35,.56), 0 8px 12px rgba(5,39,34,.18);
}

.booster:active {
  transform: translateY(3px) scale(.98);
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 1px 0 rgba(5,40,35,.56), 0 4px 7px rgba(5,39,34,.16);
}

.modal {
  border: 4px solid #174f47;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,253,239,.9), rgba(245,228,190,.9)),
    var(--paper-art) center / 320px repeat;
  background-blend-mode: multiply;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), inset 0 -7px rgba(128,79,34,.08), 0 9px 0 #0e3d37, 0 28px 65px rgba(6,38,33,.45);
}

.modal-close {
  border: 2px solid rgba(255,248,220,.78);
  background: linear-gradient(155deg, #ff8a66, #e64f38);
  box-shadow: inset 0 2px rgba(255,255,255,.25), 0 4px 0 #b63b2a, 0 8px 12px rgba(112,38,26,.24);
}

.guide-list li,
.setting-row,
.store-product,
.shop-item,
.result-stats span {
  border: 2px solid rgba(111,78,41,.13);
  background:
    linear-gradient(rgba(255,255,255,.55), rgba(240,226,193,.26)),
    var(--paper-art) center / 220px;
  background-blend-mode: multiply;
  box-shadow: inset 0 2px rgba(255,255,255,.66), inset 0 -2px rgba(121,76,34,.06), 0 4px 8px rgba(31,68,57,.07);
}

.store-product.is-featured {
  border-color: rgba(218,130,42,.5);
  background:
    linear-gradient(rgba(255,241,188,.7), rgba(245,205,125,.38)),
    var(--paper-art) center / 220px;
}

.secondary-button {
  border: 2px solid rgba(39,100,83,.22);
  background:
    linear-gradient(rgba(238,247,228,.78), rgba(197,221,193,.7)),
    var(--paper-art) center / 200px;
  box-shadow: inset 0 2px rgba(255,255,255,.65), 0 5px 0 #9fbea2, 0 10px 15px rgba(29,77,62,.12);
}

.toast,
.skill-callout {
  border-width: 2px;
  border-color: rgba(255,247,218,.82);
  box-shadow: inset 0 2px rgba(255,255,255,.12), 0 5px 0 rgba(7,44,39,.42), 0 12px 24px rgba(8,43,37,.26);
}

@media (max-width: 390px) {
  .market-illustration { width: 98%; }
  .home-dock { width: 94%; }
  .market-board { margin-inline: 5px; }
  .buffer-zone { margin-inline: 11px; }
  .basket-zone { margin-inline: 7px; }
}

@media (max-height: 700px) {
  .brand-lockup { margin-bottom: -16px; }
  .market-illustration { height: 238px; }
  .home-dock { margin-top: -35px; }
  .game-status { margin-bottom: 5px; padding-block: 5px; }
  .buffer-zone { margin-top: 7px; padding-top: 24px; padding-bottom: 6px; }
  .basket-zone { margin-block: 4px; padding-block: 5px; }
}

/* v28 · In-game control layout matched to the reference game */
.game-topbar {
  position: relative;
  display: block;
  min-height: 108px;
  margin: 0;
  padding: 0;
}

.game-topbar .pause-button {
  position: absolute;
  left: 17px;
  top: max(14px, env(safe-area-inset-top));
  width: 47px;
  height: 47px;
  border: 3px solid #fff4d5;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff8a62, #ef4f38 66%, #cb372a);
  box-shadow: inset 0 2px rgba(255,255,255,.38), inset 0 -4px rgba(123,30,24,.2), 0 4px 0 #a92e26, 0 9px 15px rgba(92,34,27,.28);
}

.game-topbar .pause-button .ui-icon {
  width: 25px;
  height: 25px;
  stroke-width: 2.7;
}

.game-topbar .coin-chip.compact {
  position: absolute;
  right: 17px;
  top: max(14px, env(safe-area-inset-top));
  min-width: 104px;
  min-height: 45px;
  justify-content: flex-end;
}

.level-heading {
  position: absolute;
  left: 50%;
  top: max(67px, calc(env(safe-area-inset-top) + 56px));
  width: max-content;
  min-width: 0;
  height: auto;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fffbed;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 3px 0 #143f3a, 0 0 3px #143f3a, 0 7px 11px rgba(7,42,36,.32);
  transform: translateX(-50%);
}

.level-heading::before {
  content: "LEVEL";
  font-size: 26px;
  font-weight: 950;
  letter-spacing: .02em;
}

.level-heading .ui-icon,
.level-heading small { display: none; }
.level-heading strong { color: #fffbed; font-size: 31px; line-height: 1; }

.game-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.market-board {
  margin-top: 0;
}

.buffer-zone {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 14px 0;
  padding: 8px 10px;
  border-radius: 16px;
}

.zone-icon-row { display: none; }
.buffer-slots { width: 100%; justify-content: center; gap: clamp(5px, 1.7vw, 9px); }

.buffer-slot {
  width: min(44px, 10.6vw);
  border-width: 2px;
  border-style: solid;
  border-radius: 50%;
  background:
    radial-gradient(circle at 39% 32%, rgba(255,255,255,.95), rgba(246,241,230,.82) 48%, rgba(205,205,199,.56) 78%),
    var(--paper-art) center / 140px;
  box-shadow: inset 0 3px 5px rgba(255,255,255,.88), inset 0 -4px 6px rgba(77,77,69,.12), 0 3px 0 rgba(97,62,33,.15), 0 6px 8px rgba(30,63,53,.11);
}

.buffer-slot.is-locked {
  border-radius: 50%;
  border-color: #29443f;
  background: radial-gradient(circle at 35% 28%, #6d817d, #3f5652 63%, #293d3a);
}

.buffer-slot.has-fruit {
  border-radius: 50%;
}

.basket-zone {
  margin: clamp(31px, 6vh, 58px) 12px 7px;
  padding: 7px 6px 6px;
  border-radius: 22px;
}

.basket-row { align-items: end; gap: clamp(10px, 3vw, 18px); }
.basket { min-height: 94px; }
.basket-skin { width: 96%; height: 96%; left: 2%; top: 2%; }
.basket-cargo { --cargo-size: 29px; }

.booster-bar {
  grid-template-columns: repeat(3, 64px);
  gap: clamp(28px, 9vw, 47px);
  min-height: 86px;
  margin: auto 0 0;
  padding: 10px 14px max(12px, env(safe-area-inset-bottom));
  border: 0;
  border-top: 5px solid #5d321d;
  border-radius: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(64,31,16,.14) 46px 50px),
    linear-gradient(180deg, #9a5933, #6d3a24 55%, #4b291c);
  box-shadow: inset 0 3px rgba(255,201,133,.2), 0 -7px 13px rgba(66,38,22,.17);
}

.booster {
  width: 64px;
  height: 64px;
  border: 4px solid #c07a45;
  border-radius: 50%;
  padding: 5px;
  background: radial-gradient(circle at 43% 32%, #65314a, #38172a 72%);
  box-shadow: inset 0 3px rgba(255,255,255,.14), inset 0 -4px rgba(0,0,0,.2), 0 4px 0 #4b241a, 0 8px 12px rgba(37,20,14,.25);
}

.booster-icon { width: 49px; height: 49px; }
.booster > b {
  right: -7px;
  top: -8px;
  min-width: 24px;
  height: 24px;
  border: 3px solid #fff0cd;
  color: white;
  background: linear-gradient(145deg, #ff7259, #dc3f32);
}

.pause-modal {
  width: min(calc(100% - 74px), 340px);
  overflow: visible;
  padding: 68px 28px 30px;
  text-align: center;
}

.pause-title {
  position: absolute;
  left: 50%;
  top: -42px;
  margin: 0 !important;
  color: #fff8dd;
  font-size: clamp(42px, 13vw, 62px) !important;
  font-weight: 1000;
  letter-spacing: -.05em !important;
  -webkit-text-stroke: 7px #f04f39;
  paint-order: stroke fill;
  text-shadow: 0 5px 0 #a22f2a, 0 9px 13px rgba(71,29,24,.3);
  transform: translateX(-50%) rotate(-2deg);
}

.stacked-actions,
.victory-actions {
  display: grid;
  justify-items: center;
  gap: 17px;
}

.pause-action {
  width: min(100%, 224px);
  min-height: 55px;
  border: 3px solid rgba(255,248,214,.9);
  border-radius: 999px;
  color: white;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .03em;
  text-shadow: 0 2px rgba(46,35,24,.3);
  cursor: pointer;
}

.pause-home {
  background: linear-gradient(180deg, #63dcff, #2da7e8 62%, #187bc8);
  box-shadow: inset 0 3px rgba(255,255,255,.38), inset 0 -5px rgba(15,87,165,.25), 0 6px 0 #1268ae, 0 11px 18px rgba(21,88,151,.24);
}

.pause-replay {
  background: linear-gradient(180deg, #ffc94c, #ff8e21 62%, #ed6715);
  box-shadow: inset 0 3px rgba(255,255,255,.38), inset 0 -5px rgba(180,74,10,.24), 0 6px 0 #c64f12, 0 11px 18px rgba(162,74,20,.22);
}

.pause-continue {
  background: linear-gradient(180deg, #9aee2f, #54c711 62%, #37a30b);
  box-shadow: inset 0 3px rgba(255,255,255,.38), inset 0 -5px rgba(34,121,7,.23), 0 6px 0 #268709, 0 11px 18px rgba(43,111,15,.22);
}

.pause-action:active {
  transform: translateY(4px);
  filter: brightness(.97);
}

.victory-actions { margin-top: 16px; }
.victory-reward {
  width: min(100%, 224px);
  min-height: 43px;
  margin-top: 5px;
  border: 2px solid rgba(255,248,218,.78);
  border-radius: 999px;
}

@media (max-width: 390px) {
  .game-topbar { min-height: 101px; }
  .game-topbar .pause-button { left: 11px; }
  .game-topbar .coin-chip.compact { right: 11px; }
  .level-heading { top: max(64px, calc(env(safe-area-inset-top) + 53px)); }
  .level-heading::before { font-size: 23px; }
  .level-heading strong { font-size: 27px; }
  .buffer-zone { margin-inline: 9px; }
  .buffer-slot { width: min(40px, 10.2vw); }
  .basket-zone { margin-inline: 8px; }
  .booster-bar { gap: 24px; }
}

@media (max-height: 700px) {
  .game-topbar { min-height: 88px; }
  .game-topbar .pause-button,
  .game-topbar .coin-chip.compact { top: max(7px, env(safe-area-inset-top)); }
  .level-heading { top: max(57px, calc(env(safe-area-inset-top) + 47px)); }
  .level-heading::before { font-size: 21px; }
  .level-heading strong { font-size: 25px; }
  .buffer-zone { min-height: 55px; margin-top: 7px; padding: 6px 8px; }
  .buffer-slot { width: min(36px, 9.6vw); }
  .basket-zone { margin-top: 20px; }
  .basket { min-height: 82px; }
  .booster-bar { min-height: 70px; padding-block: 6px max(7px, env(safe-area-inset-bottom)); }
  .booster { width: 54px; height: 54px; }
  .booster-icon { width: 42px; height: 42px; }
}

/* v30 · Report-matched lobby: controls at the top, logo center, play at bottom */
.home-screen .topbar {
  position: absolute;
  z-index: 8;
  inset: 0 0 auto;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 18px 0;
}

.home-left-controls {
  display: grid;
  justify-items: start;
  gap: 9px;
}

.home-screen .icon-button {
  width: 55px;
  height: 55px;
  border: 4px solid #fff7d7;
  color: white;
  background: radial-gradient(circle at 35% 25%, #ff9a69, #f05a42 65%, #c83b2c);
  box-shadow: inset 0 3px rgba(255,255,255,.35), 0 5px 0 #a73529, 0 11px 20px rgba(64,31,20,.3);
}

.home-screen .icon-button .ui-icon {
  width: 31px;
  height: 31px;
  stroke-width: 2.6;
}

.home-screen .profile-chip {
  min-width: 76px;
  min-height: 29px;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  border: 2px solid #f7e6a9;
  border-radius: 4px;
  color: #fff8df;
  background: linear-gradient(#173f3b, #082925);
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 4px 0 rgba(4,27,24,.72), 0 8px 14px rgba(8,35,31,.25);
}

.home-screen .profile-chip .ui-icon {
  width: 14px;
  height: 14px;
}

.profile-label {
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
}

.home-screen .coin-chip {
  min-height: 46px;
  margin-top: 1px;
  padding: 5px 8px 5px 5px;
  border: 3px solid #fff7d7;
  background: linear-gradient(#8b2d21, #5c201a);
  box-shadow: inset 0 2px rgba(255,255,255,.2), 0 5px 0 #3d1713, 0 10px 18px rgba(49,24,18,.28);
}

.home-screen .coin-chip strong {
  color: white;
  text-shadow: 0 2px rgba(39,17,12,.45);
}

.home-screen .coin-chip .plus-mark {
  background: linear-gradient(#72c45f, #318944);
}

.home-content {
  min-height: 100dvh;
  justify-content: space-between;
  padding: clamp(102px, 14vh, 132px) 18px max(44px, calc(env(safe-area-inset-bottom) + 28px));
}

.market-illustration {
  flex: 0 1 auto;
  width: min(98%, 480px);
  height: clamp(270px, 49vh, 430px);
  margin: auto auto 0;
}

.hero-art {
  object-fit: contain;
  filter: drop-shadow(0 18px 12px rgba(20,55,45,.3)) saturate(1.08);
}

.brand-lockup {
  position: absolute;
  z-index: 5;
  left: 7%;
  right: 7%;
  top: 35%;
  margin: 0;
  padding: 15px 18px 18px;
  transform: rotate(-2deg);
}

.brand-lockup::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px 0 0;
  border: 5px solid #f8c847;
  border-radius: 25px 20px 27px 19px;
  background:
    linear-gradient(rgba(255,255,255,.08), transparent 32%),
    linear-gradient(165deg, #205e55, #0d403a 68%, #092f2b);
  box-shadow: inset 0 0 0 3px rgba(255,248,207,.23), inset 0 -8px rgba(5,30,27,.25), 0 8px 0 #743c24, 0 14px 18px rgba(31,43,27,.34);
}

.brand-lockup h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  font-size: clamp(38px, 10.5vw, 54px);
  line-height: .82;
  letter-spacing: .01em;
  -webkit-text-stroke: 2px #7f321f;
  text-shadow: 0 3px 0 #fff5c0, 0 6px 0 #bc4d2d, 0 10px 12px rgba(59,24,13,.36);
}

.brand-lockup h1 span { color: #ffde49; }
.brand-lockup h1 em { color: #ff7b4c; font-style: normal; }

.home-dock {
  flex: 0 0 auto;
  width: min(78%, 380px);
  margin: -16px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-dock::before { display: none; }

.home-dock .play-button {
  width: 100%;
  min-height: 86px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 9px 24px 10px 10px;
  border: 5px solid #ffe15d;
  border-radius: 35px;
  background:
    radial-gradient(circle at 50% 0, rgba(255,255,255,.42), transparent 38%),
    linear-gradient(#ffbc28, #ff7a23 58%, #ef4f1e);
  box-shadow: inset 0 0 0 3px #fff3a1, inset 0 -8px rgba(179,49,14,.18), 0 8px 0 #bd3b18, 0 16px 24px rgba(91,43,20,.3);
}

.home-dock .play-button:active {
  transform: translateY(5px);
  box-shadow: inset 0 0 0 3px #fff3a1, inset 0 -5px rgba(179,49,14,.18), 0 3px 0 #bd3b18, 0 9px 15px rgba(91,43,20,.25);
}

.home-dock .play-button::after { inset: 5px 12% auto; }

.play-glyph {
  width: 58px;
  height: 58px;
  border: 3px solid #f45a25;
  border-radius: 18px;
  color: #f45a25;
  background: linear-gradient(#fffef1, #fff4c5);
}

.play-glyph .ui-icon { width: 36px; height: 36px; }

.play-copy {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  color: white;
  line-height: .9;
  text-shadow: 0 3px 0 #c73f19, 0 5px 8px rgba(91,36,16,.28);
}

.play-copy strong {
  font-size: clamp(30px, 8vw, 42px);
  letter-spacing: .02em;
}

.play-copy small {
  margin-top: 8px;
  color: #fff06b;
  font-size: clamp(13px, 3.5vw, 18px);
  font-weight: 950;
  letter-spacing: .07em;
}

.play-copy b { color: inherit; }

@media (max-width: 390px) {
  .home-screen .topbar { padding-inline: 14px; }
  .home-content { padding-inline: 8px; }
  .market-illustration { width: 100%; }
  .home-dock { width: 82%; }
  .brand-lockup h1 { font-size: 40px; }
}

@media (max-height: 700px) {
  .home-screen .icon-button { width: 48px; height: 48px; }
  .home-screen .profile-chip { min-height: 26px; }
  .home-screen .coin-chip { min-height: 41px; }
  .home-content { padding-top: 78px; padding-bottom: max(30px, calc(env(safe-area-inset-bottom) + 18px)); }
  .market-illustration { height: 275px; }
  .brand-lockup { top: 34%; }
  .brand-lockup h1 { font-size: 38px; }
  .home-dock { width: min(74%, 330px); margin-top: -10px; }
  .home-dock .play-button { min-height: 74px; grid-template-columns: 54px 1fr; border-radius: 30px; }
  .play-glyph { width: 49px; height: 49px; }
  .play-copy strong { font-size: 31px; }
  .play-copy small { margin-top: 5px; font-size: 13px; }
}

/* 发布环境（game.js 按配置切换）：收费关闭时隐藏真钱商品；模拟激励广告只在本地开发显式打开时显示。 */
.real-money-off .store-grid { display: none; }
.rewarded-ads-off .rewarded-offer,
.rewarded-ads-off .rewarded-action { display: none !important; }
