/* TipPool: the restaurant back office at closing time.
   White paper, black ink, a manager's yellow highlighter, receipts on a steel tray,
   navigation clipped to a kitchen ticket rail. */
[hidden] { display: none !important; }
:root {
  --paper: #ffffff;
  --ink: #141414;
  --graphite: #5c5c58;
  --hair: #dcdcd6;
  --hair-soft: #ececE7;
  --tray: #e7e8e4;
  --tray-deep: #d8d9d4;
  --steel-1: #f2f3f1;
  --steel-2: #b9bcb6;
  --marker: #ffe14d;
  --marker-soft: #fff6c7;
  --go: #12703d;
  --go-soft: #e3f3e8;
  --wait: #9a5b00;
  --wait-soft: #fff1d6;
  --void: #c4291f;
  --void-soft: #fde6e3;
  --thermal: #fffefc;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --focus: 0 0 0 3px var(--marker), 0 0 0 4.5px var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--body); font-stretch: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-stretch: 72%; font-weight: 800; line-height: 1.02; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.3rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .75em; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--marker); text-decoration-thickness: 4px; }
.muted { color: var(--graphite); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.hl { background: linear-gradient(100deg, transparent 2%, var(--marker) 3% 97%, transparent 98%) 0 85% / 100% 42% no-repeat; padding: 0 .08em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- header + ticket rail ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px 10px; max-width: 1200px; margin: 0 auto; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font: 800 1.6rem/1 var(--display); font-stretch: 72%; }
.brand span { color: var(--graphite); font-size: .9rem; }
.who-am-i { display: flex; align-items: center; gap: 14px; font-size: .875rem; color: var(--graphite); }
.who-am-i button { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.rail { position: relative; padding: 0 28px; }
.rail::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px;
  background: linear-gradient(var(--steel-1), var(--steel-2) 55%, #8f938c); border-bottom: 1px solid #7d817a; }
.rail nav { max-width: 1144px; margin: 0 auto; position: relative; display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.rail nav::-webkit-scrollbar { display: none; }
.ticket { position: relative; flex: none; display: flex; align-items: center; gap: 8px; background: var(--thermal); color: var(--ink);
  text-decoration: none; font: 600 .95rem var(--body); padding: 14px 14px 12px; border: 1px solid var(--hair);
  border-top: 0; box-shadow: 0 3px 6px -3px rgba(0,0,0,.25); transform-origin: top center; transition: transform .15s; }
.ticket::before { content: ""; position: absolute; top: -2px; left: 50%; width: 22px; height: 7px; margin-left: -11px;
  background: #9a9e97; border-radius: 0 0 3px 3px; }
.ticket svg { width: 17px; height: 17px; flex: none; }
.ticket:nth-child(2n) { transform: rotate(.6deg); }
.ticket:nth-child(3n) { transform: rotate(-.5deg); }
.ticket:hover { transform: translateY(2px); text-decoration: none; }
.ticket[aria-current="page"] { background: var(--marker); border-color: #e2c636; transform: translateY(5px) rotate(-.4deg); }
@media (max-width: 760px) {
  .topbar { padding: 12px 16px 8px; }
  .brand span, .who-am-i span { display: none; }
  .rail { padding: 0 10px; }
  .ticket { padding: 12px 11px 10px; }
  .ticket .label { display: none; }
  .ticket[aria-current="page"] .label { display: inline; }
}

.main { padding: 28px 28px 90px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 760px) { .main { padding: 20px 16px 90px; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head p { margin: 8px 0 0; color: var(--graphite); max-width: 62ch; }
.back { display: inline-block; color: var(--graphite); font-size: .9rem; margin-bottom: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- sheets (paper on the desk) ---------- */
.panel { background: var(--paper); border: 1px solid var(--hair); border-radius: 3px; }
.panel-body { padding: 20px 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--ink); }
.panel-head h2 { font-size: 1.35rem; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.split-2.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.split-2.wide-left { grid-template-columns: minmax(0, 1.9fr) minmax(250px, 1fr); }
@media (max-width: 960px) { .split-2, .split-2.reverse, .split-2.wide-left { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 18px; }

/* the steel tray receipts sit on */
.tray { background: var(--tray); border-radius: 6px; padding: 26px 22px 30px; box-shadow: inset 0 1px 3px rgba(0,0,0,.12);
  display: flex; justify-content: center; }
.tray.tight { padding: 18px 14px 22px; }

/* ---------- buttons (POS keys) ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 4px;
  padding: 11px 18px; font: 700 .95rem var(--body); cursor: pointer; text-decoration: none; border: 1.5px solid var(--ink);
  transition: background .12s, color .12s, transform .06s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--marker); color: var(--ink); text-decoration: none; }
.btn-secondary { background: var(--paper); color: var(--ink); }
.btn-secondary:hover { background: var(--marker-soft); text-decoration: none; }
.btn-quiet { border-color: transparent; background: none; color: var(--graphite); padding: 11px 6px; text-decoration: underline; }
.btn-quiet:hover { color: var(--ink); }
.btn-block { width: 100%; padding: 14px 18px; font-size: 1.02rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- forms ---------- */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.hint { color: var(--graphite); font-size: .85rem; margin-top: 6px; }
input[type=text], input[type=tel], input[type=search], input[type=date], input[type=email], input[type=number], input[type=password], input[type=time], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--hair); border-radius: 4px; font: inherit; background: var(--paper); color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: #b5b5ae; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--marker); }
textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
input[type=file]::file-selector-button { font: 700 .9rem var(--body); padding: 8px 14px; margin-right: 10px; border-radius: 4px;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--hair); border-radius: 4px; cursor: pointer; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--marker-soft); }
.choice input { margin-top: 4px; accent-color: var(--ink); }
.choice strong { display: block; }

/* ---------- rubber stamps (status) ---------- */
.stamp { display: inline-block; border: 2px solid currentColor; border-radius: 3px; padding: 0 6px; font: 700 .72rem/1.5 var(--mono);
  letter-spacing: .04em; transform: rotate(-3deg); white-space: nowrap; vertical-align: 1px; }
.stamp.ok { color: var(--go); } .stamp.wait { color: var(--wait); } .stamp.bad { color: var(--void); } .stamp.live { color: var(--ink); }
.pill { font: 700 .72rem/1.5 var(--mono); border: 2px solid currentColor; border-radius: 3px; padding: 0 6px; transform: rotate(-3deg); display: inline-block; white-space: nowrap; }
.pill.ok { color: var(--go); } .pill.wait { color: var(--wait); } .pill.bad { color: var(--void); } .pill.live { color: var(--ink); }

/* ---------- notes ---------- */
.flash { padding: 13px 16px; border-radius: 3px; margin-bottom: 18px; font-weight: 500; border-left: 5px solid var(--ink); background: var(--steel-1); }
.flash.success { border-color: var(--go); background: var(--go-soft); }
.flash.error { border-color: var(--void); background: var(--void-soft); }
.flash.warning { border-color: #e2b400; background: var(--marker-soft); }
.flash.info { border-color: var(--ink); background: var(--marker-soft); }
.note-warn { background: var(--marker-soft); border-left: 5px solid #e2b400; border-radius: 3px; padding: 12px 16px; }
.note-warn ul, .flash ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- rows & tables ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-top: 1px solid var(--hair-soft); }
.rows > li:first-child { border-top: 0; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: .82rem; font-weight: 700; color: var(--graphite); padding: 10px 22px; border-bottom: 1px solid var(--hair); }
table.data td { padding: 13px 22px; border-top: 1px solid var(--hair-soft); vertical-align: middle; }
table.data tr:first-child td { border-top: 0; }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: #fff;
  font: 700 .85rem var(--body); }

/* ---------- close-out steps ---------- */
.stepper { display: flex; gap: 0; margin-bottom: 28px; border-bottom: 1.5px solid var(--ink); }
.stepper a, .stepper span.step { display: flex; align-items: center; gap: 10px; padding: 0 22px 12px 0; margin-right: 22px; color: var(--graphite);
  text-decoration: none; font-weight: 700; position: relative; }
.stepper b { font: 800 1.5rem/1 var(--display); font-stretch: 72%; }
.stepper .done { color: var(--go); }
.stepper .now { color: var(--ink); }
.stepper .now::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 6px; background: var(--marker); }
@media (max-width: 600px) { .stepper .label { display: none; } .stepper .now .label { display: inline; } }

/* ---------- roster ---------- */
.roster > li { display: grid; grid-template-columns: auto minmax(110px, 1fr) 132px 80px; gap: 12px; align-items: center; }
.roster .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.roster .who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster .fields { display: contents; }
.roster input[type=number] { text-align: right; font-family: var(--mono); }
.roster li.off .who { color: var(--graphite); }
.roster li.off .avatar { background: var(--hair); color: var(--graphite); }
.roster li.off select, .roster li.off input[type=number] { opacity: .3; pointer-events: none; }
@media (max-width: 520px) {
  .roster > li { grid-template-columns: auto minmax(0, 1fr) 76px; }
  .roster select { grid-column: 2 / 3; grid-row: 2; }
  .roster input[type=number] { grid-column: 3; grid-row: 2; }
}
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--hair); border-radius: 999px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--marker); }
.switch input:focus-visible + span { box-shadow: var(--focus); }
.sticky-bar { position: sticky; bottom: 0; background: var(--paper); border-top: 1.5px solid var(--ink); padding: 14px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- THE RECEIPT ---------- */
.receipt { background: var(--thermal); color: #1d1f21; font-family: var(--mono); font-size: .9rem; line-height: 1.5;
  padding: 26px 24px 36px; max-width: 440px; width: 100%;
  --tooth: 9px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x; }
.receipt-wrap { filter: drop-shadow(0 8px 14px rgba(20,20,20,.18)); display: flex; justify-content: center; width: 100%; }
.receipt h2, .receipt h3 { font-family: var(--mono); font-stretch: 100%; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.receipt .head { text-align: center; margin-bottom: 14px; }
.receipt .head h2 { font-size: 1.05rem; }
.receipt .head p { margin: 2px 0 0; color: #6a6d70; font-size: .8rem; }
.receipt hr { border: 0; border-top: 1.5px dashed #b8bbbd; margin: 12px 0; }
.receipt .line { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.receipt .line .what { min-width: 0; }
.receipt .line .what small { display: block; color: #6a6d70; font-size: .78rem; }
.receipt .line .amt { white-space: nowrap; font-weight: 600; }
.receipt .total { font-size: 1.15rem; font-weight: 700; }
.receipt .total .amt-hl { background: linear-gradient(100deg, transparent 2%, var(--marker) 3% 97%, transparent 98%) 0 85% / 100% 50% no-repeat; padding: 0 3px; }
.receipt .foot { text-align: center; color: #6a6d70; font-size: .78rem; margin-top: 14px; }
.receipt .lines > .line + .line { margin-top: 6px; }
.receipt .lines.roomy > .line + .line { margin-top: 12px; }
.receipt a:not(.btn) { color: inherit; }
.receipt .btn { font-family: var(--body); }
.big-stamp { display: inline-block; border: 3px solid var(--go); color: var(--go); padding: 2px 14px; font: 700 1.4rem var(--mono);
  transform: rotate(-7deg); border-radius: 4px; margin: 4px 0 12px; animation: thunk .3s cubic-bezier(.2,1.6,.4,1); }
@keyframes thunk { from { transform: rotate(-7deg) scale(1.8); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: 1; } }

/* ---------- explanations ---------- */
details.why + details.why { border-top: 1px solid var(--hair-soft); }
details.why summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 22px; font-weight: 700; }
details.why summary::-webkit-details-marker { display: none; }
details.why summary .amt { margin-left: auto; font: 600 .95rem var(--mono); }
details.why summary::after { content: "+"; color: var(--graphite); font-weight: 400; font-size: 1.25rem; width: 1ch; text-align: center; }
details.why[open] summary::after { content: "−"; }
details.why[open] summary { background: var(--marker-soft); }
details.why p { padding: 10px 22px 16px 68px; margin: 0; color: #2f2f2c; }

/* ---------- tonight ---------- */
.counter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 36px; padding: 6px 0 8px; }
.counter .big { font: 800 clamp(3.6rem, 9vw, 6.2rem)/.9 var(--display); font-stretch: 68%; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.counter .cap { color: var(--graphite); }
.counter .side { display: flex; gap: 30px; padding-bottom: 6px; }
.counter .side b { display: block; font: 700 1.6rem/1.1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.rule-card { border-left: 5px solid var(--ink); padding: 4px 0 4px 16px; }
.checklist { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 22px; border-top: 1px solid var(--hair-soft); }
.checklist li:first-child { border-top: 0; }
.checklist .tick { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 3px; flex: none; display: grid; place-items: center; margin-top: 1px; font-size: .8rem; font-weight: 800; }
.checklist .is-done .tick { background: var(--marker); }
.checklist .is-done .t { color: var(--graphite); text-decoration: line-through; }

/* ---------- settings: week schedule ---------- */
.week li { display: grid; grid-template-columns: auto 120px minmax(0, 150px) 1fr; gap: 14px; align-items: center; }
.week .day { font-weight: 700; }
.week .after { color: var(--graphite); font-size: .85rem; }
.week li.off .day, .week li.off input[type=time] { opacity: .4; }
@media (max-width: 560px) { .week li { grid-template-columns: auto 1fr 120px; } .week .after { grid-column: 2 / -1; } }

/* ---------- guest pages ---------- */
.guest { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 26px 16px 40px; background: var(--tray); }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 10px; }
.amount { font: 700 1.05rem var(--mono); padding: 12px 0; border: 1.5px solid #c4c7c9; background: transparent; color: #1d1f21; border-radius: 4px; cursor: pointer; }
.amount:hover { border-color: #1d1f21; }
.amount[aria-pressed="true"] { border-color: #1d1f21; background: #1d1f21; color: var(--thermal); }
.receipt input[type=number] { font-family: var(--mono); background: #fff; color: #1d1f21; border-color: #c4c7c9; }
.receipt label { font-family: var(--mono); font-weight: 700; font-size: .8rem; }
.pay-buttons { display: grid; gap: 10px; margin-top: 16px; }
paypal-button, venmo-button { width: 100%; --paypal-button-border-radius: 4px; }
.status-line { min-height: 1.5em; font-size: .85rem; color: #5f6366; margin-top: 10px; text-align: center; }
.guest-note { color: var(--graphite); font-size: .85rem; margin-top: 22px; text-align: center; max-width: 440px; }
.manager-strip { width: 100%; max-width: 440px; background: var(--marker); color: var(--ink); border-radius: 3px; padding: 9px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .875rem; margin-bottom: 16px; font-weight: 500; }
.manager-strip a { font-weight: 700; }
.receipt .btn-secondary { background: transparent; color: #1d1f21; border-color: #1d1f21; }

/* ---------- qr: setup + printable table cards ---------- */
.qr-setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: stretch; margin-bottom: 34px; }
.qr-setup > .panel { display: flex; flex-direction: column; }
.qr-setup > .panel > .panel-body { flex: 1; }
.qr-setup .panel-head { min-height: 58px; align-items: center; }
.setup-body { display: flex; flex-direction: column; gap: 18px; }
.setup-action { margin-top: auto; padding-top: 4px; }
@media (max-width: 900px) { .qr-setup { grid-template-columns: 1fr; } }
.house-row { display: flex; gap: 22px; align-items: center; }
.house-qr { width: 168px; height: 168px; flex: none; border: 1px solid var(--hair); border-radius: 4px; padding: 6px; background: #fff; }
.table-count-row { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.counter-input { display: flex; gap: 8px; align-items: stretch; width: 210px; }
.counter-input input { text-align: center; font: 700 1.2rem var(--mono); }
.counter-input .btn { padding: 8px 16px; font-size: 1.2rem; }
fieldset.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
fieldset.chips legend { font-weight: 700; font-size: .9rem; margin-bottom: 8px; padding: 0; }
.chip { position: relative; margin: 0; font-weight: 600; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 7px 14px; border: 1.5px solid var(--hair); border-radius: 999px; background: var(--paper); }
.chip input:checked + span { background: var(--marker); border-color: var(--ink); }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { box-shadow: var(--focus); }
.chip-input { width: auto !important; flex: 1 1 180px; border-radius: 999px !important; padding: 7px 14px !important; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1.5px solid var(--ink); }

/* a table card (tent card) as it would sit on a table */
.tent-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tent { background: #fff; border: 1.5px solid var(--ink); border-radius: 8px; padding: 18px 16px 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px; break-inside: avoid; }
.tent p { margin: 0; }
.tent-place { font-size: .8rem; color: var(--graphite); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tent-label { font: 800 2rem/1.05 var(--display); font-stretch: 70%; margin: 2px 0 8px !important; }
.tent img { width: 100%; max-width: 150px; aspect-ratio: 1; display: block; margin: 0 auto 8px; }
.tent-how { font-weight: 700; font-size: .92rem; }
.tent-note { font-size: .78rem; color: var(--graphite); }
.tent-large { max-width: 360px; margin: 0 auto; padding: 28px 24px; }
.tent-large .tent-label { font-size: 2.6rem; }
.tent-large img { max-width: 230px; }
.print-only { display: none; }
.tent-mini { width: 168px; flex: none; padding: 12px 10px 10px; }
.tent-mini .tent-label { font-size: 1.35rem; margin: 0 0 6px !important; }
.tent-mini img { max-width: 112px; margin-bottom: 4px; }
.tent-show { margin-top: 10px; font-size: .85rem; font-weight: 600; }

/* full-screen code for a phone or tablet */
.show-screen { min-height: 100vh; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px 16px; text-align: center; }
.show-screen .tent-place { font-size: 1rem; }
.show-screen .tent-label { font-size: clamp(2.6rem, 9vw, 4.4rem); }
.show-screen img { width: min(78vw, 58vh); height: auto; aspect-ratio: 1; }
.show-screen .tent-how { font-size: 1.15rem; }
.show-screen .close { position: fixed; top: 14px; right: 16px; font-size: .9rem; }
@media print {
  .topbar, .rail, .no-print { display: none !important; }
  .main { padding: 0; }
  .tray { background: none; box-shadow: none; padding: 0; }
  .receipt-wrap { filter: none; }
  .receipt { border: 1px dashed #999; break-inside: avoid; -webkit-mask: none; mask: none; }
  body[data-print="house"] .print-tables, body[data-print="tables"] .print-house { display: none !important; }
  body[data-print="house"] .print-people, body[data-print="tables"] .print-people,
  body[data-print="people"] .print-tables, body[data-print="people"] .print-house { display: none !important; }
  body[data-print="house"] .print-only { display: block; }
  .tent-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .tent { border-style: dashed; }
  .split-2 { display: block; }
}

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .left { background: var(--tray); padding: 40px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.login .left h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); max-width: 12ch; }
.login .left p { color: #3a3a37; max-width: 40ch; }
.login .right { display: grid; place-items: center; padding: 32px 16px; }
.login form { width: 100%; max-width: 360px; }
.login .receipt-wrap { justify-content: flex-start; }
.login .receipt { max-width: 300px; transform: rotate(-2deg); }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login .left { padding: 26px 18px; } .login .receipt-wrap { display: none; } }

/* Team: change someone's usual role in place */
.role-pick select { width: auto; min-width: 130px; padding: 6px 30px 6px 10px; font-size: .88rem; }
.role-preset { flex-wrap: nowrap; gap: 8px; }
.role-preset select { width: auto; padding: 6px 30px 6px 10px; font-size: .88rem; }
.role-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.role-grid > li { display: flex; align-items: flex-start; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--hair-soft); }
.role-grid > li:nth-child(-n+2) { border-top: 0; }
.role-grid > li:nth-child(odd) { border-right: 1px solid var(--hair-soft); }
.role-grid .role-text { flex: 1; min-width: 0; }
.role-grid .role-text .small { display: block; }
.role-grid .pill { margin-left: 4px; }
.role-x { border: 0; background: none; font-size: 1.25rem; line-height: 1; padding: 0 4px; color: var(--graphite); cursor: pointer; border-radius: 3px; }
.role-x:hover { color: var(--void); }
.role-x:focus-visible { box-shadow: var(--focus); outline: 0; }
@media (max-width: 640px) {
  .role-grid { grid-template-columns: 1fr; }
  .role-grid > li:nth-child(2) { border-top: 1px solid var(--hair-soft); }
  .role-grid > li:nth-child(odd) { border-right: 0; }
  .panel-head:has(.role-preset) { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 640px) {
  .team-rows > li { flex-wrap: wrap; padding: 13px 16px; }
  .team-rows > li > div { flex-basis: calc(100% - 52px) !important; }
  .team-rows .role-pick { margin-left: 46px; }
  .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .week-edit { margin-left: 0; }
  .team-rows .role-pick select { min-width: 0; max-width: 140px; }
  .team-rows > li { column-gap: 10px; row-gap: 8px; }
}
@media (max-width: 640px) {
  .panel-head:has(.role-preset) { height: auto; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
  .role-preset { flex: 1 1 100%; min-width: 0; }
  .role-preset .btn { flex: none; }
  .role-preset select { flex: 1; min-width: 0; }
}

/* Location switcher (only when there are several) */
.loc-switch { margin-right: auto; }
.loc-switch select { width: auto; min-width: 0; max-width: 46vw; padding: 6px 30px 6px 10px; font-weight: 700; font-size: .9rem; }

/* Where an hours number came from (close-out) */
.src { font: 600 .68rem/1.4 var(--mono); color: var(--graphite); border: 1px solid var(--hair); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
/* Usual week editor (Team) */
.team-rows > li { flex-wrap: wrap; align-content: flex-start; }
.team-rows > li:has(details[open]) > :not(details) { align-self: flex-start; }
.week-edit { flex-basis: 100%; margin: -4px 0 0 46px; }
.week-edit summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink); width: fit-content; }
.week-edit summary::marker { color: var(--graphite); }
.week-edit form { margin-top: 10px; display: grid; gap: 10px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 64px)); gap: 6px; }
.week-grid label { display: grid; gap: 3px; margin: 0; font-size: .72rem; font-weight: 700; color: var(--graphite); text-align: center; }
.week-grid input { padding: 6px 2px; text-align: center; font-family: var(--mono); font-size: .85rem; }

/* Clock in / out on the staff page */
.clock-card { width: 100%; max-width: 460px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--paper); border: 1.5px solid var(--hair); border-radius: 4px; padding: 16px 18px; margin-bottom: 22px; }
.clock-card.on { border-color: var(--go); background: var(--go-soft); }
.clock-card p { margin: 0; }
.clock-state { font-weight: 800; font-size: 1.05rem; }
.clock-card.on .clock-state { color: var(--go); }
.clock-time { font-size: .85rem; color: var(--graphite); }
.tip-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.tip-add input { font-family: var(--mono); }

/* Guest picks who the tip is for */
.who-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.who-btn { font: 700 .95rem var(--body); text-align: left; padding: 10px 12px; border: 1.5px solid #c4c7c9; background: transparent; color: #1d1f21; border-radius: 4px; cursor: pointer; }
.who-btn small { display: block; font: 500 .75rem var(--mono); color: #5c5f62; }
.who-btn:hover { border-color: #1d1f21; }
.who-btn[aria-pressed="true"] { border-color: #1d1f21; background: #1d1f21; color: var(--thermal); }
.who-btn[aria-pressed="true"] small { color: #c9cbcc; }
.who-btn:focus-visible { box-shadow: var(--focus); outline: 0; }

/* Staff flags a problem / messages the manager */
.flag { margin-top: 14px; font-family: var(--body); }
.flag summary { cursor: pointer; font-size: .85rem; font-weight: 700; width: fit-content; }
.flag form { display: grid; gap: 8px; margin-top: 10px; }
.flag textarea { min-height: 0; font-family: var(--body); }
.flag.general { width: 100%; max-width: 460px; background: var(--paper); border: 1.5px solid var(--hair); border-radius: 4px; padding: 14px 16px; }
.flag-note { font: .85rem/1.5 var(--body); background: var(--marker-soft); border-radius: 3px; padding: 8px 10px; }
.flag-note .small { display: block; color: var(--graphite); margin-top: 2px; }
.flag-note.general { width: 100%; max-width: 460px; margin-top: 10px; }

/* Messages */
.ticket .badge { font: 700 .7rem/1 var(--mono); background: var(--void); color: #fff; border-radius: 999px; padding: 3px 6px; margin-left: 2px; }
.msg-list > li { align-items: flex-start; }
.msg-text { margin: 6px 0 10px; white-space: pre-line; }
.changes td { vertical-align: top; }
.changes .when { white-space: nowrap; font-family: var(--mono); font-size: .8rem; color: var(--graphite); width: 1%; }
.changes .who { white-space: nowrap; font-weight: 700; width: 1%; }

/* Reports */
.report-filter .panel-body { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.report-filter .panel-body > div { min-width: 160px; }
.report-filter label { margin-bottom: 4px; }
.custom-dates { display: flex; gap: 14px; }
.custom-dates[hidden] { display: none; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.kpis > div { background: var(--paper); border: 1px solid var(--hair); border-radius: 4px; padding: 14px 16px; display: grid; gap: 2px; }
.kpis b { font: 800 1.6rem/1.1 var(--display); font-stretch: 80%; }
.kpis span { font-size: .82rem; color: var(--graphite); }
.kpis .minor { background: transparent; border-style: dashed; }
.kpis .minor b { font-size: 1.15rem; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the tab rail is 1144px wide at most: tabs stay compact at every width so they all fit */
@media (min-width: 761px) {
  .rail nav { gap: 6px; }
  .ticket { padding: 13px 11px 11px; font-size: .9rem; gap: 6px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .ticket svg { display: none; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .ticket svg { display: block; }
  .ticket .label { display: none; }
  .ticket[aria-current="page"] .label { display: inline; }
}
.amount.pct { display: grid; gap: 1px; padding: 9px 0; }
.amount.pct small { font: 500 .72rem var(--mono); opacity: .75; }
.tip-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tip-values input { text-align: center; font-family: var(--mono); }

/* Ask about your tips */
.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1; min-width: 0; }
.answer { background: var(--marker-soft); border-left: 4px solid var(--marker); border-radius: 3px; padding: 12px 14px; }
.answer p { margin: 0 0 4px; font-size: 1.05rem; }
.chip-link { display: inline-block; padding: 6px 12px; border: 1.5px solid var(--hair); border-radius: 999px; font-size: .85rem; color: var(--ink); text-decoration: none; }
.chip-link:hover { border-color: var(--ink); }
.copy-link { width: 100%; margin-top: 4px; font: .78rem var(--mono); padding: 6px 8px; }

/* Sign in / sign up */
.auth-switch { margin: 0; text-align: center; font-size: .92rem; }
.login .signup { max-width: 400px; }
hr.soft { border: 0; border-top: 1px solid var(--hair); margin: 4px 0; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login .left { padding: 24px 20px; }
  .login .left .receipt-wrap, .login .left p { display: none; }
  .login .left h1 { font-size: 2rem; }
}

/* Team: each person's private link, copy + make a new one */
.link-tools { display: flex; align-items: center; gap: 4px; order: 2; flex-basis: 100%; margin: -2px 0 0 46px; }
.link-tools .label { font-size: .78rem; font-weight: 700; color: var(--graphite); margin-right: 4px; white-space: nowrap; }
.link-tools .copy-link { flex: 1; max-width: 420px; min-width: 0; margin: 0; padding: 6px 8px; font: .74rem var(--mono); color: var(--graphite); }
.team-rows .week-edit { order: 3; }
.link-tools form { margin: 0; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--hair); border-radius: 4px;
  background: var(--paper); color: var(--ink); cursor: pointer; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:focus-visible { box-shadow: var(--focus); outline: 0; }
.icon-btn.done { background: var(--go-soft); border-color: var(--go); color: var(--go); }
@media (max-width: 640px) {
  .link-tools .label { display: none; }
}
.clock-card.attention { border-color: var(--wait); background: var(--wait-soft); }
.alert-panel { border-color: var(--wait); }
.alert-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--void); flex: none; margin-top: 6px; }
.conf { font: 600 .7rem var(--mono); margin-left: 6px; white-space: nowrap; }
.conf.ok { color: var(--go); } .conf.wait { color: var(--wait); }

/* All locations */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.loc-card.has-work { border-color: var(--wait); }
.loc-now b { font: 800 1.8rem/1.1 var(--display); font-stretch: 80%; display: block; }
.loc-todo { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 4px; }
.kpis .needs { border-color: var(--wait); background: var(--wait-soft); }

/* Staff page: totals + add to home screen */
.my-totals { width: 100%; max-width: 460px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.my-totals > div { background: var(--paper); border: 1px solid var(--hair); border-radius: 4px; padding: 10px 12px; display: grid; }
.my-totals b { font: 800 1.25rem/1.15 var(--display); font-stretch: 85%; }
.my-totals span { font-size: .75rem; color: var(--graphite); }
.install-hint { width: 100%; max-width: 460px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem; margin-bottom: 14px; }
.install-hint[hidden] { display: none; }

/* Close-out check */
.check-panel.stop { border-color: var(--void); }
.check-panel.warn { border-color: var(--wait); }
.check-panel.ok { border-color: var(--go); }
.check-summary { margin: 0; font-weight: 700; font-size: 1.02rem; }
.check-list, .check-fixes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .9rem; }
.check-fixes { list-style: disc; padding-left: 18px; margin-top: 4px; }
.check-list .tag { font: 700 .68rem/1.5 var(--mono); text-transform: uppercase; border-radius: 3px; padding: 0 5px; margin-right: 6px; }
.check-list .stop .tag { background: var(--void-soft); color: var(--void); }
.check-list .warn .tag { background: var(--wait-soft); color: var(--wait); }

/* =====================================================================
   v2 polish: settings as numbered receipt lines, one rhythm everywhere
   ===================================================================== */

/* every page: a receipt-style header line above the title (location + date) */
.eyebrow { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 10px;
  font: 600 .74rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 0 rgba(18,112,61,.45);
  animation: live 2.4s ease-out infinite; }
.eyebrow .sep { color: var(--hair); }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(18,112,61,.45); } 70% { box-shadow: 0 0 0 7px rgba(18,112,61,0); } 100% { box-shadow: 0 0 0 0 rgba(18,112,61,0); } }

/* panel heads: one height, centered, everywhere */
.panel-head { align-items: center; min-height: 62px; padding-top: 14px; padding-bottom: 12px; }

/* page load: sections slide up one after another, like tickets printing */
@keyframes print-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.main > .panel, .main > section, .main .split-2 > *, .main .stack > .panel, .settings-main > *, .kpis > div, .loc-grid > * {
  animation: print-in .42s cubic-bezier(.2,.7,.2,1) both; }
.main .split-2 > *:nth-child(2), .settings-main > *:nth-child(2), .kpis > div:nth-child(2) { animation-delay: .05s; }
.main .split-2 > *:nth-child(3), .settings-main > *:nth-child(3), .kpis > div:nth-child(3) { animation-delay: .1s; }
.settings-main > *:nth-child(n+4), .kpis > div:nth-child(n+4) { animation-delay: .15s; }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: 18px; display: grid; gap: 2px; }
.settings-nav-title { margin: 14px 0 6px; font: 700 .7rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.settings-nav-title:first-child { margin-top: 0; }
.settings-nav a { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 3px; text-decoration: none;
  font-weight: 600; font-size: .92rem; border-left: 3px solid transparent; }
.settings-nav a span { font: 600 .72rem var(--mono); color: var(--graphite); }
.settings-nav a:hover { background: var(--steel-1); }
.settings-nav a.here { border-left-color: var(--ink); background: var(--marker-soft); }
.settings-main { display: grid; gap: 18px; min-width: 0; }
.setting { display: grid; grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); scroll-margin-top: 18px; }
.setting > .setting-intro { padding: 22px; border-right: 1px dashed var(--hair); background: linear-gradient(var(--thermal), var(--thermal)); }
.setting-intro h2 { font-size: 1.3rem; margin: 2px 0 8px; }
.setting-intro p { color: var(--graphite); font-size: .9rem; margin: 0 0 8px; }
.setting-no { font: 700 .74rem var(--mono); color: var(--graphite); letter-spacing: .06em; }
.setting-no::before { content: "No. "; }
.setting > .setting-body { padding: 22px; min-width: 0; border: 0; margin: 0; }
.setting-foot { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap;
  padding: 14px 22px; border-top: 1px solid var(--hair-soft); background: var(--steel-1); }
.setting-foot > .small { margin-right: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; align-items: start; }
.form-grid .choice { margin-top: 26px; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-grid .choice { height: 100%; }
.switch-line { display: flex; gap: 12px; align-items: center; margin: 0; cursor: pointer; }
.switch-line strong { display: block; }
.with-unit { display: flex; align-items: center; gap: 8px; }
.with-unit input { max-width: 140px; }
.with-unit span { font-weight: 700; }
.connect-box { display: grid; gap: 14px; padding: 16px; border: 1.5px dashed var(--hair); border-radius: 4px; background: var(--steel-1); }
.connect-box code { font: .78rem var(--mono); word-break: break-all; }
.rows.boxed { border: 1px solid var(--hair-soft); border-radius: 4px; }
.rows.boxed > li { padding: 12px 16px; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1 1 200px; }
.inline-form label { margin-bottom: 6px; }
.setting.wide .table-wrap { margin: -6px -22px -22px; }

/* closing time: seven compact day cards instead of a long list */
.week-grid-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-grid-days li { display: grid; gap: 8px; justify-items: center; padding: 12px 6px 10px; border: 1px solid var(--hair); border-radius: 4px;
  background: var(--paper); transition: opacity .15s, background .15s; }
.week-grid-days li.off { background: var(--steel-1); }
.week-grid-days li.off input[type=time] { opacity: .35; }
.week-grid-days .day-toggle { display: grid; justify-items: center; gap: 6px; margin: 0; cursor: pointer; }
.week-grid-days .day { font: 700 .78rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.week-grid-days input[type=time] { width: 100%; padding: 6px 2px; font: .8rem var(--mono); text-align: center; }
.week-grid-days .after { font: .64rem var(--mono); color: var(--wait); min-height: 1em; text-align: center; }

/* the save bar stays in reach while scrolling the long form */
.save-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px 12px 18px; background: var(--ink); color: var(--paper); border-radius: 4px; box-shadow: 0 10px 24px -14px rgba(0,0,0,.55); }
.save-bar .btn-primary { background: var(--marker); color: var(--ink); border-color: var(--marker); }

@media (max-width: 1080px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .settings-nav-title { display: none; }
  .settings-nav a { flex: none; border: 1px solid var(--hair); border-left-width: 1px; }
}
@media (max-width: 820px) {
  .setting { grid-template-columns: minmax(0, 1fr); }
  .setting > .setting-intro { border-right: 0; border-bottom: 1px dashed var(--hair); padding-bottom: 14px; }
  .form-grid, .choice-grid.two, .choice-grid.three { grid-template-columns: minmax(0, 1fr); }
  .form-grid .choice { margin-top: 0; }
  .week-grid-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.week-grid-days input[type=time] { min-width: 0; font-size: .74rem; padding: 6px 0; }
.week-grid-days input[type=time]::-webkit-calendar-picker-indicator { display: none; }
.week-grid-days li { min-width: 0; overflow: hidden; }

/* dashboard: last shifts, one series, ink bars on a shared baseline */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; height: 150px; align-items: end;
  border-bottom: 1px solid var(--hair); padding-top: 18px; }
.bar-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  outline: none; cursor: default; }
.bar { width: min(70%, 34px); height: calc((100% - 20px) * var(--h) / 100); background: var(--ink); border-radius: 4px 4px 0 0;
  min-height: 2px; transition: background .15s; }
.bar-col:hover .bar, .bar-col:focus-visible .bar { background: var(--graphite); }
.bar-col:last-child .bar { box-shadow: inset 0 3px 0 var(--marker); }
.bar-val { font: 600 .72rem/1 var(--mono); color: var(--ink); white-space: nowrap; margin-bottom: 5px; min-height: .72rem; }
.bar-day { position: absolute; bottom: -22px; font: .7rem var(--mono); color: var(--graphite); }
.bar-col[data-tip]:hover::after, .bar-col[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px);
  background: var(--ink); color: var(--paper); font: 600 .72rem var(--mono); padding: 4px 8px; border-radius: 3px; white-space: nowrap; z-index: 2; }
.bars + * { margin-top: 26px; }
.panel-body:has(> .bars) { padding-bottom: 34px; }
.todo .todo-tag { flex: none; font: 700 .66rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px;
  border-radius: 3px; background: var(--marker-soft); color: var(--ink); min-width: 78px; text-align: center; }
.todo .todo-tag.stop { background: var(--void-soft); color: var(--void); }
.split-2 > .tray { position: sticky; top: 18px; }
.switch-line .small { display: block; font-weight: 400; }
.conf { display: inline-block; vertical-align: 2px; padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; margin-left: 6px; }
.brand { align-items: center; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; flex: none; }

/* reports: compact filter in the header, one strip for how tips came in */
.page-head .report-filter { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.page-head .report-filter > div { min-width: 0; }
.page-head .report-filter label { font-size: .78rem; margin-bottom: 4px; }
.page-head .report-filter select, .page-head .report-filter input { padding: 8px 32px 8px 10px; font-size: .9rem; }
.page-head .report-filter input[type=date] { padding-right: 8px; }
.source-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; margin: -8px 0 22px; }
.source-bar { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; background: var(--steel-1); }
.source-bar .seg { min-width: 4px; }
/* fixed categorical order (validated): PayPal/Venmo, card machine, cash */
.seg-1, .sw-1 { background: #2a78d6; }
.seg-2, .sw-2 { background: #eb6834; }
.seg-3, .sw-3 { background: #1baf7a; }
.source-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--graphite); }
.source-legend b { color: var(--ink); font-family: var(--mono); font-weight: 600; margin-left: 2px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 760px) { .source-strip { grid-template-columns: minmax(0, 1fr); } }
/* empty states */
.empty-state { gap: 14px !important; padding: 22px !important; }
.empty-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--go-soft);
  color: var(--go); font-weight: 800; }
.place-list { list-style: none; margin: 0; padding: 0; counter-reset: place; }
.place-list li { counter-increment: place; display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; padding: 13px 22px;
  border-top: 1px solid var(--hair-soft); }
.place-list li:first-child { border-top: 0; }
.place-list li::before { content: counter(place, decimal-leading-zero); grid-row: span 2; font: 700 .78rem var(--mono); color: var(--graphite); padding-top: 2px; }
.place-list span { font-size: .88rem; color: var(--graphite); }

/* =====================================================================
   v3 form controls: our own dropdowns, checkboxes, radios and fields
   ===================================================================== */
input[type=text], input[type=tel], input[type=search], input[type=date], input[type=email], input[type=number],
input[type=password], input[type=time], select {
  min-height: 44px; padding: 10px 14px; border-radius: 6px; border: 1.5px solid var(--hair); background-color: var(--paper);
  font-size: .97rem; line-height: 1.3; transition: border-color .15s, box-shadow .15s, background-color .15s; }
::placeholder { color: #9b9b94; opacity: 1; }

/* dropdowns: custom chevron, no browser chrome */
select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 42px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; }
select:hover { background-color: var(--steel-1); }
select:disabled { cursor: not-allowed; opacity: .6; background-color: var(--steel-1); }
select option { font: inherit; color: var(--ink); background: var(--paper); }
.role-pick select, .role-preset select, .loc-switch select, .page-head .report-filter select {
  min-height: 38px; padding: 7px 36px 7px 12px; background-position: right 11px center; background-size: 12px; font-size: .9rem; }

/* number fields: no spinner arrows */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* time and date: a quieter picker icon */
input[type=time], input[type=date] { font-family: var(--mono); font-size: .92rem; letter-spacing: .01em; }
input[type=time]::-webkit-calendar-picker-indicator, input[type=date]::-webkit-calendar-picker-indicator {
  opacity: .45; cursor: pointer; margin-left: 6px; }
input[type=time]:hover::-webkit-calendar-picker-indicator, input[type=date]:hover::-webkit-calendar-picker-indicator { opacity: .9; }
input[type=time]::-webkit-datetime-edit-fields-wrapper { padding: 0; }

/* checkboxes and radios: ink + marker, not browser blue */
input[type=checkbox]:not(.switch input), input[type=radio] {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1.5px solid #9b9b94;
  background: var(--paper); display: inline-grid; place-content: center; cursor: pointer; transition: border-color .15s, background .15s; }
input[type=checkbox]:not(.switch input) { border-radius: 5px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:not(.switch input)::before { content: ""; width: 11px; height: 11px; transform: scale(0); transition: transform .12s;
  background: var(--marker); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
input[type=radio]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; transform: scale(0); transition: transform .12s;
  background: var(--marker); box-shadow: 0 0 0 1px var(--ink); }
input[type=checkbox]:not(.switch input):checked, input[type=radio]:checked { border-color: var(--ink); background: var(--ink); }
input[type=checkbox]:not(.switch input):checked::before, input[type=radio]:checked::before { transform: scale(1); }
input[type=checkbox]:not(.switch input):hover, input[type=radio]:hover { border-color: var(--ink); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { box-shadow: var(--focus); outline: none; }
.choice input { margin-top: 1px; }
.choice { transition: border-color .15s, background .15s; }
.choice:hover { border-color: #b5b5ae; }

/* closing time: a two-column list of days with room for the time */
.week-grid-days { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.week-grid-days li { grid-template-columns: auto minmax(0, 1fr) auto; justify-items: stretch; align-items: center; gap: 12px;
  padding: 8px 10px 8px 12px; overflow: visible; }
.week-grid-days .day-toggle { grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
.week-grid-days .day { font: 700 .82rem var(--mono); min-width: 2.6em; text-align: left; }
.week-grid-days input[type=time] { width: 128px; min-height: 38px; padding: 6px 10px; font-size: .9rem; text-align: left; justify-self: end; }
.week-grid-days input[type=time]::-webkit-calendar-picker-indicator { display: block; }
.week-grid-days .after { grid-column: 1 / -1; text-align: right; margin-top: -6px; }
.week-grid-days .after:empty { display: none; }
@media (max-width: 820px) { .week-grid-days { grid-template-columns: minmax(0, 1fr); } }

/* side-by-side cards line up: same height, and a column of cards ends where its neighbour ends */
.split-2 { align-items: stretch; }
.split-2 > .tray, .split-2 > #roster-form { align-self: start; }
.split-2 > .stack { display: flex; flex-direction: column; }
.split-2 > .stack > .panel:last-child { flex: 1 1 auto; }
.split-2 > .panel, .split-2 > form.panel { display: flex; flex-direction: column; }
.split-2 > .panel > .panel-body:last-child, .split-2 > form.panel > .panel-body:last-child { flex: 1 1 auto; }
.panel-body.stack > .btn + .hint, .panel-body.stack > button + p { margin-top: 10px; }
.week-grid-days li.all-days { grid-template-columns: minmax(0, 1fr) auto auto; border-style: dashed; background: var(--steel-1); }
.week-grid-days li.all-days input[type=time] { width: 118px; }
.week-grid-days li.all-days { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
.week-grid-days li.all-days .all-label { white-space: nowrap; color: var(--graphite); }
.week-grid-days li.all-days input[type=time] { width: 128px; justify-self: end; }
.week-grid-days li.all-days .btn { min-height: 38px; padding: 6px 12px; }
.hint.tight { margin: 0; }
.stack > .hint.tight, .stack > * + .hint.tight { margin-top: 10px; }
.stack > .hint.tight:first-child { margin-top: 0; }
/* printing: never print mid-animation (sections start invisible until their animation runs) */
@media print { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   QR print studio: real pages in mm, what you see is what prints
   ===================================================================== */
.print-studio { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.studio-controls { position: sticky; top: 18px; }
.layout-pick { display: grid; gap: 8px; }
.sheets { display: grid; gap: 22px; justify-items: center; padding: 22px; background: var(--tray); border-radius: 4px;
  max-height: calc(100vh - 60px); overflow: auto; }
.sheet { --w: 210mm; --h: 297mm; width: var(--w); height: var(--h); background: #fff; box-shadow: 0 6px 18px -8px rgba(0,0,0,.35);
  zoom: .62; display: grid; overflow: hidden; color: #141414; }
.paper-letter .sheet { --w: 215.9mm; --h: 279.4mm; }
.layout-tent .sheet { grid-template-rows: repeat(2, 1fr); }
.layout-card .sheet { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.layout-sticker .sheet { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); padding: 8mm; gap: 6mm; }
.layout-poster .sheet { grid-template-rows: 1fr; padding: 18mm; }
.qr-item { position: relative; min-width: 0; min-height: 0; display: grid; }
.layout-card .qr-item, .layout-tent .qr-item { outline: 1px dashed #c9c7bf; outline-offset: -0.5px; }
.layout-sticker .qr-item { border: 1px dashed #c9c7bf; border-radius: 6mm; }

/* the card face */
.qr-face { display: grid; justify-items: center; align-content: center; text-align: center; gap: 2.2mm; padding: 6mm; }
.qr-face p { margin: 0; }
.qf-place { font: 600 3.4mm/1.2 var(--body); color: #5c5c58; letter-spacing: .02em; }
.qf-title { font: 800 8mm/1 var(--display); font-stretch: 72%; }
.qf-who { font: 600 3.2mm var(--mono); color: #5c5c58; text-transform: uppercase; letter-spacing: .06em; }
.qf-code { width: 46mm; height: 46mm; image-rendering: pixelated; }
.qf-how { font: 700 3.4mm var(--body); }
.qf-note { font: 3mm/1.3 var(--body); color: #5c5c58; max-width: 70mm; }
.qf-pay { display: flex; align-items: center; gap: 2mm; font: 600 2.8mm var(--mono); color: #5c5c58; margin-top: 1mm !important; }
.qf-pay img { width: 4.2mm; height: 4.2mm; border-radius: 1mm; }

/* table tent: two faces back to back, the top one upside down so both read once folded */
.layout-tent .qr-item { grid-template-rows: 1fr auto 1fr; }
.tent-half { display: grid; }
.tent-half .qr-face { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 8mm; padding: 6mm 14mm; }
.tent-half .qr-face .qf-code { grid-row: 1 / span 7; width: 52mm; height: 52mm; }
.tent-half .qr-face p { grid-column: 2; }
.tent-half.flipped { transform: rotate(180deg); }
.fold-line { position: relative; height: 0; border-top: 1px dashed #9b9b94; }
.fold-line span { position: absolute; left: 50%; top: -2.2mm; transform: translateX(-50%); background: #fff; padding: 0 2mm;
  font: 2.6mm var(--mono); color: #9b9b94; letter-spacing: .1em; text-transform: uppercase; }

/* stickers: compact */
.layout-sticker .qr-face { gap: 1.2mm; padding: 3mm; }
.layout-sticker .qf-place, .layout-sticker .qf-note, .layout-sticker .qf-pay, .layout-sticker .qf-how { display: none; }
.layout-sticker .qf-title { font-size: 5mm; }
.layout-sticker .qf-code { width: 38mm; height: 38mm; }

/* poster: big */
.layout-poster .qr-face { gap: 6mm; border: 1.5mm solid #141414; border-radius: 6mm; }
.layout-poster .qf-place { font-size: 7mm; }
.layout-poster .qf-title { font-size: 22mm; }
.layout-poster .qf-code { width: 120mm; height: 120mm; }
.layout-poster .qf-how { font-size: 7mm; }
.layout-poster .qf-note { font-size: 5mm; max-width: 140mm; }
.layout-poster .qf-pay { font-size: 4.5mm; }
.layout-poster .qf-pay img { width: 7mm; height: 7mm; }

@media (max-width: 1000px) {
  .print-studio { grid-template-columns: minmax(0, 1fr); }
  .studio-controls { position: static; }
  .sheet { zoom: .42; }
}
@media print {
  body:has(.print-studio) .topbar, body:has(.print-studio) .rail, body:has(.print-studio) .eyebrow,
  body:has(.print-studio) .flash { display: none !important; }
  body:has(.print-studio) .main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .print-studio { display: block; }
  .sheets { display: block; padding: 0; background: none; max-height: none; overflow: visible; }
  .sheet { zoom: 1; box-shadow: none; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
}

/* print studio: 6 per page, and a preview that grows with the pages (no scroll box) */
.layout-six .sheet { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
.layout-six .qr-item { outline: 1px dashed #c9c7bf; outline-offset: -0.5px; }
.layout-six .qr-face { gap: 1.6mm; padding: 4mm; }
.layout-six .qf-title { font-size: 6.5mm; }
.layout-six .qf-code { width: 38mm; height: 38mm; }
.layout-six .qf-note { display: none; }
.sheets { max-height: none; overflow: visible; }
@media screen { .sheet { zoom: .7; } }
@media screen and (max-width: 1000px) { .sheet { zoom: .42; } }

/* =====================================================================
   phones: a menu button + sheet instead of a cut-off ticket rail
   ===================================================================== */
.menu-btn { display: none; }
.menu-scrim { position: fixed; inset: 0; background: rgba(20,20,20,.35); z-index: 40; }
.menu-scrim[hidden] { display: none; }
@media (max-width: 760px) {
  .topbar { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--hair); gap: 10px; }
  .topbar .brand b { font-size: 1.35rem; }
  .brand-mark { width: 28px; height: 28px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 12px; border: 1.5px solid var(--ink);
    border-radius: 6px; background: var(--paper); color: var(--ink); font: 700 .9rem var(--body); cursor: pointer; }
  .menu-btn svg { width: 18px; height: 18px; }
  body.menu-open .menu-btn { background: var(--marker); }
  .who-am-i { gap: 10px; }
  .loc-switch { margin-right: 0; order: 3; flex-basis: 100%; }
  .loc-switch select { max-width: none; width: 100%; }
  .topbar { flex-wrap: wrap; }
  /* the rail turns into a sheet under the top bar */
  .rail { display: none; position: fixed; left: 0; right: 0; top: var(--topbar-h, 58px); z-index: 45; padding: 14px 16px 18px;
    background: var(--paper); border-bottom: 1px solid var(--hair); box-shadow: 0 16px 30px -18px rgba(0,0,0,.45);
    max-height: calc(100vh - 70px); overflow-y: auto; }
  .rail::before { display: none; }
  body.menu-open .rail { display: block; animation: sheet-in .18s ease-out; }
  .rail nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; padding: 0; max-width: none; }
  .rail nav .ticket { transform: none !important; padding: 12px 12px; border: 1px solid var(--hair); border-radius: 4px; box-shadow: none; }
  .rail nav .ticket::before { display: none; }
  .rail nav .ticket .label { display: inline !important; }
  .rail nav .ticket svg { display: block !important; }
  .rail nav .ticket[aria-current="page"] { background: var(--marker); border-color: #e2c636; }
  .main { padding-top: 18px; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* small screens: things that didn't fit */
@media (max-width: 560px) {
  .house-row { flex-direction: column; align-items: stretch; }
  .house-row .tent-mini { align-self: center; }
  .page-head { align-items: stretch; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; }
  .setup-action.actions .btn { flex: 1 1 auto; }
}
@media screen and (max-width: 480px) { .sheet { zoom: .36; } .sheets { padding: 12px; } }

@media (max-width: 560px) {
  /* labelled data tables -> one card per row */
  table.data.has-labels thead { display: none; }
  table.data.has-labels, table.data.has-labels tbody { display: block; width: 100%; }
  table.data.has-labels tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; padding: 14px 18px;
    border-top: 1px solid var(--hair-soft); }
  table.data.has-labels tr:first-child { border-top: 0; }
  table.data.has-labels td { display: block; padding: 0; border: 0; text-align: left !important; min-width: 0; }
  table.data.has-labels td[data-label]::before { content: attr(data-label); display: block; font: 600 .66rem/1.4 var(--mono);
    text-transform: uppercase; letter-spacing: .05em; color: var(--graphite); }
  table.data.has-labels td:first-child { grid-column: 1 / -1; font-size: 1.02rem; }
  table.data.has-labels td:first-child::before { display: none; }
  table.data.has-labels td:not([data-label]), table.data.has-labels td[data-label=""] { grid-column: 1 / -1; }
  .table-wrap { margin: 0 !important; overflow: visible; }
  /* recent changes: when + who on one line, what below */
  table.changes tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--hair-soft); }
  table.changes, table.changes tbody { display: block; }
  table.changes td { padding: 0; border: 0; width: auto !important; }
  table.changes td:last-child { grid-column: 1 / -1; }
  /* panel heads: side note goes under the title */
  .panel-head { flex-wrap: wrap; row-gap: 4px; }
  .panel-head > .small.muted { flex-basis: 100%; }
  /* close-out: the pinned action bar spans the screen */
  .sticky-bar { position: sticky; bottom: 0; margin: 0 -1px -1px; padding: 12px 14px; box-shadow: 0 -10px 20px -14px rgba(0,0,0,.4);
    display: flex; gap: 10px; }
  .sticky-bar .btn { flex: 1 1 0; padding-left: 10px; padding-right: 10px; }
  .stepper { overflow-x: auto; scrollbar-width: none; }
}
.person-edit { display: grid; gap: 10px; }
.person-edit .inline-form { margin-top: 10px; }
.erase-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.btn.danger { color: var(--void); }
.btn.danger:hover { background: var(--void-soft); }
.two-step-setup { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; align-items: start; }
.two-step-setup img { border: 1px solid var(--hair); border-radius: 6px; background: #fff; }
.two-step-setup code { font: .82rem var(--mono); word-break: break-all; }
.code-input { font: 600 1.3rem var(--mono) !important; letter-spacing: .2em; text-align: center; }
@media (max-width: 560px) { .two-step-setup { grid-template-columns: minmax(0, 1fr); justify-items: center; } }

/* demo */
.demo-banner { margin: 0 0 16px; padding: 10px 14px; border-radius: 4px; background: var(--marker-soft); border: 1px dashed #d8bf3a; font-size: .9rem; }
.demo-box { margin-top: 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 14px 16px; border: 1.5px dashed var(--hair); border-radius: 6px; background: var(--steel-1); }
.demo-box strong { display: block; }
.login .right { align-content: center; }
.sandbox-buyer { width: 100%; max-width: 460px; margin-top: 14px; padding: 10px 14px; border-radius: 4px; background: var(--paper);
  border: 1px dashed var(--hair); font-size: .85rem; }
.sandbox-buyer code { font: .8rem var(--mono); word-break: break-all; }

/* ---------- skip link, footers, language switch, legal and error pages ---------- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 4px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
.main:focus { outline: none; }
.app-foot { display: flex; gap: 18px; align-items: center; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--hair); font-size: .82rem; color: var(--graphite); }
.app-foot span { margin-right: auto; font-family: var(--mono); letter-spacing: .04em; }
.app-foot a { color: var(--graphite); }
.legal-links { display: flex; gap: 16px; margin: 0; }
.legal-links a { color: #3a3a37; }
.hint.center { text-align: center; }
.lang-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-top: 14px; max-width: 440px; }
.lang-switch a { font-size: .82rem; color: var(--graphite); text-decoration: none; padding: 6px 9px; border-radius: 4px; }
.lang-switch a:hover { color: var(--ink); background: var(--paper); }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 700; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.guest-note a { color: var(--graphite); }

.legal { min-height: 100vh; background: var(--tray); padding: 0 16px 60px; }
.legal-top { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.legal-top nav { display: flex; gap: 6px; }
.legal-top nav a { text-decoration: none; padding: 7px 12px; border-radius: 4px; font-weight: 600; font-size: .92rem; }
.legal-top nav a[aria-current] { background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.legal-body { max-width: 760px; margin: 0 auto; background: var(--paper); border-radius: 6px; padding: clamp(22px, 5vw, 48px); box-shadow: 0 1px 0 var(--hair), 0 14px 30px -22px rgba(0,0,0,.35); }
.legal-body h1 { margin-bottom: 14px; }
.legal-body h2 { font-size: 1.25rem; margin: 30px 0 10px; }
.legal-body .lead { font-size: 1.08rem; max-width: 60ch; }
.legal-body ul { padding-left: 1.2em; margin: 0 0 .75em; }
.legal-body li { margin-bottom: 8px; max-width: 70ch; }
.legal-body p { max-width: 70ch; }
.legal-body hr { border: 0; border-top: 1px dashed var(--hair); margin: 30px 0 16px; }

.error-page { min-height: 100vh; background: var(--tray); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 32px 16px; }
.error-receipt { max-width: 380px; }
.error-receipt .head h2 { font-family: var(--mono); font-size: 2.6rem; letter-spacing: .04em; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- demo tour: a ticket pinned to the corner ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tour { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 330px; max-width: calc(100vw - 32px);
  background: var(--thermal); border: 1px solid var(--hair); border-top: 4px solid var(--marker); border-radius: 6px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.45), 0 2px 0 var(--hair-soft); }
.tour summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 11px 14px; }
.tour summary::-webkit-details-marker { display: none; }
.tour summary::after { content: "▴"; order: 3; font-size: .8rem; color: var(--graphite); }
.tour[open] summary::after { content: "▾"; }
.tour-title { flex: 1; font: 800 1.05rem/1 var(--display); font-stretch: 72%; text-transform: uppercase; letter-spacing: .04em; }
.tour-count { order: 2; font: 700 .85rem var(--mono); }
.tour-bar { order: 4; flex-basis: 100%; height: 4px; background: var(--hair-soft); border-radius: 2px; overflow: hidden; }
.tour-bar i { display: block; height: 100%; background: var(--ink); transition: width .4s ease; }
.tour-steps { list-style: none; margin: 0; padding: 0 8px 8px; max-height: min(62vh, 520px); overflow-y: auto; border-top: 1px dashed var(--hair); }
.tour-steps a { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 6px; text-decoration: none; border-radius: 4px; }
.tour-steps a:hover { background: var(--marker-soft); }
.tour-steps strong { display: block; font-size: .93rem; line-height: 1.25; }
.tour-steps small { display: block; color: var(--graphite); font-size: .8rem; line-height: 1.4; margin-top: 3px; }
.tour-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem var(--mono); border: 1.5px solid var(--ink); }
.is-done .tour-mark { background: var(--go); border-color: var(--go); color: #fff; }
.is-done strong { color: var(--graphite); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.is-next .tour-mark { background: var(--marker); }
.tour-next { font-style: normal; font: 700 .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; background: var(--ink); color: var(--marker); padding: 2px 6px; border-radius: 3px; margin-left: 6px; vertical-align: 2px; }
.tour-steps li + li { border-top: 1px solid var(--hair-soft); }
.tour-end { margin: 0; padding: 10px 14px 14px; font-size: .88rem; border-top: 1px dashed var(--hair); }
.tour:not([open]) { width: 190px; }
@media (max-width: 640px) {
  .tour { right: 12px; bottom: 12px; }
  .tour[open] { left: 12px; width: auto; }
  .main:has(.tour) { padding-bottom: 80px; }
}
.tour-steps strong { display: inline; }
.tour-steps li:not(.is-next) small { display: none; }
.tour-steps a { padding: 8px 6px; align-items: center; }
.is-next .tour-steps a, .tour-steps .is-next a { align-items: start; }


/* ---------- audit fixes: layout ---------- */
.split-2.top { align-items: start; }
.roster li.empty-row { display: block; padding: 18px 4px; }
.roster .who strong { min-width: 4.5em; flex: 0 1 auto; }
.roster .who .src { flex-shrink: 0; }
@media (max-width: 520px) { .roster .who { flex-wrap: wrap; row-gap: 2px; } .roster .who .src { flex-basis: auto; width: max-content; margin-left: 40px; } }
.payout-card .clock-time { overflow-wrap: anywhere; }
@media (max-width: 560px) { .payout-card { flex-wrap: wrap; } .payout-card > form, .payout-card > .btn { width: 100%; } .payout-card .btn { width: 100%; } }
.who-btn { overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
.qr-face .qf-title, .qr-face .qf-who, .qr-face .qf-place { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 520px) { .week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .week-grid input { padding: 6px 0; } }
/* ten tabs (with "All locations"): drop the icons on laptop widths so every tab fits */
/* still too many for the space (more tabs, bigger text): drop the icons, then let the rail scroll with a fade */
@media (min-width: 761px) {
  .rail nav.no-icons .ticket svg { display: none; }
  .rail nav.scrolls { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .rail nav.scrolls.at-end { -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 900px) and (min-width: 761px) { .who-am-i > span { display: none; } }
body:has(.save-bar) .tour, body:has(.sticky-bar) .tour { bottom: 92px; }
.tour { z-index: 30; }
body.menu-open .tour { display: none; }
.older-receipts { width: 100%; max-width: 440px; margin: 0 auto 22px; }
.older-receipts > summary { cursor: pointer; text-align: center; font-weight: 700; padding: 12px; border: 1px dashed var(--steel-2); border-radius: 4px; margin-bottom: 18px; }
.money-input { position: relative; }
.money-input > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: #5c5f62; pointer-events: none; }
.money-input > input { padding-left: 34px; }
.settings-single { max-width: 880px; }
.who-am-i a { color: inherit; }
.page-head .report-filter .custom-dates { display: flex; gap: 10px; align-items: flex-end; }
.page-head .report-filter > div > label, .page-head .report-filter .custom-dates label { display: block; line-height: 1.3; }
.qr-people-head { margin-top: 34px; }
@media (max-width: 960px) { .split-2.top > .stack:last-child { order: -1; } }
.dash-count { white-space: nowrap; }
.narrow-panel { max-width: 480px; }
.page-head .report-filter .custom-dates[hidden] { display: none; }
.stack > .auth-switch { margin-top: 4px; }
.panel-head > .small { white-space: nowrap; }
@media (max-width: 640px) { body:has(.sticky-bar) .tour { bottom: 140px; } }

/* ---------- live board ---------- */
.pace-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pace-now { font: 800 2rem/1 var(--display); font-stretch: 72%; }
.pace-chip { font: 700 .74rem var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border-radius: 3px; background: var(--steel-1); color: var(--graphite); white-space: nowrap; }
.pace-chip.up { background: var(--go-soft); color: var(--go); }
.pace-chip.ok { background: var(--steel-1); color: var(--ink); }
.pace-chip.down { background: var(--wait-soft); color: var(--wait); }
.pace-chip.bad { background: var(--void-soft); color: var(--void); }
.pace-meter { position: relative; height: 10px; background: var(--steel-1); border-radius: 5px; }
.pace-meter .fill { position: absolute; left: 0; top: 0; bottom: 0; max-width: 100%; border-radius: 5px; background: var(--ink); }
.pace-meter .fill.above { background: var(--go); }
.pace-meter .fill.below { background: var(--wait); }
.pace-meter .fill.low, .pace-meter .fill.quiet { background: var(--void); }
.pace-meter .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.pace-meter .mark::after { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 3px; background: var(--marker); }
.pace-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.pace-stats div { min-width: 0; }
.pace-stats dt { font: 600 .72rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--graphite); }
.pace-stats dd { margin: 2px 0 0; font: 700 1rem var(--mono); }
.pace-stats small { font-weight: 500; color: var(--graphite); font-size: .78rem; }
.pace-stats small.up { color: var(--go); }
.pace-stats small.down { color: var(--wait); }
.board-time { margin-top: 18px; }
.dash-pace { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }


/* ---------- owner controls, managers per location, digest ---------- */
.freeze-box { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border: 1.5px dashed var(--void); border-radius: 4px; background: var(--void-soft); }
.freeze-box > div { flex: 1 1 260px; min-width: 0; }
.freeze-box strong { display: block; }
.btn-danger { background: var(--void); border-color: var(--void); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.plain-list { margin: 0; padding-left: 1.1em; }
.manager-locs { flex-basis: 100%; margin-top: 4px; }
.manager-locs > summary { cursor: pointer; font-size: .85rem; color: var(--graphite); }
.manager-locs > summary::before { content: "Runs: "; font-weight: 700; color: var(--ink); }
.manager-locs form { margin-top: 10px; }
.choice.compact { padding: 6px 0; border: 0; background: none; }
.invite-locs { flex-basis: 100%; border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.invite-locs legend { padding: 0; margin-bottom: 4px; }
.rows.boxed > li { flex-wrap: wrap; }
.frozen-banner { margin: 0 0 16px; }
.digest-frame { max-width: 720px; }

.activity-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; }
.activity-filter > div { min-width: 150px; }
.activity-filter > .grow { flex: 1 1 200px; }
.activity-filter label { font-size: .8rem; margin-bottom: 4px; }

.bulk-add > summary { cursor: pointer; list-style: none; }
.bulk-add > summary::-webkit-details-marker { display: none; }
.bulk-add > summary h2::after { content: " +"; color: var(--graphite); }
.bulk-add[open] > summary h2::after { content: " \2212"; }
.bulk-add textarea { font-family: var(--mono); font-size: .85rem; }

/* ---------- dark mode (manager pages): off by default, turned on with the switch in the top bar.
   Receipts, tickets and printed codes stay paper-white. ---------- */
:root[data-theme="dark"] body.app-shell {
  --paper: #171716; --ink: #ecebe5; --graphite: #a9a8a0; --hair: #3a3935; --hair-soft: #2b2a27;
  --tray: #0f0f0e; --tray-deep: #1d1d1b; --steel-1: #242422; --steel-2: #55554f;
  --marker: #f5d63d; --marker-soft: #3b3417; --go: #5bd394; --go-soft: #13301f; --wait: #f0b357;
  --wait-soft: #35270f; --void: #ff8577; --void-soft: #3d1a16; --thermal: #1f1f1d;
  color-scheme: dark; background: var(--paper); color: var(--ink); }
:root[data-theme="dark"] body.app-shell .btn-primary, :root[data-theme="dark"] body.app-shell .avatar, :root[data-theme="dark"] body.app-shell .is-done .tour-mark { color: var(--paper); }
:root[data-theme="dark"] body.app-shell .btn-primary:hover { color: #141414; }
:root[data-theme="dark"] body.app-shell select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ecebe5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] body.app-shell ::placeholder { color: #7a7972; }
:root[data-theme="dark"] body.app-shell input[type=checkbox]:not(.switch input), :root[data-theme="dark"] body.app-shell input[type=radio] { border-color: #6a6963; }
:root[data-theme="dark"] body.app-shell input[type=time]::-webkit-calendar-picker-indicator, :root[data-theme="dark"] body.app-shell input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); }
:root[data-theme="dark"] body.app-shell .hl { background: linear-gradient(100deg, transparent 2%, rgba(245, 214, 61, .38) 3% 97%, transparent 98%) 0 85% / 100% 42% no-repeat; }
:root[data-theme="dark"] body.app-shell .panel, :root[data-theme="dark"] body.app-shell .kpis > div, :root[data-theme="dark"] body.app-shell .tour { box-shadow: none; }
:root[data-theme="dark"] body.app-shell .demo-banner { border-color: #6b5c17; }
:root[data-theme="dark"] body.app-shell .receipt, :root[data-theme="dark"] body.app-shell .qr-face, :root[data-theme="dark"] body.app-shell .tent, :root[data-theme="dark"] body.app-shell .sheet, :root[data-theme="dark"] body.app-shell .show-screen, :root[data-theme="dark"] body.app-shell .house-qr, :root[data-theme="dark"] body.app-shell .two-step-setup img { --ink: #141414; --paper: #ffffff; --graphite: #5c5c58; --hair: #dcdcd6; --hair-soft: #ececE7; --steel-1: #f2f3f1; --marker-soft: #fff6c7; --go: #12703d; --wait: #9a5b00; --void: #c4291f; --thermal: #fffefc; color-scheme: light; }
:root[data-theme="dark"] body.app-shell .ticket[aria-current="page"] { color: #141414; }
:root[data-theme="dark"] body.app-shell .tour { background: var(--tray-deep); border-color: var(--hair); }
:root[data-theme="dark"] body.app-shell .btn-danger { color: #141414; }
.theme-btn { background: none; border: 1px solid var(--hair); border-radius: 4px; padding: 5px 8px; cursor: pointer; color: var(--ink); font: 600 .8rem var(--body); display: inline-flex; align-items: center; gap: 6px; }
.theme-btn svg { width: 15px; height: 15px; }
.theme-btn:hover { background: var(--steel-1); }
@media (max-width: 760px) { .theme-btn .theme-label { display: none; } }

.save-bar.dirty { border-color: var(--marker); box-shadow: 0 0 0 3px var(--marker-soft), 0 10px 24px -14px rgba(0,0,0,.4); }
.save-bar.dirty .save-note { font-weight: 700; }
.save-bar.dirty .save-note::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wait); margin-right: 8px; vertical-align: 1px; }

/* ---------- dropdown lists in our own style (static/js/pick.js) ---------- */
.pick-list { box-sizing: border-box; position: fixed; z-index: 1000; margin: 0; padding: 5px; list-style: none; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px;
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.45), 0 2px 0 var(--hair-soft); font-family: var(--body);
  animation: pick-in .12s ease-out; }
@keyframes pick-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* the list is as wide as its box; an option longer than that wraps instead of being cut off */
.pick-opt { position: relative; padding: 8px 14px 8px 32px; border-radius: 3px; cursor: pointer; line-height: 1.35;
  white-space: normal; overflow-wrap: anywhere; }
.pick-opt.active { background: var(--marker-soft); }
.pick-opt[aria-selected="true"] { font-weight: 700; }
.pick-opt[aria-selected="true"]::before { content: ""; position: absolute; left: 11px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: var(--ink); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
.pick-opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.pick-group { padding: 8px 14px 4px; font: 700 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--graphite); }
select.pick-open { border-color: var(--ink); box-shadow: 0 0 0 3px var(--marker); }
/* compact dropdowns keep their size whatever their longest option; the open list can be wider */
.role-pick select { max-width: 190px; }
.role-preset select { max-width: 230px; }
.page-head .report-filter select, .activity-filter select { max-width: 240px; }

.theme-btn .icon-dark { display: none; }
:root[data-theme="dark"] .theme-btn .icon-dark { display: block; }
:root[data-theme="dark"] .theme-btn .icon-light { display: none; }

/* ---------- "are you sure?" dialog (replaces the browser's confirm box) ---------- */
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1.5px solid var(--ink); border-radius: 6px;
  background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(0,0,0,.5); }
.confirm-dialog::backdrop { background: rgba(20, 20, 20, .45); }
.confirm-dialog[open] { animation: pick-in .14s ease-out; }
.confirm-dialog form { padding: 22px 22px 18px; border-top: 5px solid var(--marker); }
.confirm-dialog p { margin: 0 0 20px; font-size: 1.02rem; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 420px) { .confirm-actions { flex-direction: column-reverse; } .confirm-actions .btn { width: 100%; } }

/* ---------- browser-drawn bits, redrawn in our style ---------- */
::selection { background: var(--marker); color: #141414; }
* { scrollbar-width: thin; scrollbar-color: var(--steel-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--steel-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--graphite); background-clip: padding-box; border: 2px solid transparent; }
input:-webkit-autofill, input:-webkit-autofill:hover, select:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 60px var(--paper) inset; -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 60px var(--paper) inset, 0 0 0 3px var(--marker); }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; cursor: pointer;
  background: var(--graphite); clip-path: polygon(20% 8%, 50% 38%, 80% 8%, 92% 20%, 62% 50%, 92% 80%, 80% 92%, 50% 62%, 20% 92%, 8% 80%, 38% 50%, 8% 20%); }
input[type=search]::-webkit-search-cancel-button:hover { background: var(--ink); }

/* expandable sections: our chevron instead of the browser's triangle */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.week-edit > summary, .flag > summary, .manager-locs > summary { display: inline-flex; align-items: center; gap: 8px; }
.week-edit > summary::before, .flag > summary::before, .manager-locs > summary::after, .older-receipts > summary::after {
  content: ""; width: 6px; height: 6px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; }
.week-edit[open] > summary::before, .flag[open] > summary::before, .manager-locs[open] > summary::after,
.older-receipts[open] > summary::after { transform: rotate(45deg); }
.older-receipts > summary { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* form errors */
.field-error { margin: 6px 0 0; color: var(--void); font-size: .85rem; font-weight: 600; display: flex; gap: 6px; align-items: baseline; }
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--void); color: var(--paper); font: 800 .7rem/1 var(--body); }
[aria-invalid="true"] { border-color: var(--void) !important; }

/* file picker */
.file-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.file-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-pick .file-name { font-size: .88rem; color: var(--graphite); overflow-wrap: anywhere; min-width: 0; }
.file-pick.has-file .file-name { color: var(--ink); font-weight: 600; }

/* date picker */
.date-wrap { position: relative; display: block; }
.date-wrap input[type=date] { padding-right: 40px; }
.date-wrap input[type=date]::-webkit-calendar-picker-indicator { display: none; }
.date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 3px; background: none; color: var(--graphite); cursor: pointer; }
.date-btn:hover { background: var(--steel-1); color: var(--ink); }
.date-btn svg { width: 17px; height: 17px; }
.cal-pop { position: fixed; z-index: 1000; width: 288px; padding: 12px; background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 6px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); animation: pick-in .12s ease-out; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font: 800 1.05rem var(--display); font-stretch: 80%; }
.cal-nav { width: 32px; height: 32px; border: 1px solid var(--hair); border-radius: 4px; background: var(--paper); color: var(--ink);
  font-size: 1.2rem; line-height: 1; cursor: pointer; }
.cal-nav:hover { background: var(--marker-soft); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font: 700 .68rem var(--mono); text-transform: uppercase; color: var(--graphite); padding: 4px 0; }
.cal-day { height: 34px; border: 0; border-radius: 4px; background: none; color: var(--ink); font: 600 .88rem var(--mono); cursor: pointer; }
.cal-day:hover, .cal-day.focus { background: var(--marker-soft); }
.cal-day.out { color: var(--steel-2); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal-day.chosen { background: var(--marker); color: #141414; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hair); }

/* tooltips */
.ui-tip { position: fixed; z-index: 1100; max-width: 280px; padding: 6px 9px; border-radius: 4px; background: var(--ink); color: var(--paper);
  font: 600 .78rem/1.35 var(--body); pointer-events: none; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); animation: pick-in .1s ease-out; }
.ui-tip::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: var(--ink);
  transform: rotate(45deg); }
.ui-tip.below::after { bottom: auto; top: -4px; }
input[type=time]::-webkit-calendar-picker-indicator { display: none !important; }  /* the hours and minutes are typed, no browser pop-up */
.page-head .report-filter .date-wrap input[type=date], .activity-filter .date-wrap input[type=date] { padding-right: 36px; min-width: 158px; }
.page-head .report-filter .date-btn { width: 28px; height: 28px; right: 3px; }
.date-wrap > input { display: block; width: 100%; }
.page-head .report-filter select, .page-head .report-filter input, .activity-filter select, .activity-filter input:not([type=checkbox]) { height: 40px; }
.page-head .report-filter input[type=date], .activity-filter input[type=date] { min-height: 40px; }

/* ---------- change password steps ---------- */
.pw-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; }
.pw-steps li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--graphite); }
.pw-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--hair); font: 700 .8rem var(--mono); }
.pw-steps li.now { color: var(--ink); }
.pw-steps li.now span { background: var(--marker); border-color: var(--marker); color: #141414; }
.pw-steps li.done span { background: var(--go); border-color: var(--go); color: var(--paper); }
.code-input { font: 700 1.4rem var(--mono); letter-spacing: .35em; text-transform: uppercase; max-width: 240px; }
.code-input::placeholder { letter-spacing: .35em; }
.resend { border-top: 1px dashed var(--hair); padding-top: 12px; }

/* ---------- connect PayPal guide ---------- */
.connect-guide > summary { cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.connect-guide > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; }
.connect-guide[open] > summary::before { transform: rotate(45deg); }
.guide-steps { margin: 10px 0 16px; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.guide-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; line-height: 1.45; }
.guide-steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--marker); color: #141414; font: 700 .8rem var(--mono); }

/* ---------- platform settings ---------- */
.setup-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.setup-status a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--hair); border-left: 5px solid var(--wait); border-radius: 4px;
  background: var(--paper); text-decoration: none; }
.setup-status a.ok { border-left-color: var(--go); }
.setup-status b { font-size: .95rem; }
.setup-status span { font-size: .82rem; color: var(--graphite); }
@media (max-width: 760px) { .setup-status { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.switch-row { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.provider-help[hidden] { display: none; }
.platform-link { font-weight: 700; color: var(--ink); text-decoration: none; border: 1px solid var(--hair); border-radius: 4px; padding: 4px 9px; }
.platform-link:hover { background: var(--marker-soft); }
/* strips that scroll sideways show a fade at the edge, so they don't look cut off */
@media (max-width: 1100px) {
  .settings-nav, .stepper { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 24px; }
}

/* ---------- responsive round 2 ---------- */
/* the rail's last resort before scrolling: icons, with the current tab's name */
@media (min-width: 761px) {
  .rail nav.icon-tabs .ticket svg { display: block; }
  .rail nav.icon-tabs .ticket .label { display: none; }
  .rail nav.icon-tabs .ticket[aria-current="page"] .label { display: inline; }
}
/* rows on phones: the actions drop below the text instead of squeezing it to a column */
@media (max-width: 600px) {
  .rows > li { flex-wrap: wrap; }
  .rows > li > div:is(.st-6, .st-7) { flex: 1 1 200px !important; }
}
/* the demo tour never covers the last things on a page */
.main:has(.tour) { padding-bottom: 96px; }
@media (max-width: 900px) { .tour[open] { max-height: 60vh; } }
/* a field's error never pushes its row out of line */
.inline-form > div { position: relative; }
.inline-form .field-error { position: absolute; left: 0; top: 100%; margin-top: 3px; white-space: nowrap; z-index: 2; }
.inline-form:has(.field-error) { margin-bottom: 18px; }
/* filter rows: one height for every control */
.activity-filter select, .activity-filter input:not([type=checkbox]),
.page-head .report-filter select, .page-head .report-filter input { min-height: 40px; height: 40px; }
/* the breadcrumb wraps as whole pieces */
.eyebrow .eb-place { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 600px) { .eyebrow .sep { display: none; } }
/* "on the clock now" stays a small chip on phones */
@media (max-width: 520px) {
  .roster .who strong { flex: 1 1 calc(100% - 50px); }
  .roster .who .src { flex-basis: auto; width: max-content; margin-left: 42px; }
}
/* no sideways jump between short and long pages */
html { scrollbar-gutter: stable; }
/* overview tiles: labels line up; a little air above the stats */
.kpis > div { align-content: start; }
.loc-card .pace-stats { margin-top: 4px; }

.who-am-i > span, .who-am-i button, .who-am-i a { white-space: nowrap; }
@media (max-width: 1100px) { .who-am-i .who-label { display: none; } }

/* a plan from Ask: numbered steps, done in order after one confirm */
.answer .plan-steps { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.answer .plan-steps li { padding-left: 4px; }

/* Ask: the answer area shows the AI working, nothing else on the page moves */
.answer.thinking { display: flex; align-items: center; gap: 10px; color: var(--graphite); }
.ask-dots { display: inline-flex; gap: 4px; }
.ask-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: .25;
  animation: ask-dot 1.1s ease-in-out infinite; }
.ask-dots i:nth-child(2) { animation-delay: .15s; }
.ask-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ask-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ask-dots i { animation: none; opacity: .6; } }
#ask-go:disabled { opacity: .6; cursor: progress; }

/* a button whose form is on its way */
.btn.is-busy { cursor: progress; opacity: .85; }
.busy-spin { display: inline-block; width: .9em; height: .9em; margin-right: .35em; vertical-align: -.12em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: busy-spin .7s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy-spin { animation-duration: 2.5s; } }

/* ---------- layout fixes from the visual review (every page at 1280, 820 and 390px wide) ---------- */
/* the demo tour folded is a small tab in the corner, not a wide card over the page */
.tour:not([open]) { width: auto; }
.tour:not([open]) summary { flex-wrap: nowrap; padding: 9px 12px; }
.tour:not([open]) .tour-bar { display: none; }
/* shift-chart day labels hang below the bars and wrap downwards, never over the bars */
.bar-day { bottom: auto; top: calc(100% + 6px); text-align: center; line-height: 1.2; }
@media (max-width: 760px) {
  .bar-day { font-size: .62rem; }
  .panel-body:has(> .bars) { padding-bottom: 46px; }
}
/* the "normal by now" mark on a location's meter keeps clear of the text under it */
.pace-meter { margin-bottom: 12px; }
/* Open and Resolved messages: the two cards side by side are the same height */
.msg-columns > .panel { display: flex; flex-direction: column; }
/* the QR card's buttons share the width on phones, like the ones under them */
@media (max-width: 760px) { .setup-body .actions .btn { flex: 1 1 0; } }
/* wide tables fit tablets without spilling past the edge */
@media (max-width: 1100px) { table.data th, table.data td { padding-left: 14px; padding-right: 14px; } }

/* ---------- "Search features" (top bar, Ctrl+K) and "Find someone" (Team, close-out) ---------- */
.who-am-i .jump-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; min-width: 210px;
  border: 1px solid var(--hair); border-radius: 6px; background: var(--paper); color: var(--graphite); text-decoration: none; }
.who-am-i .jump-btn:hover { border-color: var(--ink); color: var(--ink); }
.who-am-i .jump-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.jump-btn svg { width: 16px; height: 16px; flex: none; }
.jump-btn .jump-label { flex: 1; text-align: left; }
.jump kbd, .jump-btn kbd { font: 600 .68rem var(--mono); padding: 1px 5px; border: 1px solid var(--hair); border-radius: 3px;
  background: var(--tray, #f4f4f0); color: var(--graphite); }
@media (max-width: 1100px) { .who-am-i .jump-btn { min-width: 0; } .jump-btn kbd { display: none; } }
@media (max-width: 760px) { .who-am-i .jump-btn { padding: 7px; border-color: var(--ink); color: var(--ink); } }
dialog.jump { width: min(560px, calc(100vw - 24px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--hair);
  border-top: 4px solid var(--marker); border-radius: 8px; background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.5); }
dialog.jump::backdrop { background: rgba(20, 20, 18, .45); }
.jump-field { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--hair); }
.jump-field svg { width: 18px; height: 18px; flex: none; color: var(--graphite); }
.jump-field input[type=search] { flex: 1; border: 0; box-shadow: none; padding: 6px 0; font-size: 1.05rem; background: transparent; }
.jump-field input[type=search]:focus { box-shadow: none; }
.jump-list { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 420px); overflow-y: auto; }
.jump-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; border-radius: 5px;
  color: var(--ink); text-decoration: none; }
.jump-list li[aria-selected="true"] a { background: var(--marker-soft); box-shadow: inset 3px 0 0 var(--marker); }
.jump-list a span { font: .74rem var(--mono); color: var(--graphite); white-space: nowrap; }
.jump-none { padding: 14px 12px; color: var(--graphite); font-size: .9rem; }
.jump-hint { margin: 0; padding: 8px 14px; border-top: 1px solid var(--hair-soft); font-size: .76rem; color: var(--graphite); }
@media (max-width: 760px) { dialog.jump { margin-top: 8vh; } .jump-hint { display: none; } }
/* the card a search jumped to: a short highlight, so the eye finds it */
.jump-target { animation: jump-flash 1.8s ease-out 1; }
@keyframes jump-flash { 0%, 35% { box-shadow: 0 0 0 3px var(--marker); } 100% { box-shadow: 0 0 0 3px transparent; } }
.find-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--hair-soft); }
.find-row .find-input { flex: 1; min-width: 0; }
.find-row span { white-space: nowrap; }
@media (max-width: 760px) { .find-row { padding: 10px 14px; } }
/* phones: the top bar is the logo, then Menu, search and the light/dark switch on the right, all the same size;
   who's signed in, Platform and Sign out are in the menu */
.rail-account { display: none; }
@media (max-width: 760px) {
  .who-am-i { gap: 8px; }
  .who-am-i > form, .who-am-i .platform-link { display: none; }
  .who-am-i .jump-btn, .who-am-i .theme-btn { width: 40px; height: 40px; padding: 0; justify-content: center;
    border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); }
  .who-am-i .jump-btn svg, .who-am-i .theme-btn svg { width: 20px; height: 20px; }
  .menu-btn { height: 40px; }
  body.menu-open .rail-account { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hair); }
  .rail-account p { margin: 0; font-size: .875rem; color: var(--graphite); }
  .rail-account .btn { width: 100%; }
}
/* the smallest phones: the logo alone, so everything stays on one line */
@media (max-width: 340px) { .topbar .brand b { display: none; } }

/* ---------- phone and dark-mode polish (from screenshots of the live site) ---------- */
/* QR cards, the full-screen code and print sheets are white "paper": their text keeps light-mode ink in dark mode too */
.tent, .show-screen, .sheet, .house-qr { color-scheme: light; --ink: #141414; --graphite: #5c5c58; --hair: #dcdcd6;
  --hair-soft: #ececE7; --paper: #ffffff; color: var(--ink); }
/* the full-screen code fits the screen exactly: no scrolling on a phone */
.show-screen { min-height: 0; height: 100vh; height: 100dvh; overflow: hidden; gap: 8px; padding: 16px; }
.show-screen img { width: min(78vw, 44vh); width: min(78vw, 44dvh); }
.show-screen .tent-label { font-size: clamp(2rem, min(9vw, 7vh), 4.4rem); }
/* "Close out automatically" lines up with the day switches under it (their rows have 12px padding + a border) */
.switch-line:has(+ .week-grid-days) { padding-left: 13px; }
/* small buttons really are small (they had the full size) */
.btn.small { padding: 7px 12px; font-size: .85rem; }
/* phones: actions are full-width buttons of one height, not a ragged row of different widths */
@media (max-width: 560px) {
  .actions > .btn:not(.btn-quiet), .actions > form, .actions > form > .btn:not(.btn-quiet),
  .stack > .btn:not(.btn-quiet), .stack > form > .btn:not(.btn-quiet), .stack > .actions > .btn:not(.btn-quiet),
  .panel-body > .btn:not(.btn-quiet), .setting-body > .btn:not(.btn-quiet), form.panel > .btn:not(.btn-quiet),
  .file-pick > .btn { flex: 1 1 100%; width: 100%; }
  .btn:not(.btn-quiet) { min-height: 44px; }
  .btn.small:not(.btn-quiet) { min-height: 44px; }  /* one height for every button on a phone */
  .actions { gap: 8px; }
}
/* dark mode: things that kept a light-mode colour */
:root[data-theme="dark"] details.why p { color: var(--ink); }                 /* each person's explanation */
:root[data-theme="dark"] .tour-next { background: #141414; color: var(--marker); }  /* the demo tour's "Next" tag */
:root[data-theme="dark"] .ticket .badge { color: #141414; }                    /* the open-messages count */
.fold-line span { color: #5c5c58; }                                             /* the print sheet's "fold" label */
/* the summary email shown as itself, in its own frame, so its email styles never touch the page */
.digest-frame { padding: 0; overflow: hidden; }
.digest-email { display: block; width: 100%; min-height: 420px; border: 0; background: #fff; }
/* the close-out bar's two buttons are equal halves on phones: long labels wrap instead of widening their button */
@media (max-width: 760px) { .sticky-bar { align-items: stretch; } .sticky-bar .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; } }
/* phones: a button that shares its row with a field (Ask, the role presets) keeps its own width; the field gets the rest */
@media (max-width: 560px) {
  :is(.actions, form, .ask-row, .inline-form):has(> input:not([type=hidden]), > select, > textarea) > .btn:not(.btn-quiet) {
    flex: 0 0 auto; width: auto; }
  .role-preset select { flex: 1 1 auto; min-width: 0; }
}
/* dropdown lists on phones: TipPool's own list as a sheet from the bottom, with rows big enough for a thumb */
.pick-scrim { position: fixed; inset: 0; z-index: 999; background: rgba(20, 20, 18, .45); animation: pick-fade .12s ease-out; }
@keyframes pick-fade { from { opacity: 0; } to { opacity: 1; } }
.pick-list.pick-sheet { left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-height: min(62vh, 480px);
  padding: 6px 6px 10px; font-size: 1rem; border-radius: 10px; animation: sheet-up .16s ease-out; }
@keyframes sheet-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.pick-sheet .pick-title { padding: 12px 14px 10px; font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .06em;
  color: var(--graphite); border-bottom: 1px solid var(--hair-soft); margin-bottom: 4px; }
.pick-sheet .pick-opt { padding: 14px 16px 14px 40px; border-radius: 6px; }
.pick-sheet .pick-opt[aria-selected="true"]::before { left: 15px; }
/* "All days" gets the full width under the days, and its time box shrinks instead of sliding over the label */
.week-grid-days li.all-days { grid-column: 1 / -1; grid-template-columns: max-content minmax(0, 160px) max-content;
  justify-content: start; }
.week-grid-days li.all-days input[type=time] { width: 100%; min-width: 0; justify-self: stretch; }
@media (max-width: 380px) {  /* the smallest phones: the label on its own line, the time box and Apply under it */
  .week-grid-days li.all-days { grid-template-columns: minmax(0, 1fr) max-content; }
  .week-grid-days li.all-days .all-label { grid-column: 1 / -1; }
  .week-grid-days li.all-days input[type=time] { max-width: none; }
}
/* ---------- the smallest phones (320px: the first iPhone SE, Galaxy S9+) ---------- */
/* close-out rows: the name beside its avatar uses the whole row; the role list starts under the switch, so it has room */
@media (max-width: 520px) {
  .roster .who { grid-column: 2 / -1; }
  .roster select { grid-column: 1 / 3; }
}
/* a card's subtitle wraps instead of pushing the page sideways (Ask about your tips) */
.panel-head > .small.muted { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
/* location cards are never wider than the screen */
.loc-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
/* the role presets: the list and its button each get a full line when they can't share one */
@media (max-width: 360px) {
  .role-preset { flex-wrap: wrap; }
  .role-preset select, .role-preset .btn { flex: 1 1 100%; width: 100%; }
}

/* a payout run's steps (Render Workflows), oldest first, each with its time */
.run-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.run-steps li { display: grid; grid-template-columns: 10px auto 1fr; gap: 4px 10px; align-items: baseline; font-size: .92rem; }
.run-steps li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--go); transform: translateY(-1px); }
.run-steps li.wait::before { background: var(--wait); }
.run-steps li.bad::before { background: var(--void); }
.run-steps time { font: 500 .78rem var(--mono); opacity: .7; white-space: nowrap; }
/* a short list of names and values (Platform: Render) */
.kv { margin: 0; display: grid; gap: 6px; }
.kv > div { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 12px; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv > div { grid-template-columns: 1fr; gap: 0; } }

/* the closed demo tour: a slim tab on the right edge, off the page's content (opened, it's the panel in the corner) */
@media (min-width: 641px) {
  .tour:not([open]) { right: 0; bottom: auto; top: 50%; transform: translateY(-50%); width: auto; max-width: none;
    border-radius: 6px 0 0 6px; border-top: 1px solid var(--hair); border-right: 0; border-left: 4px solid var(--marker); }
  .tour:not([open]) summary { writing-mode: vertical-rl; transform: rotate(180deg); padding: 14px 8px; gap: 10px; }
  .tour:not([open]) summary::after { display: none; }
  .tour:not([open]) .tour-title { font-size: .9rem; }
  body:has(.save-bar) .tour:not([open]), body:has(.sticky-bar) .tour:not([open]) { bottom: auto; }
  .main:has(.tour) { padding-bottom: 0; }
}

/* sign-in, sign-up and the other account pages: the way back to the home page, next to the name */
.auth-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.auth-home { font-size: .9rem; color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }
.auth-home:hover { color: var(--ink); }

.auth-home-short { display: none; }
@media (max-width: 400px) { .auth-home-long { display: none; } .auth-home-short { display: inline; } }

/* ---------- sign-in, sign-up and the other account pages: the staff entrance ----------
   The whole page is a restaurant at night; the form is a printed tip-out receipt with torn edges, and the
   "just looking?" box is its tear-off stub. */
.login, :root[data-theme="dark"] .login { position: relative; isolation: isolate; background: #0b0c0b url("../img/auth-night.f4ff7ca65efe.webp") 62% center / cover no-repeat; }
.login::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(95deg, rgba(8, 8, 9, .93) 0%, rgba(8, 8, 9, .72) 40%, rgba(8, 8, 9, .45) 62%, rgba(8, 8, 9, .62) 100%); }
.login .left, :root[data-theme="dark"] .login .left, .login .right, :root[data-theme="dark"] .login .right { background: transparent; }
.login .left { color: #f6f0e4; }
.login .left h1 { color: #f6f0e4; text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.login .left p, .login .left .legal-links a { color: rgba(246, 240, 228, .8); }
.login .left .brand, .login .left .brand b { color: #f6f0e4; }
.login .left .auth-home { color: rgba(246, 240, 228, .85); }
.login .left .auth-home:hover { color: #fff; }
.login .left .receipt-wrap { display: none; }

/* the receipt: cream paper, torn top and bottom, a printed header; light colours inside whatever the theme */
.login .right > :first-child, .login .right > .demo-box {
  --paper: #fbf8f1; --thermal: #fbf8f1; --ink: #161512; --graphite: #5f5b53; --hair: #d8d1c2; --hair-soft: #e8e2d5; --steel-1: #f3eee3;
  position: relative; width: 100%; max-width: 410px; color: var(--ink); background: var(--paper);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
}
.login .right > :first-child {
  --zz: 7px; padding: 30px 28px 30px; border-radius: 0;
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--zz)) 51% repeat-x,
                conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zz)) 51% repeat-x;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--zz)) 51% repeat-x,
        conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zz)) 51% repeat-x;
}
.login .right > :first-child::before { content: "TIPPOOL · STAFF ENTRANCE"; display: block; margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 2px dashed var(--hair); text-align: center; font: 700 .72rem/1 var(--mono, ui-monospace, monospace); letter-spacing: .28em; color: var(--graphite); }
.login .right > :first-child h2 { margin-top: 0; }
/* the stub: torn along the top like a ticket that came off the roll */
.login .right > .demo-box { --zz: 6px; margin-top: 10px; border: 0; border-radius: 0; padding: 18px 20px 16px;
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--zz)) 51% repeat-x,
                linear-gradient(#000, #000) bottom / 100% 51% no-repeat;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--zz)) 51% repeat-x,
        linear-gradient(#000, #000) bottom / 100% 51% no-repeat; }
.login .right { align-content: center; justify-items: center; }

/* phones: the photo stays behind; a slim bar with the name and the way home, then the receipt fills the screen */
@media (max-width: 860px) {
  .login { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background-position: 58% center; }
  .login::before { background: linear-gradient(180deg, rgba(8, 8, 9, .9) 0%, rgba(8, 8, 9, .55) 30%, rgba(8, 8, 9, .8) 100%); }
  .login .left { display: contents; }
  .login .left > div:not(.auth-top), .login .left .receipt-wrap { display: none; }
  .login .auth-top { order: 0; padding: 14px 18px 4px; color: #f6f0e4; }
  .login .auth-top .brand, .login .auth-top .brand b { color: #f6f0e4; }
  .login .auth-top .auth-home { color: rgba(246, 240, 228, .88); }
  .login .right { order: 1; flex: 1; padding: 10px 12px 14px; place-items: center; align-content: center; }
  .login .right > :first-child { padding: 22px 18px 22px; }
  .login .right > :first-child::before { margin-bottom: 12px; padding-bottom: 10px; }
  .login .right form.stack > * + * { margin-top: 12px; }
  .login .right > .demo-box { margin-top: 8px; padding: 14px 16px 12px; gap: 8px; }
}
/* short phones (an iPhone SE): the stub keeps its button and the staff link, not the explanation */
@media (max-width: 860px) and (max-height: 700px) {
  .login .right > .demo-box > div .small { display: none; }
  .login .right form.stack > * + * { margin-top: 9px; }
  .login .right > :first-child::before { margin-bottom: 8px; padding-bottom: 8px; }
  .login .right > :first-child { padding: 18px 16px; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .login .auth-top { padding: 10px 16px 0; }
  .login .right { padding: 6px 10px 10px; }
  .login .right > :first-child h2 { font-size: 1.5rem; }
  .login .right > .demo-box { padding: 10px 14px 10px; }
}
/* the account pages fill the whole width: no space kept for a scrollbar they don't need */
html:has(.login) { scrollbar-gutter: auto; }
/* wider screens: the way home sits beside the name as a small chip, not floating in the middle of the page */
@media (min-width: 861px) {
  .login .auth-top { justify-content: flex-start; gap: 22px; }
  .login .left .auth-home { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid rgba(246, 240, 228, .3);
    border-radius: 999px; text-decoration: none; font-size: .85rem; background: rgba(8, 8, 9, .35); transition: border-color .2s, background-color .2s; }
  .login .left .auth-home:hover { border-color: rgba(246, 240, 228, .7); background: rgba(8, 8, 9, .6); }
}

/* ---------- account pages on laptops and desktops: fit the window, no scrolling ---------- */
@media (min-width: 861px) {
  /* sign-up: a wider receipt with the fields side by side, in two columns */
  .login:has(.signup) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .login .right > form.signup { max-width: 720px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; align-items: start; }
  .login .right > form.signup > * { margin-top: 0; }
  .login .right > form.signup::before, .login .right > form.signup > h2, .login .right > form.signup > p,
  .login .right > form.signup > .flash, .login .right > form.signup > hr, .login .right > form.signup > button,
  .login .right > form.signup > div:has(#password) { grid-column: 1 / -1; }
  .login .right > form.signup > h2 + p { margin-top: -8px; }
  .login .right > form.signup .hint { margin-top: 4px; font-size: .8rem; line-height: 1.35; }
  .login .right > form.signup > div:has(#password) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; align-items: end; }
  .login .right > form.signup > div:has(#password) label { grid-column: 1 / -1; }
  .login .right > form.signup > div:has(#password) .hint { margin: 0 0 10px; }
  .login .right { padding-block: 20px; }
}
/* short windows (a laptop with the browser's bars): tighter receipt, the stub keeps only its button and link */
@media (min-width: 861px) and (max-height: 820px) {
  .login .right { padding-block: 12px; }
  .login .right > :first-child { padding: 20px 26px 22px; }
  .login .right > :first-child::before { margin-bottom: 10px; padding-bottom: 9px; }
  .login .right form.stack > * + * { margin-top: 12px; }
  .login .right > form.signup > * + * { margin-top: 0; }
  .login .right > form.signup { row-gap: 9px; }
  .login .right > .demo-box { padding: 12px 18px 10px; }
  .login .right > .demo-box > div .small { display: none; }
  .login .left { padding-block: 28px; }
  .login .left h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); }
}
@media (min-width: 861px) and (max-height: 660px) {
  .login .right > form.signup > div .hint { display: none; }  /* the field hints, not the Terms line */
  .login .right { padding-block: 6px; }
  .login .right > form.signup > div:has(#password) { display: block; }
}
/* the account pages never show a scrollbar; on an unusually short screen the page still scrolls by wheel, trackpad or touch */
html:has(.login) { scrollbar-width: none; }
html:has(.login)::-webkit-scrollbar, body:has(.login)::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* tablets in portrait (an iPad): sign-up in two columns too, so its receipt fits the screen */
@media (min-width: 600px) and (max-width: 860px) {
  .login .right > form.signup { max-width: 640px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: start; }
  .login .right > form.signup > * { margin-top: 0; }
  .login .right > form.signup::before, .login .right > form.signup > h2, .login .right > form.signup > p, .login .right > form.signup > .flash,
  .login .right > form.signup > hr, .login .right > form.signup > button, .login .right > form.signup > div:has(#password) { grid-column: 1 / -1; }
  .login .right > form.signup .hint { margin-top: 4px; font-size: .8rem; line-height: 1.35; }
}

/* touch screens: the small text links ("← Home", "← Back") get a finger-sized hit area (24px+), same look */
@media (pointer: coarse) {
  .auth-home { padding-block: 6px; }
  .back { padding-block: 6px; margin-top: -6px; margin-bottom: 6px; }
}

/* ---------- interactive tables (AG Grid Community, static/js/grids.js) ---------- */
.grid-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--hair-soft); }
.grid-search { flex: 1 1 220px; max-width: 320px; }
.grid-count { margin-left: auto; }
.tp-grid { width: 100%; }
.tp-grid.tall { height: min(680px, 78vh); }
.tp-grid .grid-row-link { cursor: pointer; }
.tp-grid .grid-strong { font-weight: 700; }
.tp-grid .grid-mono { font-family: var(--mono); font-size: .88em; }
.tp-grid .grid-total { font-weight: 700; background: var(--steel-1); }
.tp-grid .ag-cell { font-variant-numeric: tabular-nums; }
.tp-grid .ag-cell a { color: var(--ink); }
@media (max-width: 640px) { .grid-tools { padding: 10px 14px; } .grid-search { max-width: none; } .grid-count { margin-left: 0; } }
/* printing: the plain table, not the grid */
@media print { .table-wrap[hidden] { display: block !important; } .grid-tools, .tp-grid { display: none !important; } }
/* short grids end at their last row (no blank strip); wrapped text keeps normal line spacing */
.tp-grid .ag-grid-scrolling-rows.ag-layout-auto-height { min-height: 48px !important; }  /* one row: room for "Nothing matches" */
.tp-grid .ag-cell-wrap-text { line-height: 1.45; padding-top: 11px; padding-bottom: 11px; word-break: normal; overflow-wrap: anywhere; }
/* a long word with no spaces (an email, a long name) wraps instead of pushing the page sideways on phones */
.changes td, .tent-label, .tent-how, .team-rows strong { overflow-wrap: anywhere; }
.team-rows li > div, .changes td { min-width: 0; }
