/* The Coffee Stop · guest ordering. Tokens from /ds/tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
.sprite { position: absolute; width: 0; height: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app { max-width: 480px; margin: 0 auto; padding: var(--space-8) var(--space-8) calc(110px + env(safe-area-inset-bottom)); min-height: 100vh; }
/* The slide-in starts 24px to the right; clip it so phones don't widen the layout viewport (and shift the fixed dock). */
.app { overflow-x: clip; }
/* Slide the screen's content in, but only fade the dock: a transformed ancestor would become the
   containing block for the fixed dock, parking it under the content until the slide finished. */
.app > .screen.enter > :not(.dock) { animation: enter .28s ease backwards; }
.app > .screen.enter.back-dir > :not(.dock) { animation-name: enter-back; }
.app > .screen.enter > .dock { animation: fade-in .28s ease backwards; }
@keyframes enter { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border-radius: var(--radius-card); padding: 10px 12px; margin-bottom: var(--space-8); }
.top .logo img { width: 40px; height: 40px; display: block; }
.top .back { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 10px 4px; font: 600 13px var(--font-sans); letter-spacing: 1.12px; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.top .back::before { content: "← "; }
.bag { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; background: var(--ink); color: var(--on-ink); border-radius: var(--radius-button); padding: 9px 10px; font: 600 13px var(--font-sans); text-decoration: none; }
.bag b { background: var(--orange); color: var(--ink); border-radius: var(--radius-round); min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; padding: 0 4px; }
.bag.bump b { animation: bump .4s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* Panels and headlines */
.panel { background: var(--panel); border-radius: var(--radius-card); padding: 18px 14px; margin-bottom: var(--space-8); }
.eyebrow { font-family: var(--font-display); font-size: 16px; letter-spacing: 1px; text-transform: uppercase; text-align: center; margin: 0 0 4px; }
.big { font-family: var(--font-display); font-weight: 400; line-height: .86; text-align: center; margin: 0; letter-spacing: -.5px; }
.big-xl { font-size: clamp(44px, 16vw, 64px); }
.big-lg { font-size: clamp(40px, 13vw, 52px); }
.hang { position: absolute; }
.big .hang, .splash-line .hang { position: absolute; }
.big, .splash-line i { position: relative; }
.lead { font-size: 15px; line-height: 1.45; text-align: center; margin: 10px 0 0; }

/* Category tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.tile { border-radius: var(--radius-card); padding: 16px 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; min-height: 160px; justify-content: center; }
.tile .doodle { width: 76px; height: 76px; }
.tile-name { font-family: var(--font-display); font-size: 40px; line-height: .9; text-transform: uppercase; }
.tile-blurb { font-size: 12px; text-align: center; }
.tone-orange { background: var(--orange); }
.tone-aqua { background: var(--aqua); }
.tone-cream { background: var(--panel); }
.tone-teal { background: var(--ink); color: var(--on-ink); }
.tone-teal .doodle * { stroke: var(--on-ink); }
/* Home screen's pinned "Check out": the one place teal carries orange display type (accent-on-ink). */
.checkout-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-height: 64px; padding: var(--space-8) var(--space-16); border-radius: var(--radius-button); background: var(--ink); color: var(--on-ink); text-decoration: none; transition: transform .15s ease; }
.checkout-btn:hover { transform: translateY(-1px); }
.checkout-btn:focus-visible { outline-color: var(--action); }
.checkout-label { font-family: var(--font-display); font-size: 40px; line-height: 1; text-transform: uppercase; color: var(--accent-on-ink); }
.checkout-sum { font-weight: 600; font-size: 16px; white-space: nowrap; }
.checkout-sum::after { content: " →"; color: var(--accent-on-ink); }
.tone-aqua .tile-blurb { background: var(--panel); border-radius: var(--radius-button); padding: 2px 8px; display: inline-block; }

/* Drink list */
.list-head { display: flex; align-items: center; gap: 10px; border-radius: var(--radius-card); padding: 14px; margin-bottom: var(--space-8); }
.list-head .doodle { width: 56px; height: 56px; flex: none; }
.list-head h1 { font-family: var(--font-display); font-weight: 400; font-size: 56px; line-height: .9; margin: 0; }
.rows { display: flex; flex-direction: column; gap: var(--space-8); }
.row { background: var(--panel); border-radius: var(--radius-card); padding: 14px; display: flex; gap: 12px; align-items: center; text-decoration: none; }
.row .doodle { width: 48px; height: 48px; flex: none; }
.row-text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.row-name { font-family: var(--font-wide); font-stretch: 125%; font-weight: 800; font-size: 20px; letter-spacing: -.8px; line-height: 1.05; }
.row-desc { font-size: 12.5px; line-height: 1.35; }
.row-price { font: 600 14px var(--font-sans); white-space: nowrap; align-self: flex-start; padding-top: 2px; }

/* Wizard */
.item { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.item .doodle { width: 58px; height: 58px; flex: none; }
.item-name { font-family: var(--font-wide); font-stretch: 125%; font-weight: 800; font-size: 26px; letter-spacing: -1px; margin: 0; line-height: 1; }
.item-meta { font-size: 13px; margin: 2px 0 0; }
.item-desc { font-size: 13px; line-height: 1.4; margin: 4px 0 8px; }
.steps { display: flex; gap: 6px; justify-content: center; margin: 2px 0 12px; }
.steps span { width: 26px; height: 6px; border-radius: 0; background: var(--line-soft); }
.steps span.on { background: var(--orange); }
.step-note { font-size: 14px; text-align: center; margin: 8px 0 0; }
.choices { display: grid; gap: var(--space-8); margin-top: 14px; }
.choices.one { grid-template-columns: 1fr; }
.choices.two { grid-template-columns: 1fr 1fr; }
.ch { background: var(--paper); border: var(--border-hairline) solid var(--line-soft); border-radius: var(--radius-button); min-height: 58px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; font: 600 15px var(--font-sans); cursor: pointer; transition: transform .12s ease; }
.ch:active { transform: scale(.97); }
.ch.sel { background: var(--ink); color: var(--on-ink); border-color: var(--ink); animation: tick .25s ease; }
@keyframes tick { 50% { transform: scale(1.04); } }
.ch-note, .ch-price { font-weight: 400; font-size: 12px; margin-top: 2px; }
/* A dependent list as a slider on its host step (e.g. "How sweet?" under the syrups).
   Local sizes: --thumb is the 28px thumb, --target the 44px touch target (the input's height),
   --track the bar's thickness. */
.slider { --thumb: 28px; --target: 44px; --track: 6px; margin-top: var(--space-16); padding: var(--space-12); background: var(--paper); border: var(--border-hairline) solid var(--line-soft); border-radius: var(--radius-button); }
.slider-enter { animation: slider-in .26s ease backwards; }
@keyframes slider-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.slider-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-8); }
/* Display type at the site's small-heading size (as .tip-title and .tilt h3). */
.slider-label { font-family: var(--font-display); font-size: 24px; line-height: 1; text-transform: uppercase; }
.slider-value { font-weight: 600; text-align: right; }
.slider-input { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: var(--target); margin: 0; background: transparent; cursor: pointer; }
.slider-input::-webkit-slider-runnable-track { height: var(--track); background: var(--ink); border-radius: var(--radius-button); }
.slider-input::-moz-range-track { height: var(--track); background: var(--ink); border-radius: var(--radius-button); }
.slider-input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: var(--thumb); height: var(--thumb); margin-top: calc((var(--track) - var(--thumb)) / 2); border-radius: var(--radius-round); background: var(--orange); border: var(--border-rule) solid var(--ink); }
.slider-input::-moz-range-thumb { box-sizing: border-box; width: var(--thumb); height: var(--thumb); border-radius: var(--radius-round); background: var(--orange); border: var(--border-rule) solid var(--ink); }
.slider-input:active::-webkit-slider-thumb { transform: scale(1.08); }
.slider-stops { position: relative; list-style: none; margin: 0; padding: 0; height: 1.4em; }
.slider-stops li { position: absolute; top: 0; left: calc(var(--thumb) / 2 + var(--at) * (100% - var(--thumb))); transform: translateX(-50%); white-space: nowrap; }
.slider-stops li:first-child { left: 0; transform: none; }
.slider-stops li:last-child:not(:first-child) { left: auto; right: 0; transform: none; }
.slider-stops li.on { font-weight: 600; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0; }
.stepper button { width: 60px; height: 60px; border-radius: var(--radius-button); background: var(--ink); color: var(--on-ink); border: 0; font: 600 30px var(--font-sans); cursor: pointer; }
.stepper b { font-family: var(--font-display); font-size: 64px; font-weight: 400; min-width: 60px; text-align: center; }
.tilt { position: relative; background: var(--paper); border: var(--border-hairline) solid var(--line-soft); border-radius: var(--radius-card); padding: 28px 18px 16px; margin: 28px 8px 6px; transform: rotate(var(--tilt-left)); text-align: center; }
.tilt-badge { position: absolute; top: -18px; left: 50%; margin-left: -18px; width: 36px; height: 36px; border-radius: var(--radius-round); background: var(--orange); display: grid; place-items: center; font: 700 18px var(--font-sans); }
.tilt h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin: 0 0 8px; text-transform: uppercase; }
.tilt p { margin: 0; font-size: 15px; line-height: 1.6; }
.tilt em { font-style: normal; font-size: 12px; opacity: .8; margin-left: 4px; }

/* Order */
.line { background: var(--paper); border-radius: var(--radius-card); padding: 12px; display: flex; gap: 10px; margin-bottom: var(--space-8); }
.line .doodle { width: 40px; height: 40px; flex: none; }
.line-text { flex: 1; }
.line h3 { margin: 0; font-family: var(--font-wide); font-stretch: 125%; font-weight: 800; font-size: 17px; letter-spacing: -.6px; }
.line p { margin: 2px 0 0; font-size: 12px; line-height: 1.35; }
.line-links { display: flex; gap: 14px; margin-top: 6px; }
.line-links a, .line-links button { background: none; border: 0; padding: 16px 2px; margin: -16px -2px; font: 600 11px var(--font-sans); letter-spacing: 1px; text-transform: uppercase; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; }
.line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line-right .stepper { gap: 8px; margin: 0; }
.line-right .stepper button { width: 44px; height: 44px; font-size: 16px; border-radius: var(--radius-button); }
.line-right .stepper b { font-family: var(--font-sans); font-size: 15px; min-width: 14px; }
.add-more { display: block; text-align: center; border: 1px dashed var(--line-soft); border-radius: var(--radius-button); padding: 14px; font: 600 13px var(--font-sans); letter-spacing: 1px; text-transform: uppercase; text-decoration: none; margin: 4px 0 10px; }
.total { display: flex; justify-content: space-between; font: 600 18px var(--font-sans); border-top: var(--border-rule) solid var(--ink); padding-top: 10px; margin-top: 6px; }
.fine { font-size: 12px; margin: 6px 0 0; }

/* A checkout problem on Your order: the line it's about is outlined. */
.line.flagged { outline: var(--border-rule) solid var(--orange); outline-offset: -2px; }
.line-flag { font-weight: 600; }
.line-qty { font: 600 15px var(--font-sans); }

/* Name */
.field { display: flex; align-items: center; justify-content: space-between; background: var(--paper); border: var(--border-hairline) solid var(--line-soft); border-radius: var(--radius-button); padding: 6px 14px; margin-top: 14px; }
.field input { border: 0; outline: 0; background: none; font: 600 26px var(--font-sans); color: var(--ink); width: 100%; padding: 10px 0; }
.field small { font-size: 12px; white-space: nowrap; }

/* Pay */
.sum { display: flex; justify-content: space-between; font: 600 16px var(--font-sans); }
.tip-title { font-family: var(--font-display); font-weight: 400; font-size: 26px; text-transform: uppercase; text-align: center; margin: 18px 0 0; }
.choices.tips { grid-template-columns: repeat(5, 1fr); margin-top: 10px; gap: 6px; }
.tips .ch { align-items: center; text-align: center; padding: 10px 2px; }
.ch[disabled] { opacity: .5; cursor: default; transform: none; }
.field-prefix { font: 600 26px var(--font-sans); margin-right: 4px; }
.tip-other { justify-content: flex-start; }
.alert { background: var(--ink); color: var(--on-ink); border-radius: var(--radius-card); padding: 14px; margin-bottom: var(--space-8); text-align: center; }
.alert p { margin: 0; font: 600 15px/1.4 var(--font-sans); }
.alert .btn { width: 100%; margin-top: 10px; }
.alert .btn:focus-visible { outline-color: var(--on-ink); }
.pay-methods { display: flex; flex-direction: column; gap: var(--space-8); }
.pay-methods.busy { opacity: .6; pointer-events: none; }
.wallet { min-height: 48px; }
.apple-pay-button { display: block; width: 100%; height: 48px; border: 0; border-radius: var(--radius-button); cursor: pointer; -webkit-appearance: -apple-pay-button; -apple-pay-button-type: plain; -apple-pay-button-style: black; }
.pay-or { font: 600 13px var(--font-sans); letter-spacing: 1px; text-transform: uppercase; text-align: center; margin: 6px 0 0; }
.card-field { min-height: 90px; }
.card-loading { margin: 0; min-height: 90px; display: flex; align-items: center; justify-content: center; background: var(--paper); border: var(--border-hairline) solid var(--line-soft); border-radius: var(--radius-button); font-size: 14px; }
.field-error { font-weight: 600; }
.tip-other:has(input[aria-invalid="true"]) { border-color: var(--ink); }

/* Done: a teal panel with the number in orange (orange text only on teal, at display size). */
.done-head { background: var(--ink); color: var(--on-ink); padding: 22px 14px 20px; }
.done-head :focus-visible { outline-color: var(--on-ink); }
.done-number { color: var(--accent-on-ink); font-size: clamp(120px, 44vw, 160px); line-height: .84; letter-spacing: -1.5px; margin: 6px 0 10px; }
.done-name { font-family: var(--font-wide); font-stretch: 125%; font-weight: 800; font-size: 26px; letter-spacing: -1px; line-height: 1; text-align: center; margin: 0; overflow-wrap: anywhere; }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: 26px; text-transform: uppercase; text-align: center; margin: 0 0 12px; }
.paid-tip { text-align: right; }
.last-order { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 4px; margin-left: auto; margin-right: 10px; font: 600 12px var(--font-sans); letter-spacing: 1px; text-transform: uppercase; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; white-space: nowrap; }

/* Closed */
.stops { display: flex; flex-direction: column; gap: var(--space-8); }
.stop { background: var(--paper); border-radius: var(--radius-card); padding: 14px; }
.stop p { margin: 0; }
.stop-when { font: 600 13px var(--font-sans); letter-spacing: .5px; text-transform: uppercase; }
.stop-where { font-family: var(--font-wide); font-stretch: 125%; font-weight: 800; font-size: 20px; letter-spacing: -.6px; margin-top: 4px !important; }
.stop-address { font-size: 13px; margin-top: 2px !important; }
.stop-link { display: inline-block; margin-top: 8px; font: 600 12px var(--font-sans); letter-spacing: 1px; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid var(--orange); }

/* Dock and buttons */
.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: var(--space-8) var(--space-8) calc(var(--space-8) + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; }
.dock > * { pointer-events: auto; width: 100%; max-width: 464px; }
.btn { display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-button); background: var(--action); color: var(--ink); font: 600 16px var(--font-sans); letter-spacing: 1.12px; text-transform: uppercase; text-decoration: none; padding: 20px 12px 18px; cursor: pointer; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); border-radius: var(--radius-button); padding: 12px 14px; display: flex; gap: 14px; align-items: center; font-size: 14px; z-index: 5; }
.toast button { background: none; border: 0; padding: 15px 4px; margin: -15px -4px; color: var(--accent-on-ink); font: 600 13px var(--font-sans); letter-spacing: 1px; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; }

/* Doodles */
.doodle * { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.doodle .fw { fill: var(--white); }
.doodle .fc { fill: var(--panel); }
.st { animation: steam 2.4s ease-in-out infinite; }
.st2 { animation-delay: .8s; }
.st3 { animation-delay: 1.6s; }
.bob { animation: bob 2.6s ease-in-out infinite; transform-origin: 32px 54px; }
.sway { animation: sway 3s ease-in-out infinite; transform-origin: 32px 40px; }
.swing { animation: swing 2.8s ease-in-out infinite; transform-origin: 32px 10px; }
@keyframes steam { 0% { transform: translateY(4px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateY(-6px); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* Splash: logo centred on its cup body (288/660 of the image width), then flies to the top-left. */
.splash { position: fixed; inset: 0; z-index: 10; background: var(--ink); transition: opacity .35s ease .55s; }
.splash-logo { position: absolute; width: 190px; top: calc(50% - 150px); left: calc(50% - 190px * 288 / 660); transition: all .7s cubic-bezier(.6, -.25, .3, 1.25); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.splash-line { position: absolute; left: 0; right: 0; top: calc(50% + 70px); margin: 0; font-family: var(--font-display); color: var(--on-ink); font-size: 44px; line-height: .9; text-align: center; transition: opacity .25s ease; }
.splash-line i { font-style: normal; color: var(--accent-on-ink); }
.splash.done { opacity: 0; pointer-events: none; }
.splash.done .splash-line { opacity: 0; }
.splash.done .splash-logo { width: 40px; top: 18px; left: max(20px, calc(50% - 220px)); transform: rotate(360deg); }
@keyframes pop { 0% { transform: scale(.4) rotate(-20deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-property: opacity !important; }
  .splash.done .splash-logo { transform: none; }
}
