:root {
  /* Layout: dark brick "cover" header, sticky sliding-pill category bar, 2-column photo grid (3 on wide screens). Staff page: tab bar over an orders board and editing cards. */
  --bg: #F4F2ED;
  --surface: #FFFFFF;
  --ink: #1E1B18;
  --muted: #6B645C;
  --line: #E3DED5;
  --accent: #8C1D24;
  --accent-ink: #FFFFFF;
  --accent-soft: #F6E5E4;
  --ok: #2E6B47;
  --ok-soft: #E3EEE8;
  --gold: #B8862F;
  --saffron-soft: #F6EAD2;
  --saffron-ink: #7A4E07;
  --cool-soft: #E3ECF6;
  --cool-ink: #1F4A75;
  --danger: #B3261E;
  --danger-soft: #FBE9E7;
  --tint0: #E4EDE8; --tint1: #F2E9D9; --tint2: #E8E6F0; --tint3: #F0E4E1;
  --shadow: 0 6px 24px rgba(30, 27, 24, .12);
  --font-display: "Reem Kufi", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --radius: 14px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.2, .9, .3, 1.2);
  --cover: #1A1411;
  --cover-ink: #F3E7D3;
  --cover-gold: #E2B65E;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311; --surface: #1E1C19; --ink: #F1ECE4; --muted: #A39B90; --line: #34302A;
    --accent: #E68A8E; --accent-ink: #2A0A0C; --accent-soft: #3A1E20; --ok: #7CC49B; --ok-soft: #1D2E25; --gold: #D9AE5F;
    --saffron-soft: #3A2E17; --saffron-ink: #F0C878; --cool-soft: #1E2733; --cool-ink: #9CC3EA; --danger: #F2B8B5; --danger-soft: #3A1F1D;
    --tint0: #1F2A24; --tint1: #2B2519; --tint2: #24232B; --tint3: #2C2221;
    --shadow: 0 6px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141311; --surface: #1E1C19; --ink: #F1ECE4; --muted: #A39B90; --line: #34302A;
  --accent: #E68A8E; --accent-ink: #2A0A0C; --accent-soft: #3A1E20; --ok: #7CC49B; --ok-soft: #1D2E25; --gold: #D9AE5F;
  --saffron-soft: #3A2E17; --saffron-ink: #F0C878; --cool-soft: #1E2733; --cool-ink: #9CC3EA; --danger: #F2B8B5; --danger-soft: #3A1F1D;
  --tint0: #1F2A24; --tint1: #2B2519; --tint2: #24232B; --tint3: #2C2221;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; color: var(--muted); }
.center { text-align: center; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
svg { width: 1em; height: 1em; flex: none; }

/* brick cover texture, shared by the header and the intro */
.brick {
  background-color: var(--cover);
  background-image:
    radial-gradient(120% 70% at 50% -12%, rgba(255, 226, 180, .22), rgba(255, 226, 180, 0) 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='32'%3E%3Crect width='64' height='32' fill='%231c1613'/%3E%3Crect x='2' y='1' width='60' height='13' fill='%23201915'/%3E%3Cpath d='M0 15.5h64M0 31.5h64M.75 0v15M32.75 16v15' stroke='%23100c0a' stroke-width='1.5'/%3E%3C/svg%3E");
  color: var(--cover-ink);
}

/* owner bar */
.ownerbar { background: #0E0B09; color: #EDE6DA; }
.ownerbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
.ob-label { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; opacity: .85; }
.seg-switch { display: inline-flex; background: rgba(255,255,255,.12); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-switch button { border: 0; background: transparent; color: inherit; padding: 6px 14px; border-radius: 999px; font-size: .875rem; font-weight: 600; transition: background .25s, color .25s; }
.seg-switch button[aria-selected="true"] { background: #EDE6DA; color: #1E1B18; }

/* header */
.hero { padding-block: 16px 26px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-main { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 6px; }
.logo-wrap { position: relative; }
.logo { width: 76px; height: 76px; border-radius: 20px; overflow: hidden; background: #141110; box-shadow: 0 0 0 1.5px var(--cover-gold), 0 10px 28px rgba(0,0,0,.45); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.cafe-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 8vw, 2.8rem); line-height: 1.15; color: var(--cover-gold); margin-top: 6px; }
.tagline { margin: 0; color: rgba(243, 231, 211, .78); font-size: .95rem; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.is-open { background: rgba(124, 196, 155, .16); color: #9BD8B3; }
.status.is-open .dot { animation: pulse 2.4s ease-in-out infinite; }
.status.is-closed { background: rgba(242, 184, 181, .16); color: #F2B8B5; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(155, 216, 179, .55); } 50% { box-shadow: 0 0 0 6px rgba(155, 216, 179, 0); } }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(243, 231, 211, .3); background: rgba(255,255,255,.06); color: var(--cover-ink); border-radius: 999px; padding: 4px 12px; font-size: .8125rem; font-weight: 600; }
.contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 8px; font-size: .875rem; }
.contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--cover-ink); text-decoration: none; opacity: .85; }
.steam { position: absolute; bottom: 100%; left: 50%; width: 56px; height: 44px; transform: translateX(-50%); pointer-events: none; }
.steam span { position: absolute; bottom: 0; width: 4px; height: 22px; border-radius: 4px; background: rgba(243, 231, 211, .5); filter: blur(1.2px); opacity: 0; }
.steam span:nth-child(1) { left: 14px; } .steam span:nth-child(2) { left: 26px; } .steam span:nth-child(3) { left: 38px; }
.steam.go span { animation: steam 1.5s ease-out 3; }
.steam.go span:nth-child(2) { animation-delay: .3s; } .steam.go span:nth-child(3) { animation-delay: .6s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px) scaleY(.5); } 30% { opacity: .85; } 100% { opacity: 0; transform: translate(5px, -30px) scaleY(1.4); } }

/* intro */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; transition: opacity .5s ease, visibility .5s; cursor: pointer; }
.splash.out { opacity: 0; visibility: hidden; }
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; }
.splash .logo { width: 104px; height: 104px; border-radius: 28px; animation: logoIn .8s var(--ease-spring) both; }
.splash .cafe-name { font-size: 3rem; animation: fadeUp .6s .25s var(--ease-out) both; }
.splash .tagline { animation: fadeUp .6s .4s var(--ease-out) both; }
.splash .steam { width: 72px; height: 60px; } .splash .steam span { height: 30px; }
.splash .steam span:nth-child(1) { left: 18px; } .splash .steam span:nth-child(2) { left: 34px; } .splash .steam span:nth-child(3) { left: 50px; }
@keyframes logoIn { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* search */
.search-wrap { padding-block: 16px 4px; }
.search { position: relative; display: flex; align-items: center; }
.search > svg { position: absolute; inset-inline-start: 14px; color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 11px 44px; min-height: 46px; transition: border-color .2s, box-shadow .2s; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search .clear { position: absolute; inset-inline-end: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }

/* category bar with sliding pill */
.cats { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); transition: opacity .2s; }
.cats.is-hidden { display: none; }
.cats-scroll { position: relative; display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.cats-scroll::-webkit-scrollbar { display: none; }
.chip { position: relative; z-index: 1; flex: none; border: 1px solid var(--line); background: var(--surface); padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 500; white-space: nowrap; transition: color .25s, border-color .25s, transform .15s; }
.chip:active { transform: scale(.96); }
.cats .chip.is-active { color: var(--bg); border-color: transparent; background: transparent; }
.chip-pill { position: absolute; top: 10px; left: 0; height: calc(100% - 20px); border-radius: 999px; background: var(--ink); z-index: 0; transition: transform .38s var(--ease-out), width .38s var(--ease-out); pointer-events: none; }
.filter-chips .chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* menu grid */
.menu { padding-block: 4px 24px; }
.cat-section { scroll-margin-top: 66px; padding-top: 20px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 10px; }
.sec-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.sec-head .count { font-size: .8rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.card-item { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: opacity .5s ease, transform .55s var(--ease-out), box-shadow .25s; }
.card-item.pre { opacity: 0; transform: translateY(22px) scale(.98); }
@media (hover: hover) { .card-item:hover { box-shadow: var(--shadow); } .card-item:hover .photo img { transform: scale(1.05); } }
.photo { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; width: 100%; border: 0; padding: 0; overflow: hidden; cursor: zoom-in; color: var(--muted); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out), filter .3s; }
.photo > svg { width: 38%; height: 38%; opacity: .6; }
.is-sold .photo img { filter: grayscale(1); opacity: .55; }
.tint0 { background: var(--tint0); } .tint1 { background: var(--tint1); } .tint2 { background: var(--tint2); } .tint3 { background: var(--tint3); }
.badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 16px); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.6; }
.b-new { background: var(--accent); color: var(--accent-ink); }
.b-pop { background: var(--saffron-soft); color: var(--saffron-ink); }
.b-hot { background: var(--saffron-soft); color: var(--saffron-ink); }
.b-cold { background: var(--cool-soft); color: var(--cool-ink); }
.b-both { background: var(--surface); color: var(--ink); }
.b-sold { background: var(--ink); color: var(--bg); }
.ci-body { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px 12px; flex: 1; }
.ci-body h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.ci-sub { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.ci-desc { margin: 2px 0 0; font-size: .75rem; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.price small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.add-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); transition: transform .15s; }
.add-btn svg { width: 18px; height: 18px; }
.add-btn:active { transform: scale(.88); }
.stepper { display: inline-flex; align-items: center; background: var(--accent); color: var(--accent-ink); border-radius: 999px; animation: stepIn .3s var(--ease-spring); }
.stepper button { border: 0; background: transparent; color: inherit; width: 30px; height: 32px; font-size: 1.05rem; font-weight: 700; line-height: 1; }
.stepper span { min-width: 18px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes stepIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.foot { color: var(--muted); font-size: .8125rem; padding-block: 8px 24px; text-align: center; }
.empty { color: var(--muted); text-align: center; padding: 36px 0; }
.owner-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 0; padding: 12px 14px; border: 1.5px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.owner-hint p { margin: 0; flex: 1 1 220px; font-size: .9rem; }
.owner-hint .btn { min-height: 40px; padding: 8px 16px; }
.notice { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius); padding: 12px 14px; margin: 16px 0 0; font-weight: 500; }
.results-head { padding-top: 18px; padding-bottom: 10px; font-weight: 600; color: var(--muted); font-size: .9rem; }

/* bottom bars */
.bottom-space { height: 110px; }
.cartbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.cartbar button { pointer-events: auto; width: 100%; max-width: 728px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 999px; padding: 14px 20px; background: var(--accent); color: var(--accent-ink); font-weight: 700; box-shadow: var(--shadow); }
.cartbar.enter button { animation: barIn .45s var(--ease-spring) both; }
@keyframes barIn { from { transform: translateY(130%); } to { transform: none; } }
.cb-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; background: rgba(255,255,255,.22); border-radius: 999px; font-variant-numeric: tabular-nums; }
.cb-count.pop { animation: pop .4s var(--ease-spring); }
@keyframes pop { 40% { transform: scale(1.45); } }
.flyer { position: fixed; z-index: 70; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--accent); pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); display: grid; place-items: center; color: var(--accent-ink); }
.flyer img { width: 100%; height: 100%; object-fit: cover; }
.savebar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); animation: barIn .35s var(--ease-out); }
.savebar-in { max-width: 688px; margin: 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.savebar-in .sb-text { flex: 1 1 100%; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; }
.savebar-in .btn { flex: 1; }
@media (min-width: 560px) { .savebar-in { flex-wrap: nowrap; } .savebar-in .sb-text { flex: 1 1 auto; } .savebar-in .btn { flex: none; } }
.sb-dot { width: 10px; height: 10px; border-radius: 50%; background: #D98A12; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 10px 18px; border-radius: 12px; font-weight: 600; text-decoration: none; color: var(--ink); min-height: 44px; transition: transform .15s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--danger); }
.input, .field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: .9rem; }
.hint { color: var(--muted); font-size: .8125rem; margin: 6px 0 0; }
.hint.warn { color: var(--danger); }
.ltr { direction: ltr; text-align: left; }
.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-soft) !important; }
.switch { position: relative; display: inline-flex; align-items: center; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; z-index: 1; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s var(--ease-spring); }
.switch input:checked + .track { background: var(--accent); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-20px); }
[dir="ltr"] .switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* admin */
.admin { padding-block: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.admin-title { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; }
.admin-head p { margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.status-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-card > div { display: flex; flex-direction: column; }
.status-card.is-closed { border-color: var(--danger); background: var(--danger-soft); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; position: sticky; top: 0; z-index: 5; }
.tab { border: 0; background: transparent; padding: 9px 4px; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--muted); transition: background .2s, color .2s; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tab-panel { display: flex; flex-direction: column; gap: 14px; animation: fadeUp .3s var(--ease-out); }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.alist, .clist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.arow { display: grid; grid-template-columns: 52px 1fr auto; grid-template-areas: "thumb main toggle" "thumb price toggle"; column-gap: 12px; row-gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.arow:last-child { border-bottom: 0; }
.arow.is-off .arow-name, .arow.is-off .thumb { opacity: .5; }
.arow-thumb { grid-area: thumb; border: 0; padding: 0; background: none; align-self: start; }
.thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 40%; height: 40%; opacity: .7; }
.thumb.big { width: 112px; height: 112px; border-radius: 14px; }
.arow-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; }
.arow-name { border: 0; background: none; padding: 0; text-align: start; font-weight: 600; font-size: 1rem; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.arow .price-field { grid-area: price; }
.arow-toggle { grid-area: toggle; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.price-field { display: inline-flex; align-items: center; gap: 6px; }
.price-field input { width: 104px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 6px 10px; min-height: 40px; direction: ltr; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.price-field .cur { color: var(--muted); font-size: .85rem; }
.crow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name actions" "en actions" "count actions"; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.crow:last-child { border-bottom: 0; }
.crow .c-name { grid-area: name; } .crow .c-en { grid-area: en; min-height: 38px; font-size: .9rem; } .crow .count { grid-area: count; }
.crow-actions { grid-area: actions; display: flex; gap: 6px; }
.add-row { display: flex; gap: 8px; }
.add-row .input { flex: 1; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form h3 { font-size: 1rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-row > span { display: flex; flex-direction: column; }
.logo-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.logo.sm { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--gold); }
.qr-type { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-type .chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.qr-box { display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 200px; }
.qr-box img { width: 100%; max-width: 340px; height: auto; }
.url-row { display: flex; gap: 8px; }
.url-row .input { flex: 1; direction: ltr; text-align: left; font-size: .85rem; }

/* sheets */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(15, 12, 10, 0); transition: background .3s ease; }
.modal.open { background: rgba(15, 12, 10, .5); }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92%; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; transform: translateY(105%); transition: transform .42s var(--ease-out); }
.modal.open .sheet { transform: none; }
.sheet::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -6px 0 -4px; flex: none; }
@media (min-width: 640px) {
  .modal { align-items: center; }
  .sheet { border-radius: 22px; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .35s var(--ease-out), opacity .25s; }
  .modal.open .sheet { opacity: 1; }
  .sheet::before { display: none; }
}
.modal.kind-zoom .sheet { position: relative; padding: 0; gap: 0; transform: none; opacity: 0; transition: opacity .3s ease; }
.modal.kind-zoom.open .sheet { opacity: 1; }
.modal.kind-zoom .sheet::before { display: none; }
.zoom-photo { position: relative; aspect-ratio: 1 / 1; width: 100%; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.zoom-photo img { width: 100%; height: 100%; object-fit: cover; }
.zoom-photo > svg { width: 30%; height: 30%; opacity: .6; }
.zoom-photo.hold img { visibility: hidden; }
.zoom-close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; border-radius: 50%; background: rgba(255,255,255,.9); color: #1E1B18; border: 0; }
.zoom-body { padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 4px; }
.zoom-body > * { animation: fadeUp .45s var(--ease-out) both; }
.zoom-body > *:nth-child(2) { animation-delay: .05s; } .zoom-body > *:nth-child(3) { animation-delay: .1s; } .zoom-body > *:nth-child(4) { animation-delay: .15s; } .zoom-body > *:nth-child(5) { animation-delay: .2s; }
.zoom-body h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.zoom-body .badges { position: static; }
.zoom-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.zoom-foot .price { font-size: 1.25rem; }
.zoom-foot .add-btn { width: auto; height: 44px; border-radius: 999px; padding: 0 20px; display: inline-flex; gap: 6px; font-weight: 700; }
.zoom-foot .stepper button { width: 40px; height: 44px; font-size: 1.2rem; }
.zoom-foot .stepper span { min-width: 24px; font-size: 1.05rem; }
.flip { position: fixed; z-index: 60; overflow: hidden; pointer-events: none; transform-origin: 0 0; }
.flip img { width: 100%; height: 100%; object-fit: cover; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }
.photo-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.photo-edit .photo-actions { display: flex; flex-direction: column; gap: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.confirm-box { background: var(--danger-soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; animation: fadeUp .25s var(--ease-out); }
.confirm-box .row { display: flex; gap: 8px; }
.confirm-box .row .btn { flex: 1; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cart-lines li { display: grid; grid-template-columns: 1fr auto 72px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cl-cat { display: block; font-size: .75rem; color: var(--muted); }
.cl-price { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; }
.seg { border: 0; padding: 0; margin: 0; }
.seg legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 8px; }
.seg-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-opts label { position: relative; }
.seg-opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opts span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; font-weight: 600; font-size: .9rem; transition: background .2s, border-color .2s, color .2s; }
.seg-opts input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.seg-opts input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.type-fields { animation: fadeUp .25s var(--ease-out); }
.total-row { display: flex; align-items: center; justify-content: space-between; font-size: 1.1rem; }
.total-row strong { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.sent-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px 0 4px; }
.check { width: 64px; height: 64px; }
.check circle { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s ease-out forwards; }
.check path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .5s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* toast */
.toast { position: fixed; top: 14px; inset-inline: 0; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); z-index: 80; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 500; font-size: .9rem; box-shadow: var(--shadow); transition: opacity .25s, transform .3s var(--ease-spring); }
.toast[hidden] { display: block; opacity: 0; transform: translateY(-14px); pointer-events: none; }

@media (max-width: 360px) { .grid { gap: 10px; } .ci-body { padding: 8px 10px 10px; } .tab { font-size: .8rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card-item.pre { opacity: 1; transform: none; }
}

/* ---------- live site additions ---------- */
.screen-msg { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.screen-msg .box { max-width: 440px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.screen-msg h1 { font-family: var(--font-display); font-size: 1.6rem; }
.screen-msg code { direction: ltr; unicode-bidi: isolate; background: var(--surface); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; }
.order-chip { position: fixed; z-index: 21; left: 0; right: 0; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); animation: barIn .45s var(--ease-spring) both; }
.order-chip.above-cart { bottom: calc(90px + env(safe-area-inset-bottom)); }
.order-chip .live { width: 10px; height: 10px; border-radius: 50%; background: #F2B33D; flex: none; animation: chipPulse 1.8s ease-in-out infinite; }
.order-chip.is-ready .live { background: #7CC49B; }
.order-chip.is-over .live { background: var(--muted); animation: none; }
@keyframes chipPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 179, 61, .6); } 50% { box-shadow: 0 0 0 7px rgba(242, 179, 61, 0); } }
.status-head { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding-top: 4px; }
.order-no { font-family: var(--font-display); font-size: 3.6rem; line-height: 1.05; color: var(--accent); font-variant-numeric: tabular-nums; }
.order-no-label { font-size: .85rem; color: var(--muted); }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); text-align: center; }
.steps .bar { width: 100%; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; position: relative; }
.steps .bar::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease-out); }
[dir="ltr"] .steps .bar::after { transform-origin: left; }
.steps li.done .bar::after, .steps li.now .bar::after { transform: scaleX(1); }
.steps li.now .bar::after { animation: stepGlow 1.6s ease-in-out infinite; }
.steps li.done, .steps li.now { color: var(--ink); font-weight: 600; }
@keyframes stepGlow { 50% { opacity: .45; } }
.status-msg { margin: 0; text-align: center; font-weight: 700; font-size: 1.1rem; }
.status-sub { margin: 0; text-align: center; color: var(--muted); font-size: .9rem; }
.order-recap { list-style: none; margin: 0; padding: 10px 12px; background: var(--bg); border-radius: 12px; font-size: .9rem; display: flex; flex-direction: column; gap: 4px; }
.order-recap li { display: flex; justify-content: space-between; gap: 10px; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-inline-end-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.err-box { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: 10px 12px; font-size: .9rem; font-weight: 500; margin: 0; }
.err-box:empty { display: none; }
.loading-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 20px; }
.skel { border-radius: 18px; background: var(--line); aspect-ratio: 3 / 4; animation: stepGlow 1.4s ease-in-out infinite; }
/* ---------- version 2 ---------- */
.order-chip .chip-more { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 8px; font-size: .78rem; line-height: 1.7; font-variant-numeric: tabular-nums; }
.my-orders { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: -6px; }
.my-orders .chip { font-size: .85rem; padding: 5px 12px; }
.my-orders .chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bottom-space { transition: height .25s; }
.qr-box img[hidden] { display: none; }
