/* Quaymore — verdigris harbour ground (mid theme), single brass accent. The CA is a floating pill anchored at the
   bottom of the viewport (bar: mid) — never edge-to-edge, never the page's nav. The nav (wordmark + connect) sits
   in normal flow at the very top instead, since the bar itself carries no identity. The hero under the chrome is
   the harbourmaster's NOTICE — a paragraph, not a table, not a literal heading tag — and the quay map (a row of
   berth slots along the pier) is the page's one object, trailing the notice as a sibling. No header/footer strip
   carried over from any other build. */
:root {
  --bg: #3F6E64; --ink: #0E211E; --accent: #E8A33D; --line: rgba(14,33,30,.22); --muted: #1D3B35;
  --panel: #365C54; --panel2: #315650; --danger: #B23A2E;
  --disp: 'Special Elite', 'Courier New', monospace; --body: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
.visuallyhidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(circle at 18% 12%, rgba(232,163,61,.08), transparent 40%);
  color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--danger); text-decoration: underline; text-underline-offset: 2px; }
code { font-family: var(--body); }
button { font-family: var(--body); cursor: pointer; }

/* ---------- top identity strip: normal flow, NOT fixed (the bar is the floating pill, not this) ---------- */
.quaynav { max-width: 1200px; margin: 0 auto; padding: 16px 16px 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.quaynav-mark { display: flex; align-items: center; gap: 9px; font-family: var(--disp); font-size: 18px; }
.quaynav-mark img { width: 24px; height: 24px; }
.quaynav-mark .qtick { font-family: var(--body); font-weight: 600; color: var(--danger); letter-spacing: .04em; font-size: 12px; }
.quaynav-tag { font-family: var(--disp); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: rgba(14,33,30,.09); padding: 5px 10px; border-radius: 999px; }
.quaynav-connect { margin-left: auto; background: transparent; color: var(--ink); border: 1px solid var(--muted); border-radius: 999px; padding: 7px 15px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; font-size: 11px; }
.quaynav-connect.linked { border-color: var(--accent); background: rgba(232,163,61,.16); }

/* ---------- layout ---------- */
main#view { display: block; max-width: 1200px; margin: 0 auto; padding: 196px 16px 0; }
.quaygrid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.quaylog { max-width: 1200px; margin: 0 auto; padding: 0 16px 30px; }

/* ---------- the notice (hero: the harbourmaster's paragraph, first under the chrome) ---------- */
.noticeblock { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px 20px; position: relative; }
.noticeblock::before { content: '⚓'; position: absolute; top: -14px; left: 18px; background: var(--accent); color: var(--muted); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.noticehead { font-family: var(--disp); font-size: clamp(21px, 4vw, 28px); line-height: 1.2; margin: 6px 0 8px; }
.noticesub { color: var(--ink); opacity: .82; font-size: 13.5px; margin: 0 0 18px; max-width: 60ch; }
.actionrow { display: flex; gap: 8px; }
.actionrow input { flex: 1; background: rgba(14,33,30,.08); border: 1px dashed var(--muted); border-radius: 8px; color: var(--ink); padding: 14px; font-family: var(--body); font-size: 15px; }
.actionrow input:focus { outline: none; border-color: var(--accent); }
button#bidBtn {
  background: var(--accent); color: var(--muted); border: none; border-radius: 8px; padding: 14px 20px; font-family: var(--disp);
  font-size: 15px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
}
button#bidBtn:disabled { background: rgba(14,33,30,.14); color: var(--muted); cursor: not-allowed; }
.bidhint { color: var(--ink); opacity: .75; font-size: 12px; margin-top: 10px; line-height: 1.5; }
.bidhint b { opacity: 1; font-weight: 700; }
.bidflag { color: var(--danger); font-size: 12px; margin-top: 8px; font-weight: 600; }
.noticelink { display: inline-block; margin-top: 14px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px dashed var(--muted); text-decoration: none; }
.jumbo { font-size: 16px !important; }

/* ---------- the quay map: berths along the pier ---------- */
.piermap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.berth { border-radius: 10px; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 78px; justify-content: center; }
.berth-n { font-family: var(--disp); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.berth-status { font-size: 11px; opacity: .8; }
.berth-bid { font-size: 12.5px; font-weight: 700; }
.berth-quiet { background: rgba(14,33,30,.05); border: 1px dashed var(--line); color: var(--ink); opacity: .55; }
.berth-live { background: rgba(232,163,61,.18); border: 1px solid var(--accent); box-shadow: 0 0 0 1px rgba(232,163,61,.14) inset; }
.berth-live .berth-status { color: var(--danger); font-weight: 700; opacity: 1; }

/* ---------- stats rail + settled ledger ---------- */
.quayside { display: grid; gap: 14px; }
.factcard { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.factcard h3 { font-family: var(--disp); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; color: var(--danger); }
.statline { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.statline:last-child { border-bottom: none; }
.statline span { opacity: .72; }
.statline b { font-weight: 700; }
.factcard.quietnote { opacity: .7; }
.logwrap h2 { font-family: var(--disp); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; margin: 22px 0 10px; }
.logtable { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--panel); border-radius: 10px; overflow: hidden; }
.logtable th { text-align: left; opacity: .68; font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.logtable td { padding: 9px 10px; border-bottom: 1px dashed var(--line); }
.quietnote { opacity: .65; text-align: center; padding: 20px !important; }

/* ---------- how / handbook ---------- */
.almanac { max-width: 720px; margin: 0 auto; padding: 8px 4px 40px; }
.almanac blockquote { font-family: var(--disp); font-size: 20px; border-left: 3px solid var(--accent); padding-left: 16px; margin: 20px 0; }
.almanac h3 { font-family: var(--disp); font-size: 14px; text-transform: uppercase; margin: 24px 0 8px; color: var(--danger); }
.almanac p { opacity: .82; line-height: 1.65; }
.almanac code { opacity: 1; }

/* ---------- pane (rules sheet / bid confirm) ---------- */
#tray[hidden] { display: none !important; }
#tray { position: fixed; inset: 0; background: rgba(14,33,30,.72); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.traycard { background: var(--panel2); border: 1px solid var(--accent); border-radius: 16px 16px 0 0; width: 100%; max-width: 480px; padding: 20px; }
.trayhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.trayhead span { font-family: var(--disp); text-transform: uppercase; font-size: 14px; }
.trayhead button { background: none; border: none; color: var(--ink); font-size: 22px; }
.walletpicks { display: grid; gap: 8px; }
.walletpicks button { display: flex; align-items: center; gap: 10px; background: rgba(14,33,30,.08); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 12px; width: 100%; text-align: left; }
.walletpicks img { width: 22px; height: 22px; }
.noticelist { margin: 0; padding-left: 0; list-style: none; font-size: 13px; line-height: 1.7; }
.noticelist li { border-bottom: 1px dashed var(--line); padding: 9px 0; }

/* ---------- quayfoot (footer) ---------- */
.quayfoot { max-width: 1200px; margin: 0 auto; padding: 22px 16px 40px; border-top: 1px solid var(--line); font-size: 12px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; opacity: .85; }
.quayfoot-mark { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-size: 13px; text-transform: uppercase; }
.quayfoot-mark img { width: 18px; height: 18px; }
.quayfoot-nav { display: flex; gap: 12px; }
.quayfoot-nav a { text-decoration: none; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; color: var(--ink); }
.quayfoot-kv code { opacity: 1; }
.quayfoot-soc { display: flex; gap: 10px; }
.quayfoot-soc a { text-decoration: none; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.quayfoot-tag { width: 100%; margin-top: 6px; }

/* ---------- the CA pill: FLOATING, fixed near the vertical middle of the chrome (not top, not bottom, spans
   most of the width) — the bar itself carries no identity/nav, so it can float free of the document flow. ---------- */
.capill {
  position: fixed; left: 50%; top: 130px; transform: translateX(-50%); z-index: 50;
  background: var(--muted); color: #F0E6C8; border: 1px solid var(--accent); border-radius: 999px;
  padding: 10px 8px 10px 16px; display: flex; align-items: center; gap: 10px;
  width: calc(100% - 24px); max-width: 760px;
  box-shadow: 0 10px 30px rgba(14,33,30,.4);
}
.capill-label { font-family: var(--disp); font-size: 10px; letter-spacing: .1em; color: var(--accent); flex-shrink: 0; text-transform: uppercase; }
.capill-addr { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12px; user-select: all; max-width: 42vw; }
.capill-copy { background: var(--accent); color: var(--muted); border: none; border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 11px; text-transform: uppercase; flex-shrink: 0; }
.capill-copy.stamped { background: #F0E6C8; }
.capill-link { flex-shrink: 0; color: #F0E6C8; text-decoration: none; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-left: 1px solid rgba(240,230,200,.3); padding-left: 10px; }

/* ---------- pingtoast (toast) ---------- */
.quaytoast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #F0E6C8; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 80; }

/* ================= breakpoints ================= */
/* ≤ 520: single column, nav → notice → pier map (2-up) → rail → ledger stacked, no horizontal scroll (base above). */

/* ~720–1000: same one column, wider measure, larger type, pier map goes 4-up. */
@media (min-width: 720px) {
  main#view { padding-top: 200px; }
  .noticehead { font-size: 28px; }
  .piermap { grid-template-columns: repeat(4, 1fr); }
  .quaynav { padding: 20px 24px 8px; }
}

/* ≥ 1000: the page recomposes — notice+map in a primary column, the stats rail sticky beside it; pier map goes
   all 8 berths in one row since the primary column is now wide. */
@media (min-width: 1000px) {
  .quaygrid { grid-template-columns: 1.7fr 1fr; align-items: start; gap: 24px; }
  .maincol { display: grid; gap: 18px; }
  .noticehead { font-size: 30px; }
  .noticeblock { padding: 28px 26px 24px; }
  .piermap { grid-template-columns: repeat(8, 1fr); }
  main#view { padding-top: 200px; }
  .quayside { position: sticky; top: 184px; }
}
