/* Makeover, Oct 18 2026: compact top section, edge-to-edge board, even spacing.
   Loaded last so it overrides stitched.css / themes.css / header.css. Layout only -
   no gameplay or save changes. Home and Settings button sizes are unchanged. */

/* --- 1. Compact top section --------------------------------------------- */
/* The theme name is shown in Settings > Theme; during play it only takes room. */
.theme-caption{display:none}
header.top,.brand{min-height:52px}
.stitched-title{font-size:clamp(26px,7vw,34px)}

/* All themes: two slim rows. Row 1 = Level | Goal | Moves, Row 2 = Score | Best | Glows. */
body .dashboard{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:0 8px;padding:5px 8px 6px}
body .dashboard .lvl-pill{grid-column:1;grid-row:1;flex-direction:column;align-items:flex-start;gap:0;min-height:0;padding:0 2px}
body .dashboard .lvl-pill .level-line{font:14px/1.1 Georgia,serif;white-space:nowrap}
body .dashboard .lvl-pill b{font-size:20px}
body .dashboard .lvl-pill .ty{font-size:10px;line-height:1.2;white-space:nowrap}
body .dashboard .status{display:contents}
body .dashboard .goal-content{grid-column:2;grid-row:1;min-width:0;padding:0 8px;border-left:1px dashed #c6b99d;border-right:1px dashed #c6b99d}
body .dashboard .goal-label{margin:0 0 2px}
body .dashboard .goal-chip{font-size:14px}
body .dashboard .goal-chip .swatch{width:21px;height:21px}
body .dashboard .moves{grid-column:3;grid-row:1;height:40px;min-height:40px;flex-basis:auto;min-width:58px;padding:0 6px}
body .dashboard .moves .n{font-size:21px}
body .dashboard .moves .l{font-size:8px}
body .dashboard .scorebar{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:auto auto minmax(0,1fr);grid-template-rows:auto;align-items:center;gap:0 14px;height:auto;min-height:0;margin-top:5px;padding:4px 2px 0}
body .dashboard .score{display:flex;align-items:baseline;gap:5px;position:static;grid-row:1}
body .dashboard .score .l{position:static}
body .dashboard .score .n,body .dashboard .score.target .n{font-size:17px}
body .dashboard .glowbar{grid-column:3;grid-row:1;border-top:0;margin:0;padding:0;min-width:0}


/* --- 2. Edge-to-edge board ----------------------------------------------- */
/* One thin stitched border instead of two, so the tiles get the width. */
body .board-wrap{padding:4px;outline-offset:-3px;border-radius:14px}
body #stage{border-radius:9px}
/* --pbp-chrome = everything on screen that isn't the board, so the board is as big as
   the phone allows while the 988 button stays on screen without scrolling. */
:root{--pbp-chrome:300px}
@media(max-height:740px){:root{--pbp-chrome:282px}}
.board-wrap{width:min(100%,max(210px,calc(100dvh - var(--pbp-chrome))))}

/* --- 3. Even spacing ------------------------------------------------------ */
/* On tall phones the stats, board and Nudges stay together as one group, centered in the
   spare height, instead of leaving one big gap above the 988 button. The 988 button stays at
   the bottom, same size and visibility. */
#app{gap:8px}
.dashboard{margin-top:auto}
.boosters{margin-bottom:auto}
.support-link{margin-top:0;padding-top:4px}
@media(max-width:360px){#app{padding-left:6px;padding-right:6px}}


/* Stitched score row with big scores (six digits): keep Score, Best and Glows on one line.
   On narrower phones the "0 of 3 Glows" words step aside - the three rings already show it. */
body .dashboard .scorebar{gap:0 10px}
body .dashboard .glowbar{overflow:hidden}
body .dashboard .glow-next{white-space:nowrap}
@media(max-width:440px){body .dashboard .glow-title{display:none}}

/* Themes with title art have a taller header; give the board the rest. */
body[data-art-title]{--pbp-chrome:330px}
@media(max-height:760px){body[data-art-title]{--pbp-chrome:300px}}

/* End-of-level "Skip bonus" (all themes): compact, sits over the Moves box, and the game's
   hidden flag always wins - it must never show during normal play. */
.skip-bonus[hidden]{display:none!important}
.dashboard .skip-bonus{width:auto;min-width:0;max-width:92px;height:auto;min-height:0;top:50%;right:0;transform:translateY(-50%);padding:3px 6px 4px;gap:2px;border-width:2px}
.dashboard .skip-title{font:700 11px/1.1 Georgia,serif;letter-spacing:0;white-space:nowrap}
.dashboard .skip-remaining{font-size:9px;line-height:1.1;white-space:nowrap}
.dashboard .skip-track{height:3px}
