:root, [data-theme="a"] {
  --bg: #0F1714; --surface: #18231F; --surface2: #21302A; --line: #2C3D36;
  --text: #F3EFE6; --muted: #A9B5AE; --accent: #D4B06A; --on-accent: #14110A; --accent-text: #D4B06A;
  --bar: #121B17; --r: 16px; --r-sm: 12px; --r-pill: 22px;
  --fd: 'El Messiri', serif; --fb: 'IBM Plex Sans Arabic', sans-serif; --fdw: 700;
}
[data-theme="b"] {
  --bg: #FFFFFF; --surface: #F4F2EE; --surface2: #E9E6DF; --line: #D9D5CC;
  --text: #111111; --muted: #5E5E5E; --accent: #111111; --on-accent: #FFFFFF; --accent-text: #7A5C14;
  --bar: #FFFFFF; --r: 0px; --r-sm: 0px; --r-pill: 0px;
  --fd: 'Reem Kufi', sans-serif; --fb: 'Tajawal', sans-serif; --fdw: 700;
}
[data-theme="c"] {
  --bg: #0B1220; --surface: #141D30; --surface2: #1E2A42; --line: #26324A;
  --text: #EEF2F8; --muted: #9FB0C8; --accent: #BFD0E6; --on-accent: #0B1220; --accent-text: #BFD0E6;
  --bar: #0E1626; --r: 22px; --r-sm: 16px; --r-pill: 26px;
  --fd: 'Almarai', sans-serif; --fb: 'Almarai', sans-serif; --fdw: 800;
}
[data-theme="d"] {
  --bg: #2A0F16; --surface: #3A1620; --surface2: #4A1E2A; --line: #54242F;
  --text: #F7ECE6; --muted: #D0B2B0; --accent: #E6B7A0; --on-accent: #2A0F16; --accent-text: #E6B7A0;
  --bar: #240C12; --r: 10px; --r-sm: 8px; --r-pill: 8px;
  --fd: 'Amiri', serif; --fb: 'Noto Sans Arabic', sans-serif; --fdw: 700;
}
[data-theme="e"] {
  --bg: #0B0B0C; --surface: #161617; --surface2: #222224; --line: #35322B;
  --text: #EDE6D6; --muted: #A8A193; --accent: #D9B45B; --on-accent: #0B0B0C; --accent-text: #D9B45B;
  --bar: #0F0F10; --r: 14px; --r-sm: 10px; --r-pill: 24px;
  --fd: 'El Messiri', serif; --fb: 'Tajawal', sans-serif; --fdw: 700;
}
[data-theme="e"] h1, [data-theme="e"] h2, [data-theme="e"] h3, [data-theme="e"] .pc .nm, [data-theme="e"] .opt b { color: var(--accent-text); }
[data-theme="e"] .pc .nm { font-family: var(--fd); font-size: 16px; font-weight: 600; }
[data-theme="e"][data-mode="dark"] .card, [data-theme="e"][data-mode="dark"] .pc { border-color: #4A4028; }
[data-theme="a"][data-mode="light"] {
  --bg: #F3F6F2; --surface: #FFFFFF; --surface2: #E4EBE5; --line: #CBD6CD;
  --text: #12201A; --muted: #51625A; --accent: #C9A43F; --on-accent: #14110A; --accent-text: #7A5C14; --bar: #FFFFFF;
}
[data-theme="b"][data-mode="dark"] {
  --bg: #0E0E0E; --surface: #1A1A1A; --surface2: #262626; --line: #363636;
  --text: #F5F5F5; --muted: #A6A6A6; --accent: #FFFFFF; --on-accent: #111111; --accent-text: #E3C675; --bar: #0E0E0E;
}
[data-theme="c"][data-mode="light"] {
  --bg: #F2F5FA; --surface: #FFFFFF; --surface2: #E3E9F3; --line: #CCD6E4;
  --text: #0B1220; --muted: #51607A; --accent: #1F3A68; --on-accent: #FFFFFF; --accent-text: #1F3A68; --bar: #FFFFFF;
}
[data-theme="d"][data-mode="light"] {
  --bg: #FBF3F0; --surface: #FFFFFF; --surface2: #F3E1DC; --line: #E4C9C2;
  --text: #2A0F16; --muted: #6E4A4F; --accent: #7A1F33; --on-accent: #FFFFFF; --accent-text: #7A1F33; --bar: #FFFFFF;
}
[data-theme="e"][data-mode="light"] {
  --bg: #FFFFFF; --surface: #F7F3E9; --surface2: #ECE5D3; --line: #DDD3BB;
  --text: #1B1A17; --muted: #5F5A4E; --accent: #C9A43F; --on-accent: #14110A; --accent-text: #86670F; --bar: #FFFFFF;
}
[data-mode="light"] { color-scheme: light; }
[data-mode="dark"] { color-scheme: dark; }
[data-theme="e"] .card.fill h3 { color: var(--on-accent); }

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--fb); font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; direction: rtl; display: flex; flex-direction: column; }
.boot { text-align: center; color: var(--muted); padding: 80px 16px; }
a { color: var(--accent-text); text-decoration: none; }
h1, h2, h3 { font-family: var(--fd); font-weight: var(--fdw); margin: 0; line-height: 1.3; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: 15px; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }

.top { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.top h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.top .sub { display: block; font-family: var(--fb); font-size: 12px; font-weight: 400; color: var(--muted); }
.brand { color: var(--accent-text); }
main { flex: 1; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 14px; }

.ib { width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.badge { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.btn { min-height: 50px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn.ghost { background: transparent; color: var(--accent-text); }
[data-theme="b"] .btn.ghost { color: var(--text); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--text); font-weight: 500; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 10px 6px; min-height: 44px; color: var(--muted); text-decoration: underline; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .price { color: var(--accent-text); font-weight: 700; }
.big { font-family: var(--fd); font-weight: var(--fdw); font-size: 26px; line-height: 1.2; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.hl { border-color: var(--accent); }
.card.fill { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.card.fill .muted, .card.fill .price { color: var(--on-accent); }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.kv > :first-child { color: var(--muted); flex-shrink: 0; }
.kv > :last-child { text-align: end; overflow-wrap: anywhere; }
.kv.it > :first-child { flex-shrink: 1; min-width: 0; overflow-wrap: anywhere; }
.kv.it > :last-child { flex-shrink: 0; white-space: nowrap; overflow-wrap: normal; }
.hr { height: 1px; background: var(--line); }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--accent); color: var(--on-accent); white-space: nowrap; }
.tag.out { background: transparent; border: 1px solid var(--accent); color: var(--accent-text); }
.tag.dim { background: var(--surface2); color: var(--muted); }
[data-theme="b"] .tag, [data-theme="b"] .tag.out { border-radius: 0; }
.note { font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.in, select.in, textarea.in { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); outline: 0; }
.in:focus { border-color: var(--accent); }
textarea.in { resize: vertical; min-height: 84px; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 44px; background: transparent; border: 0; outline: 0; color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 14px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pc a { color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.ph { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-sm); background: var(--surface2); color: var(--muted); font-size: 12px; display: flex; align-items: center; justify-content: center; object-fit: cover; }
.pc .nm { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.add { width: 44px; height: 44px; border-radius: var(--r-sm); border: 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
[data-theme="b"] .pc { background: transparent; border: 0; padding: 0; }
[data-theme="b"] .add { background: transparent; border: 1px solid var(--text); color: var(--text); }
[data-theme="c"] .grid { grid-template-columns: minmax(0, 1fr); }
[data-theme="c"] .pc { flex-direction: row; align-items: center; }
[data-theme="c"] .pc a { flex: 1; flex-direction: row; align-items: center; min-width: 0; }
[data-theme="c"] .pc .ph { width: 76px; height: 76px; aspect-ratio: auto; flex-shrink: 0; }
[data-theme="c"] .pc .pr { flex-direction: column; align-items: flex-end; gap: 6px; }
[data-theme="c"] .add { border-radius: 50%; }
[data-theme="d"] .pc { border-radius: 90px 90px 10px 10px; padding: 8px 8px 10px; }
[data-theme="d"] .pc .ph { border-radius: 82px 82px 6px 6px; }
[data-theme="d"] .pc .nm { font-family: var(--fd); font-size: 17px; font-weight: 700; text-align: center; }
[data-theme="d"] .add { border-radius: 50%; background: transparent; border: 1px solid var(--accent); color: var(--accent); }
[data-theme="d"] .top.home { flex-direction: column; text-align: center; }

.hero { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.thumb { width: 76px; height: 76px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--surface2); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }

.bar { position: sticky; bottom: 0; z-index: 500; background: var(--bar); border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; }
.nav { position: sticky; bottom: 0; z-index: 500; display: flex; background: var(--bar); border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
.nav a { flex: 1; min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); position: relative; }
.nav a.on { color: var(--accent-text); font-weight: 700; }
[data-theme="b"] .nav a.on { color: var(--text); }
.nav .badge { top: 0; inset-inline-end: 22%; }

.opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.opt.on { border-color: var(--accent); }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-text); flex-shrink: 0; }
.logo { width: 52px; height: 44px; flex-shrink: 0; border-radius: 8px; background: #F3EFE6; color: #3A3A3A; font-size: 10px; object-fit: contain; display: flex; align-items: center; justify-content: center; text-align: center; padding: 3px; }

#map { height: 62vh; min-height: 360px; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; z-index: 1; background: var(--surface); }
.mapwrap { position: relative; }
.pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 450; pointer-events: none; color: var(--accent); }
[data-theme="b"] .pin, [data-mode="light"] .pin { color: #B8860B; }
.maptools { position: absolute; bottom: 12px; inset-inline: 12px; z-index: 450; display: flex; gap: 8px; flex-wrap: wrap; }
.maptools .btn { background: var(--bg); flex: 1; min-width: 0; padding-inline: 10px; white-space: nowrap; }
.mapwrap.full { position: fixed; inset: 0; z-index: 3000; background: var(--bg); }
.mapwrap.full #map { height: 100%; min-height: 0; border-radius: 0; border: 0; }
.mapwrap.full .maptools { bottom: calc(16px + env(safe-area-inset-bottom)); }
body.mapfull { overflow: hidden; }
body.mapfull .nav, body.mapfull .bar { display: none; }
.leaflet-container { font-family: inherit; }

.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 12px; }
.step .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--on-accent); }
.step .ln { width: 2px; flex: 1; min-height: 22px; background: var(--line); }
.step .rail { display: flex; flex-direction: column; align-items: center; }
.step .tx { padding-bottom: 14px; color: var(--muted); font-size: 14px; }
.step.done .dot { background: var(--accent); border-color: var(--accent); }
.step.done .ln { background: var(--accent); }
.step.done .tx { color: var(--text); }
.step.now .dot { border-color: var(--accent); }
.step.now .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.step.now .tx { color: var(--accent-text); font-weight: 700; }
[data-theme="b"] .step.now .tx { color: var(--text); }

.drop { border: 1.5px dashed var(--accent); border-radius: var(--r); background: var(--surface); padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.drop img, .rcpt { max-width: 100%; max-height: 380px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; }

.sw { width: 56px; height: 44px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; flex-shrink: 0; }
.sw i { width: 56px; height: 32px; padding: 0 4px; border-radius: 16px; background: var(--line); display: flex; align-items: center; justify-content: flex-start; }
.sw i::after { content: ''; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); }
.sw[aria-checked="true"] i { background: var(--accent); justify-content: flex-end; }
.sw[aria-checked="true"] i::after { background: var(--on-accent); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 4px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.seg button { min-height: 44px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); font-size: 13px; padding: 0 4px; }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.th { border: 2px solid var(--line); border-radius: 12px; padding: 12px; min-height: 96px; display: flex; flex-direction: column; gap: 8px; text-align: start; }
.th.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.th b { font-size: 17px; } .th span { font-size: 12px; }
.th i { display: block; width: 36px; height: 8px; border-radius: 4px; }

#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 2000; max-width: 88vw; padding: 12px 18px; border-radius: 12px; background: #111; color: #fff; border: 1px solid #555; font-family: var(--fb); font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

.bn { display: grid; }
.bnc { grid-area: 1 / 1; display: flex; align-items: center; min-height: 76px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--surface); padding: 14px 16px; font-family: var(--fd); font-weight: var(--fdw); font-size: 19px; line-height: 1.5; color: var(--accent-text); overflow-wrap: anywhere; opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
.bnc.on { opacity: 1; transform: none; pointer-events: auto; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: -6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: width .3s, background .3s; }
.dots i.on { width: 18px; border-radius: 3px; background: var(--accent-text); }
@media (prefers-reduced-motion: reduce) { .bnc, .dots i { transition: none; transform: none; } }
[data-theme="b"] .bnc { background: var(--text); color: var(--bg); border-color: var(--text); }

.chk { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.chk input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-text); flex-shrink: 0; }
.code { font-weight: 700; letter-spacing: 1px; }

.msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; display: flex; flex-direction: column; gap: 3px; }
.msg.me { align-self: flex-start; }
.msg.them { align-self: flex-end; align-items: flex-end; }
.bub { padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.msg.me .bub { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.seg button { white-space: nowrap; }

/* ---------- luxury pass ---------- */
[data-mode="dark"] { --sh: 0 22px 46px -28px rgba(0, 0, 0, .95); --foil: linear-gradient(135deg, #F2DA92 0%, #D6B15A 46%, #AE882D 100%); }
[data-mode="light"] { --sh: 0 16px 36px -24px rgba(60, 45, 10, .38); --foil: linear-gradient(135deg, #E6CA76 0%, #C9A43F 50%, #A6822A 100%); }
[data-theme="e"] { --bg: #0A0908; --surface: #15120E; --surface2: #201B13; --line: #332C1C; --bar: #0E0C0A; --r: 18px; --r-sm: 14px; }
.card, .pc, .opt, .bnc { box-shadow: var(--sh); }
[data-theme="b"] .pc { box-shadow: none; }
.btn, .add, .chip, .ib { transition: transform .15s ease, filter .15s ease, background-color .2s ease; }
.btn:active, .add:active, .chip:active, .ib:active { transform: scale(.96); }
[data-theme="a"] .btn:not(.ghost):not(.quiet), [data-theme="e"] .btn:not(.ghost):not(.quiet),
[data-theme="a"] .add, [data-theme="a"] .chip.on, [data-theme="e"] .chip.on,
[data-theme="a"] .card.fill, [data-theme="e"] .card.fill,
[data-theme="a"] .seg button.on, [data-theme="e"] .seg button.on,
[data-theme="a"] .badge, [data-theme="e"] .badge,
[data-theme="a"] .msg.me .bub, [data-theme="e"] .msg.me .bub { background: var(--foil); border-color: transparent; color: var(--on-foil, #14110A); }
[data-theme="e"] .add { border-radius: 50%; background: transparent; border: 1px solid var(--accent); color: var(--accent-text); }
[data-theme="e"] .ib, [data-theme="a"] .ib { border-radius: 50%; }
.in:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }

.top.home { padding-top: 22px; }
.top.home .brand { display: inline-block; font-size: 32px; line-height: 1.25; }
.top.home .brand::after { content: ''; display: block; width: 64px; height: 1px; margin-top: 8px; background: var(--accent-text); opacity: .7; }
[data-theme="d"] .top.home .brand::after { margin-inline: auto; }
.sec { display: flex; align-items: center; gap: 12px; font-family: var(--fd); font-weight: var(--fdw); font-size: 18px; margin-top: 4px; }
.sec::before, .sec::after { content: ''; height: 1px; background: var(--line); }
.sec::before { width: 18px; background: var(--accent-text); }
.sec::after { flex: 1; }
[data-theme="e"] .sec { color: var(--accent-text); }

.bnc { justify-content: center; text-align: center; min-height: 96px; padding: 22px 24px; font-size: 20px; outline: 1px solid var(--accent); outline-offset: -7px; }
[data-theme="b"] .bnc { outline-color: var(--bg); }
.dots { margin-top: -2px; }

.pc { padding: 10px 10px 12px; gap: 10px; }
.pc .ph { aspect-ratio: 1 / 1; }
.pc .nm { font-family: var(--fd); font-size: 16px; font-weight: 600; line-height: 1.4; }
.price b { font-size: 18px; font-weight: 700; }
.cur { font-size: 11px; font-weight: 500; color: var(--muted); margin-inline-start: 4px; }
.mono { background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line), inset 0 0 0 7px var(--surface2), inset 0 0 0 8px var(--line); }
.mono span { font-family: var(--fd); font-weight: var(--fdw); font-size: 46px; line-height: 1; color: var(--accent-text); opacity: .85; }
.hero.mono span { font-size: 110px; }
.thumb.mono { box-shadow: inset 0 0 0 1px var(--line); }
.thumb.mono span { font-size: 26px; }
[data-theme="c"] .pc .ph { aspect-ratio: auto; }
[data-theme="c"] .pc .mono span { font-size: 28px; }
[data-theme="c"] .pc .mono { box-shadow: inset 0 0 0 1px var(--line); }
[data-theme="d"] .pc .mono { box-shadow: inset 0 0 0 1px var(--line); }

.nav { bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0 12px calc(10px + env(safe-area-inset-bottom)); padding: 6px; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--sh); background: var(--bar); background: color-mix(in srgb, var(--bar) 86%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.nav a { border-radius: 20px; min-height: 52px; }
.nav a.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
[data-theme="b"] .nav, [data-theme="b"] .nav a { border-radius: 0; }
.nav .badge { top: 2px; }
.bar { background: var(--bar); background: color-mix(in srgb, var(--bar) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }

@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#app.enter main > *, #app.enter .grid > * { animation: up .5s cubic-bezier(.2, .7, .2, 1) both; }
#app.enter main > *:nth-child(2), #app.enter .grid > *:nth-child(2) { animation-delay: .05s; }
#app.enter main > *:nth-child(3), #app.enter .grid > *:nth-child(3) { animation-delay: .1s; }
#app.enter main > *:nth-child(4), #app.enter .grid > *:nth-child(4) { animation-delay: .15s; }
#app.enter main > *:nth-child(n+5), #app.enter .grid > *:nth-child(n+5) { animation-delay: .2s; }
#app.enter main > .mapwrap, #app.enter main > .card:has(#map) { animation: none; }
@media (prefers-reduced-motion: reduce) { #app.enter main > *, #app.enter .grid > * { animation: none; } .btn, .add, .chip, .ib { transition: none; } }

.logo-s { width: 54px; height: 54px; flex-shrink: 0; border-radius: var(--r-sm); object-fit: contain; background: var(--surface); border: 1px solid var(--line); padding: 3px; display: flex; align-items: center; justify-content: center; }
.logo-s.mono { box-shadow: none; padding: 0; background: var(--surface2); }
.logo-s.mono span { font-size: 26px; }
[data-theme="e"] .logo-s, [data-theme="a"] .logo-s { border-color: var(--accent); }

/* light refinement */
:root { --edge: var(--accent); }
[data-theme="a"][data-mode="light"] {
  --bg: #F5F1E8; --surface: #FFFDF8; --surface2: #ECE6D8; --line: #DDD3BE; --text: #16302A; --muted: #5C6961;
  --accent: #17483A; --on-accent: #F4E4B5; --accent-text: #17483A; --bar: #FFFDF8; --edge: #B8964A;
  --foil: linear-gradient(135deg, #246552 0%, #17483A 50%, #103328 100%); --on-foil: #F4E4B5;
}
[data-theme="e"][data-mode="light"] {
  --bg: #FAF7F0; --surface: #FFFFFF; --surface2: #F0EADB; --line: #E0D6BF; --text: #1A1712; --muted: #6B6354;
  --accent: #1A1712; --on-accent: #EBD28E; --accent-text: #1A1712; --bar: #FFFFFF; --edge: #B8964A;
  --foil: linear-gradient(135deg, #322B1F 0%, #1A1712 55%, #0E0C09 100%); --on-foil: #EBD28E;
}
[data-theme="b"][data-mode="light"] { --accent-text: #111111; --edge: #B8964A; }
.card.hl, .opt.on, .bnc, .drop, .logo-s, .in:focus { border-color: var(--edge); }
.bnc { outline-color: var(--edge); }
.top.home .brand::after, .sec::before { background: var(--edge); opacity: 1; }
.mono span { color: var(--edge); }
[data-theme="e"] .add { border-color: var(--edge); color: var(--edge); }
[data-theme="b"] .bnc { border-color: var(--text); outline-color: var(--bg); }
[data-mode="light"] .card, [data-mode="light"] .pc, [data-mode="light"] .opt { border-color: var(--line); }
[data-mode="light"] .card.hl, [data-mode="light"] .opt.on { border-color: var(--edge); }
[data-theme="a"][data-mode="light"] .btn.ghost, [data-theme="e"][data-mode="light"] .btn.ghost { border-color: var(--edge); color: var(--text); }
[data-theme="a"][data-mode="light"] .tag.out, [data-theme="e"][data-mode="light"] .tag.out { border-color: var(--edge); color: var(--text); }
