/* Elevate Stringing. Rules and reasons: docs/design.md */

:root {
  --ink: #1A1925;
  --slate: #5C5966;
  --paper: #FDFDFC;
  --cream: #F3EFE9;
  --line: #E6E3DC;
  --teal: #028090;
  --mint: #B8E8C9;
  --peri: #B3BEE8;
  --pink: #E8B3D1;
  --danger: #C0392B;
  --gradient: linear-gradient(90deg, var(--mint), var(--teal), var(--peri), var(--pink));
  --radius: 14px;
  --shadow: 0 1px 2px rgba(26, 25, 37, .05), 0 8px 24px rgba(26, 25, 37, .07);
  --font: 'Poppins', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* so hiding always wins, even over .btn's display */
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* Phone first: one narrow column. The admin page widens it for the laptop. */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.admin .wrap { max-width: 1280px; padding: 0 24px; }

/* Header: Dad's logo exactly as supplied, centred on ink. Its own gradient rule is the
   one gradient on the screen. Version (and "Admin") sit as small tags in the corner. */
header.app {
  background: var(--ink);
  color: var(--cream);
  padding: calc(10px + env(safe-area-inset-top)) 0 14px;
}
.brand { position: relative; }
.brand h1 { margin: 0; line-height: 0; text-align: center; }
.brand .logo { display: inline-block; width: 280px; max-width: 100%; height: auto; }
.tags { display: flex; justify-content: flex-end; gap: 6px; min-height: 18px; }
.vertag {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  background: rgba(243, 239, 233, .14); color: var(--cream);
  font-size: .68rem; font-weight: 700; letter-spacing: 0;
}
/* Database status dot: mint = connected, red = can't reach it, grey = checking */
.dot {
  display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%;
  vertical-align: 0; background: var(--slate);
}
.dot[data-status="ok"] { background: var(--mint); }
.dot[data-status="down"] { background: #E5534B; }

main.wrap { padding-top: 20px; padding-bottom: 24px; }

/* Segmented tabs (admin areas) */
.tabs {
  display: flex; gap: 4px; padding: 4px; margin: 0 0 18px;
  background: var(--line); border-radius: 12px; overflow-x: auto;
}
.tabs a {
  flex: 1 0 auto; min-height: 44px; padding: 0 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; color: var(--slate); font-weight: 600; font-size: .88rem;
  text-decoration: none; white-space: nowrap;
}
.tabs a.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }

/* Card */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px;
}
.kicker {
  margin: 0 0 6px;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--slate);
}
.title { margin: 0 0 8px; font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.lead { margin: 0 0 18px; color: var(--slate); }

/* Buttons: full width on phones, one primary per screen */
.btns { display: flex; flex-direction: column; gap: 10px; }
.btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 48px; padding: 12px 20px;
  border: 1px solid transparent; border-radius: 11px;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { filter: brightness(.92); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
@media (min-width: 768px) {
  .admin .btns { flex-direction: row; flex-wrap: wrap; }
  .admin .btn { width: auto; }
}

.btn[disabled] { opacity: .55; cursor: default; }
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }

/* Form fields */
.field { display: block; margin: 0 0 14px; font-size: .85rem; font-weight: 600; }
.field input, .input {
  display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 400;
}
.field input:focus, .input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(2, 128, 144, .18); }
.search { margin: 0 0 12px; }

/* Player names list (P1): big rows, easy to tap */
.namelist { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.namelist:empty { display: none; }
.namebtn {
  display: block; width: 100%; min-height: 52px; padding: 12px 16px; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.namelist li:last-child .namebtn { border-bottom: 0; }
.namebtn:hover, .namebtn:active { background: var(--cream); }

/* Admin players table (A6) */
.ptable { width: 100%; margin: 8px 0 20px; border-collapse: collapse; font-size: .95rem; }
.ptable th {
  padding: 8px 10px; text-align: left; border-bottom: 2px solid var(--line);
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--slate);
}
.ptable td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr.archived td:first-child { color: var(--slate); }
.ptable .actions { text-align: right; white-space: nowrap; }
.editrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.editrow .input { width: auto; flex: 1 1 160px; margin: 0; }
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--cream); color: var(--slate); font-size: .75rem; font-weight: 600;
}
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
textarea.input { resize: vertical; font-family: inherit; }
div.msg ul { margin: 6px 0 0; padding-left: 20px; }
.note { margin: 16px 0 0; font-size: .85rem; color: var(--slate); }
.note a { color: var(--teal); font-weight: 600; }

/* Rackets (P4, P13, A7) */
.filein { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.btn { position: relative; }
label.btn:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.btns.two { flex-direction: row; }
.btns.two .btn { flex: 1; width: auto; }
/* Photos are NEVER cropped (Dad): object-fit: contain shows the whole photo,
   with cream filling any space around it. */
.rphoto { display: block; width: 100%; max-height: 260px; object-fit: contain; background: var(--cream); border-radius: 10px; margin: 0 0 12px; }
/* Compact rows so several rackets fit on one phone screen (Dad). */
.rcards { display: grid; gap: 10px; margin: 0 0 18px; }
@media (min-width: 768px) { .admin .rcards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
.rcard {
  display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center;
  padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.rthumb { display: block; width: 76px; height: 76px; border-radius: 8px; background: var(--cream); overflow: hidden; }
.rthumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rthumb.small { width: 40px; height: 40px; border-radius: 6px; flex: none; }
.withthumb { display: flex; align-items: center; gap: 10px; }
.rthumb.none { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--slate); font-size: .75rem; }
.rbody { min-width: 0; }
.rname { margin: 0 0 2px; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.ractions { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; }
.ractions .linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; font-size: .85rem; }
.rdesc { margin: 0; font-size: .85rem; line-height: 1.4; color: var(--slate); overflow-wrap: anywhere; }
.reditor .input { margin: 0 0 6px; min-height: 44px; padding: 8px 10px; font-size: .95rem; }
.reditor .btn { width: auto; min-height: 44px; padding: 8px 16px; }
.ptable .actions .linkbtn { margin-left: 12px; }
.linkbtn.danger { color: var(--danger); }
.addracket { max-width: 520px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.addracket .rphoto { max-height: 200px; }
.rbody .msg { margin: 4px 0 0; }
.hint { margin: -8px 0 14px; }
.msg.busy { color: var(--slate); }

/* Strings (A8) and Settings (A10) */
.pill.on { background: var(--mint); color: var(--ink); }
.field .note { display: block; margin: 4px 0 0; font-weight: 400; }
.stringform { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.stringform .cols { display: grid; gap: 0 32px; }
@media (min-width: 900px) { .stringform .cols { grid-template-columns: 1fr 1fr; } }
.stringform .rphoto { max-height: 200px; }
.costhelper { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--cream); }
.costhelper .kicker { margin-bottom: 4px; }
.costhelper ul { margin: 0 0 6px; padding-left: 18px; font-weight: 600; }
.costhelper .note { margin: 0; }

/* Stock (A9) */
.stockstring { margin: 0 0 20px; }
.stockstring .maph .pill { margin-left: 8px; }
.stocksection { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--mint); border-radius: 10px; }
.stocksection.low { border-left-color: var(--pink); }
.stockhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stocktotal { color: var(--slate); }
.pill.low { background: var(--pink); color: var(--ink); }
.ptable.reels { margin: 6px 0 0; font-size: .88rem; }
.ptable.reels .pill { margin-left: 6px; }
.ptable .editrow .input { width: 90px; flex: 0 0 90px; }
.addreel { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.cols4 { display: grid; gap: 0 16px; }
@media (min-width: 900px) { .cols4 { grid-template-columns: 2fr 1.2fr 1fr .8fr 1fr; } }
select.input { appearance: auto; }

/* "There's already a Tom Smith" */
.notice { margin: 0 0 16px; padding: 14px 16px; border-left: 4px solid var(--teal); border-radius: 10px; background: var(--cream); }
.notice p { margin: 0 0 12px; font-weight: 600; }
.msg { min-height: 1.6em; margin: 0 0 12px; font-size: .88rem; font-weight: 600; color: var(--danger); }
.msg:empty { margin: 0; min-height: 0; }

.who { margin: 0 0 4px; }
.linkbtn {
  min-height: 44px; padding: 0 4px; border: none; background: none; cursor: pointer;
  color: var(--teal); font: inherit; font-weight: 600; text-decoration: underline;
}

/* Screen map (Phase 0 only) */
.maph { margin: 18px 0 4px; font-size: .95rem; font-weight: 600; }
.map { margin: 0; padding-left: 22px; }
.map a { display: block; min-height: 44px; padding: 10px 0; color: var(--teal); font-weight: 600; text-decoration: none; }

/* "A new version is ready" bar, pinned to the bottom of the screen */
.updatebar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  border-radius: 12px; background: var(--ink); color: var(--cream); box-shadow: var(--shadow);
  font-size: .9rem; font-weight: 600;
}
.updatebar span { flex: 1; }
.updatebar .btn { width: auto; min-height: 44px; padding: 8px 18px; }

/* Footer */
.footnote { padding: 4px 16px 32px; text-align: center; font-size: .78rem; color: var(--slate); }
.footnote a { display: inline-block; min-height: 44px; padding: 12px 4px; color: var(--teal); font-weight: 600; }

/* String picker (P7) */
.scards { display: grid; gap: 10px; margin: 0 0 16px; }
.scard { padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.scard.chosen { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(2, 128, 144, .2); }
.scardhead { display: flex; align-items: center; gap: 10px; }
.sthumb { width: 52px; height: 52px; flex: none; border-radius: 8px; background: var(--cream); object-fit: contain; }
.sname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sname .note { margin: 0; }
.infobtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--teal); background: var(--paper); color: var(--teal);
  font: inherit; font-weight: 700; font-style: italic; font-size: 1.05rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
}
.chip.on { border-color: var(--teal); background: var(--teal); color: #fff; }
.chipprice { margin-left: 6px; font-weight: 400; opacity: .85; }
.btn.disabled { opacity: .45; pointer-events: auto; cursor: default; }

/* The ⓘ sheet: bottom sheet on phones, centred box on laptops */
.sheet { padding: 0; border: 0; border-radius: 16px 16px 0 0; width: 100%; max-width: 560px; max-height: 85vh;
  margin: auto auto 0; background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(26, 25, 37, .55); }
.sheetbody { position: relative; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheetclose {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--cream); color: var(--ink); font-size: 1.1rem; cursor: pointer;
}
.sheetphoto { display: block; width: 100%; max-height: 40vh; object-fit: contain; background: var(--cream); border-radius: 10px; margin: 36px 0 12px; }
.sheetdesc { white-space: pre-line; line-height: 1.6; }
.sheetprices { margin: 0; padding-left: 18px; font-weight: 600; }
@media (min-width: 768px) { .sheet { margin: auto; border-radius: 16px; } }

/* Automatic prices (Stock) */
.pricenow { font-weight: 600; color: var(--teal); }
.pricesum { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--cream); font-weight: 600; }
.ptable.reels .editrow { gap: 6px; }

/* Order steps (P6–P11) */
.progress { display: flex; gap: 4px; margin: 0 0 10px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--teal); }
.stephead { display: flex; align-items: center; justify-content: space-between; }
.stephead .kicker { margin: 0; }
.rpicks { display: grid; gap: 8px; margin: 0 0 16px; }
.rpick {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit;
}
.rpick.on { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(2, 128, 144, .2); }
.rpick .rthumb { width: 60px; height: 60px; flex: none; }
.rpicktext { display: flex; flex-direction: column; min-width: 0; }
.rpicktext .note { margin: 0; }
.tensionrow { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.tlabel { width: 64px; font-weight: 600; }
.stepbtn {
  width: 48px; height: 48px; flex: none; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1.4rem; font-weight: 600;
}
.input.tension { width: 84px; margin: 0; text-align: center; font-size: 1.15rem; font-weight: 600; }
.input.tension:disabled { background: var(--cream); color: var(--slate); }
.lanecard {
  display: block; width: 100%; margin: 0 0 10px; padding: 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit;
}
.lanecard.on { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(2, 128, 144, .2); }
.lanetop { display: flex; justify-content: space-between; margin: 0 0 4px; }
.review { display: flex; gap: 12px; align-items: flex-start; }
.review dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .95rem; }
.review dt { color: var(--slate); }
.review dd { margin: 0; font-weight: 600; }
.reviewprice { margin: 16px 0 8px; font-size: 1.8rem; font-weight: 700; }
.warnbox { margin: 8px 0 14px; padding: 10px 14px; border-left: 4px solid var(--pink); border-radius: 10px; background: var(--cream); font-weight: 600; font-size: .92rem; }
.confirm .bigref { margin: 0 0 12px; font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; }
.confirm .rthumb { width: 120px; height: 120px; margin: 0 0 8px; }

/* My orders (P5) */
.orderlist { display: grid; gap: 10px; }
.orow { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.orow .rthumb { width: 64px; height: 64px; }
.orowtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.orowbody .note { margin: 2px 0 0; }
.orowbody .warnbox { margin: 6px 0 0; }
.pill.st-awaiting_cash { background: var(--pink); color: var(--ink); }
.pill.st-paid { background: var(--mint); color: var(--ink); }
.pill.st-in_queue { background: var(--teal); color: #fff; }
.pill.st-on_machine { background: var(--peri); color: var(--ink); }
.pill.st-ready { background: var(--pink); color: var(--ink); }

/* Orders (A11) */
.cashlist { display: grid; gap: 8px; margin: 0 0 20px; }
.cashrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--pink); border-radius: 10px; }
.cashrow .note { margin: 2px 0 0; }
.cashrow .btn { width: auto; }
.createorder { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.createorder > .btn { width: auto; }
.createform .tensionrow { flex-wrap: wrap; }

/* Order notes and racket pictures on orders */
.ordernote { margin: 4px 0 0; padding: 4px 8px; border-radius: 6px; background: var(--cream); font-size: .85rem; font-weight: 600; font-style: italic; overflow-wrap: anywhere; }
.cashrow .rthumb { width: 64px; height: 64px; }

/* Card payment confirmation */
.warnbox.paidbox { border-left-color: var(--mint); }
.txcode { padding: 1px 6px; border-radius: 4px; background: var(--cream); font-size: .8rem; letter-spacing: .03em; }

/* Pay by card: SumUp's Payment Widget draws its own card boxes inside this */
.cardform { min-height: 140px; margin: 4px 0 12px; }

/* Frame check before paying (Dad's brief, 2026-10-25) */
.framecheck { margin: 12px 0; padding: 12px 14px; border-left: 4px solid var(--pink); border-radius: 10px; background: var(--cream); }
.framecheck h3 { margin: 0 0 6px; font-size: 1rem; }
.framecheck p { margin: 0 0 8px; font-size: .9rem; }
.framecheck .check { font-weight: 600; align-items: flex-start; }
.framecheck .check input { flex: none; margin-top: 2px; width: 22px; height: 22px; }

/* "Not sure – please recommend", the 28 lbs note and the guide (Dad's brief, 2026-10-25) */
.recommendbtn { display: block; width: 100%; min-height: 48px; margin: 8px 0 12px; padding: 10px 14px; border: 2px dashed var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.recommendbtn.on { border: 2px solid var(--teal); background: rgba(2, 128, 144, .08); }
.recommendcheck { display: flex; margin: 8px 0 4px; font-weight: 600; }
.nudge { margin: 4px 0 10px; padding: 8px 12px; border-left: 4px solid var(--teal); border-radius: 10px; background: var(--cream); font-size: .88rem; }
.nudge[hidden], [hidden] { display: none !important; }
.pill.needsrec { margin-left: 6px; background: var(--pink); color: var(--ink); }
.guidesec h3 { margin: 16px 0 6px; font-size: 1rem; }
.guidesec p { margin: 0 0 10px; line-height: 1.5; }
.guidelist { margin: 0 0 10px; }
.guidelist dt { font-weight: 700; margin-top: 6px; }
.guidelist dd { margin: 0 0 4px; }

/* Admin → Orders: fits a laptop screen; scrolls sideways rather than spilling over */
.tablewrap { overflow-x: auto; }
.ptable.orders { font-size: .9rem; }
.ptable.orders td, .ptable.orders th { padding: 6px 8px; }
.ptable .actions .actionstack { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ptable .actions .actionstack .linkbtn { margin: 0; min-height: 32px; font-size: .85rem; }

/* Test players and their orders (test money: never string a TEST order) */
.pill.testpill { margin-left: 6px; background: var(--ink); color: var(--cream); letter-spacing: .04em; }

/* ---------------------------------------------------------------- Phase 6: work board and queue */
/* The red to-do badge on the Orders tab (cash to take + strings to recommend) */
.tabs a .badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .72rem; font-weight: 700; line-height: 1;
}

/* Columns side by side on a laptop, stacked on a phone */
.boardhead { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.boardsearch { max-width: 280px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 12px; align-items: start; }
.publicboard { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .board, .publicboard { grid-template-columns: 1fr; } }
.boardcol { padding: 10px; border-radius: 12px; background: var(--cream); min-height: 120px; }
.boardcol .maph { margin: 2px 0 8px; }

/* A card on the work board */
.jobcard { margin: 0 0 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.jobcard.test { border-style: dashed; }
.jobtop { display: flex; gap: 10px; align-items: center; }
.jobtop .note { margin: 2px 0 0; }
.bigtension { margin: 8px 0 2px; font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
.bigtension small, .hugetension small { font-size: .45em; font-weight: 600; color: var(--slate); }
.jobstring { margin: 0 0 6px; font-weight: 600; font-size: .9rem; }
.jobstring.big { font-size: 1.15rem; }
.pill.expresspill { margin-left: 6px; background: var(--pink); color: var(--ink); }
.cardbtn { min-height: 44px; margin-top: 8px; }

/* The job card at the machine: tensions as big as possible */
.jobscreen .rthumb { width: 120px; height: 120px; margin: 8px 0; }
.tensionlabel { margin: 10px 0 0; color: var(--slate); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.hugetension { margin: 0 0 6px; font-size: 3.6rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }

/* "ES-0042 is on the machine · Undo" */
.undobar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--cream);
  box-shadow: var(--shadow); font-weight: 600;
}
.undobar .linkbtn { color: var(--mint); }

/* Public board and "where's my racket?" */
.publiclist { margin: 0; padding: 0; list-style: none; }
.publiclist li { padding: 8px 10px; margin: 0 0 6px; border-radius: 10px; background: var(--paper); font-weight: 600; }
.qpos { display: inline-block; min-width: 1.8em; color: var(--teal); }
.orow .where { margin: 6px 0 0; font-weight: 700; color: var(--teal); }

/* ‹ Back and forward on each work-board card */
.cardbtns { display: flex; gap: 8px; margin-top: 8px; }
.cardbtns .cardbtn { margin-top: 0; }
.cardbtns .backbtn { flex: 0 0 auto; width: auto; padding: 0 14px; }

/* Arrange collection on a Ready card (several in a row after a session) */
.arrange { margin: 6px 0 0; }
.arrangehead { margin: 0 0 6px; font-weight: 700; color: var(--danger); }
.arrange .chips { gap: 6px; }

/* Work board, compact (Harry, 2026-10-25): five lanes, express next to the machine, small cards so a
   whole session fits on screen. These come after the first board styles, so they win. */
.board { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.boardcol { padding: 8px; min-height: 90px; }
.boardcol.col-express { background: #F6E3EE; }               /* a pink tint: express is next */
.boardcol .maph { font-size: .9rem; margin: 0 0 6px; }
.jobcard { margin: 0 0 6px; padding: 6px 8px; }
.jobtop { gap: 6px; flex-wrap: wrap; font-size: .88rem; }
.jobtop .pill { margin-left: 0; }
.jobref { margin-left: auto; font-size: .75rem; color: var(--slate); }
.bigtension { margin: 2px 0 0; font-size: 1.15rem; }
.jobstring { margin: 0 0 4px; font-size: .78rem; font-weight: 500; }
.jobnote { margin: 0 0 4px; font-size: .75rem; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jobcard .linkbtn { font-size: .78rem; }
.cardbtns { margin-top: 4px; gap: 6px; }
.cardbtn { min-height: 34px; padding: 4px 10px; font-size: .85rem; }
.cardbtns .backbtn { padding: 0 12px; }
.arrange .chip { padding: 4px 10px; font-size: .78rem; }
.arrangehead { font-size: .8rem; margin: 0 0 4px; }
/* Public board: the player pages are narrow (phone first), so lanes wrap onto a new row when there
   isn't room for all five, instead of squashing (seen on a laptop, 2026-10-25). */
.publicboard { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Home (the queue): greeting and the two main buttons */
.greet { margin: 0 0 8px; }
.homebtns { margin-top: 0; }

/* Public board looks like the work board (Harry, 2026-10-25): pink express lane, names on small white
   cards, 1st / 2nd / 3rd in the queue. Still only first name + initial: no tensions, strings or notes. */
.publicboard .boardcol.col-express { background: #F6E3EE; }
.publiclist li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.publiclist .qpos { min-width: 2.4em; font-weight: 800; color: var(--teal); }
.publicboard .col-express .qpos { color: var(--danger); }
.publiclist .qname { font-weight: 600; }
.publiclist .qtag { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--mint); font-size: .72rem; font-weight: 700; }

/* "You" on the public board: your own rackets stand out (Harry, 2026-10-25) */
.publiclist li.mine { border: 2px solid var(--teal); background: rgba(2, 128, 144, .08); }
.publiclist .qyou { padding: 1px 8px; border-radius: 999px; background: var(--teal); color: #fff; font-size: .72rem; font-weight: 700; }
.publiclist .qtag { margin-left: 6px; }
.publiclist li .qyou { margin-left: auto; }

/* ---------------------------------------------------------------- Phase 7: tracker */
/* My orders: one compact row per order (Harry): ref, mini tracker, a few words */
.orow.compact { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ref chev" "track track" "status status";
  gap: 6px 10px; align-items: center; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.orow.compact .oref { grid-area: ref; font-size: 1.05rem; }
.orow.compact .ochev { grid-area: chev; justify-self: end; font-size: 1.4rem; color: var(--slate); }
.orow.compact .tracker { grid-area: track; }
.orow.compact .ostatus { grid-area: status; font-weight: 700; color: var(--teal); font-size: .92rem; }
.orow.compact:hover { border-color: var(--teal); }

/* The tracker: dots joined by a line. Done = filled teal, current = pulsing, to come = empty. */
.tracker { display: flex; align-items: flex-start; margin: 0; padding: 0; list-style: none; } /* top-aligned: a two-line label mustn't shift its dot */
.tracker .tstep { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; }
.tracker .tstep::before { content: ''; position: absolute; top: 9px; right: 50%; width: 100%; height: 4px; background: var(--line); }
.tracker .tstep:first-child::before { display: none; }
.tracker .tstep.done::before, .tracker .tstep.current::before { background: var(--teal); }
.tracker .tdot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); background: var(--paper); }
.tracker .done .tdot { background: var(--teal); border-color: var(--teal); }
.tracker .current .tdot { background: var(--paper); border-color: var(--teal); box-shadow: 0 0 0 0 rgba(2, 128, 144, .5); animation: trackpulse 1.6s ease-out infinite; }
.tracker .current .tdot::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--teal); }
@keyframes trackpulse { 0% { box-shadow: 0 0 0 0 rgba(2, 128, 144, .5); } 70% { box-shadow: 0 0 0 10px rgba(2, 128, 144, 0); } 100% { box-shadow: 0 0 0 0 rgba(2, 128, 144, 0); } }
@media (prefers-reduced-motion: reduce) { .tracker .current .tdot { animation: none; } }
.tracker.big { margin: 6px 0 14px; }
.tracker.big .tlabel { margin-top: 6px; font-size: .78rem; font-weight: 700; text-align: center; color: var(--ink); }
.tracker.big .todo .tlabel { color: var(--slate); font-weight: 600; }
.tracker.big .ttime { font-size: .7rem; color: var(--slate); text-align: center; }

/* The order page (P12) */
.orderdetail .bigref { margin: 4px 0 8px; font-size: 2rem; font-weight: 800; }
.where.big { margin: 0 0 12px; font-size: 1.05rem; font-weight: 700; color: var(--teal); }
.handover { margin: 0 0 14px; padding: 12px 14px; border-left: 4px solid var(--teal); border-radius: 10px; background: var(--cream); }
.handover.box { border-left-color: var(--mint); font-size: 1.1rem; }
.handover .note { margin: 4px 0 0; }
/* My orders rows carry the full tracker (Harry): no need to tap in */
.orow.compact .tracker.big { margin: 4px 0 2px; }
/* Keep the tracker inside its card on a narrow phone: steps may shrink, labels a touch smaller in the list */
.tracker .tstep { min-width: 0; }
.orow.compact { grid-template-columns: minmax(0, 1fr) auto; }
.orow.compact .tracker.big .tlabel { font-size: .7rem; }
.orow.compact .tracker.big .ttime { font-size: .64rem; }


/* The public queue as a top-to-bottom delivery line (Harry): steps down the left, the orders at each
   step to the right. Same teal as the tracker; a step with orders in it has a filled dot. */
.vline { margin: 8px 0 4px; padding: 0; list-style: none; }
.vstep { position: relative; display: grid; grid-template-columns: 26px minmax(96px, 34%) 1fr; gap: 4px 10px;
  align-items: start; padding: 0 0 18px; }
.vstep::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: -2px; width: 4px; background: var(--line); }
.vstep:last-child::before { display: none; }
.vstep.busy::before { background: var(--teal); }
.vdot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); background: var(--paper); position: relative; z-index: 1; }
.vstep.busy .vdot { background: var(--teal); border-color: var(--teal); }
.vlabel strong { display: block; font-size: .95rem; line-height: 1.25; }
.vlabel .note { display: block; font-size: .72rem; }
.vnone { margin: 2px 0 0; color: var(--slate); font-size: .85rem; }
.ventries { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ventries li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 4px 8px; border-radius: 8px; background: var(--cream); font-size: .88rem; }
.ventries li.mine { background: rgba(2, 128, 144, .1); outline: 2px solid var(--teal); }
.ventries .qpos { font-weight: 800; color: var(--teal); }
.ventries .qref { font-weight: 700; }
.ventries .qname { color: var(--ink); }
.ventries .qyou { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--teal); color: #fff; font-size: .7rem; font-weight: 700; }

/* Frame check, folded (Harry): one line and the tick box; Dad's explanation opens on request */
.framecheck .check { margin: 0; }
.framecheck details { margin: 4px 0 0; }
.framecheck summary { cursor: pointer; color: var(--teal); font-weight: 600; font-size: .85rem; min-height: 32px; display: flex; align-items: center; }
.framecheck details p { margin: 6px 0 0; font-size: .88rem; }
/* 1st / 2nd / 3rd on work-board queue cards (Harry): the stringing order at a glance */
.jobpos { padding: 1px 8px; border-radius: 999px; background: var(--teal); color: #fff; font-size: .75rem; font-weight: 800; }
.col-express .jobpos { background: var(--danger); }

/* Nudge to add a racket photo (Harry, Phase 8): the empty photo square is the button */
.rthumb.addphoto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px dashed var(--teal); background: rgba(2, 128, 144, .06); color: var(--teal); font-size: .72rem; font-weight: 700; cursor: pointer; }
.rthumb.addphoto .addicon { font-size: 1.3rem; line-height: 1; }
.rthumb.addphoto:hover { background: rgba(2, 128, 144, .12); }
.photowhy { margin: 2px 0 0; font-size: .85rem; color: var(--slate); }
.phototip { margin: 8px 0 0; }
