/* Gnome Line: game-specific styles on top of design/garden.css. Tokens only (no new colours or fonts). */

html.gl-playing, html.gl-playing body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.gl-screen[hidden] { display: none !important; }
.gl-chip:empty { display: none; }

/* ------------------------------------------------------------------ start */
.gl-start__in { display: grid; gap: var(--gg-s5); padding-block: var(--gg-s5) var(--gg-s7); }
.gl-start__hero h1 { margin-top: 6px; }
.gl-start__hero .gg-lede { margin-top: 10px; }
.gl-hero {
  margin-top: var(--gg-s4); aspect-ratio: 16 / 10; overflow: hidden;
  border: var(--gg-border); border-radius: var(--gg-r-lg); box-shadow: var(--gg-shadow-lg); background: var(--gg-green-300);
}
.gl-hero canvas { display: block; width: 100%; height: 100%; }
.gl-start__side { display: grid; gap: var(--gg-s5); align-content: start; }
.gl-playpanel { display: grid; gap: 14px; }
.gl-seg { width: 100%; }
.gl-seg button { padding: 0 6px; }
.gl-best, .gl-daily-note { font-size: var(--gg-text-sm); color: var(--gg-ink-2); text-align: center; font-weight: 600; }
.gl-daily-note { color: var(--gg-ink-3); margin-top: -4px; font-size: var(--gg-text-xs); }
.gl-howlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.gl-howlist li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; font-size: var(--gg-text-sm); line-height: 1.45; color: var(--gg-ink-2); }
.gl-howi { width: 40px; height: 40px; display: grid; place-items: center; border: var(--gg-border); border-radius: var(--gg-r-sm); background: var(--gg-green-100); }
.gl-howi svg { width: 28px; height: 24px; }
@media (min-width: 900px) {
  .gl-start__in { grid-template-columns: 1.15fr .85fr; gap: var(--gg-s7); align-items: start; padding-block: var(--gg-s7); }
  .gl-hero { aspect-ratio: 4 / 3; }
}

/* ------------------------------------------------------------------ the garden screen */
.gl-game {
  position: fixed; left: 0; right: 0; top: var(--gl-bar, 66px); bottom: 0; z-index: 10;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--gg-cream);
  /* one column that never grows past the screen, whatever the tray holds (a full rv 4 shed widened it on a phone) */
  grid-template-columns: minmax(0, 1fr);
}
.gl-tray { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.gl-hud {
  display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px var(--gg-gutter);
  background: var(--gg-paper); border-bottom: var(--gg-border);
}
.gl-sun { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gl-sun__arc { width: 72px; height: 28px; flex: none; overflow: visible; }
.gl-sun__txt { display: grid; line-height: 1.05; white-space: nowrap; }
.gl-sun__day { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-lg); letter-spacing: -.01em; }
.gl-sun__wk { font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); }
.gl-home { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border-radius: var(--gg-r-pill); }
.gl-home__icon svg { width: 32px; height: 32px; }
.gl-home__txt { display: flex; align-items: baseline; gap: 5px; line-height: 1; }
.gl-home__k { font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); }
.gl-home__v { font-family: var(--gg-font-display); font-weight: 800; font-size: 28px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.gl-hudbtns { display: flex; gap: 8px; }
.gl-hudbtn {
  width: 46px; height: 46px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-paper); box-shadow: var(--gg-shadow-sm);
  font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md);
  transition: transform var(--gg-dur-xs) var(--gg-ease-out), box-shadow var(--gg-dur-xs) ease, background-color var(--gg-dur-sm) ease;
  touch-action: manipulation;
}
.gl-hudbtn svg { width: 22px; height: 22px; }
.gl-hudbtn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }
.gl-hudbtn.is-on { background: var(--gg-lime); }

.gl-board { position: relative; overflow: hidden; background: var(--gg-green-300); touch-action: none; }
.gl-board > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }

.gl-tag {
  position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; max-width: calc(100% - 16px);
  padding: 8px 14px; border-radius: var(--gg-r-pill); background: var(--gg-ink); color: var(--gg-cream);
  font-weight: 700; font-size: var(--gg-text-sm); line-height: 1.2; box-shadow: 3px 3px 0 var(--gg-green-600);
}
.gl-tag.is-bad { background: var(--gg-suit-red); color: var(--gg-paper); box-shadow: 3px 3px 0 var(--gg-ink); }
.gl-paused, .gl-armed {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 24px);
  padding: 8px 16px; border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-paper); box-shadow: var(--gg-shadow-sm);
  font-weight: 700; font-size: var(--gg-text-sm); line-height: 1.25; text-align: center; pointer-events: none; white-space: nowrap;
}
.gl-paused[hidden], .gl-armed[hidden], .gl-tag[hidden], .gl-hint[hidden], .gl-ghost[hidden], .gl-linecard[hidden],
.gl-pop[hidden], .gl-keyhint[hidden], .gl-lesson[hidden], .gl-finger[hidden], .gl-coins[hidden], .gl-shop[hidden],
.gl-shopbtn[hidden], .gl-resume[hidden], .gl-linecard [hidden], .gl-zoom [hidden] { display: none !important; }

/* zoom: a small column at the garden's bottom right (under the first-time hint, which sits above it). The
   whole-garden button comes and goes at the TOP, so + and - never move under a finger. */
.gl-zoom { position: absolute; right: 10px; bottom: 10px; z-index: 4; display: flex; flex-direction: column; gap: 8px; }
.gl-zoom__b {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--gg-ink);
  border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-paper); box-shadow: var(--gg-shadow-sm);
  transition: transform var(--gg-dur-xs) var(--gg-ease-out), box-shadow var(--gg-dur-xs) ease;
  touch-action: manipulation;
}
.gl-zoom__b svg { width: 20px; height: 20px; }
.gl-zoom__b:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }
.gl-zoom__b:disabled { cursor: default; color: var(--gg-ink-3); opacity: .45; box-shadow: none; }
#zoom-fit { background: var(--gg-lime); }
.gl-armed { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 16px; background: var(--gg-lime); pointer-events: auto; }
.gl-armed__x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--gg-paper); cursor: pointer; padding: 0; }
.gl-armed__x svg { width: 16px; height: 16px; }
@media (max-width: 420px) { .gl-paused { white-space: normal; width: max-content; } }

.gl-hint {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; margin-inline: auto; max-width: 440px;
  display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: end;
  padding: 12px 12px 10px 10px; border: var(--gg-border); border-radius: var(--gg-r-lg); background: var(--gg-paper); box-shadow: var(--gg-shadow);
}
.gl-hint__gnome { width: 56px; height: 66px; }
.gl-hint__step { font-size: var(--gg-text-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gg-ink-3); }
.gl-hint__t { font-weight: 600; font-size: var(--gg-text-sm); line-height: 1.4; margin-top: 2px; }
.gl-hint__acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.gl-hint__acts .gg-btn--ghost { min-height: 44px; }
.gl-ghost { position: absolute; left: 0; top: 0; z-index: 7; width: 52px; height: 40px; pointer-events: none; filter: drop-shadow(2px 3px 0 rgba(14, 44, 14, .45)); }
.gl-ghost svg { width: 100%; height: 100%; }

/* ------------------------------------------------------------------ the tray */
.gl-tray {
  position: relative; display: grid; gap: 8px; padding: 8px var(--gg-gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--gg-paper); border-top: var(--gg-border);
}
.gl-tray__label, .gl-tray__tip { display: none; }
.gl-tray__lines { display: flex; justify-content: space-between; gap: 2px; }
.gl-lchip {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer;
  touch-action: manipulation;
}
/* rv 4 has up to nine colours: on a phone the chips share the row (44 px tall, never under 36 px wide) */
.gl-tray__lines .gl-lchip { flex: 0 1 44px; min-width: 36px; }
.gl-lchip[hidden] { display: none; }
.gl-lchip__sw {
  width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid var(--gg-ink); background: var(--c); box-shadow: 2px 2px 0 var(--gg-ink);
  transition: transform var(--gg-dur-sm) var(--gg-ease-spring), box-shadow var(--gg-dur-sm) ease;
}
.gl-lchip.is-free .gl-lchip__sw { border-style: dashed; box-shadow: none; background: radial-gradient(circle, var(--c) 0 38%, var(--gg-paper) 41%); }
.gl-lchip.is-locked .gl-lchip__sw { background: var(--gg-sand); border-color: var(--gg-line); box-shadow: none; }
.gl-lchip__lock { position: absolute; width: 20px; height: 20px; display: none; }
.gl-lchip.is-locked .gl-lchip__lock { display: block; }
.gl-lchip.is-sel .gl-lchip__sw { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--gg-lime), 2px 5px 0 var(--gg-ink); }
.gl-lchip:active .gl-lchip__sw { transform: scale(.92); }

.gl-tray__stock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gl-stock {
  min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 6px; cursor: grab;
  border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-cream); box-shadow: var(--gg-shadow-sm);
  touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform var(--gg-dur-xs) var(--gg-ease-out), box-shadow var(--gg-dur-xs) ease, background-color var(--gg-dur-sm) ease, opacity var(--gg-dur-sm) ease;
}
.gl-stock[data-item="bridge"] { cursor: help; touch-action: manipulation; }
.gl-stock { position: relative; }
.gl-stock__home {
  position: absolute; top: -9px; right: -7px; min-width: 24px; padding: 1px 6px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill);
  background: var(--gg-butter); font: 800 var(--gg-text-xs) var(--gg-font-body); font-style: normal; line-height: 1.3; text-align: center; color: var(--gg-ink);
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.gl-stock__home[hidden] { display: none; }
.gl-stock:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }
.gl-stock__i svg { width: 32px; height: 24px; }
.gl-stock__n { font-family: var(--gg-font-display); font-weight: 800; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.gl-stock__k { display: none; font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); }
.gl-stock.is-empty { opacity: .5; box-shadow: none; }
.gl-stock.is-armed { background: var(--gg-lime); transform: translateY(-2px); box-shadow: var(--gg-shadow); }

/* desktop: the tray moves to the side */
@media (min-width: 900px) {
  .gl-game { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); }
  .gl-hud { grid-column: 1 / -1; padding-inline: 24px; }
  .gl-sun__arc { width: 96px; height: 37px; }
  .gl-sun__day { font-size: var(--gg-text-md); }
  .gl-tray { grid-column: 2; grid-row: 2; align-content: start; gap: 12px; padding: 22px 22px; border-top: 0; border-left: var(--gg-border); overflow: auto; }
  .gl-tray__label { display: block; }
  .gl-tray__label + .gl-tray__lines, .gl-tray__label + .gl-tray__stock { margin-top: -4px; }
  .gl-tray__lines { flex-wrap: wrap; justify-content: flex-start; gap: 4px 2px; margin-bottom: 8px; }
  .gl-tray__lines .gl-lchip { flex: none; width: 48px; height: 48px; }
  .gl-lchip__sw { width: 36px; height: 36px; }
  .gl-tray__stock { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gl-stock { flex-direction: column; gap: 2px; min-height: 96px; padding: 8px; }
  .gl-stock__i svg { width: 42px; height: 32px; }
  .gl-stock__n { font-size: 24px; }
  .gl-stock__k { display: block; }
  .gl-tray__tip { display: block; font-size: var(--gg-text-xs); color: var(--gg-ink-3); line-height: 1.45; margin-top: 4px; }
}

/* ------------------------------------------------------------------ the seed post */
.gl-post h2 { font-size: var(--gg-text-2xl); margin-top: 4px; }
.gl-post__train { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-weight: 600; font-size: var(--gg-text-sm); color: var(--gg-ink-2); }
.gl-post__ti svg { width: 34px; height: 26px; }
.gl-packets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.gl-packet {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 8px 14px; cursor: pointer;
  border: var(--gg-border); border-radius: 8px 8px 18px 18px; background: var(--gg-butter-100); box-shadow: var(--gg-shadow);
  transform: rotate(var(--tilt, 0deg)); font: inherit; color: inherit; overflow: hidden;
  transition: transform var(--gg-dur-sm) var(--gg-ease-spring), box-shadow var(--gg-dur-sm) ease;
}
.gl-packet + .gl-packet { background: var(--gg-lime-100); }
.gl-packet__top {
  position: absolute; left: 0; right: 0; top: 0; height: 12px; border-bottom: 2px dashed var(--gg-ink);
  background: repeating-linear-gradient(90deg, var(--gg-sand) 0 7px, var(--gg-paper) 7px 14px);
}
.gl-packet__art { width: 92px; height: 92px; }
.gl-packet__name { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-lg); line-height: 1.1; letter-spacing: -.01em; }
.gl-packet__line { font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-2); line-height: 1.35; }
@media (hover: hover) { .gl-packet:hover { transform: rotate(0deg) translateY(-4px); box-shadow: var(--gg-shadow-lg); } }
.gl-packet:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--gg-ink); }

/* ------------------------------------------------------------------ results + help */
.gl-results__gnome { display: block; width: 92px; height: 100px; margin: -6px auto 6px; }
.gl-rscores { flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.gl-rscores .gg-result__score { min-width: 0; flex: 1 1 0; padding: 10px 6px; }
.gl-rscores .gg-result__score b { font-size: 30px; }
.gl-rscores .gg-result__score span { font-size: var(--gg-text-xs); letter-spacing: .04em; }
.gl-rscores .gg-result__score.gl-rscores__main { flex: 1 1 100%; }
.gl-rscores .gg-result__score.gl-rscores__main b { font-size: 46px; }
.gl-rnote { font-weight: 600; font-size: var(--gg-text-sm); color: var(--gg-ink-2); margin-bottom: 18px; }
.gl-help { text-align: left; }
.gl-help h2 { font-size: var(--gg-text-2xl); margin: 4px 0 12px; }
.gl-rules { margin: 0 0 18px; padding-left: 18px; display: grid; gap: 10px; font-size: var(--gg-text-sm); line-height: 1.5; color: var(--gg-ink-2); }
.gl-rules b { color: var(--gg-ink); }

/* the app bar: the name chip on the start screen, the rules button in the garden (phones have room for one) */
html.gl-playing .gl-chip { display: none; }
html.gl-onstart #help-btn { display: none; }
@media (max-width: 420px) {
  .gg-wordmark { font-size: 20px; }
  .gg-wordmark svg { width: 30px; height: 30px; }
  html.gl-playing .gg-appbar__in { min-height: 56px; }
}

/* toasts float above the tray while playing on a phone */
@media (max-width: 899.98px) { html.gl-playing .gg-toasts { bottom: calc(var(--gl-tray, 120px) + 10px); } }

/* ------------------------------------------------------------------ round 2: coins, line card, popover, lesson, shop */
.gl-coins { display: flex; align-items: center; gap: 5px; padding: 2px 10px 2px 4px; border-radius: var(--gg-r-pill); }
.gl-coins__icon svg { width: 26px; height: 26px; display: block; }
.gl-coins__v { font-family: var(--gg-font-display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gl-home { margin-left: auto; }
@media (max-width: 420px) {
  .gl-hud { gap: 6px; }
  .gl-sun__arc { width: 56px; height: 22px; }
  .gl-home__k { display: none; }
  .gl-home__v { font-size: 24px; }
  .gl-coins__v { font-size: 20px; }
  .gl-coins__icon svg { width: 22px; height: 22px; }
  .gl-hudbtns { gap: 6px; }
}

/* the line card: under the HUD on a phone it floats above the tray; on a wide screen it tops the side panel */
.gl-linecard {
  position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px); z-index: 6;
  display: grid; gap: 8px; padding: 10px 10px 10px 12px;
  border: var(--gg-border); border-radius: var(--gg-r-lg); background: var(--gg-paper); box-shadow: var(--gg-shadow);
}
.gl-linecard__head { display: flex; align-items: center; gap: 10px; }
.gl-linecard__sw { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--gg-ink); background: var(--c); }
.gl-linecard__ti { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.gl-linecard__ti b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); }
.gl-linecard__ti span { font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-2); }
.gl-linecard__plots { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; }
.gl-lcplot, .gl-lccut {
  position: relative; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer; font: inherit;
  width: 44px; height: 44px; border: 0; background: none; touch-action: manipulation;
}
.gl-lcplot img { width: 36px; height: 36px; padding: 6px; box-sizing: border-box; border: 2.5px solid var(--gg-ink); border-radius: 10px; background: var(--gg-paper); box-shadow: 2px 2px 0 var(--gg-ink); }
.gl-lcplot__x { position: absolute; right: 0; top: 0; width: 18px; height: 18px; display: grid; place-items: center; border: 2px solid var(--gg-ink); border-radius: 50%; background: var(--gg-paper); }
.gl-lcplot__x svg { width: 10px; height: 10px; }
.gl-lccut { width: 44px; margin-inline: -4px; }
.gl-lccut::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: var(--gg-ink-3); border-radius: 2px; opacity: .35; }
.gl-lccut svg { position: relative; width: 24px; height: 24px; padding: 3px; border: 2px solid var(--gg-ink); border-radius: 50%; background: var(--gg-paper); box-sizing: border-box; }
@media (hover: hover) {
  .gl-lcplot:hover .gl-lcplot__x, .gl-lccut:hover svg { background: var(--gg-lime); }
}
.gl-lcplot:focus-visible img, .gl-lccut:focus-visible svg { outline: 3px solid var(--gg-lime); outline-offset: 2px; }
.gl-linecard__note { font-size: var(--gg-text-xs); line-height: 1.4; color: var(--gg-ink-3); font-weight: 600; }
.gl-linecard__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-linecard__rm { margin-left: auto; }
@media (max-width: 899.98px) { .gl-linecard__note { display: none; } }

/* the plot popover */
.gl-pop {
  position: absolute; left: 0; top: 0; z-index: 7; width: max-content; max-width: min(260px, calc(100% - 16px));
  padding: 10px 12px; border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-paper); box-shadow: var(--gg-shadow);
  font-size: var(--gg-text-sm); line-height: 1.35; pointer-events: none;
}
.gl-pop__head { display: flex; align-items: center; gap: 8px; }
.gl-pop__head img { width: 22px; height: 22px; }
.gl-pop__head b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); }
.gl-pop__tag { margin-left: auto; padding: 1px 8px; border-radius: var(--gg-r-pill); background: var(--gg-lavender-100); border: 2px solid var(--gg-ink); font-size: var(--gg-text-xs); font-weight: 700; }
.gl-pop__line { margin-top: 6px; font-weight: 600; color: var(--gg-ink-2); }
.gl-pop__crowd { color: var(--gg-suit-red); }
.gl-pop__sub { margin-top: 6px; font-size: var(--gg-text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gg-ink-3); }
.gl-pop__want { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gl-pop__w { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-cream); }
.gl-pop__w img { width: 18px; height: 18px; }
.gl-pop__w b { font-variant-numeric: tabular-nums; }
.gl-pop__lines { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gl-pop__dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gg-ink); background: var(--c); }

/* the one-line key hint (first desktop game) */
.gl-keyhint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; white-space: nowrap; pointer-events: none;
  padding: 8px 14px; border-radius: var(--gg-r-pill); background: var(--gg-ink); color: var(--gg-cream); font-size: var(--gg-text-sm); font-weight: 600;
}
.gl-keyhint kbd { display: inline-block; min-width: 22px; padding: 1px 6px; margin: 0 2px 0 8px; border-radius: 6px; background: var(--gg-paper); color: var(--gg-ink); font: 700 var(--gg-text-xs) var(--gg-font-body); text-align: center; }
.gl-keyhint kbd:first-child { margin-left: 0; }

/* the lesson card and its ghost finger */
.gl-lesson {
  position: absolute; left: 12px; right: 12px; top: 12px; z-index: 6; margin-inline: auto; max-width: 520px;
  padding: 12px 14px 10px; border: var(--gg-border); border-radius: var(--gg-r-lg); background: var(--gg-paper); box-shadow: var(--gg-shadow);
}
.gl-lesson__step { font-size: var(--gg-text-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gg-green-700); }
.gl-lesson__t { margin-top: 3px; font-weight: 600; font-size: var(--gg-text-sm); line-height: 1.45; }
.gl-lesson__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -8px -6px 0 0; }
.gl-lesson__top .gg-btn--ghost { min-height: 44px; padding-inline: 6px; font-size: var(--gg-text-xs); }
.gl-lesson__acts { display: flex; justify-content: flex-end; margin-top: 6px; }
.gl-lesson__acts[hidden] { display: none; }
@media (max-width: 899.98px) {
  .gl-lesson { left: 8px; right: 8px; top: 8px; padding: 10px 12px 8px; }
  .gl-lesson__t { font-size: var(--gg-text-xs); line-height: 1.4; }
  .gl-linecard { padding: 8px 8px 8px 10px; gap: 4px; }
  .gl-linecard__acts .gg-btn { min-height: 44px; padding-block: 4px; }
}
.gl-finger { position: absolute; left: 0; top: 0; z-index: 8; width: 40px; height: 48px; pointer-events: none; transform-origin: 14px 6px; filter: drop-shadow(2px 3px 0 rgba(14, 44, 14, .4)); }
.gl-finger svg { width: 100%; height: 100%; display: block; }
.gl-pulse { animation: gl-pulse 1.1s var(--gg-ease-in-out) infinite; border-radius: var(--gg-r-md); }
@keyframes gl-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--gg-lime); } 50% { box-shadow: 0 0 0 6px var(--gg-lime); } }
@media (prefers-reduced-motion: reduce) { .gl-pulse { animation: none; box-shadow: 0 0 0 4px var(--gg-lime); } }

/* the tray row: the shed, and the shop button on a phone */
.gl-tray__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.gl-shopbtn {
  min-width: 64px; display: grid; grid-template-columns: auto auto; place-content: center; align-items: center; gap: 0 4px; padding: 4px 8px; cursor: pointer;
  border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-lime-100); box-shadow: var(--gg-shadow-sm); font: inherit; touch-action: manipulation;
}
.gl-shopbtn__i svg { width: 22px; height: 22px; display: block; }
.gl-shopbtn__n { font-family: var(--gg-font-display); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.gl-shopbtn__k { grid-column: 1 / -1; text-align: center; font-size: var(--gg-text-xs); font-weight: 700; }
.gl-shopbtn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }

/* the shop list (side panel and bottom sheet) */
.gl-shop__head { display: flex; align-items: center; gap: 10px; }
.gl-shop__head h2 { font-size: var(--gg-text-xl); margin: 0; }
.gl-shop__coins { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: var(--gg-text-sm); }
.gl-shop__coins b { font-family: var(--gg-font-display); font-size: var(--gg-text-md); font-variant-numeric: tabular-nums; }
.gl-shop__coin svg { width: 20px; height: 20px; display: block; }
.gl-shop__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.gl-shop__row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 4px 4px 6px; border: 2px solid var(--gg-line); border-radius: var(--gg-r-md); background: var(--gg-cream); }
.gl-shop__i svg { width: 32px; height: 24px; display: block; }
.gl-shop__txt { display: grid; line-height: 1.2; min-width: 0; }
.gl-shop__txt b { font-size: var(--gg-text-sm); }
.gl-shop__txt > span:last-child { font-size: var(--gg-text-xs); color: var(--gg-ink-3); font-weight: 600; }
.gl-shop__pips { display: inline-flex; gap: 3px; margin: 2px 0; }
.gl-shop__pips i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--gg-ink); background: var(--gg-paper); }
.gl-shop__pips i.is-on { background: var(--gg-lime); }
.gl-buy {
  min-width: 64px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; cursor: pointer;
  border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-butter); box-shadow: var(--gg-shadow-sm); font: inherit; touch-action: manipulation;
}
.gl-buy svg { width: 18px; height: 18px; }
.gl-buy b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); font-variant-numeric: tabular-nums; }
.gl-buy.is-poor { background: var(--gg-paper); opacity: .55; box-shadow: none; }
.gl-buy:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }
.gl-buy.is-maxed { cursor: default; border-color: var(--gg-line); box-shadow: none; background: var(--gg-sand); font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); }
.gl-shop--side { display: none; }

/* the shop as a bottom sheet on a phone */
.gl-sheetm { place-items: end center; padding: 0; }
.gl-sheet { width: 100%; max-width: 520px; max-height: 82vh; overflow: auto; border-radius: var(--gg-r-xl) var(--gg-r-xl) 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); text-align: left; }
.gl-sheet__note { font-size: var(--gg-text-xs); color: var(--gg-ink-3); font-weight: 600; margin-top: 2px; }

/* the start card's resume panel and the lesson button */
.gl-resume { display: grid; gap: 10px; background: var(--gg-lime-100); }
.gl-resume__t { font-weight: 700; font-size: var(--gg-text-sm); color: var(--gg-ink-2); }
.gl-lessonlink { justify-self: center; margin-top: -4px; }
.gl-newhere__t { margin: 8px 0 18px; font-weight: 600; font-size: var(--gg-text-sm); color: var(--gg-ink-2); line-height: 1.45; }

/* the rules sheet: nine short, illustrated points */
.gl-help { max-height: 88vh; overflow: auto; }
ol.gl-rules { list-style: none; padding: 0; gap: 9px; }
ol.gl-rules li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.gl-ri { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-sm); background: var(--gg-green-100); }
.gl-ri svg { width: 24px; height: 20px; }
.gl-help__acts { display: grid; gap: 8px; }

/* desktop: the line card tops the side panel, the shop lives in it */
@media (min-width: 900px) {
  .gl-linecard { position: static; order: -1; margin-bottom: 4px; box-shadow: var(--gg-shadow-sm); }
  .gl-linecard__plots { flex-wrap: wrap; overflow: visible; }
  .gl-tray__row { display: block; }
  .gl-shopbtn { display: none !important; }
  .gl-shop--side { display: block; margin-top: 6px; }
  .gl-shop--side[hidden] { display: none; }
  .gl-stock { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; place-content: center; align-items: center; gap: 0 8px; min-height: 60px; padding: 6px 8px; }
  .gl-stock__i { grid-row: 1 / 3; }
  .gl-stock__i svg { width: 34px; height: 26px; }
  .gl-stock__n { font-size: 22px; }
  .gl-stock__k { grid-column: 2; }
  .gl-tray { gap: 10px; padding: 18px 20px; }
}
@media (min-width: 1600px) {
  .gl-game { grid-template-columns: minmax(0, 1fr) 360px; }
}

/* recall: the shed lights up as a drop target; a line with no train says so and its chip pulses */
.gl-tray.is-target { background: var(--gg-lime-100); box-shadow: inset 0 0 0 4px var(--gg-lime); }
.gl-linecard__recall.is-warn { background: var(--gg-pink-100); }
.gl-linecard.is-trainless #lc-stats { color: var(--gg-suit-red); }
.gl-lchip.is-trainless .gl-lchip__sw { animation: gl-pulse 1.1s var(--gg-ease-in-out) infinite; }
@media (prefers-reduced-motion: reduce) { .gl-lchip.is-trainless .gl-lchip__sw { animation: none; box-shadow: 0 0 0 4px var(--gg-pink); } }

/* a phone on its side (or any short, wide window under 900 px): the tray moves to the side so the garden keeps
   its height; the garden itself is drawn turned, like on a desktop */
@media (max-width: 899.98px) and (orientation: landscape) and (max-height: 560px) {
  html.gl-playing .gg-appbar__in { min-height: 48px; }
  html.gl-playing .gg-wordmark svg { width: 28px; height: 28px; }
  .gl-game { grid-template-columns: minmax(0, 1fr) 248px; grid-template-rows: auto minmax(0, 1fr); }
  .gl-hud { grid-column: 1 / -1; min-height: 48px; padding-block: 2px; }
  .gl-hudbtn { width: 44px; height: 44px; }
  .gl-tray { grid-column: 2; grid-row: 2; align-content: start; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 0; border-left: var(--gg-border); overflow: auto; }
  .gl-tray__lines { flex-wrap: wrap; justify-content: flex-start; gap: 0; }
  .gl-tray__row { grid-template-columns: 1fr; }
  .gl-tray__stock { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gl-stock { min-height: 44px; }
  .gl-shopbtn { grid-template-columns: auto auto auto; min-height: 44px; }
  .gl-shopbtn__k { grid-column: auto; }
  .gl-linecard { position: static; order: -1; box-shadow: var(--gg-shadow-sm); }
  .gl-linecard__plots { flex-wrap: wrap; overflow: visible; }
  .gl-lesson { max-width: none; }
  html.gl-playing .gg-toasts { bottom: 12px; }
}

/* ================================================================== round 3 */

/* the top stack over the garden: the garden-day banner, the new-ground banner, the pause card, the armed pill */
.gl-topstack {
  position: absolute; left: 8px; right: 8px; top: 8px; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
}
.gl-topstack .gl-paused, .gl-topstack .gl-armed { position: static; transform: none; left: auto; top: auto; }
.gl-pausebox { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.gl-pauseacts { position: absolute; left: 10px; bottom: 10px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.gl-pauseworks {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 14px 4px 8px; cursor: pointer;
  border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-lime-100); box-shadow: var(--gg-shadow-sm);
  font: 700 var(--gg-text-sm) var(--gg-font-body); color: var(--gg-ink); touch-action: manipulation;
}
.gl-pauseworks[hidden], .gl-sit[hidden], .gl-newground[hidden], .gl-rtix[hidden], .gl-rankup[hidden], .gl-rank[hidden], .gl-stock[hidden] { display: none !important; }
.gl-pauseworks__i svg { width: 26px; height: 26px; display: block; }
.gl-pauseclear { background: var(--gg-paper); }
.gl-undo { background: var(--gg-paper); }
.gl-undo__sw { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gg-ink); background: var(--c, var(--gg-ink-3)); }
.gl-pauseclear.is-armed { background: var(--gg-butter); }
.gl-pauseworks:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }

/* a garden day: a paper card with its icon, tomorrow / today, and a little clock */
.gl-sit {
  pointer-events: auto; width: min(100%, 460px); display: grid; grid-template-columns: 42px minmax(0, 1fr) 26px; gap: 8px; align-items: center;
  padding: 6px 10px 6px 6px; border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-paper); box-shadow: var(--gg-shadow-sm);
}
.gl-sit.is-today { background: var(--gg-butter-100); }
.gl-sit__i { width: 42px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--gg-green-100); border: 2px solid var(--gg-ink); }
.gl-sit.is-today .gl-sit__i { background: var(--gg-butter); }
.gl-sit__i svg { width: 32px; height: 24px; display: block; }
.gl-sit__txt { display: grid; line-height: 1.2; min-width: 0; font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-2); }
.gl-sit__txt b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-sm); color: var(--gg-ink); }
.gl-sit__when { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gg-green-700); }
.gl-sit.is-today .gl-sit__when { color: var(--gg-suit-red); }
.gl-sit__clock { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--gg-ink); background: conic-gradient(var(--gg-lime) var(--p, 100%), var(--gg-sand) 0); }
.gl-sit__clock i { display: none; }

/* "New ground": the gate is open */
/* the rarest plots: kinds ranked fewest plots first; tap one to ring its plots */
.gl-kinds {
  pointer-events: auto; width: min(100%, 460px); display: grid; gap: 6px;
  padding: 8px 10px 10px; border: var(--gg-border); border-radius: var(--gg-r-lg); background: var(--gg-paper); box-shadow: var(--gg-shadow);
}
.gl-kinds[hidden] { display: none; }
.gl-kinds__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gl-kinds__head .gg-eyebrow { color: var(--gg-green-700); }
.gl-kinds__x { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.gl-kinds__x svg { width: 20px; height: 20px; }
.gl-kinds__sub { font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-2); line-height: 1.35; }
.gl-kinds__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; }
.gl-krow {
  position: relative; min-height: 48px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 6px; padding: 4px 8px 4px 6px;
  border: 2px solid var(--gg-ink); border-radius: var(--gg-r-md); background: var(--gg-cream); cursor: pointer; text-align: left; font: inherit; color: var(--gg-ink);
  touch-action: manipulation;
}
.gl-krow img { width: 30px; height: 30px; display: block; }
.gl-krow__t { display: grid; line-height: 1.15; min-width: 0; }
.gl-krow__t b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-krow__t span { font-size: 11px; font-weight: 700; color: var(--gg-ink-3); white-space: nowrap; }
.gl-krow__rank { position: absolute; top: -8px; left: -6px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-paper); font: 800 10px/1 var(--gg-font-body); }
.gl-krow.is-rare .gl-krow__rank { background: var(--gg-butter); }
.gl-krow__loose { position: absolute; top: -8px; right: -6px; padding: 0 5px; height: 18px; display: grid; place-items: center; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-pink-100); font: 800 10px/1 var(--gg-font-body); }
.gl-krow.is-sel { background: var(--gg-lime); box-shadow: var(--gg-shadow-sm); }
.gl-kindsbtn.is-on { background: var(--gg-lime); }
.gl-kindsbtn[hidden] { display: none; }
.gl-kindsbtn__i svg { width: 24px; height: 24px; display: block; }
.gl-krow__loose[hidden] { display: none; }
.gl-kinds__list { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
.gl-krow__t i { display: none; font-style: normal; }
/* a phone: icon over two short numbers, four to a row, so the lit plots stay in view */
@media (max-width: 899px) {
  .gl-kinds { padding: 6px 8px 8px; gap: 4px; }
  .gl-kinds__sub { display: none; }
  .gl-kinds__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; padding-top: 4px; }
  .gl-krow { grid-template-columns: 26px minmax(0, 1fr); gap: 4px; padding: 3px 4px; min-height: 46px; }
  .gl-krow img { width: 26px; height: 26px; }
  .gl-krow__t b, .gl-krow__t span { display: none; }
  .gl-krow__t i { display: block; font-size: 11px; font-weight: 800; color: var(--gg-ink); white-space: nowrap; }
  .gl-krow__t i + i { font-weight: 700; color: var(--gg-ink-3); }
}

/* the head gardener's tip: a paper card over the garden, the plot circled below it */
.gl-tip {
  pointer-events: auto; width: min(100%, 440px); display: grid; gap: 6px;
  padding: 10px 14px 12px; border: var(--gg-border); border-radius: var(--gg-r-lg); background: var(--gg-butter-100); box-shadow: var(--gg-shadow);
}
.gl-tip[hidden] { display: none; }
.gl-tip .gg-eyebrow { color: var(--gg-green-700); }
.gl-tip__t { font-size: var(--gg-text-sm); font-weight: 600; line-height: 1.4; color: var(--gg-ink); }
.gl-tip__acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.gl-tip__acts .gg-btn { min-height: 44px; }
.gl-tip__acts .gg-btn[hidden] { display: none; }
.gl-tipbtn { position: relative; background: var(--gg-butter); }
.gl-tipbtn[hidden] { display: none; }
.gl-tipbtn__i svg { width: 24px; height: 24px; display: block; }
.gl-tipbtn__n {
  position: absolute; top: -7px; left: -7px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center;
  border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-paper);
  font: 800 11px/1 var(--gg-font-body); font-variant-numeric: tabular-nums; color: var(--gg-ink);
}
.gl-tipbtn.is-ad .gl-tipbtn__n { background: var(--gg-lime); }
.gl-tipbtn.is-nudge { animation: gl-tipnudge 1.1s var(--gg-ease-out) 3; }
@keyframes gl-tipnudge { 0%, 100% { transform: none; } 30% { transform: scale(1.18) rotate(-8deg); } 60% { transform: scale(1.1) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .gl-tipbtn.is-nudge { animation: none; outline: 3px solid var(--gg-lime); } }
.gl-newground {
  pointer-events: auto; width: min(100%, 420px); display: grid; justify-items: center; gap: 2px; text-align: center;
  padding: 10px 14px 12px; border: var(--gg-border); border-radius: var(--gg-r-lg); background: var(--gg-lime-100); box-shadow: var(--gg-shadow);
}
.gl-newground .gg-eyebrow { color: var(--gg-green-700); }
.gl-newground__name { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-xl); line-height: 1.1; letter-spacing: -.01em; }
.gl-newground__line { font-size: var(--gg-text-sm); font-weight: 600; color: var(--gg-ink-2); line-height: 1.35; }
.gl-newground .gg-btn { margin-top: 6px; min-height: 44px; }
.gl-newground .gg-btn[hidden] { display: none; }

/* the shed on a phone with the round 3 items: as many columns as items, two rows past five */
.gl-tray__stock { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.gl-tray__stock.is-many { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gl-tray__stock.is-many .gl-stock { min-height: 44px; gap: 3px; padding: 2px 4px; }
.gl-tray__stock.is-many .gl-stock__i svg { width: 28px; height: 21px; }
.gl-tray__stock.is-many .gl-stock__n { font-size: 18px; }
@media (min-width: 900px) {
  .gl-tray__stock, .gl-tray__stock.is-many { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gl-tray__stock.is-many .gl-stock { min-height: 56px; padding: 6px 8px; }
}
@media (max-width: 899.98px) and (orientation: landscape) and (max-height: 560px) {
  .gl-tray__stock, .gl-tray__stock.is-many { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .gl-tray__stock .gl-stock { flex-direction: column; gap: 0; min-height: 44px; padding: 2px; }
  .gl-tray__stock .gl-stock__i svg { width: 26px; height: 20px; }
  .gl-tray__stock .gl-stock__n { font-size: 16px; }
}

/* tickets: a little punched railway ticket shape */
.gl-tix {
  position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px 2px 6px; white-space: nowrap;
  border: 2px solid var(--gg-ink); border-radius: 6px; background: var(--gg-butter); font-weight: 700; font-size: var(--gg-text-xs);
  -webkit-mask: radial-gradient(circle 5px at 0 50%, transparent 98%, var(--gg-ink)) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, transparent 98%, var(--gg-ink)) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 5px at 0 50%, transparent 98%, var(--gg-ink)) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, transparent 98%, var(--gg-ink)) right / 51% 100% no-repeat;
}
.gl-tix svg { width: 26px; height: 20px; display: block; }
.gl-tix b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); font-variant-numeric: tabular-nums; }
.gl-tix--big { padding: 4px 16px 4px 10px; gap: 6px; }
.gl-tix--big svg { width: 34px; height: 26px; }
.gl-tix--big b { font-size: 28px; line-height: 1; }

/* a progress bar (rank) */
.gl-bar { position: relative; height: 12px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-sand); overflow: hidden; }
.gl-bar i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--gg-lime); border-right: 2px solid var(--gg-ink); transition: width var(--gg-dur-xl) var(--gg-ease-out); }
@media (prefers-reduced-motion: reduce) { .gl-bar i { transition: none; } }

/* the rank card on the start screen */
.gl-rank { display: grid; gap: 10px; }
.gl-rank__top { display: flex; align-items: center; gap: 10px; }
.gl-rank__badge { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: var(--gg-border); border-radius: 50%; background: var(--gg-butter-100); }
.gl-rank__badge svg { width: 30px; height: 30px; }
.gl-rank__name { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
.gl-rank__name b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-lg); }
.gl-rank__next { font-size: var(--gg-text-sm); color: var(--gg-ink-2); font-weight: 600; line-height: 1.4; }
.gl-worksbtn { gap: 8px; }
.gl-worksbtn svg { width: 24px; height: 24px; }
.gl-worksbtn__new { margin-left: auto; font-size: var(--gg-text-xs); }

/* rewarded-ad buttons carry a small picture of the help */
.gl-adbtn { gap: 8px; }
.gl-adbtn__i svg { width: 30px; height: 22px; display: block; }
.gl-adbtn small { font-weight: 600; opacity: .8; }
.gl-postm .gl-adbtn { margin-top: 14px; }
.gl-adbtn[hidden] { display: none !important; }

/* results: tickets banked, the rank bar, a rank-up moment */
.gl-results__card { max-height: calc(100dvh - 24px); overflow: auto; }
.gl-rtix { display: grid; gap: 8px; margin: -6px 0 16px; padding: 12px; border: 2px dashed var(--gg-line); border-radius: var(--gg-r-md); text-align: left; }
.gl-rtix__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.gl-rtix__row .gl-tix span:last-child { font-size: var(--gg-text-xs); }
.gl-rtix__why { font-size: var(--gg-text-xs); color: var(--gg-ink-3); font-weight: 600; line-height: 1.4; }
.gl-rtix__rank { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); }
.gl-rtix__rank b { font-family: var(--gg-font-display); font-size: var(--gg-text-md); color: var(--gg-ink); }
.gl-rtix__rank span { grid-column: 2; }
.gl-rankup { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-lime); font-weight: 700; font-size: var(--gg-text-sm); line-height: 1.35; }
.gl-rankup svg { width: 30px; height: 30px; flex: none; }

/* the hay cart offer */
.gl-hc__art { display: block; width: 200px; height: 96px; margin: -4px auto 4px; }
.gl-hc h2 { font-size: var(--gg-text-2xl); margin: 2px 0 6px; }
.gl-hc__t { font-weight: 600; font-size: var(--gg-text-sm); color: var(--gg-ink-2); line-height: 1.45; }
.gl-hc__small { font-size: var(--gg-text-xs); color: var(--gg-ink-3); margin: 8px 0 16px; line-height: 1.4; }

/* the rewarded-ad placeholder */
.gl-adm { z-index: 90; }
.gl-ad { text-align: center; max-width: 380px; }
.gl-ad h2 { font-size: var(--gg-text-xl); margin: 8px 0 6px; }
.gl-ad__clock { position: relative; width: 84px; height: 84px; margin: 10px auto 0; }
.gl-ad__clock svg { width: 100%; height: 100%; display: block; }
.gl-ad__n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--gg-font-display); font-weight: 800; font-size: 32px; }
.gl-ad__t { font-size: var(--gg-text-sm); color: var(--gg-ink-2); font-weight: 600; line-height: 1.45; }
.gl-ad__for { margin-top: 8px; font-size: var(--gg-text-sm); font-weight: 700; }
.gl-ad__for[hidden] { display: none; }
.gl-ad .gg-btn { margin-top: 12px; min-height: 44px; }

/* the Engine Works */
.gl-worksm { padding: 12px; }
.gl-works { width: min(100%, 760px); max-height: calc(100dvh - 24px); overflow: auto; text-align: left; padding: 18px; display: grid; gap: 12px; }
.gl-works__head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.gl-works__head h2 { font-size: var(--gg-text-2xl); margin: 2px 0 0; }
.gl-works__bench { position: relative; border: var(--gg-border); border-radius: var(--gg-r-md); overflow: hidden; background: var(--gg-sand); }
.gl-works__bench canvas { display: block; width: 100%; height: 118px; }
.gl-works__tix { position: absolute; right: 10px; top: 10px; box-shadow: none; }
.gl-works__tix span:last-child { font-size: var(--gg-text-xs); }
.gl-works__rank { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.gl-works__rank b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-lg); }
.gl-works__rank p { grid-column: 1 / -1; font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-3); line-height: 1.4; }
.gl-works__mid { padding: 8px 12px; border-radius: var(--gg-r-md); background: var(--gg-butter-100); border: 2px solid var(--gg-ink); font-weight: 700; font-size: var(--gg-text-sm); }
.gl-works__mid[hidden] { display: none; }
.gl-works__list { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gl-works__list { grid-template-columns: 1fr 1fr; } }
.gl-wk {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 4px 10px; padding: 10px 12px;
  border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-paper); box-shadow: var(--gg-shadow-sm);
}
.gl-wk.is-max { background: var(--gg-green-100); }
.gl-wk.is-locked { background: var(--gg-sand); box-shadow: none; }
.gl-wk.is-locked .gl-wk__icon { opacity: .55; }
.gl-wk__icon { grid-row: 1 / 3; width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--gg-ink); border-radius: 12px; background: var(--gg-green-100); }
.gl-wk__icon svg { width: 30px; height: 30px; display: block; }
.gl-wk__txt { min-width: 0; }
.gl-wk__name { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); line-height: 1.15; }
.gl-wk__fx { font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-2); line-height: 1.35; margin-top: 2px; }
.gl-wk__arrow { color: var(--gg-green-700); font-weight: 800; }
.gl-wk__foot { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.gl-pips { display: inline-flex; gap: 4px; }
.gl-pips i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--gg-ink); background: var(--gg-paper); transition: transform var(--gg-dur-md) var(--gg-ease-spring), background-color var(--gg-dur-md) ease; }
.gl-pips i.is-on { background: var(--gg-green-500); }
.gl-pips i.is-new { background: var(--gg-lime); transform: scale(1.35); }
.gl-tixbuy {
  min-width: 84px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 12px 0 8px; cursor: pointer;
  border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-butter); box-shadow: var(--gg-shadow-sm); font: inherit; touch-action: manipulation;
}
.gl-tixbuy svg { width: 24px; height: 18px; }
.gl-tixbuy b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); font-variant-numeric: tabular-nums; }
.gl-tixbuy.is-poor { background: var(--gg-paper); opacity: .6; box-shadow: none; }
.gl-tixbuy:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }
.gl-wk__lock { display: inline-flex; align-items: center; gap: 4px; font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); }
.gl-wk__lock svg { width: 18px; height: 18px; }
.gl-works__lv { display: grid; gap: 6px; }
.gl-works__lv:empty { display: none; }
.gl-wk__lvrow { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-wk__lvnote { font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-3); }
.gl-lv { min-height: 44px; padding: 0 14px; border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-paper); font: 700 var(--gg-text-sm) var(--gg-font-body); cursor: pointer; }
.gl-lv.is-on { background: var(--gg-butter); box-shadow: var(--gg-shadow-sm); }

/* small bits */
.gl-help__h { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-lg); margin: 4px 0 10px; }
.gl-pop__tag--j { background: var(--gg-butter); }
.gl-pop__fete { color: var(--gg-suit-red); }
.gl-shop__row.is-locked { opacity: .7; }
.gl-buy.is-locked { gap: 3px; padding: 0 8px; }
.gl-buy.is-locked svg { width: 16px; height: 16px; }

/* round 3 runs go longer (4 and 5 digit counts): a tighter HUD on a phone so nothing overlaps */
@media (max-width: 420px) {
  .gl-hud { gap: 4px; padding-inline: 10px; }
  .gl-sun { gap: 5px; flex: none; }
  .gl-sun__arc { width: 44px; height: 18px; }
  .gl-home { padding: 0 2px 0 0; gap: 2px; flex: none; }
  .gl-home__icon svg { width: 26px; height: 26px; display: block; }
  .gl-home__v { font-size: 22px; }
  .gl-coins { padding: 0 2px 0 0; gap: 3px; flex: none; }
  .gl-coins__v { font-size: 18px; }
  .gl-hudbtns { gap: 5px; flex: none; }
  .gl-hudbtn { width: 44px; height: 44px; }
}
@media (max-width: 359.98px) { .gl-sun__arc { display: none; } }
@media (max-width: 420px) {
  .gl-hud.is-long .gl-sun__arc { width: 34px; height: 14px; }
  .gl-hud.is-long .gl-home__v { font-size: 20px; letter-spacing: -.04em; }
  .gl-hud.is-long .gl-coins__v { font-size: 17px; letter-spacing: -.03em; }
  .gl-hud.is-long .gl-coins__icon svg { width: 18px; height: 18px; }
}
@media (max-width: 380px) { .gl-hud.is-long .gl-sun__arc { display: none; } }
.gl-worksbtn > span:not(.gl-worksbtn__new) { white-space: nowrap; }
.gl-worksbtn__new { color: var(--gg-ink); white-space: nowrap; padding: 2px 10px; }
/* short screens (a phone on its side): compact banners so the garden keeps its room */
@media (max-height: 560px) {
  .gl-newground { width: min(100%, 380px); padding: 6px 12px 8px; gap: 0; }
  .gl-newground__name { font-size: var(--gg-text-md); }
  .gl-newground__line { font-size: var(--gg-text-xs); }
  .gl-newground .gg-btn { margin-top: 4px; }
  .gl-sit { width: min(100%, 420px); padding-block: 3px; }
  .gl-sit__txt span:last-child { display: none; }
}
.gl-worksbtn { min-width: 0; }

/* ------------------------------------------------------------------ rv 6: maps, goals and medals */
/* Medal colours: no medal tokens in garden.css yet (requested in NOTES.md); each falls back to an existing token. */
.gl-medal { display: block; flex: none; overflow: visible; }
.gl-medal__rb { fill: var(--gg-medal-ribbon, var(--gg-suit-red)); stroke: var(--gg-ink); stroke-width: 1.4; stroke-linejoin: round; }
.gl-medal__d { stroke: var(--gg-ink); stroke-width: 1.8; }
.gl-medal__s { stroke: var(--gg-ink); stroke-width: 1.1; stroke-linejoin: round; fill: var(--gg-paper); }
.gl-medal--none .gl-medal__rb { fill: var(--gg-paper); stroke: var(--gg-ink-3); stroke-dasharray: 2 1.6; }
.gl-medal--none .gl-medal__d { fill: var(--gg-paper); stroke: var(--gg-ink-3); stroke-dasharray: 2.4 2; }
.gl-medal--none .gl-medal__s { fill: none; stroke: var(--gg-ink-3); opacity: .55; }
.gl-medal--bronze .gl-medal__d { fill: var(--gg-medal-bronze, var(--gg-tangerine)); }
.gl-medal--silver .gl-medal__d { fill: var(--gg-medal-silver, var(--gg-lavender-100)); }
.gl-medal--gold .gl-medal__d { fill: var(--gg-medal-gold, var(--gg-butter)); }
.gl-medal--gold .gl-medal__s { fill: var(--gg-lime); }

/* the picker on the start card */
.gl-maps { display: grid; gap: 10px; }
.gl-maps[hidden] { display: none; }
.gl-maps__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gl-mt {
  position: relative; display: grid; align-content: start; gap: 3px; min-width: 0; min-height: 44px; padding: 7px 8px 9px; text-align: left;
  border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-paper); box-shadow: var(--gg-shadow-sm);
  font: inherit; color: var(--gg-ink); cursor: pointer; touch-action: manipulation;
  transition: transform var(--gg-dur-xs) var(--gg-ease-out), box-shadow var(--gg-dur-xs) ease, background-color var(--gg-dur-sm) ease;
}
.gl-mt:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }
.gl-mt:focus-visible { outline: 3px solid var(--gg-lime); outline-offset: 2px; }
.gl-mt.is-sel { background: var(--gg-lime-100); box-shadow: 0 0 0 3px var(--gg-lime), var(--gg-shadow); }
.gl-mt.is-peek { box-shadow: 0 0 0 3px var(--gg-butter), var(--gg-shadow-sm); }
.gl-mt.is-locked { background: var(--gg-sand); }
.gl-mt__thumb { position: relative; display: block; height: 50px; margin: 0 -2px 3px; border-radius: 8px; overflow: hidden; border: 2px solid var(--gg-ink); background: var(--gg-green-300); }
.gl-mt__thumb canvas { display: block; width: 100%; height: 100%; }
/* frosted glass over a locked map's picture: it shows through, blurred, with a padlock */
.gl-mt__frost {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--gg-paper) 52%, transparent); -webkit-backdrop-filter: blur(1.4px) saturate(.75); backdrop-filter: blur(1.4px) saturate(.75);
}
.gl-mt__frost svg { width: 26px; height: 26px; filter: drop-shadow(1px 1px 0 var(--gg-ink)); }
.gl-mt__today {
  position: absolute; right: 4px; top: 4px; padding: 1px 7px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill);
  background: var(--gg-butter); font-size: 13px; font-weight: 800; line-height: 1.25;
}
.gl-mt__medal { position: absolute; left: 3px; top: 2px; filter: drop-shadow(1px 1px 0 var(--gg-ink)); }
.gl-mt__name { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-sm); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-mt__twist { font-size: var(--gg-text-xs); font-weight: 600; line-height: 1.3; color: var(--gg-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.gl-mt__foot { display: flex; align-items: center; gap: 5px; font-size: var(--gg-text-xs); font-weight: 800; line-height: 1.2; min-height: 18px; margin-top: 2px; }
.gl-mt__pips { position: absolute; left: 3px; bottom: 2px; display: inline-flex; padding: 1px 4px 0 2px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-paper); }
.gl-mt__pips .gl-medal + .gl-medal { margin-left: -3px; }
.gl-mt__foot > span:last-child { min-width: 0; }
.gl-mt__lock { color: var(--gg-ink-2); font-weight: 700; }
.gl-mt__best { font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-3); line-height: 1.25; }
.gl-mapinfo { display: grid; gap: 4px; padding: 10px 12px; border: 2px dashed var(--gg-line); border-radius: var(--gg-r-md); }
.gl-mapinfo:empty { display: none; }
.gl-mapinfo__t { font-size: var(--gg-text-sm); line-height: 1.4; color: var(--gg-ink-2); }
.gl-mapinfo__t b { color: var(--gg-ink); font-family: var(--gg-font-display); font-weight: 800; }
.gl-mapinfo__g { display: flex; align-items: center; gap: 6px; font-size: var(--gg-text-sm); font-weight: 700; line-height: 1.3; }
.gl-mapinfo__g svg { width: 18px; height: 18px; flex: none; }
.gl-mapinfo__g.is-locked { color: var(--gg-ink-2); }
.gl-mapinfo__r { font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-3); }
@media (max-width: 599.98px) {
  /* the picker's pictures stand in for the demo garden on a phone, so Play stays near the first screen */
  html:not(.gl-nomaps) .gl-hero { display: none; }
  .gl-start__hero .gg-lede { font-size: var(--gg-text-md); }
  .gl-start__in { gap: var(--gg-s4); padding-top: var(--gg-s4); }
  /* Play floats at the bottom of the screen while the picker scrolls by, then settles in its place */
  #go-play { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 3; }
  html.gl-hasresume #go-play { position: static; }
}
@media (min-width: 900px) {
  .gl-start__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gl-maps__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gl-hero { aspect-ratio: 16 / 11; }
}
@media (min-width: 1200px) { .gl-start__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
@media (hover: hover) { .gl-mt:not(.is-sel):hover { background: var(--gg-cream); transform: translateY(-1px); } .gl-mt.is-locked:hover { background: var(--gg-sand); } }
@media (prefers-reduced-motion: reduce) { .gl-mt { transition: none; } }

/* the goal strip in the HUD: a medal, the goal, a bar to gold with a mark per medal, and Moonlit's day or night */
.gl-hud.has-goal { flex-wrap: wrap; row-gap: 4px; }
.gl-goal { display: flex; align-items: center; gap: 8px; min-width: 0; order: 9; flex: 1 0 100%; padding: 1px 0 0; }
.gl-goal[hidden] { display: none; }
.gl-goal__m { flex: none; display: grid; }
.gl-goal__t { flex: none; font-size: var(--gg-text-xs); font-weight: 800; white-space: nowrap; }
.gl-goal__t .is-long, .gl-dn .is-long { display: none; }
.gl-goal__bar { position: relative; flex: 1 1 60px; min-width: 50px; height: 10px; margin-right: 9px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-sand); }
.gl-goal__bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--gg-r-pill); background: var(--gg-butter); transition: width .4s var(--gg-ease-out); }
.gl-goal__bar b { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid var(--gg-ink); border-radius: 50%; background: var(--gg-paper); }
.gl-goal__bar b.is-on.m1 { background: var(--gg-medal-bronze, var(--gg-tangerine)); }
.gl-goal__bar b.is-on.m2 { background: var(--gg-medal-silver, var(--gg-lavender-100)); }
.gl-goal__bar b.is-on.m3 { background: var(--gg-medal-gold, var(--gg-butter)); }
.gl-dn { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 3px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-butter-100); font-size: var(--gg-text-xs); font-weight: 800; }
.gl-dn[hidden] { display: none; }
.gl-dn.is-night { background: var(--gg-lavender-100); }
.gl-dn__i svg { display: block; width: 18px; height: 18px; }
.gl-hud.is-night #sun-dot circle { fill: var(--gg-lavender-100); }
@media (min-width: 900px) {
  /* a wide HUD has room in the middle: the strip sits between the week and the gnome count */
  .gl-hud.has-goal { flex-wrap: nowrap; }
  .gl-goal { order: 0; flex: 1 1 auto; max-width: 560px; margin-left: 18px; padding: 0; }
  .gl-goal__t { font-size: var(--gg-text-sm); }
  .gl-goal__t .is-long { display: inline; }
  .gl-goal__t .is-short { display: none; }
  .gl-goal { margin-right: 10px; }
  .gl-goal__bar { height: 12px; min-width: 90px; }
}
@media (max-width: 899.98px) and (orientation: landscape) and (max-height: 560px) {
  .gl-hud.has-goal { flex-wrap: nowrap; }
  .gl-goal { order: 0; flex: 1 1 auto; }
}

/* the medal moment: a card at the top of the garden that slides in and out; the clock never stops */
.gl-medalm {
  pointer-events: auto; width: min(100%, 420px); display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 10px; cursor: pointer;
  border: var(--gg-border); border-radius: var(--gg-r-lg); background: var(--gg-butter-100); box-shadow: var(--gg-shadow);
}
.gl-medalm[hidden] { display: none; }
.gl-medalm[data-tier="2"] { background: var(--gg-lavender-100); }
.gl-medalm[data-tier="3"] { background: var(--gg-lime-100); }
.gl-medalm__txt { display: grid; gap: 1px; min-width: 0; }
.gl-medalm__txt b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); line-height: 1.15; }
.gl-medalm__txt span { font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-2); line-height: 1.3; }

/* the results card: the map, and the medal this run won */
.gl-rmap { margin-bottom: 2px; }
.gl-rmap[hidden] { display: none; }
.gl-rmedal { display: flex; align-items: center; gap: 12px; margin: -6px 0 14px; padding: 10px 12px; text-align: left; border: var(--gg-border); border-radius: var(--gg-r-md); background: var(--gg-cream); }
.gl-rmedal[hidden] { display: none; }
.gl-rmedal[data-tier="1"] { background: var(--gg-butter-100); }
.gl-rmedal[data-tier="2"] { background: var(--gg-lavender-100); }
.gl-rmedal[data-tier="3"] { background: var(--gg-lime-100); }
.gl-rmedal__txt { display: grid; gap: 2px; min-width: 0; }
.gl-rmedal__txt b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); }
.gl-rmedal__txt span { font-size: var(--gg-text-sm); font-weight: 600; color: var(--gg-ink-2); line-height: 1.35; }

/* the Engine Works: map lines under their own heading */
.gl-wk__group { grid-column: 1 / -1; margin-top: 6px; }
.gl-wk__map { display: inline-block; margin-left: 6px; padding: 0 7px; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-green-100); font-family: var(--gg-font-body); font-size: 13px; font-weight: 800; vertical-align: 2px; }

@media (min-width: 900px) { .gl-mt__thumb { height: 60px; } }
/* a long run's five-digit counts keep inside their boxes */
.gl-rscores b.is-long { font-size: 26px; letter-spacing: -.03em; }
@media (min-width: 1800px) { .gl-dn .is-long { display: inline; } .gl-dn .is-short { display: none; } }
@media (min-width: 900px) and (max-width: 1279.98px) { .gl-goal__t .is-long { display: none; } .gl-goal__t .is-short { display: inline; } .gl-goal { margin-left: 10px; } }

/* what the selected line reaches: kinds it does not call at, each with how many changes of line (a cross: no way yet) */
.gl-linecard__reach { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 2px 4px; }
.gl-lcreach__k { display: grid; margin-right: 2px; font-size: var(--gg-text-xs); font-weight: 800; color: var(--gg-ink-2); line-height: 1.2; }
.gl-lcreach__k i { font-style: normal; font-weight: 700; color: var(--gg-ink-3); }
.gl-lcreach {
  position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer; font: inherit;
  border: 0; background: none; touch-action: manipulation;
}
.gl-lcreach img { width: 34px; height: 34px; padding: 5px; box-sizing: border-box; border: 2px solid var(--gg-ink); border-radius: 10px; background: var(--gg-cream); }
.gl-lcreach.is-sel img { background: var(--gg-lime); box-shadow: 2px 2px 0 var(--gg-ink); }
.gl-reachb {
  min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; box-sizing: border-box;
  border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--c, var(--gg-paper)); color: var(--gg-ink);
  font: 800 13px/1 var(--gg-font-body); font-style: normal;
}
.gl-reachb.is-dark { color: var(--gg-paper); }
.gl-reachb.is-none { font-size: 15px; }
.gl-lcreach .gl-reachb { position: absolute; right: -4px; bottom: -4px; }
.gl-krow__reach { position: absolute; right: -6px; bottom: -8px; }
.gl-krow__reach[hidden] { display: none; }
@media (max-width: 899.98px) {
  .gl-lcreach img { width: 30px; height: 30px; padding: 4px; }
}

/* ---------------------------------------------------------------- rv 7: Frost, the medal works, benches and towers */
.gl-dn.is-frost { background: var(--gg-paper); }
.gl-dn.is-thaw { background: var(--gg-lavender-100); }
.gl-icebn { background: var(--gg-paper); }
.gl-icebn .gl-sit__i { background: var(--gg-lavender-100); }
.gl-icebn .gl-sit__i svg { width: 26px; height: 26px; }
.gl-icebn .gl-sit__when { color: var(--gg-ink-3); }
.gl-icebn.is-thaw { background: var(--gg-lavender-100); }
.gl-icebn.is-thaw .gl-sit__i { background: var(--gg-paper); }
.gl-icebn.is-thaw .gl-sit__when { color: var(--gg-suit-red); }
.gl-icebn[hidden] { display: none !important; }

/* the Works sheet: the built lines folded into one row, the medal works */
.gl-wk--fold { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; align-items: center; min-height: 64px; touch-action: manipulation; }
.gl-wk--fold .gl-wk__icon { grid-row: 1; }
.gl-wk--fold .gl-wk__txt { display: grid; }
.gl-wk--fold { grid-template-columns: 46px minmax(0, 1fr) auto; }
.gl-wk__chev { padding: 4px 12px; min-height: 32px; display: inline-flex; align-items: center; border: 2px solid var(--gg-ink); border-radius: var(--gg-r-pill); background: var(--gg-paper); font-size: var(--gg-text-xs); font-weight: 800; }
.gl-wk--fold:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gg-ink); }
.gl-wk__intro { grid-column: 1 / -1; font-size: var(--gg-text-xs); font-weight: 600; color: var(--gg-ink-2); line-height: 1.4; margin-top: -4px; }
.gl-wk[data-why] { cursor: pointer; }
.gl-wk__map.is-medal { background: var(--gg-butter-100); }
.gl-wk__gate { display: flex; align-items: flex-start; gap: 4px; margin-top: 5px; font-size: var(--gg-text-xs); font-weight: 800; color: var(--gg-ink-2); line-height: 1.3; }
.gl-wk__gate svg { flex: none; width: 16px; height: 16px; margin-top: -1px; }
.gl-wk__gate.is-ready { color: var(--gg-green-700); }
.gl-pips--m { gap: 8px; }
.gl-wk__mp { display: inline-flex; flex-direction: column; align-items: center; gap: 0; line-height: 1; }
.gl-wk__mp small { font-size: 11px; font-weight: 800; color: var(--gg-ink-3); margin-top: 1px; }
.gl-wk__mp.is-on small { color: var(--gg-ink); }
.gl-wk__mp.is-new .gl-medal { transform: scale(1.2); }
.gl-wk__lock b { font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-sm); font-variant-numeric: tabular-nums; }

/* map tiles: the level the pips are for */
.gl-mt__lv { align-self: center; margin-right: 3px; font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: .02em; }
.gl-mt__pips { align-items: center; }

/* market day: the old price struck through */
.gl-shop__row.is-market { background: var(--gg-butter-100); }
.gl-buy.is-half s { font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); text-decoration-thickness: 2px; margin-right: 1px; }
.gl-buy.is-half { background: var(--gg-lime); }
.gl-buy.is-half.is-poor { background: var(--gg-paper); }

/* ------------------------------------------------------------------ calm gear and line numbers (10-28) */
/* the speed chip: 2x a soft butter, 3x lime, "slow" (an edit held) a quiet lavender in a smaller type */
.gl-hudbtn.is-mid { background: var(--gg-butter-100); }
.gl-hudbtn.is-slow { background: var(--gg-lavender-100); font-family: var(--gg-font-body); font-size: var(--gg-text-xs); letter-spacing: .02em; }
/* a line chip: its colour, and its average wait under it */
.gl-lchip { grid-template-rows: auto auto; align-content: center; row-gap: 2px; height: auto; min-height: 44px; padding: 2px 0; }
.gl-lchip__sw { grid-area: 1 / 1; }
.gl-lchip__lock { grid-area: 1 / 1; place-self: center; }
.gl-lchip__n {
  grid-area: 2 / 1; min-width: 28px; padding: 0 4px; border-radius: var(--gg-r-pill);
  font: 800 var(--gg-text-xs) / 1.25 var(--gg-font-body); font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap;
  color: var(--gg-ink-3); background: transparent;
}
.gl-lchip__n:empty { display: none; }
.gl-lchip__n[data-band="ok"] { background: var(--gg-green-100); color: var(--gg-green-800); }
.gl-lchip__n[data-band="warm"] { background: var(--gg-butter); color: var(--gg-ink); }
.gl-lchip__n[data-band="hot"] { background: var(--gg-suit-red); color: var(--gg-paper); }
/* a phone: the chip stays 44 px tall with its number (26 + 1 + 15 + 2), so the tray and the garden keep their size */
@media (max-width: 899.98px) {
  .gl-tray__lines .gl-lchip { min-height: 44px; height: 44px; padding: 1px 0; row-gap: 1px; }
  .gl-tray__lines .gl-lchip__sw { width: 26px; height: 26px; border-width: 2.5px; }
  .gl-tray__lines .gl-lchip__n { line-height: 15px; }
  .gl-tray__lines .gl-lchip.is-sel .gl-lchip__sw { transform: none; }
}
/* the line card's numbers: a 3 x 2 grid of small stats and one plain hint line */
.gl-lckpi { display: grid; gap: 6px; }
.gl-lckpi__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; margin: 0; }
.gl-lckpi__c { min-width: 0; display: grid; align-content: start; gap: 0; padding: 4px 8px; border-radius: var(--gg-r-sm); background: var(--gg-cream); }
.gl-lckpi__c dt { font-size: var(--gg-text-xs); font-weight: 700; color: var(--gg-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-lckpi__c dd {
  margin: 0; display: flex; align-items: center; gap: 4px; min-width: 0;
  font-family: var(--gg-font-display); font-weight: 800; font-size: var(--gg-text-md); line-height: 1.2; font-variant-numeric: tabular-nums;
}
.gl-lckpi__c dd span { font-family: var(--gg-font-body); font-size: var(--gg-text-xs); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-lckpi__c dd img { width: 20px; height: 20px; flex: none; }
.gl-lckpi__c dd[data-band="ok"] { color: var(--gg-green-700); }
.gl-lckpi__c dd[data-band="warm"] { color: var(--gg-ink); }
.gl-lckpi__c dd[data-band="warm"]::after, .gl-lckpi__c dd[data-band="hot"]::after { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gl-lckpi__c dd[data-band="warm"]::after { background: var(--gg-butter); box-shadow: 0 0 0 1.5px var(--gg-ink); }
.gl-lckpi__c dd[data-band="hot"] { color: var(--gg-suit-red); }
.gl-lckpi__c dd[data-band="hot"]::after { background: var(--gg-suit-red); }
.gl-lckpi__hint { margin: 0; padding: 4px 10px; border-radius: var(--gg-r-pill); font-size: var(--gg-text-xs); font-weight: 700; line-height: 1.35; background: var(--gg-butter-100); color: var(--gg-ink); justify-self: start; }
.gl-lckpi__hint[data-hint="well"] { background: var(--gg-green-100); color: var(--gg-green-800); }
@media (max-width: 899.98px) {
  .gl-lckpi { gap: 4px; }
  /* the busiest plot's name is the longest value: its column gets the room the short ones leave */
  .gl-lckpi__grid { gap: 3px 4px; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr) minmax(0, 1.3fr); }
  .gl-lckpi__c { padding: 2px 6px; }
  .gl-lckpi__c dd { font-size: var(--gg-text-sm); }
}
/* the side panel is narrow: two columns, three rows */
@media (min-width: 900px) {
  .gl-lckpi__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) { .gl-lckpi__c dd span { white-space: normal; overflow: visible; line-height: 1.2; } }
@media (min-width: 900px) { .gl-tray__lines .gl-lchip { height: auto; min-height: 48px; } .gl-tray__lines { row-gap: 8px; } }
/* a phone on its side: the side panel is 248 px, so the numbers go two by three as on a desk */
@media (max-width: 899.98px) and (orientation: landscape) and (max-height: 560px) {
  .gl-lckpi__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gl-lckpi__c dd span { white-space: normal; overflow: visible; line-height: 1.2; }
}
/* rv 8 Frost: a line waiting at the bank. A slot that runs nothing keeps its colour (never "free"): a faded dot with
   a dashed rim and "wait" under it; the card says where it waits and what it needs; the waiting plots are faded */
.gl-lchip.is-waiting .gl-lchip__sw { opacity: .6; border-style: dashed; box-shadow: none; }
.gl-lchip__n[data-band="wait"] { background: var(--gg-sky); color: var(--gg-ink); font-weight: 800; }
.gl-linecard__bank { margin: 0; padding: 6px 10px; border-radius: var(--gg-r-md); background: var(--gg-lavender-100); font-size: var(--gg-text-sm); font-weight: 700; line-height: 1.35; }
.gl-lcplot.is-waiting { opacity: .55; }
.gl-lcplot.is-waiting img { border-style: dashed; box-shadow: none; }

/* ================================================================== phones: edit a line (10-29) */

.gl-landbar { display: none; }
/* tap-tap: a loose end waits for its plot (said in the card, the garden stays clear) */
.gl-linecard__arm {
  margin: 0; display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; min-height: 44px; border: var(--gg-border);
  border-radius: var(--gg-r-pill); background: var(--gg-lime); font-weight: 700; font-size: var(--gg-text-sm); line-height: 1.25;
}
.gl-linecard__arm span { flex: 1; min-width: 0; }
.gl-linecard__arm .gl-armed__x { flex: none; width: 44px; height: 44px; }
.gl-linecard.is-arming .gl-lckpi__hint { display: none; }
/* the line card's More button lives on phones only */
.gl-linecard__more { display: none; }
.gl-linecard__more { padding-inline: 12px; flex: none; }

/* the turn-your-phone nudge (once, in the top stack) */
.gl-turn {
  pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: min(100%, 420px); padding: 2px 2px 2px 8px;
  border: var(--gg-border); border-radius: var(--gg-r-pill); background: var(--gg-paper); box-shadow: var(--gg-shadow-sm);
  font-weight: 700; font-size: var(--gg-text-sm); line-height: 1.25;
}
.gl-turn[hidden] { display: none; }
.gl-turn__i svg { width: 30px; height: 30px; display: block; }
.gl-turn__t { flex: 1; min-width: 0; }
.gl-turn .gl-armed__x { flex: none; width: 44px; height: 44px; background: var(--gg-cream); }

@media (max-width: 899.98px) {
  .gl-linecard__more { display: inline-flex; }
  /* the peek sheet: it sits over the tray (the shed is not needed while a line is open), so the garden keeps its
     whole height. Title row, the plot strip, the hint; More (or a drag up on the title row) shows the rest */
  .gl-linecard {
    left: 0; right: 0; bottom: 0; min-height: 100%; align-content: start;
    border-width: 2.5px 0 0; border-radius: var(--gg-r-lg) var(--gg-r-lg) 0 0;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom)) 12px;
    max-height: calc(100vh - var(--gl-bar, 66px) - 80px); max-height: calc(100dvh - var(--gl-bar, 66px) - 80px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .gl-linecard__head { min-height: 44px; gap: 8px; touch-action: none; }
  .gl-linecard__ti #lc-stats { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gl-sit__txt > span:last-child { display: block; }
  .gl-linecard.is-more .gl-linecard__ti #lc-stats { white-space: normal; }
  /* the strip right under the title, in peek and in full, so it never jumps */
  .gl-linecard__head, .gl-linecard__bank { order: 0; }
  .gl-linecard__plots { order: 1; }
  .gl-linecard__arm { order: 2; }
  .gl-lckpi { order: 3; }
  .gl-linecard__reach { order: 4; }
  .gl-linecard__acts { order: 5; }
  .gl-linecard:not(.is-more) .gl-lckpi__grid,
  .gl-linecard:not(.is-more) .gl-linecard__reach,
  .gl-linecard:not(.is-more) .gl-linecard__acts { display: none; }
  .gl-linecard:not(.is-more) .gl-lckpi__hint { padding-block: 2px; }
  /* the armed pill can say a longer thing on a phone, and its x is a full tap target */
  .gl-armed { white-space: normal; text-align: left; }
  .gl-armed__x { width: 44px; height: 44px; flex: none; }
  /* a garden-day banner folds into a chip after a few seconds; a tap opens it again */
  .gl-sit { cursor: pointer; }
  .gl-sit.is-mini {
    width: auto; align-self: flex-start; grid-template-columns: 34px auto 22px; gap: 6px; padding: 3px 8px 3px 3px; min-height: 44px;
    border-radius: var(--gg-r-pill);
  }
  .gl-sit.is-mini .gl-sit__i { width: 34px; height: 30px; border-radius: var(--gg-r-pill); }
  .gl-sit.is-mini .gl-sit__i svg { width: 26px; height: 20px; }
  .gl-sit.is-mini .gl-sit__txt b, .gl-sit.is-mini .gl-sit__txt span:not(.gl-sit__when) { display: none; }
  .gl-sit.is-mini .gl-sit__clock { width: 20px; height: 20px; }
  /* the full banner on a phone: the name on the same line as Tomorrow, the blurb under it */
  .gl-sit:not(.is-mini) .gl-sit__txt { display: block; }
  .gl-sit:not(.is-mini) .gl-sit__when { margin-right: 6px; }
}

/* a phone on its side: the card goes back to the side panel (no sheet), the app bar folds into the HUD row */
@media (max-width: 899.98px) and (orientation: landscape) and (max-height: 560px) {
  .gl-linecard {
    min-height: auto; max-height: none; overflow: visible; border-width: 2.5px; border-radius: var(--gg-r-lg);
    padding: 8px 8px 8px 10px;
  }
  .gl-linecard__more { padding-inline: 6px; }
  .gl-linecard__arm { order: 0; }
  .gl-linecard__head { gap: 6px; }
  .gl-sit__txt > span:last-child { display: none; }
  html.gl-playing .gg-appbar { display: none; }
  /* the app bar's buttons top the side panel instead */
  .gl-tray > .gl-landbar { display: flex; order: -2; justify-content: flex-end; }
  .gl-landbar .gg-appbar__actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
  .gl-hud > .gl-hudhome { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; }
}
.gl-landbar .gl-chip { display: none !important; }
.gl-fsbtn[hidden] { display: none !important; }
.gl-fsbtn svg { width: 20px; height: 20px; }
.gl-hudhome[hidden] { display: none !important; }
