@font-face {
  font-family: Kontrabanda;
  src: url('/assets/kontrabanda.woff2') format('woff2');
  font-display: swap;
}

@font-face { font-family: GeorgiaLocal; src: local(Georgia); }
:root {
  color-scheme: light;
  --paper: #f8f5ed;
  --white: #fffefb;
  --ink: #352a26;
  --wine: #5b242a;
  --line: #dcd5c7;
  --muted: #675d53;
  --soft: #eee4d6;
  --green: #e4e8d8;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; }
button:disabled { opacity: .5; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7a3945; outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 10; padding: 12px; background: var(--white); }
.skip-link:focus { top: 12px; }
.top { max-width: 1240px; margin: auto; padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: block; width: 110px; }
.brand img { display: block; width: 100%; height: auto; }
.top-link { font-size: 14px; text-underline-offset: 5px; }
main { max-width: 1240px; margin: auto; padding: 0 28px 64px; }
.intro { padding: 38px 0 32px; max-width: 680px; }
.intro h1 { font: 400 clamp(32px, 4.3vw, 54px)/1.07 Georgia, serif; letter-spacing: -.035em; margin: 0 0 16px; }
.intro p { max-width: 540px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.panel { min-width: 0; }
.preview { position: sticky; top: 20px; }
.controls { display: grid; gap: 32px; min-width: 0; }
.section-top, .layers-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-top { margin-bottom: 18px; }
h2 { margin: 0; font: 400 28px/1.15 Georgia, serif; }
h3 { margin: 0; font-size: 14px; font-weight: 600; }
.flat { background: transparent; border: 0; padding: 10px 0; color: var(--wine); font-size: 14px; text-underline-offset: 4px; }
.flat:hover { text-decoration: underline; }
.stage { display: grid; place-items: center; background: #f4f8e7; border-radius: 4px; overflow: hidden; padding: 8px 16px; }
.cup { position: relative; width: min(100%, 400px); aspect-ratio: .88; overflow: hidden; container-type: inline-size; }
.cup-photo { position: absolute; width: 230%; max-width: none; height: 110%; object-fit: fill; left: -114%; top: -3%; }
.toast-side { position: absolute; left: 5.5%; top: 18%; width: 66%; display: flex; flex-direction: column; align-items: center; }
.art { position: relative; width: 94%; aspect-ratio: 1; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.front-caption { width: 96%; text-align: center; font: clamp(18px, 6.4cqw, 27px)/1.25 Kontrabanda, Georgia, serif; overflow-wrap: anywhere; color: #352a26; }
.back-side { position: absolute; left: 8%; top: 22%; width: 60%; bottom: 18%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.letter { flex: 1; align-content: safe center; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; width: 100%; font: clamp(20px, 8cqw, 34px)/1.08 Kontrabanda, Georgia, serif; }
#mug-qr { width: 15%; min-width: 32px; max-width: 48px; height: auto; flex-shrink: 0; margin-top: auto; mix-blend-mode: multiply; }
.sides, .filters, .cups { display: flex; flex-wrap: wrap; gap: 6px; }
.sides { justify-content: center; margin-top: 14px; }
.cups { margin-bottom: 12px; }
.sides button, .filters button, .cups button { border: 1px solid var(--line); border-radius: 4px; background: transparent; padding: 9px 12px; min-height: 40px; font-size: 13px; }
.sides button[aria-pressed=true], .filters button[aria-pressed=true], .cups button[aria-pressed=true] { color: white; background: var(--wine); border-color: var(--wine); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 12px 0 0; }
.preview-note { text-align: center; max-width: 420px; margin-inline: auto; }
.counter { font-size: 13px; color: var(--muted); white-space: nowrap; }
.filters { margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-height: 345px; overflow: auto; padding: 4px; }
.ingredient { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--white); padding: 7px 4px 9px; font-size: 12px; line-height: 1.25; }
.ingredient img { display: block; width: 100%; height: 58px; object-fit: contain; pointer-events: none; }
.ingredient:hover { border-color: var(--wine); }
.ingredient[aria-pressed=true] { border: 2px solid var(--wine); padding: 6px 3px 8px; background: #f1e6dc; }
.layers-title { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 8px; }
.layers { list-style: none; margin: 0; padding: 0; }
.layers li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); min-height: 44px; font-size: 14px; }
.layers li span { flex: 1; }
.layers button { border: 0; border-radius: 3px; background: var(--soft); min-width: 36px; min-height: 36px; }
.order { border-top: 1px solid var(--line); padding-top: 25px; }
.order h2 { margin-bottom: 22px; }
.order label:not(.consent) { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.order label span { color: var(--muted); font-size: 12px; font-weight: 400; }
.order input:not([type=checkbox]), .order textarea { display: block; width: 100%; min-width: 0; padding: 12px; border: 1px solid #bcb3a6; border-radius: 4px; background: var(--white); color: var(--ink); }
.order textarea { resize: vertical; line-height: 1.5; }
.consent { display: flex; align-items: start; gap: 10px; margin: 20px 0; }
.consent input { accent-color: var(--wine); margin: 3px 0 0; width: 18px; height: 18px; flex-shrink: 0; }
.primary { display: block; width: 100%; border: 0; border-radius: 4px; padding: 15px; background: var(--wine); color: white; text-decoration: none; text-align: center; font-weight: 600; }
.primary:hover { background: #42191e; }
#telegram { margin-top: 12px; }
footer { border-top: 1px solid var(--line); padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 760px) {
 .top { padding: 12px 18px; }
 .brand { width: 86px; }
 main { padding: 0 18px 36px; }
 .intro { padding: 26px 0; }
 .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
 .preview { position: static; }
 .cup { width: min(100%, 340px); }
 .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 320px; }
 .section-top { flex-wrap: wrap; }
 h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.cup-photo { clip-path: inset(0 0 0 51.6%); }
