/* ================================================================
   Takween — design system: tokens, base, components, site chrome.
   Area styles: site.css (public pages), account.css, manage.css.
   ================================================================ */

/* The new Saudi Riyal symbol (U+20C1). Most system fonts don't draw it yet,
   so it comes from this tiny OFL font, used for that one character only. */
@font-face { font-family: 'TkRiyal'; src: url('../fonts/riyal/regular.woff2') format('woff2'); font-weight: 100 600; font-display: block; unicode-range: U+20C1; }
@font-face { font-family: 'TkRiyal'; src: url('../fonts/riyal/bold.woff2') format('woff2'); font-weight: 700 900; font-display: block; unicode-range: U+20C1; }

:root {
    --bg: #FAF8F6;            /* warm off-white page */
    --paper: #F3EEE8;         /* wells, inputs hover, soft buttons */
    --paper-2: #EDE6DD;
    --white: #FFFFFF;
    --ink: #292549;           /* navy: headings, nav text, hero, footer */
    --ink-2: #3A3566;
    --ink-3: #1E1B38;
    --ink-soft: rgba(41, 37, 73, .06);
    --pink: #F22D83;          /* primary action + active indicator */
    --pink-2: #D81B70;
    --pink-soft: rgba(242, 45, 131, .1);
    --sand: #E2C4AA;          /* highlighted words on navy */
    --sand-2: #C9A17F;
    --sand-soft: rgba(226, 196, 170, .28);
    --lilac: #8E6EB9;         /* small accents, online */
    --lilac-soft: rgba(142, 110, 185, .13);
    --muted: #716E80;         /* descriptions */
    --line: rgba(41, 37, 73, .1);
    --ok: #1F9D6B;
    --ok-soft: rgba(31, 157, 107, .12);
    --warn: #D98A1C;
    --warn-soft: rgba(217, 138, 28, .14);

    --display: 'TkRiyal', 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --text: 'TkRiyal', 'IBM Plex Sans Arabic', 'Alexandria', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --ease: cubic-bezier(.22, 1, .36, 1);
    --r: 24px;
    --r-sm: 16px;
    --shadow-sm: 0 1px 2px rgba(41, 37, 73, .05), 0 4px 14px rgba(41, 37, 73, .05);
    --shadow: 0 1px 2px rgba(41, 37, 73, .05), 0 14px 36px rgba(41, 37, 73, .08);
    --shadow-lg: 0 2px 4px rgba(41, 37, 73, .05), 0 30px 70px rgba(41, 37, 73, .16);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
    margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
    font: 400 15px/1.7 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -.025em; line-height: 1.08; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2.5px solid var(--pink); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--pink); color: #fff; }
.money, bdi { unicode-bidi: isolate; }
.riyal { font-family: 'TkRiyal', var(--text); }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: min(var(--wrap), 100% - 64px); margin-inline: auto; }
.device-mobile .wrap { width: calc(100% - 32px); }
.skip { position: fixed; top: -60px; inset-inline-start: 16px; z-index: 9999; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
.star { display: inline-block; flex-shrink: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Devices: each layout hides the other's chrome. */
.device-desktop .only-mobile, .device-mobile .only-desktop { display: none !important; }

/* Split words (motion.js) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .05em .04em .18em; margin: -.05em -.04em -.18em; }
.wi { display: inline-block; will-change: transform; }
.motion-pending [data-hero-in], .motion-pending [data-split], .motion-pending [data-reveal], .motion-pending [data-stagger] > * { visibility: hidden; }

/* Emblem (partials/emblem): colours from CSS so it works on light and navy. */
.emblem { --em-leaf: var(--ink); width: 100%; height: auto; overflow: visible; }
.emblem--light { --em-leaf: #FAF8F6; }
.em-leaf { fill: var(--em-leaf); }
.em-star--top, .em-star--bottom { fill: var(--sand); }
.em-star--right { fill: var(--lilac); }
.em-star--left { fill: var(--pink); }

/* ── Type ────────────────────────────────────────────────────── */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--pink); font: 700 13px/1.2 var(--display); }
html[lang="en"] .eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow--sand { color: var(--sand); }
.eyebrow--lilac { color: var(--lilac); }
.display { font-size: clamp(34px, 4.3vw, 56px); line-height: 1.22; }
html[lang="en"] .display { line-height: 1.04; }
.h2 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.25; }
html[lang="en"] .h2 { line-height: 1.08; }
.h3 { font-size: 20px; line-height: 1.35; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.8; }
.muted { color: var(--muted); }
/* The highlighted word: pink, with a hand-drawn underline. */
.hl {
    color: var(--pink); padding-bottom: .12em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c38-6 92-8 194-3' fill='none' stroke='%23F22D83' stroke-opacity='.45' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") bottom / 100% .32em no-repeat;
}
.hl--sand { color: var(--sand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c38-6 92-8 194-3' fill='none' stroke='%23E2C4AA' stroke-opacity='.5' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hl--lilac { color: var(--lilac); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c38-6 92-8 194-3' fill='none' stroke='%238E6EB9' stroke-opacity='.45' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.device-mobile .display { font-size: clamp(28px, 8vw, 34px); }
.device-mobile .h2 { font-size: 24px; }
.device-mobile .lead { font-size: 15px; }

/* ── Main + page transition ──────────────────────────────────── */
.app-main { display: block; outline: none; min-height: 60vh; transition: opacity .25s ease; }
.app-main.is-loading { opacity: .55; pointer-events: none; }
.app-main.is-entering { animation: page-in .5s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
.nav-progress { position: fixed; top: 0; inset-inline: 0; z-index: 9999; height: 3px; pointer-events: none; }
.nav-progress::before { content: ""; display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--lilac)); box-shadow: 0 0 12px var(--pink); }
.nav-progress.is-active::before { animation: progress 6s cubic-bezier(.1, .7, .2, 1) forwards; }
.nav-progress.is-done::before { width: 100%; opacity: 0; transition: width .2s, opacity .4s .2s; }
@keyframes progress { to { width: 88%; } }
[dir="rtl"] .nav-progress::before { margin-inline-start: auto; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
    border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap; text-decoration: none;
    font: 700 14px/1 var(--display); transition: background .25s, color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn:active { transform: scale(.97); }
.btn .icon--arrow { transition: transform .3s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(4px); }
[dir="rtl"] .icon--arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .icon--arrow { transform: scaleX(-1) translateX(4px); }
.btn--primary { background: var(--pink); color: #fff; box-shadow: 0 10px 24px rgba(242, 45, 131, .3); }
.btn--primary:hover { background: var(--pink-2); box-shadow: 0 14px 30px rgba(242, 45, 131, .38); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper); }
.btn--soft { background: var(--paper); color: var(--ink); }
.btn--soft:hover { background: var(--paper-2); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost-light { background: rgba(255, 255, 255, .06); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.btn--ghost-light:hover { box-shadow: inset 0 0 0 1.5px var(--sand); color: var(--sand); }
.btn--danger { background: var(--pink-soft); color: var(--pink-2); }
.btn--danger:hover { background: var(--pink); color: #fff; }
.btn--ok { background: var(--ok); color: #fff; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; gap: 6px; }
.btn--lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.btn--icon.btn--sm { width: 38px; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn--soft.is-busy::after, .btn--ghost.is-busy::after, .btn--light.is-busy::after { border-color: var(--line); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--pink); font-weight: 700; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Chips & stickers ────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font: 600 12.5px/1 var(--display); white-space: nowrap; }
.chip .icon { flex-shrink: 0; }
.chip--sm { height: 26px; padding: 0 10px; font-size: 12px; }
.chip--pink { background: var(--pink-soft); color: var(--pink-2); box-shadow: none; }
.chip--lilac { background: var(--lilac-soft); color: #6E4FA0; box-shadow: none; }
.chip--sand { background: var(--sand-soft); color: #8A5F3C; box-shadow: none; }
.chip--ink { background: var(--ink); color: #fff; box-shadow: none; }
.chip--ok { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.chip--warn { background: var(--warn-soft); color: #A5650C; box-shadow: none; }
.chip--muted { background: var(--paper); color: var(--muted); box-shadow: none; }
.chip--glass { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
/* A tilted sticker, like text on a TikTok video. */
.sticker { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 12px; background: var(--pink); color: #fff; font: 800 14px/1 var(--display); transform: rotate(-4deg); box-shadow: 0 10px 24px rgba(242, 45, 131, .3); }
.sticker--sand { background: var(--sand); color: var(--ink); box-shadow: 0 10px 24px rgba(201, 161, 127, .35); transform: rotate(3deg); }
.sticker--lilac { background: var(--lilac); box-shadow: 0 10px 24px rgba(142, 110, 185, .35); transform: rotate(2deg); }
.sticker--white { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ── Cards ───────────────────────────────────────────────────── */
.card { position: relative; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card--pad { padding: 22px; }
.card--hover { transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card--hover:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card--ink { background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.card--ink::before { content: ""; position: absolute; inset: auto -20% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(242, 45, 131, .45), transparent 65%); z-index: -1; }
.card--ink::after { content: ""; position: absolute; inset: -50% auto auto -20%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(142, 110, 185, .35), transparent 65%); z-index: -1; }
.device-mobile .card--pad { padding: 18px; }

/* ── Sections ────────────────────────────────────────────────── */
.sec { position: relative; padding: 84px 0 16px; }
.device-mobile .sec { padding: 52px 0 6px; }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 32px; }
.sec__head > div { max-width: 640px; }
.sec__head .eyebrow { margin-bottom: 14px; }
.sec__head p { margin: 14px 0 0; }
.device-mobile .sec__head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.panel { background: #fff; border-radius: 40px; margin-inline: 12px; }
.device-mobile .panel { border-radius: 28px; margin-inline: 8px; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--muted); }
.empty > .icon { width: 56px; height: 56px; padding: 14px; border-radius: 18px; background: var(--paper); color: var(--ink); }
.empty h3 { color: var(--ink); font-size: 20px; }
.empty p { margin: 0; max-width: 380px; }

/* ── Seats bar ───────────────────────────────────────────────── */
.seats { display: grid; gap: 7px; }
.seats__bar { height: 7px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.seats__fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--lilac)); }
[dir="rtl"] .seats__fill { margin-inline-start: 0; background: linear-gradient(-90deg, var(--pink), var(--lilac)); }
.seats__text { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seats__text b { color: var(--pink-2); }
.seats--full .seats__fill { background: var(--muted); }

/* ── Price ───────────────────────────────────────────────────── */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font: 800 19px/1 var(--display); color: var(--ink); }
.price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.price__old { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: line-through; }
.price--free { color: var(--ok); }

/* ── Avatars ─────────────────────────────────────────────────── */
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: var(--av, var(--lilac)); color: #fff; font-family: var(--display); font-weight: 700; line-height: 1; }
.avatars { display: inline-flex; }
.avatars .avatar { box-shadow: 0 0 0 3px var(--bg); }
.avatars .avatar + .avatar { margin-inline-start: -10px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form { display: grid; gap: 15px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.device-mobile .form__row { grid-template-columns: 1fr; }
.field { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { padding: 0; color: var(--ink); font: 600 13.5px/1.4 var(--display); }
.field__opt { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.field__hint { color: var(--muted); font-size: 13px; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field textarea, .field__box {
    width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 13px;
    background: #FCFBFA; color: var(--ink); font: 500 15px/1.4 var(--text); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
/* Native date / month / time pickers: iOS gives them an intrinsic width and
   centres the value, so they spill out of the field. Tame them. */
.field input[type="date"], .field input[type="month"], .field input[type="time"], .field input[type="datetime-local"], .field input[type="week"] {
    -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: start; line-height: 1.4;
}
.field input::-webkit-date-and-time-value { text-align: start; min-height: 1.4em; }
.field input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.field, .form__row > * { min-width: 0; }
.field input:hover, .field textarea:hover, .field__box:hover { border-color: rgba(41, 37, 73, .22); }
.field input:focus, .field textarea:focus, .field__box:focus-within, .field__box:has(.cselect.is-open) { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px var(--pink-soft); }
.field__box { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 6px 0 14px; }
[dir="rtl"] .field__box { padding: 0 14px 0 6px; }
.field__box input { flex: 1; min-width: 0; height: 100%; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.field__box > .icon { flex-shrink: 0; color: var(--muted); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid .field__box { border-color: var(--pink); background: #fff; }
.field__err { color: var(--pink-2); font-size: 13px; font-weight: 600; }
.field__err:empty { display: none; }
.form__note { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.device-mobile .field input:not([type="checkbox"]):not([type="radio"]), .device-mobile .field textarea { font-size: 16px; }
/* Phone: country code select + number (always left-to-right) */
.phone { display: grid; grid-template-columns: 116px 1fr; gap: 8px; direction: ltr; }
.phone .field__box--select { padding: 0 4px 0 10px; }
.phone .cselect__btn { gap: 4px; font-size: 14px; }
.phone .cselect__value { overflow: visible; text-overflow: clip; }
.phone .cselect__chev { width: 24px; height: 24px; padding: 4px; border-radius: 8px; }
/* Checkbox / radio */
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14.5px; line-height: 1.55; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 8px; border: 1.5px solid rgba(41, 37, 73, .25); background: #fff; color: transparent; transition: background .2s, border-color .2s, color .2s; }
.check input:checked + .check__box { background: var(--pink); border-color: var(--pink); color: #fff; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px var(--pink-soft); }
.check--radio .check__box { border-radius: 50%; }
.field.is-invalid .check__box { border-color: var(--pink); }
/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font: 600 14.5px var(--display); }
.switch input { position: absolute; opacity: 0; }
.switch__track { position: relative; flex-shrink: 0; width: 46px; height: 28px; border-radius: 99px; background: rgba(41, 37, 73, .18); transition: background .25s; }
.switch__track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); transition: transform .3s var(--ease); }
.switch input:checked + .switch__track { background: var(--pink); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
[dir="rtl"] .switch input:checked + .switch__track::after { transform: translateX(-18px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 4px var(--pink-soft); }
/* Segmented choice */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: 18px; background: var(--paper); }
.seg label { position: relative; display: grid; place-items: center; gap: 2px; min-height: 40px; padding: 8px 12px; border-radius: 14px; cursor: pointer; text-align: center; font: 700 14px/1.3 var(--display); color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; }
.seg input { position: absolute; opacity: 0; }
.seg label:has(input:checked) { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg small { font: 500 12px var(--text); color: var(--muted); }
/* Quantity stepper (ui.js data-stepper) */
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper); }
.stepper button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s, opacity .2s; }
.stepper button:active { transform: scale(.9); }
.stepper button[disabled] { opacity: .35; cursor: default; }
.stepper input { width: 40px; height: 36px; border: 0; background: none; text-align: center; font: 800 16px var(--display); color: var(--ink); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Option cards (radio list) */
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 15px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: box-shadow .2s, background .2s; }
.opt input { position: absolute; opacity: 0; }
.opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--pink); background: #fffafc; }
.opt__dot { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(41, 37, 73, .25); transition: box-shadow .2s; }
.opt:has(input:checked) .opt__dot { box-shadow: inset 0 0 0 7px var(--pink); }
.opt__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.opt__body strong { font: 700 14px var(--display); }
.opt__body small { color: var(--muted); font-size: 13px; }
/* File / image picker */
.filepick { position: relative; display: grid; place-items: center; gap: 8px; min-height: 140px; padding: 18px; border: 2px dashed rgba(41, 37, 73, .18); border-radius: 20px; background: #FCFBFA; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; }
.filepick:hover { border-color: var(--pink); background: #fff; }
.filepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filepick img { max-height: 180px; border-radius: 12px; }

/* "Use my wallet balance" switch (partials/wallet-use) */
.wuse { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 11px 14px; border-radius: 16px; background: var(--lilac-soft); cursor: pointer; }
.wuse__ic { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px; background: var(--lilac); color: #fff; }
.wuse__txt { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.wuse__txt strong { color: var(--ink); font: 700 14px var(--display); }
.wuse__txt small { color: var(--muted); font-size: 12.5px; }

/* ── Branded dropdown (select.js upgrades every <select>) ────── */
.cselect__native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.cselect { position: relative; flex: 1; min-width: 0; height: 100%; }
.field__box--select { position: relative; }
.cselect__btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: start; color: var(--ink); font: 600 15px var(--text); }
.cselect__btn:focus-visible { outline: none; }
.cselect__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect.is-placeholder .cselect__value { color: #a29fae; font-weight: 500; }
.cselect__chev { flex-shrink: 0; padding: 6px; width: 28px; height: 28px; border-radius: 9px; background: var(--paper); color: var(--ink); transition: transform .3s var(--ease), background .2s, color .2s; }
.cselect.is-open .cselect__chev { transform: rotate(180deg); background: var(--ink); color: #fff; }
.cselect__pop {
    position: absolute; z-index: 160; top: calc(100% + 12px); inset-inline: -17px -9px; min-width: 220px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top center; transition: opacity .18s ease, transform .25s var(--ease), visibility 0s linear .25s;
}
.cselect.is-open .cselect__pop { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .25s var(--ease), visibility 0s; }
.cselect__sheethead { display: none; }
.cselect__search { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 12px; height: 44px; border-radius: 14px; background: var(--paper); color: var(--muted); }
.cselect__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--ink); font: 600 15px var(--text); }
.cselect__list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cselect__opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 14px; cursor: pointer; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.35; }
.cselect__label { display: grid; gap: 2px; }
.cselect__sub { color: var(--muted); font-size: 13px; font-weight: 500; }
.cselect__opt.is-active { background: var(--paper); }
.cselect__opt.is-selected { background: var(--ink); color: #fff; }
.cselect__opt.is-selected .cselect__sub { color: rgba(255, 255, 255, .7); }
.cselect__opt.is-selected.is-active { background: var(--ink-2); }
.cselect__opt.is-disabled { opacity: .45; cursor: default; }
.cselect__tick { flex-shrink: 0; opacity: 0; }
.cselect__opt.is-selected .cselect__tick { opacity: 1; color: var(--sand); }
.cselect__empty { margin: 0; padding: 14px; text-align: center; color: var(--muted); font-size: 14px; }
.cselect__scrim { display: none; }
.has-sheet, .has-dialog { overflow: hidden; }
.device-mobile .cselect__pop {
    position: fixed; z-index: 9400; top: auto; inset-inline: 0; bottom: 0; max-height: 74vh; display: flex; flex-direction: column;
    padding: 10px 14px calc(18px + var(--safe-b)); border-radius: 30px 30px 0 0; border: 0; transform: translateY(100%); opacity: 1; transition: transform .4s var(--ease), visibility 0s linear .4s;
}
.device-mobile .cselect.is-open .cselect__pop { transform: none; transition: transform .4s var(--ease), visibility 0s; }
.device-mobile .cselect__sheethead { display: block; padding: 0 4px 14px; text-align: center; }
.device-mobile .cselect__handle { display: block; width: 44px; height: 5px; margin: 0 auto 14px; border-radius: 99px; background: var(--line); }
.device-mobile .cselect__sheethead strong { color: var(--ink); font: 700 19px var(--display); }
.device-mobile .cselect__list { max-height: none; flex: 1; }
.device-mobile .cselect__opt { padding: 15px 16px; font-size: 16px; }
.device-mobile .cselect__scrim { display: block; position: fixed; inset: 0; z-index: 9390; background: rgba(41, 37, 73, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
.device-mobile .cselect.is-open .cselect__scrim { opacity: 1; visibility: visible; transition: opacity .3s, visibility 0s; }

/* ── Sheet: modal on desktop, bottom sheet on phones (ui.js) ─── */
.sheet { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 24px; visibility: hidden; transition: visibility 0s linear .45s; }
.sheet.is-open { visibility: visible; transition: visibility 0s; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(41, 37, 73, .5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity .3s; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__box {
    position: relative; display: flex; flex-direction: column; width: min(560px, 100%); max-height: min(88vh, 900px); border-radius: 30px; background: var(--bg); box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(20px) scale(.97); transition: opacity .3s, transform .45s var(--ease);
}
.sheet--wide .sheet__box { width: min(760px, 100%); }
.sheet.is-open .sheet__box { opacity: 1; transform: none; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px 14px; }
.sheet__head h3 { font-size: 18px; }
.sheet__close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); cursor: pointer; flex-shrink: 0; }
.sheet__body { padding: 4px 26px 20px; overflow-y: auto; overscroll-behavior: contain; }
.sheet__foot { padding: 16px 26px 24px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 30px 30px; }
.sheet__handle { display: none; }
.device-mobile .sheet { place-items: end stretch; padding: 0; }
.device-mobile .sheet__box { width: 100%; max-height: 92vh; border-radius: 30px 30px 0 0; transform: translateY(100%); opacity: 1; }
.device-mobile .sheet.is-open .sheet__box { transform: none; }
.device-mobile .sheet__handle { display: block; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 99px; background: var(--line); }
.device-mobile .sheet__head { padding: 14px 20px 10px; }
.device-mobile .sheet__body { padding: 4px 20px 16px; }
.device-mobile .sheet__foot { padding: 14px 20px calc(16px + var(--safe-b)); border-radius: 0; }

/* ── Tabs (pill tabs, ui.js data-tabs) ───────────────────────── */
.tabs { position: relative; display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; white-space: nowrap; font: 700 13.5px var(--display); transition: color .25s; }
.tabs__btn.is-on { color: #fff; }
.tabs__pill { position: absolute; z-index: 0; top: 5px; left: 0; height: 38px; border-radius: 999px; background: var(--ink); transition: transform .45s var(--ease), width .45s var(--ease); }
.tabs__btn .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 12px; }
.tabs__btn.is-on .count { background: rgba(255, 255, 255, .2); color: #fff; }
[data-panel][hidden] { display: none !important; }

/* ── Toasts (notify.js) ──────────────────────────────────────── */
.toast-stack { position: fixed; top: 96px; inset-inline-end: 24px; z-index: 9600; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 24px)); pointer-events: none; }
.device-mobile .toast-stack { top: 78px; inset-inline: 12px; width: auto; }
.is-manage .toast-stack { top: 24px; }
.toast { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 16px; overflow: hidden; pointer-events: auto; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: toast-in .45s var(--ease) both; transition: transform .3s var(--ease), opacity .3s; }
.toast.is-leaving { opacity: 0; transform: translateY(-8px) scale(.97); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
.toast__icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px; }
.toast--success .toast__icon { background: var(--ok-soft); color: var(--ok); }
.toast--error .toast__icon { background: var(--pink-soft); color: var(--pink); }
.toast--info .toast__icon { background: var(--lilac-soft); color: var(--lilac); }
.toast__text { flex: 1; min-width: 0; display: grid; gap: 2px; padding-top: 1px; }
.toast__text strong { color: var(--ink); font: 700 14.5px var(--display); }
.toast__text span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.toast__close { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.toast__close:hover { background: var(--paper); color: var(--ink); }
.toast__life { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--pink); transform-origin: left; animation: toast-life var(--life, 4s) linear forwards; }
[dir="rtl"] .toast__life { transform-origin: right; }
.toast--success .toast__life { background: var(--ok); }
.toast--info .toast__life { background: var(--lilac); }
.toast.is-paused .toast__life { animation-play-state: paused; }
@keyframes toast-life { to { transform: scaleX(0); } }

/* ── Confirm / alert dialog (notify.js) ──────────────────────── */
.cdlg { position: fixed; inset: 0; z-index: 9700; display: grid; place-items: center; padding: 20px; }
.cdlg__backdrop { position: absolute; inset: 0; background: rgba(41, 37, 73, .5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity .3s; }
.cdlg__box { position: relative; width: min(420px, 100%); padding: 32px 28px 24px; border-radius: 28px; background: #fff; text-align: center; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .3s, transform .4s var(--ease); }
.cdlg.is-open .cdlg__backdrop { opacity: 1; }
.cdlg.is-open .cdlg__box { opacity: 1; transform: none; }
.cdlg.is-closing .cdlg__box { transform: translateY(8px) scale(.98); }
.cdlg__handle { display: none; }
.cdlg__icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 20px; background: var(--lilac-soft); color: var(--lilac); transform: rotate(-6deg); }
.cdlg--danger .cdlg__icon { background: var(--pink-soft); color: var(--pink); }
.cdlg__title { font-size: 19px; margin-bottom: 6px; }
.cdlg__msg { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.cdlg__actions { display: flex; gap: 10px; }
.cdlg__btn { flex: 1; height: 46px; border: 0; border-radius: 999px; cursor: pointer; font: 700 15px var(--display); transition: background .2s, transform .2s; }
.cdlg__btn:active { transform: scale(.97); }
.cdlg__btn--cancel { background: var(--paper); color: var(--ink); }
.cdlg__btn--cancel:hover { background: var(--paper-2); }
.cdlg__btn--ok { background: var(--ink); color: #fff; }
.cdlg__btn--ok:hover { background: var(--ink-2); }
.cdlg--danger .cdlg__btn--ok { background: var(--pink); }
.device-mobile .cdlg { align-items: end; padding: 0; }
.device-mobile .cdlg__box { width: 100%; border-radius: 30px 30px 0 0; padding: 12px 22px calc(22px + var(--safe-b)); transform: translateY(100%); }
.device-mobile .cdlg.is-open .cdlg__box { transform: none; }
.device-mobile .cdlg__handle { display: block; width: 44px; height: 5px; margin: 0 auto 20px; border-radius: 99px; background: var(--line); }
.device-mobile .cdlg__actions { flex-direction: column-reverse; }
.device-mobile .cdlg__btn { flex: none; height: 48px; }

/* ── Update modal (version-check.js) ─────────────────────────── */
.update { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 9800; width: 380px; max-width: calc(100vw - 24px); opacity: 0; visibility: hidden; transform: translateY(30px) scale(.96); transition: opacity .35s, transform .5s var(--ease), visibility 0s linear .5s; }
.update.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .5s var(--ease), visibility 0s; }
.update__card { position: relative; padding: 26px 24px 20px; border-radius: 28px; overflow: hidden; isolation: isolate; color: #fff; background: var(--ink); box-shadow: 0 0 0 1px rgba(226, 196, 170, .3), 0 30px 80px rgba(10, 8, 30, .5); }
.update__card::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(242, 45, 131, .5), transparent 65%); z-index: -1; }
.update__close { position: absolute; top: 14px; inset-inline-end: 14px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.update__art { position: relative; width: 120px; height: 70px; margin-bottom: 12px; }
.update__book { position: absolute; left: 22px; top: 12px; width: 76px; height: 50px; perspective: 400px; }
.update__book::before { content: ""; position: absolute; inset: auto -4px -5px; height: 8px; border-radius: 0 0 6px 6px; background: var(--pink); }
.update__book::after { content: ""; position: absolute; left: 0; top: 0; width: 38px; height: 50px; background: #f4efe9; border-radius: 4px 0 0 4px; }
.update__page { position: absolute; left: 38px; top: 0; z-index: 1; width: 38px; height: 50px; background: #fff; border-radius: 0 4px 4px 0; transform-origin: left center; animation: flip 2.4s var(--ease) infinite; }
.update__page::before { content: ""; position: absolute; inset: 10px 7px auto; height: 18px; background: repeating-linear-gradient(to bottom, rgba(41, 37, 73, .2) 0 2px, transparent 2px 6px); }
.update__page:nth-child(2) { animation-delay: .3s; }
.update__page:nth-child(3) { animation-delay: .6s; }
@keyframes flip { 0%, 15% { transform: rotateY(0); } 55%, 100% { transform: rotateY(-180deg); } }
.update__s { position: absolute; animation: twinkle 1.8s ease-in-out infinite; }
.update__s--1 { left: 4px; top: 6px; color: var(--sand); }
.update__s--2 { left: 104px; top: 4px; color: var(--pink); animation-delay: .5s; }
.update__s--3 { left: 108px; top: 48px; color: var(--lilac); animation-delay: 1s; }
@keyframes twinkle { 50% { transform: scale(.55) rotate(45deg); opacity: .6; } }
.update__head { margin: 10px 0 8px; font-size: 26px; color: #fff; }
.update__body { color: rgba(255, 255, 255, .72); font-size: 14.5px; margin-bottom: 18px; }
.update__actions { display: grid; gap: 6px; }
.update__later { height: 40px; border: 0; background: none; color: rgba(255, 255, 255, .7); font-weight: 600; cursor: pointer; }
.update__later:hover { color: #fff; }
.ring { position: relative; display: grid; place-items: center; width: 32px; height: 32px; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring__track { stroke: rgba(255, 255, 255, .3); }
.ring__fill { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring b { font-size: 12px; font-weight: 800; }
.device-mobile .update { inset-inline: 10px; bottom: calc(88px + var(--safe-b)); width: auto; max-width: none; }

/* ================================================================
   Site chrome
   ================================================================ */

/* Desktop / tablet: floating white pill navbar */
.fnav { position: fixed; top: 16px; inset-inline: 0; z-index: 100; padding-inline: 24px; pointer-events: none; transition: top .35s var(--ease); }
.fnav__pill { pointer-events: auto; display: flex; align-items: center; gap: 18px; max-width: 1180px; height: 62px; margin-inline: auto; padding-inline: 16px 8px; background: rgba(255, 255, 255, .96); border-radius: 999px; box-shadow: 0 1px 0 rgba(41, 37, 73, .04), 0 14px 40px rgba(20, 16, 50, .12); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); transition: height .35s var(--ease); }
.fnav.is-scrolled { top: 10px; }
.fnav.is-scrolled .fnav__pill { height: 56px; }
.fnav__brand { display: inline-flex; align-items: center; }
.fnav__brand img { width: auto; height: 30px; }
html[lang="en"] .fnav__brand img { height: 24px; }
.fnav__actions .btn, .langbtn, .acct { white-space: nowrap; }
.fnav__links { position: relative; display: flex; gap: 2px; margin-inline: auto; }
.fnav__link { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 999px; color: var(--ink); font: 600 14px var(--display); white-space: nowrap; transition: background .2s; }
.fnav__link:hover { background: var(--ink-soft); }
.fnav__link::after { content: ""; position: absolute; inset-inline: 16px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--pink); transform: scaleX(0); transition: transform .35s var(--ease); }
.fnav__link.is-active::after { transform: scaleX(1); }
.fnav__actions { display: flex; align-items: center; gap: 6px; }
.navbtn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); transition: background .2s; }
.navbtn:hover { background: var(--ink-soft); }
.navbtn__badge { position: absolute; top: 4px; inset-inline-end: 3px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--pink); color: #fff; font: 800 11px/1 var(--display); box-shadow: 0 0 0 2px #fff; }
.langbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; color: var(--ink); font: 600 13.5px var(--display); transition: background .2s; }
.langbtn:hover { background: var(--ink-soft); }
.acct { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 14px 5px; border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 14px var(--display); }
.acct:hover { background: var(--paper-2); }

/* Tablets / small laptops: tighten the pill so everything fits. */
@media (max-width: 1180px) {
    .fnav { padding-inline: 14px; }
    .fnav__pill { gap: 10px; padding-inline: 14px 8px; }
    .fnav__link { padding: 0 10px; font-size: 14px; }
    .langbtn span, .fnav__actions .btn--primary span { display: none; }
    .fnav__actions .btn--primary { width: 44px; padding: 0; }
}
@media (max-width: 960px) {
    .fnav__brand img { height: 26px; }
    .fnav__link { padding: 0 8px; font-size: 13.5px; }
    .acct > span:first-child { display: none; }
    .acct { padding: 5px; }
}

/* Phone: slim top bar */
.mtop { position: fixed; top: 10px; inset-inline: 12px; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 52px; padding-inline: 12px 6px; border-radius: 18px; background: rgba(255, 255, 255, .95); box-shadow: 0 10px 30px rgba(20, 16, 50, .12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.mtop__brand { display: inline-flex; align-items: center; padding-inline-start: 4px; }
.mtop__brand img { width: auto; height: 30px; }
.mtop__right { display: flex; align-items: center; gap: 4px; }
.mtop__btn { position: relative; display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 9px; border-radius: 12px; background: var(--paper); color: var(--ink); font: 700 13px var(--display); }
.mtop__btn .navbtn__badge { box-shadow: 0 0 0 2px var(--paper); }

/* Phone: floating bottom navbar (same design as Briefee): navy bar, icons
   with labels, a raised round pink button in the middle. */
.mbar {
    position: fixed; z-index: 120; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b));
    display: flex; align-items: stretch; height: 68px; padding: 0 6px; border-radius: 26px;
    background: rgba(41, 37, 73, .95); box-shadow: 0 14px 36px rgba(41, 37, 73, .32);
    backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.mbar__item, .mbar__main {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; cursor: pointer; white-space: nowrap;
    color: rgba(255, 255, 255, .55); font: 700 10.5px/1.45 var(--display); -webkit-tap-highlight-color: transparent; transition: color .2s;
}
.mbar__item .icon { transition: transform .25s var(--ease); }
.mbar__item.is-active { color: #fff; }
.mbar__item.is-active .icon { transform: translateY(-1px); color: var(--pink); }
.mbar__item:active .icon { transform: scale(.9); }
.mbar__item .avatar { width: 24px !important; height: 24px !important; font-size: 10px !important; }
.mbar__item.is-active .avatar { box-shadow: 0 0 0 2px #fff; }

.mbar__main { color: #fff; justify-content: flex-end; padding-bottom: 9px; }
.mbar__main-btn {
    display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px; margin-bottom: 2px;
    border-radius: 50%; background: var(--pink); color: #fff; border: 4px solid var(--bg);
    box-shadow: 0 8px 20px rgba(242, 45, 131, .45); transition: transform .2s var(--ease);
}
.mbar__main-btn .icon { width: 24px; height: 24px; }
.mbar__main:active .mbar__main-btn { transform: scale(.92); }
.mbar__main.is-active .mbar__main-btn { background: #fff; color: var(--pink); border-color: var(--pink); }
.is-manage .mbar__main-btn { border-color: #F4F1ED; }
.is-manage .mbar__main.is-active .mbar__main-btn { border-color: var(--pink); }

/* Footer (desktop/tablet) */
.dfoot { position: relative; margin: 48px 12px 12px; padding: 52px 0 22px; border-radius: 40px; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.dfoot::before { content: ""; position: absolute; inset: auto auto -40% -10%; width: 50%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(242, 45, 131, .3), transparent 65%); z-index: -1; }
.dfoot::after { content: ""; position: absolute; inset: -40% -10% auto auto; width: 45%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(142, 110, 185, .3), transparent 65%); z-index: -1; }
.dfoot__inner { width: min(var(--wrap), 100% - 64px); margin-inline: auto; }
.dfoot__cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-bottom: 44px; border-bottom: 1px solid rgba(226, 196, 170, .2); }
.dfoot__cta h3 { font-size: clamp(24px, 2.6vw, 34px); }
.dfoot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding: 44px 0 30px; }
.dfoot__brand img { width: 156px; height: auto; margin-bottom: 16px; }
.dfoot__brand p { max-width: 320px; color: rgba(255, 255, 255, .66); font-size: 14px; }
.dfoot__social { display: flex; gap: 8px; margin-top: 18px; }
.dfoot__social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s, color .2s; }
.dfoot__social a:hover { background: var(--sand); color: var(--ink); }
.dfoot__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; }
.dfoot__col h4 { margin-bottom: 4px; color: var(--sand); font: 700 14px var(--display); }
html[lang="en"] .dfoot__col h4 { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; }
.dfoot__col a { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .78); transition: color .2s; }
.dfoot__col a:hover { color: #fff; }
.dfoot__bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; border-top: 1px solid rgba(226, 196, 170, .2); color: rgba(255, 255, 255, .6); font-size: 13.5px; }
.dfoot__end { display: inline-flex; align-items: center; gap: 14px; }
.ver { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(226, 196, 170, .35); color: var(--sand); font: 700 12px var(--display); direction: ltr; }
.charity { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .8); font-size: 13.5px; }
.charity .icon { color: var(--sand); }

/* Footer (phone) */
.mfoot { position: relative; margin: 40px 8px 0; padding: 32px 18px calc(104px + var(--safe-b)); border-radius: 28px 28px 0 0; background: var(--ink); color: #fff; text-align: center; overflow: hidden; isolation: isolate; }
.mfoot::before { content: ""; position: absolute; inset: -30% -40% auto auto; width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(242, 45, 131, .3), transparent 65%); z-index: -1; }
.mfoot__logo { width: 110px; height: auto; margin: 0 auto 16px; }
.mfoot p { color: rgba(255, 255, 255, .7); font-size: 14.5px; }
.mfoot__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.mfoot__links a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .9); font: 600 14px var(--display); }
.mfoot__social { display: flex; justify-content: center; gap: 8px; margin: 16px 0; }
.mfoot__social a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: rgba(255, 255, 255, .08); }
.mfoot__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(226, 196, 170, .2); color: rgba(255, 255, 255, .6); font-size: 13px; }

/* Language list */
.langs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.langs__opt { padding: 7px 14px; border-radius: 999px; color: rgba(255, 255, 255, .72) !important; font: 600 13.5px var(--display); }
.langs__opt.is-current { background: var(--sand); color: var(--ink) !important; }

/* "Built with ♥ by Tarqeyah" */
.builtby { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .7); font-size: 13.5px; transition: color .2s; }
.builtby strong { color: #fff; font-weight: 700; }
.builtby:hover { color: #fff; }
.builtby__heart { display: inline-block; color: var(--pink); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(.95); } 45% { transform: scale(1.12); } }

/* Announcement bar (Manage → Settings) */
.announce { position: relative; z-index: 101; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 16px; background: var(--pink); color: #fff; font: 600 14px var(--display); text-align: center; }
.announce a { text-decoration: underline; text-underline-offset: 3px; }
.has-announce .fnav { top: 54px; }
.has-announce .fnav.is-scrolled { top: 10px; }
.has-announce .mtop { top: 50px; }

/* Page top spacing under the floating navbars */
.page { padding-top: 116px; }
.device-mobile .page { padding-top: 80px; }
.has-announce .page { padding-top: 168px; }
.device-mobile.has-announce .page { padding-top: 126px; }

.is-bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

/* ── 3D book ─────────────────────────────────────────────────── */
.bk { --w: 200px; --d: 26px; position: relative; display: block; width: var(--w); aspect-ratio: 2 / 3; transform-style: preserve-3d; transform: perspective(1400px) rotateY(-26deg) rotateX(6deg); transition: transform .7s var(--ease); flex-shrink: 0; }
[dir="rtl"] .bk { transform: perspective(1400px) rotateY(26deg) rotateX(6deg); }
a:hover > .bk, .bk:hover { transform: perspective(1400px) rotateY(-12deg) rotateX(3deg); }
[dir="rtl"] a:hover > .bk, [dir="rtl"] .bk:hover { transform: perspective(1400px) rotateY(12deg) rotateX(3deg); }
.bk--xl { --w: 220px; --d: 30px; }
.bk--md { --w: 150px; --d: 20px; }
.bk--sm { --w: 104px; --d: 14px; }
.bk__cover, .bk__back { position: absolute; inset: 0; border-radius: 4px 12px 12px 4px; }
.bk__cover { display: flex; flex-direction: column; padding: 14% 12% 10%; overflow: hidden; background: var(--bk); color: var(--bk-fg); transform: translateZ(calc(var(--d) / 2)); box-shadow: inset 7px 0 10px -4px rgba(0, 0, 0, .35), inset -1px 0 0 rgba(255, 255, 255, .15); }
[dir="rtl"] .bk__cover, [dir="rtl"] .bk__back { border-radius: 12px 4px 4px 12px; }
[dir="rtl"] .bk__cover { box-shadow: inset -7px 0 10px -4px rgba(0, 0, 0, .35); }
.bk__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bk__back { background: color-mix(in srgb, var(--bk) 70%, #000); transform: translateZ(calc(var(--d) / -2)); box-shadow: 18px 28px 50px rgba(10, 8, 30, .45); }
.bk__pages { position: absolute; top: 2.5%; bottom: 2.5%; width: var(--d); left: calc(100% - var(--d) / 2 - 2px); transform: rotateY(90deg); background: repeating-linear-gradient(90deg, #EFE8DF 0 1px, #FFFDF9 1px 3px); border-radius: 2px; }
[dir="rtl"] .bk__pages { left: auto; right: calc(100% - var(--d) / 2 - 2px); transform: rotateY(-90deg); }
.bk__art { position: relative; height: 22%; }
.bk__star { position: absolute; opacity: .9; }
.bk__star--1 { top: 0; inset-inline-start: 0; color: var(--sand); }
.bk__star--2 { top: 36%; inset-inline-start: 22%; color: var(--bk-fg); opacity: .6; }
.bk__title { margin-top: auto; font: 800 calc(var(--w) * .105)/1.25 var(--display); }
.bk__author { margin-top: 6%; font: 500 calc(var(--w) * .062)/1.4 var(--text); opacity: .8; }
.bk__brand { margin-top: 12%; padding-top: 7%; border-top: 1px solid currentColor; font: 700 calc(var(--w) * .052) var(--display); opacity: .55; }
.bk__shine { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .22) 0%, transparent 35%, transparent 70%, rgba(255, 255, 255, .08) 100%); pointer-events: none; }
.bk--flat { transform: none !important; }
.bk--flat .bk__pages, .bk--flat .bk__back { display: none; }
.bk--flat .bk__cover { transform: none; box-shadow: inset 6px 0 8px -4px rgba(0, 0, 0, .3), 0 10px 22px rgba(41, 37, 73, .2); }
.bk--sm .bk__art { display: none; }
.bk--sm .bk__brand { display: none; }
