:root {
  --accent: #e4572e;
  --accent-dark: #c9431d;
  --bg: #f7f5f2;
  --card: #ffffff;
  --text: #1d1b19;
  --muted: #77706a;
  --line: #e6e0d9;
  --ok: #2e8b57;
  --bad: #c0392b;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: var(--accent-dark); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-size: 17px; font-weight: 700; margin: 8px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
code { background: #efeae4; padding: 1px 5px; border-radius: 5px; font-size: .92em; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #cfc7be; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-dashed { width: 100%; border-style: dashed; background: transparent; color: var(--accent-dark); padding: 12px; }
.btn-dashed:hover { background: #fff; border-color: var(--accent); }
.btn-text { background: none; border: 0; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; margin-left: auto; }
.link { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; font-size: 14px; }
.danger { color: var(--bad); }
.icon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 15px; color: var(--muted); }
.icon:hover { background: #f0ebe5; color: var(--text); }
.icon.danger:hover { color: var(--bad); }
.icon-row { display: flex; gap: 2px; }
.icon-row form { margin: 0; }

label { display: block; font-weight: 600; font-size: 14px; }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: #fff; color: var(--text); }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
input[type=checkbox] { display: inline-block; width: auto; margin: 0 6px 0 0; }
input[type=color] { height: 44px; padding: 4px; }
input[type=file] { padding: 8px; font-size: 13px; }
.check { display: flex; align-items: center; font-weight: 500; }
.stack > * + * { margin-top: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.error { background: #fdecea; color: var(--bad); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.note { background: #fff6e0; border: 1px solid #f1dfae; padding: 10px 12px; border-radius: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 58px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 6px; }
.brand-qr { color: var(--accent); flex: none; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a.on { background: #f3ede7; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-right form { margin: 0; }
.pill { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pill-trial { background: #fff1d6; color: #8a5a00; }
.pill-bad { background: #fdecea; color: var(--bad); }
.flash { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; background: #1d1b19; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.2); transition: opacity .4s; max-width: 90vw; }
.flash-error { background: var(--bad); }
.flash.gone { opacity: 0; pointer-events: none; }

/* Workspace: editor + phone preview */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; max-width: 1180px; margin: 0 auto; padding: 28px 20px 80px; align-items: start; }
.narrow { max-width: 760px; margin: 0 auto; padding: 28px 20px 80px; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); margin-bottom: 16px; }
.preview { position: sticky; top: 82px; }
.phone-frame { width: 340px; height: 660px; margin: 0 auto 10px; border-radius: 40px; border: 10px solid #1d1b19; overflow: hidden; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.15); }
.phone-frame iframe { width: 100%; height: 100%; border: 0; }

.cat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; scroll-margin-top: 80px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cat-name { flex: 1; margin: 0; }
.cat-name input { margin: 0; border-color: transparent; font-size: 18px; font-weight: 800; padding: 6px 8px; background: transparent; }
.cat-name input:hover { border-color: var(--line); }
.items { list-style: none; margin: 0 0 10px; padding: 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border-top: 1px solid #f2ede7; scroll-margin-top: 80px; }
.item:first-child { border-top: 0; }
.item:hover { background: #faf7f3; }
.item.is-hidden .item-main { opacity: .45; }
.item.flash-row, .cat.flash-row { animation: glow 1.6s ease-out; }
@keyframes glow { from { background: #fff1d6; } to { background: transparent; } }
.item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.thumb { width: 56px; height: 56px; flex: none; border-radius: 10px; background: #f0ebe5 center/cover; display: grid; place-items: center; font-size: 20px; opacity: .9; }
.item-text { flex: 1; min-width: 0; }
.item-text b { display: block; font-size: 15px; }
.item-text small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price { font-weight: 700; white-space: nowrap; font-size: 15px; }
.item-price s { color: var(--muted); font-weight: 500; font-size: 13px; margin-right: 4px; }
.item-controls { display: flex; align-items: center; gap: 12px; }
.item-controls .icon-row { width: 66px; justify-content: flex-end; }

.switch { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 36px; height: 20px; border-radius: 999px; background: #d8d1c9; position: relative; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; }

.add-cat { display: flex; gap: 10px; }
.add-cat input { margin: 0; }

/* Dialog */
dialog#item-dialog { border: 0; border-radius: 18px; padding: 22px; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20,18,16,.5); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; font-size: 20px; }
.dialog-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }
.photo-drop { position: relative; display: grid; place-items: center; height: 170px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; overflow: hidden; background: #faf7f3; }
.photo-drop:hover { border-color: var(--accent); }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; height: 100%; }
.photo-preview { position: absolute; inset: 0; background: center/cover no-repeat; }
.photo-hint { position: relative; color: var(--muted); font-weight: 600; pointer-events: none; }
.photo-drop.has-photo { border-style: solid; }
.photo-drop.has-photo .photo-hint { background: rgba(0,0,0,.6); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 13px; align-self: end; margin-bottom: 10px; }

/* Menus (top level) and category photos */
.menu-bar { margin-bottom: 18px; }
.menu-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.menu-pill { display: inline-flex; align-items: center; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.menu-pill a { padding: 9px 18px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; }
.menu-pill.on { background: var(--accent); border-color: var(--accent); }
.menu-pill.on a { color: #fff; padding-right: 6px; }
.pill-edit { margin: 3px 4px 3px 0; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); color: #fff; font-size: 15px; cursor: pointer; }
.pill-edit:hover { background: rgba(255,255,255,.4); }
.menu-add { margin: 0; }
.menu-add input { margin: 0; width: 210px; border-style: dashed; background: transparent; padding: 8px 14px; border-radius: 999px; font-size: 14px; }
dialog#menu-dialog { border: 0; border-radius: 18px; padding: 22px; width: min(420px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
dialog#menu-dialog .dialog-head { margin-bottom: 14px; }
.menu-more { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.menu-more-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.menu-more-row form { margin: 0; }
.menu-more-row .btn[disabled] { opacity: .4; cursor: default; }
.menu-more-row .btn-text { margin-left: 6px; }
.cat-photo, .cat-move { margin: 0; }
.cat-move select { margin: 0; width: auto; padding: 5px 8px; font-size: 13px; border-radius: 8px; color: var(--muted); }
.cat-thumb { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: #f0ebe5 center/cover no-repeat; cursor: pointer; font-size: 18px; border: 1px dashed var(--line); overflow: hidden; }
.cat-thumb:hover { border-color: var(--accent); }
.cat-thumb input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; height: 100%; }

/* Sizes and add-ons in the dish dialog */
fieldset.opt { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin-left: 0; margin-right: 0; min-width: 0; }
fieldset.opt legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
fieldset.opt p { margin: 0 0 8px; }
.vrow { display: grid; grid-template-columns: 1fr 110px 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.vrow input { margin: 0; }
.btn-add { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-dark); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; max-height: 120px; overflow-y: auto; }
.chips[hidden] { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 11px; border-radius: 999px; border: 1px solid var(--ok); background: #e8f5ee; color: #1c5c39; font-size: 13px; font-weight: 600; }
.chip em { font-style: normal; font-weight: 500; opacity: .8; }
.chip-x { border: 0; background: transparent; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; line-height: 1; }
.chip-x:hover { background: rgba(0,0,0,.1); }
.combo { position: relative; }
.combo-row { display: flex; gap: 8px; }
.combo-row input { margin: 0; min-width: 0; flex: 1; }
.combo-row .combo-price { flex: 0 0 130px; }
.combo-row .combo-price[hidden] { display: none; }
.combo-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 190px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 4px; }
.combo-list[hidden] { display: none; }
.combo-opt { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.combo-opt:hover, .combo-opt.active { background: #f3ede7; }
.combo-opt.create { color: var(--accent-dark); font-weight: 700; }
.combo-empty { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.new-price { margin-top: 10px; }
.tags { display: flex !important; gap: 6px; margin-top: 3px; overflow: visible !important; }
.tags i { font-style: normal; font-size: 11px; font-weight: 600; background: #f0ebe5; color: var(--muted); padding: 1px 7px; border-radius: 999px; }
.item-price small { font-weight: 500; color: var(--muted); font-size: 12px; }
.lib { padding: 0; margin-top: 32px; }
.lib summary { cursor: pointer; padding: 14px; list-style: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lib summary::-webkit-details-marker { display: none; }
.lib summary::before { content: '▸'; color: var(--muted); }
.lib[open] summary::before { content: '▾'; }
.lib-title { font-size: 18px; font-weight: 800; }
.lib-search { margin: 0 14px 6px; width: calc(100% - 28px); }
.addon-lib { max-height: 320px; overflow-y: auto; }
.addon-lib li[hidden], .lib-none[hidden] { display: none; }
.lib-none { padding: 10px 0; color: var(--muted); font-size: 14px; }
.addon-lib { list-style: none; margin: 0; padding: 0 14px 12px; }
.addon-lib li { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.addon-lib form { margin: 0; }
.addon-edit { flex: 1; display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; }
.addon-edit input { margin: 0; }
@media (max-width: 520px) { .addon-edit { grid-template-columns: 1fr 90px auto; } .cat-head { flex-wrap: wrap; } }

/* Settings */
.setting-img { display: block; height: 70px; border-radius: 10px; margin: 6px 0; object-fit: cover; max-width: 100%; }
.setting-img.logo { width: 70px; border-radius: 50%; }
.prefix-input { display: flex; align-items: stretch; margin-top: 6px; }
.prefix-input span { padding: 10px 10px; background: #f3ede7; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; display: flex; align-items: center; }
.prefix-input input { margin: 0; border-radius: 0 10px 10px 0; min-width: 0; }

/* QR page */
.qr-layout { display: grid; grid-template-columns: auto 1fr; gap: 32px; margin-top: 24px; align-items: start; }
.qr-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px; text-align: center; border-top: 10px solid var(--accent); }
.qr-title { font-weight: 800; font-size: 20px; margin-bottom: 14px; }
.qr-sub { margin-top: 14px; font-weight: 600; color: var(--muted); }
#qr img, #qr canvas { display: block; margin: 0 auto; }
.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input { margin: 0; }
@media print {
  body * { visibility: hidden; }
  #qr-card, #qr-card * { visibility: visible; }
  #qr-card { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Billing */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--ok); } .dot.trial { background: #e0a100; } .dot.bad { background: var(--bad); }

/* Auth pages */
.center-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.auth-card h1 { margin-top: 18px; }
.auth-card form { margin: 18px 0; }

/* Landing */
.landing { background: #fffdfb; }
.land-nav { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; padding: 18px 20px; }
.land-nav nav { display: flex; align-items: center; gap: 18px; }
.land-nav nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; max-width: 1100px; margin: 0 auto; padding: 50px 20px 70px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 18px; }
.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-phones { position: relative; width: 100%; max-width: 480px; height: 520px; margin: 0 auto; }
.hero-phones .phone { position: absolute; width: 238px; }
.ph-back { left: -6px; top: 46px; transform: rotate(-8deg); z-index: 1; box-shadow: 0 28px 60px rgba(194,87,123,.30); }
.ph-front { right: 0; top: 0; transform: rotate(6deg); z-index: 2; }
.phone { border-radius: 36px; border: 9px solid #1d1b19; background: #faf8f5; overflow: hidden; box-shadow: 0 30px 70px rgba(228,87,46,.25);  padding-bottom: 14px; }
.ph-cover { height: 96px; background: #3a3128 center/cover no-repeat; position: relative; }
.ph-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.22)); }
.ph-logo { display: block; position: relative; width: 50px; height: 50px; margin: -26px auto 0; border-radius: 50%; border: 3px solid #faf8f5; background: #faf8f5; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.ph-name { font-weight: 800; font-size: 18px; text-align: center; padding: 6px 0 8px; }
.ph-tabs { display: flex; gap: 6px; padding: 0 12px 10px; font-size: 11px; font-weight: 600; }
.ph-tabs span { padding: 5px 10px; border-radius: 999px; }
.ph-tabs .on { background: var(--ph-accent, var(--accent)); color: #fff; }
.ph-item { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0 12px 8px; padding: 9px; font-size: 13px; }
.ph-item > div:last-child { display: flex; flex-direction: column; }
.ph-item small { color: var(--muted); font-size: 11px; }
.ph-item em { font-style: normal; font-weight: 700; margin-top: 2px; }
.ph-img { width: 54px; height: 54px; border-radius: 9px; flex: none; object-fit: cover; background: #efe9e1; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
.steps > div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.steps span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.steps h3 { margin: 14px 0 4px; }
.steps p { margin: 0; color: var(--muted); }
.features, .pricing { max-width: 820px; margin: 0 auto; padding: 20px 20px 60px; text-align: center; }
.features h2, .pricing h2 { font-size: 30px; letter-spacing: -0.02em; margin-bottom: 22px; }
.features ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.features li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px 13px 40px; position: relative; }
.features li::before { content: '✓'; position: absolute; left: 15px; color: var(--ok); font-weight: 800; }
.price-card { max-width: 340px; margin: 0 auto; background: var(--card); border: 2px solid var(--accent); border-radius: 22px; padding: 30px; }
.price { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.plan-toggle { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 22px; border-radius: 999px; background: #f0ebe5; border: 1px solid var(--line); }
.plan-toggle button { border: 0; background: transparent; padding: 9px 20px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.plan-toggle button.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.save-chip { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #e8f5ee; color: #1c5c39; }
[data-show][hidden] { display: none; }
.price-sub { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.price-sub b { color: #1c5c39; }
.price small { font-size: 18px; color: var(--muted); font-weight: 600; }
.land-foot { text-align: center; padding: 30px; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .preview { display: none; }
}
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; padding-top: 24px; } .hero-copy { text-align: center; } .lead { margin-left: auto; margin-right: auto; } .hero-cta { justify-content: center; } }
@media (max-width: 720px) {
  .hero-phones { transform: scale(.74); transform-origin: top center; margin-bottom: -130px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 14px; }
  .tabs { order: 3; flex-basis: 100%; }
  .topbar-right { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .steps, .features ul, .qr-layout { grid-template-columns: 1fr; }
  .land-nav nav a:not(.btn) { display: none; }
  .item { flex-wrap: wrap; }
  .item-controls { width: 100%; padding-left: 68px; justify-content: flex-start; }
  .editor-head { flex-direction: column; }
  .add-cat { flex-direction: column; }
  .row2 { grid-template-columns: 1fr; }
}

/* Billing plan picker */
.plan-box { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #faf7f3; }
.plan-box[hidden], .plan-box [hidden] { display: none; }
.price-sm { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-right: 8px; }
.price-sm small { font-size: 15px; color: var(--muted); font-weight: 600; }
.good { color: #1c5c39; }
.upgrade-box { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid #cfe8d9; background: #f1faf5; border-radius: 12px; }
.upgrade-box form { margin: 0; flex: none; }
@media (max-width: 560px) { .upgrade-box { flex-direction: column; align-items: stretch; } }

.stack > .forgot { margin: 8px 0 0; text-align: right; font-size: 13px; }

/* Languages */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }
.lang-opt { margin: 0; }

/* Translations page */
.tr-page { max-width: 900px; }
.lang-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.lang-pill { padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; }
.lang-pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lang-pill .count { font-weight: 600; font-size: 12px; opacity: .8; margin-left: 4px; }
.tr-filter { margin-bottom: 16px; font-size: 14px; }
.tr-sec { margin-bottom: 18px; padding: 16px 18px; }
.tr-sec h2 { margin: 0 0 8px; font-size: 18px; }
.tr-cat { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); }
.tr-dish { margin: 8px 0 0 14px; padding-left: 12px; border-left: 3px solid #f0ebe5; }
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 8px 0; align-items: start; }
.tr-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.tr-src { font-size: 15px; padding: 6px 0; color: var(--text); }
.tr-field input, .tr-field textarea { margin: 0; resize: vertical; }
.tr-state { display: block; min-height: 16px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.tr-state.ok { color: var(--ok); } .tr-state.bad { color: var(--bad); font-weight: 600; }
.only-missing .tr-row[data-missing="0"] { display: none; }
@media (max-width: 640px) { .tr-row { grid-template-columns: 1fr; gap: 4px; } .tr-dish { margin-left: 4px; } }

/* Stats band */
.stats { max-width: 1100px; margin: 0 auto; padding: 0 20px 56px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; text-align: center; }
.stat-num { font-size: clamp(38px, 4.6vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 8px; font-size: 14px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.stats-note { max-width: 760px; margin: 16px auto 0; text-align: center; line-height: 1.5; }
@media (max-width: 700px) { .stat-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

.stat-kicker { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stat-sub { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.stats-avg { max-width: 760px; margin: 22px auto 0; text-align: center; font-size: 17px; line-height: 1.5; }
.stats-avg b { color: var(--accent-dark); }
.stats-title { text-align: center; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em; margin: 0 0 8px; }
.stats-sub { text-align: center; max-width: 560px; margin: 0 auto 26px; }
.stat { padding: 26px 20px 20px; }
