/* Khulasa design preview — "Private Bank" look (shared with Command Center):
   lacquer black, champagne gold hairlines, serif display type, small-caps eyebrows,
   engine-turned (guilloché) engraving. Light mode turns to ivory paper. AA contrast. */

:root {
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --arabic: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Al Nile", -apple-system, "Segoe UI", sans-serif;
  --track: 0.16em;
  --r: 10px;
  --r-lg: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --guilloche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 28' width='80' height='28'%3E%3Cg fill='none' stroke='%23000' stroke-width='.5'%3E%3Cpath d='M0 14C10 2 30 2 40 14S70 26 80 14'/%3E%3Cpath d='M0 19C12 6 28 0 40 9S68 30 80 19'/%3E%3Cpath d='M0 22C12 10 26 2 40 6S70 30 80 22'/%3E%3Cpath d='M0 23C14 14 24 4 40 5S66 26 80 23'/%3E%3Cpath d='M0 9C12 22 28 28 40 19S68-2 80 9'/%3E%3Cpath d='M0 6C12 18 26 26 40 22S70-2 80 6'/%3E%3C/g%3E%3C/svg%3E");
  --rosette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23000' stroke-width='.45'%3E%3Cellipse cx='100' cy='100' rx='95' ry='31'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(15 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(30 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(45 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(60 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(75 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(90 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(105 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(120 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(135 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(150 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='95' ry='31' transform='rotate(165 100 100)'/%3E%3Ccircle cx='100' cy='100' r='14'/%3E%3Ccircle cx='100' cy='100' r='22'/%3E%3Ccircle cx='100' cy='100' r='30'/%3E%3C/g%3E%3C/svg%3E");
}

[data-mode="dark"] {
  --bg: #070706; --bg-raised: #0b0b0a; --surface: #11100e; --surface-2: #1a1814;
  --line: #2c2820; --text: #f1ebdf; --text-dim: #bdb4a4; --text-mute: #9a917f;
  --gold: #d1b47c; --gold-hi: #f0dcb0; --gold-lo: #8a6d3b; --on-gold: #17120a;
  --hair: rgba(209, 180, 124, 0.22); --hair-soft: rgba(209, 180, 124, 0.11);
  --lacquer: radial-gradient(120% 80% at 0% 0%, rgba(209, 180, 124, 0.07), transparent 55%), radial-gradient(90% 70% at 100% 0%, rgba(120, 104, 74, 0.08), transparent 60%);
  --green: #8fcf9f; --amber: #e5bd6a; --red: #f08a7a;
  --wa-bg: #0d0f0e; --wa-bubble: #1d1b17; --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
[data-mode="light"] {
  --bg: #f4efe6; --bg-raised: #ede6da; --surface: #fffcf6; --surface-2: #f3ece0;
  --line: #ddd2bf; --text: #17140f; --text-dim: #4a4337; --text-mute: #6b6252;
  --gold: #7d5d25; --gold-hi: #b08a4a; --gold-lo: #5b4318; --on-gold: #f6ead0;
  --hair: rgba(125, 93, 37, 0.30); --hair-soft: rgba(125, 93, 37, 0.14);
  --lacquer: radial-gradient(120% 80% at 0% 0%, rgba(176, 138, 74, 0.10), transparent 55%);
  --green: #2f6b3f; --amber: #85540a; --red: #a3291b;
  --wa-bg: #efe7da; --wa-bubble: #fffcf6; --shadow: 0 18px 50px rgba(60, 40, 10, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--lacquer), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
[dir="rtl"] body, [dir="rtl"] .display, [dir="rtl"] .wa-body { font-family: var(--arabic); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- sample band ---------- */
.sample-band { position: sticky; top: 0; z-index: 30;
  text-align: center; font-size: 10.5px; letter-spacing: var(--track); text-transform: uppercase;
  color: var(--on-gold); background: linear-gradient(90deg, var(--gold-lo), var(--gold), var(--gold-lo));
  padding: 5px 12px calc(5px); padding-top: calc(5px + env(safe-area-inset-top, 0px)); font-weight: 600;
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - 28px); }
.rail { display: none; }
.main { min-width: 0; padding: 20px 18px calc(96px + var(--safe-b)); max-width: 1080px; width: 100%; margin: 0 auto; outline: none; }

@media (min-width: 900px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); }
  .rail {
    display: flex; flex-direction: column; gap: 28px; position: sticky; top: 28px; height: calc(100dvh - 28px);
    padding: 28px 18px; background: linear-gradient(180deg, rgba(209, 180, 124, 0.04), transparent 220px), var(--bg-raised);
    box-shadow: inset -1px 0 0 var(--hair-soft); overflow: hidden;
  }
  [dir="rtl"] .rail { box-shadow: inset 1px 0 0 var(--hair-soft); }
  .rail::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 150px; pointer-events: none;
    background: linear-gradient(180deg, var(--gold), transparent);
    -webkit-mask: var(--guilloche) repeat 0 0 / 80px 28px; mask: var(--guilloche) repeat 0 0 / 80px 28px; opacity: 0.22;
  }
  .main { padding: 40px 44px 60px; }
  .tabbar { display: none !important; }
}

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; position: relative; }
.crest {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  box-shadow: 0 0 0 1px var(--hair), 0 0 0 4px var(--bg-raised), 0 0 0 5px var(--hair);
}
.crest::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--on-gold); -webkit-mask: var(--rosette) center / cover; mask: var(--rosette) center / cover; opacity: 0.35; }
.crest span { position: relative; font: 600 22px/1 var(--arabic); color: var(--on-gold); margin-top: -2px; }
.wordmark { font: 500 22px/1 var(--serif); letter-spacing: 0.02em; }
.wordmark-ar { font: 15px/1.2 var(--arabic); color: var(--gold); margin-top: 3px; }

/* ---------- nav ---------- */
.nav { display: flex; flex-direction: column; gap: 2px; position: relative; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--text-dim);
  font-size: 14px; transition: background .2s, color .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface); box-shadow: inset 2px 0 0 var(--gold); }
[dir="rtl"] .nav a[aria-current="page"] { box-shadow: inset -2px 0 0 var(--gold); }
.nav a[aria-current="page"] .ic { color: var(--gold); }
.nav .badge { margin-inline-start: auto; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; position: relative; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + var(--safe-b));
  background: color-mix(in srgb, var(--bg-raised) 86%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 -1px 0 var(--hair-soft);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--text-mute); font-size: 10.5px; letter-spacing: 0.04em; position: relative; }
.tabbar a .ic { width: 23px; height: 23px; }
.tabbar a[aria-current="page"] { color: var(--gold); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -8px; width: 22px; height: 2px; border-radius: 2px; background: var(--gold); }
.tabbar .badge { position: absolute; top: 2px; inset-inline-end: calc(50% - 20px); }

.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--on-gold); font: 600 10.5px/18px var(--sans); text-align: center; }

/* ---------- type ---------- */
.eyebrow, .section { text-transform: uppercase; letter-spacing: var(--track); font-size: 10.5px; font-weight: 600; color: var(--gold); }
[dir="rtl"] .eyebrow, [dir="rtl"] .section { letter-spacing: 0; font-size: 12.5px; }
.display { font: 400 34px/1.1 var(--serif); letter-spacing: -0.01em; margin: 6px 0 0; }
.display.sm { font-size: 24px; margin: 0; }
.owner { color: var(--gold); font-style: italic; }
.section { margin: 30px 2px 10px; display: flex; align-items: center; gap: 10px; }
.section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair), transparent); }
[dir="rtl"] .section::after { background: linear-gradient(270deg, var(--hair), transparent); }
.lede { color: var(--text-dim); margin: -2px 2px 12px; font-size: 14px; max-width: 60ch; }
.micro { font-size: 12px; color: var(--text-mute); margin-top: 8px; }
.view-head { margin-bottom: 22px; }
.view-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
@media (min-width: 900px) { .display { font-size: 44px; } }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--gold) 8%), var(--surface) 40%);
  border-radius: var(--r-lg); padding: 18px; position: relative;
  box-shadow: inset 0 0 0 1px var(--hair-soft), inset 0 1px 0 var(--hair);
}
.engraved { overflow: hidden; }
.engraved::after {
  content: ""; position: absolute; width: 360px; height: 360px; inset-inline-end: -120px; top: -110px; pointer-events: none;
  background: var(--gold); -webkit-mask: var(--rosette) center / contain no-repeat; mask: var(--rosette) center / contain no-repeat; opacity: 0.16;
}

/* hero */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px; }
.hero-left { position: relative; z-index: 1; }
.hero-time { font: 300 64px/1 var(--serif); margin: 10px 0 4px; letter-spacing: -0.02em; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-time small { font: 500 11px var(--sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--text-mute); -webkit-text-fill-color: var(--text-mute); margin-inline-start: 10px; vertical-align: middle; }
.hero-sub { color: var(--text-dim); font-size: 14px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dial { position: relative; width: 112px; height: 112px; flex: none; z-index: 1; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 3; }
.dial-track { stroke: var(--hair-soft); }
.dial-fill { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.7,.2,1); }
.dial-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial-label b { font: 400 28px/1 var(--serif); }
.dial-label span { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); margin-top: 4px; }
@media (max-width: 420px) { .dial { width: 88px; height: 88px; } .dial-label b { font-size: 22px; } .hero-time { font-size: 54px; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em; transition: transform .15s, filter .2s, background .2s;
}
.btn:active { transform: scale(0.97); }
.btn .ic { width: 18px; height: 18px; }
.btn-gold { color: var(--on-gold); background: linear-gradient(180deg, var(--gold-hi), var(--gold) 52%, var(--gold-lo)); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 18px rgba(0,0,0,.25); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); }
.btn-ghost:hover { background: var(--surface-2); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.pill-btn { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; font-size: 13px; }
.pill-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; color: var(--text-dim); }

/* notice */
.notice {
  display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 14px 16px; border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--gold) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--hair);
}
.notice > .ic { color: var(--gold); width: 24px; height: 24px; }
.notice b { display: block; font-weight: 600; }
.notice span { display: block; font-size: 13px; color: var(--text-dim); }
.notice .chev { margin-inline-start: auto; color: var(--text-mute); }
[dir="rtl"] .chev { transform: scaleX(-1); }

/* stats */
.grid-3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.stat .money { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.stat .money b { font: 400 30px/1 var(--serif); }
.stat .money span { color: var(--text-mute); font-size: 13px; }
.health { display: flex; gap: 18px; margin-top: 12px; }
.health div { display: flex; align-items: center; gap: 7px; }
.health b { font: 400 26px/1 var(--serif); }
.health span { font-size: 12px; color: var(--text-mute); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.dot.ok { background: var(--green); color: var(--green); }
.dot.warn { background: var(--amber); color: var(--amber); }
.dot.bad { background: var(--red); color: var(--red); }
.bar { height: 4px; border-radius: 4px; background: var(--hair-soft); margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }

/* lists */
.list { list-style: none; margin: 0; padding: 4px 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 13px 18px; position: relative; }
.list li + li::before { content: ""; position: absolute; top: 0; inset-inline: 18px; height: 1px; background: linear-gradient(90deg, transparent, var(--hair-soft) 10%, var(--hair-soft) 90%, transparent); }
.li-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--gold); box-shadow: inset 0 0 0 1px var(--hair-soft); }
.li-main { min-width: 0; flex: 1; }
.li-main b { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main small { display: block; color: var(--text-mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-meta { text-align: end; font-size: 12px; color: var(--text-mute); flex: none; }
.li-meta b { display: block; color: var(--text-dim); font-weight: 500; }
.tag { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; color: var(--gold); box-shadow: inset 0 0 0 1px var(--hair); white-space: nowrap; }
.tag.crit { color: var(--red); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 40%, transparent); }
.time-ago { font-size: 12px; color: var(--text-mute); flex: none; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; background: var(--surface); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--hair-soft); font-size: 13px; }
.chip[aria-selected="true"] { background: var(--gold); color: var(--on-gold); box-shadow: none; font-weight: 600; }

/* toggles */
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-mute); transition: transform .2s, background .2s; }
.switch input:checked + span { background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); }
.switch input:checked + span::after { background: var(--on-gold); transform: translateX(18px); }
[dir="rtl"] .switch input:checked + span::after { transform: translateX(-18px); }

/* rules */
.rules { padding: 4px 0; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; }
.rule-row + .rule-row { box-shadow: inset 0 1px 0 var(--hair-soft); }
.rule-row b { display: block; font-weight: 600; font-size: 14.5px; }
.rule-row small { display: block; color: var(--text-mute); font-size: 12.5px; }
.val { font: 400 19px var(--serif); color: var(--gold); white-space: nowrap; }
.time { background: var(--surface-2); border: 0; border-radius: 8px; padding: 6px 10px; font: 400 20px var(--serif); color: var(--gold); box-shadow: inset 0 0 0 1px var(--hair); }
.days { display: flex; gap: 4px; }
.days button { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; font-size: 11.5px; background: var(--surface-2); color: var(--text-mute); }
.days button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); font-weight: 700; }
.guard { display: grid; gap: 12px; }
.guard div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); }
.guard .ic { color: var(--gold); }
.budget { display: grid; gap: 4px; }
.budget-row { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 12px; font-size: 13.5px; }
.budget-row .bar { margin: 0; }
.budget-row b { text-align: end; font-weight: 500; }

/* keyword add */
.add-kw { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; margin-bottom: 12px; }
[dir="rtl"] .add-kw { padding: 8px 16px 8px 8px; }
.add-kw .ic { color: var(--text-mute); }
.add-kw input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; height: 34px; }
.add-kw input::placeholder { color: var(--text-mute); }

/* segmented */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-top: 12px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair-soft); }
.seg button { height: 32px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--text-dim); font-size: 13px; }
.seg button[aria-checked="true"] { background: var(--gold); color: var(--on-gold); font-weight: 600; }

/* ---------- briefing / WhatsApp mock ---------- */
.brief-layout { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .brief-layout { grid-template-columns: 400px 1fr; } }
.phone { border-radius: 30px; overflow: hidden; background: var(--wa-bg); box-shadow: var(--shadow), 0 0 0 1px var(--hair), 0 0 0 7px var(--bg-raised), 0 0 0 8px var(--hair-soft); max-width: 420px; margin: 0 auto; width: 100%; }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); box-shadow: 0 1px 0 var(--hair-soft); }
.phone-top b { display: block; font-size: 15px; }
.phone-top small { font-size: 12px; color: var(--text-mute); }
.wa-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 45%, var(--gold-lo)); color: var(--on-gold); font: 600 18px var(--arabic); }
.wa-body { padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; max-height: 640px; overflow-y: auto; background-image: radial-gradient(var(--hair-soft) 1px, transparent 1px); background-size: 18px 18px; }
.bubble { background: var(--wa-bubble); border-radius: 4px 14px 14px 14px; padding: 10px 12px 6px; font-size: 14px; line-height: 1.45; max-width: 92%; box-shadow: 0 1px 1px rgba(0,0,0,.12), inset 0 0 0 1px var(--hair-soft); animation: rise .5s both; }
[dir="rtl"] .bubble { border-radius: 14px 4px 14px 14px; }
.bubble h4 { margin: 0 0 6px; font: 600 15px var(--serif); color: var(--gold); }
[dir="rtl"] .bubble h4 { font-family: var(--arabic); }
.bubble .topic { font-size: 10.5px; letter-spacing: var(--track); text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 10px 0 4px; }
[dir="rtl"] .bubble .topic { letter-spacing: 0; font-size: 12px; }
.bubble .story { margin: 0 0 8px; }
.bubble .story b { font-weight: 600; }
.bubble .src { display: block; font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.bubble .stamp { display: block; text-align: end; font-size: 10.5px; color: var(--text-mute); margin-top: 4px; }
.bubble .foot { font-size: 12px; color: var(--text-mute); border-top: 1px solid var(--hair-soft); padding-top: 6px; margin-top: 4px; }
.wa-quick { display: flex; gap: 6px; padding: 10px 12px 14px; flex-wrap: wrap; }
.wa-quick button { flex: 1; min-width: 80px; height: 36px; border-radius: 10px; border: 0; background: var(--surface); color: var(--gold); cursor: pointer; font-size: 13px; box-shadow: inset 0 0 0 1px var(--hair-soft); }
.brief-side { display: grid; gap: 12px; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: flex; gap: 10px; align-items: baseline; color: var(--text-dim); font-size: 14px; }
.steps b { font: 400 22px/1 var(--serif); color: var(--gold); min-width: 46px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- requests ---------- */
.req { margin-bottom: 12px; }
.req-head { display: flex; gap: 12px; align-items: flex-start; }
.req-head b { display: block; font-size: 15.5px; }
.req-head small { display: block; color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.req-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.req-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.req-actions .btn { justify-content: center; padding: 0 8px; font-size: 13px; }
.req.done { opacity: 0.55; }
.durability { color: var(--amber); font-size: 12.5px; margin-top: 8px; display: flex; gap: 6px; align-items: center; }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fade .25s both; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; background: var(--bg-raised); border-radius: 22px 22px 0 0; padding: 8px 20px calc(24px + var(--safe-b)); box-shadow: var(--shadow), inset 0 1px 0 var(--hair); animation: up .35s cubic-bezier(.2,.8,.2,1) both; }
@media (min-width: 900px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--hair); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 0; padding: 0 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); font-size: 15px; outline: none; }
.field input:focus { box-shadow: inset 0 0 0 1.5px var(--gold); }
.examples { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.examples button { border: 0; background: transparent; color: var(--gold); font-size: 12.5px; cursor: pointer; padding: 4px 0; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; margin-inline-end: 10px; }
.probe { margin-top: 18px; }
.probe-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.probe-steps li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-mute); transition: color .3s; }
.probe-steps li.on { color: var(--text); }
.probe-steps li .ic { color: var(--gold); opacity: 0; transition: opacity .3s; }
.probe-steps li.on .ic { opacity: 1; }
.probe-steps li .spin { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--hair); border-top-color: var(--gold); animation: spin .8s linear infinite; flex: none; }
.verdict { margin-top: 16px; }
.verdict .big { display: flex; align-items: center; gap: 10px; font: 400 22px var(--serif); }
.verdict p { color: var(--text-dim); font-size: 14px; margin: 8px 0 14px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 13.5px; transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 32px; } }

.view { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* small phones: stack the time label, keep the dial beside it */
@media (max-width: 480px) {
  .sample-band { letter-spacing: 0.08em; font-size: 9.5px; }
  .hero { padding: 20px 18px; gap: 10px; align-items: flex-start; }
  .hero-time { font-size: 52px; }
  .hero-time small { display: block; margin: 6px 0 0; }
  .dial { width: 78px; height: 78px; margin-top: 4px; }
  .dial-label b { font-size: 20px; }
  .dial-label span { font-size: 7.5px; letter-spacing: 0.04em; }
  .display { font-size: 30px; }
  .budget-row { grid-template-columns: 92px 1fr 64px; }
}

/* ---- review fixes ---- */
.hero { margin-bottom: 14px; }
.notice { margin-top: 0; }
.time, .val, .micro, .rule-row small, .li-main small, .tag { unicode-bidi: plaintext; }
.time { direction: ltr; }
.li-main b, .li-main small, .bubble .src, .req-head small { unicode-bidi: plaintext; text-align: start; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sample-band { background: var(--gold); }
[data-mode="dark"] .sample-band { color: #120e07; }
/* tap targets ≥ 40px */
.chip, .seg button, .btn.sm, .wa-quick button, .pill-btn, .icon-btn { min-height: 40px; }
.icon-btn { width: 40px; height: 40px; }
.seg button { height: 40px; }
.days button { width: 36px; height: 40px; border-radius: 12px; }
.switch { width: 52px; height: 40px; }
.switch span { inset: 7px 0; }
.examples button { min-height: 40px; padding: 8px 2px; }
.empty { text-align: center; color: var(--text-mute); padding: 28px 18px; }
.val { direction: ltr; unicode-bidi: isolate; }
.rule-row:has(.days) { flex-wrap: wrap; }
.rule-row:has(.days) .days { width: 100%; justify-content: space-between; }
