@font-face {
  font-family: Pixelify;
  src: url('/fonts/pixelify-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Pixelify;
  src: url('/fonts/pixelify-bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
/* Jersey 15 for UI text and every number: Pixelify's 2/5/7 read as Z/S and its
   "fi" ligature reads as "A", so Pixelify is kept for headings only. */
@font-face {
  font-family: Jersey;
  src: url('/fonts/jersey15-regular.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
  size-adjust: 118%;
}
:root {
  --paper: #f5f3e9;
  --surface: #faf9f0;
  --ink: #294833;
  --forest: #315a40;
  --muted: #647156;
  --line: #d6ddc6;
  --pale: #eaf0dc;
  --gold: #bb9247;
  --red: #914b34;
  --pixel: Jersey, 'Trebuchet MS', sans-serif;
  --display: Pixelify, Jersey, 'Trebuchet MS', sans-serif;
  font-variant-ligatures: none;
  font-feature-settings: 'liga' 0, 'clig' 0;
  font-family: var(--pixel);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; }
.wordmark, h1, h2, .display { font-family: var(--display); font-variant-ligatures: none; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Original Aseprite icons, on the same two-pixel grid as the game art. */
svg:not(.icon-library) {
  --icon-size: 24px;
  --icon-index: 0;
  display: inline-block;
  width: var(--icon-size) !important;
  height: var(--icon-size) !important;
  flex-shrink: 0;
  background-image: url('/art/ui-icons.png');
  background-size: calc(var(--icon-size) * 12) var(--icon-size);
  background-position: calc(var(--icon-size) * var(--icon-index) * -1) 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  fill: none;
  stroke: none;
}
svg use { display: none; }
svg:has(use[href='#i-river']) { --icon-index: 0; }
svg:has(use[href='#i-sound']) { --icon-index: 1; }
svg:has(use[href='#i-muted']) { --icon-index: 2; }
svg:has(use[href='#i-help']) { --icon-index: 3; }
svg:has(use[href='#i-undo']) { --icon-index: 4; }
svg:has(use[href='#i-restart']) { --icon-index: 5; }
svg:has(use[href='#i-hint']) { --icon-index: 6; }
svg:has(use[href='#i-arrow']) { --icon-index: 7; }
svg:has(use[href='#i-close']) { --icon-index: 8; }
svg:has(use[href='#i-check']) { --icon-index: 9; }
svg:has(use[href='#i-boat']) { --icon-index: 10; }
svg:has(use[href='#i-expand']) { --icon-index: 11; }
.primary-button svg, .selected-check svg { background-image: url('/art/ui-icons-light.png'); }
.site-shell { max-width: 1280px; padding: env(safe-area-inset-top, 0px) max(40px, env(safe-area-inset-right, 0px)) max(32px, env(safe-area-inset-bottom, 0px)) max(40px, env(safe-area-inset-left, 0px)); margin: 0 auto; }
.site-header { height: 76px; display: flex; align-items: center; gap: 24px; border-bottom: 2px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--forest); font-size: 27px; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 8px 10px; background: transparent; font-size: 16px; }
.quiet-button:hover { background: #e8edda; }
.icon-only { width: 44px; padding: 8px; }
.intro { text-align: center; padding: 30px 0 28px; }
.intro h1 { font-size: 76px; line-height: 1; font-weight: 700; letter-spacing: -2px; margin: 0; color: #31553b; }
body.playing .intro { display: none; }
body.playing .game { margin-top: 24px; }
.game { border: 2px solid #c9d3b7; box-shadow: 0 5px 0 #e0e5d1; background: var(--surface); }
.scene-wrap { position: relative; width: 100%; height: clamp(360px, calc(100svh - 250px), 610px); isolation: isolate; background: #88a77b; overflow: hidden; }
body.playing .scene-wrap { height: clamp(300px, calc(100svh - 315px), 640px); }
#world { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.scene-hud { position: absolute; inset: 18px 18px auto; display: flex; justify-content: flex-end; align-items: flex-start; gap: 10px; pointer-events: none; }
.speed-toggle { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; min-width: 64px; padding: 8px 12px; border: 2px solid #e6eacb; background: #faf8e9ed; box-shadow: 3px 3px 0 #344b251c; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: #2f4227; }
.speed-toggle svg { width: 16px; height: 16px; fill: currentColor; shape-rendering: crispEdges; }
.speed-toggle:hover { background: #fffbe9; }
.speed-toggle[data-fast] { border-color: #e2c27a; background: #fff1c7f0; }
.crossing-count { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 2px solid #e6eacb; background: #faf8e9ed; box-shadow: 3px 3px 0 #344b251c; }
.crossing-count svg { --icon-size: 30px; }
.crossing-count strong { display: block; font-size: 31px; font-weight: 700; line-height: 1; }
.count-label { display: block; font-size: 14px; color: #596b46; }
.bank-label { position: absolute; bottom: 20px; display: flex; gap: 9px; align-items: center; pointer-events: none; font-size: 13px; color: #fff6d9; text-shadow: 1px 2px 0 #30482d; }
.bank-label.left { left: 22px; }
.bank-label.right { right: 22px; }
.flag { width: 2px; height: 16px; background: #f7e8c0; position: relative; }
.flag:after { content: ''; position: absolute; width: 8px; height: 6px; top: 0; left: 2px; background: #edc77f; clip-path: polygon(0 0,100% 0,75% 50%,100% 100%,0 100%); }
.welcome { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 38px; }
.welcome-panel { padding: 0; background: none; }
.welcome .primary-button { min-width: 170px; min-height: 56px; font-size: 21px; gap: 30px; }
.primary-button, .secondary-button, .passenger, .crossing-count, .rule-art, .modal {
  /* Stepped corners preserve the square-pixel visual language. */
  clip-path: polygon(0 6px,6px 6px,6px 0,calc(100% - 6px) 0,calc(100% - 6px) 6px,100% 6px,100% calc(100% - 6px),calc(100% - 6px) calc(100% - 6px),calc(100% - 6px) 100%,6px 100%,6px calc(100% - 6px),0 calc(100% - 6px));
}
.primary-button { display: inline-flex; gap: 18px; align-items: center; justify-content: center; min-height: 52px; background: #355d42; color: #fff5dc; border: 2px solid #25482f; box-shadow: inset 0 -3px 0 #25482f; padding: 12px 20px 15px; font-size: 17px; font-weight: 700; transition: background .12s, transform .12s; }
.primary-button:hover:not(:disabled) { background: #416e4d; transform: translateY(-1px); }
.primary-button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.primary-button:disabled { opacity: .65; cursor: default; }
.loading { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 12px; background: #e9eedb; color: #556842; font-size: 20px; }
.loading-wave { font-size: 40px; }
.play-panel { padding: 0 22px; }
.journey-message { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 12px 0; color: #5b6c4d; font-size: 16px; }
.journey-message p { margin: 0; line-height: 1.4; text-align: center; }
.message-dot { width: 4px; height: 4px; background: #84966b; flex-shrink: 0; }
.journey-message.error { color: var(--red); }
.journey-message.error .message-dot { background: var(--red); }
.journey-message.hint { color: #807134; }
.control-row { display: flex; align-items: stretch; gap: 22px; }
.passenger-group { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; flex: 1; min-width: 0; }
.passenger { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid #dbe1ce; box-shadow: inset 0 -2px 0 #dbe1ce; background: #f0f3e5; min-height: 70px; padding: 6px 10px 9px; min-width: 0; transition: background .12s; }
.passenger:hover:not(:disabled) { background: #e3ecd4; border-color: #91a779; }
.passenger.selected { border-color: #829c68; background: #e2ebd0; box-shadow: inset 0 -2px 0 #829c68; }
.passenger:disabled { opacity: .45; }
.passenger-name { font-size: 17px; }
.passenger kbd { display: none; }
.portrait { height: 48px; width: 48px; display: block; flex-shrink: 0; background-repeat: no-repeat; image-rendering: pixelated; }
.portrait.fox { background-image: url('/art/fox.png'); background-size: 384px 48px; }
.portrait.sheep { background-image: url('/art/sheep.png'); background-size: 384px 48px; }
.portrait.cabbage { background-image: url('/art/cabbage.png'); background-size: 384px 48px; }
.portrait.farmer { background-image: url('/art/farmer.png'); background-size: 576px 48px; }
.portrait.fox { background-image: url('/art/fox-icon.png'); background-size: 100% 100%; }
.portrait.sheep { background-image: url('/art/sheep-icon.png'); background-size: 100% 100%; }
.portrait.cabbage { background-image: url('/art/cabbage-icon.png'); background-size: 100% 100%; }
.portrait.farmer { background-image: url('/art/farmer-icon.png'); background-size: 100% 100%; }
.selected-check { position: absolute; right: 4px; top: 4px; background: #68864f; color: #fff; width: 16px; height: 16px; align-items: center; justify-content: center; display: none; }
.selected-check svg { --icon-size: 12px; }
.selected .selected-check { display: flex; }
.cross-button { min-width: 230px; justify-content: space-between; padding: 10px 20px 13px; gap: 18px; min-height: 70px; }
.cross-button > span { text-align: left; }
.cross-button #cross-label { font-size: 19px; }
.cross-button small { display: block; font-size: 14px; color: #d7e3c5; font-weight: 400; margin-top: 3px; }
.cross-button.returning svg { transform: rotate(180deg); }
.toolbar { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; border-top: 2px solid #e6eadb; min-height: 57px; }
.history-controls { display: flex; gap: 16px; }
.tool-button { display: inline-flex; align-items: center; gap: 8px; background: transparent; font-size: 16px; color: #586e46; padding: 8px 6px; min-height: 44px; }
.tool-button svg { --icon-size: 20px; }
.tool-button:hover:not(:disabled) { background: #e9efdc; }
.tool-button:disabled { opacity: .35; }
.hint-button { color: #756936; }
.scene-targets { position: absolute; inset: 0; pointer-events: none; }
.actor-target { position: absolute; background: transparent; pointer-events: auto; transform: translate(-50%,-100%); width: 64px; height: 76px; z-index: 1; }
.actor-target:hover:not(:disabled) { background: #f2e6ac25; }
.actor-target:focus-visible { outline: 2px dashed #fff4bb; outline-offset: 3px; }
.actor-target:disabled { pointer-events: none; }
.actor-target span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 15px; background: #faf4dcef; color: #43583a; min-width: 46px; padding: 3px 7px; opacity: 0; pointer-events: none; }
.actor-target:hover span, .actor-target:focus-visible span { opacity: 1; }
.actor-target.selected:after { content: ''; position: absolute; left: calc(50% - 4px); top: -6px; border-top: 6px solid #fff4b9; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.busy .actor-target { pointer-events: none; }
.busy .actor-target:after { display:none; }
.modal { border: 3px solid #70825a; padding: 34px; width: min(490px,calc(100vw - 32px)); background: #faf8ed; color: var(--ink); box-shadow: inset 0 0 0 3px #e0e6d0; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal::backdrop { background: #1f3e2c80; }
.modal .close-dialog.icon-only { position: absolute; right: 12px; top: 12px; }
.modal h2 { font-size: 36px; line-height: 1.1; margin: 10px 0 20px; font-weight: 700; }
.modal p { font-size: 17px; line-height: 1.45; color: #586c48; }
.rules { list-style: none; padding: 0; margin: 26px 0; }
.rules li { display: flex; align-items: center; gap: 16px; font-size: 16px; color: #5a6c4c; line-height: 1.4; margin: 22px 0; }
.rules strong { display: block; font-size: 18px; margin-bottom: 4px; color: #355037; font-weight: 700; }
.rule-art { display: flex; flex-shrink: 0; justify-content: center; align-items: center; width: 90px; min-height: 64px; background: #eaf0db; padding: 0 4px; }
.mini-sprite { display: inline-block; width: 42px; height: 42px; background-repeat: no-repeat; image-rendering: pixelated; background-size: 336px 42px; }
.mini-sprite.fox { background-image: url('/art/fox.png'); }
.mini-sprite.sheep { background-image: url('/art/sheep.png'); }
.mini-sprite.cabbage { background-image: url('/art/cabbage.png'); }
.help-reassurance { padding: 16px 0; border-top: 2px solid #dfe5d0; border-bottom: 2px solid #dfe5d0; }
.keyboard-note { font-size: 15px; margin-top: 20px; }
.keyboard-note > span { font-weight: 700; }
.keyboard-note p { font-size: 14px; margin: 8px 0 0; line-height: 1.8; }
.kbd, kbd { font-family: var(--pixel); font-size: 14px; border: 1px solid #c9d3b7; background: #eef2e3; padding: 2px 4px; color: #50643e; white-space: nowrap; }
.motion-setting { display: flex; align-items: center; justify-content: space-between; font-size: 17px; margin: 24px 0; gap: 15px; }
.motion-setting small { font-size: 14px; display: block; color: #687758; margin-top: 4px; }
.motion-setting input { appearance: none; width: 42px; height: 24px; flex-shrink: 0; border: 2px solid #80936b; background: #dce4cc; cursor: pointer; position: relative; }
.motion-setting input:after { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #778c62; }
.motion-setting input:checked { background: #55754a; border-color: #3f5c37; }
.motion-setting input:checked:after { left: 21px; background: #edf1da; }
.help-modal > .primary-button { width: 100%; }
.secondary-button { background: #e9efda; border: 2px solid #a9ba91; box-shadow: inset 0 -2px 0 #b8c6a1; padding: 12px 19px; font-size: 17px; min-height: 52px; }
.secondary-button:hover { background: #dce7c9; }
.dialog-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; }
.restart-modal { width: min(450px,calc(100vw - 32px)); }
.victory-modal { text-align: center; }
.victory-icon { display: inline-flex; justify-content: center; align-items: center; width: 64px; height: 64px; background: #e5eccf; margin: 12px 0; }
.victory-icon svg { --icon-size: 42px; }
.victory-modal h2 { font-size: 37px; }
.victory-stat { margin: 24px auto 18px; display: flex; align-items: center; justify-content: center; gap: 15px; border-top: 2px solid #dfe5d0; border-bottom: 2px solid #dfe5d0; padding: 16px; }
.victory-stat strong { font-size: 48px; font-weight: 700; color: #5b7946; }
.victory-stat span { font-size: 19px; color: #62764d; }
.perfect-note { font-size: 17px !important; }
.victory-modal .primary-button { width: 100%; margin-top: 12px; }
.text-button { background: none; font-size: 16px; color: #576d45; padding: 18px 10px 2px; }
.text-button:hover { text-decoration: underline; }
.scene-wrap.reject { animation: nudge .3s ease-in-out; }
@keyframes nudge { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.primary-button:focus-visible, .secondary-button:focus-visible, .passenger:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--gold);
}
/* Campaign menus share the scene's square pixel language. */
.pixel-gear { display:block; width:20px; height:20px; background:currentColor; clip-path:polygon(35% 0,65% 0,65% 15%,80% 15%,80% 30%,100% 30%,100% 65%,80% 65%,80% 80%,65% 80%,65% 100%,35% 100%,35% 80%,20% 80%,20% 65%,0 65%,0 30%,20% 30%,20% 15%,35% 15%); position:relative; }
.pixel-gear:after { content:''; position:absolute; inset:7px; background:var(--paper); }
.level-bar { min-height:58px; display:flex; gap:18px; align-items:center; justify-content:space-between; padding:10px 22px; border-bottom:2px solid var(--line); }
.level-heading { display:flex; align-items:center; gap:16px; min-width:0; }
.level-heading > span { color:#70815a; font-size:15px; white-space:nowrap; }
.level-heading h2 { font-size:24px; font-weight:700; margin:0; line-height:1.2; }
#campaign-progress { font-size:15px; color:var(--muted); white-space:nowrap; }
body.playing .scene-wrap { height:clamp(280px,calc(100svh - 370px),600px); }
.passenger-group { grid-template-columns:repeat(var(--passenger-count,4),minmax(0,1fr)); }
.passenger-group:has(.person) .passenger { flex-direction:column; gap:0; padding:2px 4px 8px; }
.passenger-group:has(.person) .passenger-name { font-size:16px; }
.portrait.person { background-image:url('/art/person-icon.png'); background-size:100% 100%; border-bottom:3px solid #568986; }
.portrait.person-1 { border-color:#bc7047; }.portrait.person-2 { border-color:#8a7498; }.portrait.person-3 { border-color:#a8923f; }.portrait.person-4 { border-color:#6d8c49; }.portrait.person-5 { border-color:#4d82a6; }
.actor-target[data-kind='person'] span { opacity:1; font-size:14px; bottom:-18px; min-width:0; padding:1px 5px; background:#faf4dcee; line-height:1.1; }
.actor-target[data-kind='person']:disabled span { display:block; }
.welcome-panel { display:flex; align-items:center; flex-direction:column; gap:12px; }
.example-button { color:#fff5dc; background:#294833e8; padding:9px 15px; border:2px solid #8d9b69; font-size:16px; min-height:44px; }
.example-button:hover { background:#3f674a; }
#example { font-size:15px; }
.campaign-modal { width:min(680px,calc(100vw - 32px)); }
.campaign-tabs { display:flex; gap:8px; border-bottom:2px solid var(--line); padding-bottom:12px; margin-bottom:18px; }
.campaign-tabs button { background:#e9eedb; border:2px solid #d0d9bf; min-height:44px; padding:9px 14px; font-size:17px; }
.campaign-tabs button.active { background:#355d42; border-color:#294833; color:#fff5dc; }
.campaign-tabs button span { font-size:14px; margin-left:6px; }
.level-list { display:grid; gap:9px; }
.level-choice { display:flex; align-items:center; gap:16px; padding:13px 15px; background:#edf1e0; border:2px solid #d3ddc3; text-align:left; min-height:70px; }
.level-choice:hover:not(:disabled) { background:#e1ebd0; border-color:#90a975; }
.level-choice.current { border-color:#698b57; }
.level-choice:disabled { opacity:.52; }
.level-choice-number { font-size:25px; font-weight:700; color:#688153; width:31px; flex-shrink:0; }
.level-choice strong,.achievement-item strong { display:block; font-size:19px; font-weight:700; }
.level-choice small,.achievement-item small { display:block; font-size:15px; color:#687958; line-height:1.4; margin-top:3px; }
.level-choice-status { margin-left:auto; font-size:23px; color:#5f7c46; }
.level-choice.complete .level-choice-number { color:#9b762e; }
.achievement-list { display:grid; gap:12px; }
.achievement-item { display:flex; align-items:center; gap:14px; background:#edf0e4; padding:15px; border:2px solid #d6dec8; }
.achievement-item.earned { background:#edf0d4; border-color:#b7bf7d; }
.achievement-symbol { display:flex; align-items:center; justify-content:center; width:44px; height:44px; background:#dce5ca; flex-shrink:0; }
.achievement-state { margin-left:auto; font-size:14px; color:#788267; }
.earned .achievement-state { color:#6c7b38; }
.save-note { font-size:15px !important; color:#7a846b !important; line-height:1.5; margin:22px 0 0; }
.settings-modal > .primary-button { width:100%; margin-top:22px; }
.volume-setting { display:grid; grid-template-columns:1fr auto; font-size:17px; gap:12px; padding-bottom:15px; border-bottom:2px solid var(--line); }
.volume-setting output { font-size:15px; color:#71825d; }
.volume-setting input { grid-column:1/-1; width:100%; height:32px; accent-color:#5c7d46; cursor:pointer; }
.victory-modal .secondary-button { width:100%; margin-top:10px; }
.victory-award { background:#edf0d4; padding:10px; border:2px solid #d6d9a7; font-size:16px !important; }
.achievement-toast { position:fixed; z-index:20; bottom:max(24px,env(safe-area-inset-bottom,0px)); left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:13px; background:#fff6d9; color:#365237; border:3px solid #8a9c65; box-shadow:4px 4px 0 #29483340; padding:13px 16px; width:max-content; max-width:calc(100vw - 32px); }
.achievement-toast small,.achievement-toast strong { display:block; }.achievement-toast small { font-size:14px; margin-bottom:4px; color:#7c804f; }.achievement-toast strong { font-size:18px; }
.achievement-toast button { background:none; font-size:25px; padding:4px; min-width:34px; min-height:40px; }



/* --- In-scene rules, coach and level card ------------------------------- */
.rule-strip { position: absolute; top: 18px; left: 18px; z-index: 3; display: flex; flex-wrap: nowrap; overflow: hidden; gap: 4px 12px; align-items: center; max-width: 52%; padding: 5px 9px; border: 2px solid #e6eacb; background: #faf8e9f2; box-shadow: 3px 3px 0 #344b251c; color: #2f4227; text-align: left; }
.rule-strip:hover { background: #fffdf0; }
.rule-row { display: inline-flex; align-items: center; gap: 4px; }
.faces { display: inline-flex; align-items: flex-end; gap: 1px; }
.faces img { width: 28px; height: 28px; image-rendering: pixelated; display: block; }
.faces small { font-size: 15px; color: #5b6c4d; margin-left: 2px; }
.rule-mark { font-weight: 400; font-size: 20px; line-height: 1; color: var(--red); padding: 0 1px; }
.rule-row.needs .rule-mark { color: #b35d6b; }
.rule-row.load .rule-mark, .rule-row.capacity .rule-mark { color: #5b6c4d; }
.rule-guard { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding-left: 7px; border-left: 2px solid #dfe4c8; }
.rule-guard .rule-mark { font-size: 14px; color: #4d7348; text-transform: uppercase; letter-spacing: .5px; }
.rule-guard .faces img { width: 26px; height: 26px; }
.rule-number { font-size: 22px; line-height: 1; }
.seat-icon { width: 22px; height: 12px; border: 3px solid #8a6538; border-top: 0; display: inline-block; }
.coach { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 3; width: max-content; max-width: min(56%, 560px); min-height: 0; display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border: 2px solid #e6eacb; background: #fffbeaf5; box-shadow: 3px 3px 0 #344b251c; color: #2f4227; font-size: 19px; pointer-events: none; }
.coach p { margin: 0; line-height: 1.15; text-align: left; }
.coach-face { width: 34px; height: 34px; image-rendering: pixelated; flex-shrink: 0; }
.coach-face:not([src]), .coach-face[src=''] { display: none; }
.coach.error { border-color: #d2977c; background: #fff1e8f7; color: var(--red); animation: coach-nudge .32s steps(4); }
.coach.hint { border-color: #dcc77d; background: #fff8d8f7; color: #6d5a1e; }
@keyframes coach-nudge { 25% { transform: translateX(calc(-50% - 4px)); } 75% { transform: translateX(calc(-50% + 4px)); } }
.level-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(540px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 20px 24px 22px; background: var(--surface); border: 3px solid #355d42; box-shadow: 6px 6px 0 #1f3b2850; }
.card-chapter { display: block; font-size: 16px; color: #6c7d55; letter-spacing: .5px; text-transform: uppercase; }
.level-card h2 { margin: 2px 0 6px; font-size: 30px; line-height: 1.1; color: var(--ink); }
.card-goal { margin: 0 0 12px; font-size: 19px; line-height: 1.25; color: #42553a; }
.card-rules { list-style: none; margin: 0 0 16px; padding: 0; }
.card-rules li { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-top: 2px dashed #dfe4c8; }
.card-rules li p { margin: 0; font-size: 18px; line-height: 1.2; }
.card-rules .rule-row { flex-shrink: 0; min-width: 132px; }
.card-rules .faces img { width: 36px; height: 36px; }
#card-go { width: 100%; }
body.card-open .scene-wrap::after { content: ''; position: absolute; inset: 0; z-index: 5; background: #17301f59; }
body.card-open .scene-targets { pointer-events: none; }
.portrait.drawn { background-size: contain !important; background-position: center bottom; }
.cross-button.queued { background: #6f6a2e; border-color: #4f4a1d; box-shadow: inset 0 -3px 0 #4f4a1d; }

.rule-strip .rule-guard .rule-mark { font-size: 18px; text-transform: none; }
.rule-strip .rule-guard { margin-left: 2px; padding-left: 5px; }
.rule-strip .rule-row:not(:first-child) { padding-left: 10px; border-left: 2px solid #e3e7cf; }
.portrait.drawn { border-bottom: 0 !important; }

.coach { transition: opacity .35s steps(3), visibility 0s; }
.coach.resting { opacity: 0; visibility: hidden; transition: opacity .35s steps(3), visibility 0s .35s; }

/* Heavy boat: weights on the passenger buttons and in the load rule. */
.weight-tag { position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px; padding: 0 4px; display: grid; place-items: center; font: 400 17px/1 var(--pixel); color: #fff; background: #5a6a7e; box-shadow: 0 2px 0 #3c4858; }
.weight-chip { display: inline-flex; align-items: center; gap: 1px; }
.weight-chip small { font: 400 15px/1 var(--pixel); color: inherit; }
/* More rules than fit: fade the edge so it reads as "tap for the rest". */
.rule-strip.overflowing { -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
/* Top HUD: what the boat can take, and a button for the rules. */
.rule-strip { gap: 0; padding: 4px 4px; height: 50px; }
.hud-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; white-space: nowrap; }
.hud-chip + .hud-chip { border-left: 2px solid #e3e7cf; }
.hud-chip b { font: 400 24px/1 var(--pixel); font-weight: 400; }
.hud-chip small { font: 400 15px/1 var(--pixel); color: #66755a; }
.hud-chip .weight-icon { width: 18px; height: 18px; fill: #5a6a7e; }
.hud-chip .menu-icon { width: 18px; height: 15px; fill: currentColor; }
.hud-chip.rules { color: #2f6b3f; background: #eef3dc; margin-left: 4px; border: 2px solid #cfdcb3; }
.hud-chip.rules + .hud-chip, .hud-chip + .hud-chip.rules { border-left-width: 2px; }
.hud-chip.rules .count { min-width: 20px; height: 20px; display: grid; place-items: center; background: #2f6b3f; color: #fff; font-size: 15px; }
.rule-strip:hover .hud-chip.rules { background: #e3edc8; }
.rule-strip.overflowing { -webkit-mask-image: none; mask-image: none; }

/* Tap to skip: a small fast-forward badge while the crossing hurries. */
.scene-wrap.skipping::after { content: '>>'; position: absolute; top: 50%; left: 50%; z-index: 4; transform: translate(-50%, -50%); padding: 6px 14px; border: 2px solid #e6eacb; background: #faf8e9e6; color: #2f4227; font: 400 28px/1 var(--pixel); letter-spacing: -2px; pointer-events: none; }

/* --- Stars and the perfect-crossing moment -------------------------------- */
svg.pixel-star { display: inline-block; width: 1em; height: 1em; flex: none; shape-rendering: crispEdges; }
.pixel-star .fill { fill: #f2c54b; } .pixel-star .shine { fill: #fff3b8; } .pixel-star .edge { fill: #8a5a1c; }
.pixel-star.empty .fill, .pixel-star.empty .shine { fill: #dfe2cc; } .pixel-star.empty .edge { fill: #b9bea2; }
.victory-stars { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 8px 0 4px; font-size: 54px; line-height: 1; }
.victory-stars .pixel-star:nth-child(2) { font-size: 70px; }
.victory-stars .pixel-star { opacity: 0; transform: scale(.2) rotate(-25deg); }
.victory-stars.show .pixel-star { animation: star-pop .45s cubic-bezier(.2,1.6,.4,1) forwards; }
.victory-stars.show .pixel-star:nth-child(2) { animation-delay: .35s; } .victory-stars.show .pixel-star:nth-child(3) { animation-delay: .7s; }
.victory-stars.perfect .pixel-star:not(.empty) { filter: drop-shadow(0 0 6px #ffe38a); }
@keyframes star-pop { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 70% { opacity: 1; transform: scale(1.25) rotate(6deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.victory-badge { display: inline-block; margin: 6px 0 0; padding: 5px 14px; background: #2f6b3f; color: #fff6c9; font: 400 20px/1 var(--pixel); letter-spacing: 1px; text-transform: uppercase; box-shadow: 3px 3px 0 #1e3f27; }
.victory-badge.gold { background: linear-gradient(90deg,#c48a22,#f2c54b 45%,#fff0a8 50%,#f2c54b 55%,#c48a22); background-size: 250% 100%; color: #4a2f08; box-shadow: 3px 3px 0 #8a5a1c; animation: shine 1.6s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.victory-modal.perfect { border-color: #e2b84a; box-shadow: 0 0 0 4px #fff3c4, 0 0 40px #f2c54b88; }
.perfect-banner { position: absolute; left: 50%; top: 38%; z-index: 6; display: grid; justify-items: center; gap: 4px; padding: 14px 34px 12px; transform: translate(-50%,-50%); background: #fff8dc; border: 4px solid #c48a22; box-shadow: 0 0 0 4px #fff3c4, 6px 6px 0 #4a2f0866, 0 0 60px #ffe38acc; color: #5a3a0c; pointer-events: none; text-align: center; animation: stamp 2.6s cubic-bezier(.2,1.4,.4,1) forwards; }
.perfect-banner strong { font: 400 46px/1 var(--pixel); letter-spacing: 1px; color: #a8661a; text-shadow: 2px 2px 0 #f7dc8a; }
.perfect-banner small { font: 400 19px/1 var(--pixel); color: #7a5a22; }
.perfect-banner .perfect-stars { font-size: 34px; display: flex; gap: 6px; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%,-50%) scale(2.6) rotate(-8deg); } 14% { opacity: 1; transform: translate(-50%,-50%) scale(.92) rotate(2deg); } 20% { transform: translate(-50%,-50%) scale(1.04) rotate(-1deg); } 26%,82% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0); } 100% { opacity: 0; transform: translate(-50%,-62%) scale(.96); } }
.achievement-toast.gold { background: #fff3c4; border-color: #c48a22; box-shadow: 4px 4px 0 #8a5a1c66, 0 0 30px #f2c54b99; animation: toast-in .5s cubic-bezier(.2,1.5,.4,1); }
.achievement-toast.gold small { color: #a8661a; }
@keyframes toast-in { from { transform: translate(-50%, 140%) scale(.8); } to { transform: translateX(-50%) scale(1); } }
.level-stars { display: inline-flex; gap: 2px; font-size: 15px; vertical-align: -2px; margin-left: 6px; }
/* Hand-drawn SVGs opt out of the icon sprite sheet. */
svg.pixel-star:not(.icon-library) { --icon-size: 1em; background: none; }
svg.weight-icon:not(.icon-library) { --icon-size: 18px; background: none; }
svg.menu-icon:not(.icon-library) { --icon-size: 18px; height: 15px !important; background: none; }

/* --- Clear selection: chosen riders are "in the boat" ---------------------- */
.passenger.selected { background: #2f6b3f; border-color: #1e4a2b; color: #fffbe6; box-shadow: inset 0 -4px 0 #1e4a2b, 0 0 0 3px #f2c54b; transform: translateY(-3px); }
.passenger.selected:hover:not(:disabled) { background: #377a49; border-color: #1e4a2b; }
.passenger.selected .portrait { animation: hop-in .35s cubic-bezier(.2,1.6,.4,1); }
.passenger.selected:not([data-passenger="alone"])::after { content: 'In boat'; position: absolute; top: 4px; left: 4px; padding: 2px 7px; background: #f2c54b; color: #4a2f08; font: 400 13px/1 var(--pixel); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; box-shadow: 2px 2px 0 #8a5a1c; }
.passenger.selected .selected-check { background: #f2c54b; }
@keyframes hop-in { 0% { transform: translateY(0); } 45% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
/* A bobbing gold marker over each chosen traveller in the scene. */
.actor-target.selected:after { left: calc(50% - 7px); top: -16px; border-top: 10px solid #f2c54b; border-left: 7px solid transparent; border-right: 7px solid transparent; filter: drop-shadow(0 2px 0 #8a5a1c); animation: marker-bob 1s ease-in-out infinite; }
@keyframes marker-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Journey worlds use the existing paper, pixel type and button language. */
.journey-world{border-left:4px solid var(--world-color);padding:4px 0 8px 12px;min-width:0}
.journey-world h3{margin:0;font-size:1.35rem}.journey-world p{margin:4px 0 10px;font-size:.9rem}.journey-world .world-intro{opacity:.8}
.journey-world.locked h3{opacity:.65}.world-levels{display:grid;gap:8px}.level-list{display:grid;gap:22px}
.world-unlocked,.world-celebration{border-top:3px solid var(--world-color);padding:12px 0;margin-top:16px}.world-unlocked h3,.world-celebration h3{margin:4px 0;font-size:1.45rem}.world-unlocked p,.world-celebration p{margin:6px 0}.world-unlocked small{font-weight:700}
.bonus-progress{margin:14px 0}.bonus-progress progress{display:block;width:100%;accent-color:var(--green,#355d42);height:16px}

/* Native kit port: Theme.gd, PixelBox.gd and HudLayout.gd (2 px UI grid). */
@font-face { font-family:Fredoka; src:url('/src/fonts/Fredoka-Variable.ttf') format('truetype'); font-weight:300 700; font-display:swap; }
@font-face { font-family:'Jersey 15'; src:url('/src/fonts/Jersey15-Regular.ttf') format('truetype'); font-weight:400; font-display:swap; }
:root { --pixel:Fredoka,sans-serif; --display:'Jersey 15',sans-serif; --paper:#f3e3bd; --surface:#f3e3bd; --ink:#343c3b; --muted:#785844; --line:#dfcfac; --gold:#efc977; --red:#9b4839; --forest:#3d7350; font-family:var(--pixel); font-weight:600; background:#4f3122; }
body { overflow:hidden; min-width:800px; }
h1,h2,.wordmark { font-family:var(--display); font-weight:400; }
.site-shell { max-width:none; padding:0; margin:0; }
.game,body.playing .game { position:relative; margin:0; border:0; box-shadow:none; background:none; }
.scene-wrap,body.playing .scene-wrap,body:not(.playing) .scene-wrap { height:100dvh; width:100%; }
.intro { position:fixed; z-index:2; top:14%; left:0; right:0; pointer-events:none; }
.intro h1 { font-size:96px; color:#efc977; text-shadow:4px 4px #2b1d16; }
svg:not(.icon-library) { width:32px!important; height:32px!important; background:none; fill:currentColor; stroke:none; shape-rendering:crispEdges; }
svg use { display:inline; }
/* Brass corner pixels over the same 14 px horizontal plank repeat as PixelBox. */
.wood-button,.quiet-button,.tool-button,.secondary-button,.speed-toggle,.level-bar,.cross-button,.example-button,.campaign-tabs button {
 color:#fff5dc; border:2px solid #2b1d16; border-radius:0; min-height:52px; background-color:#7d5236;
 background-image:linear-gradient(#ffe5a1,#efc977),linear-gradient(#ffe5a1,#efc977),linear-gradient(#ffe5a1,#efc977),linear-gradient(#ffe5a1,#efc977),repeating-linear-gradient(to bottom,#7d5236 0 10px,#6e4630 10px 12px,#4f3122 12px 14px);
 background-size:4px 4px,4px 4px,4px 4px,4px 4px,100% 100%; background-position:4px 4px,calc(100% - 4px) 4px,4px calc(100% - 4px),calc(100% - 4px) calc(100% - 4px),0 0; background-repeat:no-repeat;
 box-shadow:inset 0 2px #a4734b,inset 0 -2px #4a2e20,0 2px #2b1d168c; padding:8px 14px;
}
button:hover:not(:disabled):not(.actor-target) { filter:brightness(1.08); }
button:active:not(:disabled):not(.actor-target) { translate:0 2px; }
button:disabled { filter:grayscale(.85) brightness(.8); opacity:1; }
button:focus-visible,a:focus-visible,input:focus-visible { outline:3px solid #efc977!important; outline-offset:3px; }
#menu-toggle { position:fixed; top:8px; left:8px; width:52px; height:52px; padding:8px; z-index:4; }
.level-bar { position:absolute; z-index:4; left:68px; top:8px; width:clamp(220px,36vw,320px); height:52px; padding:5px 12px 5px 54px; display:block; text-align:left; }
.level-heading { display:block; }
.level-heading>span { position:absolute; left:10px; top:9px; width:34px; height:32px; display:grid; place-content:center; overflow:hidden; background:#efc977; color:#514341; border:2px solid #ce9a58; font:700 22px Fredoka; }
.level-heading h2 { font:400 23px/1 var(--display); color:#fff5dc; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.plaque-count { display:block; color:#efc977; font-size:13px; line-height:1.4; }
.count-label { display:inline; font-size:inherit; color:inherit; }
#undo,#hint { position:absolute; z-index:4; top:8px; width:52px; height:52px; padding:8px; display:grid; place-content:center; }
#undo { right:68px; } #hint { right:8px; }
.play-panel,.control-row,.toolbar,.history-controls { display:contents; }
#cross { position:absolute; z-index:4; right:8px; bottom:8px; width:136px; min-width:136px; height:54px; min-height:54px; display:flex; flex-direction:row-reverse; justify-content:center; gap:8px; padding:8px; }
#cross-label { font:400 34px/1 var(--display); } #cargo-label { display:none; }
#cross svg { width:52px!important; height:24px!important; transform:none; }
.bank-label { display:none!important; }
.scene-hud { display:none; }
.coach,.coach.error,.coach.hint { top:76px; bottom:auto; max-width:400px; font-size:16px; background:#f3e3bd; border:2px solid #785844; box-shadow:2px 2px #2b1d1659; color:var(--ink); }
.modal,.level-card { background-color:#f3e3bd; background-image:radial-gradient(circle at 2px 2px,#dfcfac 1px,transparent 1.5px); background-size:37px 31px; color:var(--ink); border:2px solid #785844; box-shadow:inset 0 0 0 3px #dfcfac,4px 4px #2b1d1659; padding:28px; }
.modal::backdrop { background:#120f0d80; }
.level-card { width:min(760px,calc(100% - 80px)); max-height:calc(100% - 168px); overflow:auto; padding:26px 30px; border-top:16px ridge #7d5236; border-bottom:16px ridge #7d5236; }
#card-close { position:absolute; right:16px; top:14px; }
.card-chapter { text-align:center; color:#785844; font-size:15px; margin:0 56px; }
.level-card h2 { text-align:center; font-size:46px; color:#514341; margin:4px 54px 8px; }
.card-goal { text-align:center; color:var(--ink); font-size:20px; margin-bottom:20px; }
.card-rules { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.card-rules li { display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:12px; background:#ead7aa; border:2px solid #dfcfac; box-shadow:inset 0 2px #c9b88e; }
.card-rules li p { font-size:16px; line-height:1.35; }
.card-rules .faces img { width:44px; height:44px; }
.primary-button { background:#3d7350; border:2px solid #1f3b30; box-shadow:inset 0 2px #609355,inset 0 -2px #254f43,0 2px #2b1d168c; color:#fff5dc; font:400 30px var(--display); min-height:52px; }
.primary-button:hover { background:#3d7350; }
#card-go { width:210px; margin-left:auto; display:flex; }
body.card-open .scene-wrap::after { background:#120f0d80; }
.modal h2 { color:#514341; font-size:42px; padding-right:30px; }
.modal p,.rules li,.motion-setting small,.save-note { color:#785844!important; }
.victory-modal.perfect { border-color:#785844; box-shadow:inset 0 0 0 3px #dfcfac,4px 4px #2b1d1659; }
.campaign-modal { width:min(1000px,calc(100vw - 80px)); }
.level-choice,.level-choice:hover:not(:disabled),.achievement-item,.achievement-item.earned { background:#ead7aa; border:2px solid #dfcfac; color:var(--ink); box-shadow:inset 0 2px #c9b88e; }
.level-choice.current { border-color:#785844; }
.level-choice-number,.level-choice.complete .level-choice-number { color:#514341; background:#efc977; text-align:center; }
.level-choice small,.achievement-item small { color:#785844; }
.journey-world h3 { font-family:var(--display); font-size:30px; font-weight:400; }
.campaign-tabs button.active { color:#514341; background:#efc977; border-color:#ce9a58; }
.victory-stat { border-color:#dfcfac; }.victory-stat strong,.victory-stat span { color:#514341; }
#menu-dialog { position:fixed; inset:0 auto 0 0; margin:0; width:300px; height:100dvh; max-height:none; max-width:none; padding:12px 14px; border:0; border-right:4px solid #2b1d16; color:#fff5dc; background:repeating-linear-gradient(#6e4630 0 18px,#5e3b28 18px 20px,#432a1d 20px 22px); box-shadow:8px 0 #120f0d59; overflow:auto; }
#menu-dialog::backdrop { background:#120f0d80; }
.site-header { height:auto; border:0; display:block; }
#menu-title { font-size:34px; color:#efc977; margin:0 0 14px; text-shadow:2px 2px #2b1d16; }
.site-header>.close-dialog { position:absolute; top:8px; right:8px; width:48px; height:48px; min-height:48px; }
.header-actions { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin:0; }
.header-actions>button { justify-content:flex-start; width:100%; font-size:18px; }
#speed { display:flex; align-items:center; gap:12px; }
#speed::before { content:'Speed'; }
#speed svg { display:none; }
#rule-strip { position:static; max-width:none; height:auto; display:flex; background:#4f3122; border:2px solid #2b1d16; color:#fff5dc; }
.hud-chip { padding:4px; }.hud-chip small { color:#dfcfac; }.hud-chip.rules { background:none; border:0; color:#fff5dc; }.hud-chip.rules .count { background:#efc977; color:#514341; }
#passengers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:10px; }
#passengers::before { content:'Passengers'; grid-column:1/-1; color:#efc977; }
.passenger,.passenger:hover:not(:disabled) { background:#ead7aa; border:2px solid #785844; color:#343c3b; min-height:76px; flex-direction:column; padding:4px; }
.passenger.selected,.passenger.selected:hover:not(:disabled) { background:#3d7350; color:#fff5dc; border-color:#efc977; transform:none; box-shadow:none; }
.passenger.selected:not([data-passenger='alone'])::after { display:none; }
.passenger-name { font-size:15px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
/* Existing scene effects are unchanged. New chrome has only hover/press states. */
.cross-button #cross-label { font:400 34px/1 var(--display); }
#cross small { display:none; }
.tool-button:disabled { opacity:1; }
body.card-open .coach { visibility:hidden; }
#cross { color:#fff5dc; border:2px solid #2b1d16; background-color:#7d5236; background-image:linear-gradient(#ffe5a1,#efc977),linear-gradient(#ffe5a1,#efc977),linear-gradient(#ffe5a1,#efc977),linear-gradient(#ffe5a1,#efc977),repeating-linear-gradient(to bottom,#7d5236 0 10px,#6e4630 10px 12px,#4f3122 12px 14px); background-size:4px 4px,4px 4px,4px 4px,4px 4px,100% 100%; background-position:4px 4px,calc(100% - 4px) 4px,4px calc(100% - 4px),calc(100% - 4px) calc(100% - 4px),0 0; background-repeat:no-repeat; box-shadow:inset 0 2px #a4734b,inset 0 -2px #4a2e20,0 2px #2b1d168c; }
#speed-control { display:flex; align-items:center; gap:10px; }
#speed { min-width:0; width:100%; min-height:32px; accent-color:#efc977; }
#speed::before { content:none; }
#speed-value { color:#efc977; white-space:nowrap; }
#rule-strip { min-height:48px; padding:6px; }
#reference-controls { margin-top:8px; color:#efc977; }
#reference-controls summary { padding:10px 0; cursor:pointer; }
.world-levels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.world-levels .level-choice { min-width:0; }
.world-levels .level-choice strong { font-size:17px; }
.victory-award,.achievement-symbol,kbd { background:#ead7aa; border-color:#dfcfac; color:#514341; }
#bonus-meter { appearance:none; height:14px; background:#4f3122; border:2px solid #2b1d16; }
#bonus-meter::-webkit-progress-bar { background:#4f3122; }
#bonus-meter::-webkit-progress-value { background:#efc977; }
.header-actions { display:grid; grid-template-columns:1fr 1fr; }
.header-actions>*,#reference-controls { grid-column:1/-1; }
.header-actions>#restart,.header-actions>#help,.header-actions>#settings,.header-actions>#example { grid-column:auto; font-size:16px; padding:8px; gap:5px; }
#help { grid-column:2; grid-row:2; } #restart { grid-column:1; grid-row:2; }
#rule-strip { height:52px; max-height:52px; }
#speed { appearance:none; height:8px; min-height:8px; border:2px solid #2b1d16; background:#4f3122; }
#speed::-webkit-slider-thumb { appearance:none; width:14px; height:28px; border:2px solid #2b1d16; background:#efc977; box-shadow:inset 2px 2px #ffe5a1,inset -2px -2px #ce9a58; }
.header-actions>#restart { grid-column:1; grid-row:2; }
.header-actions>#help { grid-column:2; grid-row:2; }
.card-rules .rule-row { flex-wrap:wrap; min-width:0; max-width:100%; }
.queued #cross-label { font-size:24px; }
