/* ==========================================================================
   Cardly — app.css
   Mock app UI (wallet cards, venue page, widgets, badges, Wallet pass,
   sign-in, App Clip). Illustrations only — swap for real screens later.
   Inside a .phone everything is sized in em, so it scales with --w.
   Venue colours: --brand (+ --ink, text on it) and the accent --hl
   (+ --hl-ink). Without an accent, the brand colour stands in.
   ========================================================================== */

:root {
  --app-bg: #f2f2f7;
  --app-card: #ffffff;
  --app-text: #1d1d1f;
  --app-text-2: #6e6e73;
  --app-line: rgba(0, 0, 0, 0.08);
  --app-fill: #e9e9ee;
}
@media (prefers-color-scheme: dark) {
  :root {
    --app-bg: #000000;
    --app-card: #1c1c1e;
    --app-text: #f5f5f7;
    --app-text-2: #98989d;
    --app-line: rgba(255, 255, 255, 0.1);
    --app-fill: #2c2c2e;
  }
}

.app {
  --app-bg-local: var(--app-bg);
  background: var(--app-bg);
  color: var(--app-text);
}
.app--brand .phone__status {
  color: var(--ink);
  background: var(--brand);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.app__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3em 1.15em 0.8em;
}
.app__title { font-size: 2.15em; font-weight: 750; letter-spacing: -0.035em; }
.app__avatar {
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5aa42, #eb624e);
  color: #fff;
  font-weight: 700;
}

.app__add {
  margin: 1.1em 0.85em 0;
  padding: 0.75em;
  border-radius: 0.9em;
  border: 0.1em dashed var(--app-line);
  color: var(--app-text-2);
  font-size: 0.86em;
  font-weight: 600;
  text-align: center;
}

/* ---------- Brand logo dot -------------------------------------------- */
/* The venue's logo circle is in its accent colour (brand without one). */
.wcard__logo {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: var(--hl, var(--brand, #eb624e));
  color: var(--hl-ink, var(--ink, #fff));
  font-weight: 750;
  font-size: 1em;
  box-shadow: inset 0 0 0 0.13em rgba(255, 255, 255, 0.32);
}

/* ---------- Wallet stack (home screen) -------------------------------- */
.wstack {
  display: grid;
  padding: 0 0.85em;
}
.wcard {
  /* a card only has its own venue's accent, never the screen's around it */
  --hl: initial;
  --hl-ink: initial;
  position: relative;
  border-radius: 1em;
  padding: 0.85em 0.95em;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 0 -0.2em 0.8em rgba(0, 0, 0, 0.14);
}
.wcard:not(.wcard--open) {
  height: 6em;
  margin-bottom: -3.05em;
}
.wcard__head {
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.wcard__head b { font-size: 1.08em; letter-spacing: -0.02em; }
.wcard__val {
  margin-left: auto;
  font-size: 0.86em;
  font-weight: 650;
  opacity: 0.92;
}
.wcard__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9em;
  margin-top: 1.2em;
}
.wcard__stat small { display: block; font-size: 0.72em; opacity: 0.75; }
.wcard__stat b { font-size: 1.3em; letter-spacing: -0.02em; }
.wcard__code {
  grid-column: 1 / -1;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 0.35em;
  padding: 0.8em 0.8em 0.55em;
  border-radius: 0.7em;
  background: #fff;
  color: #1d1d1f;
  font-size: 0.82em;
  font-weight: 600;
}
.wcard__code .qr { width: 5.8em; }

html.js .hero__phone .wcard {
  animation: wcard-in 0.9s var(--ease) both;
}
html.js .hero__phone .wcard:nth-child(1) { animation-delay: 0.25s; }
html.js .hero__phone .wcard:nth-child(2) { animation-delay: 0.33s; }
html.js .hero__phone .wcard:nth-child(3) { animation-delay: 0.41s; }
html.js .hero__phone .wcard:nth-child(4) { animation-delay: 0.49s; }
html.js .hero__phone .wcard:nth-child(5) { animation-delay: 0.6s; }
@keyframes wcard-in {
  from { transform: translateY(5em); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- Venue page ------------------------------------------------- */
.venue {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--app-bg);
}
.venue__scroll {
  transform: translateY(calc(var(--y, 0) * -1%));
  transition: transform 0.8s var(--ease);
  will-change: transform;
}
.venue__hero {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 4em 1.1em 2.7em;
  background: var(--brand);
  color: var(--ink);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.venue__hero b { display: block; font-size: 1.35em; letter-spacing: -0.03em; }
.venue__hero small { font-size: 0.78em; opacity: 0.8; }
.venue__logo {
  width: 2.6em;
  height: 2.6em;
  font-size: 1.05em;
  background: var(--hl, var(--brand));
  color: var(--hl-ink, var(--ink));
  box-shadow: inset 0 0 0 0.15em rgba(255, 255, 255, 0.4);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.w {
  position: relative;
  padding: 0.85em 0.95em;
  border-radius: 1.05em;
  background: var(--app-card);
  box-shadow: 0 0.08em 0.25em rgba(0, 0, 0, 0.05);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.w small { display: block; color: var(--app-text-2); font-size: 0.76em; line-height: 1.3; }
.w b { font-size: 1em; letter-spacing: -0.02em; }

.w--code {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9em;
  margin: -1.7em 0.9em 0;
  padding: 0.8em 1em 0.8em 0.8em;
  box-shadow: 0 0.4em 1.4em rgba(0, 0, 0, 0.14);
  z-index: 1;
  font-weight: 600;
  font-size: 1em;
}
.w--code .qr { width: 5.6em; }
.w--code__text { display: grid; gap: 0.15em; }
.w--code__text b { font-size: 1.3em; letter-spacing: 0.02em; }
@media (prefers-color-scheme: dark) {
  .w--code { background: #fff; color: #1d1d1f; }
  .w--code small { color: #6e6e73; }
}

.w-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6em;
  padding: 0.7em 0.9em 3em;
}
.w--wide { grid-column: span 2; }

.w__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
}
.w__lvl {
  padding: 0.2em 0.65em;
  border-radius: 999px;
  background: linear-gradient(135deg, #e3e6ea, #b9c0c8);
  color: #2c3036;
  font-size: 0.76em;
  font-weight: 700;
}
.w__bar {
  height: 0.45em;
  margin: 0.6em 0 0.45em;
  border-radius: 999px;
  background: var(--app-fill);
  overflow: hidden;
}
.w__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--hl, var(--brand, var(--accent)));
  transition: background-color 0.5s var(--ease);
}
.w__item {
  display: flex;
  justify-content: space-between;
  gap: 0.4em;
  margin-top: 0.3em;
  font-size: 0.84em;
  font-weight: 550;
}
.w__item em { font-style: normal; color: var(--app-text-2); font-weight: 600; }
.w__item em.neg { color: #d70015; }
.w__badges { display: flex; gap: 0.35em; margin-top: 0.45em; }

.w--promo {
  background: var(--hl, var(--brand));
  background: linear-gradient(135deg, var(--hl, var(--brand)), color-mix(in srgb, var(--hl, var(--brand)) 78%, #ffffff));
  color: var(--hl-ink, var(--ink));
}
.w--promo small { color: inherit; opacity: 0.85; }

.w__map {
  position: relative;
  height: 6.2em;
  margin: -0.2em -0.2em 0.6em;
  border-radius: 0.75em;
  background:
    linear-gradient(90deg, transparent 31%, var(--app-card) 31% 34%, transparent 34% 68%, var(--app-card) 68% 71%, transparent 71%),
    linear-gradient(0deg, transparent 38%, var(--app-card) 38% 44%, transparent 44% 76%, var(--app-card) 76% 80%, transparent 80%),
    linear-gradient(160deg, #dfeee0, #e8eef5 60%, #e6e2f2);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .w__map { background:
    linear-gradient(90deg, transparent 31%, #3a3a3c 31% 34%, transparent 34% 68%, #3a3a3c 68% 71%, transparent 71%),
    linear-gradient(0deg, transparent 38%, #3a3a3c 38% 44%, transparent 44% 76%, #3a3a3c 76% 80%, transparent 80%),
    linear-gradient(160deg, #1d2a20, #1c222b 60%, #231f2c); }
}
.w__map i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0.75em;
  height: 0.75em;
  border-radius: 50%;
  background: var(--brand);
  border: 0.15em solid #fff;
  transform: translate(-50%, -50%);
  transition: background-color 0.5s var(--ease);
}
.w__map i.is-near {
  width: 1.05em;
  height: 1.05em;
  background: var(--hl, var(--brand));
  box-shadow: 0 0 0 0.4em color-mix(in srgb, var(--hl, var(--brand)) 30%, transparent);
}

.stars { display: inline-flex; gap: 0.12em; color: #f5aa42; }
.stars svg { width: 1.05em; height: 1.05em; }
.stars svg.off { color: var(--app-fill); }
.w--feedback { display: grid; gap: 0.45em; }
.w__input {
  padding: 0.55em 0.75em;
  border-radius: 0.7em;
  background: var(--app-fill);
  font-size: 0.82em;
  color: var(--app-text-2);
}

/* Story / customizer states for widgets */
.w.is-off {
  display: none;
}

/* ---------- Badges (achievements) ------------------------------------- */
.badge {
  --b1: #f5aa42;
  --b2: #e0861b;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.45), transparent 45%), linear-gradient(145deg, var(--b1), var(--b2));
  color: #fff;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35), 0 6px 16px color-mix(in srgb, var(--b2) 40%, transparent);
  flex: none;
}
.badge::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
}
.badge b { font-size: 22px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.badge svg { width: 46%; height: 46%; }
.badge--gold { --b1: #ffc861; --b2: #e0861b; }
.badge--coral { --b1: #ff8a6e; --b2: #c9452f; }
.badge--sky { --b1: #89ddff; --b2: #1f8fe0; }
.badge--violet { --b1: #c3b4f5; --b2: #7a62c9; }
.badge--locked {
  --b1: var(--surface-3);
  --b2: var(--surface-3);
  color: var(--text-3);
  box-shadow: inset 0 0 0 3px var(--line);
}
.badge--locked::after { border-color: var(--line-strong); }
.badge--xs { width: 2em; box-shadow: inset 0 0 0 0.12em rgba(255, 255, 255, 0.35); }
.badge--xs::after { inset: 0.22em; border-width: 1px; }
.badge--xs b { font-size: 0.72em; }
.w .badge--locked { --b1: var(--app-fill); --b2: var(--app-fill); color: var(--app-text-2); box-shadow: none; }

/* ---------- Wallet pass ------------------------------------------------ */
.pass {
  display: grid;
  gap: 14px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, var(--shadow-2);
  font-size: 14px;
}
.pass__top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pass__top b { font-size: 17px; letter-spacing: -0.02em; }
.pass__logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hl, rgba(255, 255, 255, 0.22));
  color: var(--hl-ink, currentColor);
  font-weight: 750;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}
.pass__field {
  margin-left: auto;
  text-align: right;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.pass__field small,
.pass__row small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}
.pass__row {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
}
.pass__code {
  display: grid;
  justify-items: center;
  justify-self: center;
  gap: 4px;
  padding: 10px 10px 6px;
  border-radius: 10px;
  background: #fff;
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 600;
}
.pass__code .qr { width: 92px; }
.pass--mini { width: 250px; }
.pass--big { width: min(320px, 78vw); padding: 20px 20px 16px; gap: 18px; }
.pass--big .pass__code { margin-top: 18px; }
.pass--big .pass__code .qr { width: 124px; }

/* ---------- Sign-in buttons ---------------------------------------------
   Яндекс ID and VK ID follow the official kits (logo on the left, colours
   untouched), adapted to our height and corner radius. */
.signin {
  display: grid;
  gap: 10px;
  width: min(270px, 100%);
}
.signin__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 44px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.signin__logo {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 24px;
  height: 24px;
  translate: 0 -50%;
}
/* Яндекс ID, «Основная»: black in light mode, white in dark mode */
.signin__btn--ya { background: #000; color: #fff; font-weight: 500; }
/* VK ID, primary: #0077FF with the white mark */
.signin__btn--vk {
  --vk-logo-bg: #fff;
  --vk-logo-icon: #0077ff;
  background: #0077ff;
  color: #fff;
  font-weight: 500;
}
@media (prefers-color-scheme: dark) {
  .signin__btn--ya { background: #fff; color: #000; }
}
.signin--compact { width: min(230px, 100%); gap: 8px; }
.signin--compact .signin__btn { height: 40px; padding: 0 38px; font-size: 14px; }
.signin--compact .signin__logo { left: 9px; width: 22px; height: 22px; }

/* ---------- App Clip sheet -------------------------------------------- */
.clip {
  display: grid;
  gap: 14px;
  width: min(260px, 100%);
  padding: 10px 16px 16px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  text-align: left;
}
.clip__grab {
  justify-self: center;
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-3);
}
.clip__head { display: flex; align-items: center; gap: 10px; }
.clip__head .wcard__logo { font-size: 18px; }
.clip__head b { display: block; font-size: 16px; }
.clip__head small { display: block; font-size: 12px; color: var(--text-2); }
.clip__btn {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- QR table tent --------------------------------------------- */
.qr-sign {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 170px;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: #fff;
  color: #111;
  box-shadow: var(--shadow-2);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  line-height: 1.25;
}
.qr-sign svg { width: 100%; height: auto; }

/* status-bar states driven by personal.js */
.net-type {
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.02em;
}
[data-signal="e"] .sig b:nth-child(n + 3),
[data-signal="none"] .sig b { opacity: 0.3; }

/* With no network the QR code stays, the balance waits for the connection. */
.bal-stale { display: none; }
[data-signal="none"] .bal-live { display: none; }
[data-signal="none"] .bal-stale { display: inline-flex; align-items: center; }

/* the «!» of an undelivered iMessage, in a soft yellow */
.alert-dot {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: #f7c948;
  color: #4a3600;
  font-size: 1em;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}
@media (prefers-color-scheme: dark) {
  .alert-dot { background: transparent; color: #f7c948; box-shadow: inset 0 0 0 0.12em #f7c948; }
}

/* App launch: both phones replay it on «Открыть заново». */
.is-launch .cr__home,
.is-launch .other__layer { animation: app-open 0.4s var(--ease); }
@keyframes app-open {
  from { opacity: 0; transform: scale(0.92); }
}

/* A tap: a soft dot that presses and fades. */
.cr__tap,
.other__close::after {
  position: absolute;
  width: 2.8em;
  height: 2.8em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 0.12em rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  pointer-events: none;
}
.cr__tap { z-index: 6; left: 50%; top: var(--tap-y, 9em); }
.other__close::after { content: ""; left: 50%; top: 50%; }
.is-tap .cr__tap,
.is-tap .other__close::after { animation: tap 0.5s ease-out; }
@keyframes tap {
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}

/* ---------- Cardly in the race: cards → tap → venue page ---------------
   Like opening a pass in Apple Wallet, in three steps, one after another:
   1. the other cards drop away while Пенка rises to the top, together with
      its QR block, which was waiting behind the other cards;
   2. then the card's colour grows into the page header;
   3. then the rest of the page slides in.
   From the tap on, the page (.venue) stands in for Пенка's card: it starts
   --dy lower, exactly over the card (personal.js measures it). */
.cr .phone__status { transition: color 0.3s var(--ease); }
.cr .app__bar,
.cr .app__add { transition: opacity 0.2s var(--ease); }
.cr .wcard { transition: background-color 0.35s var(--ease); }
.cr .wcard:not(.cr__pick) { z-index: 3; } /* above the page: Пенка's QR stays behind them */
.cr .wcard > * { transition: opacity 0.3s var(--ease); }

/* Launch screen: like any native app, Cardly takes a moment to start, so
   the cards are dim outlines first. */
.cr:not(.is-ready) .wcard {
  background-color: var(--app-fill);
  box-shadow: inset 0 0 0 0.1em color-mix(in srgb, var(--app-text) 14%, transparent);
}
.cr:not(.is-ready) .wcard > *,
.cr:not(.is-ready) .app__avatar { opacity: 0; }
.cr .app__avatar { transition: opacity 0.3s var(--ease); }

.cr__promo-wait,
.cr__promo-stale {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: inherit;
  background: var(--app-card);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s 0.4s;
}
.cr__promo-wait { flex-direction: column; justify-content: center; gap: 0.45em; padding: 0 0.95em; }
.cr__promo-wait .sk { height: 0.95em; border-radius: 0.45em; }
.cr__promo-wait .sk + .sk { width: 62%; height: 0.75em; }
.cr__promo-stale {
  align-items: center;
  padding: 0 0.95em;
  color: var(--app-text-2);
  font-size: 0.84em;
  font-weight: 600;
}
/* slow network: the promo loads late; no network: it waits for one */
[data-signal="e"] .cr:not(.is-promo) .cr__promo-wait,
[data-signal="none"] .cr__promo-stale {
  opacity: 1;
  visibility: visible;
  transition: none;
}
[data-signal="e"] .cr:not(.is-promo) .cr__promo,
[data-signal="none"] .cr__promo { background: var(--app-card); }
[data-signal="e"] .cr:not(.is-promo) .cr__promo > :not(span),
[data-signal="none"] .cr__promo > :not(span) { visibility: hidden; }
.cr .venue {
  z-index: 2;
  background: transparent;
  visibility: hidden;
  transform: translateY(var(--dy, 0em));
}
/* the header starts out as Пенка's card: inset, rounded, below the status bar */
.cr .venue__hero {
  position: relative;
  clip-path: inset(calc(var(--w) * 0.144) 0.85em 0 0.85em round 1em);
}
.cr__chead {
  position: absolute;
  top: calc(var(--w) * 0.144 + 0.85em);
  left: 1.8em;
  right: 1.8em;
  transform-origin: 0 50%;
}
.cr__chead b { font-size: 1.08em; }
.cr__hhead {
  display: flex;
  align-items: center;
  gap: 0.7em;
  opacity: 0;
  transform: translate(0.7em, -0.215em) scale(0.77);
  transform-origin: 0 50%;
}
.cr .venue .w-grid {
  opacity: 0;
  transform: translateY(2.4em);
}

/* 1. rise (0–0.45 s) */
.cr.is-open .cr__pick { visibility: hidden; }
.cr.is-open .venue {
  visibility: visible;
  transform: none;
  transition: transform 0.45s var(--ease);
}
.cr.is-open .wcard:not(.cr__pick) {
  transform: translateY(48em);
  transition: transform 0.42s cubic-bezier(0.4, 0, 1, 1) calc(var(--i, 0) * 35ms);
}
.cr.is-open .app__bar,
.cr.is-open .app__add { opacity: 0; }

/* 2. the colour grows into the header (0.45–0.85 s) */
.cr.is-open .venue__hero {
  clip-path: inset(0 round 0);
  transition: clip-path 0.4s var(--ease) 0.45s;
}
.cr.is-open .cr__chead {
  opacity: 0;
  transform: translate(-0.7em, 0.215em) scale(1.3);
  transition: transform 0.4s var(--ease) 0.45s, opacity 0.2s linear 0.45s;
}
.cr.is-open .cr__chead .wcard__val {
  opacity: 0;
  transition: opacity 0.12s linear 0.45s;
}
.cr.is-open .cr__hhead {
  opacity: 1;
  transform: none;
  transition: transform 0.4s var(--ease) 0.45s, opacity 0.25s linear 0.6s;
}
.cr.is-open .phone__status {
  color: var(--ink);
  transition: color 0.3s var(--ease) 0.5s;
}

/* 3. the rest of the page (0.85–1.35 s) */
.cr.is-open .venue .w-grid {
  opacity: 1;
  transform: none;
  transition: transform 0.5s var(--ease) 0.85s, opacity 0.35s var(--ease) 0.85s;
}

/* jump back to the home screen without animating the way there */
.cr.is-reset,
.cr.is-reset * { transition: none !important; }

/* ---------- «Обычное приложение» (generic, unbranded) ------------------ */
.other { --o-logo: #aeaeb2; }
.other__layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9em;
  padding: 3.9em 1.1em 1.2em;
  background: var(--app-bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s 0.3s;
}
[data-state="splash"] .other__splash,
[data-state="promo"] .other__promo,
[data-state="loading"] .other__loading,
[data-state="code"] .other__code,
[data-state="offline"] .other__splash {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease), visibility 0s;
}
.other__splash { align-items: center; justify-content: center; gap: 2.4em; padding-top: 0; }

.other__logo {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 0.6em;
  background: var(--o-logo);
  color: #fff;
  font-weight: 750;
}
.other__logo--big { width: 5em; height: 5em; border-radius: 1.3em; font-size: 1.2em; }
.other__head { display: flex; align-items: center; gap: 0.6em; }
.other__head b { font-size: 1.25em; letter-spacing: -0.03em; }

.ospin {
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  border: 0.22em solid var(--app-fill);
  border-top-color: var(--app-text-2);
  animation: spin 0.9s linear infinite;
}

.sk {
  display: block;
  flex: none;
  height: 2.6em;
  border-radius: 0.8em;
  background: linear-gradient(90deg, var(--app-fill) 30%, var(--app-card) 50%, var(--app-fill) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk--banner { height: 8em; }
.sk--short { width: 60%; }
@keyframes shimmer { to { background-position: -150% 0; } }

.other__wait {
  display: grid;
  justify-items: center;
  gap: 0.6em;
  margin-top: auto;
  margin-bottom: 1.6em;
  color: var(--app-text-2);
  font-size: 0.9em;
}

.other__stories { display: flex; gap: 0.55em; }
.other__stories i {
  width: 3.1em;
  height: 3.1em;
  border-radius: 50%;
  background: var(--app-fill);
  box-shadow: 0 0 0 0.16em var(--app-bg), 0 0 0 0.3em #c69c6d;
}
.other__banner {
  position: relative;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 0.35em;
  flex: 1;
  padding: 1.1em;
  border-radius: 1.1em;
  background: linear-gradient(160deg, #d8b48a, #9c6b4a);
  color: #fff;
}
.other__banner small { font-size: 0.8em; opacity: 0.85; }
.other__banner b { font-size: 1.5em; line-height: 1.1; letter-spacing: -0.03em; }
.other__cta {
  margin-top: 0.5em;
  padding: 0.45em 1em;
  border-radius: 999px;
  background: #fff;
  color: #6b4a33;
  font-size: 0.85em;
  font-weight: 650;
}
.other__close {
  position: absolute;
  top: 0.6em;
  right: 0.6em;
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  font-size: 1.1em;
  line-height: 1;
}

/* the short code that has to come from the server */
.other__codecard {
  display: grid;
  justify-items: center;
  gap: 0.4em;
  padding: 1.2em 1em 1.1em;
  border-radius: 1.1em;
  background: var(--app-card);
  color: var(--app-text);
}
.other__codecard small { color: var(--app-text-2); font-size: 0.8em; font-weight: 500; }
.other__codecard b {
  font-size: 2.8em;
  font-weight: 750;
  letter-spacing: 0.14em;
  line-height: 1.1;
}
.other__timer { color: var(--app-text-2); font-size: 0.8em; font-weight: 600; }
.other__menu {
  display: grid;
  gap: 0.55em;
  padding: 0.9em 1em 1em;
  border-radius: 1.1em;
  background: var(--app-card);
  font-size: 0.9em;
  font-weight: 550;
}
.other__menu small { color: var(--app-text-2); font-size: 0.85em; font-weight: 500; }
.other__menu span { display: flex; justify-content: space-between; gap: 0.5em; }
.other__menu em { font-style: normal; color: var(--app-text-2); font-weight: 600; }
.other__toast {
  position: absolute;
  z-index: 2;
  left: 1.1em;
  right: 1.1em;
  bottom: 3em;
  padding: 0.75em 1em;
  border-radius: 0.9em;
  background: #3a3a3c;
  color: #fff;
  font-size: 0.85em;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translateY(1em);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
[data-state="offline"] .other__toast { opacity: 1; transform: none; }
