:root {
  --bg: #0d1117; --panel: #161c25; --panel2: #1e2632; --line: #2b3545; --text: #f2f5f9; --muted: #9aa7b8;
  --blue: #35a7ee; --blue-d: #1b86cf; --yellow: #f5c518; --green: #37c978; --red: #f0605d;
  --script: 'Kaushan Script', 'Brush Script MT', cursive; --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif; --r: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 14px; } .right { text-align: right; } .center { text-align: center; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 16px; background: rgba(13,17,23,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand img { height: 58px; display: block; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.pill { font: 600 13px var(--cond); letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.pill.open { color: var(--green); border-color: rgba(55,201,120,.5); } .pill.closed { color: var(--red); border-color: rgba(240,96,93,.5); }

.btn { border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--blue); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #04121d; } .btn.primary:hover { background: #5bbaf4; }
.btn.ghost { background: transparent; } .btn.wide { width: 100%; padding: 14px; font-size: 17px; } .btn.sm { padding: 6px 10px; font-size: 14px; }
.btn.danger { color: var(--red); }
.basket-btn { display: flex; gap: 8px; align-items: center; } .basket-btn b { background: #04121d; color: #fff; border-radius: 99px; min-width: 22px; padding: 0 6px; font-size: 13px; line-height: 22px; text-align: center; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.hero { text-align: center; padding: 34px 16px 26px; background: radial-gradient(900px 320px at 50% 0, #1c3145 0, transparent 70%); }
.hero img { width: min(420px, 78vw); }
.hero h1 { font: 400 clamp(30px, 6vw, 46px)/1.1 var(--script); color: var(--blue); margin-top: 10px; }
.hero p { margin: 8px auto 0; max-width: 620px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-size: 14px; }
.chip b { color: var(--yellow); }
.notice { max-width: 900px; margin: 14px auto 0; background: #3a1d1f; border: 1px solid #7a3836; border-radius: var(--r); padding: 12px 16px; text-align: center; }
.offers { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 1000px; margin: 20px auto 0; text-align: left; }
.offer { background: linear-gradient(135deg, #12334b, #17202b); border: 1px dashed var(--blue); border-radius: var(--r); padding: 12px 16px; }
.offer h3 { font: 700 20px var(--cond); text-transform: uppercase; letter-spacing: .03em; }
.offer code { background: var(--yellow); color: #111; padding: 1px 8px; border-radius: 6px; font-weight: 700; }

.catnav { position: sticky; top: 69px; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; padding: 10px 12px; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a { display: inline-block; padding: 6px 14px; margin-right: 6px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; font: 600 15px var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.catnav a.on { background: var(--blue); border-color: var(--blue); color: #04121d; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 8px 16px 60px; align-items: start; }
.side { position: sticky; top: 130px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; max-height: calc(100vh - 150px); overflow: auto; }
.cat { padding-top: 26px; }
.cat h2 { font: 400 34px/1 var(--script); color: var(--blue); display: flex; align-items: center; gap: 14px; }
.cat h2::after { content: ''; flex: 1; border-top: 3px dotted #55606f; }
.cat-note { color: var(--yellow); font: 600 15px var(--cond); letter-spacing: .05em; text-transform: uppercase; margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.item { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; cursor: pointer; text-align: left; width: 100%; position: relative; }
.item:hover { border-color: var(--blue); }
.item.off { opacity: .55; cursor: not-allowed; }
.item img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; flex: none; background: var(--panel2); }
.item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item h3 { font: 700 19px/1.15 var(--cond); text-transform: uppercase; letter-spacing: .02em; }
.item p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.item .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.price { font-weight: 600; } .price small { color: var(--blue); font-weight: 500; margin-left: 6px; }
.add { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #04121d; font: 700 22px/32px var(--body); text-align: center; flex: none; }
.badge { display: inline-block; background: var(--yellow); color: #111; font: 700 11px var(--cond); letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; border-radius: 99px; vertical-align: middle; margin-left: 6px; }

.basket h2 { font: 700 22px var(--cond); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.bline { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bline .opts { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { border: 0; background: var(--panel2); width: 30px; height: 30px; cursor: pointer; font-size: 18px; line-height: 1; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.totals { margin: 12px 0; } .totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.totals .less { color: var(--green); }

.drawer, .modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: none; }
.drawer.show, .modal.show { display: block; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); padding: 18px; overflow: auto; }
.modal { overflow: auto; padding: 4vh 12px; }
.modal-card { max-width: 520px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.modal-img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.modal-pad { padding: 18px; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.modal-head h2 { font: 700 26px/1.1 var(--cond); text-transform: uppercase; }
.x { border: 0; background: var(--panel2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 20px; flex: none; }
.group { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.group h4 { margin: 0 0 6px; font: 700 17px var(--cond); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; gap: 8px; }
.group h4 span { font: 600 12px var(--body); text-transform: none; letter-spacing: 0; padding: 2px 8px; border-radius: 99px; background: var(--panel2); color: var(--muted); }
.group h4 span.req { background: #4a3a05; color: var(--yellow); } .group h4 span.ok { background: #0f3a24; color: var(--green); }
.opt { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 8px; cursor: pointer; }
.opt:hover { background: var(--panel2); }
.opt input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.opt .nm { flex: 1; } .opt.dis { opacity: .45; cursor: not-allowed; }
.star { color: var(--yellow); font-size: 12px; font-weight: 700; margin-left: 6px; }
.modal-foot { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.modal-foot .btn { flex: 1; }

label.f { display: block; margin-top: 12px; font-weight: 600; font-size: 14px; }
.in { width: 100%; margin-top: 4px; padding: 11px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.in:focus { border-color: var(--blue); outline: 0; }
textarea.in { resize: vertical; min-height: 60px; }
.check { display: flex; gap: 10px; align-items: start; margin-top: 12px; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.err { color: var(--red); margin-top: 10px; min-height: 1.2em; font-size: 14.5px; }
.tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.tabs button { flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; cursor: pointer; font-weight: 600; }
.tabs button.on { background: var(--blue); color: #04121d; border-color: var(--blue); }

.page { max-width: 1000px; margin: 0 auto; padding: 22px 16px 80px; }
.page h1 { font: 400 38px var(--script); color: var(--blue); margin-bottom: 14px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card h2 { font: 700 20px var(--cond); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { padding: 14px 10px; border: 2px solid var(--line); background: var(--bg); border-radius: 12px; cursor: pointer; font-weight: 600; text-align: center; }
.seg button small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.seg button.on { border-color: var(--blue); background: #10293b; }
.rowf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline { display: flex; gap: 8px; } .inline .in { margin-top: 0; }
.okmsg { color: var(--green); } .warnmsg { color: var(--yellow); }
.points-big { font: 700 44px/1 var(--cond); color: var(--yellow); }
.bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; } .bar i { display: block; height: 100%; background: var(--yellow); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0; }
.steps div { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font: 600 14px var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.steps div.done { background: #0f3a24; border-color: #1f6b44; color: var(--green); } .steps div.now { background: #10293b; border-color: var(--blue); color: #fff; }
table.t { width: 100%; border-collapse: collapse; } table.t td, table.t th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; }

.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(13,17,23,.96); border-top: 1px solid var(--line); display: none; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #fff; color: #111; padding: 10px 16px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: 90vw; }
.toast.show { opacity: 1; }
.foot { border-top: 1px solid var(--line); padding: 24px 16px 100px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; max-width: 1240px; margin: 0 auto; font-size: 14.5px; }

@media (max-width: 900px) {
  .layout, .two { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-bar { display: block; }
  .basket-btn span { display: none; }
  .brand img { height: 42px; }
  .catnav { top: 59px; }
  #openBadge { display: none; }
  .rowf { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
