:root {
  /* Layout: full-bleed WebGL warehouse. Desktop: game-menu column left, waybill panel right, HUD strip at the bottom.
     Phone: the menu and the waybill become bottom sheets over the scene. Deliberately one dark look. */
  --ink: #0b0d0a;
  --ink-2: #141812;
  --glass: rgba(12, 15, 11, 0.78);
  --line: rgba(236, 227, 207, 0.14);
  --line-hi: rgba(232, 166, 70, 0.45);
  --bone: #ece3cf;
  --dim: #a8a08b;
  --amber: #e8a646;
  --amber-hi: #ffd08a;
  --moss: #8fc29a;
  --rust: #bd5f1c;
  --f-display: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gx: max(16px, env(safe-area-inset-left, 0px));
  --gx-r: max(16px, env(safe-area-inset-right, 0px));
  --cut: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 16px/1.5 var(--f-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 3px; }

.app {
  position: relative;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, clamp(290px, 28vw, 410px)) minmax(0, 1fr) minmax(0, min(440px, 36vw));
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: 24px;
  padding-left: clamp(16px, 3.4vw, 56px);
  padding-right: clamp(16px, 3.4vw, 56px);
  padding-left: max(clamp(16px, 3.4vw, 56px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 3.4vw, 56px), env(safe-area-inset-right, 0px));
  padding-top: 0;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

.scene, .fallback, .vignette, .grain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scene { display: block; opacity: 0; transition: opacity 1.2s ease; }
.app.is-ready .scene { opacity: 1; }
.fallback { display: none; background: linear-gradient(180deg, rgba(11,13,10,0.35), rgba(11,13,10,0.75)), url("../assets/plate-postal.webp") center / cover no-repeat; }
.app.no-webgl .fallback { display: block; }
.vignette { background: radial-gradient(ellipse 90% 80% at 55% 45%, transparent 50%, rgba(4,5,3,0.62) 100%), linear-gradient(90deg, rgba(6,8,5,0.55), transparent 32%); }
.grain {
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Static grain preserves the film texture without flickering the screen. */
}
@keyframes grain { 0% { background-position: 0 0; } 25% { background-position: -40px 20px; } 50% { background-position: 30px -50px; } 75% { background-position: -20px -30px; } }

/* ---------- top bar ---------- */
.top {
  grid-column: 1 / -1; grid-row: 1;
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--bone); text-decoration: none; min-width: 0; }
.brand-paw { width: 34px; height: 34px; color: var(--amber); flex: none; filter: drop-shadow(0 0 10px rgba(232,166,70,0.45)); }
.brand-text { display: grid; min-width: 0; }
.brand-name { font: 900 22px/1 var(--f-display); letter-spacing: 0.04em; white-space: nowrap; }
.brand-sub { margin-top: 4px; font: 600 13px/1.3 var(--f-mono); color: #d9c49a; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 10px rgba(0,0,0,.8); }
.tools { display: flex; gap: 8px; flex: none; }
.tool {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 12px;
  font: 600 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line);
  background: rgba(12,15,11,0.5);
  backdrop-filter: blur(6px);
  transition: color .2s, border-color .2s;
}
.tool i { width: 7px; height: 7px; border-radius: 50%; background: #4a4a40; transition: background .2s, box-shadow .2s; }
.tool[aria-pressed="true"] { color: var(--bone); border-color: var(--line-hi); }
.tool[aria-pressed="true"] i { background: var(--moss); box-shadow: 0 0 8px var(--moss); }
.tool:hover { color: var(--amber-hi); }
.tool-ico { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- main menu ---------- */
.menu {
  grid-column: 1; grid-row: 2;
  position: relative; z-index: 2;
  align-self: center;
  display: grid; gap: 18px;
  padding-block: 16px;
  transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.app[data-mode="intro"] .menu { opacity: 0; transform: translateX(-28px); pointer-events: none; }
.app[data-mode="busy"] .menu,
.app[data-mode="showing"] .menu { opacity: 0; transform: translateX(-36px); pointer-events: none; }
.menu-kicker {
  margin: 0; display: flex; align-items: center; gap: 12px;
  font: 600 13px/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber);
}
.menu-kicker::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-hi), transparent); }
.mi-icon { display: none; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu-item {
  position: relative; width: 100%; text-align: left;
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px;
  padding: 12px 16px 12px 20px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.menu-item::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  background: var(--amber); transform: scaleY(0); transform-origin: center; transition: transform .3s ease;
  box-shadow: 0 0 12px var(--amber);
}
.mi-code { grid-column: 1 / -1; font: 600 12px/1.4 var(--f-mono); letter-spacing: 0.16em; color: var(--dim); transition: color .25s; }
.mi-title {
  font: 700 clamp(24px, 2.5vw, 38px)/1.08 var(--f-display);
  letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--bone);
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
  transition: color .25s, text-shadow .25s;
}
.mi-sub {
  grid-column: 1 / -1;
  font: 500 15px/1.4 var(--f-body); color: var(--dim);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
}
.menu-item:hover, .menu-item:focus-visible {
  background: linear-gradient(90deg, rgba(232,166,70,0.16), rgba(232,166,70,0.03) 70%, transparent);
  transform: translateX(8px);
  outline: none;
}
.menu-item:hover::before, .menu-item:focus-visible::before { transform: scaleY(1); }
.menu-item:hover .mi-title, .menu-item:focus-visible .mi-title { color: var(--amber-hi); text-shadow: 0 0 22px rgba(255,180,90,0.45), 0 2px 18px rgba(0,0,0,0.7); }
.menu-item:hover .mi-code, .menu-item:focus-visible .mi-code { color: var(--amber); }
.menu-item:hover .mi-sub, .menu-item:focus-visible .mi-sub { max-height: 2.8em; opacity: 1; margin-top: 4px; }
.menu-minor { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 20px; }
.menu-minor button {
  min-height: 48px; padding: 0 20px;
  font: 700 14px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone);
  border: 1px solid var(--line-hi); border-radius: 10px 10px 3px 10px;
  background: linear-gradient(145deg, rgba(48,43,29,.82), rgba(16,23,16,.9));
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.menu-minor button:hover, .menu-minor button:focus-visible { color: var(--amber-hi); border-color: var(--amber); background: linear-gradient(145deg, rgba(70,58,32,.9), rgba(22,30,20,.92)); outline: none; transform: translateY(-1px); }

/* ---------- waybill ---------- */
.waybill {
  grid-column: 3; grid-row: 2;
  position: relative; z-index: 4;
  align-self: center;
  max-height: 100%;
  overflow-y: auto;
  display: grid; gap: 14px;
  padding: 26px 26px 22px;
  background:
    linear-gradient(180deg, rgba(232,166,70,0.06), transparent 30%),
    var(--glass);
  border: 1px solid var(--line-hi);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  backdrop-filter: blur(12px) saturate(1.1);
  opacity: 0; transform: translateX(40px);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}
.waybill.is-open { opacity: 1; transform: none; }
.wb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wb-close { flex: none; width: 44px; height: 44px; margin: -10px -10px -8px 0; font: 300 28px/1 var(--f-body); color: var(--dim); border-radius: 50%; }
.wb-close:hover { background: rgba(232,166,70,.12); color: var(--amber-hi); }
.wb-no { font: 600 12px/1.5 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding-top: 6px; }
.wb-stamp {
  flex: none;
  font: 900 13px/1 var(--f-display); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); border: 2px solid var(--amber); padding: 7px 10px 6px;
  transform: rotate(-7deg); opacity: 0.85;
  box-shadow: inset 0 0 0 2px rgba(232,166,70,0.18);
}
.wb-eyebrow { margin: 0; font: 600 12px/1.4 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--moss); }
.wb-title { margin: 0; font: 900 clamp(26px, 2.6vw, 38px)/1.05 var(--f-display); text-transform: uppercase; text-wrap: balance; color: var(--bone); }
.wb-title:focus { outline: none; }
.wb-text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--bone); max-width: 38ch; }
.wb-fields { margin: 0; display: grid; border-top: 1px dashed var(--line); }
.wb-fields div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.wb-fields dt { font: 600 12px/1.6 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.wb-fields dd { margin: 0; font: 500 14px/1.5 var(--f-body); min-width: 0; }
.wb-note { margin: 0; font-size: 14px; color: var(--dim); font-style: italic; }
.wb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 4px; }
.btn-go, .btn-soon, .btn-back {
  min-height: 46px; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px;
  font: 700 13px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn-go { background: var(--amber); color: #15120b; transition: background .2s; }
.btn-go:hover { background: var(--amber-hi); }
.btn-soon { border: 1px dashed var(--line-hi); color: var(--amber); clip-path: none; }
.btn-back { background: rgba(236,227,207,0.07); color: var(--bone); transition: background .2s; }
.btn-back:hover { background: rgba(236,227,207,0.14); }
.btn-back kbd { font: 600 10px/1 var(--f-mono); color: var(--dim); border: 1px solid var(--line); padding: 3px 5px; }
.wb-barcode { color: rgba(236,227,207,0.55); height: 30px; }
.wb-barcode svg { width: 100%; height: 100%; display: block; }


/* ---------- loader ---------- */
.loader {
  position: absolute; inset: 0; z-index: 20;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  padding-inline: 24px;
  background: radial-gradient(ellipse at 50% 45%, #171b14, var(--ink) 70%);
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-mark {
  font: 900 clamp(44px, 9vw, 112px)/1 var(--f-display); letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffe0a6, #c07a25 70%, #7a4512);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(232,166,70,0.25));
}
.loader-bar { width: min(360px, 70vw); height: 2px; background: rgba(236,227,207,0.1); overflow: hidden; }
.loader-bar i { display: block; height: 100%; background: var(--amber); transform-origin: left; transform: scaleX(0); transition: transform .5s ease; box-shadow: 0 0 10px var(--amber); }
.loader-text { width: min(360px, 70vw); display: flex; justify-content: space-between; gap: 12px; font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); font-variant-numeric: tabular-nums; }
.loader-tip { margin: 18px 0 0; font-size: 14px; color: var(--dim); text-align: center; max-width: 34ch; }

.toast {
  position: absolute; z-index: 30; left: 50%; top: calc(max(20px, env(safe-area-inset-top, 0px)) + 56px);
  transform: translate(-50%, -10px); opacity: 0; pointer-events: none;
  padding: 10px 16px; background: var(--glass); border: 1px solid var(--line-hi);
  font: 600 14px/1.3 var(--f-mono); letter-spacing: 0.06em; color: var(--bone);
  transition: opacity .3s, transform .3s; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; inset: auto 16px 16px; padding: 12px; background: var(--ink-2); color: var(--bone); }

.bear-hello { position: absolute; z-index: 1; display: none; border-radius: 40%; -webkit-tap-highlight-color: transparent; }
.app.is-ready[data-mode="idle"] .bear-hello { display: block; }
.bear-hello span { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; white-space: nowrap; padding: 6px 12px; border: 1px solid rgba(232,166,70,.25); border-radius: 30px; background: rgba(12,15,11,.8); color: #e0c69b; font: 600 13px/1.3 var(--f-mono); transition: background .2s, color .2s; }
.bear-hello svg { width: 14px; height: 14px; }
.bear-hello:hover span, .bear-hello:focus-visible span { color: var(--amber-hi); background: #272318; }
.scene-caption { display: none; position: absolute; z-index: 3; left: 50%; bottom: 76px; transform: translateX(-50%); align-items: center; gap: 10px; max-width: calc(100% - 32px); width: max-content; padding: 12px 16px; border: 1px solid var(--line); border-radius: 24px; background: rgba(12,15,11,.88); color: var(--bone); font-size: 15px; }
.app[data-mode="busy"] .scene-caption { display: flex; }
.scene-caption i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
button, a { touch-action: manipulation; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding-left: var(--gx);
    padding-right: var(--gx-r);
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .brand-name { font-size: 18px; }
  .brand-sub { font-size: 11px; margin-top: 3px; }
  .top { gap: 10px; background: linear-gradient(#0b0d0ad9, transparent); }
  .tool { padding: 0 10px; min-height: 44px; font-size: 11px; letter-spacing: .04em; }
  .tools { gap: 6px; }
  .brand { gap: 8px; }
  .brand-paw { width: 28px; height: 28px; }
  .vignette { background: radial-gradient(ellipse 110% 90% at 50% 40%, transparent 60%, rgba(4,5,3,.35) 100%); }
  .grain { opacity: .045; animation: none; }
  .menu {
    grid-column: 1; grid-row: 3; align-self: end;
    gap: 10px; padding-block: 16px 0;
    /* Only a soft shade for legibility: the warehouse floor stays visible under the buttons. */
    background: linear-gradient(transparent, rgba(11,13,10,.42) 45%, rgba(11,13,10,.55));
  }
  .app[data-mode="busy"] .menu, .app[data-mode="showing"] .menu, .app[data-mode="intro"] .menu { transform: translateY(30px); }
  .app[data-mode="showing"] .menu { display: none; }
  .menu-kicker { display: flex; font-size: 11px; letter-spacing: .14em; color: #e0c69b; text-shadow: 0 1px 8px #000; }
  .menu-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .menu-item {
    padding: 12px 8px;
    min-height: 94px;
    background: linear-gradient(145deg, #302b1de8, #101710f5);
    border: 1px solid #7e704845;
    border-radius: 12px 12px 4px 12px;
    clip-path: none;
    grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; row-gap: 6px;
    text-align: center;
  }
  .mi-icon { display: block; width: 23px; height: 23px; color: var(--amber); }
  .mi-icon svg { display: block; width: 100%; height: 100%; }
  .menu-item:active { transform: scale(.96); background: #34301e; }
  .menu-item::before { top: auto; bottom: 0; left: 10px; right: 10px; width: auto; height: 2px; transform: scaleX(0); }
  .menu-item:hover::before, .menu-item:focus-visible::before { transform: scaleX(1); }
  .menu-item:hover, .menu-item:focus-visible { transform: none; }
  .mi-code { font-size: 10px; letter-spacing: 0.06em; order: 3; color: #b8ae95; }
  .mi-title { font-size: clamp(11px, 3.6vw, 18px); letter-spacing: 0; white-space: nowrap; }
  .mi-sub { display: none; }
  .menu-minor { padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .menu-minor button { min-height: 46px; padding: 0 8px; font-size: 12px; letter-spacing: .08em; border-color: #7e704866; }
  .waybill {
    grid-column: 1; grid-row: 3; align-self: end;
    max-height: 42vh; max-height: 42dvh;
    padding: 12px 16px; gap: 9px;
    transform: translateY(40px);
    margin-bottom: 8px;
    border-radius: 16px 16px 4px 4px; clip-path: none;
    background: linear-gradient(130deg, #25271cf5, #0e150ff5);
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .wb-head { position: sticky; top: -12px; z-index: 2; align-items: center; min-height: 30px; background: #202419; }
  .wb-no { font-size: 11px; padding-top: 0; }
  .wb-stamp, .wb-note { display: none; }
  .wb-close { margin: -7px -7px -7px 0; }
  .wb-eyebrow { font-size: 11px; }
  .wb-title { font-size: clamp(18px, 5.5vw, 26px); }
  .wb-text { font-size: 14px; line-height: 1.5; max-width: none; }
  .wb-fields, .wb-barcode { display: none; }
  .wb-actions { padding-top: 4px; flex-wrap: nowrap; gap: 8px; }
  .btn-soon, .btn-go { min-height: 46px; padding: 10px; font-size: 11px; letter-spacing: .04em; flex: 1; justify-content: center; text-align: center; }
  .btn-back { min-height: 46px; padding: 0 14px; font-size: 12px; }
  .btn-back kbd { display: none; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 16px; letter-spacing: .02em; }
  .brand-sub { font-size: 10px; letter-spacing: .03em; }
  .tool { padding-inline: 8px; font-size: 10px; }
}
/* Narrow phones: sound and motion become icon buttons so the logo fits in full. */
@media (max-width: 380px) {
  .tool { width: 44px; padding: 0; justify-content: center; position: relative; }
  .tool-ico { display: block; }
  .tool i { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; }
  .tool-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 14px; }
  .brand-paw { width: 24px; height: 24px; }
  .menu-list { gap: 6px; }
}
@media (max-width: 760px) and (max-height: 640px) {
  .menu-item { min-height: 78px; padding-block: 8px; row-gap: 4px; }
  .menu { gap: 6px; padding-top: 8px; }
  .menu-minor button { min-height: 44px; }
  .top { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  .wb-eyebrow { display: none; }
}
/* short landscape phones */
@media (min-width: 761px) {
  .app[data-action="operator"] .waybill { grid-column: 1; }
}
@media (max-height: 520px) and (min-width: 761px) {
  .mi-title { font-size: 18px; }
  .menu-item { padding-block: 7px; }
  .mi-sub { display: none; }
  .menu { gap: 8px; padding-block: 6px; }
  .waybill { padding: 14px 18px; gap: 7px; align-self: center; max-height: 100%; margin-block: 4px; }
  .wb-fields, .wb-barcode, .wb-note, .wb-stamp, .wb-eyebrow { display: none; }
  .wb-head { align-items: center; }
  .wb-no { padding-top: 0; }
  .wb-title { font-size: 22px; }
  .wb-text { font-size: 14px; line-height: 1.45; }
  /* The way out always stays on screen, even when the text has to scroll. */
  .wb-actions { position: sticky; bottom: -14px; margin-top: auto; padding-block: 8px 2px; background: linear-gradient(transparent, #11140fee 30%); }
  .btn-go, .btn-soon, .btn-back { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .menu, .waybill, .menu-item, .scene { transition-duration: .01s; }
}

/* ---------- waybill, simplified (16.10.2026) ----------
   The card shows only what matters: section, big title, a short text, the way in and the way back.
   The receipt details stay in the HTML; delete a selector below to bring one back. */
.wb-no, .wb-stamp, .wb-fields, .wb-note, .wb-barcode { display: none !important; }
@media (min-width: 761px) {
  .app { grid-template-columns: minmax(0, clamp(290px, 28vw, 410px)) minmax(0, 1fr) minmax(0, min(500px, 38vw)); }
}
.waybill { gap: 18px; padding: 30px 32px 30px; }
.wb-head { position: absolute; top: 14px; right: 14px; z-index: 2; }
.wb-close { margin: 0; color: var(--bone); background: rgba(236,227,207,.08); }
.wb-eyebrow { font-size: 13px; letter-spacing: .16em; padding-right: 48px; }
.wb-title { font-size: clamp(32px, 3.2vw, 50px); line-height: 1.02; }
.wb-text { font-size: 19px; line-height: 1.5; max-width: 34ch; }
.wb-actions { gap: 12px; padding-top: 6px; }
.btn-go, .btn-soon, .btn-back { min-height: 56px; padding: 0 24px; font-size: 14px; }
.btn-go { flex: 1; justify-content: center; }
.btn-soon { flex: 1; justify-content: center; text-align: center; }

@media (max-width: 760px) {
  .waybill { gap: 10px; padding: 16px 18px 16px; max-height: 50vh; max-height: 50dvh; }
  .wb-head { top: 8px; right: 8px; min-height: 0; background: none; }
  .wb-eyebrow { font-size: 11px; padding-right: 44px; }
  .wb-title { font-size: clamp(24px, 7vw, 32px); padding-right: 40px; }
  .wb-text { font-size: 16px; line-height: 1.45; }
  .btn-go, .btn-soon { min-height: 50px; font-size: 13px; padding: 0 12px; }
  .btn-back { min-height: 50px; font-size: 13px; padding: 0 16px; }
  .wb-actions { position: sticky; bottom: -16px; padding-block: 10px 4px; margin-top: auto; background: linear-gradient(transparent, #11180ff5 25%); }
}
@media (max-height: 520px) and (min-width: 761px) {
  .waybill { padding: 14px 20px; gap: 8px; }
  .wb-title { font-size: 26px; }
  .wb-text { font-size: 15px; }
  .btn-go, .btn-soon, .btn-back { min-height: 42px; font-size: 12px; }
}
