/* ScreenWorks — a print-led, high-contrast operations desk. No external assets. */
:root {
  --ink: #161616; --muted: #686868; --line: #d5d5d5; --bg: #f6f6f6;
  --white: #fff; --nav: #111; --teal: #161616; --mint: #e2fb55;
  --pale: #eff4de; --danger: #a12835; --amber: #745000;
  font-family: "Segoe UI", Arial, sans-serif; font-size: 16px; color: var(--ink); background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 4px; }
button { cursor: pointer; border: 1px solid #1a1a1a; background: #fff; color: #161616; border-radius: 0; padding: 11px 16px; font-size: .8125rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 9px; line-height: 1.4; }
button:hover { background: #e2fb55; border-color: #161616; }
button:disabled { cursor: not-allowed; opacity: .45; }
button.primary { background: #151515; color: #fff; }
button.primary:hover { background: #343434; }
button.danger { color: var(--danger); border-color: #b7656e; }
button.small { padding: 6px 10px; font-size: .75rem; }
button.ghost { border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; }
button.ghost:hover { text-decoration: underline; text-underline-offset: 5px; }
a { color: inherit; text-underline-offset: 4px; }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
h1,h2,h3,p { margin: 0; }
h1 { font-family: "Arial Black", "Segoe UI", sans-serif; font-size: 3.25rem; line-height: 1.05; letter-spacing: -.06em; font-weight: 900; }
h2 { font-size: 1.0625rem; font-weight: 750; letter-spacing: -.025em; }
h3 { font-size: 1rem; font-weight: 650; }
p { line-height: 1.65; }
.muted { color: var(--muted); }
.meta { font-size: .8125rem; color: var(--muted); }
.mono { font-family: Consolas, "Courier New", monospace; font-variant-numeric: tabular-nums; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 650; color: var(--muted); }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.shell { min-height: 100vh; }
.masthead { background: #111; color: #fff; padding: 26px max(32px,calc((100vw - 1360px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 20px; }
.wordmark { font-family: "Arial Black", "Segoe UI", sans-serif; font-size: 1.75rem; line-height: 1; letter-spacing: -.065em; font-weight: 900; }
.wordmark span { color: #e2fb55; }
.brand-caption { border-left: 1px solid #555; padding-left: 20px; font-family: Consolas,monospace; font-size: .6875rem; line-height: 1.6; letter-spacing: .07em; color: #bcbcbc; }
.controls { display: flex; gap: 23px; align-items: center; }
.local { color: #c1c1c1; font-size: .75rem; }
.profile { display: flex; align-items: center; gap: 9px; }
.avatar { display: none; }
.role { color: #fff; background: #111; border: 1px solid #656565; border-radius: 0; padding: 9px 12px; max-width: 175px; font-size: .8125rem; }
.nav-wrap { background: #fff; border-bottom: 1px solid #bdbdbd; display: flex; justify-content: space-between; padding: 0 max(32px,calc((100vw - 1360px)/2)); gap: 20px; }
.main-nav { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: thin; }
.navitem { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; color: #6b6b6b; padding: 19px 0 16px; border-bottom: 3px solid transparent; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.navitem .nav-number { font-size: .6875rem; font-family: Consolas,monospace; color: #929292; margin-right: 3px; }
.navitem.active { color: #111; border-bottom-color: #111; }
.navitem:hover { color: #111; }
.navitem .count { font: 600 .6875rem Consolas,monospace; background: #e2fb55; color: #111; padding: 2px 5px; }
.nav-utility { border: 0; background: none; white-space: nowrap; font-size: .75rem; color: #666; padding: 0; }
.main { padding: 24px 32px 40px; max-width: 1424px; margin: auto; }
.demo-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 33px; font-size: .75rem; color: #757575; }
.demo-strip span:first-child { display: flex; align-items: center; gap: 10px; }
.demo-label { font-family: Consolas,monospace; color: #333; font-size: .6875rem; border: 1px solid #b3b3b3; padding: 3px 6px; letter-spacing: .025em; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.pagehead p { margin-top: 13px; font-size: .9375rem; color: var(--muted); }
.headtools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.headtools button.primary { background: #e2fb55; color: #111; border-color: #111; }
.headtools button.primary:hover { background: #d4ed45; }
.weekselect { background: transparent; border: 0; border-bottom: 1px solid #222; border-radius: 0; padding: 11px 26px 11px 0; min-width: 175px; font: .8125rem Consolas,monospace; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin-bottom: 32px; border: 1px solid #bdbdbd; background: #fff; }
.stat { padding: 22px 25px; position: relative; border-right: 1px solid #d5d5d5; }
.stat:last-child { border-right: 0; }
.stat .label { font-family: Consolas,monospace; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #666; }
.stat .value { font-size: 2.7rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.055em; margin: 22px 0 13px; }
.stat .stat-icon { display: none; }
.stat.featured { background: #111; color: #fff; border: 0; }
.stat.featured .label, .stat.featured .meta { color: #bfbfbf; }
.stat.featured .value { color: #e2fb55; }
.stat small { font-size: .75rem; }
.grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(290px,1fr); gap: 28px; }
.panel { background: #fff; border: 1px solid #d3d3d3; overflow: hidden; }
.panelhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 23px; border-bottom: 1px solid #d3d3d3; border-top: 2px solid #222; }
.panelbody { padding: 23px; }
.section-gap { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.stack { display: grid; gap: 16px; }
.badge { display: inline-flex; align-items: center; border: 1px solid #d7d7d7; border-radius: 0; padding: 3px 6px; font-size: .6875rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 650; background: #f6f6f6; color: #555; white-space: nowrap; }
.badge.green,.badge.accepted,.badge.paid { color: #32602b; background: #f0f5e7; border-color: #c5d5ac; }
.badge.pending,.badge.owed { color: #775419; background: #faf3df; border-color: #dfd0a8; }
.badge.rejected,.badge.revoked { color: #9d3344; background: #fbf0f1; border-color: #e2bec4; }
.badge.invited { color: #405c8d; background: #edf1f7; border-color: #c1cbdd; }
.badge.closed { color: #616161; background: #f3f3f3; }
.actionrow { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid #ddd; }
.actionrow:first-child { padding-top: 0; }
.actionrow:last-child { border-bottom: 0; padding-bottom: 0; }
.actionicon { display: none; }
.actionrow h3 { font-size: .9375rem; margin-bottom: 6px; }
.actionrow p { font-size: .8125rem; color: var(--muted); }
.actionrow button { min-width: 114px; }
.progress { display: flex; height: 13px; background: #eee; overflow: hidden; margin: 25px 0; }
.progress span { height: 100%; display: block; }
.legend { display: grid; gap: 13px; }
.legendline { display: flex; align-items: center; gap: 9px; font-size: .875rem; }
.legendline b { margin-left: auto; font-family: Consolas,monospace; }
.dot { height: 8px; width: 8px; background: #111; }
.dot.pending { background: #dfb652; }
.dot.rejected { background: #a0a0a0; }
.tablewrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
th { font-family: Consolas,monospace; font-size: .6875rem; letter-spacing: .045em; text-transform: uppercase; color: #707070; font-weight: 400; background: #f7f7f7; }
td,th { padding: 17px 23px; border-bottom: 1px solid #e0e0e0; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfa; }
td .sub { margin-top: 5px; font-size: .75rem; color: #777; }
.celltitle { font-weight: 600; max-width: 360px; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.alignright { text-align: right; }
.activity { padding: 16px 0; border-bottom: 1px solid #ddd; }
.activity:last-child { border: 0; }
.activity p { font-size: .875rem; }
.activity time { font-size: .75rem; color: #777; font-family: Consolas,monospace; }
.footer { display: flex; justify-content: space-between; gap: 20px; color: #777; font-size: .75rem; margin-top: 34px; padding-top: 18px; border-top: 1px solid #bfbfbf; }
.empty { padding: 42px 22px; text-align: center; }
.empty .icon { width: 30px; height: 30px; color: #888; margin-bottom: 10px; }
.empty p { color: #777; margin: 10px auto 16px; max-width: 400px; font-size: .875rem; }
.field { display: grid; gap: 8px; font-size: .8125rem; font-weight: 650; }
.field input,.field select,.field textarea,input.text-input,select.text-input { width: 100%; border: 1px solid #bdbdbd; border-radius: 0; background: #fff; padding: 11px 12px; color: #161616; font-weight: 400; min-height: 44px; }
.field textarea { min-height: 125px; resize: vertical; }
.field small { color: #777; font-size: .75rem; font-weight: 400; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full { grid-column: 1/-1; }
.notice { padding: 13px 16px; border-left: 3px solid #555; background: #f1f1f1; color: #555; font-size: .875rem; line-height: 1.6; }
.notice.warning { background: #faf4e2; border-color: #c8a744; color: #725600; }
.notice.error { background: #fbeff1; border-color: #b4495c; color: #992239; }
.error-text { font-size: .875rem; color: var(--danger); }
.uploadbox { border: 1px dashed #aaa; padding: 22px; text-align: center; background: #fafafa; }
.uploadbox input { max-width: 100%; font-size: .8125rem; margin-top: 13px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input { max-width: 320px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid #bbb; width: fit-content; margin-bottom: 25px; max-width: 100%; overflow-x: auto; }
.tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: #777; padding: 12px 20px; white-space: nowrap; }
.tabs button.selected { border-bottom-color: #111; color: #111; background: #e2fb55; }
.rates { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.ratehead { padding: 22px; border-bottom: 1px solid #ccc; border-top: 2px solid #111; background: #f8f8f8; }
.ratehead p { font-size: .8125rem; color: #777; margin-top: 7px; }
.rate { padding: 23px 22px; border-bottom: 1px solid #ddd; }
.rate:last-child { border: 0; }
.rate strong { font-size: 2rem; font-weight: 650; color: #111; letter-spacing: -.05em; }
.rate p { font-size: .8125rem; color: #777; margin-top: 12px; }
.scanbox { padding: 30px; }
.scanentry { display: flex; gap: 10px; margin: 20px 0; }
.scanentry input { flex: 1; min-width: 0; }
.scanresult { border: 1px solid #ccc; padding: 28px; margin-top: 24px; text-align: center; background: #f5f5f5; }
.scanresult.pull { background: #e2fb55; border-color: #111; }
.scanresult.leave { background: #f8f0d9; border-color: #dac88c; }
.scanresult h2 { font-size: 1.75rem; margin-bottom: 8px; font-weight: 800; }
.scanresult p { font-size: .9375rem; }
.bigmoney { font-size: 3.25rem; letter-spacing: -.055em; font-weight: 600; font-variant-numeric: tabular-nums; }
.payout-hero { background: #111; color: #fff; padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; border-left: 8px solid #e2fb55; }
.payout-hero .muted { color: #bcbcbc; }
.payout-hero .bigmoney { color: #e2fb55; margin: 12px 0; }
.history-card { margin-bottom: 16px; }
.history-card summary { cursor: pointer; list-style: none; padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.history-card summary::-webkit-details-marker { display: none; }
.history-card summary h3 { margin-bottom: 8px; }
.history-card summary::after { content: "+"; font-size: 1.3rem; color: #777; }
.history-card[open] summary::after { content: "−"; }
.inline-label { font-size: .8125rem; color: #777; display: flex; gap: 8px; align-items: center; }
.code { background: #f0f0f0; border: 1px solid #ccc; padding: 5px 8px; font-family: Consolas,monospace; letter-spacing: .05em; }
.rulesform { display: grid; grid-template-columns: minmax(140px,1fr) repeat(7,minmax(70px,1fr)) auto; gap: 14px; align-items: end; }
dialog { border: 1px solid #111; border-radius: 0; padding: 0; width: min(600px,calc(100% - 32px)); max-height: 90vh; color: #161616; box-shadow: 12px 12px 0 #0002; }
dialog::backdrop { background: #0009; }
.dialogbody { padding: 25px; }
.dialoghead { padding: 20px 25px; border-bottom: 1px solid #ccc; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dialogactions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
#toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; border-left: 5px solid #e2fb55; padding: 14px 22px; font-size: .875rem; opacity: 0; pointer-events: none; z-index: 50; max-width: calc(100% - 30px); }
#toast.show { opacity: 1; }
.hidden { display: none!important; }
.split-total { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.stepnote { display: flex; gap: 12px; align-items: flex-start; padding: 15px 0; }
.stepnote .step { width: 24px; height: 24px; display: grid; place-items: center; background: #111; color: #fff; font: .75rem Consolas,monospace; flex-shrink: 0; }
.stepnote p { font-size: .875rem; }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; }
.light-line { height: 1px; background: #ddd; margin: 20px 0; }
@media(max-width:1100px) {
  .brand-caption { display: none; } .main-nav { gap: 20px; } .navitem .nav-number { display: none; }
  .grid { grid-template-columns: 1fr; } .rates { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px; } .stat .value { font-size: 2.25rem; } .rulesform { grid-template-columns: 1fr 1fr; }
}
@media(max-width:760px) {
  .masthead { padding: 20px; flex-wrap: wrap; gap: 18px; } .wordmark { font-size: 1.5rem; }
  .controls { gap: 12px; margin-left: auto; } .local { display: none; } .role { max-width: 148px; font-size: .75rem; padding: 8px; }
  .nav-wrap { padding: 0 20px; gap: 0; } .main-nav { gap: 22px; } .nav-utility { display: none; }
  .navitem { padding: 15px 0 12px; font-size: .8125rem; } .main { padding: 20px; }
  .demo-strip { font-size: .6875rem; margin-bottom: 27px; } .demo-strip .meta { display: none; }
  .demo-strip span:first-child { align-items: flex-start; } .demo-label { white-space: nowrap; }
  .pagehead { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 25px; }
  h1 { font-size: 2.5rem; } .pagehead p { font-size: .875rem; margin-top: 12px; }
  .headtools { width: 100%; gap: 13px; } .headtools .weekselect { min-width: 155px; flex: 1; }
  .stats { grid-template-columns: 1fr 1fr; margin-bottom: 25px; } .stat { padding: 20px 17px; }
  .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid #ccc; }
  .stat .value { font-size: 2.15rem; margin: 20px 0 11px; } .stat .meta { font-size: .75rem; }
  .stat .label { font-size: .6875rem; } .grid { gap: 22px; } .panelhead,.panelbody { padding: 19px; }
  .rates,.formgrid { grid-template-columns: 1fr; } .full { grid-column: auto; }
  .payout-hero { align-items: flex-start; flex-direction: column; padding: 24px; }
  .scanbox { padding: 20px; } .scanentry { flex-wrap: wrap; } .scanentry input { flex-basis: 100%; }
  .footer { flex-direction: column; gap: 9px; } .actionrow { gap: 16px; align-items: flex-start; }
  .actionrow button { min-width: 94px; padding: 9px 11px; font-size: .75rem; }
  td,th { padding: 14px 17px; } .rulesform { grid-template-columns: 1fr 1fr; }
  .toolbar .row { flex-wrap: wrap; } .history-card summary { padding: 18px; gap: 12px; }
  .history-card summary .bigmoney { font-size: 1.4rem; } .tabs button { padding: 12px 15px; }
}
@media(max-width:400px) {
  .masthead { gap: 13px; } .controls { width: 100%; margin-left: 0; } .role { max-width: none; }
  .headtools { flex-direction: column; align-items: stretch; } .headtools .weekselect { width: 100%; }
  .actionrow { flex-wrap: wrap; } .stat .value { font-size: 1.85rem; }
}
@media(prefers-reduced-motion:reduce) { * { animation:none!important; transition:none!important; } }

/* Core controls retain readable sizing; small type is reserved for metadata. */
button, .navitem, .role, .field { font-size: .875rem; }
button.small { font-size: .8125rem; }
@media(max-width:760px){.navitem,.field,.role{font-size:.875rem}.actionrow button{font-size:.8125rem}.main-nav{gap:20px}}

.account-name{color:#fff;font-size:.875rem}.controls button{background:transparent;color:#fff;border-color:#777}
.demo-strip button{color:inherit}.auth-shell{min-height:100vh;display:grid;grid-template-columns:42% 58%;background:#fff}
.auth-brand{background:#111;color:#fff;padding:54px;display:flex;flex-direction:column;align-items:flex-start}
.auth-brand .wordmark{font-size:clamp(24px,3vw,48px);letter-spacing:-2px}.auth-brand .wordmark span{color:#d7ff37}
.auth-kicker{font-size:14px;letter-spacing:2px;margin-top:18px}.auth-bottom{margin-top:auto;padding-top:100px;font-weight:900;font-size:clamp(30px,4vw,62px);line-height:1.06;letter-spacing:-2px}
.auth-brand>.meta{color:#a6a6a6;margin-top:28px}.auth-content{display:grid;place-items:center;padding:50px 32px}.auth-card{width:100%;max-width:430px}
.auth-card h1{margin:20px 0 16px;font-size:36px;line-height:1.1}.auth-card .eyebrow{font-size:14px;font-weight:800;letter-spacing:1.3px}
.auth-card .field{gap:8px}.auth-card input{padding:13px 14px}.auth-card button.primary{min-height:48px}.auth-card .muted{font-size:16px;line-height:1.6}
.auth-loading{padding:60px;font-size:20px}.auth-card small{color:#555;font-size:13px}.field small{font-weight:400;line-height:1.5}
@media(max-width:760px){.auth-shell{grid-template-columns:1fr}.auth-brand{padding:25px}.auth-brand .wordmark{font-size:32px}.auth-bottom,.auth-brand>.meta{display:none}.auth-kicker{margin-top:8px;font-size:12px}.auth-content{padding:32px 24px 50px;align-items:start}.auth-card h1{font-size:30px}.account-name{font-size:12px}.controls{flex-wrap:wrap}}

.payout-history{font-family:inherit;font-size:.8125rem;line-height:1.5;font-weight:400;min-width:170px;max-width:300px;text-align:left;white-space:normal;margin-top:8px;overflow-wrap:anywhere}.payout-history summary{cursor:pointer;text-decoration:underline}.payout-history p{margin:12px 0}
/* v2.5: notices, buyer rules, shipping, help, packing slip */
.noticebar { margin: 0 0 24px; gap: 10px; }
.notice.deadline { background: #111; color: #fff; border-color: #d7ff37; }
.notice.deadline strong { color: #d7ff37; }
.row.wrap { flex-wrap: wrap; align-items: flex-end; }
.row.wrap select, .row.wrap input:not([type=checkbox]) { min-height: 44px; padding: 0 12px; border: 1px solid #cfcfcf; background: #fff; font: inherit; }
.row.wrap input[name=number] { flex: 1 1 200px; }
.buyinggrid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.buyinggrid p { font-size: .875rem; margin-top: 8px; }
.buyinggrid details summary, .faq summary { cursor: pointer; font-weight: 700; font-size: .875rem; margin-top: 8px; }
.shipgrid { grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); }
.shipto { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.shipto pre { margin: 0; font: .9375rem/1.5 Consolas,monospace; background: #f1f1f1; padding: 12px 14px; white-space: pre-wrap; flex: 1 1 200px; }
.rhythm { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.checklist { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .875rem; }
.faq { border-top: 1px solid #e3e3e3; padding: 12px 0 4px; }
.faq p { font-size: .875rem; margin-top: 8px; }
.buyingset { border: 1px solid #e3e3e3; padding: 16px; display: grid; gap: 12px; }
.buyingset legend { font-weight: 700; padding: 0 6px; }
.buyingset textarea { font: .875rem Consolas,monospace; }
#print-slip { display: none; }
@media(max-width:1100px){ .rhythm{grid-template-columns:1fr 1fr} }
@media(max-width:760px){ .buyinggrid,.shipgrid,.rhythm{grid-template-columns:1fr} }
@media print {
 body.print-slip #app, body.print-slip #modal, body.print-slip #toast { display: none !important; }
 body.print-slip { background: #fff; }
 body.print-slip #print-slip { display: block; color: #000; font: 11pt/1.4 Arial,sans-serif; }
 #print-slip h1 { font-size: 16pt; margin: 0 0 8pt; }
 #print-slip table { width: 100%; border-collapse: collapse; margin: 10pt 0; }
 #print-slip th, #print-slip td { border: 1px solid #999; padding: 4pt 6pt; text-align: left; }
 #print-slip tfoot td { font-weight: 700; }
}

/* ---- Simple phone view (partners on phones) ---- */
.m-only { display: none; }
@media (max-width: 700px) { .m-only { display: inline-flex; } }
body.m-mode { background: var(--bg); }
body.m-mode #toast { bottom: calc(96px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); text-align: center; }
.m-app { min-height: 100vh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); overflow-x: hidden; }
.m-top { background: var(--nav); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; position: sticky; top: 0; z-index: 20; }
.m-top .wordmark { font-size: 1.25rem; }
.m-top-r { display: flex; gap: 6px; }
.m-link { background: transparent; color: #fff; border: 1px solid #555; padding: 8px 10px; font-size: .8125rem; min-height: 40px; }
.m-link:hover { background: #333; color: #fff; }
.m-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.m-sub span:first-child { font-weight: 700; overflow-wrap: anywhere; }
.m-sub select { font-size: 1rem; padding: 8px; border: 1px solid var(--line); background: #fff; max-width: 55%; }
.m-week { color: var(--muted); font-size: .875rem; }
.m-note { margin: 12px 16px 0; padding: 12px 14px; background: #fbf3d8; border-left: 4px solid #c9a227; font-size: .9375rem; line-height: 1.45; }
.m-body { padding: 4px 16px 0; }
.m-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid #161616; padding: 18px 16px; margin-top: 16px; }
.m-card h2 { font-size: 1.125rem; margin: 0; overflow-wrap: anywhere; }
.m-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.m-head span { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.m-field { display: block; font-weight: 700; font-size: .9375rem; margin-top: 16px; }
.m-field input { display: block; width: 100%; margin-top: 8px; font-size: 1.125rem; padding: 14px; border: 2px solid #161616; background: #fff; border-radius: 0; }
#m-cert { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.375rem; letter-spacing: .04em; }
.m-opt { font-weight: 400; color: var(--muted); }
.m-btn { width: 100%; min-height: 56px; font-size: 1.0625rem; margin-top: 12px; }
.m-hint { color: var(--muted); font-size: .875rem; line-height: 1.5; margin: 12px 0 0; }
.m-empty { color: var(--muted); text-align: center; padding: 18px 8px; margin: 0; }
.m-list { display: flex; flex-direction: column; }
.m-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.m-row:first-child { border-top: 0; }
.m-num { color: var(--muted); font-size: .8125rem; min-width: 34px; }
.m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-main strong { font-size: .9375rem; line-height: 1.35; overflow-wrap: anywhere; }
.m-main .mono { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.m-row .mono { font-size: 1.0625rem; color: var(--ink); }
.m-bad { background: #fbeef0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.m-err, .m-reason { color: var(--danger); font-size: .8125rem; line-height: 1.4; }
.m-reason { color: #6a4b00; }
.m-chip { min-width: 58px; min-height: 44px; padding: 6px 10px; font-size: .875rem; border: 2px solid #161616; }
.m-x { min-width: 44px; min-height: 44px; padding: 0; border-color: var(--line); font-size: 1rem; color: var(--muted); }
.m-submit { margin: 4px 0 10px; }
#m-cert::placeholder { font-family: "Segoe UI", Arial, sans-serif; font-size: 1rem; letter-spacing: 0; }
.m-link { white-space: nowrap; }
@media (max-width: 360px) { .m-top { padding: 12px; } .m-top .wordmark { font-size: 1.05rem; } .m-link { padding: 6px 8px; font-size: .75rem; min-height: 36px; } .m-sub { font-size: .875rem; } }
.m-tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.m-tabs button { border: 0; border-top: 4px solid transparent; min-height: 64px; flex-direction: column; gap: 4px; font-size: .875rem; background: #fff; color: var(--muted); }
.m-tabs button.on { border-top-color: #161616; color: var(--ink); background: #fbffe6; }
.m-tabs button b { background: #161616; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: .75rem; }
.m-tabs svg.icon { width: 22px; height: 22px; }
.m-owed { background: #111; color: #fff; margin-top: 16px; padding: 18px 16px; border-left: 6px solid var(--mint); display: flex; flex-direction: column; gap: 4px; }
.m-owed span { font-size: .875rem; color: #ccc; }
.m-owed strong { font-size: 2.25rem; color: var(--mint); line-height: 1.1; }
.m-owed small { color: #ccc; font-size: .8125rem; }
.m-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.m-filter { flex-direction: column; gap: 2px; padding: 8px 4px; min-height: 56px; font-size: .75rem; border-color: var(--line); }
.m-filter b { font-size: 1.0625rem; }
.m-filter.on { background: #161616; color: #fff; border-color: #161616; }
.m-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.m-item:first-child { border-top: 0; }
.m-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; flex-shrink: 0; max-width: 42%; }
.m-side b { font-size: 1.0625rem; }
.m-est { font-size: .8125rem; color: var(--muted); }
.m-estnote { display: block; font-size: .75rem; line-height: 1.3; color: var(--muted); margin-top: 2px; }
.m-ship pre { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f0f0f0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; font-size: .9375rem; }
.m-ship p { margin: 6px 0 0; }
.m-refresh { margin-top: 18px; }
.m-help { margin: 18px 0 0; }
.m-msg:empty { display: none; }
.m-msg { margin-top: 10px; font-size: .9375rem; font-weight: 700; }
.m-ok { color: #2f6b1a; }
.sport-pick.autofilled { outline: 3px solid #e2fb55; }
.m-push-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Home Screen app: install steps and phone polish */
.install-steps { margin: 10px 0 0; padding-left: 22px; }
.install-steps li { margin: 6px 0; }
.ios-glyph { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: #0a84ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) { input, select, textarea { font-size: 16px; } }
.scan-tip { margin: 8px 0 0; font-size: .875rem; line-height: 1.45; color: var(--muted); font-weight: 400; }
.scan-tip strong { color: var(--ink); }
.m-scan { margin-top: 12px; background: #fff; border: 2px solid #161616; color: #161616; }
button svg.icon { vertical-align: -4px; }
/* Live lookup result under a camera-scanned sheet row */
.dq { display: block; margin-top: 3px; font-size: .8125rem; line-height: 1.35; color: var(--muted); font-family: Arial, sans-serif; }
.dq-off { color: #8a5a00; }
