/*
 * Pirate look (decision 73): palette, wood and parchment panels, plaque, buttons, wordmark, forms.
 * Source: design/ui-v1-pixel/palette.html and hafen.html. Reused by every web screen (p1-09, p1-10).
 * Pixel font Jersey 10 only in 20 px and 30 px, running text in Alegreya (self-hosted, @font-face below, preloaded in the layout head, p2-77).
 * Page classes: body.pirate; blocks: .panel (+ .plaque), .btn, .logo, .field, .flash, .stack, .center-page.
 */
:root {
  --ink0:#16121a;
  --ink1:#2a2129;
  --deep:#141f2c;
  --sea0:#1b2a38;
  --sea1:#22384a;
  --sea2:#2b4a5b;
  --sea3:#366070;
  --sea4:#4b7b83;
  --foam:#c9d8c6;
  --sand0:#6e4b34;
  --sand1:#9a7150;
  --sand2:#c29a6a;
  --sand3:#e1c58f;
  --grass1:#405129;
  --grass2:#5a6b33;
  --grass3:#7d8a45;
  --grass4:#a6a65e;
  --leaf0:#23331f;
  --leaf1:#34492a;
  --leaf2:#4f6935;
  --leaf3:#74894a;
  --rock1:#4b4447;
  --rock2:#6c6463;
  --rock3:#908680;
  --rock4:#bcb0a2;
  --wood0:#3b241a;
  --wood1:#5a3721;
  --wood2:#7c4e2c;
  --wood3:#a06c3c;
  --wood4:#c49258;
  --roof0:#4e2423;
  --roof1:#73332b;
  --roof2:#9a4a37;
  --roof3:#c06e4c;
  --wall1:#a8957a;
  --wall2:#d3be98;
  --glow0:#d47f2c;
  --glow1:#efb24f;
  --glow2:#f8dc92;
  --gold0:#8a5f1c;
  --gold1:#c9902e;
  --gold2:#ecc35a;
  --red1:#a3342f;
  --red2:#d0573f;
  --mar0:#2e3159;
  --mar1:#4c5089;
  --mar2:#8488bd;
  --parch:#ecdcb7;
  --parch2:#fff3d6;
  --leaf:#3f6b3a;
  
  --font-pixel: 'Jersey 10', 'Jersey 10 Fallback', 'Courier New', monospace;
  --font-text: 'Alegreya', Georgia, serif;
}

/* Self-hosted fonts (decision 125, p2-77; origin and licence: app/assets/fonts/README.md). Both are preloaded in the layout head, so
   they are there within the block period of font-display=optional and the stand-in below is only the fallback (slow network,
   failed load). Latin subset: covers German and the typographic marks of the texts. */
@font-face {
  font-family: 'Jersey 10';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("/assets/Jersey10-Regular-latin-32d95772.woff2") format('woff2');
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("/assets/Alegreya-latin-wght-deece1bc.woff2") format('woff2');
}

/* Stand-in for Jersey 10 while the web font is not there (p2-73): a 0.6 em monospace face scaled down to 55 %. Measured against
   the real font at 20 px: words about 61 % of Courier New, the numbers about 48 to 58 % (the narrow spaces and dots). The layout
   does not move when the real font arrives anyway (font-display=optional in the layout head). Courier New and Cousine: Windows,
   macOS, ChromeOS; Liberation Mono and DejaVu Sans Mono: Linux; Droid Sans Mono: Android. All 0.6 em wide. Where none exists, the
   generic monospace shows at full width: the head chips then clip their content and keep their frames (.chip, head_test). */
@font-face {
  font-family: 'Jersey 10 Fallback';
  src: local('Courier New'), local('CourierNewPSMT'), local('Liberation Mono'), local('Cousine'),
    local('Droid Sans Mono'), local('DroidSansMono'), local('DejaVu Sans Mono'), local('DejaVuSansMono');
  size-adjust: 55%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.pirate {
  margin: 0;
  background: var(--sea0);
  color: var(--parch);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.45;
}
body.pirate a { color: var(--glow1); }
body.pirate a.btn { color: var(--tx); } /* a button is no link in the colour of links: gold on gold (B2, abnahme u2) */
img.px, .px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- Pixel text: 20 px, display 30 px ---------- */
.ui, .plaque, .btn, .panel h3, .badge, .field label {
  font-family: var(--font-pixel);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .02em;
}
.disp { font-family: var(--font-pixel); font-size: 30px; font-weight: 400; line-height: 1; }
.muted { color: var(--sand0); }
.empty { margin: 6px 0 0; color: var(--wood1); }
.panel.dark .muted { color: var(--rock4); }

/* ---------- Wood and parchment ---------- */
.wood {
  background:
    repeating-linear-gradient(180deg, transparent 0 10px, rgba(22,18,26,.55) 10px 12px),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(22,18,26,.25) 46px 48px, transparent 48px 120px),
    linear-gradient(180deg, var(--wood2), var(--wood1));
}
.panel {
  position: relative;
  color: var(--ink1);
  background: var(--parch);
  margin: 14px 9px 0; /* the 9 px at the sides keep the width of the panels (the harbor scene counts on it) */
  padding: 16px 10px 10px;
  box-shadow: 0 0 0 2px var(--sand1), 0 0 0 4px var(--ink0);
}
body.pirate .panel a { color: var(--red1); text-decoration: underline; }
body.pirate .panel a.btn { color: var(--tx); text-decoration: none; } /* the colour is needed here: `body.pirate .panel a` is as specific as `body.pirate a.btn` and stands later */
.panel h3 { margin: 12px 0 6px; color: var(--wood1); }
.plaque {
  position: absolute;
  left: 8px;
  top: -12px;
  padding: 3px 8px;
  line-height: 1;
  color: var(--parch);
  background: var(--wood2);
  box-shadow: inset 0 0 0 2px var(--wood3), 0 0 0 2px var(--ink0);
}
hr.px { border: 0; height: 3px; margin: 12px 0; background: repeating-linear-gradient(90deg, var(--sand2) 0 6px, transparent 6px 9px); }

/* ---------- Buttons (stilregeln.md, "Bausteine": main, .wood, .red, .off, .sm; nothing else) ---------- */
.btn {
  --b: var(--gold1); --hi: var(--gold2); --tx: var(--ink0); --drop: 3px 3px 0 0 rgba(22,18,26,.4);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  cursor: pointer;
  border: 0;
  padding: 0 14px;
  line-height: 1;
  color: var(--tx);
  background: var(--b);
  text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--hi), 0 0 0 2px var(--ink0), var(--drop);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(2px); }
.btn:focus-visible { outline: 3px solid var(--glow2); outline-offset: 3px; }
.btn.wood { --b: var(--wood2); --hi: var(--wood3); --tx: var(--parch); --drop: 0 0 0 0 transparent; }
.btn.red { --b: var(--red1); --hi: var(--red2); --tx: var(--parch); --drop: 0 0 0 0 transparent; }
.btn.off, .btn[disabled] { --b: var(--sand2); --hi: var(--sand1); --tx: var(--wood1); --drop: 0 0 0 0 transparent; cursor: not-allowed; filter: none; }
/* Small: 32 px to look at, the tap area stays 44 px (Nr. 174): the invisible edge reaches 6 px above and below (a row has 6 px of padding there). */
.btn.sm { min-height: 32px; padding: 0 8px; }
.btn.sm::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }

/* ---------- Wordmark "Piratenzeitalter" (variant A: flag and lettering) ---------- */
.logo { display: inline-flex; align-items: center; gap: .3em; line-height: 1; white-space: nowrap; text-decoration: none; }
.logo img { image-rendering: pixelated; image-rendering: crisp-edges; }
.logo .lw { font-family: var(--font-pixel); font-weight: 400; color: var(--glow2); letter-spacing: .03em; }
.logo.s20 .lw { font-size: 20px; text-shadow: 2px 2px 0 var(--ink0); }
.logo.s30 .lw { font-size: 30px; text-shadow: 3px 3px 0 var(--ink0); }
.logo.s60 .lw { font-size: 60px; text-shadow: 6px 6px 0 var(--ink0); }
@media (max-width: 420px) {
  .logo.s60 .lw { font-size: 30px; text-shadow: 3px 3px 0 var(--ink0); }
  .logo.s60 img { width: 40px; height: 40px; }
}

/* ---------- Page frame ---------- */
.page { max-width: 560px; margin: 0 auto; padding: 18px 8px 40px; }
/* The frame of every page of a captain (u2-01, Nr. 209; draft design/ui-v3/index.html `.stage`): the same width and the same place on each of them, the light parchment
   with a ring of sand and ink. Desktop: 10 px off the edges and 10 px inside; phone: close to the edges (6 px inside). `scrollbar-gutter` keeps the width the same on
   pages that scroll and pages that do not. */
html { scrollbar-gutter: stable; }
/* The height of the tab bar at the lower edge of a phone (p-rahmen-a3); 0 elsewhere, so every rule that adds it to a fixed edge or to the page changes nothing on the desktop. */
:root { --bnav: 0px; }
@media (max-width: 620px) { :root { --bnav: 56px; } }
body.has-bnav { padding-bottom: var(--bnav); } /* the page ends above the bar */
html { scroll-padding-bottom: var(--bnav); }
/* 1186 px: the frame (2 x 10 px margin and padding) around the 1146 px that the card of the island scene has always had (its 1122 px area decides "factor 2 fits", Nr. 136, 138). */
.page.framed { max-width: 1186px; padding: 0 0 40px; }
.stage { position: relative; margin: 10px; padding: 10px; color: var(--ink1); background: var(--parch); box-shadow: 0 0 0 2px var(--sand1), 0 0 0 4px var(--ink0); }
/* A card inside the frame takes the width of the frame and only a ring of sand (the frame has the ink ring). */
.stage .panel { margin-left: 0; margin-right: 0; box-shadow: 0 0 0 2px var(--sand1); }
.stage > .flash, .page.framed > .flash { margin-left: 10px; margin-right: 10px; }
@media (max-width: 620px) {
  .stage { margin: 6px 0 0; padding: 6px; }
}
.center-page { text-align: center; padding: 24px 0 12px; }
.stack > * + * { margin-top: 14px; }

/* ---------- Forms ---------- */
.field label { display: block; margin-bottom: 4px; color: var(--wood1); }
/* One rule for every field (number, choice, text; stilregeln.md "Bausteine"): the count fields and the selects only set their width. */
.field input[type="text"], .field input[type="email"], .field input[type="password"], input.count, .fleet-form select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  box-sizing: border-box;
  font: 500 18px/1.2 var(--font-text);
  color: var(--ink1);
  background: #fff4d6;
  border: 0;
  box-shadow: 0 -2px 0 0 var(--ink0), 0 2px 0 0 var(--ink0), -2px 0 0 0 var(--ink0), 2px 0 0 0 var(--ink0), inset 2px 2px 0 0 var(--sand2);
}
input.count { width: auto; min-width: 0; }
input.count:focus-visible, .fleet-form select:focus-visible { outline: 3px solid var(--glow0); outline-offset: 2px; }
.field input:focus-visible { outline: 3px solid var(--glow0); outline-offset: 2px; }
.field .hint { margin: 4px 0 0; font-size: 15px; color: var(--sand0); }

/* ---------- Messages ---------- */
.flash { margin: 0 9px 14px; padding: 8px 12px; font-size: 17px; color: var(--parch); background: var(--ink1); box-shadow: 0 0 0 3px var(--ink0), inset 0 2px 0 0 var(--wood2); }
.page.harbor .flash { position: fixed; left: 9px; right: 9px; bottom: calc(9px + var(--bnav)); z-index: 20; margin: 0 auto; max-width: 1162px; pointer-events: none; }
/* "Goal reached" (u1-17, u2-06): the block over the page at the lower edge, nothing below moves; the button takes clicks though the strip does not. */
.flashes { position: fixed; left: 9px; right: 9px; bottom: calc(9px + var(--bnav)); z-index: 20; margin: 0 auto; max-width: 1162px; pointer-events: none; display: flex; flex-direction: column; gap: 6px; }
.page.harbor ~ .flashes { bottom: calc(62px + var(--bnav)); }
@media (max-width: 620px) {
  html.rich-ui body.map-page .flashes { bottom: calc(66px + var(--bnav)); } /* above the closed strip of the board, like the messages of the map (u2-04) */
}
.flashes .flash { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flashes .flash .btn[hidden] { display: none; }
.flashes .flash .btn { pointer-events: auto; flex: none; width: 44px; padding: 0; }
.flash.gone { opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.flash.alert { background: var(--roof0); box-shadow: 0 0 0 3px var(--ink0), inset 0 2px 0 0 var(--red2); }
.errors { margin: 0 0 12px; padding: 8px 12px; color: var(--parch); background: var(--red1); box-shadow: 0 0 0 3px var(--ink0); }
.errors ul { margin: 0; padding-left: 18px; }
.badge { display: inline-block; white-space: nowrap; padding: 1px 6px 2px; background: var(--mar1); color: var(--parch); vertical-align: middle; }
.badge.gold { background: var(--gold1); color: var(--ink1); }

/* ---------- Harbor view ---------- */
.page.harbor { padding-bottom: 90px; }
.facts { list-style: none; margin: 8px 0; padding: 0; }
.facts li { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.facts .muted { color: var(--wood2); }
.panel .note { margin: 6px 0 0; font-size: 16px; color: var(--wood1); }
.q { list-style: none; margin: 0; padding: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 2px dotted var(--sand2); }
.row:last-child { border-bottom: 0; }
.row.run { background: color-mix(in srgb, var(--grass3) 16%, transparent); } /* grass3 of the palette, no loose rgb value (u1-06) */
.row .sub { font-size: 16px; color: var(--wood1); }
.row .warn { flex-basis: 100%; margin: 2px 0 0; font-size: 16px; color: var(--red1); }
.cost { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; font-family: var(--font-pixel); font-size: 20px; line-height: 1; white-space: nowrap; }
.cost.miss { color: var(--red1); }
.cost .ico { width: 20px; height: 20px; }

/* ---------- Orders of a lane in the card "Aufträge" (p2-34, u1-04) ---------- */
/* On the cards of the town hall and the shipyard there is only a summary line with a jump to it. */
.lane-summary { margin: 6px 0 0; padding-top: 6px; border-top: 2px dotted var(--sand2); font-size: 20px; color: var(--wood1); }
.lane-summary a { color: var(--wood1); text-decoration: underline; }
/* The sticky head of a phone covers the top of the page: all jump targets keep its height (48 px) plus 12 px free.
   Fixed values, no measuring (u1-01): the head has a fixed height. */
html { scroll-padding-top: 60px; }
/* From 621 px the head bar sticks, from 900 px together with the store row (p-rahmen-kleben, Nr. 343 with its addendum): 108 px from 900 px, the head bar alone under it (100 px: the tabs have their own row) and in a window lower
   than 620 px (56 px from 900 px). Fixed values, as above. */
@media (min-width: 621px) { html { scroll-padding-top: 110px; } }
@media (min-width: 900px) { html { scroll-padding-top: 118px; } }
/* These two values count on the store row that falls away once the bar is stuck (the query for "stuck", below). A browser without it (no `container-type: scroll-state`) sticks the head complete, so the gap
   is the whole bar: 152 + 10 px under 900 px (the bar alone 100 + the store row 52), and 108 + 10 px in a low window from 900 px (118, as above), not 66 (p-sammel-7, Review p-rahmen-kleben). */
@supports (container-type: scroll-state) {
  @media (min-width: 900px) and (max-height: 619px) { html { scroll-padding-top: 66px; } }
}
@supports not (container-type: scroll-state) {
  @media (min-width: 621px) and (max-width: 899px) { html { scroll-padding-top: 162px; } }
  @media (min-width: 900px) and (max-height: 619px) { html { scroll-padding-top: 118px; } }
}
.lane-orders .row.order { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; }
.lane-orders .txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.lane-orders .row .sub { font-size: 17px; line-height: 1.25; }
.lane-orders .row .sub.warn { flex-basis: auto; margin: 0; }
.lane-orders form.act { margin: 0; flex: none; }

/* ---------- Navigation, build list page and ranking (p1-10) ---------- */
.lane h3 { margin: 6px 0 2px; }
.lane p { margin: 0 0 6px; }
.panel .count { margin: 4px 0 0; color: var(--ink1); }
.panel .note.warn { color: var(--red1); }
.row .acts { display: flex; flex-wrap: wrap; flex-basis: 100%; gap: 8px; margin-top: 4px; }
.row form.act { margin: 0; }
.reports { margin: 0; padding-left: 18px; font-size: 16px; }
.reports li { margin: 4px 0; }

/* ---------- Shipyard (p2-21) ---------- */
.ship-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ship-form label { flex-basis: 100%; }

/* Requirement line of ship and building cards (p2-32): the shape tells the state, the color only helps. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.needs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 4px 0; font-size: 18px; }
.needs .lbl { color: #6b5843; }
.needs ul { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; padding: 0; list-style: none; }
.needs .req { display: inline-flex; align-items: center; gap: 4px; }
.needs .mark { flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.needs .req.met { color: #4a5a1e; }
.needs .req.planned { color: var(--wood1); }
.needs .req.planned .mark { stroke-dasharray: 2 1.5; }
.needs .req.missing { color: var(--red1); }

/* ---------- Page of the island: list at the left, title and scene at the right (p-rahmen-b1, Nr. 341 (7); draft design/ui-v3/rahmen.html `.isl2`) ---------- */
/* The two pages that show a scene (the home harbor and an own island) stand in `.isl2`: from 900 px (Nr. 372) the list of all own islands (270 px) at the left, the title with the arrows and the scene in the rest;
   on a phone only the title and the scene (the list waits for its sheet, B3). The list takes no height of its own: it is as high as the title and the scene (its content lies in `.rail-in`, absolute), so it
   scrolls for itself and the scene does not move. Nothing of it is global: every rule hangs on `.isl2`. */
.isl2 { display: block; }
.isl2 .rail { display: none; }
/* The title is a grid. Up to 899 px (a phone, and the narrow part beside the list) the name has its row with the arrows and the picture, the facts a row under it over the whole width, the grace period a row of its own;
   from 900 px the arrows stand at the sides over both rows and the facts under the name. The facts always keep room for two lines, so the scene under the title starts at the same place on every page. */
.isl2 .ptitle { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 44px; grid-template-areas: "previous pick count next" "facts facts facts facts" "protection protection protection protection"; align-items: center; column-gap: 8px; row-gap: 2px; margin: 0 0 8px; }
/* The phone (p-rahmen-b3, draft picture 7): the picture and the name are the button to the list ("‹ [Dornkap ▾] 2 von 24 ›" in one row); the name is cut at the end of the button instead of breaking the row. */
body.pirate .isl2 a.pt-pick { grid-area: pick; display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 0 8px 0 6px; background: var(--parch2); color: var(--ink0); text-decoration: none; box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--sand1); }
/* p-fix-seitenleiste-leer (Nr. 398 F2): without a yield island the picture and the name are no button (a span, no list to open): the same place and look, without the box and the caret. */
.isl2 span.pt-pick { grid-area: pick; display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 44px; padding: 0 8px 0 6px; }
.isl2 .pt-pick .pt-name { font-size: 24px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.isl2 .pt-caret { flex: none; margin-left: auto; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.isl2 .pt-count { grid-area: count; font-size: 16px; color: var(--wood1); white-space: nowrap; }
.isl2 a.pt-pick:focus-visible { outline: 3px solid var(--glow2); outline-offset: 2px; }
.isl2 .ptitle canvas.motif { flex: none; width: 32px; height: 32px; image-rendering: pixelated; }
.isl2 .pt-name { grid-area: name; margin: 0; font: 400 30px/30px var(--font-pixel); color: var(--ink1); overflow-wrap: anywhere; min-width: 0; }
.island-stage .pt-rename { position: absolute; left: 10px; top: 10px; z-index: 20; max-width: calc(100% - 20px); }
.island-stage .pt-rename .btn { font-size: 16px; }
.island-stage .rename { position: relative; width: min(340px, calc(100vw - 40px)); margin-top: 6px; padding: 8px 12px; box-sizing: border-box; background: var(--parch); color: var(--ink0); box-shadow: 0 0 0 3px var(--ink0); }
body.pirate .rename a#rename-keep { color: var(--wood1); text-decoration: underline; }
.isl2 .pt-facts { grid-area: facts; margin: 0; font-size: 16px; line-height: 19px; min-height: 38px; color: var(--wood1); }
.isl2 .pt-protection { grid-area: protection; font: 400 18px/1 var(--font-pixel); color: var(--ink1); }
/* The arrows are 44 px boxes (a tap area). Without an arrow (one place only) its cell stays empty. */
body.pirate .isl2 a.arr { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 44px; min-height: 44px; background: var(--parch2); color: var(--ink0); text-decoration: none; box-shadow: inset 0 0 0 2px var(--sand1), 0 0 0 2px var(--ink0); font: 400 28px/1 var(--font-pixel); }
.isl2 a.arr-previous { grid-area: previous; }
.isl2 a.arr-next { grid-area: next; }
body.pirate .isl2 a.arr:hover { background: var(--sand3); }
.isl2 a.arr:focus-visible, .isl2 a.ir:focus-visible, .isl2 .rf a:focus-visible { outline: 3px solid var(--glow2); outline-offset: -3px; }

@media (min-width: 900px) {
  .isl2 { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 10px; align-items: stretch; }
  .isl2-main { min-width: 0; }
  .isl2-alone { display: block; } /* p-fix-seitenleiste-leer (Nr. 398 F1): no yield island yet, no list (the view does not render it), the scene takes the whole width */
  .isl2 .rail { display: block; position: relative; min-height: 340px; background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); }
  .isl2 .rail-in { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; min-height: 0; }
}
.isl2 .rh { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-bottom: 3px solid var(--ink1); }
.isl2 .rh b { font: 400 24px/1 var(--font-pixel); }
.isl2 .rh small { color: var(--wood1); font-size: 16px; }
.isl2 .find { flex: none; display: flex; position: relative; margin: 6px 8px; }
.isl2 .find input[type=search] { flex: 1 1 auto; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 0 8px; background: #fffaf0; border: 0; box-shadow: inset 0 0 0 2px var(--ink1); font: inherit; color: var(--ink0); }
/* the button of the form is for the keyboard and a screen reader (Enter in the field sends it as well); the field gets the whole width so its hint is read in full */
.isl2 .find button { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* WCAG 2.4.7: reached by Tab the button shows itself like a skip link, at the right edge of the field (only in the list of islands) */
.isl2 .find button:focus-visible { width: auto; height: auto; overflow: visible; clip-path: none; right: 4px; top: 4px; bottom: 4px; padding: 0 8px; background: var(--gold1); border: 0; box-shadow: inset 0 0 0 2px var(--gold2), 0 0 0 2px var(--ink0); font: 400 18px/1 var(--font-pixel); color: var(--ink0); cursor: pointer; }
.isl2 .sorts { flex: none; display: flex; gap: 3px; margin: 0 6px 6px; align-items: center; }
.isl2 .sorts-label { font-size: 15px; color: var(--wood1); margin-right: 1px; white-space: nowrap; }
.isl2 .sorts button { min-height: 32px; padding: 0 5px; white-space: nowrap; background: var(--parch); border: 0; box-shadow: inset 0 0 0 2px var(--sand1); font: 400 18px/1 var(--font-pixel); color: var(--ink0); cursor: pointer; }
.isl2 .sorts button.on { background: var(--gold1); box-shadow: inset 0 0 0 2px var(--gold2), 0 0 0 2px var(--ink0); }
.isl2 .none { margin: 0; padding: 12px 8px; color: var(--wood1); }
body.pirate .isl2 .none[hidden], body.pirate .isl2 .zg[hidden], body.pirate .isl2 a.ir[hidden] { display: none; }
.isl2 .rail .list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.isl2 .zh { font: 400 20px/1 var(--font-pixel); color: var(--wood1); background: var(--sand3); padding: 3px 8px; display: flex; justify-content: space-between; gap: 6px; }
body.pirate .isl2 a.ir { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px; align-items: center; min-height: 44px; box-sizing: border-box; padding: 2px 8px; border-bottom: 2px dotted var(--sand2); color: var(--ink1); text-decoration: none; }
.isl2 a.ir canvas.motif { width: 24px; height: 24px; image-rendering: pixelated; }
.isl2 a.ir .ir-name { display: block; font: 400 20px/1.05 var(--font-pixel); overflow-wrap: anywhere; }
.isl2 a.ir .ir-sub { display: block; color: var(--wood1); font-size: 16px; line-height: 1.1; }
body.pirate .isl2 a.ir:hover { background: var(--sand3); }
body.pirate .isl2 a.ir.on { background: var(--gold2); box-shadow: inset 4px 0 0 var(--ink0); }
body.pirate .isl2 a.ir.alarm { background: #f6dccb; }
.isl2 a.ir.alarm .ir-sub { color: var(--red1); }
.isl2 .lvl { font: 400 20px/1.1 var(--font-pixel); display: inline-block; min-width: 28px; text-align: center; background: var(--ink1); color: var(--gold2); padding: 1px 4px; }
.isl2 .lvl-none { display: inline-block; min-width: 28px; }
.isl2 .rf { flex: none; padding: 6px 8px; border-top: 3px solid var(--ink1); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; font-size: 16px; }
.isl2 .rf-links { display: inline-flex; gap: 10px; margin-left: auto; }

/* The list as a sheet from below (p-rahmen-b3; draft `.sheet2`): under 900 px the list is hidden until the button with the name of the island opens it (rail-sheet sets `data-sheet="open"`). It stands above the bar of the
   tabs (`bottom: var(--bnav)`, so they stay visible and tappable), is at most 590 px high (and leaves a strip of the page above it) and scrolls inside; the page behind does not scroll and is dimmed, a tap on the dimmed part
   closes the sheet. Every rule hangs on `.isl2[data-sheet]` or `.isl2-list`, nothing is global. */
.isl2 .rh-sheet { display: none; }
@media (max-width: 899px) {
  .isl2[data-sheet="open"] .island-stage .pt-rename { z-index: 1; } /* under the sheet (15) and its shadow (14): the button lies in the dimmed page (p-sammel-18, M1) */
  .isl2[data-sheet="open"]::before { content: ""; position: fixed; left: 0; right: 0; top: 0; bottom: var(--bnav); z-index: 14; background: rgba(22, 18, 26, .55); }
  .isl2[data-sheet="open"] .rail { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: var(--bnav); z-index: 15; max-height: min(590px, calc(100dvh - var(--bnav) - 64px)); background: var(--parch2); color: var(--ink1); box-shadow: 0 -3px 0 var(--ink0), 0 -6px 0 var(--gold1), 0 -9px 0 var(--ink0); }
  .isl2[data-sheet="open"] .rail-in { position: static; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
  .isl2[data-sheet="open"] .rh { display: none; }
  .isl2[data-sheet="open"] .rh-sheet { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 10px; border-bottom: 3px solid var(--ink1); }
  .isl2 .rh-sheet b { font: 400 24px/1 var(--font-pixel); }
  .isl2 .rh-sheet button { min-height: 44px; padding: 0 10px; background: none; border: 0; color: var(--ink0); font: inherit; text-decoration: underline; cursor: pointer; }
  html:has(.isl2[data-sheet="open"]) { overflow: hidden; }
  .isl2[data-sheet="open"] .rail .list { overscroll-behavior: contain; }
}
/* No JavaScript: the button leads to the list as a page of its own (island_lists#show), the list is the page. */
.isl2-list { display: block; }
.isl2-list .rail { display: block; position: static; min-height: 0; background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); }
.isl2-list .rail-in { position: static; display: flex; flex-direction: column; }
.isl2-list .rail .list { overflow: visible; }

@media (min-width: 900px) {
  /* The title has a fixed height (name 30 px, facts two lines of 19 px, 68 px), so the scene under it keeps one height: the 216 px of the rule of the scene, with the 44 px of the old bar of islands
     replaced by the 76 px of the title (68 and 8 below), are 248 px (HARBOR_SCENE_CHROME). The grace period stands at the right of the name, over the arrow's column. */
  body.pirate .isl2 a.pt-pick, .isl2 span.pt-pick { display: contents; }
  .isl2 .pt-caret, .isl2 .pt-count { display: none; }
  .isl2 .ptitle canvas.motif { grid-area: tile; }
  .isl2 .pt-pick .pt-name { font-size: 30px; line-height: 30px; white-space: normal; overflow: visible; }
  .isl2 .ptitle { grid-template-columns: 44px 32px minmax(0, 1fr) auto 44px; grid-template-rows: 30px 38px; grid-template-areas: "previous tile name protection next" "previous tile facts facts next"; height: 68px; row-gap: 0; }
  .isl2 .ptitle canvas.motif { align-self: center; }
  .isl2 .pt-facts { max-height: 38px; overflow: hidden; }
  .isl2 .pt-protection { font-size: 20px; }
}

/* ---------- "Am Kai" at the bottom of the scene (u2-02; draft ".quay") ---------- */
/* The bottom of the scene is a column over the water (the button to the grid without the picture above, then the row), so the two never lie over each other.
   The row is dark and half see-through; the controller keeps the signs above it (`place`). Without JavaScript the container is part of the page (noscript rule in the view). */
.harbor-bottom { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.harbor-bottom > * { pointer-events: auto; }
.quay { display: flex; align-items: center; gap: 14px; padding: 6px 8px; font: 400 20px/1 var(--font-pixel); color: var(--parch); background: rgba(22,18,26,.82); box-shadow: 0 0 0 2px var(--ink0); }
.quay .lab { color: var(--sand2); }
.quay-ships { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.quay .s { display: flex; align-items: center; gap: 4px; }
.quay canvas.motif { width: 32px; height: 32px; }
.quay-text { display: none; margin: 0; }
.quay-none, .quay-state { color: var(--sand2); }
.quay .btn { flex: none; margin-left: auto; }
.quay .short { display: none; }
@media (max-width: 620px) {
  .harbor-bottom { left: 6px; right: 6px; bottom: 6px; }
  .quay { flex-wrap: wrap; gap: 8px; }
  .quay-ships { gap: 4px 8px; }
  .quay .lab, .quay .long { display: none; }
  .quay .short { display: inline; }
}

/* ---------- Harbor scene (p2-55) ---------- */
/* The scene is "fill the width" only (Nr. 136, 119): the width of the panel at 4:3 (on a phone, up to 620 px of window, the whole window width, edge to edge), from 700 px of window width no higher than 60 % of the window
   height, so a tablet on its side is not only scene, from 900 px the window height less 248 px (the rule below). The case "factor 2 fits" of Nr. 138 (a panel of 1120 px and a window of 760 px) is gone: since the list of
   islands (p-rahmen-b1, 270 px) stands beside the scene the panel is 866 px at most, so the zoom is the biggest factor at which the frame of the island fits, any number. Whether a sign shows its name or only its number hangs on the width
   of the area (Nr. 140: under 700 px the number, from 700 px the names, NAMES_WIDTH in the controller). The place is the same for every island, reserved by CSS
   (quiet water-coloured area, no spinner, nothing below it moves); the controller zooms the island into it and sizes the canvas to the area; the canvas
   lies in the area and never makes it bigger. Pixels stay sharp. */
.panel.harbor-scene { padding: 12px; container-type: inline-size; }
.harbor-scene-stage { position: relative; overflow: hidden; width: 100%; height: auto; aspect-ratio: 4 / 3; text-align: center; line-height: 0; background: var(--sea1); display: flex; align-items: center; justify-content: center; }
@media (min-width: 700px) {
  .harbor-scene-stage { max-height: 60vh; }
}
/* Desktop (u2-02, UX concept principle 2, Nr. 184): like the sea map the scene fills the window down to the edge of the frame, at least 420 px. The sums: head 56, tab bar 52,
   frame 10 + 10, title of the island 68 + 8 (p-rahmen-b1; it was the bar of islands, 36 + 8), 12 px of the card above the scene and 12 below, 20 px of frame below = 248 px. Since p-rahmen-a1 the head bar (56 px) and the store row (52 px) take the 108 px of the former head and tab bar; the line of the next goal (28 px, while the series of the first evening runs) makes it 276 px. The build list begins under the first screen. */
@media (min-width: 900px) {
  /* p-fix-seitenleiste-leer: the height of the scene is calculated in ONE place, from the variable `--scene-above` (the pixels the page takes above and below the scene, the sums above); the two cases
     with the line of the goal below only set the variable. Measured at 1366 x 700 and 1920 x 1080: the stage lies whole in the window. */
  .harbor-scene-stage { --scene-above: 248px; aspect-ratio: auto; max-height: none; height: max(420px, calc(100dvh - var(--scene-above))); }
  body:has(#goal-line) .harbor-scene-stage { --scene-above: 276px; } /* under 1100 px the line has its own row; from 1100 px it stands in the store row over "Was läuft" */
  .harbor-stage .panel.harbor-scene { margin-top: 0; }
  /* the 20 px of frame under the scene: the build list (with the plaques over its cards) begins under the first screen, also without a note in front of it */
  .orders { padding-top: 20px; }
}
@media (max-width: 620px) {
  /* Edge to edge in the frame: the frame has 6 px of padding at the sides (u2-01), the panel none and no frame of its own. */
  .stage .panel.harbor-scene, .panel.harbor-scene { margin: 0 -6px 14px; padding: 0; box-shadow: none; background: var(--sea1); }
}
/* The page of an own yield island (p4-07b; draft design/ui-v3/index.html picture 2): the same area as the scene of the home harbor, the one small island in it, centred; the canvas is
   painted by yield_scene_controller (2d, pixelated) and sized by it to a whole factor where that fits. The row "Garnison" lies over the bottom as "Am Kai" does. */
.island-scene .harbor-scene-stage canvas { position: absolute; image-rendering: pixelated; }
/* The row "Garnison" keeps its word on the phone too (Nr. 267: "Garnison: keine" must read as such; "Am Kai" drops it there). */
@media (max-width: 620px) { .quay#garrison .lab { display: inline; } }
/* Phone (Nr. 247, 269): the scene of the island has one building only, so it is low: the yield, the next level with its cost and "In die Bauliste" lie in the window at 360 x 740, also with the band.
   The scene of the home harbor keeps its 4:3. */
@media (max-width: 620px) {
  .island-scene .harbor-scene-stage { aspect-ratio: auto; height: 150px; }
}
/* The overlay of the island is always open (there is only the one target): on a phone and a narrow window a card under the scene in the flow, from 900 px the sheet at the right edge of the
   picture, 340 px wide, with the ring (Nr. 247). No close knob; the head keeps its room at the right as on the other sheets. */
.island-overlay { position: relative; margin: 12px 6px 0; padding: 12px 8px 14px; max-width: 100%; box-sizing: border-box; background: var(--parch); color: var(--ink1); box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--gold1), 0 0 0 9px var(--ink0); }
.island-overlay .bhead { margin-right: 4px; }
.island-overlay .bsheet-body { overflow-y: visible; }
@media (min-width: 900px) {
  .island-overlay { position: absolute; right: 26px; top: 26px; width: 340px; margin: 0; max-height: calc(100% - 52px); display: flex; flex-direction: column; z-index: 15; }
  .island-overlay .bsheet-body { overflow-y: auto; }
}
/* Close-up of a target in the overlay of the sea map (u1-11; design/ui-v2/seekarte.html, `.sheet .view`): 120 px high, pixelated, cropped to the middle. */
canvas.target-view { display: block; width: 100%; height: 120px; margin: 0 0 8px; object-fit: cover; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--ink0); background: var(--sea0); }
.harbor-scene-stage canvas { position: absolute; left: 0; top: 0; display: block; image-rendering: pixelated; }
/* No WebGL or a broken import: the reserved area stays and says so quietly. */
.harbor-scene-note { display: none; margin: 0; padding: 0 12px; line-height: 1.3; font-size: 0.9rem; color: var(--foam); }
.harbor-scene-stage[data-state="failed"] .harbor-scene-note { display: block; }

/* Signs over the scene (p2-56, design/grafik/insel.html ".spot"): links the server renders, the controller sets left/top/width/height
   of the overlay (the canvas rectangle) and of each sign. Absolute, so they never move the page. Hidden until placed. With no
   JavaScript the whole panel is removed (noscript rule), so they are not in the way. Jersey 10 only in 20 px. */
.harbor-scene-frame { position: relative; }
.harbor-signs { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; visibility: hidden; }
.harbor-signs[data-placed] { visibility: visible; }
/* body.pirate: stronger than `body.pirate .panel a` (red, underlined), so a sign keeps the dark ink of the draft. */
body.pirate .harbor-signs .sign { position: absolute; display: block; pointer-events: auto; font: 400 20px/1 var(--font-pixel); white-space: nowrap; text-decoration: none; color: var(--ink1); }
.sign-name, .sign-level, .sign-building { display: inline-block; vertical-align: top; padding: 2px 6px; box-shadow: 0 0 0 2px var(--ink0); }
.sign-name { background: var(--parch); }
.sign-level { background: var(--gold2); font-weight: 400; min-width: 22px; text-align: center; padding: 2px 4px; margin-left: 2px; }
.sign-building { background: var(--wood1); color: var(--parch); margin-left: 2px; }
.sign-short { display: none; }
.harbor-signs .sign:hover .sign-name, .harbor-signs .sign:focus-visible .sign-name { background: var(--gold2); }
.harbor-signs .sign:focus-visible { outline: 3px solid var(--glow2); outline-offset: 3px; }
/* The name does not fit (Nr. 128): only the number; hover and focus open the name (the sign is absolute, nothing around it moves). */
.sign.compact .sign-name, .sign.compact .sign-building { display: none; }
.sign.compact .sign-short { display: inline-block; }
.sign.compact:not(.tap):hover, .sign.compact:not(.tap):focus-visible { z-index: 5; transform: translateX(var(--open-shift, 0px)); }
.sign.compact:not(.tap):hover .sign-name, .sign.compact:not(.tap):focus-visible .sign-name, .sign.compact.measure .sign-name,
.sign.compact:not(.tap):hover .sign-building, .sign.compact:not(.tap):focus-visible .sign-building, .sign.compact.measure .sign-building { display: inline-block; }
.sign.compact:not(.tap):hover .sign-short, .sign.compact:not(.tap):focus-visible .sign-short, .sign.compact.measure .sign-short { display: none; }
/* Phone (Nr. 128, 136, 137): the link is the whole building (at least 44 px, set by the controller), invisible; only a small number of
   about 16 px sits at the top right corner of the building, never a name (the names are in the list of buildings below). */
.sign.tap { box-shadow: none; }
.sign.tap .sign-level { position: absolute; z-index: 3; min-width: 16px; height: 16px; padding: 0 3px; line-height: 16px; margin: 0; }

/* ---------- The card of a building over the island (u1-03, Nr. 172, 175; design/ui-v2/hafen.html "Karte ueber der Insel") ---------- */
/* The chosen sign carries a ring of 5 px in glow1 (on the phone the number and the building area). */
.sign.sel .sign-name, .sign.sel .sign-level { box-shadow: 0 0 0 2px var(--ink0), 0 0 0 5px var(--glow1); }
.sign.tap.sel { box-shadow: 0 0 0 3px var(--glow1); }
/* The sheet (u1-03, u1-12; stilregeln.md, Baustein "Blatt"): `.sheet-frame` is the shared frame of the card over the harbor (`.harbor-sheet`, the Turbo frame "building-sheet") and of the
   sheet over the sea map (`.sea-sheet`). Empty or hidden = no card (no empty state). Phone and narrow window: fixed at the lower edge of the window, it scrolls in itself, so the page
   behind never moves (Muster 7). From 900 px of window: it floats at the right edge of the picture, 340 px wide, with the ring of 3 / 3 / 3 px; the picture keeps its whole
   width and its size (Nr. 175). The harbor card stands on the left (`data-side`, set by building_sheet_controller) when it would cover the tapped building; the sheet of the
   sea map always stands on the right and the picture moves (Nr. 181). */
.harbor-stage { position: relative; }
.sheet-frame { position: fixed; left: 0; right: 0; bottom: var(--bnav); z-index: 15; display: flex; flex-direction: column; max-height: 75vh; padding: 12px 8px 14px; background: var(--parch); color: var(--ink1); box-shadow: 0 -3px 0 var(--ink0), 0 -6px 0 var(--gold1), 0 -9px 0 var(--ink0); }
.sheet-frame:empty, .sheet-frame[hidden] { display: none; }
@media (min-width: 900px) {
  .sheet-frame { position: absolute; left: auto; bottom: auto; width: 340px; box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--gold1), 0 0 0 9px var(--ink0); }
  .harbor-sheet { right: 26px; top: 26px; max-height: calc(100% - 52px); } /* 12 px of the card plus 14 px from the edge of the picture (u2-01: the card has no margin of its own in the frame) */
  .harbor-sheet[data-side="left"] { right: auto; left: 26px; }
  /* 14 px from the upper and right edge of the picture; the signs that once hung into it are gone (u2-01, Nr. 209). */
  .sea-sheet { right: 14px; top: 14px; max-height: calc(100% - 28px); }
}
.bsheet { display: flex; flex-direction: column; min-height: 0; font-size: 16px; line-height: 1.3; }
.sea-sheet:has(.bsheet[data-kind="area"]) { box-shadow: 0 -3px 0 var(--ink0), 0 -6px 0 #6b7fc4, 0 -9px 0 var(--ink0); } /* the sheet of the area of a fort: the frame in the blue of the navy (p15-22, draft gebiete.html `.sheetx.navy`) */
@media (min-width: 900px) { .sea-sheet:has(.bsheet[data-kind="area"]) { box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px #6b7fc4, 0 0 0 9px var(--ink0); } }
.bsheet .area-free { margin: 8px 0 0; padding: 6px 8px; background: #dfe4f6; box-shadow: inset 4px 0 0 var(--mar1); font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; } /* the box "Fällt das Fort ..." (draft `.navy2`) */
.bsheet .area-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
@media (max-width: 899px) { .bsheet .desktop-only { display: none; } } /* only where the sheet stands at the right of the picture (the draft: not on the phone) */
.bhead { display: flex; align-items: center; gap: 10px; margin: 0 54px 0 4px; flex: none; }
.bhead canvas.motif { width: 48px; height: 48px; flex: none; image-rendering: pixelated; }
.bhead h2 { margin: 0 6px 0 0; display: inline; font-size: 30px; line-height: 1; font-weight: 400; color: var(--ink1); }
.bhead .badge { background: var(--gold2); color: var(--ink1); padding: 2px 6px; font-size: 20px; box-shadow: 0 0 0 2px var(--ink0); }
.bhead .badge.navy { background: var(--mar1); color: #fff; } /* the plaque of the navy and of a fort that has fallen (p5-20, draft marine.html) */
.bhead .badge.gone { background: var(--sand2); }
/* The sub-line of the head of a Marine overlay (u2-sammel-2a, Nr. 263, draft marine.html `.head small`): one line under the name, cut short with a dot rather than broken (Nr. 254). */
.bhead-text { min-width: 0; }
.bhead h2 .code { white-space: nowrap; } /* a code never breaks at its hyphen (p-sammel-4) */
.bhead .lead[hidden] { display: none; }
.bhead .lead { display: block; margin-top: 2px; font: 400 16px/1.2 var(--font-text); color: var(--wood1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 359px) { .bsheet[data-kind="fort"] .bhead canvas.motif, .bsheet[data-kind="area"] .bhead canvas.motif { display: none; } } /* "Sperrt sein Gebiet, bis es fällt" and "unter dem Schutz der Marine" stay one line at 320 px: the tile of the fort gives its 58 px to the line (Nr. 254, p15-22) */
.bsheet .facts.four, .bsheet .facts.four.access { grid-template-columns: 1fr 1fr; } /* four tiles as two by two, so every label stays one piece in 16 px (Nr. 359 (3)) */
.bsheet .facts.four div { padding-left: 4px; padding-right: 4px; }
.bsheet .facts.four small { overflow-wrap: normal; } /* "Verteidigung" in one piece, 16 px (Nr. 263, 359 (3)) */
.bsheet .fort-state { margin: 6px 0; padding: 6px 8px; background: var(--sand3); box-shadow: 0 0 0 2px var(--gold1); font: 400 20px/1.15 var(--font-pixel); overflow-wrap: anywhere; }
.bsheet .fort-own { margin: 4px 0; }
.bsheet .fort-alliance { margin: 4px 0; overflow-wrap: anywhere; font-size: 16px; line-height: 1.2; } /* the waiting members of the own alliance, with names (Nr. 351): a line of 16 px, the names unfold */
.bsheet details.fort-alliance { margin: 0; padding-bottom: 0; }
.bsheet details.fort-alliance > summary { position: relative; min-height: 20px; padding: 0 6px 0 0; font: 400 16px/1.2 var(--font-text); letter-spacing: normal; } /* 20 px to see, the tap area 44 px by the pseudo element (as .btn.sm, Nr. 174); the line under it lets taps through to it, its link stays above it */
.bsheet details.fort-alliance > summary::after { content: ""; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; }
.bsheet .fort-own { position: relative; z-index: 1; pointer-events: none; }
.bsheet .fort-own a { pointer-events: auto; }
.bsheet .fort-alliance-list li { font: 400 16px/1.25 var(--font-text); }
.bsheet .fort-alliance-list { margin: 0; padding: 0 6px 4px 22px; list-style: none; }
/* The sheet of a fort in a world with the adaptive strength (p15-23, draft design/ui-v3/gebiete.html picture 3): the rule, the sum as two columns, the own stand in a box; only inside .bsheet, no rule on .bhead or .badge */
.bsheet .fort-rule, .bsheet .fort-floor, .bsheet .fort-enough { margin: 4px 0; }
.bsheet .fort-rule b { font: 400 20px/1.15 var(--font-pixel); }
.bsheet .fort-calc { margin: 6px 0; padding: 6px 8px; background: var(--sand3); box-shadow: 0 0 0 2px var(--gold1); }
.bsheet .fort-calc.ok { box-shadow: 0 0 0 2px var(--leaf1); }
.bsheet .fort-calc > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; margin: 2px 0; } /* a row: label left, value right; a value that does not fit goes under its label, right (p-sammel-4) */
.bsheet .fort-calc dt, .bsheet .fort-calc dd { margin: 0; font: 400 20px/1.15 var(--font-pixel); white-space: nowrap; } /* neither breaks inside */
.bsheet .fort-calc dd { margin-left: auto; text-align: right; }
.bsheet .fort-own-box { padding: 6px 8px; background: var(--sand3); }
.bsheet .fort-own-box b { font: 400 20px/1.15 var(--font-pixel); }
.bsheet .fort-state.ok { box-shadow: 0 0 0 2px var(--leaf1); }
.bhead h2:focus-visible { outline: 3px solid var(--glow1); outline-offset: 3px; }
#sheet-close, #sea-sheet-close, #weather-sheet-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 30px; line-height: 1; }
.bsheet-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: 6px; padding: 4px; }
.bsheet .say { margin: 4px 0 0; }
.bsheet .gain { margin: 10px 0 6px; padding: 6px 8px; background: var(--sand3); font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.bsheet .gain .after, .bsheet .gain .arrow { color: var(--leaf1); }
/* Every arrow "→" / "←" on the web is this class, set in the text face (Nr. 225): the pixel face has no arrow and a fallback glyph hardly reads as one. */
.arrow { font-family: var(--font-text); font-weight: 700; font-size: 1.1em; line-height: 1; }
.bsheet .gain.lookout span { display: block; } /* the sight line and what the level newly shows, one under the other */
.bsheet .unlocks { margin: 0 0 6px; font-size: 16px; color: var(--leaf1); overflow-wrap: anywhere; }
.bsheet .bcost { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0; }
.bsheet .bcost .cost { margin: 0; }
.bsheet .bcost .cost .ico, .bsheet .ship-row .cost .ico { width: 16px; height: 16px; }
.bsheet .bcost .ticks { margin-left: auto; font-style: normal; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.bsheet .warn { margin: 6px 0 0; font-size: 16px; color: var(--red1); }
.bsheet .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.bsheet .acts form { margin: 0; }
.bsheet .more { margin-top: 6px; }
/* The sheet of the sea map (u1-12): the close-up keeps its place of 120 px from the first paint on (the slot, then the canvas); three facts as in the draft (`.facts`); a target out of sight says when it was seen. */
.look-slot { margin: 0 0 8px; }
.look-slot { height: 120px; background: var(--sea0); box-shadow: 0 0 0 2px var(--ink0); }
.bsheet .facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 8px 0; }
.bsheet .facts div { min-width: 0; padding: 4px 6px; background: var(--sand3); }
.bsheet .facts small { display: block; font-size: 16px; line-height: 1.1; color: var(--wood1); overflow-wrap: anywhere; }
.bsheet .facts b { display: block; font: 400 20px/1.1 var(--font-pixel); overflow-wrap: anywhere; }
.bsheet .reason { margin: 8px 0 0; }
.bsheet .more .note { margin: 0 0 6px; }
.bsheet .ships { margin-top: 10px; border-top: 2px dotted var(--sand2); }
.bsheet .ship-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 4px 8px; }
.bsheet .ship-row .grow { min-width: 0; }
.bsheet .ship-row .grow b { display: block; font-size: 20px; line-height: 1.1; }
.bsheet .ship-row .sub { display: block; font-size: 16px; line-height: 1.25; }
.bsheet .ship-row.off { opacity: .85; }
.bsheet .ship-row .ship-form { grid-column: 1 / -1; }
.bsheet .ship-row .ship-form label { flex-basis: auto; }
/* The sheet to send from has THREE parts, the same for every target (p-sendeblatt, Nr. 359; Zollhaus, Fort, Insel, Hafen, Mitte): the head (`.sheet-top`: the target and its facts in one line, "mehr" unfolds the full
   facts), the middle (`.sheet-mid`: the choice of ships, the flagship as the first row, the only part that scrolls) and the fixed foot (`.sheet-foot`: the result in one line and the knobs). The sheet has one height in
   all its states (Nr. 205): as high as its limit lets it be (Nr. 184, small laptop windows); on the phone it stands above the tab bar (`.sheet-frame`: `bottom: var(--bnav)`). Nr. 247 holds: what the captain needs to
   act (target, result, knob) is always in the visible part; the flagship row may lie under the fold of the middle at 1400 x 700. The frame "sea-send" and its form take no box of their own; the parts are its children. */
.sea-sheet:has(.sea-send) { height: min(620px, 75vh); }
@media (min-width: 900px) {
  .sea-sheet:has(.sea-send) { height: min(620px, calc(100% - 28px)); }
}
.sea-sheet:has(.sea-send) .bsheet { flex: 1 1 auto; }
.sea-sheet:has(.sea-send) { padding: 8px 8px 8px; }
.sea-sheet:has(.sea-send) .bhead h2 { font-size: 24px; }
.sea-sheet:has(.sea-send) .bhead .badge { font-size: 16px; }
.sea-sheet:has(.sea-send) .bhead .lead { margin-top: 0; line-height: 1.1; } /* 16 px like every text (Nr. 359 (3)) */
.bsheet .send-form { display: contents; }
.bsheet-body.sendable { margin-top: 4px; padding: 0 4px; }
.sea-sheet .bsheet-body.sendable { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; } /* the card of the island page in the flow has no limit of height: its body stays as it is */
@media (min-width: 900px) {
  .island-overlay .bsheet-body.sendable { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; } /* the card at the right edge of the picture is limited (max-height): the middle scrolls */
  .island-overlay:has(#sea-send-form, #sea-preview-result, #preview-refusal, #sea-send-message) { height: min(620px, calc(100% - 52px)); } /* while the choice or its result is open: one height, as the sheet of the map */
}
.bsheet .sea-send { flex: 1 1 auto; min-height: 150px; display: flex; flex-direction: column; } /* the foot (about 90 px) and a row of the middle at least */
.sheet-top { flex: none; }
/* Opened, the head and the middle are ONE area that scrolls (one scroll bar, Nr. 359): the body scrolls, the foot sticks to its lower edge. */
.sea-sheet .bsheet-body.sendable:has(.sheet-more[open]) { overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 96px; } /* what scrolls into view stays above the foot */
.sea-sheet .sendable:has(.sheet-more[open]) > .sea-send { display: contents; } /* mid and foot are children of the scrolling body: the foot can stick to its lower edge */
.sea-sheet .sendable:has(.sheet-more[open]) .sheet-mid { flex: 1 0 auto; overflow: visible; }
.sea-sheet .sendable:has(.sheet-more[open]) .sheet-foot { position: sticky; bottom: 0; z-index: 3; margin-left: -4px; margin-right: -4px; padding-left: 4px; padding-right: 4px; } /* the full width of the body, nothing shows beside it */
@media (min-width: 900px) {
  .island-overlay .bsheet-body.sendable:has(.sheet-more[open]) { overflow-y: auto; overscroll-behavior: contain; }
  .island-overlay .sendable:has(.sheet-more[open]) > .sea-send { display: contents; }
  .island-overlay .sendable:has(.sheet-more[open]) .sheet-mid { flex: 1 0 auto; overflow: visible; }
  .island-overlay .sendable:has(.sheet-more[open]) .sheet-foot { position: sticky; bottom: 0; z-index: 3; margin-left: -4px; margin-right: -4px; padding-left: 4px; padding-right: 4px; }
}
.sheet-mid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 4px; }
.island-mid:has(.sea-island-build:empty) { display: none; }
/* The knobs of the overlay of an island on its page ("In die Bauliste", "Schiffe hierher", "Auf der Seekarte") stand fixed at the foot of the card, outside the middle that scrolls (Nr. 372 (3), p-rahmen-b1). */
.island-foot { flex: none; margin-top: 4px; padding: 6px 0 4px; background: var(--parch); border-top: 2px solid var(--sand2); }
.island-foot .acts { margin: 0; }
.island-overlay .sea-send:empty { display: none; } /* the frame of the choice of ships takes no room while it is empty: the middle gets it */
.sheet-foot { flex: none; margin-top: 4px; padding: 6px 0 4px; background: var(--parch); border-top: 2px solid var(--sand2); }
.sheet-foot-line { margin: 0 0 2px; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.sheet-foot-line b { display: inline; font: 700 16px/1.25 var(--font-text); color: var(--leaf1); }
.bsheet .sheet-foot .acts { margin-top: 4px; }
.bsheet .sheet-foot .acts .confirm { display: contents; }
/* The line of the head and "mehr": one summary of at least 44 px (the tap area), the line in 16 px, "mehr" at its right end. */
.sheet-more { margin: 0; padding: 0; }
.bsheet .sheet-more > summary { min-height: 44px; padding: 0 6px 0 0; font: 400 16px/1.25 var(--font-text); letter-spacing: normal; color: var(--ink1); }
.bsheet .sheet-more > summary .sheet-line { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.bsheet .sheet-more > summary .sheet-fold { flex: none; margin-left: auto; color: var(--wood1); text-decoration: underline; }
.sheet-part { white-space: nowrap; } /* a part of the line of the head never breaks inside; the line breaks only at a "·" */
.sheet-full { padding: 0 0 6px; }
.sheet-full > :first-child { margin-top: 0; }
.sea-sheet .sheet-full .look-slot, .sea-sheet .sheet-full canvas.target-view { margin: 8px 0 0; }
.bsheet .sea-send .warn { padding: 6px 8px; background: var(--sand3); box-shadow: 0 0 0 2px var(--gold1); }
#sea-sheet-how-calculated { white-space: nowrap; } /* the link never breaks in the middle, at 360 and at 1400 (review p-spiel-sammel-1) */
/* The result is on the foot: while the preview or a refusal is shown, the boxes of what is under way give way to the line over the knobs (Nr. 251, p4b-11b). */
.sea-sheet .bsheet-body:has(#sea-preview-result, #preview-refusal) > .sheet-top > .busy { display: none; }
.sea-sheet .bsheet .busy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; margin: 2px; padding: 4px 8px; }
.sea-sheet .bsheet .busy > b, .sea-sheet .bsheet .busy > p { grid-column: 1; }
.sea-sheet .bsheet .busy > .acts { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.sea-sheet .bsheet .busy > .recall-note { grid-column: 1 / -1; }
.sea-sheet .busy-line { margin-bottom: 6px; }
/* "Neuer Kurs" of a fleet that lies (p15-24, draft design/ui-v3/gebiete.html `.opt`): one row per target, the name at the left, the travel time at the right; a link or, for "Heim", the button of the recall form. The sentence stands over it. */
.sea-sheet .course-list { list-style: none; margin: 0; padding: 0; }
.sea-sheet .course-list li, .sea-sheet .course-list form { margin: 0; }
.sea-sheet .course-list .opt { display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: 100%; min-height: 44px; margin: 0; padding: 4px 6px; border: 0; border-bottom: 2px dotted var(--sand2); background: none; color: var(--ink1); font: 400 20px/1.1 var(--font-pixel); text-align: left; text-decoration: none; cursor: pointer; }
.sea-sheet .course-list .opt:hover, .sea-sheet .course-list .opt:focus-visible { background: var(--gold2); }
.sea-sheet .course-list .course-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sea-sheet .course-list .course-time { flex: none; margin-left: auto; font: 400 16px/1.1 var(--font-text); color: var(--wood1); text-align: right; }
.fcard .course-foot { margin-top: 4px; }
.sea-sheet #sea-sheet-card[data-kind="course"] .bhead .lead { white-space: normal; overflow: visible; text-overflow: clip; } /* "5 Kutter · liegt bei Kidd-7 in Heimathafen B02" is longer than a target's line: it breaks instead of being cut */
/* The box of the choice is one line in every window (Nr. 254): the title with the arrival and the knob beside it. */
.sea-sheet .bsheet .busy > p:not(.recall-note) { display: none; }
.sea-sheet .bsheet .busy > b, .sea-sheet .bsheet .busy > .acts { grid-row: 1; }
.sea-sheet .bsheet .busy > b { font-size: 18px; }
@media (max-width: 620px) {
  .sea-sheet .look-slot, .sea-sheet canvas.target-view { height: 64px; }
  .sea-sheet .bsheet .facts { gap: 4px; margin: 4px 0; }
  .sea-sheet .bsheet .facts div { padding: 2px 4px; }
}
@media (max-height: 699px) {
  .sea-sheet .look-slot, .sea-sheet canvas.target-view { display: none; }
}
/* "Schiffe hierher" in the overlay of an own island (p4-08, Nr. 247, 254, 269, 359): while the choice or its result is open, the build part (line of the yield, cost, knobs) gives way, so the choice of ships is the
   middle and both knobs stand in the foot; "Zurück" in the choice closes it. */
.bsheet-body:has(#sea-send-form, #sea-preview-result, #preview-refusal, #sea-send-message) > .island-mid, .bsheet-body:has(#sea-send-form, #sea-preview-result, #preview-refusal, #sea-send-message) > .island-foot { display: none; }
.island-overlay:has(#sea-send-form, #sea-preview-result, #preview-refusal) .bhead h2 { font-size: 24px; }
.island-overlay:has(#sea-send-form, #sea-preview-result, #preview-refusal) .bhead canvas, .island-overlay:has(#sea-send-form, #sea-preview-result, #preview-refusal) .bhead .tile { width: 32px; height: 32px; }
/* On the page of the island the card stands in the flow on a phone: the foot sticks to the lower edge of the window above the tab bar, so it is always in sight. */
@media (max-width: 899px) { .island-overlay .sheet-foot { position: sticky; bottom: var(--bnav); z-index: 1; } }
.island-recalls .recall-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; }
.island-recalls .recall-row form { margin: 0; }
/* The delivery in the sheet (p4-26; draft design/ui-v3/buendnis.html `.give`, `.gain`): the three amounts side by side, the sum under them, one line of text. */
.bsheet .give { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0; }
.bsheet .give label { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.bsheet .give label small { font-size: 16px; line-height: 1.1; color: var(--wood1); }
.bsheet .give input { width: 100%; min-width: 0; min-height: 44px; font: 400 20px/1.1 var(--font-pixel); } /* 20 px like the digits of the steppers, never the 13 px of the browser (Nr. 359 (3)) */
.bsheet .sea-send .gain { margin: 4px 0; }
.send-form.over #sea-cargo-sum { color: var(--red1); }
.bsheet .seg2 { display: flex; margin: 2px 0 4px; } /* also from 900 px, where the page "Bündnis" hides its own switch */
.bsheet .pick { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 2px dotted var(--sand2); }
.bsheet .pick-motif { width: 32px; height: 32px; flex: none; image-rendering: pixelated; }
.bsheet .pick .grow { flex: 1 1 0; min-width: 0; }
.bsheet .pick b { display: block; font: 400 20px/1 var(--font-pixel); }
.bsheet .pick small { display: block; font-size: 16px; line-height: 1.2; color: var(--wood1); }
.bsheet .step { display: flex; align-items: center; flex: none; }
.bsheet .step .btn { width: 44px; min-width: 44px; padding: 0; font: 400 30px/1 var(--font-pixel); }
.bsheet .step input { box-sizing: border-box; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink1); text-align: center; font: 400 30px/1 var(--font-pixel); appearance: textfield; -moz-appearance: textfield; }
.bsheet .step input::-webkit-outer-spin-button, .bsheet .step input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.bsheet .step input:focus-visible { outline: 3px solid var(--glow0); outline-offset: -3px; }
.bsheet .check-tap { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; }
.bsheet .check-tap input { appearance: none; -moz-appearance: none; box-sizing: border-box; width: 28px; height: 28px; margin: 0; display: flex; align-items: center; justify-content: center; background: var(--sand3); box-shadow: 0 0 0 2px var(--ink0); cursor: pointer; }
.bsheet .check-tap input:checked::after { content: "✓"; font: 400 30px/1 var(--font-pixel); color: var(--ink1); }
.bsheet .check-tap input:focus-visible { outline: 3px solid var(--glow0); outline-offset: 3px; }
.bsheet .out { margin: 8px 0; padding: 8px; background: var(--sand3); box-shadow: 0 0 0 2px var(--leaf1); }
.bsheet .out b { display: block; font: 400 20px/1.1 var(--font-pixel); color: var(--leaf1); }
.bsheet .out p { margin: 4px 0 0; }
/* "Schon unterwegs" and "Schon geplant" at the top of the sheet (u2-04; draft `.warn`: parchment, 2 px gold ring; `parch2` is #fff3d6, no step of the palette). */
.bsheet .busy { margin: 8px 2px; padding: 8px; background: #fff3d6; box-shadow: 0 0 0 2px var(--gold1); }
.bsheet .busy b { display: block; font: 400 20px/1.1 var(--font-pixel); }
.bsheet .busy p { margin: 4px 0 0; }
.bsheet .busy .acts { margin-top: 6px; }
.bsheet .wrecks { min-width: 0; margin: 8px 0 0; padding: 0; border: 0; }
.bsheet .wrecks legend { padding: 0; }
.bsheet .sea-send .warn { padding: 6px 8px; background: var(--sand3); box-shadow: 0 0 0 2px var(--gold1); }
.building-page .back { margin: 12px 0 0; }

/* ---------- The captain on the scene (u1-04, draft ".who"; the button "Alle" is gone, u1-09, Nr. 180) ---------- */
/* Over the water, 6 px from the edge of the picture: the portrait (32 px) and the name on ink0 at 70 %. It is absolute, so nothing moves. Without JavaScript the picture is removed (noscript rule in the view) and the chip stands as a row. */
/* The chip as a plain box takes no taps (pointer-events: none). Over the portrait it is a link (u1-06, Nr. 174, 9): `a.who` takes taps, 44 px high, at the first of three
   corners where it covers no sign (harbor_scene_controller, data-corner; none set = top left). Where no corner is free (data-covered) it takes no taps again, the signs win. */
.harbor-scene-frame .who { pointer-events: none; position: absolute; left: 6px; top: 6px; z-index: 2; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 12px); padding: 3px 8px 3px 3px; background: rgba(22,18,26,.7); color: var(--parch); box-shadow: 0 0 0 2px var(--ink0); }
body.pirate .panel .harbor-scene-frame a.who { pointer-events: auto; min-height: 44px; box-sizing: border-box; color: var(--parch); text-decoration: none; }
body.pirate .panel .harbor-scene-frame a.who:hover { background: rgba(22,18,26,.9); }
.harbor-scene-frame a.who:focus-visible { outline: 3px solid var(--glow2); outline-offset: 3px; }
/* The warning of an attack in the frame of the scene (u2-05): at the top, centered over the water; not on the phone, where the band says it. */
.harbor-scene-frame .harbor-alarm { display: none; position: absolute; left: 50%; top: 6px; z-index: 2; transform: translateX(-50%); max-width: calc(100% - 24px); margin: 0; padding: 3px 10px; font: 400 20px/1.1 var(--font-pixel); color: var(--parch2); background: var(--red1); box-shadow: 0 0 0 2px var(--ink0); pointer-events: none; }
@media (min-width: 621px) { .harbor-scene-frame .harbor-alarm { display: block; } }
.harbor-scene-frame .who[data-corner="bottom-left"] { top: auto; bottom: calc(var(--quay-h, 0px) + 6px); }
.harbor-scene-frame .who[data-corner="bottom-right"] { top: auto; bottom: calc(var(--quay-h, 0px) + 6px); left: auto; right: 6px; }
.harbor-scene-frame .who[data-corner="top-right"] { left: auto; right: 6px; }
body.pirate .panel .harbor-scene-frame:has(.harbor-signs:not([data-placed])):not(:has(.harbor-scene-stage[data-state="failed"])) a.who { visibility: hidden; }
body.pirate .panel .harbor-scene-frame a.who[data-covered] { pointer-events: none; }
.who h1 { margin: 0; font-size: 20px; line-height: 1; font-weight: 400; color: var(--parch); overflow-wrap: anywhere; }
.who canvas.portrait { width: 32px; height: 32px; box-shadow: none; }
/* No WebGL: the way to the grid "Alle Gebäude" as a button under the note of the scene, inside the reserved area (so nothing below it moves; Nr. 180, 7). */
.harbor-fallback { display: none; margin: 0; }
.harbor-scene-frame:has(.harbor-scene-stage[data-state="failed"]) .harbor-fallback { display: block; text-align: center; }

/* Empty sentence of a lane: both phrasings in one grid cell (same height), the fallback one with the link only without the picture (decision 187 (2)). */
.lane-empty { display: grid; }
.lane-empty > span { grid-area: 1 / 1; }
.lane-empty .empty-fallback { visibility: hidden; }
body:has(.harbor-scene-stage[data-state="failed"]) .lane-empty .empty-fallback { visibility: visible; }
body:has(.harbor-scene-stage[data-state="failed"]) .lane-empty .empty-live { visibility: hidden; }

/* ---------- Under the scene (u1-04, Nr. 172, 175; draft ".under"; u1-09: goal box and line of facts are gone, Nr. 180) ---------- */
/* The build list (u2-02, draft `.cols`): two cards side by side, one under the other on a phone. The notes and the counter stand over and under both. */
.cols { display: grid; grid-template-columns: 1fr; margin-top: 0; }
.cols > .panel { margin-top: 14px; }
@media (min-width: 900px) {
  .cols { grid-template-columns: 1fr 1fr; column-gap: 14px; align-items: start; }
}
.orders > .note { margin: 14px 0 0; font-size: 16px; color: var(--wood1); }
.orders > .note.warn { color: var(--red1); }
.orders > .count { margin: 14px 0 0; color: var(--ink1); }
.lane-orders .row > canvas.motif { align-self: center; }

/* ---------- The grid "Alle Gebäude" (u1-04, draft ".grid", ".tile"; stilregeln.md, Kachel) ---------- */
/* A tile per building and ship, two columns with 8 px between. The line under the title is "baubar", the running build, or why it is locked (60 %). The words
   may break inside (hyphens, anywhere), so "Siedlerschiff" and "braucht Werft 4 und Rathaus 5" fit into 320 px without overflow. */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
/* The surface is `parch2` of the draft (Nr. 179), no step of the palette (stilregeln.md, Kachel). */
body.pirate .panel a.tile { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; background: #fff3d6; color: var(--ink1); text-decoration: none; box-shadow: 0 0 0 2px var(--sand1); }
body.pirate .panel a.tile:hover { background: var(--sand3); }
body.pirate .panel a.tile:focus-visible { outline: 3px solid var(--glow0); outline-offset: 3px; }
/* Under 360 px the words ("Siedlerschiff", "Verteidigung") do not fit beside the motif: the motif stands above the text, so no word breaks in the middle. */
@media (max-width: 359.98px) { body.pirate .panel a.tile { flex-direction: column; align-items: flex-start; gap: 4px; } }
.tile.locked { opacity: .6; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-text b { display: block; font-weight: 400; font-size: 20px; line-height: 1; overflow-wrap: anywhere; hyphens: auto; }
.tile-sub { font-size: 16px; line-height: 1.2; color: var(--wood1); overflow-wrap: anywhere; hyphens: auto; }
.tile.busy .tile-sub { color: var(--leaf1); }
/* The card of a tile floats at the lower edge of the window at every width (there is no scene on the grid to hold it). */
.tiles-page { padding-bottom: 90px; }
@media (min-width: 900px) {
  .tiles-page .harbor-sheet { position: fixed; left: auto; right: 24px; top: auto; bottom: 24px; width: 340px; max-height: 75vh; }
}

/* Guard reports and finished orders inside a lane's part of the orders area (p2-36). */
.lane-orders .guard h5 { margin: 6px 0 2px; color: var(--wood1); font-size: 19px; }
.lane-orders .reports { margin: 0 0 6px; padding: 0; list-style: none; overflow-wrap: anywhere; }

/* ---------- Fleets page (p2-22) ---------- */
/* The form shows the fields of the checked mission only (:has, no script): the first paint is already right, nothing slides afterwards.
   Everything is one column and may wrap, so 375 px need no sideways scrolling. */
.fleet-form fieldset { min-width: 0; margin: 10px 0 0; padding: 0; border: 0; }
.fleet-form legend { padding: 0; margin-bottom: 4px; color: var(--wood1); }
.fleet-form .missions { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.fleet-form .missions legend { grid-column: 1 / -1; }
.fleet-form .choice { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-right: 12px; cursor: pointer; }
.fleet-form .target .choice { display: flex; margin-right: 0; }
.fleet-form input[type="radio"], .fleet-form input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--wood1); }
.fleet-form .ship-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 2px 0; }
.fleet-form .ship-row label { flex: 1 1 8em; min-width: 0; }
.fleet-form input.count { flex: 0 1 96px; width: 96px; }
.ship-form input.count { flex: 0 1 96px; }
.fleet-form select { margin: 0 0 8px; }
.fleet-form input:focus-visible { outline: 3px solid var(--glow0); outline-offset: 2px; }
.fleet-form .xy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fleet-form .flagship-row { margin: 8px 0 0; }
.fleet-form .btn { margin-top: 12px; }
.fleet-form .target, .fleet-form .only-flagship { display: none; }
.fleet-form-body:has(#mission-attack:checked) .for-attack, .fleet-form-body:has(#mission-settle:checked) .for-settle, .fleet-form-body:has(#mission-station:checked) .for-station, .fleet-form-body:has(#mission-deliver:checked) .for-deliver, .fleet-form-body:has(#mission-salvage:checked) .for-salvage,
.fleet-form-body:has(#mission-explore:checked) .for-explore, .fleet-form-body:has(#mission-save:checked) .for-save { display: block; }
.fleet-form-body:has(#mission-explore:checked) .only-flagship, .fleet-form-body:has(#mission-salvage:checked) .only-flagship { display: block; }
.fleet-form-body:has(#mission-deliver:checked) #fleet-ships .ship-row:not([data-ship="galleon"]), .fleet-form-body:has(#mission-deliver:checked) .for-ships { display: none; } /* a delivery sails with galleons only (p4-26) */
.fleet-form-body:has(#mission-explore:checked) #fleet-ships, .fleet-form-body:has(#mission-salvage:checked) #fleet-ships,
.fleet-form-body:has(#mission-explore:checked) .for-ships, .fleet-form-body:has(#mission-salvage:checked) .for-ships { display: none; }
.fleet-list .txt, .fleet-orders .txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.fleet-list .row, .fleet-orders .row { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; }
.fleet-list form.act, .fleet-orders form.act { margin: 0; flex: none; }

/* ---------- Sea map (p2-23, designs design/grafik/seekarte.html, design/ui-v1-pixel/seekarte-handy.html and -desktop.html) ----------
   The place of the picture is reserved from the first paint on (decision 119): a square on the phone (16 pixels a field, about 20 x 20 fields; 32 from 900 px of window width, Nr. 181), from 700 px of
   window width a fixed height that is never more than 70 % of the window. The picture is drawn into it by PixiJS (canvas lies absolute in the area, which clips
   it); without WebGL the area stays and shows the note. The coordinates have a fixed height, so nothing below the picture moves either. */
.panel.sea-map { padding-top: 20px; container-type: inline-size; }
.sea-map-frame { position: relative; }
/* The tools of the map (u2-01, draft `.maptools`): the shield "Wetter" (p4b-09) and "Heimathafen" (Nr. 181), small knobs at the lower right of the picture, 6 px from the corner; their tap
   area (.btn.sm::after) is 44 px high. Without the picture (no script, no WebGL) they stand in a row under the note, and "Heimathafen" is not offered. */
.maptools { display: flex; justify-content: flex-end; align-items: flex-end; gap: 6px; padding-top: 8px; }
html.rich-ui .sea-map-stage:not([data-state="failed"]) + .maptools { position: absolute; right: 6px; bottom: 6px; z-index: 2; padding: 0; }
.maptools .btn { min-width: 44px; line-height: 1; white-space: nowrap; }
/* The weather shield (p4b-09, draft `.wx`): the motif of the weather (16 x 16 drawn by the script, shown 32 px square), its name, the wind and the next change, a dark plate with an ink edge in the row of the
   tools. 40 px to look at and a knob since the weather map (p4b-10, decision 259 (3)): pointer, tap area 44 px high (the 4 px above and below are `::after`), focus ring; the text may wrap on a narrow phone.
   Like "Heimathafen" it needs the picture. */
.maptools .wx { position: relative; flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border: 0; cursor: pointer; text-align: left;
  color: var(--parch); background: rgba(22, 18, 26, .8); box-shadow: 0 0 0 2px var(--ink0); font: 400 20px/1 var(--font-pixel); }
.maptools .wx::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
.maptools .wx:focus-visible { outline: 3px solid var(--glow2); outline-offset: 3px; }
.wx-motif { flex: none; width: 32px; height: 32px; image-rendering: pixelated; }
.wx-text { min-width: 0; display: block; }
.wx-name, .wx-wind { display: block; }
.wx-wind { font: 400 16px/1.1 var(--font-text); color: var(--sand3); }
html:not(.rich-ui) #sea-map-weather, .sea-map-stage[data-state="failed"] + .maptools #sea-map-weather { display: none; }
.sea-map-nearby #sea-map-weather-sentence { margin: 0 0 8px; }
.maptools { flex-direction: column; align-items: flex-end; row-gap: 12px; } /* the ticks over the row of shield and home; 12 px between: the tap areas of 44 px of the ticks (6 px each side) and of the shield (2 px) do not meet */
.maprow { display: flex; justify-content: flex-end; align-items: flex-end; gap: 6px; max-width: 100%; }
/* The layers (p5b-23a, Nr. 329 (4), 332; draft `.layers`): ticks "Bündnis" and "Nur freie Inseln" in a row of their own over the shield and "Heimathafen" (the three do not fit in one row at 360 px); a tick is a button with
   role checkbox, the box is drawn (the text stays 16 px or more, Nr. 174); ticked = the knob of the tools, not ticked = wood like the draft. Hidden ones take no place. */
.maplayers { display: flex; justify-content: flex-end; gap: 6px; }
.maplayers[hidden], .maplayers [data-layer][hidden] { display: none; }
.maptools [data-layer] { display: inline-flex; align-items: center; gap: 6px; }
.maptools [data-layer]::before { content: ""; flex: none; width: 14px; height: 14px; box-sizing: border-box; box-shadow: inset 0 0 0 2px currentColor; }
.maptools [data-layer][aria-checked="true"]::before { background: radial-gradient(currentColor 0 0) center / 6px 6px no-repeat; }
.maptools [data-layer][aria-checked="false"] { --b: var(--wood2); --hi: var(--wood3); --tx: var(--parch); --drop: 0 0 0 0 transparent; }
html:not(.rich-ui) .maplayers, .sea-map-stage[data-state="failed"] + .maptools .maplayers { display: none; }
/* The legend of the sight (p5b-23a, draft `.legend`; gebiete.html `.leg`; p15-21): a shield "Legende" over the picture at the upper right that opens and folds (the board lies at the left; a sheet lies over it). Open: the signs of the sight as the small
   lines of the picture (same colour and pattern as `SIGHT_LINES` of the controller, 2 px, the fleet 1 px, on the water tone), the water as boxes. Only the shield takes taps (44 px). On the phone the shield is small, opened it spans the picture and leaves out the two signs of the water. */
/* The legend lies over the labels of the map (flags and shields, z-index 1) on every width (p-sammel-18, M2). */
.sea-legend { display: none; }
html.rich-ui .sea-map-stage:not([data-state="failed"]) ~ .sea-legend { display: block; position: absolute; z-index: 2; right: 10px; top: 10px; width: 290px; box-sizing: border-box; padding: 0 8px 8px; pointer-events: none;
  color: var(--ink1); background: rgba(236, 220, 183, .96); box-shadow: 0 0 0 2px var(--sand1), 0 0 0 4px var(--ink0); font: 400 16px/1.25 var(--font-text); }
html.rich-ui .sea-map-stage:not([data-state="failed"]) ~ .sea-legend[data-open="false"] { width: auto; padding-bottom: 0; }
.sea-legend .legend-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; box-sizing: border-box; width: 100%; min-width: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: 400 20px/1.1 var(--font-pixel); cursor: pointer; pointer-events: auto; }
.sea-legend .legend-toggle:focus-visible { outline: 3px solid var(--glow2); outline-offset: 2px; }
.sea-legend .legend-toggle::after { content: ""; flex: none; border: 5px solid transparent; border-top: 6px solid var(--ink1); border-bottom: 0; } /* a small arrow: down when it can open, up when open */
.sea-legend[data-open="true"] .legend-toggle::after { border-top: 0; border-bottom: 6px solid var(--ink1); }
.sea-legend[data-open="false"] ul { display: none; }
.sea-legend ul { margin: 0; padding: 0; list-style: none; }
.sea-legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.sea-legend li[hidden] { display: none; }
.sea-legend i { flex: 0 0 28px; height: 14px; box-sizing: border-box; background-color: #2b4a5b; background-repeat: no-repeat; background-size: 100% 2px; background-position: 0 6px; }
.sea-legend .legend-mist i { background: rgb(54, 80, 142); box-shadow: inset 0 0 0 2px rgba(143, 166, 224, .9); } /* the blue fog of the navy: blue field, light rim, as `.sea-map-key.mist` (p15-20, draft gebiete.html) */
.sea-legend .legend-me i { background-image: repeating-linear-gradient(90deg, #f8dc92 0 6px, transparent 6px 10px); }
.sea-legend .legend-fleet i { background-image: repeating-linear-gradient(90deg, #ecdcb7 0 3px, transparent 3px 7px); background-size: 100% 1px; background-position: 0 7px; }
.sea-legend .legend-isl i { background-image: repeating-linear-gradient(90deg, #9fd67a 0 6px, transparent 6px 9px, #9fd67a 9px 11px, transparent 11px 14px); }
.sea-legend .legend-al i { background-color: #285456; background-image: repeating-linear-gradient(90deg, #8fd0e8 0 2px, transparent 2px 6px); }
.sea-legend .legend-old i, .sea-legend .legend-old-alone i { background: #1e3243; }
.sea-legend .legend-fog i { background: #101a26; }
@media (max-width: 620px) {
  html.rich-ui .sea-map-stage:not([data-state="failed"]) ~ .sea-legend { left: 6px; right: 6px; top: 6px; width: auto; padding: 0 6px 6px; }
  html.rich-ui .sea-map-stage:not([data-state="failed"]) ~ .sea-legend[data-open="false"] { left: auto; padding: 0 10px 0 8px; } /* folded: the small shield at the upper right */
  .sea-legend .legend-old, .sea-legend .legend-fog { display: none; }
  .sea-legend li { padding: 1px 0; }
}
/* The weather map (p4b-10, draft `.times`, `.grid9`, `.cell`, `.legend`): a sheet of the sea map (`.sea-sheet`, same frame and place); the 81 cells are 16 px drawings shown larger with nearest neighbour,
   a cell is a button (keys, 40 px and more on the phone), the pallor of an uncertain change is a veil of the draft (18 % for the next, 32 % for the one after), home = gold frame, chosen = light ring. */
.weather-sheet .bhead canvas.motif { width: 32px; height: 32px; }
.times { display: flex; margin: 6px 4px 0; }
.times .time { flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; cursor: pointer;
  font: 400 20px/1 var(--font-pixel); color: var(--parch); background: var(--wood2); box-shadow: inset 0 0 0 2px var(--wood0), 0 0 0 2px var(--ink0); }
.times .time small { font: 400 16px/1 var(--font-text); color: var(--sand3); }
.times .time[aria-pressed="true"] { color: var(--ink0); background: var(--gold1); box-shadow: inset 0 0 0 2px var(--gold2), 0 0 0 2px var(--ink0); }
.times .time[aria-pressed="true"] small { color: var(--wood0); }
.times .time:focus-visible, .grid9 .wcell:focus-visible { outline: 3px solid var(--glow2); outline-offset: 2px; z-index: 1; }
.grid9 { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; margin: 12px auto 8px; padding: 2px; max-width: 290px; background: var(--ink0); }
/* A low desktop window (1400 x 700: the picture is the window less 216 px, so the sheet has 456 px): the grid a little smaller, so the legend stays in the sheet and nothing scrolls (Nr. 247/254). */
@media (min-width: 900px) and (max-height: 759.98px) { .grid9 { max-width: 250px; margin: 8px auto 6px; } }
.grid9 .wcell { position: relative; display: block; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; aspect-ratio: 1; }
.grid9 .wcell canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.grid9 .wcell[data-pale="1"]::before, .grid9 .wcell[data-pale="2"]::before { content: ""; position: absolute; inset: 0; background: rgba(236, 220, 183, .18); }
.grid9 .wcell[data-pale="2"]::before { background: rgba(236, 220, 183, .32); }
.grid9 .wcell.home::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--glow1); }
.grid9 .wcell[aria-pressed="true"] { outline: 2px solid var(--parch2); outline-offset: -5px; }
.weather-sheet .cell { margin: 6px 4px 0; padding: 6px 8px; background: var(--sand3); }
.weather-sheet .cell b { display: block; font: 400 20px/1.1 var(--font-pixel); }
.weather-sheet .cell span { font-size: 16px; line-height: 1.3; }
.weather-sheet .legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 4px 0; font-size: 16px; color: var(--wood1); }
.weather-sheet .legend span { display: flex; align-items: center; gap: 4px; }
.weather-sheet .legend canvas { width: 20px; height: 20px; image-rendering: pixelated; }
html:not(.rich-ui) #sea-map-home, .sea-map-stage[data-state="failed"] + .maptools #sea-map-home { display: none; }
/* The list "Bekannt in der Nähe" is the fallback without JS or WebGL (Nr. 180): with both it is not in the flow. html.rich-ui is set by the script in the head of the layout. */
html.rich-ui .sea-map-nearby { display: none; }
/* The form "Flotte senden" is the same fallback (u2-04, Nr. 209): with the picture every mission is sent from the sheet of the target. */
html.rich-ui .sea-map-send { display: none; }
.sea-map-send { margin: 14px 0 0; }

/* ---------- The fleet board (u2-03, Nr. 209; draft `.board`, `.fcard`, `.way`, `.flag`) ---------- */
/* Without the picture the board is a card in the flow above the list "Bekannt in der Nähe" (no script: both forms work). With the picture (html.rich-ui) it lies over the map: desktop 290 px
   wide at the left, 10 px from the top and bottom; phone: a strip at the lower edge that grows to 300 px. It is absolute, so folding and unfolding move nothing (Muster 7). */
/* `parch2` of the draft is #fff3d6, no step of the palette (stilregeln.md, Kachel; Review u2-03: `var(--parch2)` is not defined here). */
.fleet-board { margin: 14px 0 0; padding: 10px; background: #fff3d6; color: var(--ink1); box-shadow: 0 0 0 2px var(--sand1); }
.board-toggle, .board-count, .board-summary, .board-chev { display: none; }
.board-none { margin: 0; padding: 4px 0; font-size: 20px; line-height: 1.2; color: var(--wood1); }
.board-cards { display: block; }
.fcard { position: relative; margin: 8px 0 0; padding: 6px 8px; background: #fff3d6; color: var(--ink1); box-shadow: 0 0 0 2px var(--sand1); cursor: pointer; }
.board-cards > .fcard:first-child { margin-top: 0; }
.fcard.sel { box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--glow1); }
.fcard.foe { background: #f6dccb; box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--red2); }
.fcard.navy { background: #dfe0f1; box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--mar2); } /* the punitive expedition (p5-23, draft marine.html): the card in Marine blue, nothing red */
.fcard.ally { background: #e3ecd2; box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--leaf2); cursor: default; } /* the help of a member that comes (p4-25): no attack, a green frame */
.fcard:focus-visible { outline: 3px solid var(--glow2); outline-offset: 3px; }
.fcard b { display: block; font: 400 20px/1.1 var(--font-pixel); overflow-wrap: anywhere; }
.fcard small { display: block; font-size: 16px; line-height: 1.25; color: var(--wood1); }
.fcard .ships { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 4px 0; font: 400 20px/1 var(--font-pixel); }
.fcard .ships span { display: flex; align-items: center; gap: 3px; }
.fcard canvas.motif { width: 24px; height: 24px; image-rendering: pixelated; }
.way { position: relative; height: 8px; margin: 6px 2px 8px; background: var(--sand2); box-shadow: 0 0 0 2px var(--ink0); }
.way i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold1); }
.way.back i { background: var(--leaf2); }
.way.wait i { background: repeating-linear-gradient(90deg, var(--wood2) 0 4px, transparent 4px 8px); }
.way.foe i { background: var(--red1); }
.fcard .foot { display: flex; align-items: center; gap: 8px; }
.fcard .foot small { flex: 1; }
.fcard .foot form { margin: 0; flex: none; }
.fcard .foot .btn { white-space: nowrap; }
.fcard .recall-note { margin-top: 2px; }
/* The flags over the picture: HTML, set by the controller, taking no taps. */
.sea-map-flags { display: none; }
html.rich-ui .sea-map-stage:not([data-state="failed"]) ~ .sea-map-flags { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.sea-map-flags .flag { position: absolute; transform: translate(8px, -24px); padding: 1px 4px; font: 400 20px/1 var(--font-pixel); color: var(--ink0); background: #fff3d6; box-shadow: 0 0 0 2px var(--ink0); white-space: nowrap; }
.sea-map-flags .flag.back { background: var(--sand3); }
.sea-map-flags .flag.wait { background: var(--sand3); border-bottom: 3px dotted var(--wood1); }
.sea-map-flags .flag.navy { color: #fff; background: var(--mar1); }
.sea-map-flags .flag.old { color: var(--sand3); background: var(--ink1); } /* "frei? Mo": a free island seen before this tick (p5b-23b) */
.sea-map-flags .flag.al { background: #8fd0e8; }
.sea-map-flags .flag.shield { background: var(--gold2); } /* the shield of a free island with a yield factor over 1 (p15-22b) */
.sea-map-flags .flag.foe { color: #fff3d6; background: var(--red1); }
/* The target of a fleet that sails at the captain (u2-05): a red ring that fades in and out quietly (no hard blink); reduced motion keeps it still. */
.sea-map-flags .blink { position: absolute; width: 28px; height: 28px; box-sizing: border-box; transform: translate(-50%, -50%); border: 3px solid var(--red2); box-shadow: 0 0 0 2px var(--ink0); animation: target-blink 2.4s ease-in-out infinite; }
.sea-map-flags .blink.navy { border-color: var(--mar2); } /* the target of the punitive expedition blinks in Marine blue */
@keyframes target-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .sea-map-flags .blink { animation: none; } }
html.rich-ui .panel.sea-map { position: relative; }
html.rich-ui .fleet-board { position: absolute; z-index: 3; left: 10px; top: 10px; width: 290px; max-height: calc(100% - 20px); box-sizing: border-box; display: flex; flex-direction: column; margin: 0; padding: 18px 8px 8px; background: var(--parch); box-shadow: 0 0 0 2px var(--sand1), 0 0 0 4px var(--ink0); }
html.rich-ui .board-cards { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 4px 4px; margin: 0 -4px; }
html.rich-ui .board-cards > .fcard:first-child { margin-top: 4px; }
html.rich-ui .board-toggle { display: flex; align-items: center; gap: 8px; position: absolute; left: 8px; top: -2px; z-index: 1; min-height: 26px; padding: 3px 8px; font: 400 20px/1 var(--font-pixel); color: var(--parch); background: var(--wood2); border: 0; cursor: pointer; box-shadow: inset 0 0 0 2px var(--wood3), 0 0 0 2px var(--ink0); }
.board-toggle::after { content: ""; position: absolute; left: -4px; right: -4px; top: -9px; bottom: -9px; }
.board-toggle:focus-visible { outline: 3px solid var(--glow2); outline-offset: 3px; }
html.rich-ui .board-chev { display: block; width: 0; height: 0; border: 5px solid transparent; border-right-color: currentColor; border-left-width: 0; }
/* Folded on the desktop: only the sign "Flotten" with the number and the arrow, as small as itself; folded by itself when there is nothing to show, unless it was unfolded by hand. The board is as high as its cards (up to the lower edge of the map, then the cards scroll). */
@media (min-width: 621px) {
  html.rich-ui .fleet-board[data-open="false"], html.rich-ui .fleet-board[data-empty]:not([data-open="true"]) { width: auto; padding: 0; }
  html.rich-ui .fleet-board[data-open="false"] .board-cards, html.rich-ui .fleet-board[data-empty]:not([data-open="true"]) .board-cards { display: none; }
  html.rich-ui .fleet-board[data-open="false"] .board-count, html.rich-ui .fleet-board[data-empty]:not([data-open="true"]) .board-count { display: inline; font-style: normal; }
  html.rich-ui .fleet-board[data-open="false"] .board-toggle, html.rich-ui .fleet-board[data-empty]:not([data-open="true"]) .board-toggle { position: static; min-height: 32px; padding: 4px 10px; }
  html.rich-ui .fleet-board[data-open="false"] .board-chev, html.rich-ui .fleet-board[data-empty]:not([data-open="true"]) .board-chev { border-left-width: 5px; border-right-width: 0; border-left-color: currentColor; border-right-color: transparent; }
}
@media (max-width: 620px) {
  html.rich-ui .fleet-board { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 300px; padding: 52px 8px 8px; box-shadow: 0 -3px 0 var(--ink0), 0 -6px 0 var(--gold1), 0 -9px 0 var(--ink0); }
  html.rich-ui .fleet-board:not([data-open="true"]) { height: 48px; padding: 0; }
  html.rich-ui .fleet-board:not([data-open="true"]) .board-cards { display: none; }
  html.rich-ui .board-toggle, html.rich-ui .fleet-board:not([data-open="true"]) .board-toggle { left: 0; right: 0; top: 0; width: auto; min-height: 48px; padding: 0 12px; justify-content: space-between; box-shadow: none; background: var(--wood2); }
  .board-toggle { touch-action: none; }
  .board-toggle::after { content: none; } /* the strip itself is 48 px high; a hit area below it would make the page scroll */
  html.rich-ui .board-title, html.rich-ui .board-count { display: none; }
  html.rich-ui .board-summary { display: block; font-size: 20px; }
  html.rich-ui .board-chev, html.rich-ui .fleet-board[data-open="false"] .board-chev { border-width: 5px; border-top-width: 0; border-color: transparent; border-bottom-color: currentColor; }
  html.rich-ui .fleet-board[data-open="true"] .board-chev { border-bottom-width: 0; border-top-width: 5px; border-bottom-color: transparent; border-top-color: currentColor; }
  html.rich-ui .sea-map-stage:not([data-state="failed"]) + .maptools { bottom: 63px; }
}
/* On the map page a message does not push the picture down (it lies over the lower edge, as on the harbor), so striking or recalling moves nothing (Muster 7). */
body.map-page .flash { position: fixed; left: 9px; right: 9px; bottom: calc(9px + var(--bnav)); z-index: 20; margin: 0 auto; max-width: 1162px; pointer-events: none; }
/* On the phone the closed strip of the board (48 px, with the picture) lies at the lower edge: the message stands above it, not over it (u2-04, Review u2-03). */
@media (max-width: 620px) {
  html.rich-ui body.map-page .flash { bottom: calc(66px + var(--bnav)); }
}
.sea-map-stage { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1; background: var(--deep); touch-action: none; user-select: none; line-height: 0; cursor: grab;
  box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--wood2), 0 0 0 9px var(--ink0); }
.sea-map-stage:focus-visible { outline: 3px solid var(--glow2); outline-offset: 12px; }
.sea-map-stage:active { cursor: grabbing; }
@media (min-width: 700px) {
  .sea-map-stage { aspect-ratio: auto; height: min(70vh, 640px); }
}
/* With the picture (html.rich-ui) the map fills the window under the head and the tabs, inside the frame (u1-12, Nr. 181; u2-01): the page is as high as the window, the frame takes what
   is left, the picture what is left of the frame (at least 420 px on a wide window, so a small laptop still shows a map; there the page may scroll). Without the picture the old layout
   stays: the stage as above and the list below it. */
html.rich-ui body.map-page { display: flex; flex-direction: column; height: 100dvh; }
html.rich-ui body.map-page > *, html.rich-ui body.map-page > .top > * { flex: none; }
html.rich-ui body.map-page > .top > nav.tabs { width: 100%; }
html.rich-ui body.map-page > main.page { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: 1186px; box-sizing: border-box; padding: 0; }
html.rich-ui body.map-page .stage { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
@media (max-width: 620px) {
  html.rich-ui body.map-page .stage { margin-bottom: 0; }
}
/* The draft shows the picture in a frame of 3 px ink and without a panel of its own; the tab "Seekarte" is its title. */
html.rich-ui .panel.sea-map { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 0; background: none; box-shadow: none; }
html.rich-ui .sea-map-stage { box-shadow: 0 0 0 3px var(--ink0); }
html.rich-ui .sea-map-stage:focus-visible { outline-offset: -3px; }
html.rich-ui .sea-map-live, html.rich-ui .sea-map-frame { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
html.rich-ui .sea-map-stage { aspect-ratio: auto; flex: 1 1 0; height: auto; min-height: 0; }
@media (min-width: 900px) {
  html.rich-ui .sea-map-stage { min-height: 420px; }
}
html.rich-ui body.map-page main.page:has(.sea-map-stage[data-state="failed"]) { flex: none; }
.sea-map-stage canvas { position: absolute; left: 0; top: 0; display: block; image-rendering: pixelated; }
.sea-map-note { display: none; margin: 0; padding: 12px; line-height: 1.3; font-size: 0.9rem; color: var(--foam); }
.sea-map-stage[data-state="failed"] .sea-map-note { display: block; }
.sea-map-nearby { margin: 14px 0 0; }
.sea-map-nearby-list { margin: 0; padding: 0; list-style: none; font-size: 20px; line-height: 24px; color: var(--wood1); }
/* All foldable rows (p2-sammel-karte-3, helper fold_summary): arrow in the colour of the text (▸ closed, ▾ open); a named row keeps its text, the fold of a list says "weniger zeigen" when open (u1-06); the row keeps its 44 px, nothing jumps. */
.more > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 6px; cursor: pointer; font-size: 20px; line-height: 24px; color: var(--wood1); list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: ""; flex: none; width: 10px; height: 12px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.more[open] > summary::before { width: 12px; height: 10px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.more > summary:focus-visible { outline: 3px solid var(--glow2); outline-offset: -3px; }
.more > summary .fold-less, .more[open] > summary .fold-more { display: none; }
.more[open] > summary .fold-less { display: inline; }
.sea-map-pick { display: block; text-decoration: none; width: 100%; min-height: 44px; padding: 8px 6px; border: 0; text-align: left; font: inherit; letter-spacing: normal; color: inherit; background: none; cursor: default; box-shadow: inset 0 -2px 0 rgba(22,18,26,.18); }
a.sea-map-pick { cursor: pointer; }
body.pirate a.sea-map-pick { color: inherit; } /* the entries are links (A4) but keep the look of the list, not the colour of links */
.sea-map-reason { display: block; }
.sea-map-pick:is(a):hover { background: rgba(22,18,26,.06); }
.sea-map-pick:focus-visible { outline: 3px solid var(--glow2); outline-offset: -3px; }
.sea-map-nearby-list li form.act { margin: 2px 0 8px 6px; } /* "In die Bauliste" under an own island of the list (p4-07) */
body.pirate .row .sub a.isle-link { color: inherit; text-decoration: underline; } /* the island of an entry of the build list leads to the sea map (p4-07) */
.sea-map-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-size: 20px; line-height: 1.1; color: var(--wood1); }
.sea-map-legend li { display: flex; align-items: center; gap: 6px; }
.sea-map-key { flex: none; width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--ink0); background: var(--sea2); }
.sea-map-key canvas { display: block; width: 32px; height: 32px; image-rendering: pixelated; }
.sea-map-key.own { box-shadow: 0 0 0 2px var(--glow2); }
.sea-map-key.route-ahead { background: radial-gradient(circle at 50% 50%, rgba(248,220,146,.75) 0 4px, var(--ink0) 5px 6px, var(--sea2) 7px); } /* the small dot of the way still to go */
.sea-map-key.fog { background: #101a26; }
/* The lines of the sight (p15-21): the signs of the legend of the sea map at the size of this list (32 px), the same colours and patterns as the lines of the picture (2 px, the fleet 1 px) */
.sea-map-key[class*="line-"] { background-color: #2b4a5b; background-repeat: no-repeat; background-size: 100% 2px; background-position: 0 15px; }
.sea-map-key.line-me { background-image: repeating-linear-gradient(90deg, #f8dc92 0 6px, transparent 6px 10px); }
.sea-map-key.line-fleet { background-image: repeating-linear-gradient(90deg, #ecdcb7 0 3px, transparent 3px 7px); background-size: 100% 1px; }
.sea-map-key.line-isl { background-image: repeating-linear-gradient(90deg, #9fd67a 0 6px, transparent 6px 9px, #9fd67a 9px 11px, transparent 11px 14px); }
.sea-map-key.line-al { background-color: #285456; background-image: repeating-linear-gradient(90deg, #8fd0e8 0 2px, transparent 2px 6px); }
.sea-map-key.seen-earlier { background: #1e3243; }
.sea-map-key.mist { background: rgb(54,80,142); box-shadow: inset 0 0 0 2px rgba(143,166,224,.9); } /* the blue fog of the navy (p15-20, draft gebiete.html): blue field, light rim */

/* The preview dialog and the calculator on the fleet page (p2-24). Blocks stay one column and wrap, so 375 px does not scroll sideways. */
.preview { margin-top: 12px; padding: 8px 10px; background: #fff4d6; color: var(--ink1); }
.preview h3 { margin: 0 0 6px; }
.preview dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; }
.preview dt { color: var(--wood1); }
.preview dd { margin: 0; min-width: 0; overflow-wrap: break-word; }
.preview .variants { grid-column: 2; display: flex; flex-direction: column; font-size: 16px; }
.preview .preview-warning { padding: 4px 6px; border-left: 4px solid var(--red1); }
.preview .confirm .btn { margin-top: 12px; }
.preview ul { margin: 6px 0 0; padding-left: 18px; }
.calculator .side { margin-top: 10px; }
.calculator .ship-row label { flex: 1 1 8em; }
.calculator-body > .choice { display: flex; }
@media (max-width: 480px) {
  .preview dl { grid-template-columns: 1fr; gap: 0; }
  .preview dd { margin-bottom: 6px; }
  .preview .variants { grid-column: 1; }
}

/* The pages "Berichte" and "Rangliste" in the frame (u2-06; draft design/ui-v3/v3.css `.two`, `.rep`, `.seg`, `table.rk`). */
.two { display: block; }
.two > div, .detail, .box { background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); padding: 10px; }
.box { min-height: 520px; }
.detail { display: block; min-width: 0; }
.detail .h3 { margin: 0 0 4px; font: 400 30px/1 var(--font-pixel); color: var(--ink1); }
.detail small { color: var(--wood1); }
.detail .msg { margin: 8px 0 0; overflow-wrap: anywhere; }
/* The account of a fight in sections (u2-07; draft design/ui-v2/berichte.html `.verdict`, `.sec`, `.vs`, `.parts`, `table.t`). */
.detail .verdict { display: inline-block; margin: 6px 0 8px; padding: 3px 8px; font: 400 20px/1 var(--font-pixel); color: var(--parch2); background: var(--leaf); box-shadow: 0 0 0 2px var(--ink0); }
.detail .verdict.lost { background: var(--red1); }
.detail .pill.navy { display: inline-block; margin: 6px 0 8px 4px; padding: 3px 8px; font: 400 20px/1 var(--font-pixel); color: var(--parch2); background: var(--mar1); box-shadow: 0 0 0 2px var(--ink0); } /* the mark "Marine" beside the verdict (draft marine.html `.pill.navy`) */
.detail .sec { border-top: 3px solid var(--ink1); padding: 8px 0 10px; min-width: 0; }
.detail .sec h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font: 400 20px/1 var(--font-pixel); }
.detail .sec h3 i { font-style: normal; padding: 1px 6px; color: var(--gold2); background: var(--ink1); }
.detail .sec.off { color: var(--wood1); }
.detail .sec.off h3 i { color: var(--ink1); background: var(--sand2); }
.detail .vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; margin: 2px 0 6px; text-align: center; font: 400 30px/1 var(--font-pixel); overflow-wrap: anywhere; }
.detail .vs small { display: block; font: 400 16px/1.2 var(--font-text); color: var(--wood1); }
.detail .vs em { font-style: normal; font-size: 20px; color: var(--wood1); }
.detail .parts { margin: 0 0 4px; font-size: 16px; line-height: 1.35; color: var(--wood1); overflow-wrap: anywhere; }
.detail table.t { width: 100%; margin: 4px 0 2px; border-collapse: collapse; font: 400 20px/1.2 var(--font-pixel); color: var(--ink1); }
.detail table.t caption { padding: 4px 0 2px; text-align: left; overflow-wrap: anywhere; }
.detail table.t th { padding: 2px 4px; text-align: right; font: 400 16px/1.2 var(--font-text); color: var(--wood1); border-bottom: 2px solid var(--sand2); }
.detail table.t td { padding: 3px 4px; text-align: right; border-bottom: 2px dotted var(--sand2); }
.detail table.t th:first-child, .detail table.t td:first-child { text-align: left; }
.detail table.t td.l { color: var(--red1); }
.detail table.t td canvas.motif { width: 24px; height: 24px; margin-right: 4px; vertical-align: middle; image-rendering: pixelated; }
.detail .back { display: none; margin: 0 0 8px; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.two > .list { min-width: 0; }
.reps { margin: 0; padding: 0; list-style: none; }
/* A line is a link, at least 44 px high; the mark at the edge: green won or good, red lost, sand a note. */
.rep { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 8px 4px; border-bottom: 2px dotted var(--sand2); color: var(--ink1); text-decoration: none; }
.rep .mark { flex: 0 0 8px; align-self: stretch; background: var(--leaf); }
.rep.lost .mark { background: var(--red1); }
.rep.info .mark { background: var(--sand2); }
.rep.navy .mark { background: var(--mar1); } /* the edge of a report of the navy in Marine blue (Nr. 263, draft marine.html `.rep.navy`; Nr. 174: blue only for the navy) */
.rep .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rep b { display: block; font: 400 20px/1.1 var(--font-pixel); color: var(--ink1); }
.rep small { display: block; font-size: 16px; color: var(--wood1); }
.rep.cur { background: var(--sand3); }
.rep .amt { flex: none; font: 400 20px/1 var(--font-pixel); color: var(--leaf); }
.rep.lost .amt { color: var(--red1); }
.rep:focus-visible { outline: 3px solid var(--glow0); outline-offset: -3px; }
.reps .daycap { margin: 10px 0 2px; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.reps .replist { margin: 0; padding: 0; list-style: none; } /* a list for every day (screen readers name the lines), no bullets, no space of its own */
.seg.filters { flex-wrap: wrap; gap: 4px; }
.seg.filters span, .seg.filters a { padding: 0 6px; }
/* A group of lines of one rule (Nr. 325, as on the morning page): a <details>; the summary is a line `.rep`, opened it shows the single lines under it, indented. */
.reps details.evgroup > summary { list-style: none; cursor: pointer; font: inherit; letter-spacing: normal; }
.reps details.evgroup > summary::-webkit-details-marker { display: none; }
.reps details.evgroup > summary small u { color: var(--ink1); }
.reps details.evgroup > summary:focus-visible { outline: 3px solid var(--glow0); outline-offset: -3px; }
.reps details.evgroup[open] > a.rep { margin-left: 12px; }
.older { display: flex; align-items: center; min-height: 44px; padding: 0 4px; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
/* Phone: the list, or after a tap only the report with the way back. From 900 px the two stand side by side (the right one is then 475 px or wider). */
@media (max-width: 899.98px) {
  .two:not(:has([data-open="true"])) .detail { display: none; }
  .two:has([data-open="true"]) .list { display: none; }
  .detail .back { display: flex; align-items: center; min-height: 44px; }
}
@media (min-width: 900px) {
  .two { display: grid; grid-template-columns: 360px 1fr; gap: 10px; min-height: 520px; }
  .two > div { align-self: start; }
  .two.alliance { grid-template-columns: 420px 1fr; align-items: start; } /* the page "Bündnis": the alliance at the left, the messages (p4-24) at the right */
}
.seg { display: flex; gap: 6px; margin: 0 0 8px; }
.seg span, .seg a { min-height: 36px; display: flex; align-items: center; padding: 0 10px; font: 400 20px/1 var(--font-pixel); color: var(--parch); background: var(--wood2); box-shadow: inset 0 0 0 2px var(--wood3), 0 0 0 2px var(--ink0); }
.seg a { text-decoration: none; }
.seg .on { background: var(--gold1); color: var(--ink0); }
/* The box "Dein Fahndungswert" (p5-23, Nr. 284; draft marine.html `.mine`, `.meter`): the value against S, the mark at the half where the notice board starts. */
.mine { margin-top: 12px; padding: 8px 10px; background: var(--parch); box-shadow: 0 0 0 2px var(--sand2); font: 400 20px/1.2 var(--font-pixel); color: var(--ink1); }
.mine .meter { position: relative; height: 12px; margin: 6px 0; background: var(--sand1); box-shadow: 0 0 0 2px var(--ink0); }
.mine .meter i { display: block; height: 100%; background: var(--mar1); }
.mine .meter u { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--ink0); text-decoration: none; }
table.rk { width: 100%; border-collapse: collapse; font: 400 20px/1.2 var(--font-pixel); color: var(--ink1); }
table.rk td, table.rk th { padding: 6px; border-bottom: 2px dotted var(--sand2); text-align: left; font-weight: 400; vertical-align: middle; }
table.rk th { color: var(--wood1); }
table.rk td:last-child, table.rk th:last-child { text-align: right; }
table.rk.captains td:nth-child(3) { font: 400 16px/1.2 var(--font-text); } /* "Zum Vortag" (p-einfach-b3: four columns, Platz, Kapitän, Zum Vortag, Ruhm) */
table.rk.captains td:nth-child(4), table.rk.captains th:nth-child(4) { text-align: right; }
@media (max-width: 699.98px) {
  table.rk.captains td:nth-child(3) { font-size: 14px; }
  /* A long name at 320 px (p-sammel-6, review p-einfach-b3): the head words and the cell padding took the room and left the name 47 px, so it broke after six letters. As the board of the alliances does
     (16 px head, 4 px at the sides) and the column of the name takes what is left; `hyphens` breaks a long German word at a syllable where the browser knows the language (`lang` of the page). */
  table.rk.captains td, table.rk.captains th { padding: 6px 4px; }
  table.rk.captains th { font-size: 16px; }
  table.rk.captains th:nth-child(2) { width: 100%; }
  table.rk.captains .who-cell > span { hyphens: auto; }
}
table.rk tr.me td { background: var(--sand3); }
table.rk canvas.portrait { width: 32px; height: 32px; }
table.rk .who-cell { gap: 8px; min-height: 32px; }
table.rk .who-cell > span { min-width: 0; overflow-wrap: anywhere; } /* a name of 24 letters breaks instead of making the table wider than a 320 px window */
table.rk.alliances td, table.rk.alliances th { padding: 6px 4px; }
table.rk.alliances th { font-size: 16px; }
/* The shield "Aushang" (p5-24; draft marine.html `.facts`, `.tagn`, pictures 3, 4, 8): five figures (two columns on a phone), the list with a column for the retaliation and the expedition, on a phone only name and value. */
.notice-facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 8px; }
.notice-facts div { min-width: 0; padding: 4px 8px; background: var(--sand3); color: var(--ink1); }
.notice-facts small { display: block; font: 400 16px/1.2 var(--font-text); color: var(--wood1); }
.notice-facts b { font: 400 20px/1.1 var(--font-pixel); overflow-wrap: anywhere; }
.notice .txt { margin: 8px 0; font: 400 20px/1.2 var(--font-pixel); color: var(--ink1); }
.notice .note { margin: 8px 0; }
table.notice-list small { display: block; font: 400 16px/1.2 var(--font-text); color: var(--wood1); }
table.notice-list td:nth-child(3) { font: 400 20px/1.2 var(--font-pixel); }
table.notice-list td:nth-child(2) { font: 400 20px/1.2 var(--font-pixel); }
.tagn { display: inline-block; padding: 1px 6px; font: 400 20px/1 var(--font-pixel); background: var(--mar1); color: #fff; }
.phone-only { display: none !important; }
@media (max-width: 699.98px) {
  .notice-facts { grid-template-columns: repeat(2, 1fr); }
  table.notice-list .wide-only { display: none; }
  table.notice-list .phone-only { display: block !important; }
  table.notice-list canvas.portrait { display: none; }
}
table.rk.alliances td:nth-child(2) { font-size: 18px; overflow-wrap: anywhere; } /* a long alliance name breaks instead of widening the table (p4-27) */
table.rk.alliances td:nth-child(3) { font: 400 20px/1.2 var(--font-pixel); }
table.rk.alliances td:nth-child(3), table.rk.alliances th:nth-child(3) { text-align: right; } /* the head "Mitglieder" stands right like the numbers (review p4-27) */
table.rk.alliances td:nth-child(4) { font: 400 16px/1.2 var(--font-text); } /* "Zum Vortag": 16 px like the captains, 14 px only in a narrow window (review p4-27) */
@media (max-width: 699.98px) { table.rk.alliances td:nth-child(4) { font-size: 14px; } }
table.rk.alliances .now { font-size: 14px; }
table.rk.alliances td:last-child { text-align: right; }
table.rk .now { display: block; white-space: nowrap; color: var(--wood1); font-family: var(--font-text); font-size: 16px; }
.box .final { margin: 0 0 4px; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.box .note { margin: 6px 0; font-size: 16px; color: var(--wood1); }

/* The page "Bündnis" (p4-23; draft design/ui-v3/buendnis.html `.hd`, `.mem`, `.lab`, `.dlg`). */
.alliance .hd { margin: 0 0 2px; font: 400 30px/1 var(--font-pixel); color: var(--ink1); overflow-wrap: anywhere; }
.alliance .sub { margin: 0 0 8px; font-size: 16px; color: var(--wood1); }
.alliance .lab { margin: 12px 0 4px; padding-top: 8px; border-top: 3px solid var(--ink1); font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.alliance .members { margin: 0; padding: 0; list-style: none; }
.alliance .mem { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 2px dotted var(--sand2); }
.alliance .mem canvas.portrait { width: 40px; height: 40px; }
.alliance .mem .grow { flex: 1 1 120px; min-width: 120px; overflow-wrap: anywhere; } /* the buttons wrap under name and Ruhm instead of squeezing the name (320 px) */
.alliance .mem b { display: block; font: 400 20px/1.1 var(--font-pixel); color: var(--ink1); }
.alliance .mem small { display: block; font-size: 16px; line-height: 1.2; color: var(--wood1); }
/* The crews between him and the members (p4-25): the same rows as the members, without a portrait. */
.alliance .crew-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-bottom: 2px dotted var(--sand2); }
.alliance .crew-row .grow { flex: 1 1 120px; min-width: 120px; overflow-wrap: anywhere; }
.alliance .crew-row form { margin: 0; }
.alliance .crew-row b { display: block; font: 400 20px/1.1 var(--font-pixel); color: var(--ink1); }
.alliance .crew-row small { display: block; font-size: 16px; line-height: 1.2; color: var(--wood1); }
.alliance .crew-row .recall-note { flex-basis: 100%; }
.alliance .tag { padding: 1px 5px; background: var(--gold2); color: var(--ink1); }
.alliance .tag.me { background: var(--ink1); color: var(--gold2); }
.alliance .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.alliance .acts form { margin: 0; }
.alliance .dlg { margin: 12px 0 0; padding: 12px; color: var(--ink1); background: var(--parch); box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--red2), 0 0 0 9px var(--ink0); }
.alliance .dlg b { display: block; margin-bottom: 4px; font: 400 20px/1.1 var(--font-pixel); }
.alliance .dlg ul { margin: 4px 0 8px; padding-left: 20px; font-size: 16px; }

/* The messages at the right of the page "Bündnis" (p4-24; draft design/ui-v3/buendnis.html `.chan`, `.msg`, `.newline`, `.write`, `.seg2`). From 900 px the two boxes stand side by side; under it one,
   chosen by the two switches (`data-view` of the page). Taps are 44 px high. */
.seg2 { display: flex; margin: 0 0 6px; }
body.pirate .seg2 a { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; font: 400 20px/1 var(--font-pixel); color: var(--parch); background: var(--wood2); box-shadow: inset 0 0 0 2px var(--wood3), 0 0 0 2px var(--ink0); text-decoration: none; }
body.pirate .seg2 a.on { background: var(--gold1); color: var(--ink0); } /* body.pirate: wins against `body.pirate .panel a` (red, underlined) in the sheet of the sea map (p4-sammel-abnahme-2, M1) */
.seg2 i, .chan i, .tabs i.unread, .convs i.count { font-style: normal; padding: 0 5px; background: var(--ink1); color: var(--gold2); }
.tabs i.unread { margin-left: 6px; background: var(--gold2); color: var(--ink0); box-shadow: 0 0 0 2px var(--ink0); }
@media (max-width: 620px) { .tabs i.unread { margin-left: 3px; padding: 0 3px; } } /* the place of the mark is held at all times, so on a phone it is kept narrow: "Mehr" stays 44 px wide */
.tabs i.unread.off { visibility: hidden; }
.tabs i.unread.off::before { content: "1"; } /* no text in the markup: the empty place is as wide as the mark with the digit 1 (the tab keeps its width, as with the alarm mark, B7) */
#tab-unread, #views-unread { display: contents; } /* the slots of the turbo-stream (messages/_counters) make no box: the number stands in the tab as before */
@media (max-width: 899.98px) {
  .two.alliance[data-view="alliance"] #messages-box, .two.alliance[data-view="messages"] #alliance-box { display: none; }
}
@media (min-width: 900px) {
  .seg2 { display: none; }
}
.messages .chan { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.messages .chan a { min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 10px; font: 400 20px/1 var(--font-pixel); color: var(--parch); background: var(--wood2); box-shadow: inset 0 0 0 2px var(--wood3), 0 0 0 2px var(--ink0); text-decoration: none; }
.messages .chan a.on { background: var(--gold1); color: var(--ink0); }
.messages .note { margin: 6px 0; font-size: 16px; color: var(--wood1); }
.messages .convs { margin: 0 0 8px; padding: 0; list-style: none; }
.messages .convs .rep { text-decoration: none; }
.messages .new-conversation { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0 0 8px; }
.messages .new-conversation .field { flex: 1 1 160px; min-width: 0; }
.messages select { width: 100%; min-height: 44px; padding: 8px 10px; box-sizing: border-box; font: 500 18px/1.2 var(--font-text); color: var(--ink1); background: #fff4d6; border: 0; box-shadow: 0 0 0 2px var(--ink0); }
.messages .msgs { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.messages .msg { display: flex; gap: 8px; align-items: flex-start; margin: 0; min-width: 0; }
.messages .msg canvas.portrait { width: 32px; height: 32px; }
.messages .msg .b { min-width: 0; max-width: 78%; padding: 6px 8px; background: var(--sand3); overflow-wrap: anywhere; }
.messages .msg .who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 400 20px/1 var(--font-pixel); color: var(--ink1); }
.messages .msg .who small { font: 400 16px/1 var(--font-text); color: var(--wood1); }
.messages .msg .text { margin: 4px 0 0; white-space: pre-wrap; color: var(--ink1); }
.messages .msg .tag { padding: 1px 5px; background: var(--ink1); color: var(--gold2); font: 400 16px/1 var(--font-pixel); }
.messages .msg.me { flex-direction: row-reverse; }
.messages .msg.me .b { background: var(--parch); box-shadow: 0 0 0 2px var(--gold1); }
.messages .newline { display: flex; align-items: center; gap: 8px; font: 400 20px/1 var(--font-pixel); color: var(--red1); }
.messages .newline::before, .messages .newline::after { content: ""; flex: 1; height: 2px; background: var(--red1); }
.messages .write { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 3px solid var(--ink1); }
.messages .write .field { flex: 1 1 200px; min-width: 0; }
.messages .write textarea { display: block; width: 100%; min-height: 44px; padding: 8px 10px; box-sizing: border-box; resize: vertical; font: 500 18px/1.2 var(--font-text); color: var(--ink1); background: #fff4d6; border: 0; box-shadow: 0 0 0 2px var(--ink0); }
.messages .write textarea:focus-visible { outline: 3px solid var(--glow0); outline-offset: 2px; }
.messages .write .btn { min-height: 44px; }
.messages .errors { margin: 4px 0 0; }
@media (max-width: 899.98px) {
  .messages .write { position: sticky; bottom: 0; background: var(--parch2); } /* the field stays at the lower edge on the phone (draft picture 7) */
}

/* ---------- Portraits (Nr. 110, p2-60) ---------- */
/* 24 x 24 pixels, drawn by the script; the box has its size from the first paint, whole factors only. */
canvas.portrait { width: 48px; height: 48px; image-rendering: pixelated; flex: none; box-shadow: 0 0 0 2px var(--ink0); background: var(--sea2); }
.who-cell { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.picker-bar { display: flex; flex-wrap: wrap; gap: 12px 8px; margin: 6px 0 10px; } /* 12 px between rows: the tap areas of .btn.sm (6 px above and below) do not reach into the next row (u1-06) */
.picker-bar .btn[aria-pressed="true"] { --b: var(--gold1); --hi: var(--gold2); --tx: var(--ink0); }
/* Eight faces in two rows of four; the height is computed from the width (squares and gaps), so the frame is the same with and without faces. */
.faces-box { container-type: inline-size; max-width: 420px; margin-bottom: 8px; }
.faces { --gap: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); align-content: start;
  height: calc((100cqw - 3 * var(--gap)) / 2 + var(--gap)); padding: 0; margin: 0; }
.faces .muted { grid-column: 1 / -1; margin: 0; font-size: 15px; }
.face { padding: 0; border: 0; background: var(--sea2); line-height: 0; cursor: pointer; box-shadow: 0 0 0 3px var(--ink0); }
.face canvas { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; }
.face[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink0), 0 0 0 7px var(--glow1); }
.face:focus-visible { outline: 3px solid var(--glow2); outline-offset: 6px; }
/* The sheet: fixed size, the name has room for two lines. */
.sheet { width: 190px; height: 276px; margin: 16px auto 0; padding: 12px 10px; text-align: center; background: var(--parch); color: var(--ink1);
  box-shadow: 0 0 0 2px var(--ink0), 4px 4px 0 0 rgba(22,18,26,.35); }
.sheet canvas { display: block; margin: 0 auto; width: 144px; height: 144px; image-rendering: pixelated; box-shadow: 0 0 0 3px var(--ink1); background: var(--sea2); }
.sheet-name { margin-top: 8px; height: 2.2em; overflow: hidden; font: 400 30px/1.1 var(--font-pixel); overflow-wrap: anywhere; }
.sheet-sub { font-size: 16px; color: var(--wood1); }

/* ---------- Head and tabs (u1-01, Nr. 172; draft design/ui-v2/hafen.html .hud, .chip, .tabs) ----------
   The head has a fixed height, so nothing below it moves (Muster 7). Chips never grow past their frame (overflow hidden). */
.hud {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: stretch; gap: 4px;
  height: 48px; padding: 4px;
  background: var(--wood2);
  background-image: repeating-linear-gradient(0deg, transparent 0 10px, rgba(59,36,26,.35) 10px 12px);
  box-shadow: inset 0 -3px 0 var(--wood0);
  font-family: var(--font-pixel);
}
.hud form { margin: 0; }
.hud p { margin: 0; }
.hud .logo img { width: 24px; height: 24px; }
.hud-logo { display: none; flex: 0 0 auto; align-items: center; }
.hud.bare .hud-logo { display: flex; }
.hud.bare .menu-btn, .hud.bare .who { margin-left: auto; }
.hud .who { display: none; }
.chipbox { position: relative; flex: 1 1 0; min-width: 0; display: flex; }
.chipbox.clock { flex: 0 0 auto; }
.chip {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center;
  margin: 0; padding: 0 5px; overflow: hidden; border: 0; text-align: left; cursor: pointer;
  font: 400 20px/1 var(--font-pixel); color: var(--parch);
  background: rgba(22,18,26,.55); box-shadow: inset 0 0 0 2px var(--ink0);
}
.chip:focus-visible, .menu-btn:focus-visible { outline: 3px solid var(--glow2); outline-offset: -3px; }
.chip .chip-line { display: flex; align-items: center; gap: 4px; color: var(--glow2); white-space: nowrap; }
.chip .ico { width: 16px; height: 16px; flex: none; }
.chip .v { min-width: 0; }
.chip .rate { display: none; margin-left: auto; color: var(--grass4); }
/* A resource whose production stands at a full store (Nr. 346): the word "steht" in red in the place of the rate; where the rate is not shown (phone, narrow rows) under the number. */
.chip .rate.halt { display: block; flex: 0 0 100%; margin: 0; font: 400 14px/12px var(--font-pixel); color: var(--red2); }
.chip.stopped .chip-line { flex-wrap: wrap; align-content: flex-start; row-gap: 0; }
/* On the phone the head is `.top`-less (display: contents) and a chip is narrow: a grid keeps the number beside the icon and puts the word under the number. */
@media (max-width: 620px) {
  .chip.stopped .chip-line { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 4px; }
  .chip .rate.halt { grid-column: 2; }
}
.chip.stopped .bar { margin-top: 1px; }
.chip .bar { display: block; height: 4px; margin-top: 3px; background: var(--ink0); }
.chip .bar i { display: block; height: 100%; background: var(--gold2); }
.chip .bar.full i { background: var(--red2); }
.chip.clock { padding: 0 7px; }
.chip.clock .chip-line { display: block; color: var(--parch); white-space: nowrap; }
.chip .vk, .chip.clock .sv, .tip .moment-tip { display: none; }
.chip.clock .until { display: block; margin-top: 1px; color: var(--sand2); white-space: nowrap; }
.menu-btn {
  position: relative; flex: 0 0 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  margin: 0; padding: 0; border: 0; cursor: pointer; background: var(--wood1); box-shadow: inset 0 0 0 2px var(--ink0);
}
.menu-btn::before { content: ""; position: absolute; inset: -2px; } /* 40 px shown, 44 px to tap */
.menu-btn > span { display: block; width: 18px; height: 3px; background: var(--parch); }
/* The small golden dot on the account button and on "☰" while a goal is open (u1-09, Nr. 180; p-rahmen-a1, Nr. 342 F1: the "?" is gone). */
.dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--gold2); box-shadow: 0 0 0 2px var(--ink0); }

/* Hints and menu: popovers, positioned over the page (nothing below the head moves). */
.tip, .menu-panel {
  position: fixed; inset: 52px 4px auto 4px; width: auto; height: auto; margin: 0; overflow: visible; padding: 8px 12px;
  color: var(--parch); background: var(--ink1); border: 0; box-shadow: 0 0 0 3px var(--ink0), inset 0 2px 0 0 var(--wood2);
  font: 500 17px/1.3 var(--font-text); z-index: 50;
}
.tip p + p { margin-top: 2px; }
.tip .full-note { color: var(--red2); }
.menu-panel { inset: 52px 4px auto auto; width: min(300px, calc(100vw - 8px)); max-height: calc(100dvh - 60px); overflow-y: auto; padding: 8px; color: var(--ink1); background: var(--parch);
  box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--gold1), 0 0 0 9px var(--ink0); }
/* The next goal in the account menu (u1-09, Nr. 180, 342 F1): the title in gold, the goal under it; the panel is a popover over the page, so nothing moves. */
.goal { color: var(--parch); overflow-wrap: anywhere; font-size: 17px; line-height: 1.3; }
.goal b { display: block; font-weight: 400; font-size: 20px; line-height: 1.1; color: var(--glow2); }
.goal .task-goal, .goal .task-hint, .goal .task-waiting { display: block; margin-top: 2px; }
/* The account menu (Nr. 213; p-rahmen-a1, draft design/ui-v3/rahmen.html `.menu`, `.who`, `.mrow`): parchment with a gold frame; the head with portrait, name, alliance and fame; the e-mail; the next goal (Nr. 342 F1);
   the groups "Dieser Ozean" and "Hilfe" as rows with a dotted line; "Abmelden" in red as the last row. */
.menu-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; border-bottom: 3px solid var(--ink1); }
.menu-head b { display: block; overflow-wrap: anywhere; font: 400 24px/1 var(--font-pixel); }
.menu-head small { display: block; margin-top: 2px; font: 500 16px/1.1 var(--font-text); color: var(--wood1); overflow-wrap: anywhere; }
.menu-panel .email { margin: 6px 0 0; padding: 0 6px; overflow-wrap: anywhere; font-size: 16px; color: var(--wood1); }
.menu-panel .goal, .more .goal { margin: 8px 0 0; padding: 6px 8px; color: var(--ink1); background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); }
.menu-panel .goal b, .more .goal b { color: var(--ink0); }
.menu-panel .goal .btn, .more .goal .btn { width: 100%; margin-top: 8px; }
.menu-cap { margin: 8px 0 0; padding: 0 6px; font: 400 20px/1.4 var(--font-pixel); color: var(--wood1); }
.menu-list { margin: 0; padding: 0; list-style: none; }
body.pirate .menu-list a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; border-bottom: 2px dotted var(--sand2); font: 400 20px/1 var(--font-pixel); color: var(--ink1); text-decoration: none; }
body.pirate .menu-list a:hover { background: var(--gold2); }
.menu-list a:focus-visible, .menu-out:focus-visible { outline: 3px solid var(--wood1); outline-offset: -3px; }
.menu-list small { margin-left: auto; text-align: right; font: 500 16px/1.1 var(--font-text); color: var(--wood1); }
.menu-panel form, .more form { margin: 0; }
/* The page "Mehr" of the phone (p-rahmen-a3; draft picture 9): the same head, groups and rows as the account menu, on the stage. */
.more { padding-bottom: 6px; }
.more-head { padding-top: 2px; }
body.pirate .menu-out { display: flex; align-items: center; width: 100%; min-height: 44px; margin: 0; padding: 0 6px; border: 0; background: none; cursor: pointer; text-align: left; font: 400 20px/1 var(--font-pixel); color: var(--red1); }
.menu-out:hover { background: var(--gold2); }

/* The pages of the account (p-rahmen-d1; draft design/ui-v3/rahmen.html pictures 4 and 10): from 621 px the side bar (240 px) next to the page, to 620 px the path "‹ Mehr · Konto · Seite" on top and no side bar. */
.account-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.account-page .crumb { margin: 0; font-size: 16px; color: var(--wood1); }
.account-page .side { display: none; }
.account-body { min-width: 0; container: account-body / inline-size; } /* the pages in it ask for the room next to the side bar, not for the window (Agent-Zugang: two columns from 860 px) */
.account-page .hd { margin: 0 0 4px; font: 400 30px/1 var(--font-pixel); }
.captain-profile .static { display: block; padding: 6px 0; font: 400 22px/1.1 var(--font-pixel); overflow-wrap: anywhere; }
@media (min-width: 621px) {
  .account-page { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .account-page .crumb { display: none; }
  .account-page .side { display: block; padding: 4px 0; background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); }
  .side-cap { margin: 10px 0 2px; padding: 0 10px; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
  body.pirate .side a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-bottom: 2px dotted var(--sand2); font: 400 20px/1 var(--font-pixel); color: var(--ink1); text-decoration: none; }
  body.pirate .side a:hover { background: var(--gold2); }
  body.pirate .side a.on { background: var(--gold1); box-shadow: inset 4px 0 0 var(--ink0); }
  .side form { margin: 0; }
  .side a:focus-visible { outline: 3px solid var(--wood1); outline-offset: -3px; }
}

/* The band under the head (u2-05, Nr. 209; draft `.band`): an attack on the captain stands on every page, between head and tabs, and moves the tabs and the frame down by its own height.
   Desktop: the long form (title, lead and arrival in one line, the small line under it); phone (to 620 px): the short form, at most two lines. Other kinds (the expedition in Marine blue, the right
   of return in gold) will use the same box with their own colour. */
.band { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--red1); color: var(--parch2); font: 400 20px/1.1 var(--font-pixel); box-shadow: inset 0 -3px 0 var(--ink0), inset 0 3px 0 var(--red2); }
.band b { font-weight: 400; color: var(--glow2); }
/* The gold band of the right of retaking (p4-12, Nr. 214 (5)): under an attack band, same place and height, gold with dark ink (its knob is the dark `btn wood`). */
.band.reclaim { background: var(--gold1); color: var(--ink0); box-shadow: inset 0 -3px 0 var(--ink0), inset 0 3px 0 var(--gold2); }
.band.reclaim b { color: var(--ink0); }
/* The blue band of the punitive expedition (p5-23, Nr. 263; draft marine.html `.band.navy`) and the count "2" of the one band that stands for an attack and the expedition at once on a phone (Nr. 262). */
.band.expedition { background: var(--mar1); color: var(--parch2); box-shadow: inset 0 -3px 0 var(--ink0), inset 0 3px 0 var(--mar2); }
.band .cnt { flex: none; padding: 2px 7px; background: var(--ink0); color: var(--glow2); box-shadow: 0 0 0 2px var(--parch2); }
button.band.summary { display: none; width: 100%; margin: 0; border: 0; text-align: left; cursor: pointer; font: 400 20px/1.1 var(--font-pixel); }
.band-pair .summary .hide, .band-pair[data-open="true"] .summary .show { display: none; }
.band-pair[data-open="true"] .summary .hide { display: inline; }
.band .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.band canvas.motif { width: 32px; height: 32px; flex: none; }
.band small { display: block; font: 400 16px/1.2 var(--font-text); color: var(--parch); }
.band .btn { flex: none; white-space: nowrap; }
.band .short { display: none; }
@media (max-width: 620px) {
  .band-pair[data-ready] button.band.summary { display: flex; } /* the one band with the count; without script (no data-ready) both bands stand one under the other */
  .band-pair[data-ready]:not([data-open="true"]) .band-list { display: none; }
  .band { gap: 5px; padding: 6px 4px 6px 6px; }
  .band .btn { padding: 0 4px; }
  .band .long { display: none; }
  .band .short { display: block; }
}
.tabs i.alarm.off { visibility: hidden; }
.tabs i.alarm.off::before { content: "!"; } /* no text in the markup: the empty place is as wide as the mark */ /* the place of the mark stays when there is no attack: the tabs do not change their width (B7) */
.tabs i.alarm { margin-left: 6px; padding: 0 5px; font-style: normal; background: var(--red1); color: var(--parch2); box-shadow: 0 0 0 2px var(--ink0); }
/* The tab bar of the desktop (u2-01, p4-23, p-rahmen-a1; draft `.nav`): one line, the same place on every page; from 621 px the five tabs stand in the head bar (`.top`, below). 44 px high to tap.
   To 620 px it is not shown: the phone has the bar at its lower edge (`.bnav`, below; p-rahmen-a3). */
.tabs { position: relative; display: flex; flex-wrap: nowrap; gap: 4px; max-width: 1186px; margin: 0 auto; padding: 6px 4px 0; }
.tabs .btn { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 4px; white-space: nowrap; justify-content: center; }
.tabs .btn[aria-current="page"] { --b: var(--gold1); --hi: var(--glow2); --tx: var(--ink1); }
.bnav { display: none; }
/* The bar of the phone (p-rahmen-a3, Nr. 341 (9); draft `.bnav`): five tabs at the lower edge, `--bnav` (56 px) high, every tab a tap area of the whole height. The page ends above it (`body.has-bnav`), the fixed strips of
   the pages (sheets, messages, the notice "Ziel erreicht") stand above it (`bottom: ... var(--bnav)`), the sea map and its fleet board end above it (the stage is shorter by it). Under the popovers of the head (50), the dialogs
   (20), the sheets (15). The number at a tab and the mark are at its corner: they take no width, so the five tabs are always as wide as the fifth of the window. */
@media (max-width: 620px) {
  .top .tabs { display: none; }
  .bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; height: var(--bnav); box-sizing: border-box; background: var(--wood2); box-shadow: inset 0 3px 0 var(--wood0), 0 -2px 0 var(--ink0); font-family: var(--font-pixel); }
  .bnav a { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 0 2px; font: 400 20px/1 var(--font-pixel); color: var(--parch); text-decoration: none; white-space: nowrap; }
  body.pirate .bnav a { color: var(--parch); }
  .bnav a[aria-current="page"], body.pirate .bnav a[aria-current="page"] { background: var(--parch); color: var(--ink0); box-shadow: inset 0 -4px 0 var(--gold1); }
  .bnav a:focus-visible { outline: 3px solid var(--glow2); outline-offset: -3px; }
  .bnav i.unread, .bnav i.alarm { position: absolute; top: 4px; right: 4px; margin: 0; padding: 0 4px; font: 400 18px/1.1 var(--font-pixel); font-style: normal; background: var(--red1); color: var(--parch2); box-shadow: 0 0 0 2px var(--ink0); }
  .bnav i.unread { background: var(--gold2); color: var(--ink0); }
  .bnav i.unread.off { display: none; }
  .bnav .dot { top: 6px; right: 8px; }
  .hud:not(.bare) .menu-btn { display: none; } /* the account is the page "Mehr" */
}
/* At 320 px a tab is a fifth of the window less the 15 px of the scrollbar gutter of a desktop browser: 61 px; "Berichte" needs the smaller type there (the text is never cut). */
@media (max-width: 359.98px) {
  .bnav a { padding: 0; font-size: 18px; }
}
/* The signs of the sea map that once stood under the tabs are gone (u2-01, Nr. 209): the sea map has the same frame as the other pages. */
/* Under 360 px (u1-07, Nr. 177): the clock has two short lines (time and countdown; weekday and "Tick in" move into the hint),
   stocks from 10.000 are shortened ("13,6k"). Before the start: "Start" and the hours ("92 h"). */
@media (max-width: 359.98px) {
  .chip .vk { display: inline; }
  .chip .vk + .v, .chip.clock .lead { display: none; }
  .tip .moment-tip { display: block; }
  .chip.pre-start .v, .chip.pre-start .until > * { display: none; }
  .chip.pre-start .sv { display: block; color: var(--parch); }
  .chip.pre-start .until::after { content: attr(data-short); }
  .chip.over .until > * { display: none; }
  .chip.over .until::after { content: attr(data-short); }
}
@media (min-width: 621px) {
  .hud { height: 56px; gap: 8px; padding: 6px 10px; }
  .hud-logo { display: flex; padding-right: 6px; }
  .hud .logo .lw { text-shadow: none; }
  /* The head never gets wider than the window, at no width (u1-sammel-kopf, Nr. 203). From 621 px the chips may shrink from 150 px (they clip, never grow), and what is optional
     goes in steps: the rate in the chips below 780 px, the wordmark's lettering (the flag stays, the link keeps its label) below 900 px, the captain's name below 1000 px. The logout button stays.
     Since p-rahmen-a1 these steps (780, 900, 1000) count for the head WITHOUT a captain only (`.hud.bare`: an approved account before it has a place): with a captain the head is the grid `.top` (below), which has its own steps. */
  .chipbox { flex: 0 1 150px; }
  .chipbox.clock { flex: 0 0 auto; margin-left: auto; }
  .chip .rate { display: none; }
  .hud .logo .lw { display: none; }
  .menu-panel { inset: 60px 10px auto auto; }
  /* Hover and keyboard focus show the hint as well; a tap or click opens it as a popover. */
  .tip { inset: auto; top: 60px; left: 10px; top: anchor(bottom); left: anchor(left); margin-top: 4px; width: max-content; max-width: 320px; }
}
/* From 780 px (the head without a captain only, see above): the rate in the chips. */
@media (min-width: 780px) {
  .chipbox { flex-basis: 150px; flex-shrink: 0; }
  .chip .rate { display: inline; }
  .chip .rate.halt { display: inline; flex: 0 1 auto; margin-left: auto; font-size: 20px; }
  .chip.stopped .chip-line { flex-wrap: nowrap; }
}
/* From 900 px (the head without a captain only): the lettering of the wordmark. */
@media (min-width: 900px) { .hud .logo .lw { display: inline; } }
/* The captain's name as a chip (a button: it opens the account menu) from 1000 px (Nr. 204); below that "☰" opens the menu. A long name ends with "…" (u2-01). The head without a captain only since p-rahmen-a1: with a captain the button `.top .who` is there from 621 px (below). */
@media (min-width: 1000px) {
  .menu-btn { display: none; }
  .hud .who { display: flex; flex: 0 1 auto; align-items: center; max-width: 240px; min-width: 0; padding: 0 10px; font: 400 20px/1 var(--font-pixel); color: var(--sand3); background: var(--wood1); box-shadow: inset 0 0 0 2px var(--ink0); }
  .hud .who .name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Phone (to 620 px): `.top` has no box: the head (three chips with a bar, the clock) and the bands stand at the top, the tab bar is fixed at the lower edge (`.bnav`, p-rahmen-a3). */
.top, .top-bands, .strip { display: contents; }
.hud-brand, .goal-line, .running { display: none; }
/* The line of the next goal on a phone (p-rahmen-ziel-handy, Nr. 342 F1): while the series of the first evening runs, under the head and the bands and over the stage, one or two lines (to 48 px: 2 x 20 and 4 + 4 of padding), a link to the goal on the page "Mehr".
   The head of the account menu "Nächstes Ziel · x von 8" stays for readers of a screen only (the two lines are for the step and the reward). In flow of the page: the sea map (a column of the height of the window) and the scene count it in by themselves. */
@media (max-width: 620px) {
  a.goal-line.phone { position: relative; box-sizing: border-box; min-height: 28px; max-height: 48px; margin: 0; padding: 4px 10px; overflow: hidden; background: var(--sand3); box-shadow: inset 0 -2px 0 var(--sand1); font: 500 16px/20px var(--font-text); color: var(--ink1); text-decoration: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  a.goal-line.phone b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  a.goal-line.phone:focus-visible { outline: 3px solid var(--gold1); outline-offset: -3px; }
}
/* From 621 px ONE column (p-rahmen-a1, Nr. 341; draft design/ui-v3/rahmen.html): `.top` is a grid at the edges of the stage (the stage has 10 px at each side), with the head bar (game and ocean, the five tabs, clock,
   account button; 56 px), the store row (52 px: the three chips with the rate; the running things come with p-rahmen-a2), the bands and the line of the next goal under it, all at the same two edges. The parts are the children of
   the head and of the tab bar (`display: contents` for the head), placed by area. Under 900 px the tabs go to a second row of the bar; the head bar sticks, from 900 px with the store row (below; Nr. 343), the bands and the line of the next goal come after `.top` and roll away. */
@media (min-width: 621px) {
  .top {
    position: sticky; top: 0; z-index: 40; display: grid; width: min(1166px, calc(100% - 20px)); margin: 0 auto;
    container: rahmen / scroll-state; /* "stuck" is asked below: what is not allowed to stick falls away then (Nr. 343) */
    grid-template-columns: auto auto minmax(0, 1fr) auto minmax(44px, max-content);
    grid-template-rows: 56px auto auto; column-gap: 8px;
    grid-template-areas: "brand . . clock me" "tabs tabs tabs tabs tabs" "strip strip strip strip strip";
  }
  .top::before {
    content: ""; grid-area: 1 / 1 / 3 / -1; background: var(--wood2);
    background-image: repeating-linear-gradient(0deg, transparent 0 12px, rgba(59,36,26,.35) 12px 14px); box-shadow: inset 0 -3px 0 var(--wood0);
  }
  .top .hud { display: contents; }
  .top .hud-logo { display: none; }
  .hud-brand { grid-area: brand; display: flex; flex-direction: column; justify-content: center; min-width: 0; max-width: 260px; padding: 0 10px; font: 400 24px/1 var(--font-pixel); color: var(--glow2); white-space: nowrap; }
  .hud-brand a { color: inherit; text-decoration: none; }
  .hud-brand small { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; font: 500 16px/1 var(--font-text); color: var(--sand3); }
  /* The tabs stand on the lower edge of the head bar (p-rahmen-sammel-1; draft `.ttabs`, align-items: flex-end); the current one is parchment, 48 px, the others 44 px: it grows upward out of the box of 44 px (to 899 px, the bar of the tabs keeps its height), from 900 px the box is 48 px. */
  .top .tabs { grid-area: tabs; align-self: end; align-items: flex-end; height: 44px; max-width: none; margin: 0; padding: 0 10px 0; gap: 4px; }
  .top .tabs .btn[aria-current="page"] { min-height: 48px; height: 48px; --tx: var(--ink0); background: var(--parch); box-shadow: inset 0 3px 0 var(--gold1), 0 0 0 2px var(--ink0); }
  .top .tabs .btn { flex: 0 1 auto; padding: 0 12px; font-size: 22px; }
  .top .chipbox.clock { grid-area: clock; align-self: center; height: 44px; margin: 0; }
  .top .chip.clock { align-items: flex-end; text-align: right; }
  .top .who { grid-area: me; position: relative; display: flex; align-items: center; gap: 6px; align-self: center; height: 44px; max-width: 240px; min-width: 0; margin-right: 10px; padding: 0 8px 0 4px; font: 400 20px/1 var(--font-pixel); color: var(--glow2); background: rgba(22,18,26,.55); box-shadow: inset 0 0 0 2px var(--ink0); cursor: pointer; }
  .top .who .caret { flex: none; } /* the sign that the button opens a menu (draft `.me`: "Anne ▾"; p-rahmen-sammel-1) */
  .top .who .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top .who .dot { top: 2px; left: 2px; right: auto; }
  .top .menu-btn { display: none; }
  .top .strip { grid-area: strip; display: flex; align-items: center; gap: 8px; height: 52px; box-sizing: border-box; padding: 6px 10px; background: var(--sea0); box-shadow: inset 0 -2px 0 var(--ink0); }
  .top .strip .chipbox { flex: 0 0 160px; }
  .top .strip .chip { padding: 3px 8px; }
  .top .strip .chip .rate { display: inline; }
  /* "Was läuft" (p-rahmen-a2): the right half of the store row, the cells right-aligned; what does not fit goes in this order (Kriterium): first the word "nächste", then the rate, never the store. */
  .top .strip { container-type: inline-size; }
  .running { display: flex; flex: 1 1 0; min-width: 0; align-items: center; justify-content: flex-end; gap: 8px; overflow: hidden; }
  .running .now { display: flex; flex: 0 1 auto; align-items: center; gap: 6px; min-width: 0; height: 36px; box-sizing: border-box; padding: 0 8px; font: 400 20px/1 var(--font-pixel); color: var(--parch); white-space: nowrap; text-decoration: none; box-shadow: inset 0 0 0 2px var(--sea1); }
  .running .now:hover, .running .now:focus-visible { background: var(--sea1); }
  .running .now.idle { color: var(--sand3); }
  .running .now canvas.motif { width: 24px; height: 24px; }
  .running .now .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .running .now small { flex: none; font: 500 16px/1 var(--font-text); color: var(--sand2); }
  @container (max-width: 1100px) { .running .now .near { display: none; } }
  @container (max-width: 760px) { .running .now .what { display: none; } } /* the cells keep icon and time, the title says the rest */
  @container (max-width: 1010px) { .running .now:not(.far) small .lead { display: none; } }
  @container (max-width: 1010px) { .top:has(.running.far) .strip .chip .rate { display: none; } .top:has(.running.far) .strip .chip .rate.halt { display: block; flex: 0 0 100%; margin: 0; font-size: 14px; } .top:has(.running.far) .strip .chip.stopped .chip-line { flex-wrap: wrap; } .top:has(.running.far) .strip .chipbox { flex-basis: 104px; } }
  @container (max-width: 990px) { .top .strip .chip .rate { display: none; } .top .strip .chip .rate.halt { display: block; flex: 0 0 100%; margin: 0; font-size: 14px; } .top .strip .chip.stopped .chip-line { flex-wrap: wrap; } .top .strip .chipbox { flex-basis: 104px; } }
  .top-bands { display: block; width: min(1166px, calc(100% - 20px)); margin: 0 auto; }
  .goal-line.below { display: block; width: min(1166px, calc(100% - 20px)); margin: 0 auto; }
  .goal-line { height: 28px; box-sizing: border-box; margin: 0; padding: 4px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--sand3); box-shadow: inset 0 -2px 0 var(--sand1); font: 500 16px/20px var(--font-text); color: var(--ink1); }
  .goal-line b { font: 400 20px/1 var(--font-pixel); color: var(--ink0); }
  .menu-panel { inset: 64px 10px auto auto; right: anchor(right); top: anchor(bottom); margin-top: 6px; } /* the fallback without anchor positioning: under the bar at the right */
}
/* From 1100 px the line of the next goal stands IN the store row (p-rahmen-a1) and keeps standing there with "Was läuft" (p-rahmen-a2): while the series of the first evening runs the row has two lines in its 52 px, the
   goal over the whole width (19 px, the text is not cut at 1366 px) and under it the chips and the cells (24 px high each, the chip as one line with its bar of 3 px under it). So the row costs no height and the sea map
   and the scene keep all their pixels (Review p-rahmen-a1). Without a goal the row is as before (chips and cells 36 px, in the middle). Only a goal text longer than the row ends with "…" (its `title` and the
   account menu hold the whole). Under 1100 px (621 to 1099) the line has its own row between the bands and the stage. */
@media (min-width: 1100px) {
  body:has(#goal-line) .harbor-scene-stage { --scene-above: 248px; } /* it costs no height: the picture is as high as without it */
  body:has(#goal-line) .top .strip { align-items: flex-end; padding: 24px 10px 3px; }
  body:has(#goal-line) .top .strip .chip { padding: 0 8px; }
  body:has(#goal-line) .top .strip .chip .bar { height: 3px; margin-top: 1px; }
  body:has(#goal-line) .running .now { height: 24px; }
  .goal-line.below { display: none; }
  .goal-line.head { display: block; grid-area: strip; align-self: start; margin: 3px 10px 0; width: auto; height: 19px; padding: 0 8px; line-height: 19px; }
}
@media (min-width: 900px) {
  .top { grid-template-rows: 56px auto; grid-template-areas: "brand tabs . clock me" "strip strip strip strip strip"; }
  .top::before { grid-row: 1 / 2; }
  .top .tabs { height: 48px; padding: 0; }
}
/* What sticks (p-rahmen-kleben, Nr. 343): `.top` (the head bar, from 900 px with the store row) from 621 px; its box keeps its height, so nothing below it moves while it sticks. The line of the next goal in the store row (from 1100 px) does not stick:
   once the bar is stuck the line falls away and the chips take their place of the row without a goal (the same 52 px). Under 900 px (addendum to Nr. 343) and in a window lower than 620 px only the head bar sticks: the store row is hidden once
   stuck (its place stays, it is see-through and does not catch a click). Without the query for "stuck" (an old browser) the head sticks complete, nothing else breaks. */
@media (min-width: 621px) {
  @container rahmen scroll-state(stuck: top) {
    .goal-line.head { visibility: hidden; }
    body:has(#goal-line) .top .strip { align-items: center; padding: 6px 10px; }
    body:has(#goal-line) .top .strip .chip { padding: 3px 8px; }
    body:has(#goal-line) .top .strip .chip .bar { height: 4px; margin-top: 3px; }
    body:has(#goal-line) .running .now { height: 36px; }
  }
}
@media (min-width: 621px) and (max-width: 899px), (min-width: 621px) and (max-height: 619px) {
  .top { pointer-events: none; }
  .top *, .top::before { pointer-events: auto; }
  @container rahmen scroll-state(stuck: top) { .strip { visibility: hidden; } }
}
@media (min-width: 621px) {
  .chipbox:hover > .tip, .chipbox:focus-within > .tip { display: block; }
}

/* The page "Flotten" (u1-05): the row with the button "Flotte senden" and what is free (Jersey 10, 20 px, sand3, as in the design), the 32 px motif in rows. */
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 4px 0 0; }
.send-row .ui.free { color: var(--sand3); }
.send-row .note.free { flex: 1 1 14em; min-width: 0; margin: 0; font-size: 16px; color: var(--sand3); }
canvas.motif { width: 32px; height: 32px; flex: none; image-rendering: pixelated; }

/* The one sentence about the weather of a fight after the outcome (Nr. 339): "Jetzt Wind am Ziel." */
.weather-line { margin: 4px 0 0; }

/* The page "Agent-Zugang" (p3-20; draft design/ui-v3/statthalter.html `.sw`, `.tok`, `.code`, `.note2`, `.ord`): four switches, the token under them (beside them from 900 px, the limit of the map step in BROWSER_WINDOWS, Nr. 181; draft `.two.s`: left column 440 px and no box in two columns, the token boxed in one column, frame 10). */
.agent-access .agent-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@container account-body (min-width: 860px) { .agent-access .agent-grid { grid-template-columns: 440px minmax(0, 1fr); } .agent-access #agent-token-box { background: none; box-shadow: none; padding: 0; } }
.agent-access .box { background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); padding: 10px; color: var(--ink1); font-size: 16px; line-height: 1.3; min-width: 0; }
.agent-access #agent-switches-box { min-width: 0; color: var(--ink1); font-size: 16px; line-height: 1.3; }
.agent-access p { margin: 0 0 6px; }
.agent-access .hd { font: 400 30px/1 var(--font-pixel); margin: 0 0 2px; }
.agent-access .sub2 { font-size: 16px; color: var(--wood1); margin: 0 0 8px; }
.agent-access .lab { font: 400 20px/1 var(--font-pixel); color: var(--wood1); margin: 12px 0 4px; border-top: 3px solid var(--ink1); padding-top: 8px; }
.agent-access .ord { display: flex; gap: 8px; align-items: center; padding: 8px; margin: 0 0 8px; background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); }
.agent-access .ord .grow { flex: 1; min-width: 0; }
.agent-access .ord b { font: 400 20px/1.1 var(--font-pixel); display: block; }
.agent-access .ord small { font-size: 16px; line-height: 1.2; color: var(--wood1); display: block; }
.agent-access form { margin: 0; }
.agent-access .sw-form { flex: 0 0 auto; }
.agent-access button.sw { flex: 0 0 auto; width: 64px; height: 44px; min-height: 44px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 2px var(--ink1); background: var(--sand2); position: relative; font: 400 20px/44px var(--font-pixel); color: var(--ink0); text-align: right; padding: 0 6px 0 0; box-sizing: border-box; }
.agent-access button.sw::before { content: ""; position: absolute; left: 3px; top: 9px; width: 26px; height: 26px; background: var(--wood2); box-shadow: 0 0 0 2px var(--ink0); }
.agent-access button.sw.on { background: var(--leaf); color: var(--parch2); text-align: left; padding: 0 0 0 8px; }
.agent-access button.sw.on::before { left: auto; right: 3px; background: var(--gold2); }
.agent-access .tok { font: 400 20px/1.2 var(--font-pixel); background: var(--ink1); color: var(--gold2); padding: 8px; word-break: break-all; margin: 6px 0; }
.agent-access .code { font: 400 16px/1.3 monospace; background: #fffaf0; box-shadow: inset 0 0 0 2px var(--sand1); padding: 6px 8px; margin: 4px 0; word-break: break-all; }
.agent-access .note2 { background: var(--sand3); padding: 6px 8px; margin: 8px 0 0; }
.agent-access .acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

/* The source as a word in colour, the same everywhere (Nr. 297; draft `.src`): Regel wood-brown, Marine blue, Standard sand. */
.src { display: inline-block; font: 400 20px/1 var(--font-pixel); padding: 1px 5px; white-space: nowrap; color: var(--parch2); background: var(--leaf2); }
.src-rule { background: var(--wood2); }
.src-marine { background: var(--mar1, #2f5d8a); }
.src-default { background: var(--sand2); color: var(--ink0); }

/* The page "Statthalter" (p3-21; draft design/ui-v3/statthalter.html frames 1 and 8): in one column the settings of the chosen order stand under its row; from 900 px (the limit of the
   list, Nr. 181) the left column is 440 px and the settings stand at the right over all rows (`.two.s`). The blocks have no box of their own, so the markup of a block is a row and its settings. */
.standing .so-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.standing .so-block { display: contents; }
.standing .so-head p { margin: 0 0 6px; }
.standing .so-head .note2, .standing .so-foot { margin: 8px 0 0; }
@media (min-width: 900px) {
  .standing .so-grid { grid-template-columns: 440px minmax(0, 1fr); grid-template-rows: repeat(8, auto) 1fr; column-gap: 16px; row-gap: 0; }
  .standing .so-grid > .so-head, .standing .so-grid .ord, .standing .so-grid > .so-foot { grid-column: 1; }
  .standing .so-grid .detail { grid-column: 2; grid-row: 1 / -1; align-self: start; background: none; box-shadow: none; padding: 0; }
  /* The box of the first evening (p3-22, Nr. 310) stands at the top of column 2 beside the heading (row 1, so the rows of the list keep their height); the settings of the chosen order follow under it. */
  .standing .so-grid .so-tasks { grid-column: 2; grid-row: 1; align-self: start; margin-bottom: 10px; }
  .standing .so-grid.with-tasks .detail { grid-row: 2 / -1; }
}
.standing .ord { margin: 0 0 8px; }
.standing .ord.sel { box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--glow1); }
.standing .ord.off { opacity: .6; }
.standing .ord a.grow { flex: 1; min-width: 0; color: var(--ink1); text-decoration: none; }
.standing .ord a.grow:focus-visible { outline: 3px solid var(--glow0); outline-offset: 2px; }
.standing .ord .state { color: var(--ink1); }
.standing .ord .origin { margin-top: 2px; }
.standing button.sw.wait { background: var(--gold2); text-align: left; padding: 0 0 0 6px; font: 400 16px/44px var(--font-text); }
.standing button.sw.wait::before { display: none; }
.standing .box.detail, .standing #standing-tasks { min-height: 0; }
.standing .so-field { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 2px dotted var(--sand2); }
.standing .so-field b { font: 400 20px/1.1 var(--font-pixel); display: block; }
.standing .so-field small { color: var(--wood1); display: block; line-height: 1.2; }
.standing .so-field .inbox { min-width: 0; }
.standing .so-field input.in[type="text"], .standing .so-field select.in { width: 100%; min-height: 44px; padding: 0 8px; box-sizing: border-box; font: 400 20px/1 var(--font-pixel); color: var(--ink1); background: #fffaf0; border: 0; box-shadow: inset 0 0 0 2px var(--ink1); }
.standing .so-field input.flag { width: 28px; height: 28px; margin: 0; accent-color: var(--wood1); }
.standing .so-field .ring { display: flex; align-items: center; gap: 6px; min-height: 36px; font: 400 20px/1 var(--font-pixel); }
.standing .so-field .ring input { width: 22px; height: 22px; margin: 0; accent-color: var(--wood1); }
.standing .inline-form { display: inline-block; margin: 0; }
.standing .errors { margin: 0 0 8px; }
.standing #standing-train-default { margin: 0 0 6px; }
/* `develop_islands` (p5b-21; draft design/ui-v3/inseln.html pictures 3 and 10): the echo over the settings (`.echo`), three weights side by side (`.wts`), the islands left alone folded in a `details`. */
.standing .so-echo { background: var(--parch); box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--gold1); padding: 8px; margin: 2px 2px 10px; color: var(--ink1); }
.standing .so-echo .li { display: flex; gap: 8px; padding: 3px 0; align-items: baseline; }
.standing .so-echo .li b { font: 400 20px/1.1 var(--font-pixel); flex: 0 0 96px; color: var(--wood1); }
.standing .so-echo .li span { min-width: 0; overflow-wrap: anywhere; }
.standing .so-echo small.isle-code { color: var(--wood1); }
.standing .so-weights { display: flex; gap: 4px; }
.standing .so-weights span { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.standing .so-weights input.in[type="text"] { text-align: center; padding: 0 2px; }
.standing .so-weights small { text-align: center; }
.standing .so-exclude summary { min-height: 44px; box-sizing: border-box; display: flex; align-items: center; padding: 0 8px; font: 400 20px/1 var(--font-pixel); background: #fffaf0; box-shadow: inset 0 0 0 2px var(--ink1); cursor: pointer; }
.standing .so-exclude[open] summary { margin-bottom: 4px; }
.standing .so-exclude .ring span { min-width: 0; overflow-wrap: anywhere; }
.standing .so-exclude small.isle-code { display: inline; color: var(--wood1); }
.standing #standing-back { color: inherit; text-decoration: none; }
/* On a phone an opened order stands alone (picture 10): the heading "Statthalter" leads back to the list, the settings of an order are only seen once it is opened, and the sentences the draft leaves out on the phone are gone. */
@media (max-width: 620px) {
  .standing .so-grid.opened .so-head .sub2, .standing .so-grid.opened .so-head .note2, .standing .so-grid.opened .so-tasks, .standing .so-grid.opened .so-foot, .standing .so-grid.opened .ord:not(.sel) { display: none; }
  .standing .so-grid:not(.opened) .detail { display: none; }
  .standing .box.detail.kind-develop-islands .so-about { display: none; }
  .standing .so-echo .li b { flex-basis: 76px; }
  /* Picture 10 of the draft shows only the folded state: the fields (switch, smallest factor, highest level, weights, left out, hints) stand under "Einstellungen", closed on load, Speichern outside it stays in the visible part (Nr. 375 (4)). */
  .standing .so-settings { margin: 0 0 6px; }
}
/* From 621 px the settings of Inseln ausbauen stand open (the controller `settings-fold` keeps them open there) without their row, as before the fold; on a phone the row is the way to open them. */
@media (min-width: 621px) {
  .standing .so-settings > summary { display: none; }
}

/* "Statthalter für die Nacht bestätigen" (p3-22; draft design/ui-v3/statthalter.html `.dlg`, `.veil`, frames 2 and 9): the dialog stands over the page in the Turbo frame "night-dialog" (a veil over the
   window, the dialog 560 px at most; when the window is low only its list scrolls, Nr. 384); without the frame it is the dialog of a page. The button says the long text from 621 px, the short one under it. */
.veil { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; padding: 10px; background: rgba(22, 18, 26, .55); } /* over the sticky head of the page (z-index 40) */
.dlg { background: var(--parch); box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--gold1), 0 0 0 9px var(--ink0); padding: 12px; color: var(--ink1); font-size: 16px; line-height: 1.3; }
.veil .dlg { width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.veil .dlg > * { flex: none; }
.veil .dlg > .dlg-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; } /* Nr. 384: only the list scrolls, the buttons stay visible at the foot */
.night-confirmation { display: flex; justify-content: center; }
.night-confirmation .dlg { width: 100%; max-width: 560px; }
.dlg p { margin: 0 0 6px; }
.dlg .hd { font: 400 30px/1 var(--font-pixel); margin: 0 0 6px; }
.dlg .sub2 { color: var(--wood1); }
.dlg .li { display: flex; gap: 8px; padding: 5px 0; border-bottom: 2px dotted var(--sand2); align-items: baseline; }
.dlg .li b { font: 400 20px/1.1 var(--font-pixel); flex: 0 0 190px; }
.dlg .note2 { background: var(--sand3); padding: 6px 8px; margin: 8px 0 0; }
.dlg .acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.dlg form { margin: 0; }
.dlg .inline-form { display: inline-block; }
.dlg .btn { min-height: 44px; }
.dlg .btn .short { display: inline; }
.dlg .btn .long { display: none; }
@media (min-width: 621px) { .dlg .btn .short { display: none; } .dlg .btn .long { display: inline; } }
@media (max-width: 620px) { .dlg .li { display: block; } .dlg .li b { display: block; } }

/* The morning page (p3-23; draft design/ui-v3/statthalter.html `.log`, `.q`, `.ev`, `.daycap`): the log of the agent and the list since the last visit; from 900 px side by side (the limit of the list, Nr. 181), under it one
   above the other. Without an agent the note stands above the list. */
.morning { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; color: var(--ink1); font-size: 16px; line-height: 1.3; }
@media (min-width: 900px) { .morning.with-log { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.morning .hd { margin: 0 0 2px; font: 400 30px/1 var(--font-pixel); }
.morning .sub2 { margin: 0 0 8px; color: var(--wood1); }
.morning .box { min-height: 0; min-width: 0; }
.morning .log { background: var(--parch); box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--gold1); padding: 10px; margin: 2px 2px 10px; min-width: 0; }
.morning .log p { margin: 6px 0; overflow-wrap: anywhere; }
.morning .log p.hd { margin: 0 0 2px; }
.morning .log p.sub2 { margin: 0 0 8px; }
.morning .q { background: var(--sand3); padding: 8px; margin-top: 8px; }
.morning .q b { display: block; font: 400 20px/1.1 var(--font-pixel); }
.morning .q .answer b { display: inline; }
.morning .q textarea { width: 100%; box-sizing: border-box; min-height: 64px; margin: 6px 0; padding: 6px 8px; background: #fffaf0; border: 0; box-shadow: inset 0 0 0 2px var(--ink1); font: inherit; color: var(--ink1); resize: vertical; }
.morning .q .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.morning .q .acts small { color: var(--wood1); }
.morning .q form { margin: 0; }
.morning .note2 { background: var(--sand3); padding: 6px 8px; margin: 0; }
.morning .daycap { margin: 10px 0 2px; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.morning .ev { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 2px dotted var(--sand2); }
.morning .ev .t { flex: 0 0 52px; font: 400 20px/1.2 var(--font-pixel); color: var(--wood1); }
.morning .ev .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.morning .ev b { display: block; font: 400 20px/1.15 var(--font-pixel); }
.morning .ev b a { color: var(--ink1); text-decoration: none; }
.morning .ev small { display: block; color: var(--wood1); line-height: 1.2; font-size: 16px; }
.morning .ev.lost b { color: var(--red1); }
.morning .ev.lost b a { color: var(--red1); }
.morning .older-logs { margin-top: 0; }
.morning .ev .amt { flex: none; font: 400 20px/1.2 var(--font-pixel); color: var(--leaf); white-space: nowrap; }
.morning .ev .amt.bad { color: var(--red1); }
/* A group of lines of one rule (p3-morgen-zusammenfassen, Nr. 325): a <details>; the summary is the line `.ev`, opened it shows the single lines under it, indented. The summary drops the pixel face and spacing of `.ui` (fold_summary): its line under the title is set as in the single lines. */
.morning details.evgroup > summary { list-style: none; cursor: pointer; font: inherit; letter-spacing: normal; }
.morning details.evgroup > summary::-webkit-details-marker { display: none; }
.morning details.evgroup > summary small u { color: var(--ink1); }
.morning details.evgroup > summary:focus-visible { outline: 3px solid var(--glow0); outline-offset: 2px; }
.morning details.evgroup[open] > div.ev { margin-left: 12px; }

/* The help page "Schiffe und Stärke" (p-hilfe-schiffe, Nr. 352 (2)). From 621 px a table; below, one card per ship (a grid of two columns per tbody). */
.help-contents { margin: 4px 0 10px; }
.help-contents ul { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 4px 0 0; padding: 0; }
.help-calc { margin: 6px 0; padding-left: 22px; }
.help-calc li { margin: 4px 0; }
.ship-help { width: 100%; border-collapse: collapse; margin: 6px 0; }
.ship-help th, .ship-help td { padding: 4px 6px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sand1); }
.ship-help thead th { font-size: 16px; white-space: nowrap; }
@media (max-width: 899px) { /* the framed panel at 621 px is 590 px wide: close the table up so it does not run over (p-sammel-4) */
  .ship-help th, .ship-help td { padding: 4px 3px; }
  .ship-help thead th { font-size: 14px; }
}
.ship-help .ship-help-name { font-weight: normal; display: flex; gap: 8px; align-items: flex-start; }
.ship-help .ship-help-name .sub { display: block; font-size: 16px; line-height: 1.25; }
.ship-help .cost { display: inline-block; margin-right: 6px; white-space: nowrap; }
.ship-help .cost .ico { width: 16px; height: 16px; vertical-align: middle; }
.ship-help .ship-help-texts td { border-bottom: 2px solid var(--sand1); }
.ship-help .ship-help-texts p { margin: 2px 0; }
@media (max-width: 620px) {
  .ship-help, .ship-help tbody, .ship-help tr { display: block; }
  .ship-help thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ship-help thead th { display: block; white-space: normal; } /* the hidden header cells stay inside their 1 px box instead of standing in a row past the window (p-sammel-11) */
  .ship-help tbody { margin: 0 0 10px; padding: 6px; border: 2px solid var(--sand1); }
  .ship-help .ship-help-numbers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 8px; }
  .ship-help .ship-help-name { grid-column: 1 / -1; }
  .ship-help td, .ship-help th { border-bottom: 0; padding: 2px 0; min-width: 0; }
  .ship-help .ship-help-numbers td::before { content: attr(data-label); display: block; font-size: 14px; opacity: .75; }
  .ship-help .ship-help-texts td { display: block; border-bottom: 0; }
}

/* "Lager voll" under the button of a reward (p-lager-5; draft design/ui-v3/finale.html card D, `.warn`: parchment, 2 px gold ring). Only this class. */
.task-lapse { display: block; margin: 6px 0 0; padding: 6px 8px; font-size: 16px; line-height: 1.3; color: var(--red1); background: var(--sand3); box-shadow: 0 0 0 2px var(--gold1); }
.task-lapse b { font-weight: normal; }

/* ---------- Island overview (p5b-20a, draft design/ui-v3/inseln.html): every rule under `.io`, nothing global ---------- */
.io { color: var(--ink1); }
.io .io-hd { font: 400 30px/1 var(--font-pixel); margin: 0 0 8px; }
.io .io-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 8px; }
.io .io-fact { background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); padding: 6px 8px; min-width: 0; }
.io .io-fact small { display: block; color: var(--wood1); line-height: 1.2; font-size: 16px; }
.io .io-fact b { display: block; font: 400 24px/1.05 var(--font-pixel); }
.io .io-fact em { font-style: normal; color: var(--wood1); font-size: 16px; }
.io .io-lane { box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--gold1); }
.io .io-bar { position: relative; height: 8px; margin: 6px 0 2px; background: var(--sand2); box-shadow: 0 0 0 2px var(--ink0); }
.io .io-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold1); }
.io .io-wood { color: #5c7a3a; } .io .io-stone { color: #6b6b72; } .io .io-gold { color: #a87a1c; }
.io .io-short { display: none; }
.io .io-table { width: 100%; border-collapse: collapse; background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); }
.io .io-table th { font: 400 20px/1 var(--font-pixel); color: var(--wood1); text-align: left; padding: 4px 6px; border-bottom: 3px solid var(--ink1); }
.io .io-table td { padding: 5px 6px; border-bottom: 2px dotted var(--sand2); vertical-align: middle; font: 400 20px/1.1 var(--font-pixel); }
.io .io-table td small { font: 400 16px/1.2 var(--font-text); color: var(--wood1); }
.io .io-table .r { text-align: right; }
.io .io-zone td { background: var(--sand3); color: var(--wood1); padding: 3px 6px; border-bottom: 0; }
.io .io-alarm td { background: #f6dccb; }
.io .io-name { white-space: nowrap; }
.io .io-name canvas { width: 24px; height: 24px; image-rendering: pixelated; vertical-align: middle; margin-right: 6px; }
.io .io-name > span { display: inline-block; vertical-align: middle; }
.io .io-name small { display: block; }
.io a.io-link { color: var(--ink1); text-decoration: none; }
.io .io-lvl { display: inline-block; min-width: 34px; text-align: center; background: var(--ink1); color: var(--gold2); padding: 1px 4px; }
.io .io-tag { font: 400 20px/1 var(--font-pixel); padding: 1px 5px; white-space: nowrap; background: var(--sand2); color: var(--ink0); }
.io .io-tag.io-go { background: var(--gold1); } .io .io-tag.io-red { background: var(--red1); color: var(--parch2); } .io .io-tag.io-darkgold { background: var(--ink1); color: var(--gold2); } .io .io-tag.io-rule { background: var(--wood2); color: var(--parch2); }
/* "Ausnehmen" / "Aufnehmen" (p5b-21): a small line of text under the state, like the underlined links of the draft; under 900 px the table has no room for it (621 px: no sideways scrolling, 620 px and less: rows of 90 px at most),
   there the settings of the rule on the page Statthalter do the same. */
.io .io-exclude-form { display: block; margin: 2px 0 0; }
@media (max-width: 899.98px) { .io .io-exclude-form { display: none; } }
.io .io-linkbutton { background: none; border: 0; padding: 0; font: 400 16px/1.2 var(--font-text); color: var(--wood1); text-decoration: underline; cursor: pointer; }
.io .io-free, .io .io-note { background: var(--sand3); padding: 6px 8px; margin: 8px 0 0; font-size: 16px; line-height: 1.3; }
.io .io-note b { font: 400 20px/1.1 var(--font-pixel); }
.io .io-empty { text-align: center; padding: 26px 14px; background: var(--parch2); box-shadow: 0 0 0 2px var(--sand1); }
.io .io-empty canvas { width: 64px; height: 64px; image-rendering: pixelated; }
.io .io-empty .io-note { text-align: left; }
.io .io-acts { margin: 10px 0 0; }
.io .io-stick { display: none; }
@media (max-width: 620px) {
  .io .io-facts { grid-template-columns: 1fr 1fr; gap: 6px; }
  .io #io-yield { grid-column: span 2; }
  .io .io-long { display: none; } .io .io-short { display: inline; }
  .io .io-table, .io .io-table tbody { display: block; }
  .io .io-table thead { display: none; }
  .io .io-zone { display: block; margin-top: 6px; } .io .io-zone td { display: block; }
  .io .io-row { display: grid; grid-template-columns: 1fr auto auto; gap: 0 8px; align-items: center; padding: 3px 2px; border-bottom: 2px dotted var(--sand2); }
  .io .io-row td { display: block; border: 0; padding: 0; }
  .io .io-row .io-name { grid-column: 1; grid-row: 1; white-space: normal; }
  .io .io-row .io-factor, .io .io-row .io-gar, .io .io-row .io-go-link { display: none; }
  .io .io-row .io-level { grid-column: 2; grid-row: 1; }
  .io .io-row td.r { grid-column: 3; grid-row: 1; min-width: 48px; }
  .io .io-row .io-build { grid-column: 1 / -1; grid-row: 2; }
  .io .io-row .io-build:empty { display: none; }
  .io .io-alarm td { background: transparent; } .io .io-alarm { background: #f6dccb; }
  .io .io-stick { display: flex; position: fixed; left: 0; right: 0; bottom: var(--bnav); z-index: 15; gap: 8px; align-items: center; box-sizing: border-box; padding: 8px; background: var(--parch); color: var(--ink1); box-shadow: 0 -3px 0 var(--ink0), 0 -6px 0 var(--gold1), 0 -9px 0 var(--ink0); }
  .io .io-stick small { flex: 1; line-height: 1.2; font-size: 16px; }
}

/* ---------- Page Bauliste and dialog "Insel ausbauen" (p5b-20b, draft design/ui-v3/inseln.html pictures 2 and 9): every rule under `.bl` or `.island-head`, nothing global ---------- */
.bl { color: var(--ink1); }
.bl .bl-hd { font: 400 30px/1 var(--font-pixel); margin: 0 0 2px; }
.bl .bl-sub { font-size: 16px; line-height: 1.3; color: var(--wood1); margin: 0 0 8px; }
.bl .bl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.bl .bl-lanes { display: grid; grid-template-columns: minmax(0, 1fr); }
.bl .bl-lanes > .panel { margin-top: 14px; }
@media (min-width: 900px) {
  .bl .bl-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; align-items: start; }
}
.bl .isle-code, .lane-orders .isle-code { font: 400 14px/1.1 var(--font-text); color: var(--wood1); }
.bl .bl-row a.bl-link, .bl .li a.bl-link { color: var(--ink1); text-decoration: none; }
.bl-dialog .acts a:not(.btn) { color: var(--ink1); }
.bl .bl-islands .bl-row.waiting .sub { color: var(--red1); }
.bl .bl-idle { margin: 8px 0 0; padding: 6px 8px; background: var(--sand3); font-size: 16px; line-height: 1.3; }
.bl .bl-idle-rows { margin: 4px 0 6px; padding: 0; list-style: none; }
.bl .bl-idle-row { padding: 2px 0; }
.bl .lane-empty .empty-fallback { visibility: visible; } /* the page has no picture to tap on: an empty lane says it with the link (decision 187 (2)) */
.bl .lane-empty .empty-live { visibility: hidden; }
.lane-orders .island-head { margin: 8px 0 2px; color: var(--wood1); font-size: 19px; }
.bl-dialog { max-width: 560px; margin: 0 auto; }
.bl-dialog .bl-lines .li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 2px dotted var(--sand2); }
.bl-dialog .bl-lines .li b { font: 400 20px/1.1 var(--font-pixel); font-weight: normal; }
.bl-dialog .bl-lines .li small { color: var(--wood1); }
.bl-dialog .bl-lines .miss { color: var(--red1); }
.bl-dialog .bl-level { width: 5em; }
.bl-dialog .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.bl-dialog .bl-choose { margin: 0 0 8px; padding: 0; list-style: none; }
.bl-dialog .bl-choose a { display: flex; gap: 6px; align-items: center; padding: 6px 2px; border-bottom: 2px dotted var(--sand2); color: var(--ink1); text-decoration: none; }
@media (max-width: 620px) {
  .bl .bl-idle-count, .bl .bl-idle-fold { display: none; } /* on the phone the list of the idle islands is the page "Inseln" behind "Alle Inseln" */
}

/* ---------- The public frame: the area "Vor dem Spiel" (p-rahmen-e1; draft design/ui-v3/rahmen.html, pictures 11 to 13) ----------
 * The bar, the page of an invitation (`.invitation-page`), the start page (`.landing`, p-rahmen-start-seite), the steps and the card of the forms. The body has the sea colour from the draft; a form card is the parchment `.panel`. */
body.public { background: var(--sea0); color: var(--parch); }
.pbar { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 16px; box-sizing: border-box; background: var(--wood2); background-image: repeating-linear-gradient(0deg, transparent 0 12px, rgba(59,36,26,.35) 12px 14px); box-shadow: inset 0 -3px 0 var(--wood0); font: 400 20px/1 var(--font-pixel); }
.pbar .grow { flex: 1; }
.pbar .pname { font-size: 24px; color: var(--glow2); text-decoration: none; }
.pbar a:not(.pname), .pbar .plink { color: var(--parch); text-decoration: underline; }
.pbar a, .pbar .plink, .pfoot a { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 6px; } /* tap area of 44 px (Review p-rahmen-e1) */
.pbar form { margin: 0; }
.pbar .plink { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.pfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; padding: 8px 34px 24px; color: var(--sand2); font-size: 16px; } /* draft: sand2, 16 px, left-aligned, "·" between the links; the links keep the 44 px tap area (34 px + the 6 px padding of a link = the 40 px of the draft) */
body.pirate .pfoot a { color: var(--sand2); text-decoration: underline; } /* as specific as the colour of links (`body.pirate a`) and later */
.public-page { max-width: 1186px; margin: 0 auto; padding: 0 0 40px; }
.public-page > .flash { margin: 14px 9px 0; }
.public-card { max-width: 560px; margin: 26px auto 0; padding: 16px 14px 14px; }
.public-card .disp { margin: 0 0 10px; }
.public-card .note2 { background: var(--sand3); padding: 6px 8px; margin: 8px 0 0; }
.legal #legal-text { overflow-wrap: anywhere; }
.legal #legal-text p { margin: 0 0 10px; }
.public-page .steps { display: flex; gap: 6px; max-width: 560px; margin: 26px auto 0; padding: 0; list-style: none; }
.public-page .steps + .public-card { margin-top: 10px; }
.steps li { flex: 1; text-align: center; font: 400 20px/1 var(--font-pixel); padding: 6px 0; background: var(--sand3); color: var(--wood1); }
.steps li.on { background: var(--gold1); color: var(--ink0); box-shadow: 0 0 0 2px var(--ink0); }
.steps li.done { background: var(--leaf); color: var(--parch2); }
@media (max-width: 620px) {
  .public-card { margin-left: 8px; margin-right: 8px; }
  .pbar { gap: 4px; padding: 0 8px; font-size: 18px; }
  .pbar .pname { font-size: 20px; }
  .pfoot { padding-left: 10px; padding-right: 10px; }
  .public-page .steps { margin-left: 8px; margin-right: 8px; }
}

/* The head of the page behind an invitation link (p-rahmen-f2): the grid with text and the two drawn tiles, as the old start page had it (the start page itself is `.landing`). */
.invitation-page { display: grid; grid-template-columns: 1fr 420px; gap: 24px; padding: 28px 40px; align-items: center; }
.invitation-page h1 { font: 400 56px/1 var(--font-pixel); color: var(--glow2); margin: 0 0 10px; }
.invitation-page p { font-size: 20px; line-height: 1.35; margin: 0 0 10px; max-width: 56ch; }
.invitation-page .ocean-line { font-size: 16px; line-height: 27px; color: var(--sand2); } /* as before the shared ocean_line set the name in bold: plain, the line as high as the text of the page (draft rahmen.html picture 13) */
.invitation-page .ocean-line b { font-weight: 400; }
.invitation-page .acts { display: flex; gap: 8px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.invitation-page .pic { height: 300px; background: #22384a; box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--wood1); display: flex; align-items: center; justify-content: center; gap: 30px; }
.invitation-page .pic canvas { width: 128px; height: 128px; image-rendering: pixelated; }
@media (max-width: 900px) {
  .invitation-page { grid-template-columns: 1fr; padding: 20px 16px; gap: 16px; }
  .invitation-page h1 { font-size: 40px; }
  .invitation-page .pic { height: 200px; gap: 16px; }
  .invitation-page .pic canvas { width: 96px; height: 96px; }
}
@media (max-width: 620px) {
  .invitation-page h1 { font-size: 34px; }
  .invitation-page p { font-size: 18px; }
}

/* The start page for a visitor (p-rahmen-start-seite; draft design/ui-v3/startseite.html): bands over the full width, the content 1240 px wide (`.wrap`). Everything under `.landing` (the main of the page), the other public pages keep the 1186 px of `.public-page`. */
.public-page.landing { max-width: none; padding: 0; background: var(--deep); overflow-x: hidden; font-size: 18px; }
.landing > .flash { margin: 14px 40px 0; }
.landing h1, .landing h2, .landing h3 { font-family: var(--font-pixel); font-weight: 400; margin: 0; }
.landing p { margin: 0 0 12px; }
.landing a { color: var(--glow2); }
.landing a.btn { color: var(--tx); }
.landing .wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.landing img.px { display: block; max-width: 100%; height: auto; }
.landing > section { position: relative; padding: 56px 0 60px; }
.landing > section.tint { background: var(--sea0); }
/* the wave edge of pixels on top of a section (colours of the sea, no gradients) */
.landing > section.tint::before, .landing > section.end::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='8' shape-rendering='crispEdges'%3E%3Crect x='0' y='4' width='32' height='4' fill='%231b2a38'/%3E%3Crect x='4' y='2' width='12' height='2' fill='%231b2a38'/%3E%3Crect x='8' y='0' width='4' height='2' fill='%231b2a38'/%3E%3Crect x='6' y='2' width='2' height='2' fill='%23366070'/%3E%3Crect x='8' y='0' width='4' height='1' fill='%234b7b83'/%3E%3C/svg%3E") repeat-x; background-size: 32px 8px; image-rendering: pixelated; }
.landing .kicker { display: inline-block; font: 400 20px/1 var(--font-pixel); color: var(--ink0); background: var(--sand3); padding: 4px 8px; box-shadow: 0 0 0 2px var(--ink0); margin: 0 0 14px; }
.landing h2 { font-size: 40px; line-height: 1; color: var(--glow2); margin: 0 0 14px; max-width: 32ch; }
.landing .lead { font-size: 20px; line-height: 1.45; max-width: 60ch; }
.landing .frame { position: relative; box-shadow: 0 0 0 3px var(--ink0), 0 0 0 6px var(--wood1); background: var(--sea1); }
.landing .frame img { width: 100%; }
.landing .acts { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin: 18px 0 12px; }
.landing .acts small { font-size: 16px; color: var(--sand3); }
.landing .ocean-line { font-size: 16px; color: var(--sand2); margin: 0; }
.landing .ocean-line b { font: 400 20px/1 var(--font-pixel); color: var(--sand3); }
.landing .panel { margin: 14px 0 0; padding: 22px 18px 14px; box-shadow: 0 0 0 2px var(--sand1), 0 0 0 6px var(--ink0); }
.landing details.lore { margin-top: 6px; }
.landing details.lore > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font: 400 20px/1 var(--font-pixel); color: var(--wood1); }
.landing details.lore > summary::-webkit-details-marker { display: none; }
.landing details.lore > summary::before { content: "▸"; }
.landing details.lore[open] > summary::before { content: "▾"; }
/* 1 Head */
.landing .hero { padding: 36px 0 56px; }
.landing .hero .wrap { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 48px; align-items: center; }
.landing .hero h1 { font-size: 60px; line-height: .95; color: var(--glow2); margin: 0 0 16px; }
.landing .hero h1 em { font-style: normal; color: var(--red2); }
.landing .hero .lead { margin: 0; }
.landing .tag { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font: 400 20px/1 var(--font-pixel); padding: 3px 6px; background: var(--parch); color: var(--ink0); box-shadow: 0 0 0 2px var(--ink0); }
.landing .tag::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -3px; width: 6px; height: 6px; background: inherit; box-shadow: 0 2px 0 0 var(--ink0); }
.landing .tag.navy { background: var(--mar1); color: var(--parch); left: 80%; top: 80%; }
.landing .tag.home { left: 45%; top: 36%; }
.landing .tag.ally { background: var(--leaf3); color: var(--ink0); left: 50%; top: 30%; }
/* 2 The goal */
.landing .route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 26px; position: relative; }
.landing .route::before { content: ""; position: absolute; left: 16%; right: 16%; top: 21px; border-top: 4px dashed var(--gold1); opacity: .7; }
.landing .step { position: relative; }
.landing .step .num { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.landing .step .num b { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font: 400 30px/1 var(--font-pixel); color: var(--ink0); background: var(--gold1); box-shadow: inset 0 0 0 2px var(--gold2), 0 0 0 2px var(--ink0); }
.landing .step h3 { font-size: 30px; line-height: 1; color: var(--glow2); background: var(--sea0); padding: 0 8px 0 0; }
.landing .step .frame { margin: 0 6px 16px; }
.landing .step p { font-size: 18px; margin: 0; }
.landing .endline { margin: 34px 0 0; display: flex; gap: 14px; align-items: center; background: var(--ink1); box-shadow: inset 0 0 0 2px var(--sea2); padding: 12px 16px; font-size: 20px; }
.landing .endline img { width: 32px; flex: none; }
/* 3 The story */
.landing .story .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 44px; align-items: start; }
.landing .story .panel { padding: 30px 26px 14px; }
.landing .story .panel h2 { color: var(--ink0); margin-bottom: 12px; }
.landing .story .panel p { font-size: 20px; line-height: 1.5; }
.landing .story .panel p.first::first-letter { font: 400 60px/.8 var(--font-pixel); float: left; margin: 6px 8px 0 0; color: var(--red1); }
.landing .story .lore p { font-size: 18px; }
.landing .story .lore b { font-weight: 700; }
.landing .story aside figure { margin: 0; }
.landing .story aside .frame { margin: 6px; }
.landing .story aside figcaption { font-size: 16px; color: var(--sand3); margin: 14px 6px 0; } /* upright: the app ships no italic Alegreya */
/* 4 The fight */
.landing .fight { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.landing .card { background: rgba(22,18,26,.55); box-shadow: inset 0 0 0 2px var(--sea2); display: flex; flex-direction: column; }
.landing .card .pic { height: 128px; background: var(--sea1); box-shadow: inset 0 -2px 0 var(--sea2); display: flex; align-items: flex-end; justify-content: center; gap: 4px; overflow: hidden; }
.landing .card .pic img { width: 112px; }
.landing .card .txt { padding: 12px 14px 14px; }
.landing .card h3 { font-size: 30px; line-height: 1; color: var(--glow2); margin: 0 0 6px; }
.landing .card p { margin: 0; font-size: 18px; }
.landing .card.navy { grid-column: span 2; background: var(--mar0); box-shadow: inset 0 0 0 2px var(--mar1), 0 0 0 2px var(--ink0); flex-direction: row; }
.landing .card.navy .pic { background: var(--mar1); height: auto; min-height: 128px; flex: 0 0 260px; box-shadow: inset -2px 0 0 var(--ink0); align-items: center; }
.landing .card.navy h3 { color: var(--parch); }
.landing .fair { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; align-items: center; margin: 26px 0 0; padding: 14px 16px; background: var(--parch); color: var(--ink1); box-shadow: 0 0 0 2px var(--sand1), 0 0 0 6px var(--ink0); }
.landing .fair b { font: 400 30px/1 var(--font-pixel); color: var(--red1); white-space: nowrap; }
.landing .fair span { font-size: 18px; }
/* 5 The alliance */
.landing .ally .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: start; }
.landing .four { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin-top: 22px; }
.landing .four > div { border-top: 2px dotted var(--sand2); padding-top: 10px; }
.landing .four b { display: block; font: 400 20px/1 var(--font-pixel); color: var(--glow2); margin: 0 0 4px; }
.landing .four p { font-size: 17px; margin: 0; }
.landing .fallen { margin: 6px; }
.landing .crew { display: flex; gap: 10px; align-items: flex-end; margin: 24px 6px 0; flex-wrap: wrap; }
.landing .crew figure { margin: 0; text-align: center; font: 400 20px/1 var(--font-pixel); color: var(--sand3); }
.landing .crew img { width: 72px; box-shadow: 0 0 0 2px var(--ink0), 0 0 0 4px var(--leaf3); margin: 4px 4px 8px; }
.landing .rank { margin-top: 22px; }
.landing .rank table { width: 100%; border-collapse: collapse; }
.landing .rank td { padding: 6px 4px; border-bottom: 2px dotted var(--sand2); font: 400 20px/1.1 var(--font-pixel); }
.landing .rank tr:last-child td { border-bottom: 0; }
.landing .rank td.n { text-align: right; color: var(--wood1); }
.landing .rank tr.me td { color: var(--leaf1); }
/* 6 A life with a job */
.landing .night .scene { display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; margin: 30px 6px 0; }
.landing .log { margin: 0 0 0 -48px; z-index: 1; font-size: 16px; line-height: 1.35; }
.landing .log ol { list-style: none; margin: 0; padding: 0; }
.landing .log li { padding: 5px 0; border-bottom: 2px dotted var(--sand2); }
.landing .log li:last-child { border-bottom: 0; }
.landing .log .ok { margin: 6px 0 0; color: var(--leaf1); font: 400 20px/1.1 var(--font-pixel); }
.landing .perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.landing .perks > div { background: rgba(22,18,26,.55); box-shadow: inset 0 0 0 2px var(--sea2); padding: 12px 14px; }
.landing .perks b { display: block; font: 400 20px/1 var(--font-pixel); color: var(--glow2); margin: 0 0 6px; }
.landing .perks p { margin: 0; font-size: 17px; }
.landing .perks .agent { box-shadow: inset 0 0 0 2px var(--gold0); }
/* 7 The end */
.landing > section.end { background: var(--sea0); padding-bottom: 64px; }
.landing .end .wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 48px; align-items: center; }
.landing .end .frame { margin: 6px; }
.landing .end h2 { font-size: 60px; line-height: .95; }
@media (min-width: 1600px) { .landing .hero .wrap { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .landing .wrap { padding: 0 24px; }
  .landing .hero .wrap, .landing .story .wrap, .landing .ally .wrap, .landing .end .wrap { grid-template-columns: minmax(0, 1fr); }
  .landing .story aside { max-width: 560px; }
  .landing .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
  .landing .night .scene { grid-template-columns: minmax(0, 1fr); }
  .landing .log { margin: -24px 12px 0; }
}
@media (max-width: 760px) {
  .landing .route { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .landing .route::before { display: none; }
  .landing .fight { grid-template-columns: minmax(0, 1fr); }
  .landing .card.navy { grid-column: auto; flex-direction: column; }
  .landing .card.navy .pic { flex: none; height: 128px; box-shadow: inset 0 -2px 0 var(--ink0); }
  .landing .four, .landing .perks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .public-page.landing { font-size: 17px; }
  .landing .wrap { padding: 0 16px; }
  .landing > section { padding: 40px 0 44px; }
  .landing > section.hero { padding: 22px 0 40px; }
  .landing .hero .wrap { gap: 26px; }
  .landing .hero h1 { font-size: 40px; }
  .landing .lead { font-size: 18px; }
  .landing h2, .landing .end h2 { font-size: 30px; }
  .landing .tag.home { display: none; }
  .landing .story .panel { padding: 26px 14px 10px; }
  .landing .story .panel p { font-size: 18px; }
  .landing .endline { font-size: 18px; align-items: flex-start; }
  .landing .fair { grid-template-columns: minmax(0, 1fr); }
  .landing .crew img { width: 48px; }
}

/* The page "Freunde einladen" (p-rahmen-f1; draft design/ui-v3/rahmen.html picture 6 `.link`, `.note2`, `.fr2`): the link as markable text, the note, the list. */
.invitation .tok { font: 400 16px/1.3 monospace; background: var(--ink1); color: var(--gold2); padding: 8px; word-break: break-all; margin: 6px 0; user-select: all; }
.invitation .note2 { background: var(--sand3); padding: 6px 8px; margin: 8px 0 0; }
.invitation .fr2 { width: 100%; margin-top: 10px; border-collapse: collapse; }
.invitation .fr2 td { padding: 4px 6px; border-bottom: 1px solid var(--sand1); }

/* The entry of an island he may take back (Nr. 391, addendum 2): "Verlorene Insel X · jetzt bei K (..): n Ticks"; a narrow row breaks after the head and says the term on the second line. Narrow is the phone layout (max-width 620, the limit of BROWSER_WINDOWS 620/621; review p-sammel-19). */
.sea-map-lost-until { display: none; }
@media (max-width: 620px) {
  .sea-map-lost-head { display: block; }
  .sea-map-lost-sep { display: none; }
  .sea-map-lost-until { display: inline; }
}
