/* The Ember puzzle look standard: Twice Over is the reference (owner, 1 Dec 2026;
   D:/Claude/shared/puzzle-game-standard/TWICE-OVER-LOOK.md). Sizes, spacing, weight, icons and layout match it; the
   colours, art and gameplay stay Garden Guests's. Loaded after chrome.css, before cosmetics.css (looks still win). */
:root { --ui: "Figtree", "Nunito", system-ui, sans-serif; --display: "Unbounded", "Figtree", system-ui, sans-serif; }
:root:lang(th) { --ui: "Figtree", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif; --display: "Noto Sans Thai", "Leelawadee UI", sans-serif; }
:root:lang(ja) { --ui: "Figtree", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif; --display: "Noto Sans JP", "Yu Gothic UI", sans-serif; }
:root:lang(ko) { --ui: "Figtree", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; --display: "Noto Sans KR", "Malgun Gothic", sans-serif; }
:root { --font: var(--ui); }
body { font-family: var(--ui); font-size: 15px; line-height: 1.45; }

/* column: 480 of content, 16 at the sides */
.app { max-width: 512px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.app:has(#mapScreen:not(.hidden)) { gap: 12px; }
#mapScreen { gap: 12px !important; }

/* header */
header h1, .app:has(#mapScreen:not(.hidden)) header h1 { font: 700 22px/1.05 var(--display); letter-spacing: -.01em; }
.mapbtns { gap: 6px; }
.mapbtns .sq { width: 40px; height: 40px; border-radius: 12px; }
.mapbtns .sq svg.hic { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.mapbtns .sq b { font: 800 23px/1 var(--display); }

/* stats row */
.mapfoot { min-height: 58px; padding: 10px 14px; gap: 14px; border-radius: 16px; justify-content: space-between; font: 600 14px var(--ui); }
.mapfoot .fstars, .mapfoot .emberchip { margin: 0; font: 600 14px var(--ui); color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
.mapfoot .tries:empty { display: none; }
.mapfoot svg.sic { width: 15px; height: 15px; flex: none; }
.mapfoot .fstars svg.sic, .mapfoot .emberchip svg.sic { color: var(--accent2); }
.mapfoot button.chestbtn:not(.primary) { background: none; border: 0; box-shadow: none; padding: 0; color: var(--muted); font: 500 14px var(--ui); gap: 5px; display: inline-flex; align-items: center; }
.mapfoot button.chestbtn.primary { gap: 5px; font-weight: 700; }
.mapfoot #cosBtn { min-width: 111px; height: 36px; gap: 6px; border-radius: 12px; font: 600 14px var(--ui); display: inline-flex; align-items: center; justify-content: center; }

/* Daily, Weekly, Community, Endless, Event rows */
.daily.slim { min-height: 62px; padding: 10px 12px 10px 14px; gap: 10px; border-radius: 16px; }
.daily.slim .ricon { flex: none; width: 16px; display: grid; place-items: center; color: var(--accent2); }
.daily.slim .ricon svg { width: 16px; height: 16px; fill: currentColor; }
.daily.slim .ric-text { font: 700 18px/1 var(--ui); }
.daily.slim .slimtext { flex: 1; min-width: 0; }
.daily.slim .slimtext > b { font: 700 14px/1.3 var(--ui); }
.daily.slim .slimtext .sub { font: 400 13px/1.35 var(--ui); margin-top: 1px; }
.daily.slim .btns { gap: 8px; }
.daily.slim .btns button { min-width: 54px; height: 40px; padding: 4px 12px; border-radius: 12px; font: 700 15px var(--ui); }
.daily.slim .btns button:not(.primary) { min-width: 54px; font-weight: 600; }

/* chapter card */
.chap.pager { border-radius: 16px; padding: 14px; background:
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 14%, var(--bg)), color-mix(in srgb, var(--tint) 10%, var(--bg)));
  border: 1px solid color-mix(in srgb, var(--tint) 45%, var(--line)); }
.chtop { margin: -14px -14px 0; padding: 14px 14px 6px; background: color-mix(in srgb, var(--tint) 34%, transparent); }
.chhead { background: none; border: 0; box-shadow: none; padding: 0; gap: 8px; border-radius: 0; }
.chnav { width: 36px; height: 36px; font: 700 22px/1 var(--display); background: color-mix(in srgb, var(--tint) 30%, var(--panel)); border: 1px solid color-mix(in srgb, var(--tint) 60%, var(--line)); }
.chicon { flex: none; width: 44px; height: 44px; padding: 0; border-radius: 12px; display: grid; place-items: center; font: 700 20px/1 var(--ui); color: #fff3d6; background: color-mix(in srgb, var(--tint) 75%, #1b130e); border: 0; }
.chtitle small { font: 600 12px/1.3 var(--ui); letter-spacing: .08em; }
.chtitle b { font: 700 17px/1.15 var(--display); }
.chstars { flex: none; font: 700 13.5px var(--ui); color: var(--accent2); white-space: nowrap; }
.chsub { margin: 10px 0 0; gap: 10px; min-height: 30px; }
.chbar { flex: 1; height: 4px; border-radius: 99px; background: color-mix(in srgb, #fff3d6 18%, transparent); overflow: hidden; }
.chbar i { display: block; height: 100%; width: 0; background: var(--accent2); }
.chfilter { margin: 0; min-width: 94px; height: 30px; padding: 3px 10px; border-radius: 12px; font: 400 12.5px var(--ui); }
.chgate { position: relative; z-index: 2; margin: 6px 0 0; font: 400 12.5px/1.35 var(--ui); color: color-mix(in srgb, #fff3d6 75%, transparent); text-align: left; }

/* sheets */
.overlay .card, .overlay .card.scrollcard, .overlay .card.sheetcard { width: min(480px, 100%); border-radius: 20px; padding: 16px 18px 18px; }
.card h2 { font: 700 17px/1.25 var(--display); }
.sheethead { justify-content: space-between; text-align: left; }
.sheethead h2 { text-align: left; flex: 1; }
.xbtn { border-radius: 12px; width: 36px; height: 36px; }
.xbtn:focus-visible { outline: 2px solid var(--line); outline-offset: 0; }
#shopAcorns.emberbig { font: 600 13px var(--ui); text-align: left; margin: -6px 0 0; }
.shopitem { min-height: 48px; }
.switch input[type=checkbox], #remRow input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

@media (max-width: 600px) {
  header h1, .app:has(#mapScreen:not(.hidden)) header h1 { font-size: 13px; }
  .mapbtns { gap: 3px; }
  .mapbtns .sq { width: 32px; height: 32px; border-radius: 10px; }
  .mapbtns .sq svg.hic { width: 17px; height: 17px; }
  .mapbtns .sq b { font-size: 18px; }
  .app:has(#mapScreen:not(.hidden)), #mapScreen { gap: 8px !important; }
  .mapfoot { min-height: 48px; padding: 6px 10px; gap: 8px; font-size: 13.5px; }
  .mapfoot .fstars, .mapfoot .emberchip, .mapfoot button.chestbtn:not(.primary) { font-size: 13.5px; }
  .mapfoot #cosBtn { min-width: 107px; height: 34px; font-size: 13.5px; }
  .daily.slim { min-height: 48px; padding: 6px 8px 6px 12px; }
  .daily.slim .btns button { height: 34px; }
  .chap.pager { padding: 10px 12px 12px; }
  .chtop { margin: -10px -12px 0; padding: 10px 12px 6px; }
  .chicon { width: 36px; height: 36px; font-size: 17px; }
  .chnav { width: 32px; height: 32px; font-size: 19px; }
}
@media (max-width: 360px) {
  .app { padding-left: 10px; padding-right: 10px; }
  .mapbtns .sq { width: 30px; height: 30px; }
  .mapfoot { gap: 5px; padding: 6px 8px; }
  .mapfoot #cosBtn { min-width: 0; padding: 0 8px; }
  .daily.slim .btns { gap: 4px; }
  .daily.slim .btns button, .daily.slim .btns button:not(.primary) { min-width: 40px; padding: 4px 9px; font-size: 13px; }
  .daily.slim .ricon { display: none; }
  .chstars { font-size: 12px; }
  .chicon { display: none; }
  .chtitle b { font-size: 14px; }
}

@media (min-width: 361px) and (max-width: 600px) { .daily.slim .slimtext > b { line-height: 1.2; } .daily.slim .slimtext .sub { font-size: 12.5px; line-height: 1.2; margin-top: 0; } }

/* UI check (owner 1 Dec): tidy rows, full-width button rows, readable tabs, one-line labels */
.keybox { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
#keyBtn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 8px 14px; background: none; border: 0; box-shadow: none; font: 700 14px var(--ui); color: var(--text); text-align: left; }
#keyBtn i::after { content: '▾'; font-style: normal; color: var(--muted); } #keyBtn[aria-expanded="false"] i::after { content: '▸'; }
#keyList { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
#keyList[hidden] { display: none; }
.keyrow { display: flex; align-items: center; gap: 12px; text-align: left; }
.keycell { --cs: 40px; flex: none; width: 40px; height: 40px; position: relative; cursor: default; font-size: 14px; }
.keycell.cell { display: flex; align-items: center; justify-content: center; }
.keycell .cpv { font-size: 11px; }
.keywall::after { content: ''; position: absolute; right: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 3px; background: #8a7a6a; z-index: 3; }
.keysign { display: grid; place-items: center; font: 700 17px var(--ui); color: var(--accent2); }
.keywords { display: flex; flex-direction: column; min-width: 0; font: 400 13px/1.35 var(--ui); color: var(--muted); }
.keywords b { font: 700 14px/1.3 var(--ui); color: var(--text); }
.scrollbody .list { display: flex; flex-direction: column; gap: 8px; }
.scrollbody .list > button.row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; min-height: 44px; }
.scrollbody .list > button.row .grow { flex: 1; min-width: 0; }
.overlay .btns > button, .overlay .btns > a { flex: 1 1 0; min-width: 0; }
.overlay .btns > a { display: flex; text-decoration: none; }
.overlay .btns > a > button { width: 100%; }
.overlay .btns > button, .overlay .btns > a > button { min-height: 40px; white-space: nowrap; }
.overlay .btns.wrap > button, .overlay .btns.wrap > a { flex: 1 1 130px; }
.overlay .btns > input { flex: 2 1 0; min-width: 0; }
#mailBox .btns > button { flex: 0 0 auto; padding-inline: 16px; }
.overlay .lbtabs > button { flex: 1 1 0; min-height: 40px; }
.overlay button.primary, .lbtabs button.primary { color: var(--on-accent); }
.signin > * { width: 260px; max-width: 100%; }
.signin iframe { color-scheme: light; }   /* Google's button draws a white box around itself under a dark colour scheme */
.signin #mailBtn[hidden] { display: none; }
body:not(.kbd) .xbtn:focus-visible { outline: none; }   /* no ring on the X when a sheet opens by tap or mouse */

/* UI check, second pass */
.card:has(.sheethead) { text-align: left; }
.card:has(.sheethead) button { text-align: center; }
.card:has(.sheethead) .shopitem, .card:has(.sheethead) .list > button.row, .card:has(.sheethead) .keyhead { text-align: left; }
.overlay .btns.wrap > button, .overlay .btns.wrap > a { min-width: max-content; }
#verLine { color: var(--muted); opacity: 1; }
header h1#title { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
.app:not(:has(#mapScreen:not(.hidden))) header h1#title { font-size: 15px; }
#hintBtn { white-space: nowrap; font-size: .9em; padding-inline: 2px; }
.morelist button { white-space: nowrap; min-height: 32px; }
.morelist button:disabled { max-width: none; }
.ecoach-skip { min-height: 32px; }

.overlay .dailybtns { display: flex; flex-wrap: wrap; gap: 8px; }
.overlay .dailybtns > button, .overlay .dailybtns > a { flex: 1 1 130px; min-width: max-content; }
#verLine { color: var(--text) !important; opacity: .72; }

/* play buttons: one line each, a long word takes the room it needs */
.tools { display: flex; } .tools button { flex: 1 1 auto; white-space: nowrap; overflow-wrap: normal; padding-inline: 4px; }

/* narrowest phones: a long one-word title must not break mid-word */
@media (max-width: 360px) { .sheethead h2, .sheethead h3 { font-size: 17px; } }
/* The map under an open sheet stops moving, so the phone does not redraw it behind every menu (1 Dec 2026; Scorch). */
body:has(.overlay.show) #mapScreen *, body:has(.overlay.show) #mapScreen *::before, body:has(.overlay.show) #mapScreen *::after { animation-play-state: paused !important; }
/* Stars not earned are dim on the win card: all three showed gold whatever the score. */
#winStars .off { color: var(--muted); opacity: .35; }
/* The ad loading card and the reward / purchase card sit above every sheet; toasts stay above them (1 Dec 2026). */
#boughtOverlay { z-index: 92; } .toast { z-index: 94; }
