/* Customer portal — "the members' lounge after closing time".
   Continues the website's Service Night identity. Logical properties only: one sheet for RTL and LTR. */

:root {
  --night: #0b161c; --night-2: #0f1d24;
  --ink: #14232b; --ink-2: #1a2d37; --ink-3: #243c49; --ink-4: #3b5a6b;
  --text: #f3eee3; --text-2: #bccad0; --text-3: #93a8b2;
  --hair: rgb(240 180 60 / .22); --hair-soft: rgb(240 180 60 / .12); --line: rgb(195 208 214 / .13); --line-2: rgb(195 208 214 / .22);
  --gold: #d99a1e; --gold-hi: #f0b43c; --gold-pale: #fbe3a4; --gold-ink: #2a1c00; --gold-text: #f0c060;
  --online: #6fcaa5; --online-dot: #2f8f6b; --grace: #e89a66; --grace-deep: #b4531a; --danger: #f08a78;
  --paper: #fbfaf7; --paper-ink: #14232b; --paper-2: #4f5f67; --paper-rule: #d5dadc;
  --foil: linear-gradient(118deg, #a8740f 0%, #e3a52c 22%, #f7d98a 42%, #fff3cf 50%, #f0b43c 62%, #c98d17 82%, #a8740f 100%);
  --foil-btn: linear-gradient(118deg, #d99a1e 0%, #f0b43c 30%, #f8dc92 50%, #f0b43c 70%, #d99a1e 100%);
  --foil-text: linear-gradient(100deg, #d9a032 0%, #f3c45b 30%, #fde8b4 50%, #f0b43c 70%, #d99a1e 100%);
  --display: "Alexandria", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.5'/%3E%3C/svg%3E");
  --guilloche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 252' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23f0b43c' stroke-width='.6'%3E%3Cellipse cx='330' cy='40' rx='40' ry='26'/%3E%3Cellipse cx='330' cy='40' rx='70' ry='46'/%3E%3Cellipse cx='330' cy='40' rx='100' ry='66'/%3E%3Cellipse cx='330' cy='40' rx='130' ry='86'/%3E%3Cellipse cx='330' cy='40' rx='160' ry='106'/%3E%3Cellipse cx='330' cy='40' rx='190' ry='126'/%3E%3Cellipse cx='330' cy='40' rx='220' ry='146'/%3E%3Cellipse cx='330' cy='40' rx='250' ry='166'/%3E%3Cellipse cx='330' cy='40' rx='280' ry='186'/%3E%3Cellipse cx='330' cy='40' rx='310' ry='206'/%3E%3Cellipse cx='330' cy='40' rx='340' ry='226'/%3E%3Cellipse cx='330' cy='40' rx='370' ry='246'/%3E%3C/g%3E%3C/svg%3E");
  --r: 14px;
  --gutter: 16px;
  --top-h: 68px;
}
:root:lang(en) { --font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", sans-serif; --display: "Alexandria", "IBM Plex Sans", "Segoe UI", sans-serif; }
@media (min-width: 760px) { :root { --gutter: 32px; --top-h: 76px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); color-scheme: dark; }
body {
  margin: 0; min-block-size: 100vh; min-block-size: 100dvh; display: flex; flex-direction: column;
  font: 16px/1.7 var(--font); color: var(--text); background: var(--night); overflow-x: clip; position: relative; isolation: isolate;
}
:lang(en) body, body:lang(en) { line-height: 1.6; }
body::before { /* the room: a low lamp behind the counter */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(70vmax 50vmax at 50% -12%, rgb(217 154 30 / .11), transparent 62%),
    radial-gradient(50vmax 40vmax at 100% 110%, rgb(36 60 73 / .55), transparent 70%),
    linear-gradient(180deg, var(--night-2), var(--night) 60%);
}
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--grain); opacity: .06; mix-blend-mode: overlay; }

a { color: var(--gold-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-pale); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.25; margin: 0; text-wrap: balance; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { line-height: 1.45; }
p { margin: 0; text-wrap: pretty; }
.n, bdi.n { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.vh { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.ic { inline-size: 20px; block-size: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .flip { transform: scaleX(-1); }
[hidden] { display: none !important; }

.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -80px; z-index: 50; background: var(--gold-hi); color: var(--gold-ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { inset-block-start: 12px; }

/* ---------- top bar ---------- */
.top { position: sticky; inset-block-start: 0; z-index: 20; background: rgb(11 22 28 / .92); border-block-end: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--hair) 20%, var(--hair) 80%, transparent) 1; }
/* Desktop only: backdrop-filter would make the header the containing block of the fixed phone tab bar. */
@media (min-width: 920px) { @supports (backdrop-filter: blur(1px)) { .top { background: rgb(11 22 28 / .82); backdrop-filter: saturate(1.2) blur(10px); } } }
.top-in { max-inline-size: 1200px; margin-inline: auto; padding-inline: var(--gutter); min-block-size: var(--top-h); display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-block-size: 44px; flex: none; }
.brand:hover { color: var(--text); }
.brand .mark { inline-size: 34px; block-size: 34px; border-radius: 8px; box-shadow: 0 0 0 1px var(--hair); }
.brand-txt b { display: block; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: .005em; }
.brand-txt small { display: block; font-size: 12px; line-height: 1.35; color: var(--text-3); }
.nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav a { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding-inline: 14px; color: var(--text-2); text-decoration: none; font-size: 15px; position: relative; border-radius: 8px; transition: color .2s; white-space: nowrap; }
.nav a .ic { inline-size: 18px; block-size: 18px; opacity: .8; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 14px; inset-block-end: 4px; block-size: 1px; background: var(--foil); }
.nav a[aria-current="page"] .ic { color: var(--gold-hi); opacity: 1; }
.top-end { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav:not([hidden]) + .top-end { margin-inline-start: 0; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; min-inline-size: 44px; justify-content: center; padding-inline: 14px; border-radius: 999px; background: transparent; border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; transition: border-color .2s, color .2s; }
.chip-btn:hover { border-color: var(--hair); color: var(--text); }
.chip-btn .ic { inline-size: 17px; block-size: 17px; }
#lang:lang(en) { font-family: "IBM Plex Sans", sans-serif; }
#lang:lang(ar) { font-family: "IBM Plex Sans Arabic", sans-serif; }

@media (max-width: 919px) {
  .brand-txt small { display: none; }
  .brand-txt b { font-size: 15px; }
  .nav { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30; margin: 0; gap: 0; justify-content: space-around;
    padding-block: 6px calc(6px + env(safe-area-inset-bottom)); padding-inline: 4px; background: rgb(11 22 28 / .96); border-block-start: 1px solid var(--hair-soft); }
  .nav a { flex: 1 1 0; flex-direction: column; gap: 2px; min-block-size: 54px; padding-inline: 2px; font-size: 12px; justify-content: center; text-align: center; line-height: 1.3; }
  .nav a .ic { inline-size: 22px; block-size: 22px; }
  .nav a[aria-current="page"]::after { inset-inline: 30%; inset-block-end: auto; inset-block-start: -7px; block-size: 2px; }
  body.has-nav { padding-block-end: calc(72px + env(safe-area-inset-bottom)); }
  .icon-only-sm span { display: none; }
  .chip-btn { padding-inline: 11px; }
}

/* ---------- layout ---------- */
.view { flex: 1; inline-size: 100%; max-inline-size: 1200px; margin-inline: auto; padding: 28px var(--gutter) 56px; outline: none; }
@media (min-width: 760px) { .view { padding-block: 44px 72px; } }
.foot { max-inline-size: 1200px; margin-inline: auto; inline-size: 100%; padding: 20px var(--gutter) 28px; color: var(--text-3); font-size: 13px; border-block-start: 1px solid var(--line); }
body.has-nav .foot { padding-block-end: 20px; }

.kicker { display: flex; align-items: center; gap: 10px; margin-block-end: 10px; color: var(--gold-text); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.kicker::before { content: ""; inline-size: 7px; block-size: 7px; transform: rotate(45deg); background: var(--foil); flex: none; }
:lang(en) .kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.lede { color: var(--text-2); font-size: 16px; margin-block-start: 8px; max-inline-size: 60ch; }
.muted { color: var(--text-3); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-block-end: 28px; }
.page-head h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 700; letter-spacing: -.005em; }
:lang(en) .page-head h1 { letter-spacing: -.02em; }
.page-head h1:focus { outline: none; }

.panel { position: relative; background: linear-gradient(180deg, rgb(255 255 255 / .028), rgb(255 255 255 / 0) 40%), var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: inset 0 1px 0 rgb(255 255 255 / .035), 0 24px 48px -32px rgb(0 0 0 / .8); }
.panel-pad { padding: 22px; }
@media (min-width: 760px) { .panel-pad { padding: 30px; } }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-block-end: 18px; }
.panel-title h2 { font-size: 19px; font-weight: 700; }
.rule { block-size: 1px; border: 0; margin: 20px 0; background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-block-size: 48px; padding-inline: 22px; border-radius: 10px; border: 0; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background-position .5s ease, box-shadow .2s, color .2s, border-color .2s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn .ic { inline-size: 18px; block-size: 18px; }
.btn.gold { color: var(--gold-ink); background: var(--foil-btn); background-size: 220% 100%; background-position: 0% 0; box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -1px 0 rgb(0 0 0 / .15), 0 12px 28px -14px rgb(217 154 30 / .75); }
.btn.gold:hover:not(:disabled) { background-position: 100% 0; color: var(--gold-ink); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); font-weight: 500; }
.btn.ghost:hover:not(:disabled) { border-color: var(--hair); color: var(--gold-pale); background: rgb(240 180 60 / .04); }
.btn.quiet { background: transparent; color: var(--text-2); font-weight: 500; padding-inline: 12px; min-block-size: 44px; }
.btn.quiet:hover:not(:disabled) { color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover:not(:disabled) { color: #ffb3a6; }
.btn.wide { inline-size: 100%; }
.btn.sm { min-block-size: 44px; padding-inline: 14px; font-size: 14px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: 50%; inline-size: 18px; block-size: 18px; margin: -9px; border-radius: 50%; border: 2px solid rgb(42 28 0 / .3); border-block-start-color: var(--gold-ink); animation: spin .8s linear infinite; }
.btn.ghost.busy::after, .btn.quiet.busy::after { border-color: rgb(243 238 227 / .25); border-block-start-color: var(--text); }
.btn.ghost.done, .btn.quiet.done { color: var(--online) !important; border-color: rgb(111 202 165 / .5) !important; }
.btn.gold.done { color: var(--gold-ink) !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; margin-block-end: 18px; }
.field > span, .field > label { font-size: 14px; color: var(--text-2); font-weight: 500; }
.input { inline-size: 100%; min-block-size: 50px; padding: 12px 14px; border-radius: 10px; background: rgb(6 13 17 / .55); border: 1px solid var(--line-2); color: var(--text); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.input::placeholder { color: #6f8691; }
.input:hover { border-color: rgb(195 208 214 / .32); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgb(217 154 30 / .22); }
.input[readonly] { background: transparent; border-style: dashed; color: var(--text-2); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgb(240 138 120 / .15); }
.input[dir="ltr"] { text-align: start; }
[dir="rtl"] .input[dir="ltr"] { text-align: end; }
.pw { position: relative; }
.pw .input { padding-inline-end: 56px; }
.pw-toggle { position: absolute; inset-inline-end: 3px; inset-block-start: 3px; inline-size: 44px; block-size: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--text-3); border-radius: 8px; }
.pw-toggle:hover { color: var(--text); }
.f-err { color: var(--danger); font-size: 13.5px; min-block-size: 0; }
.f-err:empty { display: none; }
.form-err { color: var(--danger); background: rgb(240 138 120 / .08); border: 1px solid rgb(240 138 120 / .3); border-radius: 10px; padding: 11px 14px; font-size: 14.5px; margin-block-end: 16px; }
.form-err:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; min-block-size: 44px; padding-block: 4px; margin-block-end: 18px; color: var(--text-2); font-size: 14.5px; }
.check input { appearance: none; flex: none; inline-size: 22px; block-size: 22px; margin: 2px 0 0; border-radius: 6px; border: 1px solid var(--line-2); background: rgb(6 13 17 / .55); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--foil-btn); border-color: transparent; }
.check input:checked::after { content: ""; inline-size: 6px; block-size: 11px; border: solid var(--gold-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.check input[aria-invalid="true"] { border-color: var(--danger); }
.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- auth ---------- */
.auth { display: grid; gap: 40px; align-items: center; min-block-size: calc(100dvh - var(--top-h) - 200px); }
@media (min-width: 960px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 72px; } }
.auth-art { display: none; }
@media (min-width: 960px) { .auth-art { display: block; } }
.auth-art h2 { font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; line-height: 1.3; margin-block-end: 14px; }
:lang(en) .auth-art h2 { letter-spacing: -.025em; line-height: 1.12; }
.auth-art .lede { margin-block-end: 36px; }
.auth-art .lcard { max-inline-size: 410px; margin-inline: 18px; transform: rotate(-4deg); }
[dir="rtl"] .auth-art .lcard { transform: rotate(4deg); }
.auth-form h1 { font-size: 28px; margin-block-end: 6px; }
.auth-form h1:focus { outline: none; }
.auth-form .lede { margin-block-end: 26px; font-size: 15px; }
.auth-alt { margin-block-start: 20px; text-align: center; color: var(--text-2); font-size: 15px; }
.auth-alt a { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 4px; font-weight: 700; }
.pre-note { display: flex; gap: 10px; align-items: center; margin-block-end: 20px; padding: 12px 14px; border: 1px solid var(--hair-soft); border-radius: 10px; color: var(--text-2); font-size: 14px; background: rgb(240 180 60 / .04); }

/* ---------- the licence card ---------- */
.lcard { container-type: inline-size; inline-size: 100%; aspect-ratio: 1.586; position: relative; border-radius: clamp(12px, 3.6vw, 20px); }
.lcard-face { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; isolation: isolate; color: #e9e2d0;
  background:
    radial-gradient(120% 95% at 88% -8%, rgb(240 180 60 / .16), transparent 52%),
    radial-gradient(90% 80% at 0% 110%, rgb(120 170 190 / .10), transparent 60%),
    repeating-linear-gradient(112deg, rgb(255 255 255 / .022) 0 1px, transparent 1px 3px),
    linear-gradient(152deg, #24404f 0%, #16282f 38%, #0f1b21 70%, #13232b 100%);
  box-shadow: inset 0 0 0 1px rgb(240 180 60 / .30), inset 0 1px 0 rgb(255 255 255 / .12), inset 0 -1px 0 rgb(0 0 0 / .5), 0 2px 0 rgb(0 0 0 / .4), 0 40px 70px -28px rgb(0 0 0 / .9), 0 18px 40px -24px rgb(217 154 30 / .25);
  padding: 6.4cqi 7cqi; display: grid; grid-template-rows: auto 1fr auto auto; }
.lcard-face::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--guilloche) center / 100% 100% no-repeat; opacity: .10; }
[dir="rtl"] .lcard-face::before { transform: scaleX(-1); }
.lcard-face::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--grain); opacity: .09; mix-blend-mode: overlay; }
.lc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4cqi; }
.lc-issuer { display: flex; align-items: center; gap: 2.6cqi; min-inline-size: 0; }
.lc-issuer svg { inline-size: 8.4cqi; block-size: 8.4cqi; flex: none; }
.lc-issuer b { display: block; font-family: var(--display); font-weight: 700; font-size: 3.5cqi; line-height: 1.25; color: #efe7d4; white-space: nowrap; }
.lc-issuer small { display: block; font-family: var(--mono); font-size: 2.3cqi; letter-spacing: .22em; color: #b7ab8c; line-height: 1.4; direction: ltr; text-align: start; }
.lc-plan { text-align: end; flex: none; }
.lc-plan small { display: block; font-size: 2.3cqi; color: #b7ab8c; line-height: 1.3; }
:lang(en) .lc-plan small { font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.lc-plan b { display: block; font-family: var(--display); font-weight: 800; font-size: 4.6cqi; line-height: 1.35; }
.foil-text { background: var(--foil-text); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 0 rgb(0 0 0 / .55)); }
.lc-chip { align-self: center; inline-size: 12cqi; block-size: 9cqi; filter: drop-shadow(0 1px 0 rgb(0 0 0 / .5)); }
.lc-serial { direction: ltr; unicode-bidi: isolate; font-family: var(--mono); font-weight: 500; font-size: 4.25cqi; letter-spacing: .05em; white-space: nowrap; color: #d9d0b9; margin-block: 0 4.2cqi; text-align: center;
  text-shadow: 0 -1px 0 rgb(0 0 0 / .7), 0 1px 0 rgb(255 255 255 / .16); display: flex; justify-content: space-between; }
.lc-serial span { display: inline-block; }
.lc-serial .pre { color: #c9a24e; }
.lc-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 4cqi; }
.lc-name { min-inline-size: 0; }
.lc-name small { display: block; font-size: 2.3cqi; color: #b7ab8c; line-height: 1.3; }
:lang(en) .lc-name small { font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.lc-name b { display: block; font-family: var(--display); font-weight: 700; font-size: 4.4cqi; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-inline-size: 58cqi; }
.lc-valid { display: flex; align-items: center; gap: 2cqi; flex: none; }
.lc-valid small { font-size: 1.95cqi; line-height: 1.25; color: #b7ab8c; text-align: end; }
.lc-valid small i { display: block; font-style: normal; font-family: var(--mono); letter-spacing: .12em; }
.lc-valid b { font-family: var(--mono); font-weight: 500; font-size: 4.2cqi; color: #e9e2d0; direction: ltr; text-shadow: 0 -1px 0 rgb(0 0 0 / .7), 0 1px 0 rgb(255 255 255 / .16); }

.lcard.unminted .lcard-face { background: repeating-linear-gradient(112deg, rgb(255 255 255 / .012) 0 1px, transparent 1px 4px), rgb(20 35 43 / .35); box-shadow: none; }
.lcard.unminted .lcard-face::before { opacity: .05; }
.lcard.unminted::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 16px), repeating-linear-gradient(0deg, var(--gold) 0 10px, transparent 10px 16px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .55; }
.lcard.unminted .lc-serial, .lcard.unminted .lc-valid b, .lcard.unminted .lc-name b { color: rgb(217 208 185 / .35); text-shadow: none; -webkit-text-fill-color: currentColor; background: none; filter: none; }
.lcard.unminted .lc-chip, .lcard.unminted .lc-issuer svg { opacity: .35; filter: grayscale(.4); }
.lcard.unminted .lc-plan b { color: rgb(217 208 185 / .45); -webkit-text-fill-color: currentColor; background: none; filter: none; font-weight: 700; }

.lcard.reveal { perspective: 1100px; }
.lcard.reveal .lcard-face { animation: mint 1.25s cubic-bezier(.16, .8, .22, 1) both; transform-origin: 50% 100%; }
.lcard.reveal .lcard-face .sheen { position: absolute; inset: -20% -60%; z-index: 3; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgb(255 243 207 / .0) 42%, rgb(255 243 207 / .32) 50%, rgb(255 243 207 / 0) 58%, transparent 62%); transform: translateX(-70%); animation: sheen 1.5s ease-in-out .95s both; }
[dir="rtl"] .lcard.reveal .lcard-face .sheen { animation-name: sheen-rtl; transform: translateX(70%); }
@keyframes mint { from { transform: rotateX(62deg) translateY(12%) scale(.9); opacity: 0; filter: brightness(.5); } 55% { opacity: 1; } to { transform: none; opacity: 1; filter: none; } }
@keyframes sheen { from { transform: translateX(-70%); } to { transform: translateX(70%); } }
@keyframes sheen-rtl { from { transform: translateX(70%); } to { transform: translateX(-70%); } }

/* ---------- overview ---------- */
.ov-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-block-end: 30px; }
.ov-head h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; letter-spacing: -.005em; }
:lang(en) .ov-head h1 { letter-spacing: -.03em; }
.ov-head h1:focus { outline: none; }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 16px 20px; margin-block-end: 24px; border-radius: var(--r); border: 1px solid var(--hair); background: linear-gradient(90deg, rgb(240 180 60 / .09), rgb(240 180 60 / .02)); }
.notice p { color: var(--text); font-size: 15px; max-inline-size: 70ch; }
.notice p strong { color: var(--gold-pale); font-weight: 700; }
.notice.warn { border-color: rgb(232 154 102 / .45); background: linear-gradient(90deg, rgb(232 154 102 / .10), rgb(232 154 102 / .02)); }

.hero-grid { display: grid; gap: 22px; margin-block-end: 22px; }
@media (min-width: 960px) { .hero-grid, .lower-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.time { display: grid; gap: 24px; align-items: center; }
@media (min-width: 560px) { .time { grid-template-columns: auto minmax(0, 1fr); gap: 32px; } }
.dial { position: relative; inline-size: min(240px, 68vw); aspect-ratio: 1; margin-inline: auto; }
.dial svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.dial .ticks line { stroke: rgb(195 208 214 / .22); stroke-width: 1; }
.dial .ticks line.major { stroke: rgb(240 180 60 / .45); }
.dial .track { fill: none; stroke: rgb(195 208 214 / .1); stroke-width: 2; }
.dial .arc { fill: none; stroke: url(#g-ring); stroke-width: 3.5; stroke-linecap: round; transition: stroke-dasharray 1.2s cubic-bezier(.2, .7, .2, 1); }
.dial .tip { fill: var(--gold-pale); }
.dial.grace .arc { stroke: var(--grace); }
.dial.grace .tip { fill: var(--grace); }
.dial.expired .track, .dial.none .track { stroke-dasharray: 2 6; stroke: rgb(195 208 214 / .28); }
.dial-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 18%; }
.dial-c b { font-family: var(--display); font-weight: 800; font-size: clamp(50px, 16vw, 72px); line-height: 1; letter-spacing: -.03em; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.dial-c span { display: block; margin-block-start: 10px; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.dial.grace .dial-c b { color: var(--grace); }
.dial-c b.word { font-size: clamp(24px, 6vw, 30px); letter-spacing: 0; line-height: 1.3; }
.time-info h2 { font-size: 22px; margin-block-end: 4px; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding-block: 3px; padding-inline: 10px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); margin-block-end: 12px; }
.state::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%; background: currentColor; }
.state.active { color: var(--online); border-color: rgb(111 202 165 / .35); }
.state.grace { color: var(--grace); border-color: rgb(232 154 102 / .45); }
.state.expired { color: var(--danger); border-color: rgb(240 138 120 / .4); }
.span { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-block: 18px 6px; }
.span > div small { display: block; font-size: 12.5px; color: var(--text-3); }
.span > div b { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; }
.span > div:last-child { text-align: end; }
.span i { block-size: 1px; background: linear-gradient(90deg, var(--line-2), var(--hair), var(--line-2)); position: relative; }
.span i::after { content: ""; position: absolute; inset-inline-end: -1px; inset-block-start: -3px; inline-size: 7px; block-size: 7px; transform: rotate(45deg); background: var(--gold); }
.time-info .msg { color: var(--text-2); font-size: 15px; margin-block: 8px 18px; }
.time-info .msg.warn { color: var(--grace); }

.card-col { display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.card-col .lcard { max-inline-size: 520px; margin-inline: auto; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-inline-size: 520px; margin-inline: auto; inline-size: 100%; }
.card-meta .muted { font-size: 13.5px; }

.lower-grid { display: grid; gap: 22px; }
.usage { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.usage b { font-family: var(--display); font-size: 30px; font-weight: 700; }
.usage span { color: var(--text-2); }
.meter { display: flex; gap: 4px; margin-block: 12px 22px; block-size: 6px; }
.meter i { flex: 1; border-radius: 2px; background: rgb(195 208 214 / .12); }
.meter i.on { background: var(--foil); box-shadow: 0 0 10px rgb(240 180 60 / .25); }
.meter.full i.on { background: var(--grace); box-shadow: none; }
.meter.bar { display: block; background: rgb(195 208 214 / .12); border-radius: 3px; overflow: hidden; }
.meter.bar i { display: block; block-size: 100%; background: var(--foil); border-radius: 3px; }
.devs { list-style: none; margin: 0; padding: 0; }
.dev { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding-block: 14px; border-block-start: 1px solid var(--line); }
.dev:first-child { border-block-start: 0; padding-block-start: 0; }
.dev-ic { inline-size: 42px; block-size: 42px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text-2); position: relative; }
.dev-ic .dot { position: absolute; inset-block-end: -3px; inset-inline-end: -3px; inline-size: 12px; block-size: 12px; border-radius: 50%; background: #56666e; border: 2px solid var(--ink); }
.dev-ic .dot.on { background: var(--online); box-shadow: 0 0 0 3px rgb(111 202 165 / .15); }
.dev-name { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.dev-meta { color: var(--text-3); font-size: 13px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.dev-meta .on { color: var(--online); }
.empty { text-align: center; padding: 28px 12px; color: var(--text-2); border: 1px dashed var(--line-2); border-radius: 12px; font-size: 15px; }
.empty .ic { inline-size: 28px; block-size: 28px; color: var(--gold-text); margin-block-end: 8px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding-block: 16px; border-block-start: 1px solid var(--line); }
.steps li:first-child { border-block-start: 0; padding-block-start: 0; }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-block-start: 2px; text-align: center; }
.steps h3 { font-size: 16px; margin-block-end: 4px; }
.steps p { color: var(--text-2); font-size: 14.5px; }
.steps .actions { margin-block-start: 12px; }
.path { display: inline; color: var(--text); font-weight: 500; }
.addr { display: flex; align-items: center; gap: 8px; margin-block-start: 10px; padding-block: 4px; padding-inline: 14px 4px; border: 1px solid var(--line-2); border-radius: 10px; background: rgb(6 13 17 / .5); }
.addr code { flex: 1; min-inline-size: 0; font-family: var(--mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir="rtl"] .addr code { text-align: end; }

/* ---------- plans ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: rgb(6 13 17 / .5); gap: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-block-size: 42px; padding-inline: 20px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
.seg input:checked + span { background: var(--ink-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); }
.seg input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.plans-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-block-end: 20px; }
.vat-note { color: var(--text-3); font-size: 13.5px; }

.menu { list-style: none; margin: 0 0 28px; padding: 0; border-block: 1px solid var(--line); }
.plan { display: grid; gap: 14px 28px; padding-block: 26px; padding-inline: 4px; border-block-start: 1px solid var(--line); position: relative; }
.plan:first-child { border-block-start: 0; }
@media (min-width: 860px) { .plan { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; padding-inline: 24px; } }
.plan.rec { background: linear-gradient(90deg, rgb(240 180 60 / .07), transparent 75%); }
[dir="rtl"] .plan.rec { background: linear-gradient(270deg, rgb(240 180 60 / .07), transparent 75%); }
.plan.rec::before { content: ""; position: absolute; inset-block: -1px; inset-inline-start: 0; inline-size: 2px; background: var(--foil); }
.plan.sel { box-shadow: inset 0 0 0 1px var(--hair); border-radius: 12px; }
.plan h2 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan .aud { color: var(--text-2); font-size: 14.5px; margin-block-start: 2px; }
.tag { display: inline-flex; align-items: center; font-family: var(--font); font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--hair); color: var(--gold-text); letter-spacing: 0; line-height: 1.6; }
.tag.cur { border-color: rgb(111 202 165 / .4); color: var(--online); }
.limits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--text); font-size: 15px; }
.limits li { display: flex; align-items: center; gap: 10px; }
.limits li::before { content: ""; inline-size: 5px; block-size: 5px; transform: rotate(45deg); background: var(--gold); flex: none; }
.price b { display: block; font-weight: 500; font-size: 17px; line-height: 1.3; color: var(--text-2); }
.price b .n { font-size: 26px; color: var(--text); }
.price b small { font-family: var(--font); font-size: 14px; color: var(--text-2); font-weight: 500; }
.price span { display: block; font-size: 13.5px; color: var(--text-3); }
.price .save { color: var(--online); }
@media (max-width: 859px) { .plan .btn { inline-size: 100%; } }

.sheet { max-inline-size: 640px; margin-inline: auto; scroll-margin-block-start: calc(var(--top-h) + 16px); }
.sheet h2 { font-size: 22px; }
.receipt { list-style: none; margin: 18px 0 0; padding: 0; }
.receipt li { display: flex; align-items: baseline; gap: 10px; padding-block: 8px; font-size: 15px; color: var(--text-2); }
.receipt li::after { content: none; }
.receipt li .dots { flex: 1; border-block-end: 1px dotted rgb(195 208 214 / .28); transform: translateY(-4px); min-inline-size: 20px; }
.receipt li .amt { color: var(--text); white-space: nowrap; }
.receipt li.credit .amt { color: var(--online); }
.receipt li.total { margin-block-start: 8px; padding-block-start: 16px; border-block-start: 1px solid var(--hair); color: var(--text); font-weight: 700; font-size: 17px; }
.receipt li.total .amt { font-size: 22px; color: var(--gold-pale); }
.receipt li.total .dots { border: 0; }
.kind { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: rgb(240 180 60 / .06); border: 1px solid var(--hair-soft); color: var(--text); font-size: 14.5px; margin-block-start: 14px; }
.kind::before { content: ""; inline-size: 6px; block-size: 6px; transform: rotate(45deg); background: var(--gold); flex: none; }
.period-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--text-2); font-size: 14.5px; margin-block: 16px 20px; }
.period-line b { color: var(--text); font-weight: 500; }
.sheet .actions .btn.gold { flex: 1 1 240px; }

/* ---------- pay / paid ---------- */
.test-band { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; margin-block-end: 22px; border-radius: 10px; font-weight: 700; color: #ffd9c2; text-align: center;
  background: repeating-linear-gradient(135deg, rgb(180 83 26 / .38) 0 12px, rgb(180 83 26 / .22) 12px 24px); border: 1px solid rgb(232 154 102 / .6); }
.pay-box { max-inline-size: 520px; margin-inline: auto; text-align: center; }
.pay-box .amount { font-family: var(--mono); font-size: clamp(34px, 9vw, 48px); font-weight: 500; margin-block: 8px 4px; direction: ltr; unicode-bidi: isolate; }
.pay-box .amount small { font-family: var(--font); font-size: .45em; color: var(--text-2); }
.pay-box .muted { margin-block-end: 26px; }
.pay-box .actions { justify-content: center; flex-direction: column; align-items: stretch; }

.paid { display: grid; gap: 40px; align-items: start; padding-block: 8px; }
@media (min-width: 960px) { .paid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; } }
.paid .lcard { max-inline-size: 540px; margin-inline: auto; }
.paid h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; margin-block-end: 10px; }
:lang(en) .paid h1 { letter-spacing: -.025em; }
.paid h1:focus { outline: none; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 22px 0 26px; font-size: 15px; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text); font-weight: 500; }

/* ---------- billing table ---------- */
.tbl { inline-size: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: start; font-weight: 500; font-size: 13px; color: var(--text-3); padding: 0 14px 12px; border-block-end: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 16px 14px; border-block-end: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-block-end: 0; }
.tbl td.num-col, .tbl th.num-col { text-align: end; }
.tbl tbody tr.link { cursor: pointer; transition: background .15s; }
.tbl tbody tr.link:hover { background: rgb(240 180 60 / .04); }
.tbl a.inv { font-family: var(--mono); font-weight: 500; text-decoration: none; display: inline-flex; min-block-size: 44px; align-items: center; }
.tbl a.inv:hover { text-decoration: underline; }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; }
.st::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
.st.paid { color: var(--online); border-color: rgb(111 202 165 / .35); }
.st.pending { color: var(--gold-text); border-color: var(--hair); }
.st.cancelled { color: var(--text-3); }
@media (max-width: 759px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr { padding-block: 14px; border-block-end: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .tbl tr:last-child { border-block-end: 0; }
  .tbl td { padding: 0; border: 0; }
  .tbl td[data-c="num"] { grid-column: 1; }
  .tbl td[data-c="status"] { grid-column: 2; grid-row: 1; text-align: end; }
  .tbl td[data-c="plan"] { grid-column: 1 / -1; font-weight: 500; }
  .tbl td[data-c="date"], .tbl td[data-c="period"] { grid-column: 1; color: var(--text-3); font-size: 13.5px; }
  .tbl td[data-c="total"] { grid-column: 2; grid-row: 2 / span 2; align-self: center; text-align: end; font-size: 16px; }
  .tbl a.inv { min-block-size: 32px; }
}

/* ---------- invoice (paper) ---------- */
.inv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 20px; }
.paper { background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 28px 22px; max-inline-size: 860px; margin-inline: auto; box-shadow: 0 40px 80px -40px rgb(0 0 0 / .9), 0 0 0 1px rgb(0 0 0 / .2); position: relative; overflow: hidden; }
@media (min-width: 760px) { .paper { padding: 52px 56px; } }
.paper::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; block-size: 4px; background: var(--foil); }
.paper a { color: var(--paper-ink); }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-block-end: 22px; border-block-end: 1px solid var(--paper-rule); }
.inv-seller { display: flex; gap: 14px; align-items: flex-start; }
.inv-seller svg { inline-size: 44px; block-size: 44px; flex: none; }
.inv-seller b { display: block; font-family: var(--display); font-size: 16px; line-height: 1.4; }
.inv-seller span { display: block; font-size: 13px; color: var(--paper-2); line-height: 1.55; }
.inv-title { text-align: end; }
.inv-title h1 { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.inv-title h1:focus { outline: none; }
.inv-title h1 .en { font-family: "Alexandria", "IBM Plex Sans", sans-serif; color: #8a5d08; font-weight: 700; }
.inv-title p { font-size: 14px; color: var(--paper-2); }
.inv-cols { display: grid; gap: 22px; padding-block: 24px; border-block-end: 1px solid var(--paper-rule); }
@media (min-width: 640px) { .inv-cols { grid-template-columns: 1fr 1fr; } }
.inv-cols h2 { font-family: var(--font); font-size: 12px; font-weight: 700; color: #8a5d08; letter-spacing: .06em; margin-block-end: 8px; }
:lang(en) .inv-cols h2 { text-transform: uppercase; letter-spacing: .14em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--paper-2); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.inv-lines { inline-size: 100%; border-collapse: collapse; margin-block: 24px 8px; font-size: 14.5px; }
.inv-lines th { text-align: start; font-size: 12px; color: var(--paper-2); font-weight: 700; padding: 0 0 10px; border-block-end: 1.5px solid var(--paper-ink); }
.inv-lines th:last-child, .inv-lines td:last-child { text-align: end; }
.inv-lines td { padding: 14px 0; border-block-end: 1px solid var(--paper-rule); vertical-align: top; }
.inv-lines td small { display: block; color: var(--paper-2); font-size: 13px; }
.inv-sum { margin-inline-start: auto; max-inline-size: 360px; list-style: none; padding: 0; margin-block: 8px 0; }
.inv-sum li { display: flex; justify-content: space-between; gap: 16px; padding-block: 6px; font-size: 14.5px; }
.inv-sum li span:first-child { color: var(--paper-2); }
.inv-sum li.total { border-block-start: 1.5px solid var(--paper-ink); margin-block-start: 6px; padding-block-start: 12px; font-weight: 700; font-size: 17px; }
.inv-sum li.total span:first-child { color: var(--paper-ink); }
.inv-foot { margin-block-start: 30px; padding-block-start: 16px; border-block-start: 1px solid var(--paper-rule); font-size: 12.5px; color: var(--paper-2); }

/* ---------- settings ---------- */
.set-grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 960px) { .set-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- states ---------- */
.boot { display: grid; place-items: center; min-block-size: 50vh; }
.boot span { inline-size: 64px; block-size: 1px; background: var(--foil); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; opacity: .4; } 50% { opacity: 1; } 100% { background-position: -100% 0; opacity: .4; } }
.skel { border-radius: 10px; background: linear-gradient(90deg, rgb(255 255 255 / .03), rgb(255 255 255 / .07), rgb(255 255 255 / .03)); background-size: 200% 100%; animation: shimmer 1.6s ease-in-out infinite; }
.skel-grid { display: grid; gap: 22px; }
@media (min-width: 960px) { .skel-grid { grid-template-columns: 1fr 1fr; } }
.oops { max-inline-size: 520px; margin: 8vh auto; text-align: center; }
.oops h1 { font-size: 26px; margin-block-end: 10px; }
.oops p { color: var(--text-2); margin-block-end: 22px; }
.oops .actions { justify-content: center; }

/* ---------- dialog & toast ---------- */
.dlg { border: 0; padding: 0; background: transparent; color: var(--text); max-inline-size: min(480px, calc(100vw - 32px)); inline-size: 100%; }
.dlg::backdrop { background: rgb(4 9 12 / .72); }
.dlg-in { background: var(--ink); border: 1px solid var(--hair); border-radius: 16px; padding: 26px 24px 22px; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .9); }
.dlg h2 { font-size: 20px; margin-block-end: 10px; }
.dlg p { color: var(--text-2); font-size: 15px; margin-block-end: 22px; }
.dlg-actions { display: flex; flex-wrap: wrap-reverse; gap: 10px; justify-content: flex-end; }
.dlg-actions .btn { flex: 1 1 140px; }
.dlg[open] .dlg-in { animation: pop .22s ease-out; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { position: fixed; z-index: 60; inset-inline: 16px; inset-block-end: 24px; margin-inline: auto; max-inline-size: 420px; padding: 13px 18px; border-radius: 12px; background: var(--ink-3); border: 1px solid var(--hair); color: var(--text); font-size: 15px; text-align: center; box-shadow: 0 20px 40px -18px rgb(0 0 0 / .9); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: none; }
body.has-nav .toast { inset-block-end: calc(88px + env(safe-area-inset-bottom)); }

/* ---------- motion ---------- */
.view > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.view > *:nth-child(2) { animation-delay: .05s; }
.view > *:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .lcard.reveal .lcard-face .sheen { display: none; }
}

/* ---------- print: only the invoice, on white paper ---------- */
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #000; }
  body::before, body::after, .top, .foot, .inv-bar, .skip, .toast, .dlg, .nav { display: none !important; }
  body.has-nav { padding: 0; }
  .view { padding: 0; max-inline-size: none; }
  .view > * { animation: none !important; }
  .paper { box-shadow: none; border-radius: 0; padding: 0; max-inline-size: none; }
  .paper::before { display: none; }
  .inv-title h1 .en { color: #000; }
  .inv-cols h2 { color: #000; }
}
@media (max-width: 479px) {
  .addr { flex-wrap: wrap; padding-block: 10px 4px; }
  .addr code { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; }
  .addr .btn { margin-inline-start: auto; }
}

/* ---------- attempt 2 refinements ---------- */
/* Medium desktop: labels only, so the bar never overflows. */
@media (min-width: 920px) and (max-width: 1099px) {
  .nav a .ic { display: none; }
  .nav a { padding-inline: 11px; }
  .brand-txt small { display: none; }
}
/* On one shared 7/5 grid the card fills its column exactly; on narrower screens it keeps a comfortable size. */
@media (min-width: 960px) {
  .card-col .lcard, .card-meta { max-inline-size: none; margin-inline: 0; }
  .paid > div:first-child { position: sticky; inset-block-start: calc(var(--top-h) + 28px); }
}
/* Card micro-labels never below ~9px; the least important ones go on small cards. */
.lc-issuer small, .lc-plan small, .lc-name small { font-size: max(9px, 2.3cqi); }
.lc-valid small { font-size: max(8.5px, 1.95cqi); }
@container (max-width: 400px) {
  .lc-issuer small, .lc-valid small i { display: none; }
  .lc-valid small { max-inline-size: 9ch; }
}

/* Settings — the restaurant's own Thawani account */
#gw-slot { margin-block-start: 22px; }
.gw { max-inline-size: 860px; }
.gw-sub { margin-block: -8px 18px; font-size: 14.5px; max-inline-size: 64ch; }
.gw-label { margin-block: 18px 8px; font-size: 14px; color: var(--text-2); font-weight: 500; }
.gw-fields { display: grid; gap: 0 18px; margin-block-start: 18px; }
@media (min-width: 760px) { .gw-fields { grid-template-columns: 1fr 1fr; } }
.gw-note { font-size: 13.5px; margin-block: 10px 0; }
.gw-test { margin-block: 14px 0; padding-block: 10px; padding-inline: 14px; border-radius: 10px; border: 1px dashed rgb(232 154 102 / .45); color: var(--grace); font-size: 13.5px; }
.gw-test .linkish { color: var(--gold-hi); }
.gw-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin-block: 14px 0; font-size: 14px; }
.gw-kv dt { color: var(--text-3); }
.gw-kv dd { margin: 0; overflow-wrap: anywhere; }
.gw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 20px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-block-size: 44px; }

/* ---------- «خدماتك» (#services): what the plan includes, and how to install and start each app ---------- */
.svc-head { display: grid; gap: 24px 40px; align-items: end; margin-block-end: 34px; }
@media (min-width: 960px) { .svc-head { grid-template-columns: minmax(0, 1fr) auto; } }
.svc-head h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; letter-spacing: -.005em; }
:lang(en) .svc-head h1 { letter-spacing: -.02em; }
.svc-head h1:focus { outline: none; }
.limits-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--hair-soft); border-radius: var(--r); background: rgb(6 13 17 / .45); }
.limits-strip > div { padding: 14px 18px; min-inline-size: 0; }
.limits-strip > div + div { border-inline-start: 1px solid var(--hair-soft); }
.limits-strip dt { font-size: 12.5px; color: var(--text-3); }
:lang(en) .limits-strip dt { text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px; }
.limits-strip dd { margin: 2px 0 0; }
.limits-strip dd b { display: block; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.35; color: var(--gold-pale); white-space: nowrap; }
.limits-strip dd small { display: block; font-size: 12.5px; color: var(--text-2); }
@media (max-width: 479px) { .limits-strip > div { padding: 12px 10px; } .limits-strip dd b { font-size: 17px; white-space: normal; } }

.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-block-end: 16px; }
.sec-head h2 { font-size: 22px; }
.sec-head .muted { font-size: 14.5px; }
.apps-sec { margin-block-end: 34px; }
.apps { display: grid; gap: 18px; }
@media (min-width: 860px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .apps .app[data-guide="svc-till"] { grid-column: 1 / -1; } }
.app { position: relative; display: flex; flex-direction: column; min-inline-size: 0; background: linear-gradient(180deg, rgb(255 255 255 / .028), rgb(255 255 255 / 0) 40%), var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: inset 0 1px 0 rgb(255 255 255 / .035), 0 24px 48px -32px rgb(0 0 0 / .8); overflow: hidden; }
.app[data-guide="svc-till"] { border-color: var(--hair); }
.app[data-guide="svc-till"]::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; block-size: 2px; background: var(--foil); }
.app-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 22px 22px 0; }
.app-art { inline-size: 76px; block-size: 60px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(90% 90% at 30% 20%, rgb(240 180 60 / .12), transparent 70%), rgb(6 13 17 / .55); border: 1px solid var(--hair-soft); }
.app-art svg { inline-size: 62px; block-size: 48px; fill: none; stroke: var(--gold-hi); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.app-art .a-fill { fill: var(--ink-3); stroke: none; }
.app-art .a-gold { fill: var(--gold); stroke: none; opacity: .85; }
.app-art .a-paper { fill: var(--paper); stroke: none; }
.app-art .a-ink { fill: var(--ink); stroke: none; }
.app-art .a-soft { stroke: var(--gold-pale); opacity: .55; }
.app-art .a-bar { stroke-width: 4; }
.app-tag { font-size: 12px; color: var(--gold-text); font-weight: 500; margin-block-end: 2px; }
:lang(en) .app-tag { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; }
.app h3 { font-size: 18.5px; }
.app-sub { color: var(--text-2); font-size: 14.5px; margin-block-start: 4px; }
.app-body { padding: 16px 22px 0; display: grid; gap: 12px; }
.app > :last-child:not(details) { padding-block-end: 22px; }
.dl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--text-3); font-size: 13px; min-inline-size: 0; }
.dl-meta .n { color: var(--text-2); overflow-wrap: anywhere; }
.dl-soon { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--text-2); font-size: 14.5px; }
.dl-soon .ic { color: var(--gold-text); }
.kvcopy { display: grid; gap: 4px; min-inline-size: 0; }
.kvcopy small { font-size: 12.5px; color: var(--text-3); }
.kvcopy .addr { margin-block-start: 0; }
.kvcopy .addr code { font-size: 13px; }
/* A 64-character SHA-256 never fits a narrow tile: wrap it at every width so the copy button stays visible. */
.kvcopy .addr { flex-wrap: wrap; padding-block: 10px 4px; }
.kvcopy .addr code { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; }
.kvcopy .addr .btn { margin-inline-start: auto; flex: none; }
.gsteps .kvcopy { margin-block-start: 10px; }

.howto { margin-block-start: 18px; border-block-start: 1px solid var(--line); }
.howto summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 54px; padding-inline: 22px; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; color: var(--gold-text); transition: background .2s, color .2s; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary:hover { background: rgb(240 180 60 / .04); color: var(--gold-pale); }
.howto summary:focus-visible { outline-offset: -3px; border-radius: 0; }
.howto .chev { transform: rotate(90deg); transition: transform .25s; }
.howto[open] .chev { transform: rotate(-90deg); }
.howto[open] summary { border-block-end: 1px solid var(--line); }
.howto-in { padding: 18px 22px 22px; }
.howto-in h4 { font-family: var(--display); font-size: 14.5px; font-weight: 700; margin: 18px 0 10px; color: var(--text); }
.howto-in h4:first-child { margin-block-start: 0; }
.reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--text); }
.reqs li { display: flex; gap: 10px; align-items: center; }
.reqs li::before { content: ""; inline-size: 5px; block-size: 5px; transform: rotate(45deg); background: var(--gold); flex: none; }
/* The till's guide on wide screens: requirements and first use beside the install steps. */
@media (min-width: 860px) {
  .app[data-guide="svc-till"] .howto-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto auto 1fr; gap: 0 40px; }
  .app[data-guide="svc-till"] .howto-in > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .app[data-guide="svc-till"] .howto-in > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .app[data-guide="svc-till"] .howto-in > :nth-child(3) { grid-column: 2; grid-row: 1; margin-block-start: 0; }
  .app[data-guide="svc-till"] .howto-in > :nth-child(4) { grid-column: 2; grid-row: 2 / span 3; }
  .app[data-guide="svc-till"] .howto-in > :nth-child(5) { grid-column: 1; grid-row: 3; margin-block-start: 26px; }
  .app[data-guide="svc-till"] .howto-in > :nth-child(6) { grid-column: 1; grid-row: 4; align-self: start; }
}
.gsteps { list-style: none; margin: 0; padding: 0; counter-reset: g; }
.gsteps > li { counter-increment: g; position: relative; padding-inline-start: 40px; padding-block: 8px; font-size: 14.5px; color: var(--text-2); min-inline-size: 0; overflow-wrap: anywhere; }
.gsteps li b { color: var(--text); }
.gsteps > li::before { content: counter(g); position: absolute; inset-inline-start: 0; inset-block-start: 7px; inline-size: 26px; block-size: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--hair); color: var(--gold-pale); font-family: var(--display); font-weight: 700; font-size: 13px; line-height: 1; }
.gsteps > li + li { border-block-start: 1px dashed rgb(195 208 214 / .1); }
.gsteps .small { font-size: 13px; margin-block-start: 6px; }
.paths { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.paths li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 8px 12px; border-radius: 8px; background: rgb(6 13 17 / .5); border: 1px solid var(--line); }
.paths li span { color: var(--text); font-size: 13.5px; }
.paths li .n { font-size: 13px; color: var(--gold-pale); overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }
.paths li .n bdi { font-family: var(--font); }

.feats { margin-block-end: 26px; }
.feats .panel-title { flex-direction: column; align-items: flex-start; gap: 4px; }
.feats .panel-title .muted { font-size: 14.5px; }
.flegend { list-style: none; margin: -4px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--text-2); }
.flegend li { display: inline-flex; align-items: center; gap: 8px; }
.fgroups { display: grid; gap: 24px 36px; }
@media (min-width: 760px) { .fgroups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .fgroups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fgroup h3 { font-size: 14px; color: var(--gold-text); margin-block-end: 8px; padding-block-end: 8px; border-block-end: 1px solid var(--hair-soft); }
.fgroup ul { list-style: none; margin: 0; padding: 0; }
.feat { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; padding-block: 8px; }
.feat p { font-size: 14.5px; color: var(--text); line-height: 1.55; }
.feat.hl p { font-weight: 700; }
.feat small { display: block; margin-block-start: 3px; font-size: 13px; color: var(--text-3); line-height: 1.5; }
.fmark { inline-size: 18px; block-size: 18px; margin-block-start: 3px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--gold); flex: none; }
.fmark.available { background: var(--gold); color: var(--gold-ink); }
.fmark.available .ic { inline-size: 12px; block-size: 12px; stroke-width: 2.6; }
.fmark.partial { background: linear-gradient(90deg, var(--gold) 50%, transparent 50%); }
[dir="rtl"] .fmark.partial { background: linear-gradient(270deg, var(--gold) 50%, transparent 50%); }
.fmark.planned { border-style: dashed; border-color: var(--text-3); }
.fst { display: inline-flex; font-family: var(--font); font-size: 11.5px; font-weight: 500; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); vertical-align: 2px; line-height: 1.7; }
.fst.partial { color: var(--gold-text); border-color: var(--hair); }

.help-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; padding: 18px 22px; border-radius: var(--r); border: 1px solid var(--hair); background: linear-gradient(90deg, rgb(240 180 60 / .09), rgb(240 180 60 / .02)); }
[dir="rtl"] .help-strip { background: linear-gradient(270deg, rgb(240 180 60 / .09), rgb(240 180 60 / .02)); }
.help-zad { inline-size: 76px; block-size: 76px; flex: none; }
.help-zad .zad { inline-size: 100%; block-size: 100%; }
.help-strip > div { flex: 1 1 260px; min-inline-size: 0; }
.help-strip h2 { font-size: 19px; margin-block-end: 2px; }
.help-strip p { color: var(--text-2); font-size: 14.5px; }
@media (max-width: 559px) { .help-strip .btn { inline-size: 100%; white-space: normal; } .app-head { padding: 18px 16px 0; gap: 12px; } .app-body { padding-inline: 16px; } .howto summary { padding-inline: 16px; } .howto-in { padding-inline: 16px; } .app-art { inline-size: 60px; block-size: 50px; } .app-art svg { inline-size: 50px; block-size: 40px; } }
.what-next { margin-block: 0 16px; }
.what-next .btn { white-space: normal; text-align: start; }
/* 5 sections in the phone tab bar */
@media (max-width: 919px) { .nav a { font-size: 11.5px; } }
/* 360px: the header (brand + language + sign out) must fit in English too */
@media (max-width: 399px) { .top-in { gap: 8px; } .brand { flex: 1 1 auto; min-inline-size: 0; gap: 9px; } .brand-txt { min-inline-size: 0; } .brand-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .top-end { gap: 6px; } .chip-btn { padding-inline: 10px; } }
/* the app tiles after the till: two balanced columns on wide screens, one reading order on phones */
.apps-col { display: contents; }
.apps .app[data-guide="svc-staff"] { order: 1; } .apps .app[data-guide="svc-web"] { order: 2; } .apps .app[data-guide="svc-owner"] { order: 3; } .apps .app[data-guide="svc-site"] { order: 4; } .apps .app[data-guide="svc-loyal"] { order: 5; }
@media (min-width: 860px) { .apps-col { display: flex; flex-direction: column; gap: 18px; min-inline-size: 0; } .apps .apps-col > .app { order: 0; } }
