html{color-scheme:light;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0}img{max-width:100%}[hidden]{display:none!important}
/* latin-ext */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/PixelifySans-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/PixelifySans-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/PixelifySans-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/PixelifySans-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Silkscreen-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Silkscreen-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/Silkscreen-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/Silkscreen-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/SpaceMono-400i-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/SpaceMono-400i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/SpaceMono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/SpaceMono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/SpaceMono-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/SpaceMono-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* The links plug-in: COPY LINK at the foot of every card, and the link shown to select when there is no clipboard. */
#card .copylink { align-self: flex-start; background: transparent; color: var(--muted); border: 0; min-height: 44px; padding: 0 2px; font: 400 11px/1 var(--label); letter-spacing: 1px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#card .copylink:hover { color: var(--cream); }
#card .linkurl { font: 400 16px/1.4 var(--num); color: var(--cream); word-break: break-all; user-select: all; -webkit-user-select: all; border: 2px solid var(--line); padding: 8px; }

/* The places plug-in's panels: the shelf, the cook chart and the tablet. */
.pl-panel { display: flex; flex-direction: column; gap: 10px; }
.pl-svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
#plain .pl-panel { max-width: 360px; }
.pl-svg text { shape-rendering: auto; }
/* Type on the drawn panels: chart figures and the tablet's numbers in the number face, the tablet's lift names in
   the body face. The heading stays Silkscreen: a short caps label. */
.pl-svg text[font-size="5"] { font-family: var(--num); font-weight: 700; }
.pl-svg text[font-size="8"][text-anchor="start"] { font-family: var(--body); font-weight: 700; }
.pl-svg text[font-size="8"][text-anchor="end"] { font-family: var(--num); font-weight: 700; }
.pl-shelfsvg { cursor: pointer; touch-action: pan-y; -webkit-tap-highlight-color: transparent; outline: none; }
.pl-shelfsvg.pl-kb:focus { outline: 3px solid var(--cream); outline-offset: 3px; }
.pl-pick { display: flex; align-items: center; gap: 8px; }
.pl-cap { flex: 1; min-width: 0; font-size: 17px; line-height: 1.35; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.pl-cap b { color: var(--honey); font-weight: 700; }
.pl-cap small { font: 400 12px/1.3 var(--label); letter-spacing: 1px; color: var(--muted); }
#card .pl-step { width: 44px; min-width: 44px; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: 2px solid var(--cream); }
.pl-step svg { width: 14px; height: 14px; display: block; shape-rendering: crispEdges; }
.pl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pl-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 12px/1 var(--label); letter-spacing: 1px; color: var(--cream); }
.pl-key span { display: inline-flex; align-items: center; gap: 6px; }
.pl-key i { display: inline-block; width: 10px; height: 4px; }
.pl-key i.pl-pit { background: var(--honey); }
.pl-key i.pl-meat { background: var(--cream); }
.pl-cap2 { margin: 0; font-size: 16px; line-height: 1.45; color: var(--muted); }

/* Tokens: colours, type and the plate offsets. The fonts themselves are loaded by the page.
   Type, as Marty approved it:
     --body   Space Mono: all running text, and every number (--num is the same face; it is monospaced, so its
              figures are tabular). It keeps 5/S/8, B/G, 0/O and 1/l/I apart.
     --display Pixelify Sans: titles and the name plate only.
     --label  Silkscreen: short caps labels and map labels only, never numbers.
   Running text is at least 16px on a phone; text contrast is at least 4.5:1 on its plate (cream, honey and muted
   on ink are 12.6, 9.1 and 8.8 to 1; ink on honey is 9.1 to 1). */
:root {
  --grass: #7fb069;
  --ink: #2b2233;
  --cream: #f4e9cf;
  --honey: #f2c14e;
  --muted: #c9c2d6;
  --line: #4a4458;
  --display: 'Pixelify Sans', 'Courier New', monospace;
  --label: 'Silkscreen', 'Courier New', monospace;
  --body: 'Space Mono', 'Courier Prime', 'DejaVu Sans Mono', Consolas, monospace;
  --num: 'Space Mono', 'DejaVu Sans Mono', Consolas, monospace;
  --text: 18px;
  --edge: 16px;
  /* Plate offsets from each edge, kept clear of notches and the home bar. */
  --top: max(var(--edge), env(safe-area-inset-top, 0px));
  --bottom: max(var(--edge), env(safe-area-inset-bottom, 0px));
  --left: max(var(--edge), env(safe-area-inset-left, 0px));
  --right: max(var(--edge), env(safe-area-inset-right, 0px));
}

/* Layout: one full-screen pixel world you fly over. Plates pinned to the corners. A card opens when the bee lands.
   Three views are designed for: 390x844 and 844x390 touch, and 1280x800 desk. Ported from the legacy page. */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--grass); color: var(--cream); font-family: var(--body); font-variant-numeric: tabular-nums; overflow: hidden; }
#stage { position: relative; height: 100%; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.plate { position: absolute; background: var(--ink); border: 3px solid var(--cream); box-sizing: border-box; }

/* Name plate */
#name { left: var(--left); top: var(--top); padding: 9px 14px 8px; display: flex; flex-direction: column; gap: 5px; }
#name b { font: 400 24px/1 var(--display); letter-spacing: 1px; }
#name span { font: 700 13px/1.2 var(--body); letter-spacing: 0.5px; color: var(--honey); }

/* Comb: the cells, rows plug-ins add (hud.slot('comb')), the core score, the count and PLAIN VERSION. */
#comb { right: var(--right); top: var(--top); padding: 9px 12px 8px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
#comb svg { display: block; width: 200px; height: 30px; }
#comb .combrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 400 12px/1 var(--label); letter-spacing: 1px; }
#combCount { font: 700 16px/1 var(--num); letter-spacing: 0; }
#score, #honks { font: 700 15px/1 var(--num); }
#honks { color: var(--honey); }
.slot-comb:empty { display: none; }
/* The chip: on a phone (the class "compact", COMPACT_MEDIA in src/ui/index.js) the comb folds to it until it is
   tapped open. A desk never shows it. */
#hudChip { display: none; }
#comb.compact #hudChip { display: flex; align-items: center; gap: 6px; align-self: flex-end; min-height: 36px; min-width: 44px; padding: 0 8px;
  background: transparent; color: var(--cream); border: 0; font: 700 15px/1 var(--num); letter-spacing: 0; -webkit-tap-highlight-color: transparent; }
#comb #hudChip svg { width: 16px; height: 18px; display: block; flex: none; }
#comb.compact.collapsed { padding: 2px; }
#comb.compact.collapsed > :not(#hudChip) { display: none !important; }
/* A tap above the chip's few pixels still hits it: the plate around a folded chip is the chip. */
#comb.compact.collapsed #hudChip { min-height: 40px; }
/* Open on a phone, the plate takes the taps that land on it (a tap anywhere else folds it). */
#comb.compact:not(.collapsed) { pointer-events: auto; }
#comb.compact:not(.collapsed) #hudChip { border-bottom: 2px solid var(--line); }
#hudChip[aria-expanded="true"] #chipCount { color: var(--honey); }
/* Something changed while it was folded (a new place, honey in the jar): the chip glows for a moment. */
@keyframes chipGlow { 0%, 100% { background: transparent; color: var(--cream); } 50% { background: var(--honey); color: var(--ink); } }
#hudChip.pulse { animation: chipGlow 0.6s steps(2) 2; }
@media (prefers-reduced-motion: reduce) { #hudChip.pulse { animation: none; background: var(--honey); color: var(--ink); } }
.slot-stage { position: absolute; inset: 0; pointer-events: none; }
.slot-stage > * { pointer-events: auto; }

#hint { left: var(--left); bottom: var(--bottom); padding: 10px 14px; font-size: 17px; line-height: 1.4; max-width: min(340px, calc(100% - 32px)); }
#arrow { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; pointer-events: none; }

button { font: 700 13px/1 var(--label); letter-spacing: 1px; color: var(--ink); background: var(--honey); border: 0; padding: 0 14px; min-height: 44px; cursor: pointer; }
button:focus-visible, #cardTitle:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
button.quiet { background: transparent; color: var(--cream); border: 2px solid var(--cream); min-height: 44px; padding: 0 8px; font-size: 12px; }

#toast { left: 50%; transform: translateX(-50%); top: calc(var(--top) + 68px); padding: 10px 16px; font-size: var(--text); line-height: 1.35; text-align: center; max-width: calc(100% - 32px); }

/* Card */
#card { right: var(--right); top: calc(var(--comb-b, 136px) + 8px); bottom: var(--bottom); width: min(400px, calc(100% - 32px)); padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; user-select: text; -webkit-user-select: text; touch-action: pan-y; }
#cardBody { display: flex; flex-direction: column; gap: 14px; }
#plainBody { display: flex; flex-direction: column; gap: 30px; }
#card .kick, #plain .kick { font: 700 13px/1 var(--label); letter-spacing: 2px; color: var(--honey); }
#card h2, #plain h2 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1.05; text-wrap: balance; }
#card p, #plain p { margin: 0; font-size: var(--text); line-height: 1.5; }
#card ul, #plain ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 17px; line-height: 1.45; }
#card li b, #plain li b { color: var(--honey); }
.pic { display: block; width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; border: 3px solid var(--cream); box-sizing: border-box; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 9px 14px; font-size: 17px; line-height: 1.3; border: 2px solid var(--line); padding: 12px; }
.stats b { grid-column: 1 / -1; font: 700 13px/1 var(--label); letter-spacing: 2px; color: var(--honey); padding-bottom: 3px; }
.stats span:nth-child(odd) { text-align: right; color: var(--honey); font-family: var(--num); font-weight: 700; }
.facts { display: flex; flex-direction: column; gap: 9px; border-top: 2px solid var(--line); padding-top: 12px; }
.frow { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.frow .when { font: 700 14px/1.35 var(--num); color: var(--muted); }
.frow strong { display: block; font-size: var(--text); line-height: 1.3; font-weight: 700; }
.frow .sub { display: block; font-size: 16px; line-height: 1.4; color: var(--muted); }
.shelf { font-size: 17px; line-height: 1.5; color: var(--muted); }
.note { color: var(--muted); border-top: 2px solid var(--line); padding-top: 12px; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-family: var(--num); font-size: 20px; }
#card .spacer { flex: 1; }
/* CLOSE stays in reach at the bottom of the card while the content scrolls above it. */
#cardClose { position: sticky; bottom: 0; flex: none; box-shadow: 0 0 0 12px var(--ink), 0 20px 0 12px var(--ink); }

/* App rows (Workshop, bee house): icon left, name and text right, the whole row one link to the App Store. */
#card li .app, #plain li .app { display: flex; gap: 14px; align-items: flex-start; min-height: 44px; color: inherit; text-decoration: none; }
.app .appicon { flex: none; width: 56px; height: 56px; border-radius: 12.5px; image-rendering: auto; margin-top: 2px; }
.app > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.app .store { align-self: flex-start; margin-top: 4px; font: 400 10px/1 var(--label); letter-spacing: 1px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.app:hover .store, .app:focus-visible .store { color: var(--cream); }
.app:hover b { text-decoration: underline; text-underline-offset: 3px; }
.app:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

/* Plain version */
#plain { --plain-pt: max(28px, calc(env(safe-area-inset-top, 0px) + 12px)); inset: 0; border-width: 0; overflow-y: auto; padding-top: var(--plain-pt); padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 12px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); user-select: text; -webkit-user-select: text; touch-action: pan-y; }
#plain .col { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
#plain section { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 96px; }
#plain .top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; position: sticky; top: calc(-1 * var(--plain-pt)); z-index: 1; background: var(--ink); padding: var(--plain-pt) 0 10px; margin: calc(-1 * var(--plain-pt)) 0 -10px; }
#plain h1 { margin: 0; font-family: var(--display); font-size: 36px; line-height: 1; }

/* Keycaps: pixel keys by the bee for a keyboard player, faded in and out with the class "show". */
.keycaps { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.3s steps(3), visibility 0s 0.3s; }
.keycaps.show { opacity: 1; visibility: visible; transition: opacity 0.3s steps(3); }
#keys { display: grid; grid-template-columns: repeat(3, 22px); grid-template-rows: 22px 22px; gap: 3px; }
#keys .up { grid-column: 2; grid-row: 1; }
#keys .kc:not(.up) { grid-row: 2; }
#spaceKey { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.kc { box-sizing: border-box; height: 22px; min-width: 22px; padding: 0 6px; display: grid; place-items: center; background: var(--ink); border: 2px solid var(--cream); box-shadow: 0 3px 0 var(--line); color: var(--honey); font: 400 11px/1 var(--label); letter-spacing: 1px; }
.kc svg { width: 12px; height: 12px; display: block; shape-rendering: crispEdges; }
#keys .kc { padding: 0; }
.kw { font: 700 12px/1 var(--label); letter-spacing: 1px; color: var(--cream); text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink), 2px 2px var(--ink), -2px 2px var(--ink), 2px -2px var(--ink), -2px -2px var(--ink); }
/* Touch shows no keycaps, whatever the script decides. */
@media (pointer: coarse) and (hover: none) { .keycaps, .keycaps.show { display: none; } }

/* Float text (+1, -1, +2 HONEY) over the farm: the number face, on its ink outline. */
#fx text { font-family: var(--num); }
#fx text[fill="#d1453b"] { fill: #f0806f; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
.hop { animation: hop 0.8s steps(2) infinite; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }
.blink { animation: blink 1.2s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .hop, .blink { animation: none; } .keycaps, .keycaps.show { transition: none; } }

/* Phone, portrait (390x844): smaller plates; the card fills the bottom and leaves at least 96px under the plates
   for the bee and its place's marker. */
@media (max-width: 560px) {
  #name { padding: 6px 8px 5px; border-width: 2px; }
  #name b { font-size: 14px; }
  #name span { display: none; }
  #comb svg { width: 150px; height: 22px; }
  #comb { padding: 8px 8px 7px; }
  #comb .combrow { flex-direction: column; align-items: stretch; gap: 6px; }
  #toast { top: calc(var(--hud-b, 150px) + 8px); }
  #card { top: auto; left: var(--left); width: auto; max-height: min(62%, calc(100% - var(--hud-b, 150px) - 8px - var(--bottom) - 96px)); }
  #hint { font-size: 16px; }
  #plain .top { flex-wrap: nowrap; gap: 10px; }
  #plain h1 { font-size: 26px; }
  #plainClose { padding: 0 10px; }
}
/* Phone, landscape (844x390): the plates make one thin strip along the top, the name on the left and the comb laid
   out in a row on the right (the cells over the count, the jar and sound, PLAIN VERSION), so the farm keeps most of
   the screen. The card and the toast go under the strip. */
@media (min-width: 561px) and (max-height: 500px) {
  #name { padding: 6px 8px 5px; border-width: 2px; }
  #name b { font-size: 15px; }
  #name span { display: none; }
  #comb { display: grid; grid-template-rows: auto auto; gap: 5px 0; align-items: center; padding: 4px 8px 4px 10px; }
  #comb .combrow { display: contents; }
  #comb #combSvg { grid-row: 1; grid-column: 1; width: 132px; height: 20px; }
  #combCount { grid-row: 2; grid-column: 1; font-size: 14px; }
  #comb .slot-comb { grid-row: 1 / span 2; grid-column: 2; margin-left: 12px; }
  #honks, #score { grid-column: 3; margin-left: 12px; }
  #honks { grid-row: 1; } #score { grid-row: 2; }
  #plainBtn { grid-row: 1 / span 2; grid-column: 4; margin-left: 12px; }
  #comb.compact:not(.collapsed) #hudChip { grid-row: 1 / span 2; grid-column: 5; margin-left: 12px; border-bottom: 0; border-left: 2px solid var(--line); align-self: stretch; }
  #toast { top: calc(var(--hud-b, 80px) + 8px); }
  #card { right: auto; left: var(--left); top: calc(var(--hud-b, 80px) + 8px); width: min(400px, calc(100% - 32px)); }
  #hint { font-size: 16px; padding: 8px 12px; max-width: min(560px, calc(100% - 32px)); }
}
/* The plates show; they do not catch taps. A tap or click on one goes to the farm under it (a marker half under a
   plate still lands), except on the controls in them. */
#name, #comb, #hint, #toast { pointer-events: none; }
#comb button, #comb a, #jarHud.again { pointer-events: auto; }
/* A plate over the bee or Marty fades so they show through, and its controls let taps through too. A control over a
   marker fades and lets the marker take the tap. */
#name.see-through, #comb.see-through { opacity: 0.25; }
/* Quick both ways once it has happened (the intro's slow reveal would otherwise linger for most of a second). */
#name.fades, #comb.fades { transition: opacity 0.2s ease !important; }
@media (prefers-reduced-motion: reduce) { #name.fades, #comb.fades { transition: none !important; } }
#comb.see-through button, #comb.see-through a, #comb.see-through #jarHud, #comb .yield { pointer-events: none; }
/* The chip is the one way to the folded panel on a phone: it always takes its tap. */
#comb.see-through #hudChip { pointer-events: auto; }
#comb .yield { opacity: 0.35; }
#world.hot { cursor: pointer; }
/* The baked world and the sprites are pictures a unit to a pixel: scaled without smoothing, as crisp as rects. */
#world image { image-rendering: optimizeSpeed; image-rendering: -moz-crisp-edges; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated; }

/* Her card's married-for counter (src/plugins/family/counter.js). The build bundles it after src/styles/. */
.wed { display: flex; flex-direction: column; gap: 8px; }
.wed-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.wed-u { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 2px 8px; border: 2px solid var(--line); background: var(--ink); }
.wed-n { display: block; height: 28px; width: auto; shape-rendering: crispEdges; }
.wed-l { font: 400 11px/1 var(--label); letter-spacing: 1px; color: var(--honey); }
#plain .wed { max-width: 400px; }
@media (max-width: 560px) {
  .wed-row { grid-template-columns: repeat(3, 1fr); }
  .wed-n { height: 35px; }
}

/* The intro plug-in (src/plugins/intro). The HUD hides and slides in by
   the state of the plug-in's own #intro element in the stage slot, so these rules do nothing without it. */
#stage:has(#intro.hide-hud) #name, #stage:has(#intro.hide-hud) #comb, #stage:has(#intro.hide-hud) #hint, #stage:has(#intro.hide-hud) #arrow { opacity: 0; visibility: hidden; }
#stage:has(#intro.hide-hud) #name { transform: translateX(-18px); }
#stage:has(#intro.hide-hud) #comb { transform: translateX(18px); }
#stage:has(#intro.hide-hud) #hint { transform: translateY(18px); }
#stage:has(#intro.reveal) #name, #stage:has(#intro.reveal) #comb, #stage:has(#intro.reveal) #hint, #stage:has(#intro.reveal) #arrow {
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s; }
#stage:has(#intro.reveal) #comb { transition-delay: 0.15s; }
#stage:has(#intro.reveal) #hint { transition-delay: 0.6s; }
#stage:has(#intro.reveal) #arrow { transition-delay: 1.2s; }
@media (prefers-reduced-motion: reduce) { #stage:has(#intro.hide-hud) #name, #stage:has(#intro.hide-hud) #comb, #stage:has(#intro.hide-hud) #hint { transform: none; } }
#introCap { position: absolute; left: 50%; bottom: 21%; width: min(640px, calc(100% - 48px)); transform: translateX(-50%);
  margin: 0; text-align: center; text-wrap: balance; pointer-events: none; opacity: 0;
  font: 700 26px/1.3 var(--body); letter-spacing: 0.3px; color: var(--cream);
  text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink),
    2px 2px var(--ink), -2px 2px var(--ink), 2px -2px var(--ink), -2px -2px var(--ink), 0 5px rgba(43, 34, 51, 0.35); }
@media (max-width: 560px) { #introCap { font-size: 20px; bottom: 19%; } }

/* The jar plug-in (src/plugins/jar). The core #score hides only while the jar's row is in the comb slot, so a
   page without the jar keeps it. */
.slot-comb:has(#jarRow) ~ #score { display: none; }
#comb #jarRow { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 12px; }
#comb #jarText { display: grid; grid-template-columns: auto; gap: 4px; justify-items: start; padding-bottom: 2px; font: 400 12px/1 var(--label); letter-spacing: 1px; }
#jarText .k { color: var(--muted); }
#jarText span:not(.k) { font: 700 16px/1 var(--num); letter-spacing: 0; }
#jarText .k + span + .k { margin-top: 6px; }
#jarHud { display: block; flex: none; width: 64px; height: 64px; image-rendering: pixelated; }
#jarHud.again { cursor: pointer; }
#jarEnd { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 16px; box-sizing: border-box; background: rgba(43, 34, 51, 0); transition: background-color 0.5s; touch-action: none; }
#jarEnd[hidden] { display: none; }
#jarEnd.dim { background: rgba(43, 34, 51, 0.8); }
#jarEnd .fade { opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s; }
#jarEnd.shown .fade { opacity: 1; visibility: visible; }
#jarWrap { position: relative; transform-origin: 0 0; cursor: grab; touch-action: none; }
#jarWrap.held { cursor: grabbing; }
#jarBig { display: block; image-rendering: pixelated; }
#jarLabel { position: absolute; box-sizing: border-box; background: var(--cream); color: var(--ink); border: 3px solid #c49a5a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 6px; }
#jarLabel b { font: 700 22px/1 var(--display); letter-spacing: 1px; }
#jarLabel .addr { font: 400 17px/1.2 var(--num); color: var(--line); user-select: text; -webkit-user-select: text; cursor: text; }
#jarLabel button { background: var(--ink); color: var(--cream); margin-top: 4px; }
#jarEnd.big #jarLabel b { font-size: 28px; }
#jarEnd.big #jarLabel .addr { font-size: 21px; }
#jarEnd p { margin: 0; font-size: 19px; line-height: 1.3; text-align: center; color: var(--cream); }
/* A short wide screen (a phone on its side): the words and the button go beside the jar. */
#jarEnd.row { display: grid; grid-template-columns: auto minmax(0, 300px); grid-template-rows: 1fr auto auto 1fr; justify-content: center; align-items: center; gap: 16px 32px; }
#jarEnd.row #jarWrap { grid-column: 1; grid-row: 1 / span 4; }
#jarEnd.row p { grid-column: 2; grid-row: 2; text-align: left; }
#jarEnd.row > button { grid-column: 2; grid-row: 3; justify-self: start; }
/* A narrow phone: a smaller jar, so the plate stays clear of the name. */
@media (max-width: 560px) { #jarHud { width: 48px; height: 48px; } #comb #jarRow { gap: 8px; } }
/* A phone on its side: the jar and its two numbers in one short row of the HUD strip. */
@media (min-width: 561px) and (max-height: 500px) {
  #jarHud { width: 48px; height: 48px; }
  #comb #jarRow { gap: 8px; align-items: center; }
  #comb #jarText { grid-template-columns: auto auto; gap: 7px 6px; align-items: baseline; padding-bottom: 0; }
  #jarText .k + span + .k { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { #jarEnd, #jarEnd .fade { transition: none; } }

/* The sound plug-in (src/plugins/sound). The button sits at the end of the comb slot: beside the jar's row when
   the jar is there (top-aligned), else on its own. */
.slot-comb:has(#sndBtn) { display: flex; align-items: flex-end; min-height: 24px; }
#sndBtn { width: 44px; height: 44px; min-height: 44px; padding: 0; margin: -13px -7px -4px auto; background: transparent; border: 0; display: grid; place-items: center; flex: none; color: var(--cream); }
#comb #sndBtn svg { width: 30px; height: 30px; display: block; border: 2px solid var(--cream); box-sizing: border-box; padding: 3px; shape-rendering: crispEdges; }
#sndBtn .on { display: none; } #sndBtn[aria-pressed="true"] .on { display: inline; } #sndBtn[aria-pressed="true"] .off { display: none; }
#comb #sndBtn[aria-pressed="true"] svg { border-color: var(--honey); }
#comb #jarRow + #sndBtn { margin: -7px -7px 0 auto; align-self: flex-start; }
/* A phone on its side: the button sits in the row beside the jar, centred in the HUD strip. */
@media (min-width: 561px) and (max-height: 500px) {
  .slot-comb:has(#sndBtn) { align-items: center; gap: 4px; }
  #comb #sndBtn, #comb #jarRow + #sndBtn { margin: 0 -6px 0 0; align-self: center; }
}
