/* Chopstick and Rice — site styles.
   Direction: a cookbook printed on warm cream paper (refero.design "cookbook pages on warm cream paper"),
   re-inked in the logo's navy. Square corners, no shadows, hierarchy from type and space.
   Type: Fraunces (headings) + Be Vietnam Pro (text); both carry full Vietnamese diacritics. */

/* fonts: /fonts/fonts.css is linked from the page head (an @import here made the fonts load one step later) */

:root {
  --paper: #f6f0e1;        /* page canvas */
  --linen: #fffaec;        /* cards, raised zones */
  --ink: #1b244f;          /* text: deep navy */
  --navy: #0038a0;         /* the logo's royal blue: filled actions, links */
  --navy-deep: #002b7d;    /* hover */
  --sky: #58a8f8;          /* the logo's light blue: quiet accents */
  --leaf: #5f8f1f;         /* the logo's rice-leaf green (text-safe shade) */
  --hair: #e3d9c4;         /* hairlines on cream */
  --butter: #fff3cc;       /* highlight swatch */
  --chili: #b23a22;        /* tiny accent: "spicy", badges */
  --muted: #5c5a6b;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 150px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans); font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(40px, 7vw, 84px); font-weight: 350; letter-spacing: -0.03em; }
h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 350; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.kicker { font: 600 13px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); }
.viet { font-family: var(--serif); font-style: italic; color: var(--muted); }

/* ---- buttons: one filled action (navy), one quiet outline ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px;
  font: 600 16px/1 var(--sans); text-decoration: none; border: 1.5px solid var(--navy);
  background: var(--navy); color: #fff; cursor: pointer;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn.quiet { background: transparent; color: var(--navy); }
.btn.quiet:hover { background: var(--navy); color: #fff; }
.btn.on-dark.quiet { color: #fff; border-color: #fff; }
.btn.on-dark.quiet:hover { background: #fff; color: var(--navy); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(246, 240, 225, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 88px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { height: 74px; width: auto; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 5px; }
.site-header .btn { min-height: 42px; padding: 10px 16px; font-size: 15px; }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .site-header .wrap { height: 72px; }
  .brand img { height: 60px; }
  .menu-nav { top: 72px; }
}

/* ---- hero ---- */
.hero { position: relative; color: #fff; min-height: min(86vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(14, 19, 44, .78) 0%, rgba(14, 19, 44, .5) 45%, rgba(14, 19, 44, .08) 75%),
  linear-gradient(180deg, rgba(14, 19, 44, 0) 45%, rgba(14, 19, 44, .7) 100%); }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: 120px; padding-bottom: clamp(36px, 6vw, 72px); }
.hero .kicker { color: var(--butter); }
.hero h1 { max-width: 15ch; margin: 14px 0 18px; font-size: clamp(40px, 6.4vw, 80px); }
@media (min-width: 900px) { .hero h1 { max-width: none; } }
.hero p { max-width: 34rem; font-size: clamp(17px, 2vw, 20px); margin: 0 0 26px; color: #f3f1ea; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .meta { margin-top: 22px; font-size: 15px; color: #e8e6df; }
.hero .meta a { color: #fff; }

/* ---- sections ---- */
section { padding: clamp(64px, 9vw, 112px) 0; }
/* "Menu" links land with the heading right under the sticky header: html's 150px scroll-padding is for the dish
   anchors (header + category bar), so take back what the header doesn't need, and trim the section's top padding */
#menu { padding-top: 36px; scroll-margin-top: -62px; }
@media (max-width: 760px) { #menu { scroll-margin-top: -78px; } }  /* the header is 72px there */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 36px; }
.section-head p { max-width: 34rem; margin: 10px 0 0; color: var(--muted); }

/* ---- "What are you craving?" category tiles ---- */
.cravings { padding-bottom: 0; }
.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; color: #fff; text-decoration: none; background: #e9e0cc; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile span { position: absolute; inset: auto 0 0 0; padding: 22px 12px 10px; background: linear-gradient(180deg, rgba(14,19,44,0), rgba(14,19,44,.82)); }
.cat-tile b { display: block; font: 400 clamp(17px, 2vw, 21px)/1.15 var(--serif); }
.cat-tile small { font-size: 12px; color: #e3e8f5; }
.cat-tile:hover, .cat-tile:focus-visible { color: #fff; }

/* ---- dish cards ---- */
.grid { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dish { display: flex; flex-direction: column; background: var(--linen); text-decoration: none; color: var(--ink); border: 1px solid var(--hair); }
.dish .photo { position: relative; aspect-ratio: 4 / 3; background: #eee4cf; overflow: hidden; }
.dish .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.dish:hover .photo img { transform: scale(1.03); }
.dish .body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.dish .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dish h3 { font-size: 20px; }
.dish h3 sup.raw { font-size: 14px; margin-left: 1px; }
.dish h3 sup.raw a { color: inherit; text-decoration: none; display: inline-block; min-width: 24px; min-height: 24px; text-align: center; margin: -6px -8px; padding: 2px 4px; }  /* easy to tap on phones */
.dish .price { font: 600 17px/1 var(--sans); white-space: nowrap; }
.dish .viet { font-size: 15px; }
.dish .desc { font-size: 15px; line-height: 1.5; color: #3d3f55; margin: 2px 0 0; }
.dish .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 5px 7px; border: 1px solid var(--hair); color: var(--muted); background: var(--paper); }
.tag.popular { background: var(--butter); border-color: #efd98d; color: #5a4300; }
.tag.spicy { color: var(--chili); border-color: #e9b8ab; }
.tag.veg { color: var(--leaf); border-color: #c5dba3; }
.photo .similar { position: absolute; left: 8px; bottom: 8px; font: 500 11px/1 var(--sans); padding: 5px 7px; background: rgba(255, 250, 236, .92); color: var(--muted); }
.photo.none { display: grid; place-items: center; }
.photo.none img { width: 34%; height: auto; opacity: .5; transform: none !important; }
.photo.none span { position: absolute; bottom: 10px; font-size: 13px; color: var(--muted); }
.photo.icon span { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); }

/* best sellers scroll on phones */
@media (max-width: 640px) {
  .grid.scroller { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .grid.scroller > * { scroll-snap-align: start; }
}

/* ---- pho 101 ---- */
.pho101 { background: var(--linen); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.split { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 1fr; } }
.split figure { margin: 0; }
.split figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; margin: 18px 0 26px; }
.steps { list-style: none; padding: 0; margin: 0 0 28px; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); font: 400 30px/1 var(--serif); color: var(--navy); }
.steps b { font-weight: 600; }
.which { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 8px; }
.which a { display: block; padding: 14px 16px; border: 1px solid var(--hair); background: var(--paper); text-decoration: none; color: var(--ink); }
.which a:hover { border-color: var(--navy); }
.which b { display: block; font: 400 19px/1.2 var(--serif); }
.which span { font-size: 14px; color: var(--muted); }

/* pho 101: photo aligns to the top and stays in view while the steps scroll */
@media (min-width: 900px) { .pho101 .split { align-items: start; } .pho101 figure { position: sticky; top: 96px; } }

/* pho story video: a thumbnail until someone presses play (no YouTube load or tracking before that) */
.video-row { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; align-items: center; margin-top: clamp(56px, 8vw, 96px); }
@media (min-width: 900px) { .video-row { grid-template-columns: 1fr 1.4fr; } }
.video-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 350; margin: 10px 0 12px; }
.video-row p { color: var(--muted); max-width: 30rem; margin: 0 0 22px; }
.yt-wrap { margin: 0; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s ease; }
.yt:hover img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 76px; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
.yt-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-wrap figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---- upsell band ---- */
.band { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.band .split { position: relative; z-index: 1; }
.band h2 { font-size: clamp(34px, 5vw, 62px); }
.band p { color: #dfe3f1; font-size: 18px; max-width: 30rem; }
.band .price-big { font: 400 26px/1 var(--serif); color: var(--butter); margin: 0 0 22px; }

/* ---- menu ---- */
.menu-nav { position: sticky; top: 88px; z-index: 10; background: rgba(246, 240, 225, .96); border-bottom: 1px solid var(--hair); }
.menu-nav .wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.menu-nav a { flex: none; padding: 8px 12px; border: 1px solid var(--hair); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; background: var(--linen); }
.menu-nav a:hover, .menu-nav a.on { border-color: var(--navy); color: var(--navy); }
.menu-cat { padding: 56px 0 8px; }
.menu-cat .section-head { margin-bottom: 24px; }
.menu-cat h2 { font-size: clamp(30px, 4vw, 44px); }
.extras { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.extras li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dotted var(--hair); }
.extras li > span:last-child { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.extras ul { list-style: none; margin: 0; padding: 0; }
.note { font-size: 14px; color: var(--muted); max-width: 46rem; }
.note + .note { margin-top: 10px; }
.card-box { margin: 8px 0 4px; min-height: 44px; padding: 12px; background: #fff; border: 1px solid var(--hair); border-radius: 6px; }
.cart-form .pickup-q, .pickup-box .pickup-q { font-weight: 600; font-size: 17px; display: block; margin-bottom: 6px; }
.pickup-box { margin: 14px 0; padding: 12px 14px; background: #fff; border: 1px solid var(--hair); border-radius: 6px; }
.pickup-box select { width: 100%; font-size: 16px; padding: 10px; }
.pickup-bar { margin-top: 18px; max-width: 30rem; }
.pickup-bar .pickup-box { margin: 0; }
button.soldout, button.soldout:hover { background: #d8d2c4; color: #5f5a50; border-color: #d8d2c4; cursor: not-allowed; }
.cart-form fieldset.pay .fine { margin: 0 0 8px; }

/* ---- visit ---- */
.visit dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 22px 0 28px; }
.visit dt { font-weight: 600; }
.visit dd { margin: 0; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--hair); padding: 40px 0 120px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.site-footer img { width: 150px; }

/* ---- chat bubble ---- */
.chat-launch {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 12px 18px 12px 14px; background: var(--navy); color: #fff; border: 0; cursor: pointer;
  font: 600 15px/1 var(--sans); box-shadow: 0 6px 24px rgba(20, 30, 70, .28);
}
.chat-launch:hover { background: var(--navy-deep); }
.chat-launch svg { width: 24px; height: 24px; }
.chat-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 41; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 36px));
  display: none; flex-direction: column; background: var(--linen); border: 1px solid var(--hair); box-shadow: 0 16px 48px rgba(20, 30, 70, .3);
}
.chat-panel.open { display: flex; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--navy); color: #fff; }
.chat-head img { width: 54px; background: #fff; padding: 3px 4px; }
.chat-head b { font: 400 18px/1.1 var(--serif); display: block; }
.chat-head small { font-size: 12px; color: #d8def0; }
.chat-head .chat-reset { margin-left: auto; background: none; cursor: pointer; font: 600 12px/1 var(--sans); color: #d8e6ff; border: 1px solid rgba(255,255,255,.35); padding: 6px 8px; }
.chat-head .chat-reset:hover { color: #fff; border-color: #fff; }
.chat-head .chat-close { margin-left: 4px; background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 12px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.msg.bot { background: #fff; border: 1px solid var(--hair); align-self: flex-start; }
.msg.me { background: var(--navy); color: #fff; align-self: flex-end; }
.msg.bot a { color: var(--navy); font-weight: 600; }
.msg.typing { color: var(--muted); font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chips button { font: 500 13px/1.2 var(--sans); padding: 8px 10px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink); cursor: pointer; text-align: left; }
.chips button:hover { border-color: var(--navy); color: var(--navy); }
.order-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; background: var(--butter); border-top: 1px solid #efd98d; font-size: 14px; font-weight: 600; }
.order-bar button { margin-left: auto; font: 600 13px/1 var(--sans); padding: 6px 10px; border: 1px solid #d9c06a; background: #fff; color: var(--ink); cursor: pointer; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--hair); background: var(--paper); }
.chat-form input { flex: 1; min-width: 0; font: 400 16px/1.3 var(--sans); padding: 12px; border: 1px solid var(--hair); background: #fff; color: var(--ink); }
.chat-form button { min-height: 46px; padding: 0 16px; }
.chat-head small a { color: #d8e6ff; }
.msg-adds { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; white-space: normal; }
.msg-adds .add { min-height: 38px; padding: 8px 12px; font-size: 14px; text-align: left; line-height: 1.2; }
.msg-adds .add:disabled:not(.added) { background: var(--paper); color: var(--muted); border-color: var(--hair); }
@media (max-width: 520px) {
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 88vh; }
  .chat-launch span { display: none; }
  .chat-launch { padding: 14px; }
}
/* ---- pickup cart: Add buttons, header badge, the order drawer, checkout ---- */
.add {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; flex: none;
  font: 600 15px/1 var(--sans); color: #fff; background: var(--navy); border: 1.5px solid var(--navy); cursor: pointer;
}
.add span { font: 400 22px/0 var(--sans); }
.add:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.add:disabled { opacity: .6; cursor: progress; }
.add.added { background: var(--leaf); border-color: var(--leaf); }
/* outside ordering hours (8:10 PM to 5 AM) the Add buttons read "Orders open 5 AM" */
.extras .add.closed { display: none; }   /* the narrow extras rows just show name and price overnight */
.add.closed, .add.closed:hover { background: var(--butter); border-color: #efd98d; color: #5a4300; opacity: 1; cursor: default; font-size: 14px; white-space: nowrap; }
.add.added::after { content: "Added"; }
.add.added { font-size: 0; }
.add.added::after, .add.added span { font: 600 15px/1 var(--sans); }
.add.added span { display: none; }
.extras .add { min-height: 34px; padding: 4px 11px; }
button.btn { font-family: var(--sans); }
.cart-btn svg { width: 20px; height: 20px; flex: none; }
.cart-btn { gap: 8px; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--butter); color: var(--ink); font: 700 13px/22px var(--sans); text-align: center; }
body.cart-open { overflow: hidden; }
.cart { position: fixed; inset: 0; z-index: 60; }
.cart-scrim { position: absolute; inset: 0; background: rgba(14, 19, 44, .45); }
.cart-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(470px, 100vw); display: flex; flex-direction: column;
  background: var(--linen); border-left: 1px solid var(--hair); box-shadow: -16px 0 48px rgba(20, 30, 70, .25);
}
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 14px 22px; border-bottom: 1px solid var(--hair); background: var(--paper); }
.cart-head h2 { font-size: 28px; }
.cart-x { background: none; border: 0; font-size: 34px; line-height: 1; color: var(--ink); cursor: pointer; padding: 2px 8px; }
.cart-test { background: var(--butter); border-bottom: 1px solid #efd98d; color: #5a4300; font-size: 13.5px; line-height: 1.45; padding: 10px 22px; }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 22px 32px; overscroll-behavior: contain; }
.cart-body .btn.wide { width: 100%; justify-content: center; margin-top: 14px; }
.cart-body .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--navy); font: 600 14px/1.4 var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.linkish.small { font-size: 13px; font-weight: 500; }
.lede-sm { font: 400 20px/1.35 var(--serif); margin: 4px 0 8px; }
.fine { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 10px 0; }
.keep { display: block; text-align: center; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
.cart-lines { list-style: none; margin: 0 0 16px; padding: 0; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hair); align-items: start; }
.cart-line img, .cart-line .noimg { width: 64px; height: 48px; object-fit: cover; background: #eee4cf; display: block; }
.cart-line b { display: block; font: 400 18px/1.2 var(--serif); margin-bottom: 2px; }
.line-notes { font-size: 13px; color: var(--chili); }
.cart-line .linkish { display: block; }
.cart-line .qty { display: flex; width: max-content; }
.line-total { font-weight: 600; white-space: nowrap; }
.note-edit { display: flex; gap: 6px; margin-top: 6px; }
.note-edit input { flex: 1; min-width: 0; font: 400 15px/1.3 var(--sans); padding: 8px; border: 1px solid var(--hair); background: #fff; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--hair); background: #fff; margin-top: 8px; }
.qty button { width: 36px; height: 34px; border: 0; background: none; font: 400 20px/1 var(--sans); cursor: pointer; color: var(--navy); }
.qty button:hover { background: var(--paper); }
.qty span { min-width: 24px; text-align: center; font-weight: 600; }
.upsell { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 12px; background: var(--butter); border: 1px solid #efd98d; margin: 0 0 16px; }
.upsell img { width: 72px; height: 54px; object-fit: cover; display: block; }
.upsell p { margin: 0 0 2px; font: 400 16px/1.3 var(--serif); }
.upsell small { color: #5a4300; font-size: 13px; }
.totals { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 4px; }
.totals td { padding: 5px 0; }
.totals td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.totals tr.grand td { border-top: 2px solid var(--ink); font-weight: 700; font-size: 17px; padding-top: 9px; }
.totals tr.credit td { color: var(--muted); font-size: 14px; }
.cart-form label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.cart-form input, .cart-form select { width: 100%; font: 400 16px/1.3 var(--sans); padding: 12px; border: 1px solid var(--hair); background: #fff; color: var(--ink); border-radius: 0; }
.cart-form input:focus, .cart-form select:focus { border-color: var(--navy); outline: 2px solid var(--navy); outline-offset: 0; }
.cart-form .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.cart-form .totals { margin-top: 18px; }
.pay { border: 1px solid var(--hair); background: #fff; padding: 2px 12px 4px; margin: 16px 0 0; }
.pay legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.pay label { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 8px 0; }
.pay input { width: auto; accent-color: var(--navy); }
.pay .soon { color: var(--muted); }
.cart-error { background: #fbe9e5; border: 1px solid #e9b8ab; color: #8a2a16; padding: 10px 12px; font-size: 14px; margin: 12px 0; }
.cart-notice { background: var(--butter); border: 1px solid #efd98d; color: #5a4300; padding: 10px 12px; font-size: 14px; margin: 12px 0; }
.back { background: none; border: 0; padding: 0; color: var(--navy); font: 600 14px/1 var(--sans); cursor: pointer; margin: 2px 0 10px; }
.done-num { font: 400 52px/1 var(--serif); margin: 8px 0 12px; letter-spacing: -0.02em; }
.done-lines { padding-left: 18px; margin: 12px 0; }
.past { margin-top: 28px; border-top: 1px solid var(--hair); padding-top: 16px; }
.past h3 { font-size: 20px; margin-bottom: 6px; }
.past ul { list-style: none; margin: 0; padding: 0; }
.past li { padding: 10px 0; border-bottom: 1px dotted var(--hair); font-size: 14px; }
.past li .fine { margin: 2px 0 8px; }
.toast {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: calc(100vw - 32px); padding: 10px 10px 10px 18px; background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 500; box-shadow: 0 8px 28px rgba(20, 30, 70, .3);
}
.toast button { flex: none; background: #fff; border: 0; color: var(--navy); font: 600 14px/1 var(--sans); padding: 10px 12px; cursor: pointer; }
@media (max-width: 520px) {
  .cart-head h2 { font-size: 24px; }
  .cart-body { padding: 14px 16px 28px; }
  .cart-test { padding: 10px 16px; }
  .toast { bottom: 84px; }
}
@media (max-width: 400px) {
  .cart-btn .cart-label { display: none; }
  .cart-btn { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
