/* DSB Blend - Durbanville Wine Safari style: navy / orange / cream. Big type for events, daylight and tired eyes. */
:root { --navy: #0f2440; --orange: #e8573a; --cream: #fbf6ec; --ink: #13233a; --muted: #5d6b7c; --ok: #1f8a4c; --line: #e4dccb; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 20px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: calc(108px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left)); border-bottom: 5px solid var(--orange); }
.logo { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.brand { flex: 1; min-width: 0; line-height: 1.1; }
.brand b { display: block; font-size: 26px; letter-spacing: .06em; }
.brand span { display: block; font-size: 14px; color: #c9d8e8; margin-top: 3px; }
.guest { flex: none; text-align: center; background: var(--orange); border-radius: 12px; padding: 4px 12px 6px; min-width: 76px; }
.guest span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.guest b { display: block; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
main { max-width: 640px; margin: 0 auto; padding: 14px 12px 0; }
.row-count { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: flex; flex: 1 1 auto; border: 3px solid var(--navy); border-radius: 14px; overflow: hidden; background: #fff; }
.seg button { flex: 1; min-height: 60px; border: 0; background: #fff; font-size: 20px; font-weight: 800; color: var(--navy); }
.seg button + button { border-left: 3px solid var(--navy); }
.seg button[aria-checked="true"] { background: var(--navy); color: #fff; }
.link { border: 0; background: none; color: var(--navy); text-decoration: underline; font-size: 18px; font-weight: 700; min-height: 48px; padding: 0 6px; }
.cards { display: grid; gap: 12px; margin-top: 14px; }
.card { background: #fff; border: 3px solid var(--navy); border-left: 14px solid var(--c); border-radius: 16px; padding: 10px 12px 12px; }
.card-h { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.num { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; }
.name { font-size: 26px; font-weight: 800; }
.name-in { flex: 1; min-width: 0; font-size: 24px; font-weight: 700; padding: 6px 10px; min-height: 52px; border: 3px solid var(--orange); border-radius: 10px; background: #fffaf2; }
.ctl { display: grid; grid-template-columns: 76px 1fr 76px; gap: 10px; margin-top: 8px; align-items: stretch; }
.step { min-height: 72px; border: 3px solid var(--navy); border-radius: 14px; background: #fff; color: var(--navy); font-size: 26px; font-weight: 900; }
.step:active { background: var(--navy); color: #fff; }
.pct { position: relative; display: block; }
.pct input { width: 100%; height: 72px; text-align: center; font-size: 44px; font-weight: 900; border: 3px solid var(--navy); border-radius: 14px; background: #fff;
  padding: 0 34px 0 8px; font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; }
.pct input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(232, 87, 58, .25); }
.pct span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 800; color: var(--muted); pointer-events: none; }
.pct.bad input { border-color: #c0262d; background: #fff1f0; }
.total { margin-top: 14px; background: #fff; border: 3px solid var(--navy); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; }
.total-line { display: flex; align-items: baseline; justify-content: space-between; }
.total-line span { font-weight: 800; letter-spacing: .1em; color: var(--muted); font-size: 18px; }
.total-line b { font-size: 40px; font-variant-numeric: tabular-nums; }
.total-msg { font-size: 21px; font-weight: 700; }
.total.is-off { border-color: var(--orange); background: #fff4ef; }
.total.is-off .total-msg, .total.is-off .total-line b { color: #b8371d; }
.total.is-ok { border-color: var(--ok); background: #eaf7ef; }
.total.is-ok .total-msg, .total.is-ok .total-line b { color: var(--ok); }
.btn { min-height: 60px; border-radius: 14px; border: 3px solid var(--navy); background: var(--navy); color: #fff; font-size: 20px; font-weight: 900; letter-spacing: .04em; padding: 0 18px; }
.btn.ghost { background: #fff; color: var(--navy); }
.btn.danger { background: #fff; color: #b8371d; border-color: #b8371d; }
.btn[hidden] { display: none; }
.results { margin-top: 16px; }
.results .wait { text-align: center; color: var(--muted); font-size: 18px; padding: 18px 10px; border: 3px dashed #cdbfa5; border-radius: 16px; margin: 0; }
.results h2 { font-size: 20px; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin: 4px 2px 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step-li { background: #fff; border: 3px solid var(--navy); border-left: 14px solid var(--c); border-radius: 16px; padding: 10px 14px 12px; }
.s-h { display: flex; align-items: center; gap: 10px; }
.s-h .num { background: var(--c); }
.s-name { font-size: 24px; font-weight: 800; }
.s-pour { font-size: 22px; margin-top: 4px; color: var(--ink); }
.s-pour b { font-variant-numeric: tabular-nums; }
.s-fill { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.s-fill span { font-size: 20px; font-weight: 900; letter-spacing: .08em; color: var(--orange); }
.s-fill b { font-size: 64px; line-height: 1.05; font-weight: 900; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.s-fill .u { font-size: 28px; color: var(--navy); letter-spacing: 0; }
.s-mark { font-size: 18px; color: var(--muted); font-weight: 600; }
.s-mark b { color: var(--ok); }
.step-li.skip { opacity: .6; }
.s-skip { font-size: 20px; color: var(--muted); margin-top: 4px; }
.cyl { display: block; width: 100%; max-width: 420px; margin: 16px auto 0; background: #fff; border: 3px solid var(--navy); border-radius: 16px; }
.cyl .t-s { font: 700 16px system-ui, sans-serif; fill: var(--muted); }
.cyl .t-b { font: 900 24px system-ui, sans-serif; }
.cyl .t-x { font: 900 14px system-ui, sans-serif; fill: var(--orange); letter-spacing: .08em; }
.warn, .set-warn { color: #b8371d; font-weight: 700; font-size: 18px; }
.settings { margin-top: 22px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.settings summary { min-height: 52px; display: flex; align-items: center; font-weight: 800; font-size: 19px; color: var(--navy); cursor: pointer; }
.set-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.set-grid label { font-size: 15px; font-weight: 700; color: var(--muted); display: grid; gap: 4px; }
.set-grid input { min-height: 52px; font-size: 22px; font-weight: 800; border: 2px solid var(--navy); border-radius: 10px; padding: 0 10px; width: 100%; }
.set-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.fine { font-size: 15px; color: var(--muted); }
.foot { text-align: center; font-size: 14px; color: var(--muted); margin: 18px 0 8px; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; background: #fff;
  padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-top: 4px solid var(--navy); box-shadow: 0 -6px 18px rgba(15, 36, 64, .15); }
.bar .btn { min-height: 68px; font-size: 22px; }
.bar .clear { background: #fff; color: var(--navy); }
.bar .next { background: var(--orange); border-color: var(--orange); }
@media (min-width: 700px) { .bar { max-width: 640px; margin: 0 auto; border-radius: 16px 16px 0 0; } }
.hint { position: fixed; left: 12px; right: 12px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 8; background: var(--navy); color: #fff; border-radius: 16px;
  padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.hint[hidden] { display: none; }
.hint p { margin: 0; font-size: 17px; flex: 1; }
.hint p > b:first-child { display: block; font-size: 19px; margin-bottom: 4px; }
.hint .in { color: #ffd2c6; }
.hint .share-ic { display: inline-flex; vertical-align: -4px; }
.hint .btn { background: var(--orange); border-color: var(--orange); min-height: 52px; }
.toast { position: fixed; left: 50%; top: calc(86px + env(safe-area-inset-top)); transform: translate(-50%, -16px); opacity: 0; transition: .2s; z-index: 9;
  background: var(--navy); color: #fff; font-weight: 800; padding: 12px 18px; border-radius: 12px; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 360px) { .ctl { grid-template-columns: 64px 1fr 64px; } .pct input { font-size: 38px; } .s-fill b { font-size: 56px; } .brand b { font-size: 22px; } }
