/* Fruit Merge: page-specific styles on top of ../arcade-common/pz.css */
body[data-tod="day"] { --accent: #d6336c; --accent2: #e8590c; --glow: rgba(214, 51, 108, .22); }
body[data-tod="night"] { --accent: #ff6b9d; --accent2: #ffa94d; --glow: rgba(255, 107, 157, .26); }
.field > span em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; }
.col { display: grid; gap: 16px; min-width: 0; }
.menu-grid > * { min-width: 0; }
.hero-cv { width: 100%; aspect-ratio: 4 / 3; display: block; border-radius: 14px; margin: 12px 0 2px; background: var(--card2); border: 1px solid var(--line); touch-action: pan-y; }

/* mode picker */
.modes { display: grid; gap: 8px; }
.modes button { text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card2); min-height: 60px; }
.modes button b { font-size: 1rem; }
.modes button span { grid-column: 1; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.modes button small { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.modes button[aria-checked="true"] { border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 6px 18px var(--glow); }
.modes button[aria-checked="true"] span, .modes button[aria-checked="true"] small { color: rgba(255, 255, 255, .92); }
.daily { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.daily-t { display: grid; gap: 2px; min-width: 0; }
.daily-t b { font-size: .98rem; }
.daily-t span { color: var(--muted); font-size: .8rem; }
.daily .btn { min-width: 130px; flex: 0 0 auto; }
@media (max-width: 420px) { .daily .btn { width: 100%; } }

/* how to play */
.how { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.45; color: var(--ink); }
.how .pi { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.2rem; }

/* leaderboard */
.lb { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.lb li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--card2); font-size: .92rem; min-width: 0; }
.lb li.me { outline: 2px solid var(--accent); }
.lb .rk { font-weight: 800; color: var(--muted); text-align: center; }
.lb li:nth-child(-n+3) .rk { color: var(--accent); }
.lb .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb .md { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.lb b { font-variant-numeric: tabular-nums; }
#lbBody .hint { text-align: center; padding: 14px 4px; }

/* play screen */
body[data-screen="play"] { overflow: hidden; position: fixed; inset: 0; width: 100%; overscroll-behavior: none; }
body[data-screen="play"] .top, body[data-screen="play"] main > #scMenu { display: none; }
.play { position: fixed; inset: 0; z-index: 20; margin: 0; background: #000; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair; outline: none; }
.hud { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hudbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 14, 40, .55); color: #fff; font-size: 1.1rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hudbtn[aria-pressed="false"] { opacity: .55; }
.hud-mid { text-align: center; pointer-events: none; min-width: 0; }
.hud-score { font-weight: 800; font-size: clamp(1.5rem, 7vw, 2.2rem); line-height: 1; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .55), 0 0 2px #000; font-variant-numeric: tabular-nums; }
.hud-combo { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; color: #1a1030; background: linear-gradient(135deg, #ffd24a, #ff8a3d); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); animation: pulse .5s; }
@keyframes pulse { from { transform: scale(1.3); } }
@media (max-width: 360px) { .hud { gap: 4px; padding-left: 6px; padding-right: 6px; } }
/* game over / pause overlay */
.newbest { display: inline-block; margin-bottom: 6px; padding: 4px 14px; border-radius: 999px; font-weight: 800; font-size: .85rem; color: #1a1030; background: linear-gradient(135deg, #ffd24a, #ff8a3d); animation: pulse .6s; }
.ovscore { font-size: clamp(2.6rem, 14vw, 3.6rem); font-weight: 800; line-height: 1.05; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.ovmode { color: var(--muted); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.ovstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.ovstats div { background: var(--card2); border-radius: 12px; padding: 8px 4px; min-width: 0; }
.ovstats b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ovstats span { display: block; color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.ovname { text-align: left; margin-top: 12px; }
.ovboard { text-align: left; margin-top: 8px; }
.ovboard .label { margin: 8px 0 0; }
.ovboard .lb { margin-top: 6px; }
.overlay .row .btn { flex: 1 1 130px; }
.overlay .btn.go { margin-top: 0; width: auto; }
@media (max-width: 380px) { .ovstats { grid-template-columns: repeat(2, 1fr); } }

/* touch targets: at least 44px */
.seg button, .chips button { min-height: 44px; }
.seg { padding: 2px; }
.btn.small { min-height: 44px; }

/* result cards: the button row stays visible, only the middle scrolls on short screens */
.overlay > .card { display: flex; flex-direction: column; overflow: hidden; padding: 16px; }
.overlay .ovbody { overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; padding: 0 2px; }
.overlay .big, .overlay h2, .overlay .row { flex: none; }
body[data-tod="night"] .ovscore { background-image: linear-gradient(90deg, #ff7ac0, #8da0ff); }
@media (max-height: 680px) { .overlay .big { display: none; } .overlay h2 { font-size: 1.3rem; margin-top: 0; } .ovscore { font-size: 2.6rem; } .ovboard { display: none; } }
@media (max-height: 520px) { .overlay .row { margin-top: 10px; flex-wrap: nowrap; } .overlay .row .btn { flex: 1 1 0; padding: 8px 6px; font-size: .9rem; } .ovstats { margin-top: 8px; } .ovname { margin-top: 6px; } }
@media (max-width: 420px) { .overlay .row { gap: 8px; } .overlay .row .btn { flex: 1 1 28%; padding: 8px 4px; font-size: .88rem; } .overlay .row .btn[data-role="again"] { flex-basis: 100%; } }

/* fruit ladder (how to play) */
.legend-t { margin-top: 16px; }
.ladder { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.ladder li { display: grid; justify-items: center; gap: 2px; padding: 6px 2px 5px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); min-width: 0; }
.ladder canvas { width: 40px; height: 40px; display: block; }
.ladder span { font-size: .66rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ladder li:last-child { border-color: var(--accent); }
.hud-combo[data-pop="1"] { animation: pulse .25s ease-out; }
