/* =====================================================================================================
   Accounts (optional login): account screen (.acc-), the menu's account chip (.mn-acc) and the settings
   Account tab (.set-acc). Built on the app.css tokens; landscape phones 740–932 × 330–430 first.
   Layout: form panel on the reading-start side at full height, the showroom kart on the other side with a
   headline above it and the perks below. With the on-screen keyboard open (.kb-open, --kb = keyboard height)
   the decoration goes and the panel fills the visible strip.
   ===================================================================================================== */

/* ---- Screen frame -------------------------------------------------------------------------------- */
.acc { flex-direction: row; gap: 1rem; }
.acc-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; will-change: transform;
  background: linear-gradient(90deg, rgba(7, 7, 11, .88) 0%, rgba(7, 7, 11, .62) 38%, rgba(7, 7, 11, .12) 70%, rgba(7, 7, 11, .3) 100%),
    linear-gradient(0deg, rgba(7, 7, 11, .6), rgba(7, 7, 11, 0) 34%); }
[dir="rtl"] .acc-shade { background: linear-gradient(270deg, rgba(7, 7, 11, .88) 0%, rgba(7, 7, 11, .62) 38%, rgba(7, 7, 11, .12) 70%, rgba(7, 7, 11, .3) 100%),
    linear-gradient(0deg, rgba(7, 7, 11, .6), rgba(7, 7, 11, 0) 34%); }
.acc-stage { position: absolute; top: 0; bottom: 0; inset-inline-start: 46%; inset-inline-end: 0; z-index: 0; touch-action: none; cursor: grab; }

.acc-panel { position: relative; z-index: 1; flex: none; width: min(25.5rem, 49vw); min-height: 0;
  display: flex; flex-direction: column; padding: .45rem .75rem .5rem; border-radius: 16px; }
.acc-top { display: flex; align-items: center; gap: .55rem; flex: none; min-height: max(42px, 2.95rem); }
.acc-back { width: max(40px, 2.8rem); min-height: max(40px, 2.8rem); }
.acc-top-slot { flex: 1; min-width: 0; display: flex; align-items: center; }
.acc-tabs { display: flex; width: 100%; }
.acc-tabs > button { flex: 1 1 0; min-width: 0; min-height: max(38px, 2.6rem); font-size: .9rem; padding: 0 .5rem; overflow: hidden; text-overflow: ellipsis; }
.acc-title { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.acc-title h1 { font-size: 1.2rem; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-title-i { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 8px; font-size: 1.1rem; color: #fff;
  background: var(--grad-brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 4px 12px rgba(255, 106, 0, .35); transform: skewX(var(--skew)); }
.acc-title-i > * { transform: skewX(var(--unskew)); }
.acc-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: .5rem .2rem .7rem; margin-inline: -.2rem; }
.acc-scroll > * { flex: none; }
/* Views fill the panel height (and grow past it, the panel then scrolls) so their footer sits at the bottom. */
.acc-scroll > .acc-form, .acc-scroll > .acc-me { flex: 1 0 auto; }
.acc-swap { animation: acc-swap .34s var(--ease-out) both; }
@keyframes acc-swap { from { opacity: 0; translate: .9rem 0; } to { opacity: 1; translate: 0 0; } }
[dir="rtl"] .acc-swap { animation-name: acc-swap-rtl; }
@keyframes acc-swap-rtl { from { opacity: 0; translate: -.9rem 0; } to { opacity: 1; translate: 0 0; } }

/* ---- Side: headline, perks (the kart turns between them) ----------------------------------------------- */
.acc-side { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-end; gap: .6rem; pointer-events: none; text-align: end; padding-block: .15rem .1rem; }
.acc-side-top { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; max-width: min(21rem, 100%); animation: rise-in .5s var(--ease-out) .06s backwards; }
.acc-brand { display: flex; align-items: center; gap: .45rem; margin-bottom: .2rem; direction: ltr; }
.acc-mark { width: 1.75rem; height: 1.75rem; }
.acc-brand-w { font-weight: 800; font-size: .78rem; letter-spacing: .14em; color: rgba(255, 255, 255, .78); transform: skewX(-10deg); white-space: nowrap; }
.acc-side-t { font-size: clamp(1.3rem, 6.6vh, 2.05rem); font-weight: 800; line-height: 1.08; text-shadow: 0 3px 18px rgba(0, 0, 0, .7); }
html[lang="ar"] .acc-side-t { line-height: 1.22; }
.acc-side-s { font-size: .82rem; font-weight: 600; color: #cfd0d8; line-height: 1.4; max-width: 18.5rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.acc-side-t, .acc-side-s, .acc-lead, .acc-done b, .acc-empty b, .acc-empty span { text-wrap: balance; }
.acc-perks { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; max-width: 100%; animation: rise-in .5s var(--ease-out) .14s backwards; }
.acc-perk { display: inline-flex; align-items: center; gap: .42rem; min-height: 2.05rem; padding: 0 .75rem 0 .3rem; border-radius: 999px;
  background: rgba(10, 10, 16, .66); border: 1px solid var(--line); font-size: .76rem; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-1); }
[dir="rtl"] .acc-perk { padding: 0 .3rem 0 .75rem; }
.acc-perk-i { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .9rem; color: var(--brand-hot); background: rgba(255, 106, 0, .16); }
.acc-perk.done .acc-perk-i { color: #04210f; background: var(--ok); box-shadow: 0 0 10px rgba(53, 208, 127, .45); }

/* ---- Form parts ---------------------------------------------------------------------------------- */
.acc-form { --acc-gap: .5rem; display: flex; flex-direction: column; gap: var(--acc-gap); }
.acc-field { display: flex; flex-direction: column; gap: .2rem; }
.acc-fbox { position: relative; display: flex; align-items: center; gap: .6rem; height: max(46px, 3.3rem); padding-inline: .8rem .3rem;
  border-radius: 11px; border: 1.5px solid rgba(255, 255, 255, .13); background: rgba(0, 0, 0, .36);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .32); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.acc-fbox:focus-within { border-color: var(--brand); background: rgba(0, 0, 0, .5); box-shadow: 0 0 0 3px rgba(255, 106, 0, .2), inset 0 2px 6px rgba(0, 0, 0, .32); }
.acc-field.invalid .acc-fbox { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(255, 61, 90, .16), inset 0 2px 6px rgba(0, 0, 0, .32); }
.acc-fico { flex: none; font-size: 1.15rem; color: rgba(255, 255, 255, .45); transition: color .2s; }
.acc-fbox:focus-within .acc-fico { color: var(--brand-hot); }
.acc-field.invalid .acc-fico { color: #ff8a9b; }
.acc-fwrap { position: relative; flex: 1; min-width: 0; align-self: stretch; }
.acc-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 1.02rem 0 0; border: 0; outline: none; background: transparent;
  color: #fff; font-size: max(16px, 1.02rem); font-weight: 700; line-height: 1.2; caret-color: var(--brand-hot); text-overflow: ellipsis; }
.acc-input:focus-visible { outline: none; }
.acc-input::-ms-reveal, .acc-input::-ms-clear { display: none; }
html[dir="rtl"] .acc-input[dir="ltr"] { text-align: right; }
.acc-input:-webkit-autofill, .acc-input:-webkit-autofill:focus { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 100px transparent inset; transition: background-color 99999s; }
.acc-fl { position: absolute; top: 50%; inset-inline-start: 0; max-width: 100%; translate: 0 -50%; pointer-events: none;
  color: var(--muted); font-size: .95rem; font-weight: 600; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: top .18s var(--ease), translate .18s var(--ease), font-size .18s var(--ease), color .18s; }
.acc-input:focus + .acc-fl, .acc-input:not(:placeholder-shown) + .acc-fl, .acc-input:-webkit-autofill + .acc-fl {
  top: .5rem; translate: 0 0; font-size: .7rem; font-weight: 700; color: var(--brand-hot); }
.acc-field.invalid .acc-fl { color: #ff8a9b; }
.acc-ferr { padding-inline: .35rem; font-size: .74rem; font-weight: 700; line-height: 1.3; color: #ff9aaa; animation: fade-in .2s both; }
.acc-ferr:empty { display: none; }
.acc-eye { flex: none; display: grid; place-items: center; width: max(38px, 2.6rem); height: max(38px, 2.6rem); padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 1.15rem; cursor: pointer; transition: color .2s, background-color .2s; }
.acc-eye:active { background: rgba(255, 255, 255, .08); }
.acc-eye[aria-pressed="true"] { color: var(--brand-hot); }

/* password strength */
.acc-pw { display: flex; align-items: center; gap: .55rem; padding-inline: .35rem; min-height: 1rem; }
.acc-pw-bars { flex: 0 1 8.5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.acc-pw-bars i { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .14); transform: skewX(var(--skew)); transition: background-color .25s; }
.acc-pw[data-score="0"] .acc-pw-bars i.on, .acc-pw[data-score="1"] .acc-pw-bars i.on { background: var(--bad); }
.acc-pw[data-score="2"] .acc-pw-bars i.on { background: #ffb21f; }
.acc-pw[data-score="3"] .acc-pw-bars i.on { background: #9be15d; }
.acc-pw[data-score="4"] .acc-pw-bars i.on { background: var(--ok); box-shadow: 0 0 6px rgba(53, 208, 127, .5); }
.acc-pw-l { font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.acc-pw[data-score="0"] .acc-pw-l, .acc-pw[data-score="1"] .acc-pw-l { color: #ff9aaa; }
.acc-pw[data-score="2"] .acc-pw-l { color: #ffcf6e; }
.acc-pw[data-score="3"] .acc-pw-l, .acc-pw[data-score="4"] .acc-pw-l { color: #9fe8bf; }

/* six code boxes */
.acc-otp { display: flex; justify-content: center; gap: .42rem; direction: ltr; padding: .15rem 0 .1rem; }
.acc-otp-box { width: clamp(2.55rem, 6vw, 3.15rem); height: clamp(2.75rem, 12.6vh, 3.6rem); flex: none; margin: 0; padding: 0;
  border-radius: 11px; border: 2px solid rgba(255, 255, 255, .14); background: linear-gradient(180deg, rgba(0, 0, 0, .48), rgba(0, 0, 0, .26));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4); color: #fff; font-size: max(20px, 1.75rem); font-weight: 800; text-align: center; line-height: 1;
  caret-color: var(--brand-hot); font-variant-numeric: tabular-nums; outline: none;
  transition: border-color .18s, background-color .18s, box-shadow .18s, transform .18s var(--ease-back); }
.acc-otp-box:nth-child(4) { margin-inline-start: .5rem; }
.acc-otp-box:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 106, 0, .24), inset 0 2px 6px rgba(0, 0, 0, .4); transform: translateY(-1px); }
.acc-otp-box.filled { border-color: rgba(255, 138, 31, .6); background: linear-gradient(180deg, rgba(255, 106, 0, .18), rgba(255, 106, 0, .05)); }
.acc-otp.complete .acc-otp-box { border-color: rgba(53, 208, 127, .75); background: linear-gradient(180deg, rgba(53, 208, 127, .16), rgba(53, 208, 127, .04)); }
.acc-otp.error .acc-otp-box { border-color: var(--bad); background: linear-gradient(180deg, rgba(255, 61, 90, .16), rgba(255, 61, 90, .05)); }
.acc-otp-box:disabled { opacity: .45; }
.acc-otp.shake { animation: shake .42s var(--ease) both; }

/* messages, links, buttons */
.acc-alert { display: flex; align-items: flex-start; gap: .5rem; padding: .45rem .65rem; border-radius: 10px; font-size: .8rem; font-weight: 700; line-height: 1.35;
  border: 1px solid rgba(255, 61, 90, .38); background: linear-gradient(90deg, rgba(255, 61, 90, .16), rgba(255, 61, 90, .06)); color: #ffd0d7; }
[dir="rtl"] .acc-alert { background: linear-gradient(270deg, rgba(255, 61, 90, .16), rgba(255, 61, 90, .06)); }
.acc-alert-i { flex: none; display: grid; place-items: center; font-size: 1.05rem; color: var(--bad); margin-top: .02rem; }
.acc-alert[data-kind="ok"] { border-color: rgba(53, 208, 127, .4); background: rgba(53, 208, 127, .1); color: #d2f7e2; }
.acc-alert[data-kind="ok"] .acc-alert-i { color: var(--ok); }
.acc-alert[data-kind="info"] { border-color: rgba(255, 138, 31, .45); background: rgba(255, 106, 0, .1); color: #ffe2cc; }
.acc-alert[data-kind="info"] .acc-alert-i { color: var(--brand-hot); }
.acc-alert.pop { animation: pop-in .26s var(--ease-back) both; }
.acc-links { display: flex; justify-content: flex-end; margin-top: -.25rem; }
.acc-links.center { justify-content: center; margin-top: 0; }
.acc-link { display: inline-flex; align-items: center; gap: .3rem; min-height: max(32px, 2.1rem); padding: 0 .3rem; border: 0; border-radius: 7px;
  background: none; color: var(--brand-hot); font: 700 .82rem/1.2 var(--font); cursor: pointer; white-space: nowrap; }
.acc-link .ico { font-size: 1.05em; }
.acc-link:active { background: rgba(255, 106, 0, .12); }
.acc-submit { margin-top: .1rem; min-height: max(48px, 3.4rem); font-size: 1.12rem; }
.acc-submit.busy { pointer-events: none; }
.acc-submit.busy > :not(.acc-spin) { opacity: 0; }
.acc-spin { position: absolute; inset: 0; display: none !important; place-items: center; }
.acc-submit.busy .acc-spin { display: grid !important; }
.acc-spin .spinner { width: 1.35rem; height: 1.35rem; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.acc-lead { font-size: .86rem; font-weight: 600; line-height: 1.5; color: #d4d5dc; }
.acc-to { display: flex; align-items: center; gap: .45rem; min-width: 0; min-height: max(34px, 2.3rem); margin-top: -.15rem; padding-inline: .6rem .25rem;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .045); }
.acc-to-i { flex: none; font-size: 1.05rem; color: var(--brand-hot); }
.acc-addr { flex: 1; min-width: 0; color: #fff; font-size: .9rem; font-weight: 800; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[dir="rtl"] .acc-addr { text-align: right; }
.acc-to .acc-link { flex: none; font-size: .78rem; }
.acc-foot { display: flex; flex-direction: column; align-items: center; gap: .1rem; margin-top: auto; text-align: center; }
.acc-guest { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 .35rem; margin-top: auto; padding-top: .35rem;
  border-top: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--muted); }
.acc-guest .acc-link { font-size: .78rem; min-height: max(30px, 2rem); }
.acc-form > .acc-links.center { margin-top: auto; }
.acc-resend { display: flex; justify-content: center; min-height: max(32px, 2.1rem); align-items: center; }
.acc-resend.busy { opacity: .5; pointer-events: none; }
.acc-resend-wait { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.acc-resend-wait .ico { color: var(--brand-hot); }
.acc-note { font-size: .7rem; color: rgba(255, 255, 255, .45); line-height: 1.3; }
.acc-ts { display: flex; justify-content: center; }
.acc-ts:empty { display: none; }
/* Invisible until Turnstile needs a tap: take back the form gap so the layout does not change. */
.acc-ts:not(.ts-visible) { margin-top: calc(-1 * var(--acc-gap)); }
.acc-ts.ts-visible { animation: pop-in .26s var(--ease-back) both; }
.acc.busy .acc-form { cursor: progress; }

/* ---- Signed in ------------------------------------------------------------------------------------- */
.acc-me { display: flex; flex-direction: column; gap: .55rem; }
.acc-id { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.acc-av { position: relative; width: 3.2rem; height: 3.2rem; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.75rem; color: #fff;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 45%), var(--pc, var(--brand));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 4px rgba(53, 208, 127, .6), 0 6px 16px rgba(0, 0, 0, .45); }
.acc-av .ico { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.acc-av-n { position: absolute; bottom: -.3rem; inset-inline-end: -.4rem; min-width: 1.35rem; height: 1.35rem; padding: 0 .2rem; border-radius: 6px;
  background: #0b0b0f; border: 1.5px solid var(--brand); font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
.acc-id-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.acc-id-name { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.acc-id-name b { font-size: 1.22rem; font-weight: 800; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.acc-verified { flex: none; display: inline-flex; align-items: center; gap: .2rem; min-height: 1.3rem; padding: 0 .45rem 0 .3rem; border-radius: 999px;
  background: var(--ok); color: #04210f; font-size: .68rem; font-weight: 800; }
[dir="rtl"] .acc-verified { padding: 0 .3rem 0 .45rem; }
.acc-verified .ico { font-size: .85rem; }
.acc-id-mail { font-size: .8rem; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate; }
html[dir="rtl"] .acc-id-mail { text-align: right; }
.acc-lv { display: flex; align-items: center; gap: .55rem; }
.acc-lv .xpbar { flex: 1; }
.acc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.acc-stat { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .4rem .2rem; border-radius: 10px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.acc-stat b { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.acc-stat span { font-size: .66rem; font-weight: 700; color: var(--muted); }
.acc-saved { display: flex; align-items: center; gap: .6rem; padding: .45rem .65rem; border-radius: 11px;
  border: 1px solid rgba(53, 208, 127, .32); background: linear-gradient(90deg, rgba(53, 208, 127, .15), rgba(53, 208, 127, .04)); }
[dir="rtl"] .acc-saved { background: linear-gradient(270deg, rgba(53, 208, 127, .15), rgba(53, 208, 127, .04)); }
.acc-saved-i { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-size: 1.2rem; color: #04210f; background: var(--ok); box-shadow: 0 0 12px rgba(53, 208, 127, .45); }
.acc-saved-t { min-width: 0; display: flex; flex-direction: column; gap: .05rem; }
.acc-saved-t b { font-size: .84rem; font-weight: 800; line-height: 1.25; }
.acc-sync { font-size: .7rem; font-weight: 700; color: #9fe8bf; }
.acc-sync[data-state="saving"], .acc-sync[data-state="pending"] { color: #ffd6a8; }
.acc-sync[data-state="error"], .acc-sync[data-state="offline"] { color: #ffcf6e; }
.acc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: auto; }
.acc-actions .btn { min-height: max(40px, 2.8rem); padding: 0 .6rem; font-size: .86rem; }
.acc-actions .btn .lbl { overflow: hidden; text-overflow: ellipsis; }
.acc-out { color: #ffb3bf; border-color: rgba(255, 61, 90, .35); }
.acc-out .ico { color: var(--bad); }
.acc-pwbtn .ico { color: var(--brand-hot); }

/* success + empty */
.acc-done, .acc-empty { flex: 1 1 auto !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; text-align: center; padding: .6rem .4rem; }
.acc-done-ring { display: grid; place-items: center; width: 4.3rem; height: 4.3rem; border-radius: 50%; font-size: 2.1rem; color: #04210f;
  background: radial-gradient(circle at 35% 30%, #8ff5bb, var(--ok) 60%, #1fae62); box-shadow: 0 0 0 7px rgba(53, 208, 127, .16), 0 0 34px rgba(53, 208, 127, .55);
  animation: pop-in .5s var(--ease-back) both; }
.acc-done b { font-size: 1.12rem; font-weight: 800; line-height: 1.3; animation: rise-in .4s var(--ease-out) .12s backwards; }
.acc-done > span, .acc-empty > span:not(.acc-empty-i) { font-size: .82rem; color: var(--muted); line-height: 1.4; max-width: 19rem; }
.acc-empty-i { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; font-size: 1.7rem; color: var(--brand-hot); background: rgba(255, 106, 0, .12); }
.acc-empty b { font-size: 1rem; font-weight: 800; }

/* ---- On-screen keyboard open: panel only, sized to the visible strip ------------------------------- */
.acc.kb-open { padding-bottom: calc(var(--kb, 0px) + 4px); }
.acc.kb-open .acc-side { display: none; }
.acc.kb-open .acc-panel { width: min(32rem, 100%); margin-inline: auto; padding-top: .3rem; }
.acc.kb-open .acc-top { min-height: 0; }
.acc.kb-open .acc-top .acc-back, .acc.kb-open .acc-title-i { display: none; }
.acc.kb-open .acc-tabs > button { min-height: 2rem; }
.acc.kb-open .acc-scroll { padding-top: .3rem; }

/* ---- Compact heights --------------------------------------------------------------------------------- */
/* The reset form is the tallest (code + new password): the spam hint goes first so the whole form fits. */
@media (max-height: 420px) {
  .acc[data-view="reset"] .acc-note { display: none; }
}
@media (max-height: 370px) {
  .acc-panel { padding: .35rem .65rem .4rem; }
  .acc-form { --acc-gap: .42rem; }
  .acc-fbox { height: max(44px, 3.15rem); }
  .acc-side-s { display: none; }
  .acc-me { gap: .45rem; }
  .acc-stat { padding: .3rem .2rem; }
}
@media (max-width: 780px) {
  .acc { gap: .7rem; }
  .acc-panel { width: min(24rem, 50vw); }
  .acc-perk { font-size: .72rem; }
}

/* ---- Menu: account chip in the player card ------------------------------------------------------------ */
.mn-acc { display: flex; min-width: 0; margin-top: .12rem; }
.mn-acc[hidden] { display: none; }
.mn-acc-chip { max-width: 100%; min-width: 0; min-height: max(28px, 1.85rem); gap: .35rem; padding: 0 .5rem 0 .35rem; font-size: .74rem; font-weight: 700;
  color: #ffe2cc; border-color: rgba(255, 106, 0, .55); background: linear-gradient(90deg, rgba(255, 106, 0, .24), rgba(255, 106, 0, .08));
  box-shadow: 0 0 14px rgba(255, 106, 0, .16); transition: transform .14s var(--ease), border-color .2s; animation: fade-in .3s both; }
[dir="rtl"] .mn-acc-chip { padding: 0 .35rem 0 .5rem; background: linear-gradient(270deg, rgba(255, 106, 0, .24), rgba(255, 106, 0, .08)); }
.mn-acc-chip:active { transform: scale(.96); }
.mn-acc-chip > span:not(.ico):not(.mn-acc-ok) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-acc-chip .mn-acc-ico { font-size: 1.1rem; color: var(--brand-hot); }
.mn-acc-chip .mn-acc-go { font-size: .85rem; opacity: .75; }
.mn-acc-chip.on { color: #dbfbe8; border-color: rgba(53, 208, 127, .5); background: rgba(53, 208, 127, .1); box-shadow: none; }
.mn-acc-ok { flex: none; display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; font-size: .72rem; color: #04210f; background: var(--ok); }
.mn-acc-name { unicode-bidi: plaintext; font-weight: 800; }

/* ---- Settings: Account tab ------------------------------------------------------------------------- */
.set-acc { gap: .6rem; padding: .75rem .85rem .8rem; }
.set-acc-head { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.set-acc-badge { flex: none; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; font-size: 1.4rem; color: var(--brand-hot); background: rgba(255, 106, 0, .14); border: 1px solid rgba(255, 106, 0, .35); }
.set-acc-badge.on { color: #04210f; background: var(--ok); border-color: transparent; box-shadow: 0 0 14px rgba(53, 208, 127, .45); }
.set-acc-t { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.set-acc-t b { align-self: flex-start; max-width: 100%; font-size: 1.05rem; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.set-acc-t > span:not(.kicker) { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.set-acc-mail { unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[dir="rtl"] .set-acc-mail { text-align: right; }
.set-acc-perks { display: flex; flex-wrap: wrap; gap: .4rem; }
.set-acc-perks li { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.9rem; padding: 0 .65rem; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); font-size: .76rem; font-weight: 700; }
.set-acc-perks .ico { color: var(--brand-hot); }
.set-acc-saved { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .5rem; padding: .45rem .6rem; border-radius: 10px; font-size: .8rem; font-weight: 700;
  border: 1px solid rgba(53, 208, 127, .3); background: rgba(53, 208, 127, .08); }
.set-acc-saved > .ico { color: var(--ok); font-size: 1.15rem; }
.set-acc-sync { margin-inline-start: auto; font-size: .72rem; color: #9fe8bf; }
.set-acc-sync[data-state="saving"], .set-acc-sync[data-state="pending"] { color: #ffd6a8; }
.set-acc-sync[data-state="error"], .set-acc-sync[data-state="offline"] { color: #ffcf6e; }
.set-acc-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.set-acc-btns .btn { flex: 1 1 auto; }
.set-acc-out { color: #ffb3bf; }
.set-acc-out .ico { color: var(--bad); }
