:root {
  --bg: #0b0c10;
  --bg-elev: #111318;
  --surface: #16181f;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.11);
  --text: #f2f0eb;
  --muted: #9a968c;
  --faint: #6c685f;
  --accent: #3ee0c8;
  --accent-dim: rgba(62, 224, 200, 0.12);
  --accent-2: #7aa2ff;
  --warm: #e4c48a;
  --danger: #ff6b7a;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --dock-h: 76px;
  --topbar-h: 68px;
  --mobar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --app-h: 100dvh;
  --vv-top: 0px;
  --kb-inset: 0px;
  --font: "Segoe UI", "SF Pro Text", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --round: "Sofia Round", "Segoe UI", ui-rounded, system-ui, sans-serif;
  /* Sofia Round is M PLUS Rounded 1c Black — a display cut. Below ~1.3rem
     the outlines speckle; a weight other than 800–900 is synthesised and
     looks ribbed. Buttons and quiet actions stay on --font. */
  --consent-legal-h: 3.4rem;
}

/* The rounded display face. M PLUS Rounded 1c Black is heavier and tighter
   than Baloo 2, and unlike Baloo it has Cyrillic, so Russian and English
   headlines sit in the same letters. Baloo 2 still covers Devanagari, where
   M PLUS has no glyphs. Both are SIL OFL 1.1 and both are served from here,
   so the page never calls a font CDN. The unicode-range on each face means a
   reader downloads only their own script.

   The display is "optional", not "swap": the document preloads the one subset
   this reader's language needs, so the face is in hand before the first paint
   and is used. If it somehow is not, the headline stays in the fallback for
   that view instead of re-setting itself under the reader's eyes. Either way
   the page never shows the same word in two typefaces. */
@font-face {
  font-family: "Sofia Round";
  src: url("/static/web/fonts/mplusrounded1c-black-latin.woff2?v=2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sofia Round";
  src: url("/static/web/fonts/mplusrounded1c-black-latin-ext.woff2?v=2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Sofia Round";
  src: url("/static/web/fonts/mplusrounded1c-black-vietnamese.woff2?v=2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Sofia Round";
  src: url("/static/web/fonts/baloo2-extrabold-devanagari.woff2?v=1") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC,
    U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

@font-face {
  font-family: "Sofia Round";
  src: url("/static/web/fonts/mplusrounded1c-black-cyrillic.woff2?v=2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Sofia Round";
  src: url("/static/web/fonts/mplusrounded1c-black-cyrillic-ext.woff2?v=2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* The browser hides [hidden] with display: none, which any later rule that
   sets a display can silently undo. Everything on the page toggles visibility
   through this attribute, so it wins outright. */
[hidden] { display: none !important; }

html.is-picker-open,
html.is-picker-open body {
  overflow: hidden;
}

html, body {
  margin: 0;
  background:
    radial-gradient(80% 42% at 50% -8%, rgba(255, 255, 255, 0.035), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

html {
  height: var(--app-h);
  overflow: hidden;
  overscroll-behavior: none;
}

/* The shell is pinned to the layout viewport. When a phone keyboard opens,
   --app-h stays at the resting height so the dock does not rise; --kb-inset
   lifts the typing surface (composer, sheets, focused fields) above the keys. */
body {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--vv-top);
  left: 0;
  right: 0;
  width: 100%;
  height: var(--app-h);
  overflow: hidden;
}

html.is-telegram {
  --safe-t: max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --app-h: var(--tg-viewport-height, 100dvh);
}

html.is-keyboard {
  --safe-b: 0px;
}

@media (max-width: 899px) {
  html.is-keyboard .dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html.is-keyboard .stage {
    margin-bottom: var(--kb-inset);
  }

  html.is-keyboard .dialog-root {
    padding-bottom: calc(var(--kb-inset) + 0.75rem);
  }

  html.is-keyboard .picker-layer.is-sheet {
    padding-bottom: var(--kb-inset);
  }

  html.is-keyboard .picker-layer.is-sheet .picker-panel {
    max-height: min(42rem, calc(var(--app-h) - var(--kb-inset) - 1.25rem));
    padding: 0.4rem 0.85rem 0.85rem;
  }

  html.is-keyboard .doc-sheet {
    padding-bottom: calc(1rem + var(--kb-inset));
  }
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
  background-clip: padding-box;
}

@-moz-document url-prefix() {
  html, body, .view, .chat-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  }
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sofia-avatar {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(58, 42, 130, 0.24);
}

.sofia-avatar.is-thinking {
  animation: avatar-breathe 1.6s ease-in-out infinite;
}

@keyframes avatar-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.topbar {
  display: none;
  position: relative;
  z-index: 8;
  flex: none;
  height: var(--topbar-h);
  padding: 0 1.5rem;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-name,
.brand-mark {
  display: block;
}

.brand-mark {
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 7.15rem;
  height: auto;
}

.brand-sub {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar { display: none; }

.topnav-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  color: #d4d0c6;
  font-size: 0.88rem;
  line-height: 1.15;
  transition: color 0.25s ease, background 0.25s ease;
}

.topnav-link:hover { color: var(--text); }

.topnav-link.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.topnav-icon {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(16, 34, 79, 0.12));
}

.topnav-link .sofia-avatar-nav {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 3px 8px rgba(58, 42, 130, 0.22);
  filter: none;
}

.topnav-wallet-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.topnav-wallet-sum {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.topbar-end {
  display: flex;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.mobar {
  display: flex;
  position: relative;
  z-index: 8;
  flex: none;
  height: calc(var(--mobar-h) + var(--safe-t));
  padding: var(--safe-t) 0.9rem 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: visible;
}

.brand-compact {
  min-width: 0;
}

.brand-compact .brand-logo {
  width: 6.1rem;
}

.brand,
.brand-compact { position: relative; z-index: 1; }

.lang,
[data-lang-picker] {
  position: relative;
  z-index: 2;
  flex: none;
}

.lang-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 0.8rem 0 0.7rem;
  border: 1px solid rgba(62, 224, 200, 0.38);
  border-radius: 999px;
  background: #22262f;
  color: #f4f1ea;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lang-btn:hover,
.lang.is-open .lang-btn {
  border-color: rgba(62, 224, 200, 0.42);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.lang-globe {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: none;
}

.lang-code {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.lang-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 550;
}

.topbar .lang-code { display: none; }
.mobar .lang-name { display: none; }

.lang-chevron {
  width: 12px;
  height: 12px;
  color: #c4bfb3;
  transition: transform 0.2s ease;
}

.lang.is-open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(17.5rem, calc(100vw - 1.6rem));
  max-height: min(28rem, 74vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.32rem;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.03);
  animation: rise 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.lang-option {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

.lang-option.is-active {
  background: var(--accent-dim);
}

.lang-native {
  font-size: 0.92rem;
  letter-spacing: -0.015em;
}

.lang-meta {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.lang-option.is-active .lang-meta { color: var(--accent); }

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.view {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1rem 1.5rem;
}

#view-home {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
}

#view-assistant {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.chat {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* Weather for the conversation. The clouds belong to the window, not to the
   transcript: they sit in a layer of their own, outside the scroller, so a
   long conversation never drags them along or repaints them. */
.chat-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.chat-cloud {
  position: absolute;
  display: block;
  height: auto;
  user-select: none;
  filter: drop-shadow(0 10px 18px rgba(70, 120, 180, 0.1));
}

.chat-cloud-a {
  top: 2%;
  inset-inline-start: -5%;
  width: clamp(9rem, 17vw, 15rem);
  opacity: 0.8;
  animation: cloud-drift 26s ease-in-out infinite;
}

.chat-cloud-b {
  top: 7%;
  inset-inline-end: -4%;
  width: clamp(10rem, 19vw, 17rem);
  opacity: 0.68;
  animation: cloud-drift 33s ease-in-out infinite reverse;
}

.chat-cloud-c {
  top: 33%;
  inset-inline-start: 9%;
  width: clamp(6rem, 11vw, 9.5rem);
  opacity: 0.4;
  animation: cloud-drift 38s ease-in-out infinite;
}

.chat-cloud-d {
  top: 47%;
  inset-inline-end: 6%;
  width: clamp(7rem, 13vw, 11rem);
  opacity: 0.36;
  animation: cloud-drift 30s ease-in-out infinite reverse;
}

.chat-cloud-e {
  bottom: 13%;
  inset-inline-start: -7%;
  width: clamp(8rem, 15vw, 13rem);
  opacity: 0.5;
  animation: cloud-drift 35s ease-in-out infinite;
}

.chat-cloud-f {
  bottom: 3%;
  inset-inline-end: -6%;
  width: clamp(9rem, 16vw, 14rem);
  opacity: 0.44;
  animation: cloud-drift 28s ease-in-out infinite reverse;
}

@keyframes cloud-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-18px, 9px, 0); }
}

.chat-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.75rem 1.25rem 1rem;
  scrollbar-color: rgba(26, 60, 120, 0.22) transparent;
}

.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(26, 60, 120, 0.18);
  background-clip: padding-box;
}

.chat-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 60, 120, 0.32);
  background-clip: padding-box;
}

.chat-scroll > * {
  max-width: 760px;
  margin-inline: auto;
}

/* Same mark as the home boot, but it lives in the chat column — no veil,
   no page lock, just the circle while history is on the way. */
.chat-boot {
  display: none;
  pointer-events: none;
}

.chat.is-pending .chat-boot {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  z-index: 2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(16, 40, 90, 0.07);
  background: #fff;
  color: #22315c;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 650;
  text-align: start;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(24, 52, 102, 0.08);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease,
    border-color 0.22s ease, color 0.22s ease;
}

@media (hover: hover) {
  .chip:hover {
    border-color: rgba(47, 107, 255, 0.32);
    color: #1a3fb8;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(24, 52, 102, 0.14);
  }
}

.chip:active { transform: translateY(0); }

.chip:focus-visible {
  outline: 3px solid rgba(47, 107, 255, 0.35);
  outline-offset: 3px;
}

/* A guest gets the one door in, and it carries the weight of the page. */
.chip.is-cta {
  border-color: transparent;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--round);
  font-size: 1.06rem;
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(58, 74, 208, 0.32);
}

.chip.is-cta::after { color: #fff; opacity: 0.85; }

@media (hover: hover) {
  .chip.is-cta:hover {
    border-color: transparent;
    color: #fff;
    box-shadow: 0 22px 40px rgba(58, 74, 208, 0.4);
  }
}

#view-home .home {
  width: min(100%, 78rem);
  margin-inline: auto;
  padding: 0.55rem 0.9rem 1.1rem;
}

.home {
  position: relative;
  display: grid;
  grid-template-areas:
    "title"
    "lead"
    "scene"
    "cta"
    "features";
  gap: 0.7rem 1.5rem;
  min-height: 100%;
}

.home-copy {
  display: contents;
}

/* Title-sky weather is a phone composition. The desktop scene already
   carries its own upper clouds beside Sofia. */
.home-copy-sky {
  display: none;
}

/* A pass-through on desktop so the existing two-column grid is unchanged.
   On a phone it becomes the first view: copy, scene, and room for the CTA. */
.home-stage {
  display: contents;
}

#view-home .welcome-title { grid-area: title; }
#view-home .welcome-lead { grid-area: lead; }
.home-cta-row { grid-area: cta; }
.home-scene { grid-area: scene; }
.home-features { grid-area: features; }

/* How wide the longer half of the home headline is, in ems of the display
   face. The headline sizes itself so that half fills the column it sits in and
   no more, which is what holds "Where to next?" to two lines in every language
   and at every window width. Re-measure when a headline is retranslated: set
   the two halves at a known font-size and divide the wider one by it. */
html { --title-em: 4.06; }
html:lang(ar) { --title-em: 4.82; }
html:lang(de) { --title-em: 4.97; }
html:lang(es) { --title-em: 4.15; }
html:lang(fr) { --title-em: 7.27; }
html:lang(hi) { --title-em: 3.20; }
html:lang(id) { --title-em: 6.25; }
html:lang(it) { --title-em: 7.65; }
html:lang(ja) { --title-em: 4.83; }
html:lang(ko) { --title-em: 6.05; }
html:lang(pl) { --title-em: 3.20; }
html:lang(pt-BR) { --title-em: 7.23; }
html:lang(ru) { --title-em: 4.28; }
html:lang(tr) { --title-em: 7.07; }
html:lang(zh-CN) { --title-em: 3.86; }

#view-home .welcome-title {
  position: relative;
  margin: 0.15rem 0 0;
  color: #131c4e;
  font-family: var(--round);
  font-size: clamp(2.2rem, min(13.6vw, 88vw / var(--title-em)), 4.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.86;
}

/* Each half is its own block, so the line break falls where the translator put
   it rather than wherever the column happens to run out. */
.welcome-title-lead,
.welcome-title-accent {
  display: block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.welcome-title-lead {
  position: relative;
}

.welcome-title-accent {
  color: #2f6bff;
}

/* Korean breaks between words, not inside them. */
html:lang(ko) .welcome-title,
html:lang(ko) .welcome-lead {
  word-break: keep-all;
}

/* The sparkle rides the end of the first headline line. It is anchored to the
   lead block — which shrink-wraps its own text — and measured in ems of that
   text, so it lands just past the last letter at cap height in every language,
   whatever the word and however wide the glyphs. */
.welcome-sparkle {
  position: absolute;
  top: -0.2em;
  inset-inline-end: -0.95em;
  width: 0.8em;
  height: auto;
}

html[dir="rtl"] .welcome-sparkle {
  transform: scaleX(-1);
}

/* The lede is set in the same rounded face as the headline, one step down:
   the system sans it wore before sank into the busy skyline behind it. */
#view-home .welcome-lead {
  margin: 0;
  max-width: 34rem;
  color: #3d4c74;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.06rem, 2.3vw, 1.22rem);
  letter-spacing: 0;
  line-height: 1.5;
}

/* The assistant's name, marked by the translator so each language can inflect
   it, is the one word in the lede that carries brand colour. */
#view-home .welcome-lead b {
  color: #4b3ddb;
  font-weight: 800;
}

.home-cta-row {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}

.home-cta-slot {
  display: flex;
  justify-content: flex-start;
}

.home-cta {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.6rem;
  padding: 0.8rem 2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #4b3ddb 0%, #3826b8 100%);
  color: #fff;
  font-family: var(--round);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(48, 34, 160, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .home-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(48, 34, 160, 0.38);
  }
}

.home-cta:focus-visible {
  outline: 3px solid rgba(75, 61, 219, 0.45);
  outline-offset: 3px;
}

.home-cta-arrow {
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
}

.home-cta-doodle {
  display: none;
}

.home-scene {
  position: relative;
  min-height: min(26rem, 78vw);
  pointer-events: none;
}

/* Nothing is clipped here: on a phone the art deliberately spills past the
   band of layout it is given, and on a desktop the view itself is the frame. */
.home-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
}

.home-world,
.home-sky-cloud,
.home-balloon,
.home-plane,
.home-case,
.home-sofia {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Soft weather in the upper sky, behind the cast. */
.home-sky-cloud {
  z-index: 2;
}

.home-sky-cloud-a {
  right: 1%;
  top: 1%;
  width: 22%;
}

.home-sky-cloud-b {
  right: 21%;
  top: 14%;
  width: 17%;
  opacity: 0.8;
}

.home-sky-cloud-c {
  right: 42%;
  top: 4%;
  width: 14%;
  opacity: 0.62;
}

.home-world-band {
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  z-index: 1;
}

.home-balloon {
  right: 6%;
  top: 1%;
  width: 9%;
  z-index: 3;
  animation: home-bob 6.5s ease-in-out infinite;
}

.home-plane {
  left: 2%;
  top: 3%;
  width: 44%;
  z-index: 3;
  filter: drop-shadow(0 14px 18px rgba(24, 52, 102, 0.16));
  animation: home-drift 8s ease-in-out infinite;
}

.home-case {
  left: 8%;
  bottom: 4%;
  width: auto;
  height: 34%;
  z-index: 3;
  filter: drop-shadow(0 16px 20px rgba(24, 52, 102, 0.18));
}

.home-sofia {
  left: 34%;
  bottom: 0;
  z-index: 3;
  width: auto;
  height: 88%;
  filter: drop-shadow(0 18px 26px rgba(24, 52, 102, 0.16));
}

/* The bubble is measured from the same edge the scene is mirrored about, so it
   travels with Sofia when an RTL page flips her to the other side. */
.home-speech {
  position: absolute;
  inset-inline-start: 50%;
  inset-inline-end: 0.5rem;
  top: 0;
  z-index: 6;
  max-width: 13rem;
  margin: 0;
  padding: 0.82rem 1.05rem 0.86rem;
  border-radius: 1.5rem;
  background: #fff;
  color: #1a2a55;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
  text-wrap: balance;
  box-shadow: 0 14px 30px rgba(20, 46, 96, 0.15);
}

/* The tail drops from the corner nearest Sofia, straight at her head. */
.home-speech::after {
  content: "";
  position: absolute;
  inset-inline-start: 1.5rem;
  bottom: -0.72rem;
  width: 1.3rem;
  height: 0.78rem;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 16% 100%);
}

html[dir="rtl"] .home-speech::after {
  clip-path: polygon(0 0, 100% 0, 84% 100%);
}

.home-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.home-feature {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 22px;
  background: var(--feature-bg, #fff);
  box-shadow: 0 14px 32px rgba(24, 52, 102, 0.1);
}

/* Each card is washed with its icon's colour, and the title takes a deep
   shade of the same hue — lavender/navy, blush/ink, mint/green, cream/gold. */
.home-feature:nth-child(1) { --feature-bg: #f6f5fe; --feature-title: #1d2452; }
.home-feature:nth-child(2) { --feature-bg: #fef5f8; --feature-title: #2b181e; }
.home-feature:nth-child(3) { --feature-bg: #f3fbf4; --feature-title: #1e6b3e; }
.home-feature:nth-child(4) { --feature-bg: #fff8ef; --feature-title: #8a5a12; }

.home-feature h2 {
  margin: 0;
  color: var(--feature-title, #10224f);
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.home-feature p {
  margin: 0.22rem 0 0;
  color: #575c66;
  font-size: 0.8rem;
  line-height: 1.4;
}

.home-feature img {
  width: 52px;
  height: 52px;
}

@keyframes home-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes home-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -6px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-balloon,
  .home-plane { animation: none; }
}

/* The landing holds its chrome until the scene has decoded, so the skyline
   does not assemble itself under the reader's eyes. A warm cache skips this
   and paints the finished page on the first frame. */
.home-boot {
  display: none;
}

html.is-home-pending:has(#view-home.is-active) .home-boot {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 40;
  place-items: center;
  pointer-events: none;
}

.home-boot-mark {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    rgba(75, 61, 219, 0) 0 58%,
    rgba(75, 61, 219, 0.35) 72%,
    #45e4cb 92%,
    #4b3ddb 100%
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  animation: home-boot-spin 0.85s linear infinite;
}

@keyframes home-boot-spin {
  to { transform: rotate(360deg); }
}

html.is-home-pending:has(#view-home.is-active) .topbar,
html.is-home-pending:has(#view-home.is-active) .mobar,
html.is-home-pending:has(#view-home.is-active) .stage,
html.is-home-pending:has(#view-home.is-active) .dock {
  opacity: 0;
  visibility: hidden;
}

html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .topbar,
html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .mobar,
html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .stage,
html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .dock {
  animation: home-page-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes home-page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .home-boot-mark { animation: none; opacity: 0.55; }

  html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .topbar,
  html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .mobar,
  html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .stage,
  html.is-home-ready:not(.is-home-warm):has(#view-home.is-active) .dock {
    animation: none;
  }
}

/* The reading column moves to the right in an RTL page, so the scene mirrors to
   keep the cast out from under it. Sofia is turned back: her sweater carries
   her name, and a mirrored word is simply wrong. */
html[dir="rtl"] .home-art { transform: scaleX(-1); }
html[dir="rtl"] .home-sofia { transform: scaleX(-1); }

@media (min-width: 900px) {
  /* The scene is the window: it is measured against the view, not against the
     padded reading column, so it meets every edge and the page never scrolls to
     reveal a strip of missing sky. */
  #view-home {
    position: relative;
    overflow: hidden;
  }

  #view-home .home {
    height: 100%;
    padding: 0.15rem 1.6rem 1.15rem;
  }

  .home {
    position: static;
    grid-template-columns: minmax(22rem, 0.52fr) 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy ."
      "features features";
    align-items: stretch;
    column-gap: 0;
    row-gap: 0.35rem;
  }

  /* The headline measures itself against this column, so the column has to be
     a container. Its width comes from the grid track and never from its
     contents, which is what containment requires. */
  .home-copy {
    display: flex;
    grid-area: copy;
    position: relative;
    z-index: 2;
    container-type: inline-size;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.05rem;
    padding: 1.5rem 0 3.6rem;
    max-width: 32rem;
  }

  /* The skyline runs under the reading column, so the copy carries its own
     patch of light. Without it the lede sits on palm fronds. */
  .home-copy::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -2.5rem -9rem -2rem -7rem;
    background: radial-gradient(
      54% 50% at 40% 46%,
      rgba(240, 249, 255, 0.94) 0%,
      rgba(240, 249, 255, 0.72) 42%,
      rgba(240, 249, 255, 0) 76%
    );
  }

  #view-home .welcome-title {
    font-size: clamp(2.2rem, min(27cqi, 96cqi / var(--title-em)), 7.05rem);
  }

  #view-home .welcome-lead {
    max-width: 27rem;
    font-size: clamp(1.12rem, 1.7vw, 1.3rem);
  }

  .home-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    min-height: 0;
  }

  /* The doodle's tip sits in its lower-left corner, so the whole drawing is
     lifted until that tip lands on the button's flank rather than under it. */
  .home-cta-doodle {
    display: block;
    align-self: flex-end;
    width: 4.2rem;
    height: auto;
    margin-bottom: 1.1rem;
    opacity: 0.9;
  }

  html[dir="rtl"] .home-cta-doodle {
    transform: scaleX(-1);
  }

  /* The plane keeps clear of the enlarged headline: it flies in the open sky
     between the copy column and Sofia, low enough that its drift animation
     never carries the tail fin past the clipped top edge of the view. */
  .home-plane {
    left: 34%;
    top: 3%;
    width: 17%;
  }

  /* The balloon floats in the gap between Sofia and Big Ben, riding at the
     height of her head rather than up in the corner sky. */
  .home-balloon {
    right: 15%;
    top: 11%;
    width: 6.5%;
  }

  /* Sofia and the case share one ground line, so the case reads as standing
     next to her rather than hanging in the sky. */
  .home-case {
    left: 43%;
    bottom: 5%;
    height: 30%;
  }

  .home-sofia {
    left: 50%;
    bottom: 5%;
    height: 86%;
  }

  .home-speech {
    inset-inline-start: 64%;
    inset-inline-end: auto;
    top: 0.6rem;
    max-width: 14.5rem;
    font-size: 0.92rem;
  }

  /* The cards close the composition, so Sofia and the skyline pass behind them. */
  .home-features {
    position: relative;
    z-index: 5;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin: 0;
  }

  .home-feature {
    min-height: 100%;
    padding: 0.95rem 1.1rem 1rem;
  }
}

/* A window too short to hold the whole composition gets its scrollbar back
   rather than losing the bottom of the page. */
@media (min-width: 900px) and (max-height: 620px) {
  #view-home {
    overflow-y: auto;
  }

  #view-home .home {
    height: auto;
    min-height: 100%;
  }
}

@media (min-width: 1280px) {
  #view-home .home {
    padding: 0.1rem 2.1rem 1.25rem;
  }

  .home-copy {
    max-width: 36rem;
    gap: 1.2rem;
    padding: 2rem 0 4rem;
  }

  #view-home .welcome-lead {
    max-width: 30rem;
    font-size: clamp(1.18rem, 1.75vw, 1.42rem);
  }

  .home-cta-doodle {
    width: 4.5rem;
  }

  .home-plane {
    left: 35%;
    top: 3%;
    width: 16%;
  }

  .home-case {
    left: 44%;
    bottom: 5%;
    height: 31%;
  }

  .home-sofia {
    left: 51%;
    bottom: 5%;
    height: 88%;
  }

  .home-balloon {
    right: 16%;
    top: 11%;
    width: 6%;
  }

  .home-speech {
    inset-inline-start: 65%;
    top: 0.6rem;
    max-width: 15.5rem;
  }
}

/* Free space stays above the first line, so a short thread rests on the
   composer — the same edge a long one keeps in view. */
.transcript {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: auto;
  padding-bottom: 0.5rem;
}

/* Two voices, one shape: the corner nearest the speaker is cut, which is what
   tells them apart at a glance without a tail to draw. */
.bubble {
  position: relative;
  max-width: min(86%, 34rem);
  padding: 0.85rem 1.15rem 0.9rem;
  border-radius: 22px;
  font-size: 0.97rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: bubble-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bubble.is-sofia {
  align-self: flex-start;
  border-end-start-radius: 8px;
  background: #fff;
  color: #1e2a4f;
  box-shadow: 0 12px 28px rgba(24, 52, 102, 0.1);
}

.desk-main .bubble.is-sofia {
  border: 1px solid rgba(16, 40, 90, 0.06);
}

.bubble.is-antony {
  align-self: flex-start;
  border-end-start-radius: 8px;
  background: #f6f1e7;
  color: #2a261c;
  box-shadow: 0 12px 28px rgba(60, 48, 28, 0.08);
}

.bubble-who {
  display: block;
  margin-bottom: 0.2rem;
  color: #8a7a5a;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.bubble.is-user {
  align-self: flex-end;
  border-end-end-radius: 8px;
  background: linear-gradient(135deg, #4b6bff 0%, #6b46f0 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(58, 74, 208, 0.26);
}

.bubble.has-photo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.7rem;
}

.bubble-photo {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.bubble-photo img {
  display: block;
  width: 100%;
  max-width: 22rem;
  max-height: 28rem;
  object-fit: contain;
  background: rgba(19, 28, 78, 0.04);
}

.bubble-photo-mark {
  display: block;
  padding: 1.45rem 1.3rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.bubble.has-photo .bubble-text {
  padding: 0 0.7rem 0.1rem;
}

.bubble.has-file {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.4rem 0.4rem 0.7rem;
}

.bubble-file {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.bubble-file-mark {
  display: block;
  padding: 1.1rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.bubble.has-file .bubble-text {
  padding: 0 0.7rem 0.1rem;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.1rem;
}

.offer-list {
  width: 100%;
  gap: 0.7rem;
}

/* What she searched for, said once above the results. */
.offer-search {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #46568a;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(24, 52, 102, 0.07);
}

.offer-section {
  display: grid;
  gap: 0.55rem;
  width: 100%;
}

.offer-alternatives {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(28, 43, 92, 0.12);
}

.offer-alternatives-title {
  margin: 0.2rem 0 0.1rem;
  padding: 0 0.2rem;
  color: #3d4a78;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.offer-cabin-board {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(28, 43, 92, 0.14);
}

.offer-cabin-board:first-of-type {
  margin-top: 0.15rem;
  padding-top: 0;
  border-top: none;
}

.offer-cabin-board-title {
  margin: 0.15rem 0 0.05rem;
  padding: 0 0.2rem;
  color: #1c2b5c;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.offer-cabin-board-title[data-cabin] {
  color: var(--cabin);
}

.offer-roles {
  position: absolute;
  z-index: 2;
  top: 0;
  inset-inline-start: 1.15rem;
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  max-width: calc(100% - 2.3rem);
  margin: 0;
  padding: 0;
  transform: translateY(calc(-100% + 1px));
  pointer-events: none;
}

.offer:has(.offer-roles) {
  margin-top: 1.15rem;
}

.offer:has(.offer-role + .offer-role) {
  margin-top: 1.7rem;
}

.offer-role {
  min-width: 0;
  padding: 0.34rem 0.72rem 0.42rem;
  overflow: hidden;
  border: 1px solid rgba(16, 40, 90, 0.08);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f4f8ff;
  color: #2f4ea8;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 -8px 16px rgba(24, 52, 102, 0.05);
}

.offer-roles:has(.offer-role + .offer-role) {
  gap: 0.32rem;
  padding: 0.32rem 0.4rem 0.36rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #f4f8ff;
  box-shadow: 0 -8px 16px rgba(24, 52, 102, 0.05);
}

.offer-roles:has(.offer-role + .offer-role) .offer-role {
  padding: 0.22rem 0.62rem;
  border-bottom-width: 1px;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.offer-role.is-chosen {
  border-color: rgba(92, 61, 28, 0.32);
  color: #5c3d1c;
}

.offer-role.is-cheapest,
.offer-role.is-cheapest_nonstop {
  border-color: rgba(27, 122, 69, 0.16);
  background: #e7f6ee;
  color: #1b7a45;
}

.offer-roles:has(.offer-role + .offer-role) .offer-role.is-cheapest,
.offer-roles:has(.offer-role + .offer-role) .offer-role.is-cheapest_nonstop {
  background: #e7f6ee;
}

.offer-role.is-easy_connect {
  border-color: rgba(15, 110, 106, 0.34);
  color: #0f6e6a;
}

.offer-role.is-best {
  border-color: rgba(107, 47, 160, 0.32);
  color: #6b2fa0;
}

.offer-role.is-nonstop {
  border-color: rgba(27, 122, 69, 0.38);
  color: #1b7a45;
}

.offer-role.is-rest {
  border-color: rgba(92, 90, 86, 0.28);
  color: #5c5a56;
}

.offer-similar {
  display: grid;
  gap: 0.7rem;
  width: 100%;
}

.offer-similar-toggle {
  appearance: none;
  justify-self: start;
  margin: 0;
  padding: 0.35rem 0.15rem;
  border: 0;
  background: none;
  color: #2f4ea8;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.offer-similar-toggle:hover,
.offer-similar-toggle:focus-visible {
  color: #1d3f9a;
}

.offer-list.is-retired .offer-similar-toggle {
  pointer-events: none;
}

.offer {
  position: relative;
  container: offer-card / inline-size;
  display: grid;
  width: 100%;
  min-width: 0;
  border-radius: 22px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 3.4rem);
  overflow: visible;
  box-shadow: 0 12px 28px rgba(24, 52, 102, 0.08);
  animation: rise 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.3s ease;
}

@media (hover: hover) {
  .offer:hover {
    border-color: rgba(47, 107, 255, 0.28);
    box-shadow: 0 10px 24px rgba(24, 52, 102, 0.11);
  }
}

.offer:focus-within {
  border-color: rgba(47, 107, 255, 0.4);
}

/* A fare that has been superseded stays readable but stops inviting a tap. */
.offer-list.is-retired .offer,
.offer.is-retired {
  opacity: 0.55;
  filter: saturate(0.55);
  transform: none;
  box-shadow: 0 6px 16px rgba(24, 52, 102, 0.06);
  pointer-events: none;
}

.offer-list.is-retired .offer:hover,
.offer.is-retired:hover {
  transform: none;
  border-color: rgba(16, 40, 90, 0.06);
  box-shadow: 0 6px 16px rgba(24, 52, 102, 0.06);
}

.fare-calendar {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  padding: 1rem 1.05rem 1.15rem;
  border-radius: 24px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 52, 102, 0.1);
  animation: rise 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.fare-calendar > .offer-search {
  justify-self: start;
}

.fare-calendar-lede {
  margin: 0;
  color: #1c2b5c;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.4;
}

.fare-calendar-empty {
  margin: 0;
  color: #5a6794;
  font-size: 0.84rem;
  line-height: 1.45;
}

.fare-month {
  display: grid;
  gap: 0.55rem;
}

.fare-month-title {
  margin: 0.15rem 0 0;
  padding: 0 0.15rem;
  color: #1c2b5c;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.fare-weekdays,
.fare-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.28rem;
}

.fare-weekday {
  color: #7a86b0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.fare-day {
  appearance: none;
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  min-height: 3.35rem;
  margin: 0;
  padding: 0.35rem 0.1rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
}

.fare-day.is-pad {
  visibility: hidden;
}

.fare-day.is-empty {
  color: #b3b9d0;
}

.fare-day.is-priced {
  background: rgba(47, 107, 255, 0.06);
  border-color: rgba(47, 107, 255, 0.08);
  cursor: pointer;
}

.fare-day.is-priced:hover,
.fare-day.is-priced:focus-visible {
  border-color: rgba(47, 107, 255, 0.35);
  background: rgba(47, 107, 255, 0.1);
  outline: none;
}

.fare-day.is-lowest {
  background: rgba(46, 140, 90, 0.1);
  border-color: rgba(46, 140, 90, 0.16);
}

.fare-day.is-lowest:hover,
.fare-day.is-lowest:focus-visible {
  border-color: rgba(31, 107, 69, 0.4);
  background: rgba(46, 140, 90, 0.16);
}

.fare-day-num {
  color: #1c2b5c;
  font-size: 0.86rem;
  font-weight: 700;
}

.fare-day.is-empty .fare-day-num {
  color: #b3b9d0;
  font-weight: 600;
}

.fare-day-price {
  color: #2f4ea8;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.fare-day.is-lowest .fare-day-price,
.fare-day.is-lowest .fare-day-num {
  color: #1f6b45;
}

.offer-pick:disabled,
.offer-flight:disabled {
  cursor: default;
}

.offer-pick,
.offer-flight {
  appearance: none;
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.offer-pick:focus-visible,
.offer-flight:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #2f6bff;
}

.offer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
  padding: 0;
}

.offer-mark {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  min-width: 0;
}

.offer-head .airline {
  flex: 1 1 auto;
  min-width: 0;
}

.airline {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  max-width: 100%;
}

.airline-mark {
  flex: none;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0.14rem;
  border-radius: 0.48rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 40, 90, 0.08);
}

.airline-mark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.airline-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.airline.is-card .airline-mark {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.55rem;
}

.airline.is-fact .airline-mark {
  width: 1.7rem;
  height: 1.7rem;
}

.airline.is-inline {
  gap: 0.32rem;
}

.airline.is-inline .airline-mark {
  width: 1.2rem;
  height: 1.2rem;
  padding: 0.08rem;
  border-radius: 0.34rem;
}

.offer-airline {
  color: #131c4e;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.offer-mode {
  color: #8b97b8;
  font-size: 0.72rem;
  font-weight: 600;
}

.offer-mode::before {
  content: "(";
}

.offer-mode::after {
  content: ")";
}

/* One cabin palette. Economy, business and first use the greens, blues and
   reds already on the page; premium economy keeps the violet the mark used
   when every cabin was the same colour. */
[data-cabin="economy"] {
  --cabin: #1f6b45;
  --cabin-bg: rgba(46, 140, 90, 0.12);
}

[data-cabin="premium_economy"] {
  --cabin: #5a41d8;
  --cabin-bg: #f1edff;
}

[data-cabin="business"] {
  --cabin: #2f4ea8;
  --cabin-bg: rgba(47, 107, 255, 0.12);
}

[data-cabin="first"] {
  --cabin: #c92f45;
  --cabin-bg: rgba(201, 47, 69, 0.12);
}

.offer-cabin {
  flex: none;
  margin-inline-start: auto;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cabin, #5c5a56) 38%, transparent);
  background: transparent;
  color: var(--cabin, #5c5a56);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.offer-head .offer-cabin {
  margin-inline-start: auto;
}

.chip[data-cabin] {
  border-color: transparent;
  background: var(--cabin-bg);
  color: var(--cabin);
}

@media (hover: hover) {
  .chip[data-cabin]:hover {
    border-color: transparent;
    background: var(--cabin-bg);
    color: var(--cabin);
  }
}

.chip[data-cabin]:focus-visible {
  outline-color: var(--cabin);
}

.offer-fare-cabin[data-cabin],
.offer-itin-cabin[data-cabin],
.order-recap-cabin[data-cabin],
.admin-ticket-cabin[data-cabin],
.ticket-fact.is-cabin[data-cabin] .ticket-fact-value {
  color: var(--cabin);
}

.offer-flight {
  gap: 0.15rem;
  padding: 0.85rem 0.9rem 0.2rem;
}

.offer-flight .offer-head {
  margin: 0 0 0.35rem;
  padding: 0;
  border: 0;
}

.offer-trips {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.offer-trip {
  display: grid;
  gap: 0.28rem;
}

.offer-trip + .offer-trip {
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(16, 40, 90, 0.14);
}

.offer-direction {
  margin: 0;
  color: #2f6bff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.offer-end,
.offer-path {
  display: grid;
  grid-template-rows: 1.85rem 1.25rem minmax(1rem, auto);
  align-content: start;
  min-width: 0;
  overflow: hidden;
}

.offer-trip {
  grid-template-columns: minmax(0, 1fr) minmax(5.4rem, 1.15fr) minmax(0, 1fr);
  column-gap: 0.65rem;
  align-items: start;
}

.offer-direction {
  grid-column: 1 / -1;
}

.offer-end.is-end {
  justify-items: end;
  text-align: end;
}

.offer-time,
.offer-duration,
.offer-spot,
.offer-line,
.offer-when,
.offer-stops {
  display: flex;
  align-items: center;
  min-width: 0;
}

.offer-end.is-end .offer-time,
.offer-end.is-end .offer-spot,
.offer-end.is-end .offer-when {
  justify-content: flex-end;
}

.offer-duration,
.offer-line,
.offer-stops {
  justify-content: center;
}

.offer-time {
  color: #12183a;
  font-family: var(--round);
  font-size: 1.48rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.offer-duration {
  color: #46568a;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.offer-spot {
  gap: 0.28rem;
  max-width: 100%;
  overflow: hidden;
}

.offer-flag {
  display: inline-flex;
  flex: none;
}

.offer-flag .flag-slot,
.offer-flag .flag,
.offer-flag .flag-fallback {
  width: 14px;
  height: 10px;
}

.offer-flag .flag-slot {
  border-radius: 2px;
  overflow: hidden;
}

.offer-city {
  min-width: 0;
  overflow: hidden;
  color: #1c2748;
  font-size: 0.8rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offer-iata {
  flex: none;
  color: #6b7ba6;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.offer-when,
.offer-stops {
  color: #7d89ab;
  font-size: 0.66rem;
  font-weight: 650;
}

.offer-stops {
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.offer-path {
  width: auto;
  justify-self: stretch;
}

.offer-line {
  display: flex;
  align-items: center;
  width: 100%;
  height: 1.15rem;
  background: none;
}

.offer-line-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2f6bff;
}

.offer-line-rule {
  flex: 1 1 auto;
  height: 1.5px;
  background: #c5d2e8;
}

.offer-plane {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  margin-inline: 0.08rem;
  color: #2f6bff;
}

.offer-plane.is-flight {
  transform: rotate(90deg);
}

[dir="rtl"] .offer-plane.is-flight {
  transform: rotate(-90deg);
}

.offer-trip > .ground-chip {
  grid-column: 1 / -1;
  justify-self: center;
}

.ground-chip {
  width: max-content;
  max-width: 100%;
  margin: 0.2rem 0 0;
  padding: 0.08rem 0.48rem;
  border-radius: 999px;
  background: #f4efe6;
  color: #6a4b24;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.leg-mode {
  flex: none;
  color: #6a4b24;
  font-weight: 750;
}

.offer-pay {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.35rem 0.9rem 0.85rem;
  border-top: 0;
  background: transparent;
}

.offer-fare-block {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.offer-fare-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  margin: 0;
  padding: 0.62rem 0.8rem;
  border: 1px solid rgba(16, 40, 90, 0.08);
  border-radius: 14px;
  background: #f5f8ff;
  color: #2f4ea8;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.offer-fare-toggle:hover,
.offer-fare-toggle:focus-visible {
  border-color: rgba(47, 107, 255, 0.35);
  outline: none;
}

.offer-fare-chevron {
  flex: none;
  width: 0.42rem;
  height: 0.42rem;
  margin-inline-end: 0.15rem;
  border-inline-end: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease;
}

.offer-fare-toggle.is-open .offer-fare-chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.offer-fare-sheet {
  display: grid;
  gap: 0.55rem;
  animation: rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.offer-fare-card {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.75rem 0.8rem 0.7rem;
  border: 1px solid rgba(16, 40, 90, 0.07);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(24, 52, 102, 0.04);
}

.offer-fare-card.is-chosen {
  border-color: rgba(47, 107, 255, 0.55);
  box-shadow: inset 0 0 0 1px #2f6bff, 0 8px 20px rgba(47, 107, 255, 0.06);
}

.offer-fare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.offer-fare-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.offer-fare-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.offer-fare-tag {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #eef3ff;
  color: #2f4ea8;
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1.3;
}

.offer-fare-tag.is-cheapest { background: #e7f6ee; color: #1b7a45; }
.offer-fare-tag.is-with_bags { background: #e7f1ff; color: #2457c5; }
.offer-fare-tag.is-refundable { background: #e7f6ee; color: #1b7a45; }
.offer-fare-tag.is-flexible { background: #f3eefe; color: #6b2fa0; }

.offer-fare-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.4rem;
}

.offer-fare-price {
  color: #12172a;
  font-family: var(--round);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.offer-fare-more {
  color: #7d89ab;
  font-size: 0.78rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.offer-fare-card .offer-fare-cabin {
  flex: none;
  margin-top: 0.15rem;
}

.offer-fare-card .offer-amenities {
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(16, 40, 90, 0.07);
}

.offer-fare-card .offer-amenity {
  flex: 1 1 7.4rem;
}

.offer-fare-note {
  margin: 0;
  color: #6d7c9e;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
}

.offer-fare-note.is-scarce { color: #b45309; }

.offer-fare-pick {
  appearance: none;
  justify-self: start;
  min-height: 2.35rem;
  margin: 0;
  padding: 0 1rem;
  border: 1px solid rgba(47, 107, 255, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #2f6bff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.offer-fare-pick:hover,
.offer-fare-pick:focus-visible {
  background: #f3f6ff;
  outline: none;
}

.offer-fare-pick.is-chosen {
  border-color: transparent;
  background: #eef3ff;
  color: #2f4ea8;
  cursor: default;
}

.offer-amenities {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.35rem 0.7rem;
}

.offer-amenity {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  padding: 0;
  background: none;
}

.offer-amenity-icon {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  color: #3a6dff;
}

.offer-amenity-copy {
  display: grid;
  min-width: 0;
  gap: 0.04rem;
}

.offer-amenity-label,
.offer-amenity-value,
.offer-amenity-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container offer-card (max-width: 28rem) {
  .offer-amenities { flex-wrap: wrap; }
  .offer-amenity { flex: 1 1 7.6rem; }
}

.offer-amenity-label {
  color: #1c2748;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.2;
}

.offer-amenity-value,
.offer-amenity-note {
  color: #6d7ca6;
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.25;
}

.offer-amenity.is-good .offer-amenity-icon {
  color: #1ea34a;
}

.offer-amenity.is-muted .offer-amenity-icon,
.offer-amenity.is-muted .offer-amenity-value {
  color: #9aa6c4;
}

.offer-pay-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.65rem;
  min-width: 0;
}

.offer-price {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.55rem;
  min-width: 0;
}

.offer-figure {
  flex: none;
  color: #12172a;
  font-family: var(--round);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.offer-unit {
  flex: 1 1 100%;
  color: #7d89ab;
  font-size: 0.66rem;
  font-weight: 600;
}

.offer-left {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  color: #e07a12;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.offer-flame {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  color: #f08a1a;
}

.offer-actions,
.offer-action-end {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
}

.offer-actions { margin-inline-start: auto; }

.offer-share {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(16, 40, 90, 0.1);
  border-radius: 999px;
  background: transparent;
  color: #5c6d96;
  cursor: pointer;
}

.offer-share-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}

.offer-share:hover,
.offer-share:focus-visible {
  background: #eef3ff;
  border-color: rgba(47, 107, 255, 0.38);
  color: #1d4ed8;
  outline: none;
}

.offer-share.is-copied {
  background: #eefbf3;
  border-color: rgba(22, 140, 78, 0.28);
  color: #168c4e;
}

.offer-share.is-failed {
  background: #fff4f4;
  border-color: rgba(196, 58, 74, 0.28);
  color: #b42334;
}

.offer-book {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  margin: 0;
  padding: 0.58rem 1.05rem;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, #3b78ff 0%, #2f62f6 46%, #5b4ef0 100%);
  box-shadow: 0 8px 16px rgba(47, 98, 246, 0.28);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.offer-book-arrow {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
}

[dir="rtl"] .offer-book-arrow {
  transform: scaleX(-1);
}

.offer-book:hover,
.offer-book:focus-visible {
  background: linear-gradient(100deg, #2f6bff 0%, #274fdf 46%, #4c3fe0 100%);
  outline: none;
}

.offer-list.is-retired .offer-fare-pick,
.offer-list.is-retired .offer-fare-toggle,
.offer-list.is-retired .offer-book,
.offer-list.is-retired .offer-share {
  pointer-events: none;
}
.offer-itinerary {
  display: grid;
  gap: 0.65rem;
  margin: 0 0.8rem 0.6rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(16, 40, 90, 0.05);
  border-radius: 14px;
  background: #f5f8ff;
  animation: rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.offer-leg-group {
  display: grid;
  gap: 0.4rem;
}

.offer-leg-group + .offer-leg-group {
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(16, 40, 90, 0.12);
}

.offer-itin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.6rem;
}

.offer-itin-head .offer-direction {
  grid-column: auto;
  flex: 1 1 100%;
  margin: 0;
}

.offer-itin-head .airline {
  min-width: 0;
}

.offer-itin-airline {
  color: #131c4e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.offer-itin-head .offer-cabin {
  margin-inline-start: auto;
  padding: 0.12rem 0.42rem;
  font-size: 0.6rem;
}

.offer-itin {
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding-inline-start: 1.05rem;
}

.offer-itin::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.26rem;
  top: 0.55rem;
  bottom: 0;
  width: 1.5px;
  background: rgba(47, 107, 255, 0.22);
}

.offer-itin-stop,
.offer-itin-flight,
.offer-itin-layover {
  position: relative;
  min-width: 0;
}

.offer-itin-stop::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.05rem;
  top: 0.32rem;
  width: 0.48rem;
  height: 0.48rem;
  margin-inline-start: 0.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px #2f6bff;
  z-index: 1;
}

.offer-itin-stop.is-end::after {
  content: "";
  position: absolute;
  inset-inline-start: -1.1rem;
  top: calc(0.32rem + 0.24rem);
  bottom: -0.2rem;
  width: 0.8rem;
  background: #f5f8ff;
  pointer-events: none;
  z-index: 0;
}

.offer-itin-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.4rem;
  min-width: 0;
}

.offer-itin-time {
  color: #131c4e;
  font-size: 0.88rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.offer-itin-when {
  color: #7d89ab;
  font-size: 0.68rem;
  font-weight: 600;
}

.offer-itin-place {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 100%;
  font-size: 0.76rem;
}

.offer-itin-where {
  display: grid;
  min-width: 0;
  gap: 0.04rem;
}

.offer-itin-city,
.offer-itin-airport {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.offer-itin-city {
  color: #1c2748;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.15;
}

.offer-itin-airport {
  color: #5a6a94;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.2;
}

.offer-itin-place .flag-slot {
  width: 14px;
  height: 10px;
  flex: none;
}

.offer-itin-flight {
  padding-block: 0.05rem;
}

.offer-itin-flight .offer-itin-body {
  gap: 0.2rem 0.45rem;
  padding: 0.05rem 0;
  color: #56638c;
  font-size: 0.72rem;
}

.offer-itin-flight .offer-flight {
  display: inline;
  width: auto;
  flex: none;
  padding: 0;
  color: #5a41d8;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.offer-leg-time {
  flex: none;
  color: #8b97b8;
  font-variant-numeric: tabular-nums;
}

.offer-itin-carrier,
.offer-itin-cabin {
  color: #56638c;
  font-weight: 600;
}

.offer-itin-flight .airline {
  color: inherit;
}

.offer-itin-layover {
  margin: 0.05rem 0;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: rgba(47, 107, 255, 0.07);
}

.offer-itin-layover::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.1rem;
  top: -0.2rem;
  bottom: -0.2rem;
  width: 0.8rem;
  background: #f5f8ff;
  pointer-events: none;
  z-index: 0;
}

.offer-itin-layover::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(-1.05rem + 0.26rem);
  top: -0.1rem;
  bottom: -0.1rem;
  width: 0;
  border-inline-start: 1.5px dashed rgba(47, 107, 255, 0.4);
  pointer-events: none;
  z-index: 1;
}

.offer-layover {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #2f6bff;
  font-size: 0.7rem;
  font-weight: 600;
}

.offer-airport-change {
  position: relative;
  z-index: 1;
  margin: 0.16rem 0 0;
  color: #c92f45;
  font-size: 0.7rem;
  font-weight: 650;
}

.cabin-row,
.money-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* What is owed, and the one move that settles it. */
.money-block {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  max-width: 27rem;
  padding: 1.05rem 1.15rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 14px 32px rgba(24, 52, 102, 0.1);
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.money-prompt {
  margin: 0;
  color: #22315c;
  font-size: 0.95rem;
  line-height: 1.5;
}

.lang-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
  max-width: 27rem;
}

.lang-row .chip {
  justify-content: center;
  text-align: center;
}

.chip.is-lang.is-active {
  border-color: rgba(47, 107, 255, 0.45);
  background: #eef4ff;
  color: #1a3fb8;
}

.chip.is-pay {
  border-color: transparent;
  background: linear-gradient(135deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(58, 74, 208, 0.3);
}

@media (hover: hover) {
  .chip.is-pay:hover {
    border-color: transparent;
    color: #fff;
    box-shadow: 0 20px 36px rgba(58, 74, 208, 0.38);
  }
}

.chip.is-pay:disabled,
.chip.is-pay.is-waiting {
  background: #d7deee;
  color: #8b97b8;
  box-shadow: none;
  cursor: default;
}

.chip.is-topup {
  border-color: rgba(47, 107, 255, 0.3);
  color: #2f6bff;
  text-decoration: none;
}

.order-recap {
  width: 100%;
  max-width: 27rem;
  padding: 1.2rem 1.25rem 1.15rem;
  border-radius: 24px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 52, 102, 0.1);
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transition: padding 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.order-recap-title {
  margin: 0 0 0.25rem;
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.order-recap-status {
  display: none;
  margin: 0.15rem 0 0;
  color: #2f6bff;
  font-size: 0.78rem;
  font-weight: 700;
}

.order-recap-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.46s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.order-recap-fold {
  min-height: 0;
  overflow: hidden;
}

.trip-sale > .sale-fold {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    margin 0.46s ease,
    padding 0.46s ease,
    border-color 0.46s ease;
}

.trip-sale.is-revising {
  gap: 0;
}

.trip-sale.is-revising .order-recap {
  animation: none;
  padding-top: 0.95rem;
  padding-bottom: 0.9rem;
}

.trip-sale.is-revising .order-recap-status {
  display: block;
}

.trip-sale.is-revising .order-recap-title::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.55rem;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(47, 107, 255, 0), #2f6bff 40%, #7a3bf0 60%, rgba(122, 59, 240, 0));
  background-size: 220% 100%;
  animation: order-shine 1.15s ease-in-out infinite;
}

.trip-sale.is-revising .order-recap-body {
  grid-template-rows: 0fr;
  opacity: 0;
}

.trip-sale.is-revising > .sale-fold {
  grid-template-rows: 0fr;
  margin: 0;
  padding: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
}

@keyframes order-shine {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .order-recap,
  .order-recap-body,
  .trip-sale > .sale-fold {
    transition: none;
  }

  .trip-sale.is-revising .order-recap-title::after {
    animation: none;
  }
}

.order-recap-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.4rem;
  margin: 0 0 0.85rem;
  color: #6b7ba6;
  font-size: 0.87rem;
}

.order-recap-meta .airline-name {
  color: #4a5a86;
  font-weight: 650;
}

.order-recap-dot {
  color: #b0bad4;
}

.order-recap-amount {
  display: grid;
  gap: 0.14rem;
  margin: 0 0 0.95rem;
  padding: 0.85rem 0.95rem 0.9rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #f6f9ff 0%, #eaf1ff 100%);
}

.order-recap-price-key {
  color: #8b97b8;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.order-recap-figure {
  color: #3b2fc4;
  font-family: var(--round);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.order-recap-unit {
  color: #7d89ab;
  font-size: 0.78rem;
  font-weight: 600;
}

.order-recap-check {
  color: #6b7ba6;
  font-size: 0.78rem;
}

.order-recap-check.is-up {
  color: #c92f45;
}

.order-recap-check.is-down {
  color: #1b7a45;
}

.order-recap-facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  margin: 0.9rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

.order-recap-fact {
  display: grid;
  gap: 0.14rem;
  min-width: 6rem;
}

.order-recap-fact-key {
  color: #8b97b8;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.order-recap-fact-value {
  display: grid;
  gap: 0.1rem;
  color: #22315c;
  font-size: 0.88rem;
}

.order-recap-fact.is-yes .order-recap-fact-value {
  color: #1b7a45;
}

.order-recap-fact.is-muted .order-recap-fact-value {
  color: #8b97b8;
  font-weight: 550;
}

.order-recap-fact-note {
  color: #7d89ab;
  font-size: 0.75rem;
}

.order-recap-trip + .order-recap-trip {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

.order-recap-direction {
  display: block;
  margin-bottom: 0.22rem;
  color: #8b97b8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-recap-route {
  margin: 0;
  color: #131c4e;
  font-size: 0.95rem;
  font-weight: 650;
}

.order-recap-detail,
.order-recap-flight {
  margin: 0.18rem 0 0;
  color: #6b7ba6;
  font-size: 0.82rem;
}

.order-recap-flight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.4rem;
}

.order-recap-people {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0.8rem 0 0;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

.order-recap-people-label {
  margin: 0 0 0.45rem;
  color: #8b97b8;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-recap-person {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0 0 0.5rem;
}

.order-recap-person:last-child {
  margin-bottom: 0;
}

.order-recap-name {
  color: #22315c;
  font-size: 0.92rem;
  font-weight: 650;
}

.order-recap-facts {
  color: #7d89ab;
  font-size: 0.8rem;
}

.order-recap-fare {
  margin: 0.95rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

.order-recap-fare-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.4rem;
}

.order-recap-fare-title {
  margin: 0;
  color: #2f6bff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.order-recap-fare-price {
  color: #131c4e;
  font-family: var(--round);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-recap-fare .order-recap-meta {
  margin: 0 0 0.65rem;
}

.order-recap-fare .order-recap-facts-row {
  margin-top: 0.7rem;
}

.order-recap-fare .order-recap-people {
  margin-top: 0.7rem;
}

.order-recap-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0.95rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

.order-recap-total-label {
  color: #131c4e;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-recap-total-amount {
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.visa-briefing {
  width: 100%;
  max-width: 27rem;
  padding: 1.15rem 1.25rem 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 52, 102, 0.1);
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.visa-briefing-title {
  margin: 0 0 0.35rem;
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.visa-briefing-lede {
  margin: 0 0 0.95rem;
  color: #56638c;
  font-size: 0.86rem;
  line-height: 1.55;
}

.visa-briefing-item {
  padding: 0.75rem 0 0.85rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

.visa-briefing-item:last-of-type {
  padding-bottom: 0.2rem;
}

.visa-briefing-heading {
  margin: 0 0 0.28rem;
  color: #131c4e;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.4;
}

.visa-briefing-who,
.visa-briefing-answer {
  margin: 0.15rem 0 0;
  color: #3d4a72;
  font-size: 0.86rem;
  line-height: 1.5;
}

.visa-briefing-who {
  color: #6b7ba6;
  font-weight: 600;
}

.visa-briefing-item.is-unconfirmed .visa-briefing-heading,
.visa-briefing-item.is-undocumented .visa-briefing-heading,
.visa-briefing-item.is-passport_lapsed .visa-briefing-heading {
  color: #8a4b16;
}

.visa-briefing-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.visa-briefing-source {
  margin: 0;
}

.visa-briefing-link {
  color: #2f6bff;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.visa-briefing-link:hover {
  text-decoration: underline;
}

.visa-briefing-disclaimer {
  margin: 0.9rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
  color: #8b97b8;
  font-size: 0.78rem;
  line-height: 1.45;
}

/* --- Travel document: the ask, the capture, the read-back --------------- */

.doc-card {
  width: 100%;
  max-width: 27rem;
  padding: 1.2rem 1.25rem 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 52, 102, 0.1);
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.doc-card-title {
  margin: 0 0 0.35rem;
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.doc-card-lede {
  margin: 0 0 1rem;
  color: #56638c;
  font-size: 0.88rem;
  line-height: 1.55;
}

.doc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* In the conversation the two ways in are pale blue keys, not dark buttons.
   The cabinet keeps its own, darker pair. */
#view-assistant .doc-action {
  border-color: rgba(47, 107, 255, 0.16);
  background: #f2f6ff;
  color: #22315c;
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
  font-weight: 650;
}

#view-assistant .doc-action .doc-icon { color: #2f6bff; }

@media (hover: hover) {
  #view-assistant .doc-action:hover:not(:disabled) {
    border-color: rgba(47, 107, 255, 0.4);
    background: #e8f0ff;
    color: #1a3fb8;
    transform: translateY(-1px);
  }
}

.doc-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 9.5rem;
  justify-content: center;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #1d212a, #16181f);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.doc-action:hover:not(:disabled) {
  border-color: rgba(62, 224, 200, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.doc-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.doc-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

.doc-card-hint,
.doc-card-note {
  margin: 0.85rem 0 0;
  font-size: 0.79rem;
  color: #8b97b8;
}

.doc-card-note { color: #c92f45; }

.doc-saved {
  width: 100%;
  max-width: 27rem;
  padding: 1.15rem 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(30, 138, 76, 0.18);
  background: linear-gradient(180deg, #f2fbf5 0%, #ffffff 42%);
  box-shadow: 0 16px 36px rgba(24, 52, 102, 0.09);
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.doc-saved-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.05rem;
  font-weight: 800;
}

/* The read-back is signed off: what was taken from the page is now on file. */
.doc-saved-title::before {
  content: "";
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #1e8a4c
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    no-repeat center / 0.8rem;
}

.doc-saved-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.36rem 0.9rem;
  margin: 0;
  font-size: 0.86rem;
}

.doc-saved-list dt {
  color: #7d89ab;
  white-space: nowrap;
}

.doc-saved-list dd {
  margin: 0;
  color: #22315c;
  font-weight: 600;
  text-align: end;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.doc-saved-note {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  color: #8b97b8;
}

/* Waiting for the client's own look: nothing is signed off yet. */
.doc-saved.is-checking {
  border-color: rgba(47, 107, 255, 0.2);
  background: linear-gradient(180deg, #f2f6ff 0%, #ffffff 42%);
}

.doc-saved.is-checking .doc-saved-title::before {
  background: #2f6bff
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E")
    no-repeat center / 0.8rem;
}

.doc-saved.is-checking .doc-saved-note {
  color: #22315c;
  font-size: 0.82rem;
}

.doc-saved-list dd.doc-saved-number {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: #131c4e;
}

.doc-saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.doc-saved-ok,
.doc-saved-fix {
  appearance: none;
  flex: 1 1 8rem;
  padding: 0.72rem 0.9rem;
  border-radius: 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.doc-saved-ok {
  border: 1px solid #1e8a4c;
  background: #1e8a4c;
  color: #fff;
}

.doc-saved-fix {
  border: 1px solid rgba(47, 107, 255, 0.22);
  background: #fff;
  color: #22315c;
}

.doc-saved-ok:disabled,
.doc-saved-fix:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (hover: hover) {
  .doc-saved-ok:hover:not(:disabled) { background: #187340; }
  .doc-saved-fix:hover:not(:disabled) { border-color: rgba(47, 107, 255, 0.45); }
}

.doc-saved-repair { margin-top: 0.8rem; }

.doc-saved-hint {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: #54608a;
}

/* The live camera, for a machine that has no camera app of its own. */

.doc-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(9, 22, 52, 0.68);
  backdrop-filter: blur(6px);
  animation: rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.doc-sheet-panel {
  width: min(100%, 40rem);
  padding: 0.9rem;
  border-radius: 26px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  color: #131c4e;
  box-shadow: 0 30px 70px rgba(8, 24, 60, 0.4);
}

.doc-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #06101f;
}

.doc-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* A passport data page is close to 125 × 88 mm; the guide is that shape, so
   holding the page inside it produces a frame the reader can use. */
.doc-guide {
  position: absolute;
  inset: 8% 6%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  aspect-ratio: 125 / 88;
  margin: auto;
  pointer-events: none;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.28);
}

.doc-sheet-hint {
  margin: 0.85rem 0 0.7rem;
  text-align: center;
  font-size: 0.83rem;
  color: #6b7ba6;
}

.doc-sheet-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
}

.doc-sheet-cancel {
  appearance: none;
  justify-self: start;
  padding: 0.55rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7ba6;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.doc-sheet-cancel:hover {
  background: #f2f6ff;
  color: #131c4e;
}

.doc-shutter {
  appearance: none;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 999px;
  border: 4px solid #fff;
  background: linear-gradient(135deg, #2f6bff 0%, #7a3bf0 100%);
  box-shadow: 0 12px 26px rgba(58, 74, 208, 0.35), 0 0 0 1px rgba(16, 40, 90, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.doc-shutter:hover:not(:disabled) {
  transform: scale(1.06);
  box-shadow: 0 16px 32px rgba(58, 74, 208, 0.42), 0 0 0 1px rgba(16, 40, 90, 0.08);
}

.doc-shutter:disabled {
  background: #d8e2f5;
  box-shadow: none;
  cursor: default;
}

/* The typing surface floats over the sky: the strip beneath it fades the
   conversation out rather than cutting it off with a rule. */
.composer {
  position: relative;
  z-index: 2;
  flex: none;
  width: 100%;
  padding: 0.5rem 1.25rem 1rem;
  background: linear-gradient(
    180deg,
    rgba(244, 251, 255, 0) 0%,
    rgba(244, 251, 255, 0.78) 44%,
    rgba(244, 251, 255, 0.97) 100%
  );
}

.composer-shell {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 0.4rem 0.4rem 0.4rem 0.4rem;
  border-radius: 26px;
  border: 1px solid rgba(16, 40, 90, 0.08);
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 52, 102, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer-shell:focus-within {
  border-color: rgba(47, 107, 255, 0.4);
  box-shadow: 0 16px 38px rgba(24, 52, 102, 0.16), 0 0 0 4px rgba(47, 107, 255, 0.12);
}

.composer.is-locked .composer-shell,
.composer.is-locked #composer-input,
.composer.is-locked .attach,
.composer.is-locked .send,
.composer.is-locked .dictate {
  cursor: pointer;
}

.composer.is-locked .attach,
.composer.is-locked:not(.is-armed) .dictate,
.composer.is-locked.is-armed .send { opacity: 0.45; }

.attach {
  width: 40px;
  height: 40px;
  flex: none;
  margin-bottom: 0.12rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5a6a94;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, opacity 0.2s ease;
}

.attach svg { width: 20px; height: 20px; }

@media (hover: hover) {
  .attach:hover:not(:disabled) {
    color: #2f6bff;
    background: rgba(47, 107, 255, 0.08);
  }
}

.attach:disabled { opacity: 0.45; }

.composer-thumb {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  margin-bottom: 0.12rem;
  border-radius: 12px;
  overflow: visible;
}

.composer-thumb img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(24, 52, 102, 0.16);
}

.composer-thumb-clear {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #131c4e;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(19, 28, 78, 0.28);
}

.composer-thumb-clear:hover { background: #2f6bff; }

.composer-thumb.is-file {
  width: auto;
  min-width: 2.8rem;
  padding: 0 0.55rem;
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.1);
  color: #1d3f9a;
  box-shadow: none;
}

.composer-file-kind {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#composer-input {
  flex: 1;
  resize: none;
  border: 0;
  background: transparent;
  outline: none;
  max-height: 8.5rem;
  padding: 0.6rem 0;
  color: #131c4e;
  caret-color: #2f6bff;
}

#composer-input::placeholder { color: #8b97b8; }

.composer-actions {
  --composer-in: -110%;
  --composer-out: 110%;
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  margin-bottom: 0.02rem;
  overflow: hidden;
  border-radius: 50%;
  filter: drop-shadow(0 10px 18px rgba(58, 74, 208, 0.3));
  transition: transform 0.18s ease, filter 0.18s ease;
}

html[dir="rtl"] .composer-actions {
  --composer-in: 110%;
  --composer-out: -110%;
}

.composer.is-locked .composer-actions,
.composer-actions:has(:disabled) {
  filter: none;
}

.send,
.dictate {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2f6bff 0%, #7a3bf0 100%);
}

.send {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  touch-action: manipulation;
  transform: translateX(var(--composer-in));
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
}

.composer.is-armed .send {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.send svg { width: 22px; height: 22px; }

html[dir="rtl"] .send svg { transform: scaleX(-1); }

.composer.is-armed .send:disabled { opacity: 0.45; }

.dictate {
  z-index: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transform: translateX(0);
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
}

.composer.is-armed .dictate {
  opacity: 0;
  pointer-events: none;
  transform: translateX(var(--composer-out));
}

.dictate svg { width: 20px; height: 20px; }

@media (hover: hover) {
  .composer:not(.is-armed) .composer-actions:has(.dictate:hover:not(:disabled):not(.is-recording)),
  .composer.is-armed .composer-actions:has(.send:hover:not(:disabled)) {
    transform: translateY(-1px) scale(1.05);
    filter: drop-shadow(0 14px 24px rgba(58, 74, 208, 0.38));
  }
}

.dictate:disabled { opacity: 0.45; }

.dictate.is-recording {
  background: linear-gradient(135deg, #e23b5a 0%, #c41e3a 100%);
}

.composer-actions:has(.dictate.is-recording) {
  filter: none;
  animation: dictate-pulse 1.2s ease-out infinite;
}

.dictate.is-hearing {
  opacity: 0.7;
}

.composer-shell.is-recording {
  border-color: rgba(226, 59, 90, 0.35);
  box-shadow: 0 16px 38px rgba(24, 52, 102, 0.16), 0 0 0 4px rgba(226, 59, 90, 0.1);
}

@keyframes dictate-pulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 59, 90, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(226, 59, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 59, 90, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .composer-actions,
  .send,
  .dictate {
    transition: none;
  }

  .send,
  .composer.is-armed .send,
  .dictate,
  .composer.is-armed .dictate {
    transform: none;
  }

  .composer-actions:has(.dictate.is-recording) {
    animation: none;
    box-shadow: 0 0 0 4px rgba(226, 59, 90, 0.28);
  }
}

/* Sofia at work: her own bubble, still empty, with her light on. */
.thinking {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1.05rem;
  border-radius: 22px;
  border-end-start-radius: 8px;
  background: #fff;
  color: #56638c;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(24, 52, 102, 0.1);
  animation: bubble-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.thinking::before {
  content: "";
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: url("/static/web/img/sofia-avatar.webp?v=1") center / cover no-repeat;
  box-shadow: 0 0 0 3px rgba(75, 61, 219, 0.09), 0 4px 10px rgba(58, 74, 208, 0.26);
  animation: avatar-breathe 1.6s ease-in-out infinite;
}

/* Nothing to say about this step: the pill shrinks to the light and the dots. */
.thinking.is-quiet {
  padding: 0.62rem 0.95rem;
}

.thinking-label:empty {
  display: none;
}

.thinking-bars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.thinking-bars span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f6bff, #7a3bf0);
  animation: think-dot 1.05s ease-in-out infinite;
}

.thinking-bars span:nth-child(2) { animation-delay: 0.14s; }
.thinking-bars span:nth-child(3) { animation-delay: 0.28s; }

@keyframes think-dot {
  0%, 100% { transform: translateY(0) scale(0.7); opacity: 0.4; }
  50% { transform: translateY(-4px) scale(1); opacity: 1; }
}

.panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 0 2rem;
}

.panel-head { margin-bottom: 1.4rem; }

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.stack { display: grid; gap: 0.75rem; }

.card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.card .contact-official {
  color: var(--faint);
  font-size: 0.86rem;
}

.card .contact-official + p { margin-top: 0.2rem; }

.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

.field-row {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  padding: 0.85rem 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(62, 224, 200, 0.5);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.btn-primary,
.btn-ghost {
  appearance: none;
  border-radius: 14px;
  padding: 0.95rem 1.15rem;
  border: 0;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #05241f;
  font-weight: 650;
}

.btn-ghost {
  width: 100%;
  margin-top: 0.6rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
}

.btn-primary:disabled,
.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-danger {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.15rem;
  background: var(--danger);
  color: #2a0a0e;
  font-weight: 650;
  cursor: pointer;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 107, 122, 0.1);
  color: #ffc2c8;
  font-size: 0.9rem;
}

.notice.is-ok {
  background: var(--accent-dim);
  color: var(--accent);
}

.wallet-form > .notice,
.account-card > .notice {
  margin: 0.75rem 0 0;
}

/* --- One door in: Google, Apple, email link ------------------------------- */

.auth-card {
  margin-top: 1.1rem;
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.auth-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.auth-lede {
  margin: 0.45rem 0 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-providers {
  display: grid;
  gap: 0.6rem;
}

.auth-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.auth-provider:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.auth-provider:active { transform: translateY(1px); }

.auth-provider:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.auth-provider-mark {
  width: 19px;
  height: 19px;
  flex: none;
  object-fit: contain;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.15rem 0 0;
  color: var(--faint);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-pane { margin-top: 1.2rem; }

.auth-sent {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
  padding: 0.35rem 0 0.15rem;
}

.auth-sent-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 550;
}

.auth-sent-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-back { margin-top: 0.8rem; }

.auth-consent {
  margin: 1.25rem 0 0;
  color: var(--faint);
}

#auth-code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.35em;
}

.auth-form {
  display: grid;
  gap: 1.05rem;
}

.auth-field { gap: 0.45rem; }

.auth-field > span {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
}

.field-hint,
.field-error,
.consent-copy {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

.field-hint { color: var(--faint); }

.field-hint.is-warn { color: var(--warm); }

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: #ffb3bb;
}

.field-error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 0.16rem;
  border-radius: 50%;
  background: var(--danger);
  color: #2a0910;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.auth-field.has-error input:not(.phone-number),
.auth-field.has-error .picker-trigger,
.phone-wrap.has-error .phone-shell {
  border-color: rgba(255, 107, 122, 0.6);
}

.auth-field.has-error input:not(.phone-number):focus,
.phone-wrap.has-error .phone-shell:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 107, 122, 0.14);
}

/* --- Phone with country picker ------------------------------------------ */

.phone-wrap { position: relative; }

.phone-field { position: relative; }

.phone-shell {
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  overflow: hidden;
}

.phone-shell:focus-within {
  border-color: rgba(62, 224, 200, 0.5);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.phone-country {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  padding: 0 0.7rem 0 0.85rem;
  border: 0;
  border-inline-end: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease;
}

.phone-country:hover,
.phone-field.is-open .phone-country { background: rgba(255, 255, 255, 0.04); }

.phone-country:focus-visible {
  outline: none;
  background: var(--accent-dim);
}

.flag-slot {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 14px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.flag {
  display: block;
  width: 20px;
  height: 14px;
}

.flag-fallback {
  display: grid;
  place-items: center;
  width: 20px;
  height: 14px;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Must stay layout-visible: display:none on the sprite breaks <use href>. */
.flag-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.phone-dial {
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.phone-chevron {
  width: 12px;
  height: 12px;
  color: var(--faint);
  transition: transform 0.2s ease;
}

.phone-field.is-open .phone-chevron { transform: rotate(180deg); }

.phone-country { border-radius: 0; }

.phone-number,
.phone-wrap .phone-number,
.field .phone-number {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.85rem 0.95rem;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--text);
}

.phone-number:focus,
.field .phone-number:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.phone-number::placeholder { color: var(--faint); }

.phone-menu {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 6px);
  z-index: 14;
  width: min(21rem, 100%);
  padding: 0.4rem;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  animation: rise 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.phone-search {
  width: 100%;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  padding: 0.55rem 0.7rem;
  font-size: 16px;
  color: var(--text);
}

.phone-search:focus {
  outline: none;
  border-color: rgba(62, 224, 200, 0.5);
}

.phone-list {
  max-height: min(19rem, 46vh);
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  overscroll-behavior: contain;
}

.phone-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
}

.phone-option:hover,
.phone-option.is-cursor { background: rgba(255, 255, 255, 0.05); }

.phone-option.is-active { background: var(--accent-dim); }

.phone-option-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.phone-option-dial {
  flex: none;
  color: var(--faint);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.phone-option.is-active .phone-option-dial { color: var(--accent); }

.phone-empty {
  padding: 0.85rem 0.6rem;
  color: var(--faint);
  font-size: 0.85rem;
  text-align: center;
}

/* --- Consent and small print -------------------------------------------- */

.consent-copy { color: var(--muted); }

.legal-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(62, 224, 200, 0.4);
}

.legal-link:hover { text-decoration-color: var(--accent); }

/* --- Terms and privacy: same daylight desk as cabinet / tickets ---------- */

#view-privacy,
#view-terms {
  padding: 0.7rem 0.9rem 1.6rem;
}

.legal-panel {
  max-width: 42rem;
  padding-bottom: 1.2rem;
}

#view-privacy .panel-head,
#view-terms .panel-head {
  margin-bottom: 1.15rem;
}

#view-privacy .eyebrow,
#view-terms .eyebrow {
  color: #2f6bff;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#view-privacy .panel-head h1,
#view-terms .panel-head h1 {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

#view-privacy .panel-head h1::after,
#view-terms .panel-head h1::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-inline-start: 0.22em;
  background: url("/static/web/home/sparkle.svg?v=2") no-repeat center / contain;
  vertical-align: 0.12em;
}

#view-privacy .panel-head .lede,
#view-terms .panel-head .lede {
  margin-top: 0.55rem;
  color: #3d5080;
  font-size: 0.98rem;
  font-weight: 550;
  line-height: 1.55;
}

.legal-body {
  padding: 1.35rem 1.3rem 1.5rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.1);
  color: #131c4e;
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-body p { margin: 0 0 0.9rem; }

.legal-lead {
  margin: 0 0 1.25rem;
  color: #3d5080;
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal-toc {
  margin: 0 0 1.6rem;
  padding: 0.95rem 1rem 1.05rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 18px;
  background: #f4f8ff;
}

.legal-toc-label {
  margin: 0 0 0.55rem;
  color: #2f6bff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 1;
}

.legal-toc li { margin: 0; }

.legal-toc a {
  display: block;
  padding: 0.28rem 0;
  color: #3d5080;
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
}

.legal-toc a:hover { color: #2f6bff; }

.legal-section {
  margin: 0 0 1.85rem;
  scroll-margin-top: calc(var(--topbar-h) + 1rem);
}

.legal-section:last-child { margin-bottom: 0; }

.legal-section > h2 {
  margin: 0 0 0.7rem;
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal-note {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #f4f8ff;
  color: #3d5080;
  font-size: 0.9rem;
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 0.95rem;
  padding: 0;
  padding-inline-start: 1.15rem;
}

.legal-body li { margin: 0 0 0.35rem; }

.legal-body li:last-child { margin-bottom: 0; }

.legal-dl { margin: 0 0 1.05rem; }

.legal-dl > div {
  margin: 0 0 0.85rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid rgba(16, 40, 90, 0.06);
}

.legal-dl > div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.legal-dl dt {
  margin: 0 0 0.28rem;
  color: #131c4e;
  font-size: 0.88rem;
  font-weight: 700;
}

.legal-dl dd {
  margin: 0;
  color: #3d5080;
}

.legal-address {
  margin: 0.85rem 0 1.1rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: #f4f8ff;
  color: #3d5080;
  font-style: normal;
  line-height: 1.65;
}

.legal-table-wrap {
  margin: 0 0 1.1rem;
  overflow-x: auto;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 16px;
}

.legal-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.55;
}

.legal-table th,
.legal-table td {
  padding: 0.7rem 0.85rem;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid rgba(16, 40, 90, 0.06);
}

.legal-table th {
  color: #2f6bff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #f4f8ff;
}

.legal-table td { color: #3d5080; }

.legal-table tr:last-child td { border-bottom: 0; }

.legal-table td:first-child,
.legal-table th:first-child {
  color: #131c4e;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.legal-ref {
  color: #2f6bff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(47, 107, 255, 0.35);
}

.legal-ref:hover { text-decoration-color: #2f6bff; }

@media (min-width: 720px) {
  .legal-toc ol { columns: 2; column-gap: 1.6rem; }
}

@media (max-width: 859px) {
  #view-privacy,
  #view-terms {
    padding-top: 0.55rem;
    padding-right: max(0.95rem, env(safe-area-inset-right, 0px));
    padding-bottom: 1.2rem;
    padding-left: max(0.95rem, env(safe-area-inset-left, 0px));
  }

  #view-privacy .panel-head h1,
  #view-terms .panel-head h1 {
    font-size: 1.7rem;
  }

  .legal-body {
    padding: 1.15rem 1.05rem 1.25rem;
  }
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.4rem 0 0;
  color: #7d89ab;
  font-size: 0.82rem;
}

.legal-footer a {
  color: #2f6bff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(47, 107, 255, 0.3);
}

.legal-footer a:hover { text-decoration-color: #2f6bff; }

.dock {
  position: relative;
  z-index: 5;
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  height: calc(var(--dock-h) + var(--safe-b));
  padding: 0 0.35rem var(--safe-b);
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 56px;
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dock-item svg { width: 22px; height: 22px; }

.dock-icon {
  display: block;
  width: 26px;
  height: 26px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(16, 34, 79, 0.14));
}

.dock-item.is-active { color: var(--accent); }

.dock-assistant {
  position: relative;
  top: 0;
  color: var(--muted);
  isolation: isolate;
}

.dock-assistant.is-active { color: var(--accent); }

.dock-assistant .sofia-avatar-dock {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(62, 224, 200, 0.16);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.34), 0 0 16px rgba(62, 224, 200, 0.07);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.dock-assistant.is-active .sofia-avatar-dock {
  border-color: rgba(62, 224, 200, 0.45);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.38), 0 0 18px rgba(62, 224, 200, 0.13);
}

@media (min-width: 900px) {
  [data-chrome="mobile"] { display: none; }
  .topbar { display: flex; }
  .stage {
    padding-top: 0;
    padding-bottom: 0;
  }
  .view { padding: 1.5rem 2rem 2rem; }
  #view-home,
  #view-assistant,
  #view-wallet,
  #view-login,
  #view-admin { padding: 0; }
  .chat-scroll { padding: 1rem 2rem 1.25rem; }
  .composer { padding: 0.5rem 2rem 1.25rem; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .auth-form { max-width: 30rem; }
  .auth-card { max-width: 30rem; }
}

@media (max-width: 899px) {
  [data-chrome="desktop"] { display: none; }
  .chat-scroll { padding: 0.6rem 1rem 1rem; }
  .composer { padding: 0.45rem 1rem 0.9rem; }
  .bubble { max-width: min(92%, 34rem); }
  .chat-cloud-c,
  .chat-cloud-d { display: none; }
  /* Home copy stays on the start edge — the same reading line as the desktop
     column. Centering the headline on a phone makes it float over the skyline
     and fights every language whose two-line break was measured from the left. */
  #view-home .welcome-title,
  #view-home .welcome-lead {
    text-align: start;
    margin-inline: 0;
  }

  #view-home .welcome-title {
    max-width: none;
    font-size: clamp(2.2rem, min(15vw, 88vw / var(--title-em)), 3.65rem);
  }

  #view-home .welcome-lead {
    max-width: 22rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: clamp(0.95rem, 3.6vw, 1.08rem);
  }

  /* The stage is the first view. Flex + min-height: 100% lets the scene take
     the leftover height; the CTA is taken out of that column and pinned to
     the same tokens as the dock, so it sits just above the bar on every
     phone — SE, Pro, landscape, Telegram inset. Features start under the
     stage and scroll behind the pin. */
  #view-home {
    --home-cta-stack: 4.55rem;
    container-type: size;
  }

  #view-home .home {
    min-height: 100cqh;
    padding: 1.55rem 0 0;
  }

  #view-home .welcome-title,
  #view-home .welcome-lead {
    margin-inline: 1rem;
  }

  /* The stage fills the view. No reserved strip under the scene: the skyline
     and Sofia continue into the CTA's slot, so the landmarks sit behind the
     button instead of stopping above it. */
  #view-home .home-stage {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 100cqh;
    box-sizing: border-box;
  }

  #view-home .home-copy {
    display: block;
    position: relative;
    z-index: 2;
  }

  /* Weather sits in the open sky around the headline — behind the letters,
     never stacked on itself. Three patches: one in the air after the first
     line, one peeking from the start edge, one beside the second line. */
  .home-copy-sky {
    display: block;
    position: absolute;
    inset: -1.35rem 0 auto;
    height: 10.5rem;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
  }

  .home-copy-cloud {
    position: absolute;
    display: block;
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  .home-copy-cloud-a {
    inset-inline-end: -6%;
    top: 6%;
    width: 56%;
    opacity: 0.95;
  }

  .home-copy-cloud-b {
    inset-inline-start: -22%;
    top: 18%;
    width: 42%;
    opacity: 0.78;
    transform: scaleX(-1);
  }

  .home-copy-cloud-c {
    inset-inline-end: -10%;
    top: 70%;
    width: 38%;
    opacity: 0.9;
  }

  #view-home .welcome-title,
  #view-home .welcome-lead {
    position: relative;
    z-index: 1;
  }

  .home-cta-row {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--dock-h) + var(--safe-b));
    z-index: 6;
    justify-content: stretch;
    margin: 0;
    padding: 0.5rem 1rem 0.4rem;
    background: linear-gradient(
      180deg,
      rgba(232, 245, 255, 0) 0%,
      rgba(232, 245, 255, 0.18) 42%,
      rgba(232, 245, 255, 0.4) 100%
    );
  }

  .home-cta-slot {
    justify-content: stretch;
    flex: 1 1 auto;
  }

  .home-cta { width: 100%; }

  .home-scene {
    position: relative;
    flex: 1 1 auto;
    min-height: 11rem;
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .home-features {
    margin-top: 0.35rem;
    padding-inline: 1rem;
    padding-bottom: calc(var(--home-cta-stack) + 0.35rem);
  }

  /* Same rule as the desktop window: the band is the width of the view,
     not a cropped zoom. The lower fade only dissolves the flat edge into
     the page as the reader scrolls past the first screen. */
  .home-world-band {
    inset-inline: auto;
    left: 50%;
    bottom: 0;
    width: 100vw;
    transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
  }

  /* The cast reads left-sky to centre. The plane flies in the open sky
     on the left, below the copy so a headline of any length never runs
     under it. The bubble speaks from the right at head height. Sofia
     stands on the cloud line; only that ground strip passes behind the CTA. */
  .home-plane { left: -2%; top: 9%; width: 38%; }
  .home-balloon { right: 5%; top: 30%; width: 14%; }
  .home-case { left: 4%; bottom: 3%; height: 22%; }
  .home-sofia { left: 20%; bottom: 0; height: 86%; }
  .home-sky-cloud-a { right: -8%; top: 22%; width: 42%; }
  .home-sky-cloud-b,
  .home-sky-cloud-c { display: none; }
  .home-speech {
    inset-inline-start: auto;
    inset-inline-end: 0.4rem;
    top: 2%;
    bottom: auto;
    z-index: 4;
    max-width: min(11.6rem, 47%);
    font-size: 0.76rem;
    padding: 0.7rem 0.85rem 0.74rem;
  }
  .welcome-sparkle { top: -0.3em; width: 0.66em; inset-inline-end: -0.78em; }
  #view-home .home-cta {
    font-size: 1.02rem;
    min-height: 3.25rem;
    box-shadow: 0 12px 24px rgba(48, 34, 160, 0.28);
  }
  .dock-assistant > span:last-child {
    margin-top: 0;
    font-weight: 650;
    letter-spacing: 0.08em;
  }
}

/* A short phone — landscape, or a small SE — still keeps the CTA on the dock
   line. The type and the scene shrink so the four-row first view still fits. */
@media (max-width: 899px) and (max-height: 700px) {
  #view-home .home { padding-top: 0.9rem; }
  #view-home .home-stage { gap: 0.3rem; }
  #view-home .home-scene { min-height: 8.5rem; }

  #view-home .welcome-title {
    font-size: clamp(2.25rem, min(12.2vw, 88vw / var(--title-em)), 3rem);
  }

  #view-home .welcome-lead {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .home-sofia { height: 84%; }
  .home-speech { font-size: 0.7rem; padding: 0.55rem 0.7rem 0.58rem; }
  #view-home .home-cta { min-height: 3rem; font-size: 0.98rem; }
}

@media (max-width: 899px) and (max-height: 520px) {
  #view-home .home-scene { min-height: 6.5rem; }

  #view-home .welcome-lead {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .home-balloon { display: none; }
  .home-copy-cloud-c { display: none; }
  .home-speech { max-width: min(10.5rem, 48%); }
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) {
  color-scheme: light;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active),
html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) body {
  background:
    radial-gradient(70% 42% at 78% 8%, rgba(255, 255, 255, 0.7), transparent 52%),
    linear-gradient(180deg, #c8e8ff 0%, #e7f5ff 46%, #f4fbff 100%);
  color: #10224f;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .topbar {
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  margin: 0.65rem 1rem 0;
  height: auto;
  min-height: calc(var(--topbar-h) - 8px);
  padding: 0.15rem 0 0.15rem 0.9rem;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .topbar-end {
  flex: 0 1 auto;
  margin-inline-start: auto;
  justify-content: flex-end;
  padding: 0.38rem 0.75rem;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 48, 96, 0.07);
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .mobar {
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
  height: auto;
  min-height: calc(var(--mobar-h) + var(--safe-t));
  padding: calc(var(--safe-t) + 0.2rem) 0.9rem 0.2rem;
  border-radius: 0;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .brand-logo,
html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .brand-sub {
  display: none;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .brand-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .topnav-link {
  color: #4b5d80;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .topnav-link:hover,
html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .topnav-link.is-active {
  color: #6d4cff;
  background: #f2edff;
  box-shadow: none;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .topnav-wallet-sum {
  color: #1a5cff;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .topnav-link.is-active .topnav-wallet-sum {
  color: #6d4cff;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-btn {
  border-color: rgba(26, 92, 255, 0.18);
  background: #f4f8ff;
  color: #10224f;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-btn:hover,
html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang.is-open .lang-btn {
  border-color: rgba(26, 92, 255, 0.32);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.1);
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-globe,
html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-code {
  color: #1a5cff;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-menu {
  border-color: rgba(16, 40, 90, 0.08);
  background: #fff;
  box-shadow: 0 16px 36px rgba(16, 40, 90, 0.12);
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-option {
  color: #10224f;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-option:hover,
html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-option:focus-visible {
  background: #eef4ff;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .lang-option.is-active {
  background: #e8eeff;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .dock {
  background: #fff;
  border-top: 1px solid rgba(16, 40, 90, 0.06);
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .dock-item {
  color: #7b889e;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .dock-item.is-active,
html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .dock-assistant.is-active {
  color: #1a5cff;
}

html:has(#view-home.is-active, #view-login.is-active, #view-assistant.is-active, #view-wallet.is-active, #view-cabinet.is-active, #view-contacts.is-active, #view-tickets.is-active, #view-privacy.is-active, #view-terms.is-active, #view-admin.is-active) .dock-assistant::before {
  border-color: rgba(26, 92, 255, 0.16);
  background: linear-gradient(145deg, #ffffff, #eef4ff);
  box-shadow: 0 7px 16px rgba(26, 70, 180, 0.12);
}

.brand-home {
  display: none;
}

.brand-home-mark {
  display: block;
  width: 2.05rem;
  height: 2.05rem;
}

.brand-home-word {
  display: block;
  width: 7.6rem;
  height: auto;
}

.brand-compact .brand-home-word { width: 6.4rem; }
.brand-compact .brand-home-mark { width: 1.8rem; height: 1.8rem; }

/* --- Account ------------------------------------------------------------- */

.account-card {
  padding: 1.2rem 1.2rem 1.3rem;
}

.account-card + .account-card,
.wallet-balance + .account-card {
  margin-top: 1rem;
}

.account-heading {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.account-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.account-card-lede {
  margin: 0.4rem 0 1.05rem;
  font-size: 0.9rem;
}

.account-badge {
  flex: none;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.account-row:first-of-type {
  margin-top: 0.35rem;
}

.account-row-copy {
  min-width: 0;
}

.account-row-label {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-row-value {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.btn-ghost.account-edit {
  width: auto;
  margin: 0;
  padding: 0.48rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text);
}

.account-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.95rem;
  padding-top: 0.15rem;
}

.account-row.is-open .account-form {
  padding-bottom: 0.2rem;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.account-actions .btn-primary,
.account-actions .btn-ghost,
.dialog-actions .btn-primary,
.dialog-actions .btn-ghost,
.dialog-actions .btn-danger {
  width: auto;
  margin: 0;
}

.account-warn {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: rgba(228, 196, 138, 0.1);
  color: var(--warm);
  font-size: 0.88rem;
  line-height: 1.45;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.account-grid input.is-masked {
  letter-spacing: 0.14em;
  color: var(--muted);
}

.account-danger .account-danger-btn {
  color: #ffb3bb;
  border-color: rgba(255, 107, 122, 0.28);
}

.account-danger .btn-ghost {
  margin-top: 0.65rem;
}

.account-legal {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.account-legal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-legal-item:hover,
.account-legal-item:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.account-legal-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.account-legal-name {
  font-family: var(--round, inherit);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.25;
}

.account-legal-hint {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.account-legal-item::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-inline-end: 0.15rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  opacity: 0.38;
  transform: rotate(-45deg);
}

html[dir="rtl"] .account-legal-item::after {
  transform: rotate(135deg);
}

.account-android-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
}

.account-android-copy {
  flex: 1 1 14rem;
  min-width: 0;
}

.account-android-lede {
  margin: 0.35rem 0 0;
}

.account-play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  max-width: 100%;
  padding: 0.4rem 1.05rem 0.4rem 0.8rem;
  border: 1px solid #8a8f9c;
  border-radius: 0.7rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(10, 20, 50, 0.16);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.account-play:hover,
.account-play:focus-visible {
  background: #1a1d24;
  box-shadow: 0 10px 22px rgba(10, 20, 50, 0.22);
}

.account-play:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 3px;
}

.account-play:active {
  transform: scale(0.98);
}

.account-play-mark {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
}

.account-play-words {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1;
  text-align: start;
}

.account-play-eyebrow {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-play-name {
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.account-session {
  margin: 0.9rem 0 0;
}

.account-session .btn-ghost {
  margin-top: 0;
}

/* Confirmations mount on body. They follow the daylight chrome, not the
   leftover dark tokens — otherwise a navy title lands on a charcoal card. */
.dialog-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 1rem;
  padding-bottom: calc(var(--dock-h) + var(--safe-b) + 0.75rem);
  background: rgba(16, 34, 79, 0.32);
  backdrop-filter: blur(8px);
}

.dialog {
  width: min(26rem, 100%);
  margin-bottom: 8vh;
  padding: 1.3rem 1.2rem 1.15rem;
  border-radius: 22px;
  border: 1px solid rgba(16, 40, 90, 0.08);
  background: #fff;
  color: #131c4e;
  box-shadow: 0 24px 60px rgba(18, 48, 96, 0.2);
}

.dialog.is-danger {
  border-color: rgba(201, 47, 69, 0.22);
}

.dialog-title {
  margin: 0 0 0.45rem;
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.dialog-body {
  margin: 0 0 1.1rem;
  color: #56638c;
  font-size: 0.95rem;
  line-height: 1.5;
}

.dialog-body:has(+ .dialog-confirm-field) {
  margin-bottom: 0.7rem;
}

.dialog-list {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding-left: 1.1rem;
  color: #56638c;
  font-size: 0.95rem;
  line-height: 1.5;
}

.dialog-confirm-field {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
}

.dialog-confirm-prompt {
  margin: 0;
  color: #131c4e;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.dialog-confirm-word {
  display: inline;
  margin: 0 0.05em;
  padding: 0.12em 0.42em;
  border: 0;
  border-radius: 0.4em;
  background: rgba(19, 28, 78, 0.08);
  color: #131c4e;
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
  font-weight: 700;
  letter-spacing: inherit;
  text-transform: none;
  box-shadow: none;
}

.dialog-confirm-field input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(16, 40, 90, 0.16);
  background: #fff;
  padding: 0.85rem 0.95rem;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: #131c4e;
}

.dialog-confirm-field input:focus {
  outline: none;
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

.dialog .btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(16, 40, 90, 0.14);
  background: #fff;
  color: #44548a;
  font-weight: 650;
}

.dialog .btn-primary {
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(58, 74, 208, 0.28);
}

.dialog .btn-danger {
  border-radius: 999px;
  background: linear-gradient(90deg, #e0445c 0%, #c92f45 100%);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(201, 47, 69, 0.28);
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

@media (min-width: 720px) {
  .dialog-root {
    place-items: center;
  }

  .dialog {
    margin-bottom: 0;
  }
}

html.is-consent-open,
html.is-consent-legal {
  overflow: hidden;
}

html.is-consent-open .topbar,
html.is-consent-open .mobar,
html.is-consent-open .dock,
html.is-consent-legal .topbar,
html.is-consent-legal .mobar,
html.is-consent-legal .dock {
  z-index: 70;
  pointer-events: auto;
}

.consent-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  padding-bottom: calc(var(--safe-b, 0px) + 1.25rem);
}

.consent-root[hidden] {
  display: none;
}

.consent-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(127, 176, 255, 0.28), transparent 55%),
    rgba(16, 34, 79, 0.42);
  backdrop-filter: blur(14px);
}

.consent-dialog {
  position: relative;
  width: min(26.5rem, 100%);
  padding: 1.85rem 1.45rem 1.4rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #fff 42%),
    #fff;
  color: #131c4e;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 28px 70px rgba(18, 48, 96, 0.28);
  text-align: center;
}

.consent-avatar {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.95rem;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.1), 0 10px 22px rgba(58, 42, 130, 0.2);
}

.consent-title {
  margin: 0 0 0.55rem;
  color: #131c4e;
  font-family: var(--round);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.consent-lede {
  margin: 0 0 1.35rem;
  color: #56638c;
  font-size: 1rem;
  line-height: 1.55;
}

.consent-lede .legal-link {
  color: #2f6bff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.consent-error {
  margin: -0.55rem 0 1rem;
  color: #c92f45;
  font-size: 0.92rem;
  line-height: 1.4;
}

.consent-actions {
  display: grid;
  gap: 0.55rem;
}

.consent-accept {
  width: 100%;
  min-height: 3.15rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(58, 74, 208, 0.28);
}

.consent-accept:disabled {
  opacity: 0.65;
}

.consent-decline {
  appearance: none;
  width: 100%;
  min-height: 2.7rem;
  margin: 0;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #56638c;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}

.consent-decline:hover,
.consent-decline:focus-visible {
  color: #131c4e;
}

.consent-legal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--dock-h) + var(--safe-b));
  z-index: 60;
  display: flex;
  align-items: center;
  min-height: var(--consent-legal-h);
  padding: 0.45rem 0.9rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #131c4e;
  box-shadow: 0 -8px 22px rgba(18, 48, 96, 0.08);
  backdrop-filter: blur(12px);
}

.consent-legal[hidden] {
  display: none;
}

.consent-legal-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(26.5rem, 100%);
  margin-inline: auto;
}

.consent-legal-no {
  appearance: none;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #56638c;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.consent-legal-no:hover,
.consent-legal-no:focus-visible {
  color: #131c4e;
}

.consent-legal-yes {
  appearance: none;
  flex: 1 1 auto;
  min-height: 2.45rem;
  margin: 0;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(58, 74, 208, 0.22);
}

.consent-legal-yes:disabled {
  opacity: 0.65;
}

html.is-consent-legal #view-privacy,
html.is-consent-legal #view-terms {
  padding-bottom: calc(var(--consent-legal-h) + 1rem);
}

@media (min-width: 900px) {
  .consent-legal {
    bottom: 0;
  }
}

html[dir="rtl"] .consent-dialog {
  text-align: center;
}

@media (max-width: 719px) {
  .consent-root {
    place-items: end center;
    padding: 0 0.7rem;
    padding-bottom: calc(var(--dock-h, 4.5rem) + 0.5rem);
  }

  .consent-veil {
    background:
      radial-gradient(120% 80% at 50% 0%, rgba(200, 232, 255, 0.35), transparent 55%),
      rgba(16, 34, 79, 0.22);
  }

  .consent-dialog {
    width: 100%;
    margin-bottom: 0;
    padding: 1.55rem 1.2rem 1.15rem;
    border-radius: 24px 24px 20px 20px;
  }

  .consent-title {
    font-size: 1.35rem;
  }

  .consent-lede {
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
  }
}

@media (min-width: 721px) {
  .account-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.docs-list {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.95rem;
}

.docs-empty {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 0.92rem;
}

.docs-item {
  padding: 0.85rem 0.95rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
}

.docs-item.is-open {
  border-color: rgba(62, 224, 200, 0.28);
}

.docs-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.docs-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--accent-dim);
}

.docs-mark .flag-slot {
  width: 1.35rem;
  height: 1rem;
}

.docs-mark-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}

.docs-copy {
  min-width: 0;
}

.docs-label {
  margin: 0 0 0.15rem;
  color: var(--text);
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.docs-meta,
.docs-primary {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.docs-primary {
  margin-top: 0.2rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.docs-unchecked {
  margin: 0.2rem 0 0;
  color: #b4690e;
  font-size: 0.74rem;
  font-weight: 600;
}

.docs-check-hint {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #fff6e8;
  color: #6b4508;
  font-size: 0.82rem;
}

.docs-label-field {
  grid-column: 1 / -1;
}

.docs-editor {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.docs-upload {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(62, 224, 200, 0.05);
}

.docs-upload-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.docs-upload-hint,
.docs-upload-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.docs-upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0.75rem 0 0.45rem;
}

.docs-upload-note {
  margin-top: 0.35rem;
}

.docs-upload-note.is-error {
  color: var(--danger);
}

.docs-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.docs-actions .btn-primary,
.docs-actions .btn-ghost {
  width: auto;
  margin: 0;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
}

.docs-actions .docs-choose-primary,
.docs-actions .docs-remove {
  grid-column: 1 / -1;
}

.docs-actions .docs-remove {
  color: #ffb3bb;
  border-color: rgba(255, 107, 122, 0.28);
}

.docs-add {
  width: 100%;
  margin: 0;
}

@media (max-width: 720px) {
  .docs-upload-actions {
    grid-template-columns: 1fr;
  }
}

/* --- Balance -------------------------------------------------------------- */

/* Layout shell: daylight sky, desk art on the flanks, form in the middle. */
#view-wallet {
  position: relative;
  overflow-x: hidden;
  padding: 0.7rem 0.9rem 1.6rem;
}

.wallet {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: min(100%, 74rem);
  margin-inline: auto;
  align-content: start;
}

.wallet-cloud {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.wallet-cloud-a {
  top: 0.4%;
  inset-inline-end: -4%;
  width: clamp(10rem, 18vw, 17rem);
  opacity: 0.72;
}

.wallet-cloud-b {
  top: 16%;
  inset-inline-end: 16%;
  width: clamp(6.5rem, 12vw, 11rem);
  opacity: 0.5;
}

.wallet-cloud-c {
  top: 3%;
  inset-inline-start: -3%;
  width: clamp(9rem, 16vw, 15rem);
  opacity: 0.68;
}

.wallet-cloud-d {
  top: 26%;
  inset-inline-start: 7%;
  width: clamp(6rem, 10vw, 9.5rem);
  opacity: 0.44;
}

.wallet-cloud-e {
  bottom: 10%;
  inset-inline-start: -5%;
  width: clamp(8rem, 14vw, 13rem);
  opacity: 0.52;
}

.wallet-cloud-f {
  bottom: 16%;
  inset-inline-end: -4%;
  width: clamp(7.5rem, 13vw, 12rem);
  opacity: 0.46;
}

.wallet-hero {
  display: none;
  pointer-events: none;
  user-select: none;
}

.wallet-main {
  position: relative;
  z-index: 2;
  min-width: 0;
}

#view-wallet .wallet-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 0 0.5rem;
}

#view-wallet .panel-head {
  margin-bottom: 1.15rem;
}

#view-wallet .eyebrow {
  color: #2f6bff;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#view-wallet .panel-head h1 {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

#view-wallet .panel-head h1::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-inline-start: 0.22em;
  background: url("/static/web/home/sparkle.svg?v=2") no-repeat center / contain;
  vertical-align: 0.12em;
}

#view-wallet .panel-head .lede {
  margin-top: 0.55rem;
  color: #3d5080;
  font-size: 0.98rem;
  font-weight: 550;
  line-height: 1.55;
}

#view-wallet .empty {
  color: #3d5080;
  font-weight: 600;
}

#view-wallet .card,
#view-wallet .wallet-suggest,
#view-wallet .wallet-balance,
#view-wallet .wallet-topup,
#view-wallet .wallet-pending,
#view-wallet .wallet-history,
#view-wallet .wallet-signin {
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.1);
  color: #131c4e;
}

#view-wallet .wallet-suggest {
  margin: 0 0 0.9rem;
  padding: 0.95rem 1.15rem;
  background: linear-gradient(135deg, #eef4ff 0%, #f6f9ff 100%);
  border-color: rgba(47, 107, 255, 0.16);
  box-shadow: 0 12px 28px rgba(26, 70, 180, 0.08);
}

#view-wallet .wallet-suggest-copy {
  margin: 0;
  color: #1a2a55;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 600;
}

#view-wallet .wallet-balance,
#view-wallet .wallet-topup,
#view-wallet .wallet-pending,
#view-wallet .wallet-history,
#view-wallet .wallet-signin {
  padding: 1.35rem 1.3rem 1.35rem;
}

#view-wallet .wallet-balance + .account-card,
#view-wallet .account-card + .account-card {
  margin-top: 0.9rem;
}

#view-wallet .wallet-balance-label,
#view-wallet .account-row-label,
#view-wallet .card .wallet-fact-label,
#view-wallet .card .wallet-credit-label {
  color: #2a3f74;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#view-wallet .wallet-amount {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.55rem 0 0;
}

#view-wallet .wallet-amount-value {
  color: #131c4e;
  font-family: var(--round);
  font-size: clamp(2.35rem, 7vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#view-wallet .wallet-amount-currency {
  color: #2f6bff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#view-wallet .wallet-balance-note,
#view-wallet .account-card-lede,
#view-wallet .lede,
#view-wallet .card p {
  color: #3d5080;
  font-weight: 550;
}

#view-wallet .wallet-balance-note {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

#view-wallet .account-heading {
  margin: 0;
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

#view-wallet .account-card-lede {
  margin: 0.4rem 0 1.05rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

#view-wallet .account-warn {
  margin-top: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: rgba(201, 47, 69, 0.08);
  color: #b32741;
  font-size: 0.88rem;
}

#view-wallet .wallet-balance .account-warn,
#view-wallet .wallet-pending .account-warn {
  margin-top: 0.85rem;
}

#view-wallet .account-badge {
  background: #eef4ff;
  color: #2f6bff;
  font-weight: 700;
}

#view-wallet .account-badge.is-checking {
  animation: wallet-badge-pulse 1.8s ease-in-out infinite;
}

#view-wallet .account-row,
#view-wallet .account-row-static,
#view-wallet .wallet-entry {
  border-top-color: rgba(16, 40, 90, 0.08);
}

#view-wallet .account-row-value {
  color: #131c4e;
}

#view-wallet .wallet-form {
  gap: 1.15rem;
}

#view-wallet .field,
#view-wallet .wallet-rail-field,
#view-wallet .auth-field > span {
  color: #2a3f74;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#view-wallet .field-hint {
  color: #3d5080;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
}

#view-wallet .field-hint.is-warn {
  color: #9a6b1c;
}

#view-wallet .field-error {
  color: #b32741;
  font-weight: 650;
}

#view-wallet .wallet-amount-box {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  min-height: 3.35rem;
  padding: 0 1rem;
  border-radius: 16px;
  border: 1.5px solid rgba(16, 40, 90, 0.16);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#view-wallet .wallet-amount-box:focus-within {
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

#view-wallet .wallet-amount-prefix {
  color: #2f4a7c;
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

#view-wallet .field.wallet-amount-field input,
#view-wallet .wallet-amount-field input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  background: transparent;
  padding: 0.8rem 0;
  border-radius: 0;
  color: #0f1b45;
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#view-wallet .field.wallet-amount-field input:focus,
#view-wallet .wallet-amount-field input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

#view-wallet .auth-field.wallet-amount-field.has-error input:not(.phone-number),
#view-wallet .auth-field.wallet-amount-field.has-error input:not(.phone-number):focus {
  border-color: transparent;
  box-shadow: none;
}

#view-wallet .wallet-amount-field.has-error .wallet-amount-box {
  border-color: rgba(201, 47, 69, 0.55);
  background: rgba(201, 47, 69, 0.05);
  box-shadow: 0 0 0 4px rgba(201, 47, 69, 0.1);
}

#view-wallet .wallet-amount-field.has-error .wallet-amount-box:focus-within {
  border-color: #c92f45;
  box-shadow: 0 0 0 4px rgba(201, 47, 69, 0.14);
}

#view-wallet .wallet-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  padding: 0.35rem;
  border-radius: 18px;
  background: #eef3ff;
  border: 1px solid rgba(16, 40, 90, 0.06);
}

#view-wallet .wallet-methods:has(:nth-child(2)) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#view-wallet .wallet-method {
  appearance: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
  min-height: 3.35rem;
  padding: 0.7rem 0.95rem;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #5b6a92;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

#view-wallet .wallet-method:hover {
  color: #131c4e;
  background: rgba(255, 255, 255, 0.72);
}

#view-wallet .wallet-method.is-active {
  color: #131c4e;
  background: #fff;
  border-color: rgba(47, 107, 255, 0.28);
  box-shadow: 0 10px 22px rgba(26, 70, 180, 0.12);
}

#view-wallet .wallet-method:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 2px;
}

#view-wallet .wallet-method-label {
  min-width: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

#view-wallet .wallet-method.is-active .wallet-method-label {
  color: #2f6bff;
}

#view-wallet .wallet-method-fee {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex: none;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 40, 90, 0.06);
  white-space: nowrap;
}

#view-wallet .wallet-method.is-active .wallet-method-fee {
  background: #e8eeff;
}

#view-wallet .wallet-method-pct {
  color: #56638c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-wallet .wallet-method.is-active .wallet-method-pct {
  color: #2f6bff;
}

#view-wallet .wallet-method-fee-tag {
  color: #8b97b8;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

#view-wallet .wallet-totals {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 40, 90, 0.08);
  background: #f6f9ff;
}

#view-wallet .wallet-totals-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: #131c4e;
}

#view-wallet .wallet-totals-label {
  color: #3d5080;
  font-weight: 600;
}

#view-wallet .wallet-totals-value {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

#view-wallet .wallet-totals-charge {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(16, 40, 90, 0.1);
  font-weight: 700;
}

#view-wallet .wallet-totals-credit .wallet-totals-value {
  color: #1e8a4c;
}

#view-wallet .wallet-fee-note {
  margin: 0.2rem 0 0;
  color: #3d5080;
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.4;
}

#view-wallet .wallet-card-pay {
  display: grid;
  gap: 0.85rem;
}

#view-wallet .wallet-card-express {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
}

#view-wallet .wallet-card-express.is-waiting { visibility: hidden; }
#view-wallet .wallet-card-express.is-empty { display: none; }

#view-wallet .wallet-card-wallets {
  min-width: 0;
  min-height: 44px;
  width: 100%;
}

#view-wallet .wallet-card-wallets > iframe {
  display: block;
  width: 100%;
}

#view-wallet .wallet-wallets-more {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.1rem 0 0;
  border: 0;
  background: none;
  color: #7d89ab;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.3;
  cursor: pointer;
}

#view-wallet .wallet-wallets-more::after {
  content: "";
  width: 0.32rem;
  height: 0.32rem;
  margin-top: -0.18rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

#view-wallet .wallet-wallets-more:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 3px;
  border-radius: 4px;
}

#view-wallet .wallet-card-element {
  min-height: 12.5rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 40, 90, 0.12);
  background: #f8fbff;
}

#view-wallet .wallet-card-element.is-ready {
  min-height: 0;
}

#view-wallet .wallet-secured {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.5rem;
  margin: 0.25rem 0 0;
  color: #3d5080;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}

#view-wallet .wallet-stripe-link {
  display: inline-flex;
  align-items: center;
  color: #635bff;
  text-decoration: none;
  border-radius: 4px;
  outline: none;
}

#view-wallet .wallet-stripe-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.35);
}

#view-wallet .wallet-stripe-mark {
  display: block;
  width: 48px;
  height: 20px;
}

#view-wallet .wallet-entry-fee {
  margin: 0.15rem 0 0;
  color: #3d5080;
  font-size: 0.82rem;
  font-weight: 550;
}

#view-wallet .wallet-coin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  background: #eef2ff;
  box-shadow: 0 0 0 1px rgba(16, 40, 90, 0.08);
}

#view-wallet .wallet-rail-groups {
  display: grid;
  gap: 0.65rem;
}

#view-wallet .wallet-rail-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
}

#view-wallet .wallet-rail-field {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
}

#view-wallet .wallet-rail-field .picker-trigger {
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1.5px solid rgba(16, 40, 90, 0.16);
  background: #fff;
  color: #3d5080;
  font-weight: 650;
}

#view-wallet .picker.has-value .picker-trigger {
  color: #0f1b45;
}

#view-wallet .wallet-rail-field .picker-trigger:focus-visible,
#view-wallet .picker.is-open .picker-trigger {
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

#view-wallet .picker-trigger-copy {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
}

#view-wallet .wallet-rail-field .wallet-coin {
  width: 22px;
  height: 22px;
}

#view-wallet .picker-chevron {
  color: #44548a;
}

#view-wallet .wallet-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #131c4e;
}

#view-wallet .wallet-pending {
  display: grid;
  gap: 1.15rem;
}

#view-wallet .wallet-pending-head,
#view-wallet .account-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#view-wallet .wallet-pending-lede {
  margin: 0;
  color: #3d5080;
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.55;
}

#view-wallet .wallet-facts {
  display: grid;
  gap: 0.75rem;
}

#view-wallet .wallet-fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem 1rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 40, 90, 0.08);
  background: #f6f9ff;
}

#view-wallet .wallet-fact.is-amount .wallet-fact-value {
  font-family: var(--round);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#view-wallet .wallet-fact-copy {
  min-width: 0;
}

#view-wallet .card .wallet-fact-label {
  margin: 0 0 0.35rem;
}

#view-wallet .card .wallet-fact-value {
  margin: 0;
  color: #131c4e;
  font-size: 1.02rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

#view-wallet .wallet-fact-copy-btn,
#view-wallet .btn-ghost.account-edit {
  width: auto;
  margin: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 40, 90, 0.14);
  background: #fff;
  color: #2f4a7c;
  font-size: 0.84rem;
  font-weight: 650;
}

#view-wallet .wallet-qr {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0 0.1rem;
}

#view-wallet .wallet-qr-img {
  width: 200px;
  height: 200px;
  padding: 0.85rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 48, 96, 0.1);
}

#view-wallet .wallet-qr-note {
  margin: 0;
  color: #3d5080;
  font-size: 0.86rem;
  font-weight: 550;
  text-align: center;
  line-height: 1.45;
}

#view-wallet .wallet-credit {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(30, 138, 76, 0.16);
  background: #eefaf2;
  text-align: center;
}

#view-wallet .card .wallet-credit-label { margin: 0; }

#view-wallet .card .wallet-credit-value {
  margin: 0;
  color: #1e8a4c;
  font-family: var(--round);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

#view-wallet .wallet-rate-note,
#view-wallet .wallet-credited-note {
  margin: 0;
  color: #3d5080;
  font-size: 0.88rem;
  font-weight: 550;
  text-align: center;
}

#view-wallet .card .wallet-credited-note {
  color: #1e8a4c;
  font-weight: 650;
}

#view-wallet .card .wallet-check-title,
#view-wallet .card .wallet-miss-title {
  color: #131c4e;
}

#view-wallet .wallet-clock {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: #eef4ff;
  color: #2f6bff;
  font-size: 0.88rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#view-wallet .wallet-clock.is-stale {
  background: #fff6de;
  color: #9a6b1c;
}

#view-wallet .wallet-pending-actions {
  display: grid;
  gap: 0.75rem;
}

#view-wallet .wallet-pending-actions .btn-primary,
#view-wallet .wallet-pending-actions .btn-ghost {
  width: 100%;
  margin: 0;
}

#view-wallet .wallet-pending-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

#view-wallet .wallet-check {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 1.2rem 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(47, 107, 255, 0.18);
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(47, 107, 255, 0.1), transparent 70%),
    #f6f9ff;
  text-align: center;
}

#view-wallet .wallet-check-orbit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  height: 1.4rem;
}

#view-wallet .wallet-check-orbit span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #2f6bff;
  animation: wallet-orbit 1.15s ease-in-out infinite;
}

#view-wallet .wallet-check-orbit span:nth-child(2) { animation-delay: 0.15s; }
#view-wallet .wallet-check-orbit span:nth-child(3) { animation-delay: 0.3s; }

#view-wallet .wallet-check-title {
  margin: 0.15rem 0 0;
  color: #131c4e;
  font-size: 1rem;
  font-weight: 700;
}

#view-wallet .wallet-check-lede {
  margin: 0;
  color: #3d5080;
  font-size: 0.88rem;
  font-weight: 550;
  line-height: 1.45;
  max-width: 22rem;
}

#view-wallet .wallet-miss {
  display: grid;
  gap: 0.45rem;
  padding: 1.05rem 1.05rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(201, 47, 69, 0.22);
  background: rgba(201, 47, 69, 0.06);
}

#view-wallet .wallet-miss-title {
  margin: 0;
  color: #131c4e;
  font-size: 0.98rem;
  font-weight: 700;
}

#view-wallet .wallet-miss-copy {
  margin: 0;
  color: #3d5080;
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.5;
}

#view-wallet .wallet-miss-link {
  color: #2f6bff;
  text-decoration: none;
  font-weight: 700;
}

#view-wallet .wallet-miss-link:hover {
  text-decoration: underline;
}

@keyframes wallet-orbit {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.35; }
  35% { transform: translateY(-4px); opacity: 1; }
}

@keyframes wallet-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}

@media (prefers-reduced-motion: reduce) {
  #view-wallet .wallet-check-orbit span,
  #view-wallet .account-badge.is-checking,
  #view-wallet .wallet-hero-art {
    animation: none;
  }
}

#view-wallet .wallet-entry .account-row-value {
  font-size: 0.95rem;
}

#view-wallet .wallet-entry-in,
#view-wallet .wallet-entry-out {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#view-wallet .wallet-entry-in { color: #1e8a4c; }
#view-wallet .wallet-entry-out { color: #131c4e; }

#view-wallet .wallet-entry.is-attempt .wallet-entry-out,
#view-wallet .wallet-entry.is-awaiting .wallet-entry-out,
#view-wallet .wallet-entry.is-unconfirmed .wallet-entry-out,
#view-wallet .wallet-entry.is-missed .wallet-entry-out,
#view-wallet .wallet-entry.is-held .wallet-entry-out {
  color: #4b5d80;
  font-weight: 600;
}

#view-wallet .wallet-entry.is-missed,
#view-wallet .wallet-entry.is-unconfirmed,
#view-wallet .wallet-entry.is-held {
  align-items: start;
}

#view-wallet .wallet-entry-status {
  margin: 0.2rem 0 0;
  color: #4b5d80;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

#view-wallet .wallet-entry-status.is-awaiting {
  color: #3d5080;
}

#view-wallet .wallet-entry-status.is-unconfirmed,
#view-wallet .wallet-entry-status.is-held {
  color: #9a6b1c;
}

#view-wallet .wallet-entry-status.is-missed {
  color: #b32741;
  font-size: 0.95rem;
  font-weight: 800;
}

#view-wallet .wallet-entry-help {
  margin: 0.4rem 0 0;
  color: #5a6a8a;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
}

#view-wallet .wallet-entry-help .wallet-miss-link {
  font-size: inherit;
  font-weight: 700;
}

#view-wallet .notice {
  background: rgba(201, 47, 69, 0.08);
  color: #b32741;
  border-radius: 14px;
}

#view-wallet .notice.is-ok {
  background: rgba(30, 138, 76, 0.1);
  color: #1e6b3e;
}

#view-wallet .wallet-form > .notice,
#view-wallet .account-card > .notice {
  margin-top: 0.15rem;
}

#view-wallet .btn-primary {
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.02rem;
  box-shadow: 0 14px 28px rgba(58, 74, 208, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  #view-wallet .btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(58, 74, 208, 0.36);
  }
}

#view-wallet .btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(16, 40, 90, 0.14);
  background: #fff;
  color: #44548a;
  font-weight: 650;
}

#view-wallet .btn-primary:disabled {
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}

/* Pickers open above the page; force light readable type over dark-theme vars. */
html:has(#view-wallet.is-active) .picker-layer.is-sheet {
  background: rgba(16, 34, 79, 0.32);
}

html:has(#view-wallet.is-active) .picker-panel {
  --text: #131c4e;
  --faint: #5b6a92;
  --muted: #3d5080;
  --line-strong: rgba(16, 40, 90, 0.22);
  --surface: #fff;
  border: 1px solid rgba(16, 40, 90, 0.1);
  background: #fff;
  color: #0f1b45;
  box-shadow: 0 24px 60px rgba(18, 48, 96, 0.2);
}

html:has(#view-wallet.is-active) .picker-title {
  color: #0f1b45;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.05rem;
}

html:has(#view-wallet.is-active) .picker-x {
  color: #2f4a7c;
}

html:has(#view-wallet.is-active) .picker-search {
  border-color: rgba(16, 40, 90, 0.16);
  background: #f6f9ff;
  color: #0f1b45;
  font-weight: 600;
}

html:has(#view-wallet.is-active) .picker-search:focus {
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

html:has(#view-wallet.is-active) .picker-option {
  color: #0f1b45;
}

html:has(#view-wallet.is-active) .picker-option-label {
  color: #0f1b45;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0;
}

html:has(#view-wallet.is-active) .picker-option:hover,
html:has(#view-wallet.is-active) .picker-option:focus-visible,
html:has(#view-wallet.is-active) .picker-option.is-active {
  background: #e8eeff;
}

html:has(#view-wallet.is-active) .picker-option-meta {
  color: #3d5080;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

html:has(#view-wallet.is-active) .picker-empty {
  color: #3d5080;
  font-weight: 600;
}

html:has(#view-wallet.is-active) .picker-handle {
  background: rgba(16, 40, 90, 0.22);
}

html:has(#view-wallet.is-active) .cal-nav-btn,
html:has(#view-wallet.is-active) .cal-nav-title {
  background: #f6f9ff;
  color: #131c4e;
}

html:has(#view-wallet.is-active) .cal-weekday {
  color: #5b6a92;
}

html:has(#view-wallet.is-active) .cal-day,
html:has(#view-wallet.is-active) .cal-year {
  color: #131c4e;
}

html:has(#view-wallet.is-active) .cal-day:hover:not(:disabled),
html:has(#view-wallet.is-active) .cal-year:hover:not(:disabled) {
  background: #e8eeff;
}

html:has(#view-wallet.is-active) .cal-day.is-today,
html:has(#view-wallet.is-active) .cal-year.is-current:not(.is-selected) {
  box-shadow: inset 0 0 0 1px rgba(16, 40, 90, 0.22);
}

html:has(#view-wallet.is-active) .cal-day.is-selected,
html:has(#view-wallet.is-active) .cal-year.is-selected {
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
}

html:has(#view-wallet.is-active) .cal-day.is-muted,
html:has(#view-wallet.is-active) .cal-day:disabled,
html:has(#view-wallet.is-active) .cal-year:disabled {
  color: #9aa6c4;
  opacity: 1;
}

/* Desktop: wallet art left, form centre. */
@media (min-width: 1000px) {
  #view-wallet {
    padding: 0.4rem 1.1rem 1.8rem;
  }

  #view-wallet .wallet {
    grid-template-columns: minmax(12rem, 1fr) minmax(24rem, 40rem) minmax(2rem, 1fr);
    grid-template-areas: "hero main .";
    align-items: start;
    column-gap: clamp(1.2rem, 3.5vw, 3.4rem);
    padding-block: 0.35rem 0.8rem;
  }

  .wallet-hero {
    grid-area: hero;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2.4rem;
  }

  .wallet-main { grid-area: main; }

  #view-wallet .wallet-page {
    max-width: none;
  }

  .wallet-hero-art {
    display: block;
    width: min(100%, 17.5rem);
    height: auto;
    filter: drop-shadow(0 22px 34px rgba(24, 52, 102, 0.18));
    animation: home-bob 7s ease-in-out infinite;
  }

  .wallet-cloud-a {
    top: -1%;
    inset-inline-end: -6%;
    width: clamp(12rem, 20vw, 19rem);
  }

  .wallet-cloud-c {
    top: -0.5%;
    inset-inline-start: -7%;
    width: clamp(11rem, 18vw, 17rem);
  }
}

/* Phone: no illustrations — room is for the balance and the form. */
@media (max-width: 999px) {
  #view-wallet .wallet {
    max-width: 30rem;
    gap: 0.85rem;
  }

  .wallet-hero {
    display: none !important;
  }

  .wallet-cloud-b,
  .wallet-cloud-d,
  .wallet-cloud-e,
  .wallet-cloud-f {
    display: none;
  }

  .wallet-cloud-a {
    top: -0.2rem;
    inset-inline-end: -2rem;
    width: 7.2rem;
    opacity: 0.55;
  }

  .wallet-cloud-c {
    top: 0.6rem;
    inset-inline-start: -2.1rem;
    width: 6.6rem;
    opacity: 0.5;
  }

  #view-wallet {
    padding-top: 0.55rem;
    padding-right: max(0.9rem, env(safe-area-inset-right, 0px));
    padding-bottom: 1.2rem;
    padding-left: max(0.9rem, env(safe-area-inset-left, 0px));
  }

  #view-wallet .wallet-page {
    max-width: none;
    padding: 0 0 0.25rem;
  }

  #view-wallet .panel-head {
    margin-bottom: 0.9rem;
  }

  #view-wallet .panel-head h1 {
    font-size: 1.7rem;
  }

  #view-wallet .panel-head .lede {
    margin-top: 0.4rem;
    font-size: 0.9rem;
  }

  #view-wallet .wallet-suggest {
    margin-bottom: 0.7rem;
    padding: 0.8rem 1rem;
  }

  #view-wallet .wallet-suggest-copy {
    font-size: 0.88rem;
  }

  #view-wallet .wallet-balance,
  #view-wallet .wallet-topup,
  #view-wallet .wallet-pending,
  #view-wallet .wallet-history,
  #view-wallet .wallet-signin {
    padding: 1.15rem 1.1rem 1.2rem;
    border-radius: 22px;
  }

  #view-wallet .wallet-balance + .account-card,
  #view-wallet .account-card + .account-card {
    margin-top: 0.7rem;
  }

  #view-wallet .wallet-amount-value {
    font-size: clamp(2.15rem, 11vw, 2.55rem);
  }

  #view-wallet .account-heading {
    font-size: 1.22rem;
  }

  #view-wallet .account-card-lede {
    margin: 0.3rem 0 0.95rem;
    font-size: 0.88rem;
  }

  #view-wallet .wallet-form {
    gap: 0.95rem;
  }

  #view-wallet .wallet-amount-box {
    min-height: 3.25rem;
  }

  #view-wallet .wallet-methods {
    gap: 0.5rem;
    padding: 0.3rem;
  }

  #view-wallet .wallet-method {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 4.2rem;
    padding: 0.5rem 0.65rem 0.55rem;
    gap: 0.28rem;
    -webkit-tap-highlight-color: transparent;
  }

  #view-wallet .wallet-method-label {
    max-width: 100%;
    font-size: clamp(0.78rem, 3.5vw, 0.9rem);
    line-height: 1.2;
    text-align: start;
    white-space: nowrap;
  }

  #view-wallet .wallet-method-pct {
    font-size: 0.66rem;
  }

  #view-wallet .wallet-rail-fields {
    gap: 0.55rem;
  }

  #view-wallet .wallet-rail-field .picker-trigger {
    min-height: 3.05rem;
    padding: 0.55rem 0.65rem;
    -webkit-tap-highlight-color: transparent;
  }

  #view-wallet .wallet-totals {
    padding: 0.85rem 0.95rem;
  }

  #view-wallet .wallet-totals-row {
    font-size: 0.88rem;
  }

  #view-wallet .wallet-card-element {
    padding: 0.85rem 0.9rem;
  }

  #view-wallet .btn-primary,
  #view-wallet .btn-ghost {
    min-height: 3rem;
  }

  #view-wallet .account-heading-row,
  #view-wallet .wallet-pending-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.55rem;
  }

  #view-wallet .wallet-fact {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
  }

  #view-wallet .wallet-fact-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
  }

  #view-wallet .wallet-fact.is-amount .wallet-fact-value {
    font-size: 1.3rem;
  }

  #view-wallet .wallet-mono {
    font-size: 0.82rem;
  }

  #view-wallet .wallet-qr-img {
    width: 168px;
    height: 168px;
  }

  #view-wallet .wallet-pending-secondary {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  #view-wallet .wallet-history > .empty {
    padding: 1.35rem 0.4rem 0.4rem;
  }

  #view-wallet .wallet-entry {
    padding: 0.85rem 0;
    gap: 0.7rem;
    align-items: start;
  }

  #view-wallet .wallet-entry-in,
  #view-wallet .wallet-entry-out {
    padding-top: 1.15rem;
    font-size: 0.95rem;
  }

  #view-wallet .account-row-static {
    padding: 0.85rem 0;
  }
}

/* --- Account page (daylight) --------------------------------------------- */

#view-cabinet {
  position: relative;
  overflow-x: hidden;
  padding: 0.7rem 0.9rem 1.6rem;
}

.cabinet {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: min(100%, 74rem);
  margin-inline: auto;
  align-content: start;
}

.cabinet-cloud {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.cabinet-cloud-a {
  top: 0.4%;
  inset-inline-end: -4%;
  width: clamp(10rem, 18vw, 17rem);
  opacity: 0.72;
}

.cabinet-cloud-b {
  top: 16%;
  inset-inline-end: 16%;
  width: clamp(6.5rem, 12vw, 11rem);
  opacity: 0.5;
}

.cabinet-cloud-c {
  top: 3%;
  inset-inline-start: -3%;
  width: clamp(9rem, 16vw, 15rem);
  opacity: 0.68;
}

.cabinet-cloud-d {
  top: 26%;
  inset-inline-start: 7%;
  width: clamp(6rem, 10vw, 9.5rem);
  opacity: 0.44;
}

.cabinet-cloud-e {
  bottom: 10%;
  inset-inline-start: -5%;
  width: clamp(8rem, 14vw, 13rem);
  opacity: 0.52;
}

.cabinet-cloud-f {
  bottom: 16%;
  inset-inline-end: -4%;
  width: clamp(7.5rem, 13vw, 12rem);
  opacity: 0.46;
}

.cabinet-hero {
  display: none;
  pointer-events: none;
  user-select: none;
}

.cabinet-main {
  position: relative;
  z-index: 2;
  min-width: 0;
}

#view-cabinet .cabinet-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 0 0.5rem;
}

#view-cabinet .panel-head {
  margin-bottom: 1.15rem;
}

#view-cabinet .eyebrow {
  color: #2f6bff;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#view-cabinet .panel-head h1 {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

#view-cabinet .panel-head h1::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-inline-start: 0.22em;
  background: url("/static/web/home/sparkle.svg?v=2") no-repeat center / contain;
  vertical-align: 0.12em;
}

#view-cabinet .card,
#view-cabinet .account-card,
#view-cabinet .auth-card {
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.1);
  color: #131c4e;
  padding: 1.35rem 1.3rem 1.35rem;
}

#view-cabinet .auth-title,
#view-cabinet .account-heading {
  color: #131c4e;
}

#view-cabinet .auth-lede,
#view-cabinet .account-card-lede,
#view-cabinet .lede {
  color: #56638c;
}

#view-cabinet .account-card + .account-card {
  margin-top: 0.9rem;
}

#view-cabinet .account-heading {
  margin: 0;
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

#view-cabinet .account-card-lede,
#view-cabinet .lede {
  color: #56638c;
}

#view-cabinet .account-card-lede {
  margin: 0.4rem 0 1.05rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

#view-cabinet .account-badge {
  background: #eef4ff;
  color: #2f6bff;
  font-weight: 700;
}

#view-cabinet .account-row,
#view-cabinet .account-row-static {
  border-top-color: rgba(16, 40, 90, 0.08);
}

#view-cabinet .account-row-label {
  color: #7d89ab;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#view-cabinet .account-row-value,
#view-cabinet .account-balance-value {
  color: #131c4e;
}

#view-cabinet .account-balance-value {
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

#view-cabinet .btn-ghost.account-edit {
  border-radius: 999px;
  border: 1px solid rgba(16, 40, 90, 0.14);
  background: #fff;
  color: #44548a;
  font-weight: 650;
}

#view-cabinet .account-warn {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: rgba(217, 154, 27, 0.12);
  color: #9a6a0a;
  font-size: 0.88rem;
  line-height: 1.45;
}

#view-cabinet .field,
#view-contacts .field {
  color: #5b6a92;
}

#view-cabinet .field input,
#view-cabinet .field select,
#view-cabinet .picker-trigger,
#view-contacts .field input,
#view-contacts .field select,
#view-contacts .picker-trigger {
  border-color: rgba(16, 40, 90, 0.16);
  background: #fff;
  color: #131c4e;
}

#view-cabinet .field input:focus,
#view-cabinet .picker.is-open .picker-trigger,
#view-cabinet .picker-trigger:focus-visible,
#view-contacts .field input:focus,
#view-contacts .picker.is-open .picker-trigger,
#view-contacts .picker-trigger:focus-visible {
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

#view-cabinet .picker-date-cal,
#view-contacts .picker-date-cal {
  color: #5b6a92;
}

#view-cabinet .picker-date-cal:hover,
#view-cabinet .picker-date-cal:focus-visible,
#view-cabinet .picker.is-open .picker-date-cal,
#view-contacts .picker-date-cal:hover,
#view-contacts .picker-date-cal:focus-visible,
#view-contacts .picker.is-open .picker-date-cal {
  color: #131c4e;
  background: #f6f9ff;
}

#view-cabinet .field-hint,
#view-contacts .field-hint {
  color: #7d89ab;
}

#view-cabinet .field-error,
#view-contacts .field-error {
  color: #c92f45;
}

#view-cabinet .auth-field.has-error input,
#view-cabinet .auth-field.has-error .picker-trigger,
#view-contacts .auth-field.has-error input,
#view-contacts .auth-field.has-error .picker-trigger {
  border-color: rgba(201, 47, 69, 0.55);
}

#view-cabinet .auth-field.has-error input:focus,
#view-contacts .auth-field.has-error input:focus {
  box-shadow: 0 0 0 4px rgba(201, 47, 69, 0.12);
}

#view-cabinet .notice,
#view-contacts .notice {
  background: rgba(201, 47, 69, 0.08);
  color: #b32741;
  border-radius: 14px;
}

#view-cabinet .notice.is-ok,
#view-contacts .notice.is-ok {
  background: rgba(30, 138, 76, 0.1);
  color: #1e6b3e;
}

#view-cabinet .account-card > .notice {
  margin-bottom: 0.85rem;
}

#view-cabinet .account-link-inline {
  color: #2f6bff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(47, 107, 255, 0.35);
  text-underline-offset: 0.14em;
}

#view-cabinet .account-link-inline:hover {
  text-decoration-color: #2f6bff;
}

#view-cabinet .account-link-inline:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 2px;
  border-radius: 4px;
}

#view-cabinet .account-link-how {
  margin: -0.55rem 0 0.9rem;
  color: #131c4e;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
}

#view-cabinet .account-link-start,
#view-cabinet .account-link-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.55rem;
  margin: 0;
  box-sizing: border-box;
  text-decoration: none;
}

#view-cabinet .account-link-bot-card {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(16, 40, 90, 0.1);
  border-radius: 14px;
  background: #f8faff;
}

#view-cabinet .account-link-step-action .account-link-bot-card {
  margin-bottom: 0;
}

#view-cabinet .account-link-qr-wrap {
  display: grid;
  place-items: center;
  width: 10rem;
  height: 10rem;
  padding: 0.4rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(16, 40, 90, 0.08);
}

#view-cabinet .account-link-qr {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#view-cabinet .account-link-bot-meta {
  min-width: 0;
}

#view-cabinet .account-link-bot-label {
  margin: 0 0 0.2rem;
  color: #7d89ab;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#view-cabinet .account-link-handle {
  display: block;
  margin: 0 0 0.4rem;
  color: #131c4e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
  word-break: break-all;
}

#view-cabinet .account-link-handle:hover {
  color: #2f6bff;
}

#view-cabinet .account-link-bot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.85rem;
  margin-bottom: 0.35rem;
}

#view-cabinet .account-link-text-action {
  appearance: none;
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #2f6bff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}

#view-cabinet .account-link-text-action:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

#view-cabinet .account-link-text-action:focus-visible,
#view-cabinet .account-link-handle:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 2px;
  border-radius: 4px;
}

#view-cabinet .account-link-bot-meta > .field-hint {
  margin: 0;
}

#view-cabinet .account-link-lost {
  margin: 0.45rem 0 0;
  color: #56638c;
  font-size: 0.88rem;
  line-height: 1.45;
}

#view-cabinet .account-link-lost .account-link-text-action {
  font-size: inherit;
}

#view-cabinet .account-link-flow {
  display: flex;
  flex-direction: column;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

#view-cabinet .account-link-step {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.15rem 0.65rem;
  margin: 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(16, 40, 90, 0.08);
  background: transparent;
}

#view-cabinet .account-link-step-index {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.08rem;
  border-radius: 999px;
  background: #eef4ff;
  color: #2f6bff;
  font-family: var(--round);
  font-weight: 800;
  font-size: 0.72rem;
}

#view-cabinet .account-link-step-copy {
  margin: 0;
  color: #131c4e;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.4;
}

#view-cabinet .account-link-step-action {
  margin-top: 0.45rem;
}

#view-cabinet .account-link-step-action .field {
  margin: 0;
}

#view-cabinet .account-link-step-action .field-hint {
  margin-top: 0.3rem;
}

#view-cabinet .account-link-confirm {
  margin-top: 0.55rem;
}

#view-cabinet .account-link-seed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

#view-cabinet .account-link-seed-caption {
  min-width: 0;
}

#view-cabinet .account-link-copy {
  flex: none;
  white-space: nowrap;
}

@media (max-width: 420px) {
  #view-cabinet .account-link-bot-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

#view-cabinet .account-link-seed {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  font-size: 0.86rem;
  font-variant-ligatures: none;
}

#view-cabinet .account-link-status {
  margin: -0.35rem 0 0.75rem;
  color: #1e6b3e;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.4;
}

#view-cabinet .account-link-sub {
  margin: 0 0 0.35rem;
  font-family: var(--round);
  font-size: 1.05rem;
  color: #131c4e;
}

#view-cabinet .account-link-balance {
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: #eef4ff;
  color: #131c4e;
  font-size: 0.9rem;
  line-height: 1.45;
}

#view-cabinet .account-link-choice {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(16, 40, 90, 0.1);
  border-radius: 14px;
}

#view-cabinet .account-link-choice legend {
  padding: 0 0.25rem;
  color: #7d89ab;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#view-cabinet .account-link-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
  color: #131c4e;
  font-size: 0.95rem;
}

#view-cabinet .account-link-option input {
  accent-color: #2f6bff;
}

#view-cabinet .btn-primary,
#view-contacts .btn-primary {
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.02rem;
  box-shadow: 0 14px 28px rgba(58, 74, 208, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#view-cabinet .docs-actions .btn-primary,
#view-cabinet .account-actions .btn-primary,
#view-contacts .docs-actions .btn-primary {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.7rem 1rem;
  min-height: 2.75rem;
  box-shadow: 0 8px 18px rgba(58, 74, 208, 0.22);
}

#view-cabinet .docs-actions .btn-ghost,
#view-cabinet .account-actions .btn-ghost,
#view-contacts .docs-actions .btn-ghost {
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  margin: 0;
}

@media (hover: hover) {
  #view-cabinet .btn-primary:not(:disabled):hover,
  #view-contacts .btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(58, 74, 208, 0.36);
  }
}

#view-cabinet .btn-ghost,
#view-contacts .btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(16, 40, 90, 0.14);
  background: #fff;
  color: #44548a;
  font-weight: 650;
}

#view-cabinet .btn-primary:disabled,
#view-contacts .btn-primary:disabled {
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}

#view-cabinet .account-danger .account-danger-btn {
  color: #c92f45;
  border-color: rgba(201, 47, 69, 0.28);
  background: rgba(201, 47, 69, 0.05);
}

#view-cabinet .account-danger .btn-ghost {
  margin-top: 0.65rem;
}

#view-cabinet .account-legal-item {
  border-color: rgba(16, 40, 90, 0.08);
  background: #f6f9ff;
  color: #131c4e;
}

#view-cabinet .account-legal-item:hover,
#view-cabinet .account-legal-item:focus-visible {
  border-color: rgba(47, 107, 255, 0.28);
  background: #fff;
  box-shadow: 0 10px 22px rgba(26, 70, 180, 0.07);
}

#view-cabinet .account-legal-name {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
}

#view-cabinet .account-legal-hint {
  color: #56638c;
}

#view-cabinet .account-android-card {
  padding: 1.05rem 1.15rem;
}

#view-cabinet .account-session {
  margin-top: 0.9rem;
}

#view-cabinet .account-session .btn-ghost {
  margin-top: 0;
}

#view-cabinet .docs-empty {
  border-color: rgba(16, 40, 90, 0.14);
  background: #f6f9ff;
  color: #56638c;
}

#view-cabinet .docs-item {
  border-color: rgba(16, 40, 90, 0.1);
  background: #f8fbff;
  border-radius: 18px;
}

#view-cabinet .docs-item.is-open {
  border-color: rgba(47, 107, 255, 0.28);
  background: #fff;
  box-shadow: 0 12px 28px rgba(26, 70, 180, 0.08);
}

#view-cabinet .docs-mark {
  background: #eef4ff;
}

#view-cabinet .docs-mark-dot {
  background: #2f6bff;
}

#view-cabinet .docs-label {
  color: #131c4e;
  font-weight: 650;
}

#view-cabinet .docs-meta {
  color: #7d89ab;
}

#view-cabinet .docs-primary {
  color: #2f6bff;
}

#view-cabinet .docs-editor,
#view-contacts .docs-editor {
  border-top-color: rgba(16, 40, 90, 0.08);
}

#view-cabinet .docs-upload,
#view-contacts .docs-upload {
  border-color: rgba(47, 107, 255, 0.18);
  background: linear-gradient(135deg, #eef4ff 0%, #f6f9ff 100%);
}

#view-cabinet .docs-upload-title {
  color: #131c4e;
  font-weight: 700;
}

#view-cabinet .docs-upload-hint,
#view-cabinet .docs-upload-note {
  color: #56638c;
}

#view-cabinet .docs-upload-note.is-error {
  color: #c92f45;
}

#view-cabinet .doc-action,
#view-contacts .doc-action {
  border-radius: 999px;
  border: 1px solid rgba(16, 40, 90, 0.14);
  background: #fff;
  color: #44548a;
  font-weight: 650;
}

@media (hover: hover) {
  #view-cabinet .doc-action:hover:not(:disabled),
  #view-contacts .doc-action:hover:not(:disabled) {
    border-color: rgba(47, 107, 255, 0.4);
    background: #f6f9ff;
    color: #2f6bff;
    transform: translateY(-1px);
  }
}

#view-cabinet .docs-actions .docs-remove,
#view-contacts .docs-actions .docs-remove {
  grid-column: 2;
  justify-self: end;
  width: auto;
  min-height: 0;
  margin-top: 0.15rem;
  padding: 0.35rem 0.1rem;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #c92f45;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

@media (hover: hover) {
  #view-cabinet .docs-actions .docs-remove:hover,
  #view-contacts .docs-actions .docs-remove:hover {
    color: #a01f33;
  }
}

#view-cabinet .docs-add {
  border-style: dashed;
  border-color: rgba(47, 107, 255, 0.28);
  color: #2f6bff;
  background: rgba(47, 107, 255, 0.04);
}

#view-cabinet .phone-shell {
  border-color: rgba(16, 40, 90, 0.16);
  background: #fff;
}

#view-cabinet .phone-shell:focus-within {
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

#view-cabinet .phone-country {
  border-inline-end-color: rgba(16, 40, 90, 0.12);
  color: #131c4e;
}

#view-cabinet .phone-country:hover,
#view-cabinet .phone-field.is-open .phone-country {
  background: #f6f9ff;
}

#view-cabinet .phone-number,
#view-cabinet .phone-wrap .phone-number,
#view-cabinet .field .phone-number {
  border: 0;
  background: transparent;
  color: #131c4e;
}

#view-cabinet .phone-dial {
  color: #5b6a92;
}

#view-cabinet .phone-wrap.has-error .phone-shell {
  border-color: rgba(201, 47, 69, 0.55);
}

#view-cabinet .phone-wrap.has-error .phone-shell:focus-within {
  box-shadow: 0 0 0 4px rgba(201, 47, 69, 0.12);
}

html:has(#view-cabinet.is-active) .phone-menu {
  border: 1px solid rgba(16, 40, 90, 0.08);
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.16);
}

html:has(#view-cabinet.is-active) .phone-search {
  border-color: rgba(16, 40, 90, 0.14);
  background: #f6f9ff;
  color: #131c4e;
}

html:has(#view-cabinet.is-active) .phone-option {
  color: #131c4e;
}

html:has(#view-cabinet.is-active) .phone-option:hover,
html:has(#view-cabinet.is-active) .phone-option.is-cursor,
html:has(#view-cabinet.is-active) .phone-option.is-active {
  background: #eef4ff;
}

html:has(#view-cabinet.is-active) .phone-option-dial {
  color: #7d89ab;
}

html:has(#view-cabinet.is-active) .phone-option.is-active .phone-option-dial {
  color: #2f6bff;
}

html:has(#view-cabinet.is-active) .phone-empty {
  color: #7d89ab;
}

/* Pickers / phone sheets while the account is open. */
html:has(#view-cabinet.is-active) .picker-layer.is-sheet,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-layer.is-sheet {
  background: rgba(16, 34, 79, 0.28);
}

html:has(#view-cabinet.is-active) .picker-panel,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-panel {
  --text: #131c4e;
  --faint: #5b6a92;
  --muted: #3d5080;
  --line-strong: rgba(16, 40, 90, 0.22);
  --surface: #fff;
  border: 1px solid rgba(16, 40, 90, 0.08);
  background: #fff;
  color: #131c4e;
  box-shadow: 0 24px 60px rgba(18, 48, 96, 0.18);
}

html:has(#view-cabinet.is-active) .picker-title,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-title {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
}

html:has(#view-cabinet.is-active) .picker-x,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-x {
  color: #5b6a92;
}

html:has(#view-cabinet.is-active) .picker-search,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-search {
  border-color: rgba(16, 40, 90, 0.14);
  background: #f6f9ff;
  color: #131c4e;
}

html:has(#view-cabinet.is-active) .picker-search:focus,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-search:focus {
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

html:has(#view-cabinet.is-active) .picker-option,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-option {
  color: #0f1b45;
}

html:has(#view-cabinet.is-active) .picker-option-label,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-option-label {
  color: #0f1b45;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0;
}

html:has(#view-cabinet.is-active) .picker-option:hover,
html:has(#view-cabinet.is-active) .picker-option:focus-visible,
html:has(#view-cabinet.is-active) .picker-option.is-active,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-option:hover,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-option:focus-visible,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-option.is-active {
  background: #e8eeff;
}

html:has(#view-cabinet.is-active) .picker-option-meta,
html:has(#view-cabinet.is-active) .picker-empty,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-option-meta,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-empty {
  color: #3d5080;
  font-weight: 650;
}

html:has(#view-cabinet.is-active) .picker-handle,
html:has(#view-contacts.is-active, #view-assistant.is-active) .picker-handle {
  background: rgba(16, 40, 90, 0.18);
}

html:has(#view-cabinet.is-active) .cal-nav-btn,
html:has(#view-cabinet.is-active) .cal-nav-title,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-nav-btn,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-nav-title {
  background: #f6f9ff;
  color: #131c4e;
}

html:has(#view-cabinet.is-active) .cal-weekday,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-weekday {
  color: #5b6a92;
}

html:has(#view-cabinet.is-active) .cal-day,
html:has(#view-cabinet.is-active) .cal-year,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-day,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-year {
  color: #131c4e;
}

html:has(#view-cabinet.is-active) .cal-day:hover:not(:disabled),
html:has(#view-cabinet.is-active) .cal-year:hover:not(:disabled),
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-day:hover:not(:disabled),
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-year:hover:not(:disabled) {
  background: #e8eeff;
}

html:has(#view-cabinet.is-active) .cal-day.is-today,
html:has(#view-cabinet.is-active) .cal-year.is-current:not(.is-selected),
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-day.is-today,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-year.is-current:not(.is-selected) {
  box-shadow: inset 0 0 0 1px rgba(16, 40, 90, 0.22);
}

html:has(#view-cabinet.is-active) .cal-day.is-selected,
html:has(#view-cabinet.is-active) .cal-year.is-selected,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-day.is-selected,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-year.is-selected {
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
}

html:has(#view-cabinet.is-active) .cal-day.is-muted,
html:has(#view-cabinet.is-active) .cal-day:disabled,
html:has(#view-cabinet.is-active) .cal-year:disabled,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-day.is-muted,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-day:disabled,
html:has(#view-contacts.is-active, #view-assistant.is-active) .cal-year:disabled {
  color: #9aa6c4;
  opacity: 1;
}

/* Desktop: passport left, profile centre. */
@media (min-width: 1000px) {
  #view-cabinet {
    padding: 0.4rem 1.1rem 1.8rem;
  }

  #view-cabinet .cabinet {
    grid-template-columns: minmax(12rem, 1fr) minmax(24rem, 36rem) minmax(2rem, 1fr);
    grid-template-areas: "hero main .";
    align-items: stretch;
    column-gap: clamp(1.2rem, 3.5vw, 3.4rem);
    padding-block: 0.35rem 0.8rem;
  }

  .cabinet-hero {
    grid-area: hero;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2.4rem;
  }

  .cabinet-main { grid-area: main; }

  #view-cabinet .cabinet-page {
    max-width: none;
  }

  .cabinet-hero-art {
    display: block;
    width: min(100%, 16.5rem);
    height: auto;
    filter: drop-shadow(0 22px 34px rgba(24, 52, 102, 0.18));
    animation: home-bob 7s ease-in-out infinite;
  }

  .cabinet-cloud-a {
    top: -1%;
    inset-inline-end: -6%;
    width: clamp(12rem, 20vw, 19rem);
  }

  .cabinet-cloud-c {
    top: -0.5%;
    inset-inline-start: -7%;
    width: clamp(11rem, 18vw, 17rem);
  }
}

/* Phone: no illustrations — the profile form keeps the whole width. */
@media (max-width: 999px) {
  #view-cabinet .cabinet {
    max-width: 30rem;
    gap: 0.85rem;
  }

  .cabinet-hero {
    display: none !important;
  }

  .cabinet-cloud-b,
  .cabinet-cloud-d,
  .cabinet-cloud-e,
  .cabinet-cloud-f {
    display: none;
  }

  .cabinet-cloud-a {
    top: -0.2rem;
    inset-inline-end: -2rem;
    width: 7.2rem;
    opacity: 0.55;
  }

  .cabinet-cloud-c {
    top: 0.6rem;
    inset-inline-start: -2.1rem;
    width: 6.6rem;
    opacity: 0.5;
  }

  #view-cabinet {
    padding-top: 0.55rem;
    padding-right: max(0.9rem, env(safe-area-inset-right, 0px));
    padding-bottom: 1.2rem;
    padding-left: max(0.9rem, env(safe-area-inset-left, 0px));
  }

  #view-cabinet .cabinet-page {
    max-width: none;
    padding: 0 0 0.25rem;
  }

  #view-cabinet .panel-head {
    margin-bottom: 0.9rem;
  }

  #view-cabinet .panel-head h1 {
    font-size: 1.7rem;
  }

  #view-cabinet .card,
  #view-cabinet .account-card {
    padding: 1.15rem 1.1rem 1.2rem;
    border-radius: 22px;
  }

  #view-cabinet .account-android-card {
    padding: 0.95rem 1rem;
  }

  #view-cabinet .account-card + .account-card {
    margin-top: 0.7rem;
  }

  #view-cabinet .account-heading {
    font-size: 1.25rem;
  }

  #view-cabinet .account-card-lede {
    margin: 0.3rem 0 0.95rem;
    font-size: 0.88rem;
  }

  #view-cabinet .account-row,
  #view-cabinet .account-row-static {
    padding: 0.9rem 0;
    gap: 0.7rem;
  }

  #view-cabinet .btn-primary,
  #view-cabinet .btn-ghost {
    min-height: 2.75rem;
  }

  #view-cabinet .docs-actions .btn-primary,
  #view-cabinet .docs-actions .btn-ghost,
  #view-cabinet .account-actions .btn-primary,
  #view-cabinet .account-actions .btn-ghost {
    min-height: 2.75rem;
  }

  #view-cabinet .account-actions,
  #view-cabinet .docs-actions {
    gap: 0.55rem;
  }

  #view-cabinet .account-heading-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #view-cabinet .cabinet-hero-art {
    animation: none;
  }
}

/* --- Contacts page (daylight) -------------------------------------------- */

#view-contacts {
  position: relative;
  overflow-x: hidden;
  padding: 0.7rem 0.9rem 1.6rem;
}

.contacts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: min(100%, 74rem);
  margin-inline: auto;
  align-content: start;
}

.contacts-cloud {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.contacts-cloud-a {
  top: 0.4%;
  inset-inline-end: -4%;
  width: clamp(10rem, 18vw, 17rem);
  opacity: 0.72;
}

.contacts-cloud-b {
  top: 16%;
  inset-inline-end: 16%;
  width: clamp(6.5rem, 12vw, 11rem);
  opacity: 0.5;
}

.contacts-cloud-c {
  top: 3%;
  inset-inline-start: -3%;
  width: clamp(9rem, 16vw, 15rem);
  opacity: 0.68;
}

.contacts-cloud-d {
  top: 26%;
  inset-inline-start: 7%;
  width: clamp(6rem, 10vw, 9.5rem);
  opacity: 0.44;
}

.contacts-cloud-e {
  bottom: 10%;
  inset-inline-start: -5%;
  width: clamp(8rem, 14vw, 13rem);
  opacity: 0.52;
}

.contacts-cloud-f {
  bottom: 16%;
  inset-inline-end: -4%;
  width: clamp(7.5rem, 13vw, 12rem);
  opacity: 0.46;
}

.contacts-hero {
  display: none;
  pointer-events: none;
  user-select: none;
}

.contacts-main {
  position: relative;
  z-index: 2;
  min-width: 0;
}

#view-contacts .contacts-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 0 0.5rem;
}

#view-contacts .panel-head {
  margin-bottom: 1.15rem;
}

#view-contacts .eyebrow {
  color: #2f6bff;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#view-contacts .panel-head h1 {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

#view-contacts .panel-head h1::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-inline-start: 0.22em;
  background: url("/static/web/home/sparkle.svg?v=2") no-repeat center / contain;
  vertical-align: 0.12em;
}

#view-contacts .panel-head .lede {
  margin-top: 0.55rem;
  color: #56638c;
  font-size: 0.95rem;
  line-height: 1.55;
}

#view-contacts .stack {
  gap: 0.85rem;
}

#view-contacts .card {
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.1);
  color: #131c4e;
  padding: 1.2rem 1.25rem 1.25rem;
}

#view-contacts .card h2 {
  margin: 0 0 0.35rem;
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

#view-contacts .card p {
  margin: 0;
  color: #56638c;
  font-size: 0.92rem;
  line-height: 1.45;
}

#view-contacts .card .contact-official {
  color: #7d89ab;
  font-size: 0.86rem;
  line-height: 1.4;
}

#view-contacts .card .contact-official + p {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
  color: #44548a;
  font-size: 0.88rem;
  font-weight: 650;
}

#view-contacts .card > p:last-child:not(.contact-official) {
  margin-top: 0.45rem;
  color: #44548a;
  font-size: 0.88rem;
  font-weight: 650;
}

#view-contacts .empty {
  margin: 0;
  padding: 1.6rem 1.2rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: linear-gradient(160deg, #f7faff 0%, #fff 100%);
  box-shadow: 0 14px 34px rgba(18, 48, 96, 0.07);
  color: #7d89ab;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

#view-contacts .card.is-open {
  border-color: rgba(47, 107, 255, 0.22);
  box-shadow: 0 18px 44px rgba(26, 70, 180, 0.12);
}

#view-contacts .contact-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

#view-contacts .contact-copy {
  flex: 1 1 auto;
  min-width: 0;
}

#view-contacts .contact-copy h2 {
  margin: 0 0 0.35rem;
}

#view-contacts .contact-meta {
  margin-top: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
  color: #44548a;
  font-size: 0.88rem;
  font-weight: 650;
}

#view-contacts .contact-edit {
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  margin: -0.15rem -0.2rem 0 0;
  padding: 0;
  border: 1px solid rgba(16, 40, 90, 0.1);
  border-radius: 999px;
  background: #f6f9ff;
  color: #44548a;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

#view-contacts .contact-edit:hover,
#view-contacts .contact-edit:focus-visible,
#view-contacts .contact-edit[aria-pressed="true"] {
  border-color: rgba(47, 107, 255, 0.4);
  background: #eef4ff;
  color: #2f6bff;
}

#view-contacts .contact-edit-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

#view-contacts .contacts-add {
  width: 100%;
  border-style: dashed;
  border-color: rgba(47, 107, 255, 0.28);
  color: #2f6bff;
  background: rgba(47, 107, 255, 0.04);
}

#view-contacts .contact-composer > h2 {
  margin-bottom: 0.3rem;
}

#view-contacts .contact-editor {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

#view-contacts .contact-name-field {
  grid-column: 1 / -1;
}

#view-contacts .docs-upload {
  margin-bottom: 1rem;
}

#view-contacts .account-heading {
  margin: 0 0 0.35rem;
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

#view-contacts .account-card-lede {
  margin: 0 0 1rem;
  color: #56638c;
}

/* Desktop: companions ticket left, list centre. */
@media (min-width: 1000px) {
  #view-contacts {
    padding: 0.4rem 1.1rem 1.8rem;
  }

  #view-contacts .contacts {
    grid-template-columns: minmax(12rem, 1fr) minmax(24rem, 40rem);
    grid-template-areas: "hero main";
    align-items: start;
    justify-content: center;
    column-gap: clamp(1.6rem, 4vw, 3.8rem);
    padding-block: 0.35rem 0.8rem;
  }

  .contacts-hero {
    grid-area: hero;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2.4rem;
  }

  .contacts-main { grid-area: main; }

  #view-contacts .contacts-page {
    max-width: none;
  }

  .contacts-hero-art {
    display: block;
    width: min(100%, 16.5rem);
    height: auto;
    filter: drop-shadow(0 22px 34px rgba(24, 52, 102, 0.18));
    animation: home-bob 7s ease-in-out infinite;
  }

  .contacts-cloud-a {
    top: -1%;
    inset-inline-end: -6%;
    width: clamp(12rem, 20vw, 19rem);
  }

  .contacts-cloud-c {
    top: -0.5%;
    inset-inline-start: -7%;
    width: clamp(11rem, 18vw, 17rem);
  }
}

/* Phone: no illustrations — the traveller list keeps the whole width. */
@media (max-width: 999px) {
  #view-contacts .contacts {
    max-width: 30rem;
    gap: 0.85rem;
  }

  .contacts-hero {
    display: none !important;
  }

  .contacts-cloud-b,
  .contacts-cloud-d,
  .contacts-cloud-e,
  .contacts-cloud-f {
    display: none;
  }

  .contacts-cloud-a {
    top: -0.2rem;
    inset-inline-end: -2rem;
    width: 7.2rem;
    opacity: 0.55;
  }

  .contacts-cloud-c {
    top: 0.6rem;
    inset-inline-start: -2.1rem;
    width: 6.6rem;
    opacity: 0.5;
  }

  #view-contacts {
    padding-top: 0.55rem;
    padding-right: max(0.9rem, env(safe-area-inset-right, 0px));
    padding-bottom: 1.2rem;
    padding-left: max(0.9rem, env(safe-area-inset-left, 0px));
  }

  #view-contacts .contacts-page {
    max-width: none;
    padding: 0 0 0.25rem;
  }

  #view-contacts .panel-head {
    margin-bottom: 0.9rem;
  }

  #view-contacts .panel-head h1 {
    font-size: 1.7rem;
  }

  #view-contacts .panel-head .lede {
    margin-top: 0.4rem;
    font-size: 0.9rem;
  }

  #view-contacts .stack {
    gap: 0.7rem;
  }

  #view-contacts .card {
    padding: 1.05rem 1.05rem 1.1rem;
    border-radius: 22px;
  }

  #view-contacts .card h2 {
    font-size: 1.1rem;
  }

  #view-contacts .empty {
    padding: 1.35rem 1.05rem;
    border-radius: 22px;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #view-contacts .contacts-hero-art {
    animation: none;
  }
}

/* --- Tickets -------------------------------------------------------------- */

#view-tickets {
  position: relative;
  overflow-x: hidden;
  padding: 0.75rem 1.5rem 2.2rem;
}

.tickets {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: min(100%, 80rem);
  margin-inline: auto;
}

.tickets-cloud {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.tickets-cloud-a {
  top: 0.4%;
  inset-inline-end: -4%;
  width: clamp(10rem, 18vw, 17rem);
  opacity: 0.72;
}

.tickets-cloud-b {
  top: 16%;
  inset-inline-end: 16%;
  width: clamp(6.5rem, 12vw, 11rem);
  opacity: 0.5;
}

.tickets-cloud-c {
  top: 3%;
  inset-inline-start: -3%;
  width: clamp(9rem, 16vw, 15rem);
  opacity: 0.68;
}

.tickets-cloud-d {
  top: 26%;
  inset-inline-start: 7%;
  width: clamp(6rem, 10vw, 9.5rem);
  opacity: 0.44;
}

.tickets-head {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0.15rem;
}

#view-tickets .eyebrow {
  color: #2f6bff;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#view-tickets .panel-head h1 {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

#view-tickets .panel-head h1::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-inline-start: 0.22em;
  background: url("/static/web/home/sparkle.svg?v=2") no-repeat center / contain;
  vertical-align: 0.12em;
}

#view-tickets .panel-head .lede {
  margin-top: 0.55rem;
  color: #3d5080;
  font-size: 0.98rem;
  font-weight: 550;
  line-height: 1.55;
}

#view-tickets .empty {
  margin: 0 0 1rem;
  padding: 1.35rem 1.2rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.08);
  color: #3d5080;
  font-weight: 600;
}

#view-tickets .tickets-signin {
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.1);
  color: #131c4e;
  padding: 1.35rem 1.3rem;
}

#view-tickets .tickets-signin .account-heading {
  margin: 0;
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

#view-tickets .tickets-signin .account-card-lede {
  margin: 0.4rem 0 1.05rem;
  color: #3d5080;
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.5;
}

#view-tickets .btn-primary {
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.02rem;
  text-align: center;
  box-shadow: 0 14px 28px rgba(58, 74, 208, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  #view-tickets .btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(58, 74, 208, 0.36);
  }
}

#view-tickets .btn-primary:disabled {
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}

.tickets-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.ticket-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "art"
    "body"
    "details";
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.1);
  color: #131c4e;
  overflow: hidden;
  cursor: pointer;
  animation: ticket-rise 0.55s ease both;
}

.ticket-card:nth-child(2) { animation-delay: 0.06s; }
.ticket-card:nth-child(3) { animation-delay: 0.12s; }
.ticket-card:nth-child(4) { animation-delay: 0.18s; }

@keyframes ticket-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.ticket-card-body {
  position: relative;
  z-index: 1;
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  padding: 1.25rem 1.35rem 1.2rem;
  min-width: 0;
}

.ticket-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ticket-card-title {
  margin: 0;
  color: #131c4e;
  font-family: var(--round);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.ticket-card-codes {
  margin: 0.28rem 0 0;
  color: #5a6d98;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.ticket-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex: none;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ticket-badge-icon {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
}

.ticket-badge-icon svg {
  width: 100%;
  height: 100%;
}

.ticket-badge.is-confirmed {
  color: #0f7a4a;
  background: #e7f8ef;
}

.ticket-badge.is-pending {
  color: #9a6400;
  background: #fff4d8;
}

.ticket-badge.is-action {
  color: #2f6bff;
  background: #eaf1ff;
}

.ticket-badge.is-closed {
  color: #6a738c;
  background: #eef1f7;
}

.ticket-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.85rem;
}

.ticket-fact-label {
  display: block;
  color: #5a6d98;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-fact-value {
  display: block;
  margin-top: 0.18rem;
  color: #131c4e;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.ticket-fact.is-airline .ticket-fact-value {
  display: flex;
  align-items: center;
  min-width: 0;
}

.ticket-fact.is-airline .airline-name {
  font-weight: 700;
}

.ticket-fact-note {
  display: block;
  margin-top: 0.12rem;
  color: #5a6d98;
  font-size: 0.78rem;
  font-weight: 600;
}

.ticket-details {
  grid-area: details;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  min-height: 0;
  background: linear-gradient(180deg, #f3f7ff 0%, #fff 2.6rem);
  transition: grid-template-rows 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.ticket-card:not(.is-open) .ticket-details {
  height: 0;
  min-height: 0;
  background: none;
}

.ticket-card.is-open .ticket-details {
  grid-template-rows: 1fr;
}

.ticket-details-sheet {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  padding: 0;
  opacity: 0;
  transform: translateY(-0.45rem);
  transition:
    opacity 0.32s ease,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.ticket-card.is-open .ticket-details-sheet {
  padding: 1.35rem 1.35rem 1.25rem;
  opacity: 1;
  transform: none;
}

.ticket-details-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0.9rem;
  left: 0.9rem;
  height: 10px;
  background:
    radial-gradient(circle at 0 50%, rgba(47, 107, 255, 0.28) 0 2.2px, transparent 2.3px),
    radial-gradient(circle at 100% 50%, rgba(47, 107, 255, 0.28) 0 2.2px, transparent 2.3px),
    repeating-linear-gradient(
      90deg,
      rgba(47, 107, 255, 0.2) 0 5px,
      transparent 5px 11px
    );
  background-repeat: no-repeat, no-repeat, repeat-x;
  background-position: left center, right center, center;
  background-size: 8px 10px, 8px 10px, 100% 1px;
}

.ticket-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  background: #f5f8ff;
}

.ticket-meta-label {
  display: block;
  color: #5a6d98;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-meta-value {
  display: block;
  margin-top: 0.15rem;
  color: #131c4e;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ticket-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket-timeline-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon when"
    "icon place";
  column-gap: 0.65rem;
  row-gap: 0.08rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  background: #f8faff;
}

.ticket-timeline-icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  color: #2f6bff;
  background: #e8f0ff;
  font-size: 0.78rem;
  font-weight: 800;
}

.ticket-timeline-step.is-check_in .ticket-timeline-icon {
  color: #0f7a4a;
  background: #e7f8ef;
}

.ticket-timeline-step.is-arrive .ticket-timeline-icon {
  color: #6d4cff;
  background: #f1ecff;
}

.ticket-timeline-step.is-baggage .ticket-timeline-icon {
  color: #c44d7a;
  background: #fdeef4;
}

.ticket-timeline-label,
.ticket-timeline-when,
.ticket-timeline-place {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.ticket-timeline-label {
  grid-area: label;
  color: #131c4e;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.25;
}

.ticket-timeline-when {
  grid-area: when;
  color: #2a3f74;
  font-size: 0.8rem;
  font-weight: 650;
}

.ticket-timeline-place {
  grid-area: place;
  color: #5a6d98;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
}

.ticket-section-title {
  margin: 0;
  color: #2a3f74;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ticket-people-list,
.ticket-legs {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.ticket-person,
.ticket-leg {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(16, 40, 90, 0.06);
}

.ticket-layover {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 10px;
  background: #eef4ff;
  color: #2a3f74;
  font-size: 0.76rem;
  font-weight: 700;
}

.ticket-person-name,
.ticket-leg-route {
  color: #131c4e;
  font-size: 0.92rem;
  font-weight: 700;
}

.ticket-leg-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.ticket-person-meta,
.ticket-leg-meta {
  color: #5a6d98;
  font-size: 0.78rem;
  font-weight: 600;
}

.ticket-terms {
  margin: 0;
  color: #5a6d98;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

.ticket-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
}

.ticket-pdf {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(47, 107, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
  color: #1a3f9c;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ticket-pdf:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(47, 107, 255, 0.14);
}

.ticket-pdf:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.ticket-pdf-icon {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
}

.ticket-pdf-icon svg {
  width: 100%;
  height: 100%;
}

.ticket-card-art {
  position: relative;
  grid-area: art;
  min-height: 10.5rem;
  aspect-ratio: 2 / 1;
  background:
    radial-gradient(80% 90% at 70% 20%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(160deg, #d7ecff 0%, #c5e0ff 55%, #b7d6ff 100%);
}

.ticket-card-art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ticket-card-art.is-empty {
  display: grid;
  place-items: center;
}

.ticket-card-art-fallback {
  color: rgba(19, 28, 78, 0.35);
  font-family: var(--round);
  font-size: 1.4rem;
  font-weight: 800;
}

.ticket-card-toggle {
  appearance: none;
  position: absolute;
  z-index: 2;
  inset-inline-end: 0.7rem;
  bottom: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2f6bff;
  box-shadow: 0 8px 18px rgba(18, 48, 96, 0.16);
  cursor: pointer;
}

.ticket-chevron {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ticket-chevron svg {
  width: 100%;
  height: 100%;
}

.ticket-card.is-open .ticket-chevron {
  transform: rotate(180deg);
}

.ticket-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.4rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px dashed rgba(47, 107, 255, 0.35);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  color: #1a3f9c;
  text-decoration: none;
  font-weight: 750;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ticket-plan:hover {
  background: #fff;
  border-color: rgba(47, 107, 255, 0.55);
  transform: translateY(-1px);
}

.ticket-plan-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #2f6bff;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
}

.ticket-plan-plane {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  color: #2f6bff;
}

.ticket-plan-plane svg {
  width: 100%;
  height: 100%;
}

@media (min-width: 860px) {
  .ticket-card {
    grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 32%);
    grid-template-areas:
      "body art"
      "details details";
  }

  .ticket-card-art {
    align-self: stretch;
    min-height: 14rem;
    aspect-ratio: auto;
  }

  .ticket-card-art-img {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .ticket-card-body {
    min-height: 14rem;
    padding: 1.35rem 1.5rem 1.3rem;
  }

  .ticket-actions {
    margin-top: auto;
  }

  .ticket-card.is-open .ticket-details-sheet {
    padding: 1.45rem 1.5rem 1.35rem;
  }

  .ticket-facts,
  .ticket-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ticket-timeline {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  #view-tickets {
    padding-inline: 2.25rem;
  }

  .ticket-card-body {
    padding: 1.5rem 1.8rem 1.45rem;
  }

  .ticket-card.is-open .ticket-details-sheet {
    padding: 1.55rem 1.8rem 1.5rem;
  }
}

@media (max-width: 859px) {
  #view-tickets {
    padding-top: 0.55rem;
    padding-right: max(0.95rem, env(safe-area-inset-right, 0px));
    padding-bottom: 1.2rem;
    padding-left: max(0.95rem, env(safe-area-inset-left, 0px));
  }

  .tickets-cloud-b,
  .tickets-cloud-d {
    display: none;
  }

  .tickets-cloud-a {
    top: -0.2rem;
    inset-inline-end: -2rem;
    width: 7.2rem;
    opacity: 0.55;
  }

  .tickets-cloud-c {
    top: 0.6rem;
    inset-inline-start: -2.1rem;
    width: 6.6rem;
    opacity: 0.5;
  }

  #view-tickets .panel-head h1 {
    font-size: 1.7rem;
  }

  .ticket-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticket-card {
    animation: none;
  }

  .ticket-details,
  .ticket-details-sheet,
  .ticket-chevron {
    transition: none;
  }
}

/* --- Custom pickers ------------------------------------------------------ */

.picker {
  position: relative;
}

.picker-trigger {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 3.15rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--faint);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  text-align: start;
  cursor: pointer;
}

.picker.has-value .picker-trigger { color: var(--text); }

.picker-trigger:focus-visible,
.picker.is-open .picker-trigger {
  outline: none;
  border-color: rgba(62, 224, 200, 0.5);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.picker-leading {
  display: inline-flex;
  flex: none;
  align-items: center;
}

.picker-leading:empty {
  display: none;
}

.picker-trigger-copy {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-chevron {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--faint);
  transition: transform 0.2s ease;
}

.picker.is-open .picker-chevron { transform: rotate(180deg); }

.picker.is-date {
  display: block;
}

.picker.is-date .picker-date-input {
  padding-inline-end: 3rem;
  font-variant-numeric: tabular-nums;
}

.picker-date-cal {
  position: absolute;
  inset-inline-end: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.picker-date-cal:hover,
.picker-date-cal:focus-visible,
.picker.is-open .picker-date-cal {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.picker-date-cal:focus-visible {
  outline: none;
}

.picker-date-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.picker-flag { flex: none; }

.picker-layer {
  position: fixed;
  inset: 0;
  z-index: 42;
}

.picker-layer.is-sheet {
  display: grid;
  place-items: end center;
  background: rgba(5, 6, 9, 0.64);
  backdrop-filter: blur(8px);
}

.picker-layer.is-popover {
  background: transparent;
}

.picker-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.picker-layer.is-sheet .picker-panel {
  width: min(100%, 32rem);
  max-height: min(78dvh, 42rem);
  border-radius: 22px 22px 0 0;
  padding: 0.4rem 0.85rem calc(0.85rem + var(--dock-h) + var(--safe-b));
}

.picker-layer.is-popover .picker-panel {
  position: fixed;
  border-radius: 16px;
  padding: 0.45rem;
  overflow: hidden;
}

.picker-handle {
  width: 36px;
  height: 4px;
  margin: 0.35rem auto 0.15rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.2rem 0.55rem;
}

.picker-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
}

.picker-x {
  appearance: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.picker-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.picker-search {
  width: 100%;
  flex: none;
  margin: 0 0 0.45rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  padding: 0.75rem 0.85rem;
  font-size: 16px;
  color: var(--text);
}

.picker-search:focus {
  outline: none;
  border-color: rgba(62, 224, 200, 0.5);
}

.picker-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.picker-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.85rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  cursor: pointer;
}

.picker-option:hover,
.picker-option:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.picker-option.is-active { background: var(--accent-dim); }

.picker-option-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.picker-option-meta {
  flex: none;
  color: var(--faint);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.picker-empty {
  padding: 1rem 0.7rem;
  color: var(--faint);
  font-size: 0.9rem;
  text-align: center;
}

.cal-nav {
  display: grid;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.cal-nav-btn,
.cal-nav-title {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.cal-nav-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
}

.cal-nav-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.cal-nav-icon {
  width: 18px;
  height: 18px;
}

.cal-nav-title {
  min-height: 2.75rem;
  padding: 0 0.6rem;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
}

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}

.cal-weekday {
  padding: 0.2rem 0 0.45rem;
  color: var(--faint);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.cal-pad { min-height: 2.75rem; }

.cal-day,
.cal-year {
  appearance: none;
  min-height: 2.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.cal-day:hover:not(:disabled),
.cal-year:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
}

.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--line-strong); }

.cal-day.is-selected,
.cal-year.is-selected {
  background: var(--accent);
  color: #05241f;
  font-weight: 600;
}

.cal-day.is-muted,
.cal-day:disabled,
.cal-year:disabled {
  color: var(--faint);
  opacity: 0.32;
  cursor: not-allowed;
}

.cal-years {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  max-height: 18rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cal-year.is-current:not(.is-selected) {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* After the shared dark-theme calendar rules so daylight pages keep ink. */
html:has(#view-wallet.is-active) .cal-day,
html:has(#view-wallet.is-active) .cal-year,
html:has(#view-cabinet.is-active) .cal-day,
html:has(#view-cabinet.is-active) .cal-year,
html:has(#view-contacts.is-active) .cal-day,
html:has(#view-contacts.is-active) .cal-year {
  color: #131c4e;
  font-weight: 600;
}

html:has(#view-wallet.is-active) .cal-day.is-muted,
html:has(#view-wallet.is-active) .cal-day:disabled,
html:has(#view-wallet.is-active) .cal-year:disabled,
html:has(#view-cabinet.is-active) .cal-day.is-muted,
html:has(#view-cabinet.is-active) .cal-day:disabled,
html:has(#view-cabinet.is-active) .cal-year:disabled,
html:has(#view-contacts.is-active) .cal-day.is-muted,
html:has(#view-contacts.is-active) .cal-day:disabled,
html:has(#view-contacts.is-active) .cal-year:disabled {
  color: #6d7aa0;
  opacity: 1;
}

@media (min-width: 721px) {
  .picker-layer.is-popover .picker-panel.is-calendar {
    width: 20.5rem;
    max-height: none;
    padding: 0.85rem;
  }
}

/* --- Login: the one door in, out on the daylight sky ---------------------- */

#view-login {
  position: relative;
  overflow-x: hidden;
  padding: 0.9rem 0.9rem 1.8rem;
}

.login {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: min(100%, 74rem);
  margin-inline: auto;
  min-height: 100%;
  align-content: start;
}

/* Soft weather behind everything — both flanks, so the sky is not one-sided. */
.login-cloud {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.login-cloud-a {
  top: 1%;
  inset-inline-end: -4%;
  width: clamp(11rem, 20vw, 18rem);
  opacity: 0.78;
}

.login-cloud-b {
  top: 18%;
  inset-inline-end: 18%;
  width: clamp(7rem, 13vw, 12rem);
  opacity: 0.55;
}

.login-cloud-c {
  top: 4%;
  inset-inline-start: -3%;
  width: clamp(10rem, 18vw, 16rem);
  opacity: 0.72;
}

.login-cloud-d {
  top: 28%;
  inset-inline-start: 8%;
  width: clamp(6.5rem, 11vw, 10rem);
  opacity: 0.48;
}

.login-cloud-e {
  bottom: 8%;
  inset-inline-start: -6%;
  width: clamp(9rem, 16vw, 14rem);
  opacity: 0.58;
}

.login-cloud-f {
  bottom: 14%;
  inset-inline-end: -5%;
  width: clamp(8rem, 14vw, 13rem);
  opacity: 0.5;
}

/* Sofia greets from beside the card. */
.login-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.login-sofia {
  display: block;
  width: auto;
  height: clamp(19rem, 56vh, 32rem);
  filter: drop-shadow(0 18px 26px rgba(24, 52, 102, 0.16));
  pointer-events: none;
  user-select: none;
}

.login-bubble {
  position: relative;
  margin: 0;
  padding: 0.72rem 1.15rem;
  border-radius: 1.4rem;
  background: #fff;
  color: #1a2a55;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  text-wrap: balance;
  box-shadow: 0 14px 30px rgba(20, 46, 96, 0.15);
}

.login-bubble::after {
  content: "";
  position: absolute;
  inset-inline-start: 1.4rem;
  bottom: -0.66rem;
  width: 1.2rem;
  height: 0.72rem;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 16% 100%);
}

html[dir="rtl"] .login-bubble::after {
  clip-path: polygon(0 0, 100% 0, 84% 100%);
}

.login-safe {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: #2f4a7c;
  font-size: 0.82rem;
  font-weight: 650;
  box-shadow: 0 12px 26px rgba(18, 48, 96, 0.12);
}

.login-safe svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: #1a5cff;
}

/* The reasons to bother, and the balloon that carries them. */
.login-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-balloon {
  width: clamp(4.2rem, 6.5vw, 6.2rem);
  height: auto;
  margin: 0 0 1.1rem;
  align-self: flex-end;
  animation: home-bob 6.5s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}

.login-perks {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-perk {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 1rem;
  border-radius: 18px;
  background: #fff;
  color: #22315c;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(24, 52, 102, 0.1);
}

.login-perk-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.login-perk-icon svg {
  width: 22px;
  height: 22px;
}

.login-perk-plans .login-perk-icon { background: #e8f8ee; color: #1e8a4c; }
.login-perk-personal .login-perk-icon { background: #ffeef4; color: #e0447c; }
.login-perk-time .login-perk-icon { background: #fff6de; color: #d99a1b; }

.login-tagline {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1.15rem;
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.85);
  color: #2f4a7c;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
  text-wrap: balance;
  box-shadow: 0 12px 28px rgba(24, 52, 102, 0.08);
}

/* The card carries the whole conversation; the host lede belongs to the old
   account page and has no seat here. */
.login-main {
  position: relative;
  z-index: 2;
  width: 100%;
}

#login-body > .lede {
  display: none;
}

#view-login .auth-card {
  margin-top: 0;
  padding: 1.8rem 1.6rem 1.4rem;
  border-radius: 26px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 24px 60px rgba(18, 48, 96, 0.14);
}

#view-login .auth-title {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.55rem, 4.5vw, 1.95rem);
  letter-spacing: -0.01em;
  line-height: 1.12;
}

#view-login .auth-title::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-inline-start: 0.28em;
  background: url("/static/web/home/sparkle.svg?v=2") no-repeat center / contain;
}

#view-login .auth-lede {
  margin: 0.5rem 0 1.2rem;
  color: #56638c;
  font-size: 0.92rem;
}

#view-login .notice {
  background: rgba(224, 68, 92, 0.1);
  color: #b32741;
}

#view-login .auth-provider {
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border-color: rgba(16, 40, 90, 0.14);
  background: #fff;
  color: #1c2b56;
  font-size: 1rem;
  font-weight: 650;
}

#view-login .auth-provider:hover {
  border-color: rgba(26, 92, 255, 0.4);
  background: #f6f9ff;
}

#view-login .auth-provider-mark {
  width: 24px;
  height: 24px;
}

#view-login .auth-divider {
  color: #8b97b8;
}

#view-login .auth-divider::before,
#view-login .auth-divider::after {
  background: rgba(16, 40, 90, 0.12);
}

#view-login .field {
  color: #5b6a92;
}

#view-login .field input {
  border-color: rgba(16, 40, 90, 0.16);
  background: #fff;
  color: #131c4e;
}

#view-login .field input:focus {
  border-color: rgba(26, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

#view-login .field-hint {
  color: #7d89ab;
}

#view-login .field-error {
  color: #c92f45;
}

#view-login .auth-field.has-error input {
  border-color: rgba(201, 47, 69, 0.55);
}

#view-login .auth-field.has-error input:focus {
  box-shadow: 0 0 0 4px rgba(201, 47, 69, 0.12);
}

#view-login .btn-primary {
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.02rem;
  box-shadow: 0 14px 28px rgba(58, 74, 208, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  #view-login .btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(58, 74, 208, 0.38);
  }
}

#view-login .btn-ghost {
  border-radius: 999px;
  border-color: rgba(16, 40, 90, 0.16);
  color: #44548a;
}

#view-login .auth-sent-title {
  color: #131c4e;
  font-family: var(--round);
  font-weight: 800;
  letter-spacing: -0.01em;
}

#view-login .auth-sent-copy {
  color: #56638c;
}

#view-login .auth-consent {
  text-align: center;
}

#view-login .consent-copy {
  color: #7d89ab;
}

#view-login .legal-link {
  color: #2f6bff;
  text-decoration-color: rgba(47, 107, 255, 0.35);
}

#view-login .legal-link:hover {
  text-decoration-color: #2f6bff;
}

/* Desktop: Sofia on one flank, the reasons on the other, the card between. */
@media (min-width: 1000px) {
  #view-login .login {
    grid-template-columns: minmax(15rem, 1fr) minmax(23rem, 27rem) minmax(13rem, 1fr);
    grid-template-areas: "hero card side";
    align-items: center;
    align-content: center;
    column-gap: clamp(1.4rem, 4vw, 4rem);
    padding-block: 0.5rem;
  }

  .login-hero { grid-area: hero; }
  .login-main { grid-area: card; }
  .login-side { grid-area: side; }

  .login-bubble {
    align-self: flex-start;
    margin-inline-start: 6%;
  }

  .login-safe {
    align-self: flex-start;
    margin-top: -1.4rem;
  }

  .login-cloud-a {
    top: -2%;
    inset-inline-end: -6%;
    width: clamp(13rem, 22vw, 20rem);
  }

  .login-cloud-b {
    top: 12%;
    inset-inline-end: 22%;
    width: clamp(8rem, 12vw, 11rem);
  }

  .login-cloud-c {
    top: -1%;
    inset-inline-start: -8%;
    width: clamp(12rem, 20vw, 18rem);
  }

  .login-cloud-d {
    top: 22%;
    inset-inline-start: 4%;
    width: clamp(7rem, 11vw, 10rem);
  }

  .login-cloud-e {
    bottom: 6%;
    inset-inline-start: -10%;
    width: clamp(11rem, 18vw, 16rem);
  }

  .login-cloud-f {
    bottom: 18%;
    inset-inline-end: -4%;
    width: clamp(9rem, 14vw, 13rem);
  }
}

/* A phone gets its own composition: a small wave up top, then the card,
   then the three reasons — nothing decorative fighting for room. */
@media (max-width: 999px) {
  .login {
    max-width: 30rem;
    gap: 0.9rem;
    padding-top: 0.3rem;
  }

  .login-balloon,
  .login-tagline,
  .login-safe {
    display: none;
  }

  /* Two small ones, one on each side — the rest would crowd the card. */
  .login-cloud-b,
  .login-cloud-d,
  .login-cloud-e,
  .login-cloud-f {
    display: none;
  }

  .login-cloud-a {
    top: -0.4rem;
    inset-inline-end: -2.2rem;
    width: 7.5rem;
    opacity: 0.55;
  }

  .login-cloud-c {
    top: 0.2rem;
    inset-inline-start: -2.4rem;
    width: 6.8rem;
    opacity: 0.5;
  }

  .login-hero {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    padding-inline: 0.2rem;
  }

  .login-sofia {
    order: -1;
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 4%;
    background: linear-gradient(180deg, #ffffff 0%, #d6ecff 100%);
    box-shadow: 0 10px 22px rgba(18, 48, 96, 0.14);
    filter: none;
  }

  .login-bubble {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }

  .login-bubble::after {
    inset-inline-start: -0.35rem;
    bottom: auto;
    top: 50%;
    width: 0.72rem;
    height: 0.9rem;
    transform: translateY(-50%);
    clip-path: polygon(100% 0, 100% 100%, 0 42%);
  }

  html[dir="rtl"] .login-bubble::after {
    clip-path: polygon(0 0, 0 100%, 100% 42%);
  }

  #view-login .auth-card {
    padding: 1.5rem 1.15rem 1.2rem;
    border-radius: 22px;
  }

  .login-perk {
    padding: 0.6rem 0.85rem;
    border-radius: 16px;
    font-size: 0.88rem;
  }

  .login-perk-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .login-perk-icon svg {
    width: 19px;
    height: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

#view-admin {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

html:has(#view-admin.is-active) .dock {
  display: none;
}

.admin {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  background: transparent;
}

.admin-sidebar {
  flex: none;
  width: 12.25rem;
  margin: 0 0 1rem 1rem;
  padding: 0.95rem 0.75rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(18, 48, 96, 0.07);
  overflow: hidden;
  transition: width 0.22s ease, margin 0.22s ease, padding 0.22s ease;
}

.admin.is-collapsed .admin-sidebar {
  width: 0;
  margin-left: 0;
  padding-left: 0;
  padding-right: 0;
}

.admin-sidebar-kicker {
  margin: 0 0.55rem 0.65rem;
  color: #7a89a8;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-nav {
  display: grid;
  gap: 0.12rem;
}

.admin-nav-link {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  color: #4b5d80;
  font-size: 0.84rem;
  line-height: 1.2;
}

.admin-nav-link:hover {
  color: #6d4cff;
  background: #f2edff;
}

.admin-nav-link.is-active {
  color: #6d4cff;
  background: #f2edff;
}

.admin-pane {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.admin-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  height: 2.2rem;
  padding: 0 1rem;
}

.admin-toggle {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0.38rem 0.32rem;
  place-content: center;
  gap: 0.18rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4b5d80;
}

.admin-toggle span {
  display: block;
  height: 1px;
  width: 0.95rem;
  background: currentColor;
}

.admin-toggle:hover {
  color: #6d4cff;
  background: #f2edff;
}

.admin-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.15rem 1.15rem 1.4rem;
  container-type: inline-size;
}

.admin-title {
  margin: 0 0 0.75rem;
  color: #10224f;
  font-size: 1.2rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.admin-back,
.admin-text-link {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: #4b5d80;
  font-size: 0.75rem;
}

.admin-back:hover,
.admin-text-link:hover {
  color: #6d4cff;
}

.admin-note {
  margin: 0;
  color: #4b5d80;
  font-size: 0.82rem;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 48, 96, 0.07);
}

.admin-table {
  width: 100%;
  min-width: 52rem;
  table-layout: fixed;
  border-collapse: collapse;
}

.admin-table-users {
  min-width: 58rem;
}

.admin-table-users th:nth-child(1),
.admin-table-users td:nth-child(1) { width: 14%; white-space: normal; }
.admin-table-users th:nth-child(2),
.admin-table-users td:nth-child(2) { width: 12%; font-variant-numeric: tabular-nums; }
.admin-table-users th:nth-child(3),
.admin-table-users td:nth-child(3) { width: 8%; font-variant-numeric: tabular-nums; }
.admin-table-users th:nth-child(4),
.admin-table-users td:nth-child(4) { width: 15%; }
.admin-table-users th:nth-child(5),
.admin-table-users td:nth-child(5) { width: 15%; }
.admin-table-users th:nth-child(6),
.admin-table-users td:nth-child(6) { width: 13%; }
.admin-table-users th:nth-child(7),
.admin-table-users td:nth-child(7) { width: 13%; }
.admin-table-users th:nth-child(8),
.admin-table-users td:nth-child(8) { width: 10%; }

.admin-table-chats th:nth-child(1),
.admin-table-chats td:nth-child(1) { width: 22%; }
.admin-table-chats th:nth-child(2),
.admin-table-chats td:nth-child(2) { width: 46%; }
.admin-table-chats th:nth-child(3),
.admin-table-chats td:nth-child(3) { width: 20%; }
.admin-table-chats th:nth-child(4),
.admin-table-chats td:nth-child(4) { width: 12%; }

.admin-table-funds {
  min-width: 52rem;
}

.admin-table-funds th:nth-child(1),
.admin-table-funds td:nth-child(1) { width: 16%; font-variant-numeric: tabular-nums; }
.admin-table-funds th:nth-child(2),
.admin-table-funds td:nth-child(2) { width: 22%; white-space: normal; }
.admin-table-funds th:nth-child(3),
.admin-table-funds td:nth-child(3) { width: 22%; font-variant-numeric: tabular-nums; }
.admin-table-funds th:nth-child(4),
.admin-table-funds td:nth-child(4) { width: 20%; }
.admin-table-funds th:nth-child(5),
.admin-table-funds td:nth-child(5) { width: 20%; }

.admin-table-activity th:nth-child(1),
.admin-table-activity td:nth-child(1) { width: 16%; white-space: normal; }
.admin-table-activity th:nth-child(2),
.admin-table-activity td:nth-child(2) { width: 12%; }
.admin-table-activity th:nth-child(3),
.admin-table-activity td:nth-child(3) { width: 12%; }
.admin-table-activity th:nth-child(4),
.admin-table-activity td:nth-child(4) { width: 16%; }
.admin-table-activity th:nth-child(5),
.admin-table-activity td:nth-child(5) { width: 22%; }
.admin-table-activity th:nth-child(6),
.admin-table-activity td:nth-child(6) { width: 22%; }

.admin-table th,
.admin-table td {
  padding: 0.42rem 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.78rem;
  line-height: 1.25;
  color: #10224f;
  border-bottom: 1px solid rgba(16, 34, 79, 0.06);
}

.admin-table th {
  color: #7a89a8;
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  background: #f7fbff;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table tr.is-link {
  cursor: pointer;
}

.admin-table tr.is-link:hover td {
  background: #f4f8ff;
}

.admin-who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.2;
}

.admin-who-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.admin-who-link {
  color: inherit;
  text-decoration: none;
}

.admin-who-link:hover {
  color: #6d4cff;
}

.admin-table-amount {
  font-variant-numeric: tabular-nums;
}

.admin-table-amount.is-in {
  color: #1e8a4c;
}

.admin-table-amount-wrap {
  display: grid;
  gap: 0.08rem;
}

.admin-table-paid {
  color: #7a89a8;
  font-size: 0.68rem;
  line-height: 1.25;
}

.admin-fund {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem;
  min-width: 0;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.admin-fund-now {
  font-weight: 600;
}

.admin-fund-sep,
.admin-fund-was {
  color: #7a89a8;
  font-weight: 400;
}

.admin-table-funds tr[data-client-cancelled] {
  display: none;
}

.admin-table-funds.is-showing-client-cancelled tr[data-client-cancelled] {
  display: table-row;
}

.admin-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  color: #4b5d80;
  font-size: 0.76rem;
  cursor: pointer;
  user-select: none;
}

.admin-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.admin-switch-ui {
  position: relative;
  width: 1.7rem;
  height: 0.95rem;
  border-radius: 999px;
  background: #d8dee9;
}

.admin-switch-ui::after {
  position: absolute;
  top: 0.12rem;
  left: 0.12rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #fff;
  transition: left 0.16s ease;
  content: "";
}

.admin-switch input:checked + .admin-switch-ui {
  background: #6d4cff;
}

.admin-switch input:checked + .admin-switch-ui::after {
  left: 0.88rem;
}

.admin-switch input:focus-visible + .admin-switch-ui {
  outline: 2px solid #6d4cff;
  outline-offset: 2px;
}

.admin-pay-status {
  color: #4b5d80;
}

.admin-pay-status.is-paid {
  color: #1e8a4c;
}

.admin-pay-status.is-waiting,
.admin-pay-status.is-partial,
.admin-pay-status.is-review,
.admin-pay-status.is-held {
  color: #b45309;
}

.admin-pay-status.is-cancelled {
  color: #7a89a8;
}

.admin-pay-status.is-released,
.admin-pay-status.is-refunded,
.admin-pay-status.is-reversing {
  color: #c23b3b;
  font-weight: 600;
}

.admin-pay-status.is-unpaid {
  color: #c23b3b;
  font-weight: 560;
}

.admin-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 34, 79, 0.28);
}

.admin-sheet {
  display: grid;
  gap: 0.7rem;
  width: min(40rem, 100%);
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.05rem 0.85rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(18, 48, 96, 0.16);
}

.admin-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-sheet-kicker {
  margin: 0;
  color: #7a89a8;
  font-size: 0.64rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-sheet-ref {
  margin: 0.18rem 0 0;
}

.admin-sheet-ref .admin-copy {
  align-items: center;
}

.admin-sheet-ref .admin-copy-value {
  color: #10224f;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.admin-sheet-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.admin-sheet .admin-pay-status.admin-sheet-status {
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: #eef2f8;
  font-size: 0.72rem;
  font-weight: 550;
}

.admin-sheet .admin-pay-status.is-paid {
  background: #e8f6ee;
}

.admin-sheet .admin-pay-status.is-held,
.admin-sheet .admin-pay-status.is-waiting,
.admin-sheet .admin-pay-status.is-partial,
.admin-sheet .admin-pay-status.is-review {
  background: #fff4e5;
}

.admin-sheet .admin-pay-status.is-unpaid {
  background: #fdecec;
}

.admin-sheet .admin-pay-status.is-released,
.admin-sheet .admin-pay-status.is-refunded,
.admin-sheet .admin-pay-status.is-reversing {
  background: #fdecec;
  font-weight: 600;
}

.admin-sheet-x {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f2f4f8;
  color: #4b5d80;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.admin-sheet-x:hover {
  background: #e7ebf3;
  color: #10224f;
}

.admin-sheet-money {
  display: grid;
  gap: 0.4rem;
}

.admin-sheet-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.admin-sheet-tile {
  padding: 0.65rem 0.7rem 0.6rem;
  border-radius: 12px;
  background: #f6f8fc;
}

.admin-sheet-tile.is-paid {
  background: #f3f1ff;
}

.admin-sheet-tile.is-credit {
  background: #eef8f1;
}

.admin-sheet-tile-label,
.admin-sheet-tile-hint {
  margin: 0;
  color: #7a89a8;
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.04em;
}

.admin-sheet-tile-value {
  margin: 0.18rem 0 0;
  color: #10224f;
  font-size: 1.02rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.admin-sheet-tile.is-credit .admin-sheet-tile-value {
  color: #1e8a4c;
}

.admin-sheet-tile-hint {
  margin-top: 0.12rem;
}

.admin-sheet-ledger-note {
  margin: 0;
  color: #7a89a8;
  font-size: 0.72rem;
}

.admin-sheet-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.admin-sheet-block {
  min-width: 0;
  padding: 0.7rem 0.75rem 0.75rem;
  border-radius: 12px;
  background: #f7f9fc;
}

.admin-sheet-block.is-reversal {
  background: #fdecec;
}

.admin-sheet-label {
  margin: 0 0 0.5rem;
  color: #7a89a8;
  font-size: 0.64rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-sheet-person {
  margin: 0 0 0.45rem;
}

.admin-sheet-person .admin-who-name {
  font-weight: 600;
  white-space: normal;
}

.admin-sheet-kv {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.4rem 0.65rem;
  align-items: start;
  margin-top: 0.32rem;
}

.admin-sheet-kv-label {
  color: #7a89a8;
  font-size: 0.72rem;
}

.admin-sheet-kv-value {
  color: #10224f;
  font-size: 0.8rem;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.admin-sheet-kv.is-stack {
  grid-template-columns: 1fr;
  gap: 0.1rem;
  margin-top: 0.5rem;
}

.admin-sheet-kv.is-stack .admin-sheet-kv-label {
  font-size: 0.66rem;
}

.admin-sheet-kv.is-dim .admin-sheet-kv-value {
  color: #8a96ad;
  font-weight: 500;
}

.admin-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.45rem;
  min-width: 0;
}

.admin-copy-value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: #10224f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
  user-select: all;
}

.admin-copy-btn {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #6d4cff;
  font-size: 0.7rem;
  cursor: pointer;
}

.admin-copy-btn:hover {
  color: #4d32d6;
}

.admin-copy-btn.is-done {
  color: #1e8a4c;
}

.admin-sheet-history {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-sheet-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: baseline;
}

.admin-sheet-history-what {
  color: #10224f;
  font-size: 0.8rem;
  font-weight: 550;
}

.admin-sheet-history-when {
  color: #7a89a8;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-sheet-history-row.is-credited .admin-sheet-history-what {
  color: #1e8a4c;
  font-weight: 600;
}

.admin-sheet-actions {
  display: grid;
  gap: 0.55rem;
}

.admin-sheet-code {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.65rem;
  border: 1px solid #d7deec;
  border-radius: 10px;
  color: #10224f;
  font-size: 0.84rem;
}

.admin-sheet-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-sheet-action {
  appearance: none;
  padding: 0.5rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #7b5cff 0%, #6d4cff 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(109, 76, 255, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, background 0.12s ease;
}

.admin-sheet-action:hover {
  filter: brightness(1.06);
  box-shadow: 0 9px 18px rgba(109, 76, 255, 0.36);
  transform: translateY(-1px);
}

.admin-sheet-action:active {
  filter: none;
  box-shadow: 0 2px 8px rgba(109, 76, 255, 0.22);
  transform: translateY(0);
}

.admin-sheet-action:focus-visible {
  outline: 2px solid #6d4cff;
  outline-offset: 2px;
}

.admin-sheet-action.is-quiet {
  background: #eef2f8;
  color: #10224f;
  box-shadow: none;
}

.admin-sheet-action.is-quiet:hover {
  background: #e2e8f2;
  filter: none;
  box-shadow: none;
}

.admin-sheet-action.is-quiet:active {
  background: #d8dfeb;
  box-shadow: none;
}

.admin-sheet-action:disabled,
.admin-sheet-action:disabled:hover,
.admin-sheet-action:disabled:active {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
  transform: none;
  box-shadow: none;
}

.admin-sheet-confirm {
  display: grid;
  gap: 0.45rem;
}

.admin-sheet-confirm-ask {
  margin: 0;
  color: #10224f;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.admin-sheet-action-note {
  margin: 0;
  color: #4b5d80;
  font-size: 0.72rem;
}

@media (prefers-reduced-motion: reduce) {
  .admin-sheet-action {
    transition: none;
  }

  .admin-sheet-action:hover,
  .admin-sheet-action:active {
    transform: none;
  }
}

.admin-sheet-foot {
  display: flex;
  justify-content: flex-end;
}

.admin-sheet-close {
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: #7a89a8;
  font-size: 0.76rem;
  cursor: pointer;
}

.admin-sheet-close:hover {
  color: #10224f;
}

@media (max-width: 640px) {
  .admin-sheet-pair,
  .admin-sheet-ledger {
    grid-template-columns: 1fr;
  }

  .admin-sheet-history-row {
    grid-template-columns: 1fr;
    gap: 0.08rem;
  }
}

.admin-mono {
  display: block;
  overflow-wrap: anywhere;
  color: #10224f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  user-select: all;
}

.admin-who-hint {
  color: #7a89a8;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  overflow: hidden;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  height: 1.15rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: #f2edff;
  color: #6d4cff;
  font-size: 0.66rem;
}

.admin-chip-telegram_miniapp,
.admin-chip-telegram_bot {
  background: #e4f1ff;
  color: #1a6fd4;
}

.admin-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

@container (min-width: 38rem) {
  .admin-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-card {
  margin: 0 0 0.75rem;
  padding: 0.8rem 0.9rem 0.9rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 48, 96, 0.07);
}

.admin-pair > .admin-card {
  margin: 0;
  min-width: 0;
}

.admin-account-card {
  container-type: inline-size;
}

.admin-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem 1.4rem;
  align-items: start;
}

.admin-account-figure {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 0.12rem;
}

.admin-account-kicker {
  margin: 0;
  color: #7a89a8;
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-account-amount {
  margin: 0;
  color: #10224f;
  font-size: 1.55rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.admin-account-amount.is-held {
  color: #b45309;
}

@container (min-width: 18rem) {
  .admin-account {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-account-figure {
    justify-items: end;
    text-align: right;
    padding-top: 0.08rem;
  }
}

.admin-card-title {
  margin: 0 0 0.55rem;
  color: #7a89a8;
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-fold {
  padding: 0;
}

.admin-fold-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  list-style: none;
  cursor: pointer;
}

.admin-fold-head:hover .admin-card-title,
.admin-fold-head:hover .admin-fold-count {
  color: #6d4cff;
}

.admin-fold-head:hover::after {
  border-color: #6d4cff;
}

.admin-fold-head::-webkit-details-marker,
.admin-fold-head::marker {
  display: none;
  content: "";
}

.admin-fold-head .admin-card-title {
  margin: 0;
}

.admin-fold-count {
  margin-left: auto;
  color: #4b5d80;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.admin-fold-head::after {
  flex: none;
  width: 0.38rem;
  height: 0.38rem;
  margin-left: 0.15rem;
  border-right: 1.5px solid #7a89a8;
  border-bottom: 1.5px solid #7a89a8;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  content: "";
}

.admin-fold[open] > .admin-fold-head::after {
  transform: translateY(0.14rem) rotate(-135deg);
}

.admin-fold-body {
  display: grid;
  gap: 0.55rem;
  padding: 0 0.9rem 0.9rem;
}

.admin-ticket {
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: 14px;
  background: #f7fbff;
  border: 1px solid rgba(16, 34, 79, 0.06);
}

.admin-ticket-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.admin-ticket-route,
.admin-ticket-total {
  margin: 0;
  color: #10224f;
  font-size: 0.92rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.admin-ticket-total {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.admin-ticket-meta,
.admin-ticket-status {
  margin: 0.14rem 0 0;
  color: #4b5d80;
  font-size: 0.76rem;
}

.admin-ticket-status.is-issued {
  color: #1e8a4c;
}

.admin-ticket-status.is-paid,
.admin-ticket-status.is-issuing {
  color: #b45309;
}

.admin-ticket-legs {
  display: grid;
  gap: 0.18rem;
  margin: 0.45rem 0 0;
}

.admin-ticket-kicker {
  margin: 0.22rem 0 0;
  color: #7a89a8;
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-ticket-leg {
  margin: 0;
  color: #10224f;
  font-size: 0.76rem;
}

.admin-ticket .admin-facts {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(16, 34, 79, 0.06);
}

.admin-ticket-issue {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(16, 34, 79, 0.06);
}

.admin-ticket-issue-hint,
.admin-ticket-issue-write {
  margin: 0;
  color: #4b5d80;
  font-size: 0.76rem;
}

.admin-ticket-issue-write {
  color: #b45309;
}

.admin-facts {
  display: grid;
  grid-template-columns: 8.4rem minmax(0, 1fr);
  gap: 0.28rem 0.85rem;
  margin: 0;
}

.admin-fact {
  display: contents;
}

.admin-fact dt {
  color: #4b5d80;
  font-size: 0.75rem;
}

.admin-fact dd {
  margin: 0;
  color: #10224f;
  font-size: 0.8rem;
}

.admin-people {
  display: grid;
  gap: 0.45rem;
}

.admin-person {
  display: grid;
  gap: 0.12rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(16, 34, 79, 0.06);
}

.admin-person:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-person-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.84rem;
}

.admin-muted {
  margin: 0;
  color: #4b5d80;
  font-size: 0.75rem;
}

.admin-balance {
  margin: 0 0 0.55rem;
  color: #10224f;
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.admin-balance.is-held,
.admin-table-balance.is-held {
  color: #b45309;
}

.admin-facts > .admin-balance,
.admin-facts > .admin-sub,
.admin-facts > .admin-note,
.admin-facts > .admin-table-wrap,
.admin-facts > .admin-wallet-log,
.admin-facts > .admin-link {
  grid-column: 1 / -1;
}

.admin-wallet-log {
  display: grid;
  gap: 0.7rem;
}

.admin-topup {
  padding: 0.7rem 0.8rem 0.75rem;
  border-radius: 14px;
  background: #f7fbff;
  border: 1px solid rgba(16, 34, 79, 0.06);
}

.admin-topup-head {
  display: grid;
  gap: 0.12rem;
}

.admin-topup-amount {
  margin: 0;
  color: #10224f;
  font-size: 1rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.admin-topup-amount.is-in {
  color: #1e8a4c;
}

.admin-topup-meta,
.admin-topup-status,
.admin-topup-money {
  margin: 0;
  color: #4b5d80;
  font-size: 0.76rem;
}

.admin-topup-money {
  margin-top: 0.2rem;
}

.admin-topup-status.is-credited {
  color: #1e8a4c;
}

.admin-topup-status.is-needs_review,
.admin-topup-status.is-partial {
  color: #b45309;
}

.admin-topup-events {
  margin: 0.55rem 0 0;
  padding: 0.5rem 0 0;
  border-top: 1px solid rgba(16, 34, 79, 0.06);
  list-style: none;
  display: grid;
  gap: 0.32rem;
}

.admin-topup-event {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.55rem;
  align-items: baseline;
}

.admin-topup-event-when {
  color: #7a89a8;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.admin-topup-event-text {
  color: #10224f;
  font-size: 0.78rem;
}

.admin-sub {
  margin: 0.4rem 0 0.4rem;
  color: #7a89a8;
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-link {
  display: inline-flex;
  margin-top: 0.45rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: #f2edff;
  color: #6d4cff;
  font-size: 0.76rem;
}

.admin-link:hover {
  background: #e8e0ff;
}

.admin-chip-linked {
  background: #ece6ff;
  color: #5b3cc4;
}

.admin-sync {
  container-type: inline-size;
}

.admin-sync-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-sync-head .admin-card-title {
  margin: 0;
}

.admin-sync-lede {
  margin: 0 0 0.75rem;
  color: #4b5d80;
  font-size: 0.8rem;
}

.admin-sync-sides {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
}

@container (min-width: 38rem) {
  .admin-sync-sides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-sync-side {
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: 14px;
  background: #f7fbff;
  border: 1px solid rgba(16, 34, 79, 0.06);
}

.admin-sync-amount {
  margin: 0.12rem 0 0.2rem;
  color: #10224f;
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.admin-sync-after {
  margin: 0 0 0.75rem;
}

.admin-sync-ids {
  margin-top: 0.65rem;
  color: #7a89a8;
  font-size: 0.72rem;
}

.admin-sync-ids summary {
  cursor: pointer;
}

.admin-log.is-archive .admin-line {
  background: #f6f4ee;
}

.admin-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.admin-body.is-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0 1.15rem 0;
}

.admin-chat-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 1rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(18, 48, 96, 0.07);
}

.admin-chat-who {
  flex: 1 1 10rem;
  min-width: 0;
}

.admin-chat-who .admin-back {
  margin-bottom: 0.12rem;
}

.admin-chat-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.admin-chat-who .admin-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-chat-tools {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  margin-inline-start: auto;
}

.admin-chat-logs {
  margin: 0;
  height: 2rem;
  padding: 0 0.75rem 0 0.55rem;
  border: 1px solid rgba(18, 48, 96, 0.08);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(18, 48, 96, 0.05);
  color: #4b5d80;
  font-size: 0.74rem;
}

.admin-chat-logs:has(input:checked) {
  border-color: rgba(109, 76, 255, 0.18);
  background: #f4f0ff;
  color: #5a3bb5;
}

.admin-chat-account {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 2rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(18, 48, 96, 0.08);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(18, 48, 96, 0.05);
  color: #4b5d80;
  font-size: 0.74rem;
  text-decoration: none;
}

.admin-chat-account:hover,
.admin-chat-logs:hover {
  color: #6d4cff;
  background: #f2edff;
  border-color: transparent;
}

.admin-chat-account:focus-visible {
  outline: 2px solid #6d4cff;
  outline-offset: 2px;
}

.admin-chat-thread {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.15rem 0 1.6rem;
  scrollbar-color: rgba(26, 60, 120, 0.22) transparent;
}

.admin-chat-older {
  display: block;
  width: min(100%, 40rem);
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.2rem;
  border: 0;
  background: transparent;
  color: #4b5d80;
  font: inherit;
  font-size: 0.75rem;
  text-align: start;
  cursor: pointer;
}

.admin-chat-older:hover {
  color: #6d4cff;
}

.admin-chat-older:disabled {
  cursor: progress;
}

.admin-log.transcript {
  width: min(100%, 40rem);
  padding-bottom: 1.6rem;
}

.admin-log:not(.is-showing-logs) .admin-floor,
.admin-log:not(.is-showing-logs) .bubble.is-antony {
  display: none;
}

.admin-log .offer-pick:disabled,
.admin-log .offer-flight:disabled,
.admin-log .chip:disabled {
  cursor: default;
  opacity: 1;
}

.admin-floor {
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem 1.05rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(138, 122, 90, 0.18);
  background: linear-gradient(180deg, #fbf6ec 0%, #f3eee3 100%);
  box-shadow: 0 12px 28px rgba(60, 48, 28, 0.07);
}

.admin-floor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.admin-floor-who {
  color: #8a7a5a;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-floor-mark {
  color: #2a261c;
  font-size: 0.95rem;
  font-weight: 560;
}

.admin-floor-outcome,
.admin-floor-reason {
  margin-inline-start: auto;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: rgba(109, 76, 255, 0.1);
  color: #5a3bb5;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

.admin-floor-reason {
  background: rgba(138, 122, 90, 0.14);
  color: #6b5b3c;
}

.admin-floor-outcome.is-retry {
  background: rgba(196, 122, 46, 0.14);
  color: #8a4f12;
}

.admin-floor-outcome.is-safe_line {
  background: rgba(30, 138, 76, 0.12);
  color: #1b6b3d;
}

.admin-floor-outcome.is-intervened {
  background: rgba(109, 76, 255, 0.14);
  color: #5a3bb5;
}

.admin-floor-outcome.is-miss,
.admin-floor-outcome.is-logic_error {
  background: rgba(176, 62, 46, 0.12);
  color: #8a2f22;
}

.admin-floor-outcome.is-note {
  background: rgba(138, 122, 90, 0.14);
  color: #6b5b3c;
}

.admin-floor-block {
  display: grid;
  gap: 0.22rem;
}

.admin-floor-label {
  margin: 0;
  color: #8a7a5a;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-floor-text {
  margin: 0;
  color: #2a261c;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.admin-floor-block.is-blocked .admin-floor-text {
  color: #6d6456;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(42, 38, 28, 0.05);
}

.admin-floor-block.is-sent {
  padding-inline-start: 0.7rem;
  border-inline-start: 2px solid #6d4cff;
}

.admin-floor-block.is-coach .admin-floor-text {
  color: #3d3426;
}

.admin-floor-fate {
  margin: 0;
  color: #6b5b3c;
  font-size: 0.78rem;
  line-height: 1.4;
}

.admin-table-playbook th:nth-child(3),
.admin-table-playbook td:nth-child(3) {
  white-space: normal;
  min-width: 14rem;
}

.admin-playbook-status,
.admin-playbook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-line {
  display: grid;
  gap: 0.12rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(18, 48, 96, 0.06);
}

.admin-line-user {
  background: #f4f8ff;
}

.admin-line-antony {
  background: #f7f2e8;
}

.admin-line-who {
  color: #7a89a8;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-line-text {
  margin: 0;
  color: #10224f;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

@media (max-width: 899px) {
  [data-admin-link] { display: none; }
  .admin-sidebar {
    width: 10.5rem;
    margin-left: 0.75rem;
  }
  .admin-body {
    padding: 0.15rem 0.85rem 1.1rem;
  }
  .admin-body.is-chat {
    padding-inline: 0.85rem;
  }
}


/* --- Sofia desk: three windows on the sky --------------------------------
   Search, options, and the trip are the same kind of card. The sky stays
   in the gaps. Under 1200px options and the trip share one column; under
   900px each window is a tab of its own. */

#view-assistant .desk {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: 0.45rem;
  width: 100%;
  padding: 0.35rem 0.55rem 0.5rem;
}

.desk-pane {
  display: none;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.desk-main {
  position: relative;
  grid-row: 2;
  container: desk-search / inline-size;
}

.desk-main,
.desk-offers,
.desk-trip {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(24, 52, 102, 0.1);
}

/* Search, options, and the trip are one glass card: sky in the header, the work in a lighter pane.
   Search carries the plane. Options carries a path of clouds. The trip carries its own sky. */
.desk-main,
.desk-offers,
.desk-trip {
  background:
    linear-gradient(180deg, rgba(214, 232, 255, 0.42) 0%, rgba(255, 255, 255, 0.55) 7.2rem, rgba(255, 255, 255, 0.78) 100%);
  backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: 0 22px 54px rgba(40, 80, 140, 0.14);
}

.desk-offers { container: offers / inline-size; }

.desk[data-pane="main"] .desk-main,
.desk[data-pane="offers"] .desk-offers,
.desk[data-pane="trip"] .desk-trip { display: flex; }

.desk-main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 22%, rgba(236, 246, 255, 0.42) 48%, rgba(244, 250, 255, 0.82) 100%),
    url("/static/web/home/search-sky.webp?v=1") 72% top / cover no-repeat;
  background-color: #c5e4fb;
}

.desk-main-head .desk-head-cloud { display: none; }

.desk-offers,
.desk-trip { grid-row: 2; }

/* Where: the tabs. Only drawn while a zone is hidden. */
.desk-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.25rem;
  margin: 0;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 22px rgba(24, 52, 102, 0.08);
}

.desk-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4b5d80;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.desk-tab[aria-selected="true"] {
  background: #fff;
  color: #10224f;
  box-shadow: 0 4px 14px rgba(24, 52, 102, 0.12);
}

.desk-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28);
}

.desk-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #7a3bf0);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.desk-tab.is-new::after {
  content: "";
  position: absolute;
  top: 0.38rem;
  inset-inline-end: 0.7rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #ff7a45;
  box-shadow: 0 0 0 0 rgba(255, 122, 69, 0.55);
  animation: desk-ping 1.6s ease-out infinite;
}

@keyframes desk-ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 69, 0.5); }
  80%, 100% { box-shadow: 0 0 0 0.55rem rgba(255, 122, 69, 0); }
}

/* Title and plane share the left of the first row. Classic, Together and Sofia
   take the corner the plane used to occupy. Flights and Hotels fill the next row. */
.desk-head-top {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.desk-search-bar {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}

.desk-modes {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.desk-mode-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(40, 80, 140, 0.08);
}

.desk-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7b8aab;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.desk-mode[aria-pressed="true"] {
  background: #fff;
  color: #1a2744;
  box-shadow: 0 4px 12px rgba(40, 70, 130, 0.14);
}

.desk-mode-sofia {
  padding-inline: 0.32rem 0.9rem;
}

.desk-mode-sofia[aria-pressed="true"] .desk-mode-face {
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(47, 107, 255, 0.32);
}

.desk-mode:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28);
}

.desk-mode-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3ee0c8, #2f6bff);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}

.desk-mode-face {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95);
}

.desk-search-kinds {
  display: block;
  width: 100%;
  min-width: 0;
}

.desk-search-kinds[hidden],
.desk[data-mode="sofia"] .desk-search-kinds {
  display: none;
}

.desk-search-kinds .classic-kinds {
  display: grid;
  width: 100%;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 0.22rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(40, 80, 140, 0.08);
}

.desk-search-kinds .classic-kinds::before {
  top: 0.22rem;
  bottom: 0.22rem;
  inset-inline-start: 0.22rem;
  width: calc((100% - 0.44rem) / var(--segments));
}

.desk-search-kinds .classic-kinds:has(.classic-kind:nth-child(2)[aria-selected="true"])::before {
  inset-inline-start: calc(0.22rem + (100% - 0.44rem) / 2);
}

.desk-search-kinds .classic-kind {
  min-height: 2.15rem;
  padding: 0 1.15rem;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.desk-search-kinds .classic-kind-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.desk-head.desk-main-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.55rem;
  overflow: hidden;
  min-height: 5.5rem;
  padding: 0.75rem 0.95rem 0.7rem;
  border-bottom: 0;
}

.desk-main-head .desk-head-copy {
  flex: none;
  min-width: 0;
  max-width: none;
}

.desk-main-head .desk-head-plane {
  flex: none;
  width: 6.8rem;
  min-width: 0;
  height: 3.5rem;
  margin-inline-end: auto;
}

.desk-head-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.desk-head-cloud {
  position: absolute;
  display: block;
  height: auto;
  user-select: none;
}

.desk-head-cloud-a {
  top: -1.4rem;
  inset-inline-start: 24%;
  width: 8.6rem;
  opacity: 0.92;
}

.desk-head-cloud-b {
  top: 1.15rem;
  inset-inline-end: 1%;
  width: 6.4rem;
  opacity: 0.72;
}

.desk-head-plane {
  position: relative;
  z-index: 0;
  flex: 0 1 8.75rem;
  width: 8.75rem;
  min-width: 5.5rem;
  height: 3.7rem;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 14px rgba(48, 90, 160, 0.18));
  pointer-events: none;
  user-select: none;
  animation: desk-plane-float 8s ease-in-out infinite;
}

@keyframes desk-plane-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.desk-head-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 8.5rem;
  max-width: 14rem;
}

.desk-main-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.desk[data-mode="together"] .desk-classic {
  flex: 1 1 auto;
  align-self: stretch;
  min-height: 0;
  max-height: none;
  height: 100%;
}

.desk[data-mode="together"] .desk-main-body > .chat {
  display: none;
}

.desk[data-mode="together"] .desk-classic:has(.classic.is-shut) {
  flex: 0 0 auto;
  align-self: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  border-bottom: 1px solid rgba(16, 40, 90, 0.08);
}

.desk[data-mode="together"] .desk-main-body:has(.classic.is-shut) > .chat {
  display: flex;
}

.desk[data-mode="together"] .classic-card { gap: 0.55rem; }

.desk[data-mode="together"] .classic.is-shut .classic-body { display: none; }

.desk[data-mode="together"] .classic.is-shut .classic-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.desk[data-mode="together"] .classic-disclosure {
  position: sticky;
  top: 0;
  z-index: 5;
}

.desk[data-mode="together"] .desk-classic:not(:has(.classic.is-shut)) .classic,
.desk[data-mode="together"] .desk-classic:not(:has(.classic.is-shut)) .classic-card,
.desk[data-mode="together"] .desk-classic:not(:has(.classic.is-shut)) .classic-body,
.desk[data-mode="together"] .desk-classic:not(:has(.classic.is-shut)) .classic-form:not([hidden]) {
  flex: 1 1 auto;
}

.desk-main-body > .chat,
.desk-main-body > .desk-classic { min-height: 0; }

.desk-main-body > .chat { flex: 1; }
.desk-main-body > .chat[hidden],
.desk-main-body > .desk-classic[hidden] { display: none; }

/* Pane chrome. */
.desk-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem 0.6rem;
  border-bottom: 1px solid rgba(16, 40, 90, 0.06);
}

.desk-title {
  margin: 0;
  color: #10224f;
  font-family: var(--round);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0;
}

/* Options header: the search sky, with a cloud path where the plane would fly. */
.desk-offers-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow: hidden;
  min-height: 4.8rem;
  padding: 0.75rem 0.95rem;
  border-bottom: 0;
}

.desk-offers-head .desk-head-copy {
  z-index: 1;
  flex: none;
  min-width: 0;
  max-width: none;
}

.desk-offers-head .desk-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.desk-cloud-path {
  position: relative;
  z-index: 0;
  flex: 1 1 auto;
  height: 3.4rem;
  min-width: 0;
  pointer-events: none;
}

.desk-cloud-path-item {
  position: absolute;
  display: block;
  height: auto;
  user-select: none;
  filter: drop-shadow(0 8px 10px rgba(48, 90, 160, 0.16));
}

.desk-cloud-path-item.is-a {
  inset-inline-start: 0;
  bottom: 0.15rem;
  width: min(4.4rem, 46%);
}

.desk-cloud-path-item.is-b {
  inset-inline-start: 34%;
  top: 0;
  width: min(3.1rem, 34%);
  opacity: 0.82;
  transform: scaleX(-1);
}

.desk-cloud-path-item.is-c {
  inset-inline-end: 0;
  bottom: 0.55rem;
  width: min(3.8rem, 40%);
}

@container offers (min-width: 40rem) {
  .desk-offers-head .desk-head-copy { max-width: 14rem; }
  .desk-offers-head .desk-title { font-size: 1.85rem; }
  .desk-cloud-path { height: 3.85rem; }
  .desk-cloud-path-item.is-a { width: 5rem; }
  .desk-cloud-path-item.is-b { width: 3.4rem; }
  .desk-cloud-path-item.is-c { width: 4.35rem; }
}

/* Trip: the sky scene fills the column. Title and suitcase sit on the sky. */
.desk-trip {
  container: trip / inline-size;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 14%, rgba(244, 250, 255, 0.34) 70%, rgba(244, 250, 255, 0.34) 100%),
    url("/static/web/home/trip-sky.webp?v=1") center 42% / cover no-repeat;
  background-color: #d4ebff;
}

.desk-trip-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 0.15rem;
  min-height: 0;
  padding: 0.95rem 0.35rem 0 1rem;
  overflow: visible;
  border-bottom: 0;
  background: transparent;
}

.desk-trip-copy {
  min-width: 0;
  padding-bottom: 0.7rem;
}

.desk-trip-head .desk-title {
  font-size: 1.62rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  white-space: normal;
}

.desk-trip-lede {
  margin: 0.32rem 0 0;
  max-width: 16rem;
  color: #5a6c8a;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.desk-trip-case {
  position: relative;
  z-index: 1;
  display: block;
  height: 6.05rem;
  width: auto;
  margin-bottom: -0.2rem;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 12px 14px rgba(24, 52, 102, 0.18));
}

@container trip (max-width: 24rem) {
  .desk-trip-head {
    padding-inline: 0.8rem 0.15rem;
  }
  .desk-trip-head .desk-title { font-size: 1.38rem; }
  .desk-trip-lede { font-size: 0.82rem; max-width: 13.5rem; }
  .desk-trip-case { height: 5.05rem; }
}

.desk-main-head .desk-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* The search column is the narrow one. Keep the plane beside the title and
   let the mode pill stay in the corner without clipping. */
@container desk-search (max-width: 33rem) {
  .desk-head.desk-main-head {
    row-gap: 0.45rem;
  }
  .desk-main-head .desk-head-plane {
    width: 5.6rem;
    height: 3rem;
  }
  .desk-head-top .desk-mode {
    min-height: 1.9rem;
    padding: 0 0.55rem;
    font-size: 0.78rem;
  }
  .desk-head-top .desk-mode-sofia { padding-inline: 0.22rem 0.5rem; }
  .desk-head-top .desk-mode-face { width: 1.15rem; height: 1.15rem; }
}

.desk-kinds {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(40, 80, 140, 0.08);
}

.desk-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.9rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7b8aab;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.desk-kind[aria-pressed="true"] {
  background: #fff;
  color: #1a2744;
  box-shadow: 0 4px 12px rgba(40, 70, 130, 0.12);
}

.desk-kind:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28);
}

.desk-kind-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #7a3bf0);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.desk-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.2rem 0.75rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 60, 120, 0.2) transparent;
}

.desk-shelf[hidden] { display: none; }

.shelf-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0 0 0.7rem;
}

.shelf-bar[hidden] { display: none; }

.shelf-bar .offer-search {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: calc(100% - 6.2rem);
}

.shelf-clear {
  flex: none;
  margin-top: 0.12rem;
  border: 1px solid rgba(16, 40, 90, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #44548a;
  padding: 0.42rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.shelf-clear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28);
}

.desk-shelf-stage { position: relative; }

.shelf-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(232, 242, 255, 0.62);
  backdrop-filter: blur(8px);
}

.shelf-veil[hidden] { display: none; }

.shelf-note {
  position: sticky;
  top: 1rem;
  width: min(22rem, calc(100% - 1.4rem));
  margin: 1.1rem auto 0;
  padding: 1.15rem 1.15rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  color: #131c4e;
  box-shadow: 0 18px 40px rgba(24, 52, 102, 0.16);
}

.shelf-note-title {
  margin: 0 0 0.4rem;
  font-family: var(--round);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.shelf-note-copy,
.shelf-note-fail {
  margin: 0 0 0.95rem;
  color: #56638c;
  font-size: 0.94rem;
  line-height: 1.45;
}

.shelf-note-fail { color: #9a3d52; }

.shelf-refresh { font-family: var(--round); }

.shelf-refresh:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 0 0 3px rgba(47, 107, 255, 0.28);
}

.shelf-note.is-busy .shelf-refresh:disabled { opacity: 1; cursor: progress; }
.shelf-note.is-busy .classic-submit-contour { opacity: 1; }
.shelf-note.is-busy .classic-submit-contour rect {
  animation: classic-search-contour 1.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .shelf-note.is-busy .classic-submit-contour rect {
    animation: none;
    stroke-dasharray: none;
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shelf-veil {
    backdrop-filter: none;
    background: rgba(244, 248, 255, 0.9);
  }
}

.desk-shelf-body {
  display: grid;
  gap: 0.75rem;
}

.desk-shelf-body > .actions { margin-top: 0; }

.desk-shelf.has-items .desk-empty { display: none; }

.desk-empty {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  margin: 1.4rem auto 0;
  max-width: 19rem;
  padding: 1.4rem 1.2rem 1.5rem;
  border-radius: 22px;
  border: 1px dashed rgba(47, 107, 255, 0.22);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.desk-empty-mark,
.trip-slot-mark {
  display: block;
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.14), rgba(122, 59, 240, 0.14));
  position: relative;
}

.desk-empty-mark::after,
.trip-slot-mark::after {
  content: "";
  position: absolute;
  inset: 0.7rem;
  background: #2f6bff;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.is-flight { --icon: url("/static/web/img/desk/plane.svg?v=4"); }
.is-hotel { --icon: url("/static/web/img/desk/bed.svg?v=1"); }

.desk-empty-title {
  margin: 0.45rem 0 0;
  color: #10224f;
  font-size: 0.98rem;
  font-weight: 750;
}

.desk-empty-copy {
  margin: 0;
  color: #5a6a94;
  font-size: 0.86rem;
  line-height: 1.45;
}

/* A shortlist went to the options zone. The chat keeps a way to it. */
.desk-pointer {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  margin: 0.15rem 0 0.35rem;
  padding: 0.5rem 0.55rem 0.5rem 0.95rem;
  border: 1px solid rgba(47, 107, 255, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #10224f;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  box-shadow: 0 8px 20px rgba(24, 52, 102, 0.08);
  cursor: pointer;
  animation: rise 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.desk-pointer-go {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #7a3bf0);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 750;
}

.transcript > .desk-pointer + .desk-pointer { margin-top: 0; }

/* Who is flying: a way to add people onto the order, not a seat picker. */
.trip-flyers[hidden] { display: none; }

.flyers {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  padding: 0.9rem 0.95rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(24, 52, 102, 0.08);
}

.flyers-title {
  margin: 0;
  color: #10224f;
  font-size: 0.98rem;
  font-weight: 750;
}

.flyers-block { display: grid; gap: 0.35rem; }

.flyers-kicker {
  margin: 0;
  color: #7b8aab;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.flyers-find {
  width: 100%;
  min-height: 2.5rem;
  margin: 0.15rem 0 0.1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(16, 40, 90, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #10224f;
  font: inherit;
  font-size: 0.92rem;
}

.flyers-find::placeholder { color: #9aa8c4; }

.flyers-find:focus-visible {
  outline: none;
  border-color: rgba(47, 107, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.12);
}

.flyers-list { display: grid; }

.flyers-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.1rem;
}

.flyers-row + .flyers-row { border-top: 1px solid rgba(16, 40, 90, 0.06); }

.flyers-row.is-in { background: linear-gradient(90deg, rgba(47, 107, 255, 0.06), transparent 80%); }

.flyers-row.is-quiet { opacity: 0.55; }

.flyers-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.flyers-name {
  overflow: hidden;
  color: #10224f;
  font-size: 0.92rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flyers-meta {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  min-width: 0;
  color: #8b97b8;
  font-size: 0.76rem;
  font-weight: 600;
}

.flyers-doc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flyers-mask {
  flex: none;
  color: #5a6a94;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.flyers-order {
  flex: none;
  margin: 0;
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(47, 107, 255, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #2f6bff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.flyers-order:hover:not(:disabled) { background: #f4f7ff; }

.flyers-order:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.12);
}

.flyers-order:disabled { cursor: default; opacity: 0.6; }

.flyers-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.flyers-order.is-remove {
  border-color: rgba(16, 40, 90, 0.14);
  color: #5c6b8a;
}

.flyers-order.is-remove:hover:not(:disabled) {
  border-color: rgba(201, 47, 69, 0.35);
  background: #fff6f7;
  color: #c92f45;
}

.flyers-in {
  color: #2a5bd7;
  font-size: 0.75rem;
  font-weight: 750;
  white-space: nowrap;
}

.flyers-empty {
  margin: 0.2rem 0 0.15rem;
  color: #8b97b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.flyers-add {
  justify-self: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f6bff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.flyers-note {
  margin: 0;
  color: #8b97b8;
  font-size: 0.78rem;
  font-weight: 600;
}

.flyers-note.is-warn { color: #8a5a2a; }

.flyers-note[hidden] { display: none; }

/* The trip. */
.desk-trip .desk-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.desk-trip .flyers { margin-bottom: 0; }

.trip-slot { border-radius: 22px; }

.trip-slot.is-ordered { display: none; }

.trip-slot.has-item > .trip-empty,
.trip-slot.has-item > .trip-slot-empty { display: none; }

.trip-slot-empty {
  display: grid;
  justify-items: center;
}

.trip-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.95rem 0.9rem 1rem;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(40, 80, 140, 0.08);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.trip-empty:hover { box-shadow: 0 14px 32px rgba(40, 80, 140, 0.12); }

.trip-empty:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28), 0 10px 26px rgba(40, 80, 140, 0.08);
}

.trip-slot-mark {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 14px;
  background: #eef1ff;
}

.trip-slot-mark::after {
  inset: 0.62rem;
  background: #3a6bff;
}

.trip-empty-copy { min-width: 0; }

.trip-slot-title {
  display: block;
  margin: 0.08rem 0 0.2rem;
  color: #14284f;
  font-family: var(--round);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.trip-slot-copy {
  display: block;
  margin: 0;
  color: #66758f;
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.4;
}

@container trip (max-width: 24rem) {
  .trip-empty {
    gap: 0.55rem;
    padding: 0.85rem 0.7rem 0.9rem;
  }
  .trip-slot-mark { width: 2.35rem; height: 2.35rem; }
  .trip-slot-mark::after { inset: 0.52rem; }
  .trip-slot-title { font-size: 0.88rem; letter-spacing: -0.03em; }
  .trip-slot-copy { font-size: 0.78rem; }
}

.trip-empty-go {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.28rem;
  color: #aeb8cc;
}

[dir="rtl"] .trip-empty-go { transform: scaleX(-1); }

#trip-hotel > .trip-slot-empty > .trip-empty { padding-bottom: 1.45rem; }

.trip-find {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: -1.15rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.45rem 0.55rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #6a4bff 58%, #7a3bf0 100%);
  color: #fff;
  font: inherit;
  font-family: var(--round);
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(72, 78, 220, 0.28);
}

.trip-find-go {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

[dir="rtl"] .trip-find-go { transform: scaleX(-1); }

.trip-find:hover { filter: brightness(1.06); }

.trip-find:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.32), 0 10px 22px rgba(72, 78, 220, 0.28);
}

.trip-scene {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1 0 auto;
  min-height: 13rem;
  margin: 0.2rem 0 0;
}

.desk-trip:has(.trip-slot.has-item, .trip-slot.is-ordered, .trip-sale:not(:empty)) .trip-scene {
  display: none;
}

.trip-guide {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(230, 242, 254, 0.62);
  box-shadow: 0 10px 26px rgba(70, 110, 170, 0.1);
  backdrop-filter: blur(16px) saturate(1.2);
}

.trip-guide-copy { min-width: 0; }

.trip-guide-title {
  margin: 0;
  color: #1a2744;
  font-family: var(--round);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.trip-guide p {
  margin: 0.22rem 0 0;
  color: #6276a8;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
}

.trip-guide-mark {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 14px;
  background: rgba(214, 234, 254, 0.92);
}

.trip-guide-bulb {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(40, 80, 140, 0.16));
}

.trip-slot-link {
  margin-top: 0.5rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid rgba(47, 107, 255, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #2f6bff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.trip-slot-link.is-quiet {
  border-color: transparent;
  background: transparent;
  color: #5a6a94;
  padding-inline: 0;
}

.trip-slot-body { display: grid; gap: 0.5rem; }
.trip-slot-body:empty { display: none; }
#trip-hotel-body { gap: 0.8rem; }

.trip-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.2rem;
}

.trip-slot-kind {
  color: #5a6a94;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trip-slot-change {
  padding: 0.2rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.08);
  color: #2f6bff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.trip-slot-note {
  margin: 0;
  padding: 0 0.25rem;
  color: #5a6a94;
  font-size: 0.8rem;
  line-height: 1.4;
}

.trip-stay {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem 0.8rem;
  border-radius: 22px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 52, 102, 0.08);
}

.trip-stay .trip-slot-head { padding: 0; }

.trip-stay-name {
  margin: 0.15rem 0 0;
  color: #10224f;
  font-size: 1rem;
  font-weight: 750;
}

.trip-stay-dates,
.trip-stay-room {
  margin: 0;
  color: #4b5d80;
  font-size: 0.84rem;
}

.trip-stay-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.3rem 0 0.1rem;
  color: #5a6a94;
  font-size: 0.82rem;
}

.trip-stay-total strong {
  color: #10224f;
  font-family: var(--round);
  font-size: 1.2rem;
  font-weight: 800;
}

.trip-stay .trip-slot-note { padding: 0; }
.trip-stay .trip-slot-link { justify-self: start; margin-top: 0; }

.trip-sale { display: grid; gap: 0.7rem; }
.trip-sale:empty { display: none; }
.trip-sale > * { max-width: none; }
.trip-sale > #trip-hotel { margin-bottom: 0; }
.trip-sale.is-revising > #trip-hotel { margin-top: 0.7rem; }

/* The form: search without Sofia. */
#view-assistant ::selection {
  background: rgba(122, 59, 240, 0.28);
  color: #4c1d95;
}

.desk-classic {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 0.7rem 0.75rem;
}

.classic {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.classic-disclosure {
  display: none;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.7rem;
  margin: 0;
  padding: 0.3rem 0.35rem 0.3rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #1a2744;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0;
  text-align: start;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 0 8px 18px rgba(40, 70, 130, 0.06);
}

.desk[data-mode="together"] .classic-disclosure { display: flex; }

.desk[data-mode="together"] .classic.is-shut .classic-disclosure {
  border-color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.78);
  color: #1a2744;
}

.classic-disclosure-copy {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-disclosure-go {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  background: rgba(47, 107, 255, 0.1);
  color: #3a4fe0;
}

.classic-disclosure-go::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  background: currentColor;
  transform: rotate(-90deg);
  -webkit-mask: url("/static/web/img/desk/arrow.svg?v=1") center / contain no-repeat;
  mask: url("/static/web/img/desk/arrow.svg?v=1") center / contain no-repeat;
}

.classic.is-shut .classic-disclosure-go::before { transform: rotate(90deg); }

.classic-disclosure:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28);
}

.classic-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.classic-card {
  container: classic / inline-size;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  padding: 0.65rem 0.75rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 28px rgba(40, 80, 140, 0.05);
  backdrop-filter: blur(16px);
}

.classic-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
}

.classic-kinds,
.classic-switch {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  max-width: 100%;
  padding: 0.18rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: rgba(220, 230, 248, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.classic-kinds { --segments: 2; }
.classic-switch { --segments: 3; width: 100%; }

.classic-kinds::before,
.classic-switch::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0.18rem;
  bottom: 0.18rem;
  inset-inline-start: 0.18rem;
  width: calc((100% - 0.36rem) / var(--segments));
  border-radius: 999px;
  pointer-events: none;
  transition: inset-inline-start 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.classic-kinds::before {
  background: linear-gradient(90deg, #4d6bff 0%, #7a3bf0 100%);
  box-shadow: 0 6px 14px rgba(90, 60, 220, 0.28);
}

.classic-switch::before {
  background: #fff;
  box-shadow: 0 4px 12px rgba(40, 70, 130, 0.12);
}

.classic-kinds:has(.classic-kind:nth-child(2)[aria-selected="true"])::before {
  inset-inline-start: calc(0.18rem + (100% - 0.36rem) / 2);
}

.classic-switch:has(.classic-switch-option:nth-child(2)[aria-checked="true"])::before {
  inset-inline-start: calc(0.18rem + (100% - 0.36rem) / 3);
}

.classic-switch:has(.classic-switch-option:nth-child(3)[aria-checked="true"])::before {
  inset-inline-start: calc(100% - 0.18rem - (100% - 0.36rem) / 3);
}

.classic-kind,
.classic-switch-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 1.9rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7b8aab;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.classic-kind {
  min-height: 2.15rem;
  padding: 0 0.95rem;
  font-size: 0.92rem;
}

.classic-kind[aria-selected="true"] { color: #fff; }

.classic-switch-option[aria-checked="true"] { color: #1a2744; }

.classic-kind-icon {
  width: 1.05rem;
  height: 1.05rem;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.classic-switch[hidden] { display: none; }

@container classic (min-width: 26rem) {
  .classic-switch-option {
    min-height: 2.05rem;
    padding-inline: 0.55rem;
    font-size: 0.82rem;
  }
}

@container classic (min-width: 30rem) {
  .classic-switch-option {
    padding-inline: 0.7rem;
    font-size: 0.88rem;
  }
}

/* Stacked under the kind tabs, the three trip types have the whole card.
   They still have to fit the narrow search column, so the track can shrink
   and the label steps down before it spills. This follows the base rule,
   which would otherwise paint over it. */
@container classic (max-width: 21rem) {
  .classic-switch { grid-auto-columns: minmax(0, 1fr); }
  .classic-switch-option {
    min-width: 0;
    padding-inline: 0.16rem;
    font-size: 0.64rem;
  }
}

.classic-form {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.classic-fields {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.42rem;
  margin-inline: -0.2rem;
  padding: 0.15rem 0.2rem 0.35rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 60, 120, 0.2) transparent;
}

.classic-foot {
  position: relative;
  z-index: 4;
  flex: none;
  display: grid;
  gap: 0.35rem;
  margin-top: 0;
  padding-top: 0.85rem;
}

.classic-foot::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 0.85rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 100%);
  pointer-events: none;
}

.classic-form[hidden] { display: none; }

.classic-label {
  display: block;
  margin: 0 0 0.16rem 0.12rem;
  color: #7b8aab;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.classic-route {
  --route-shell: 2.6rem;
  --route-swap: 1.9rem;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.classic-route > .place-field {
  padding: 0.3rem 0.5rem 0.25rem;
}

.classic-route > .place-field:last-child {
  position: relative;
  padding-top: 0.38rem;
}

.classic-route > .place-field:last-child::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0.75rem;
  inset-inline-end: 3.2rem;
  height: 1px;
  background: rgba(16, 40, 90, 0.1);
}

.classic-route .place-shell {
  min-height: var(--route-shell);
  padding-inline-end: 2.35rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.classic-route .place-shell:focus-within,
.classic-route .place-shell:focus-within:hover {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.classic-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.45rem;
}

.classic-pair.is-single { grid-template-columns: minmax(0, 1fr); }
.classic-field[hidden] { display: none; }

.place-field { position: relative; min-width: 0; }

.place-shell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  height: auto;
  padding: 0.18rem 0.5rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.place-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 9px;
  background: linear-gradient(180deg, #f7faff 0%, #e4edff 100%);
  box-shadow: inset 0 1px 0 #fff;
}

.place-copy {
  display: flex;
  align-items: center;
  align-self: stretch;
  flex: 1;
  min-width: 0;
}

.place-hint { display: none; }

.party-summary-hint {
  overflow: hidden;
  color: #8b97b8;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.party-summary-hint[hidden] { display: none; }

.place-field > .classic-label {
  color: #a3adc2;
  font-weight: 650;
}

.place-shell:focus-within {
  border-color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.place-field.has-error .place-shell,
.classic-field.has-error .picker-date-input { border-color: rgba(201, 47, 69, 0.55); }

.place-icon {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  background: #4c63f5;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.place-icon.is-depart { --icon: url("/static/web/img/desk/depart.svg?v=1"); }
.place-icon.is-arrive { --icon: url("/static/web/img/desk/arrive.svg?v=1"); }
.place-icon.is-stay { --icon: url("/static/web/img/desk/bed.svg?v=1"); }
.place-icon.is-people { --icon: url("/static/web/img/desk/people.svg?v=1"); }
.place-icon.is-calendar { --icon: url("/static/web/img/desk/calendar.svg?v=1"); }
.place-icon.is-seat { --icon: url("/static/web/img/desk/seat.svg?v=1"); }
.place-icon.is-plane { --icon: url("/static/web/img/desk/plane.svg?v=4"); }

.place-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1a2744;
  caret-color: #3d6bff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  outline: none;
  text-overflow: ellipsis;
}

.place-input::placeholder {
  color: #9aa6c0;
  font-weight: 600;
}

.place-shell:focus-within .place-input::placeholder { color: transparent; }

.place-field.has-value .place-input,
.place-field.has-value .place-code { color: #10224f; }

.place-code {
  flex: none;
  color: #10224f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.place-code:empty { display: none; }

.place-list {
  position: absolute;
  z-index: 8;
  top: calc(100% + 0.35rem);
  inset-inline: 0;
  min-width: min(20rem, 86vw);
  max-height: 22rem;
  margin: 0;
  padding: 0.3rem;
  overflow-y: auto;
  list-style: none;
  border-radius: 18px;
  border: 1px solid rgba(16, 40, 90, 0.08);
  background: #fff;
  box-shadow: 0 22px 50px rgba(18, 48, 96, 0.18);
}

.classic-route .place-field:last-child .place-list { inset-inline: auto 0; }

.place-list.is-up {
  top: auto;
  bottom: calc(100% + 0.35rem);
}

.place-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  cursor: pointer;
}

.place-option.is-active,
.place-option:hover { background: #eef3ff; }

.place-option-text { display: grid; min-width: 0; }

.place-option-title {
  overflow: hidden;
  color: #10224f;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.place-option-meta {
  overflow: hidden;
  color: #5a6a94;
  font-size: 0.78rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.place-option-code {
  flex: none;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: #f1f5fd;
  color: #2f6bff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.place-group { padding: 0.12rem 0.08rem 0.16rem; }

.place-group + .place-group {
  margin-top: 0.12rem;
  border-top: 1px solid rgba(16, 40, 90, 0.06);
  padding-top: 0.18rem;
}

.place-city,
.place-airport {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 12px;
  cursor: pointer;
}

.place-city { padding: 0.48rem 0.55rem; }

.place-city-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #10224f;
  font-size: 0.95rem;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.place-city .flag-slot {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  background: #eef2f8;
  box-shadow: 0 0 0 1px rgba(16, 40, 90, 0.14);
}

.place-city .flag {
  width: 18px;
  height: 13px;
}

.place-airports {
  margin: 0 0.2rem 0.1rem 0.85rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 2px solid #e3ebf8;
}

.place-airport { padding: 0.34rem 0.45rem 0.34rem 0.35rem; }

.place-airport-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #2a3b63;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.place-airport-code {
  padding: 0;
  background: transparent;
  color: #7d8cac;
  font-weight: 750;
}

.place-city.is-active,
.place-airport.is-active,
.place-city:hover,
.place-airport:hover { background: #eef3ff; }

.classic-swap {
  position: absolute;
  z-index: 3;
  top: 50%;
  inset-inline-end: 0.45rem;
  display: grid;
  place-items: center;
  width: var(--route-swap, 2.2rem);
  height: var(--route-swap, 2.2rem);
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: #fff;
  color: #4c63f5;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(40, 80, 150, 0.1), inset 0 1px 0 #fff;
  transform: translateY(-50%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.classic-swap:hover { border-color: rgba(47, 107, 255, 0.4); }

.classic-swap:focus-visible {
  outline: none;
  border-color: rgba(61, 107, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(61, 107, 255, 0.16);
}

.classic-swap:active { transform: translateY(-50%) rotate(180deg); }

.classic-swap-icon {
  width: 1.1rem;
  height: 1.1rem;
  background: currentColor;
  -webkit-mask: url("/static/web/img/desk/swap.svg?v=1") center / contain no-repeat;
  mask: url("/static/web/img/desk/swap.svg?v=1") center / contain no-repeat;
  transform: rotate(90deg);
}

.desk-classic .picker.is-date { width: 100%; }

.classic-control { position: relative; }

.classic-control > .place-badge {
  position: absolute;
  z-index: 1;
  inset-inline-start: 0.38rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.desk-classic .classic-control:has(.picker.is-date) > .place-badge { display: none; }

.desk-classic .picker-date-input,
.desk-classic .picker-trigger {
  width: 100%;
  box-sizing: border-box;
  height: auto;
  min-height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  font-family: var(--font);
  font-size: 0.86rem;
}

.desk-classic .picker-date-input {
  appearance: none;
  outline: none;
  padding-block: 0;
  padding-inline: 2.45rem 0.7rem;
  color: #9aa8c4;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.desk-classic .picker-trigger {
  padding-block: 0;
  padding-inline: 2.45rem 0.7rem;
  color: #1a2744;
  font-weight: 750;
}

.desk-classic .picker.has-value .picker-trigger {
  color: #10224f;
}

.desk-classic .picker-date-input::placeholder {
  color: #b0bad2;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.desk-classic .picker.has-value .picker-date-input {
  color: #10224f;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.desk-classic .picker-date-cal {
  inset-inline-end: auto;
  inset-inline-start: 0.38rem;
  top: 0.4rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 9px;
  background: linear-gradient(180deg, #f7faff 0%, #e4edff 100%);
  color: #4c63f5;
  box-shadow: inset 0 1px 0 #fff;
  transform: none;
}

/* The month sits in the form, under the date, so the search button stays clear.
   Lists (class, airline) open as a popover and leave their column alone. */
.desk-classic .classic-field:has(.picker.is-date.is-open) {
  grid-column: 1 / -1;
}

.desk-classic .cal-pop {
  margin-top: 0.4rem;
  padding: 0.45rem 0.45rem 0.35rem;
  border: 1px solid rgba(16, 40, 90, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 52, 102, 0.1);
}

.desk-classic .cal-pop .cal-nav {
  grid-template-columns: 1.85rem 1fr 1.85rem;
  gap: 0.28rem;
  margin-bottom: 0.28rem;
}

.desk-classic .cal-pop .cal-nav-btn,
.desk-classic .cal-pop .cal-nav-title {
  background: #f4f7ff;
  color: #243056;
  font-family: var(--font);
}

.desk-classic .cal-pop .cal-nav-btn {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
}

.desk-classic .cal-pop .cal-nav-btn:hover:not(:disabled) {
  background: #e7eeff;
}

.desk-classic .cal-pop .cal-nav-icon {
  width: 15px;
  height: 15px;
}

.desk-classic .cal-pop .cal-nav-title {
  min-height: 1.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0;
}

.desk-classic .cal-pop .cal-week,
.desk-classic .cal-pop .cal-grid {
  gap: 0.08rem;
}

.desk-classic .cal-pop .cal-weekday {
  padding: 0.05rem 0 0.15rem;
  color: #8b97b8;
  font-family: var(--font);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.desk-classic .cal-pop .cal-pad,
.desk-classic .cal-pop .cal-day,
.desk-classic .cal-pop .cal-year {
  width: 2.1rem;
  height: 2.1rem;
  min-height: 0;
  justify-self: center;
  border-radius: 50%;
  color: #1a2744;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 650;
}

.desk-classic .cal-pop .cal-day:hover:not(:disabled),
.desk-classic .cal-pop .cal-year:hover:not(:disabled) {
  background: #eef3ff;
}

.desk-classic .cal-pop .cal-day.is-today,
.desk-classic .cal-pop .cal-year.is-current:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px rgba(47, 107, 255, 0.4);
}

.desk-classic .cal-pop .cal-day.is-selected,
.desk-classic .cal-pop .cal-year.is-selected {
  background: linear-gradient(160deg, #4d6bff 0%, #7a3bf0 100%);
  color: #fff;
  font-weight: 750;
  box-shadow: none;
}

.desk-classic .cal-pop .cal-day.is-muted,
.desk-classic .cal-pop .cal-day:disabled,
.desk-classic .cal-pop .cal-year:disabled {
  color: #c3cadb;
  font-weight: 500;
  opacity: 1;
}

.desk-classic .cal-pop .cal-year {
  width: auto;
  height: 2.1rem;
  border-radius: 999px;
}

.desk-classic .cal-pop .cal-years {
  gap: 0.25rem;
  max-height: 10.5rem;
}

.desk-classic .picker-date-icon { width: 0.9rem; height: 0.9rem; }

.desk-classic .picker-date-input:focus,
.desk-classic .picker.is-open .picker-trigger,
.desk-classic .picker-trigger:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.desk-classic .picker-date-cal:hover,
.desk-classic .picker.is-open .picker-date-cal { color: #3a4fe0; background: linear-gradient(180deg, #f7faff 0%, #dce7ff 100%); }

.desk-classic .classic-field.is-airline:has(.has-value) .place-badge { display: none; }

.desk-classic .classic-field.is-airline:has(.has-value) .picker-trigger {
  padding-inline-start: 0.85rem;
  padding-inline-end: 3.2rem;
}

.classic-airline-clear {
  position: absolute;
  z-index: 2;
  inset-inline-end: 1.85rem;
  top: 50%;
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(226, 232, 245, 0.96);
  color: #6d7c9e;
  transform: translateY(-50%);
  cursor: pointer;
}

.classic-airline-clear svg {
  width: 0.72rem;
  height: 0.72rem;
}

.classic-airline-clear:hover,
.classic-airline-clear:focus-visible {
  background: #e7eefb;
  color: #1a2744;
  outline: none;
}

.classic-airline-clear[hidden] { display: none; }

.classic-error {
  margin: 0.35rem 0 0 0.2rem;
  color: #c92f45;
  font-size: 0.8rem;
  font-weight: 600;
}

.classic-error[hidden] { display: none; }

.classic-hint {
  margin: 0.35rem 0 0 0.2rem;
  color: #8b97b8;
  font-size: 0.78rem;
}

/* Who travels. The list opens over the form, so the fields under it stay put. */
.party {
  position: relative;
}

.party-anchor { position: relative; }

.party:has(.party-summary[aria-expanded="true"]) {
  z-index: 30;
}

.party-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: auto;
  min-height: 2.6rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #1a2744;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  text-align: start;
  cursor: pointer;
}

.party-summary-stack {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 0.05rem;
}

.party-summary:focus-visible,
.party-summary[aria-expanded="true"] {
  outline: none;
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.party-summary-copy {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party.has-value .party-summary-copy { color: #10224f; }

.party-summary-copy.is-empty {
  color: #9aa8c4;
  font-weight: 500;
}

.party-chevron {
  width: 1rem;
  height: 1rem;
  background: #5a6a94;
  -webkit-mask: url("/static/web/img/desk/chevron.svg?v=1") center / contain no-repeat;
  mask: url("/static/web/img/desk/chevron.svg?v=1") center / contain no-repeat;
  transition: transform 0.2s ease;
}

.party-summary[aria-expanded="true"] .party-chevron { transform: rotate(180deg); }

.party-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  display: grid;
  gap: 0.15rem;
  max-height: 18rem;
  overflow: auto;
  padding: 0.45rem 0.85rem 0.75rem;
  border: 1px solid rgba(16, 40, 90, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(24, 52, 102, 0.18);
  animation: rise 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.party-panel.is-up {
  top: auto;
  bottom: calc(100% + 0.35rem);
}

.party-panel[hidden] { display: none; }

.party-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.party-row + .party-row { border-top: 1px solid rgba(16, 40, 90, 0.07); }

.party-row-text { display: grid; }

.party-row-label {
  color: #10224f;
  font-size: 0.92rem;
  font-weight: 700;
}

.party-row-hint {
  color: #8b97b8;
  font-size: 0.76rem;
}

.party-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.party-step {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(16, 40, 90, 0.14);
  border-radius: 50%;
  background: #fff;
  color: #2f6bff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.party-step:disabled { color: #c3cbe0; cursor: default; }

.party-value {
  min-width: 1.6rem;
  color: #10224f;
  font-weight: 800;
  text-align: center;
}

.party-cabins {
  display: grid;
  gap: 0.45rem;
  padding: 0.6rem 0 0.1rem;
  border-top: 1px solid rgba(16, 40, 90, 0.07);
}

.party-cabin-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.party-cabin {
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(16, 40, 90, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #4b5d80;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.party-cabin[aria-checked="true"] {
  border-color: rgba(103, 38, 217, 0.45);
  background: #f6f1ff;
  color: #6726d9;
}

.classic-filters { align-items: start; }

.classic-legs {
  display: grid;
  gap: 0.7rem;
}

.classic-legs[hidden] { display: none; }

/* A flight is a heading over its own fields, not a card around them. */
.classic-leg {
  display: grid;
  gap: 0.45rem;
}

.classic-leg + .classic-leg {
  padding-top: 0.7rem;
  border-top: 1px solid rgba(16, 40, 90, 0.08);
}

.classic-leg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.4rem;
}

.classic-leg-title {
  color: #10224f;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.classic-leg-remove {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8b97b8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.classic-leg-remove:hover { color: #a3283b; }
.classic-leg-remove[hidden] { display: none; }

.classic-add {
  justify-self: start;
  margin: 0;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: #2f6bff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.classic-add[hidden] { display: none; }

.desk-classic .picker-leading .airline-mark {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.4rem;
}

.picker-option .airline.is-inline .airline-mark {
  width: 1.55rem;
  height: 1.55rem;
}

.party-person {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.15rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.party-person + .party-person { border-top: 1px solid rgba(16, 40, 90, 0.07); }

.party-person-mark {
  position: relative;
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 1.5px solid rgba(16, 40, 90, 0.24);
  border-radius: 7px;
  background: #fff;
}

.party-person.is-on .party-person-mark {
  border-color: transparent;
  background: linear-gradient(135deg, #2f6bff, #7a3bf0);
}

.party-person.is-on .party-person-mark::after {
  content: "";
  position: absolute;
  inset: 0.16rem;
  background: #fff;
  -webkit-mask: url("/static/web/img/desk/check.svg?v=1") center / contain no-repeat;
  mask: url("/static/web/img/desk/check.svg?v=1") center / contain no-repeat;
}

.party-person.is-on .party-person-name { color: #10224f; }

.party-person-text { display: grid; min-width: 0; }

.party-person-name {
  overflow: hidden;
  color: #10224f;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.party-room {
  margin: 0;
  padding: 0.35rem 0 0.4rem;
  border: 0;
}

.party-room + .party-room { border-top: 1px solid rgba(16, 40, 90, 0.08); }

.party-room-title {
  padding: 0.35rem 0 0;
  color: #5a6a94;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.party-ages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.45rem;
  padding: 0.15rem 0 0.35rem;
}

.party-age { display: grid; gap: 0.2rem; }

.party-age-label {
  color: #5a6a94;
  font-size: 0.74rem;
  font-weight: 650;
}

.party-age-select {
  min-height: 2.4rem;
  padding: 0 0.6rem;
  border: 1px solid rgba(16, 40, 90, 0.14);
  border-radius: 10px;
  background: #fff;
  color: #10224f;
  font: inherit;
  font-size: 0.92rem;
}

.party-link {
  justify-self: start;
  margin-top: 0.3rem;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: #2f6bff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.party-link.is-quiet { color: #8b97b8; }

.classic-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.7rem;
  justify-self: start;
  margin-top: 0.15rem;
  color: #1a2744;
  font-size: 0.95rem;
  font-weight: 750;
  cursor: pointer;
}

.classic-check-copy {
  display: grid;
  gap: 0.08rem;
}

.classic-check-title {
  font-weight: 750;
  line-height: 1.2;
}

.classic-check-hint {
  color: #8b97b8;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
}

.classic-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.classic-check-mark {
  position: relative;
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.08rem;
  border: 1.5px solid rgba(16, 40, 90, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.classic-check input:checked + .classic-check-mark {
  border-color: transparent;
  background: linear-gradient(135deg, #2f6bff, #7a3bf0);
}

.classic-check input:checked + .classic-check-mark::after {
  content: "";
  position: absolute;
  inset: 0.18rem;
  background: #fff;
  -webkit-mask: url("/static/web/img/desk/check.svg?v=1") center / contain no-repeat;
  mask: url("/static/web/img/desk/check.svg?v=1") center / contain no-repeat;
}

.classic-check input:focus-visible + .classic-check-mark {
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.16);
}

.classic-submit {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding-inline: 2.9rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, #2f8bff 0%, #4d6bff 34%, #6d49f2 70%, #8a3aef 100%);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
}

.classic-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
}

.classic-submit::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 46%;
  background:
    radial-gradient(42% 120% at 28% 145%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(48% 130% at 55% 155%, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(36% 120% at 80% 160%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 72%);
  pointer-events: none;
}

.classic-submit > span:not(.classic-submit-go) { position: relative; z-index: 1; }

.classic-submit-find {
  width: 1.1rem;
  height: 1.1rem;
  background: #fff;
  -webkit-mask: url("/static/web/img/desk/search.svg?v=1") center / contain no-repeat;
  mask: url("/static/web/img/desk/search.svg?v=1") center / contain no-repeat;
}

.classic-submit > .classic-submit-go {
  position: absolute;
  z-index: 1;
  inset-inline-end: 0.35rem;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.16));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transform: translateY(-50%);
}

.classic-submit-go::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  background: #fff;
  -webkit-mask: url("/static/web/img/desk/arrow.svg?v=1") center / contain no-repeat;
  mask: url("/static/web/img/desk/arrow.svg?v=1") center / contain no-repeat;
}

html[dir="rtl"] .classic-submit-go::before { transform: scaleX(-1); }

.classic-submit:hover:not(:disabled) { transform: translateY(-1px); }
.classic-submit:disabled { opacity: 0.55; cursor: default; }
.classic-form.is-busy .classic-submit { opacity: 1; }

.classic-submit-contour {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
}

.classic-submit-contour rect {
  ry: calc(50% - 2px);
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  fill: none;
  stroke: #e3faff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 18 82;
  filter: drop-shadow(0 0 3px rgba(183, 240, 255, 0.9));
}

.classic-form.is-busy .classic-submit-contour { opacity: 1; }
.classic-form.is-busy .classic-submit-contour rect {
  animation: classic-search-contour 1.8s linear infinite;
}

@keyframes classic-search-contour { to { stroke-dashoffset: -100; } }

@media (prefers-reduced-motion: reduce) {
  .classic-form.is-busy .classic-submit-contour rect {
    animation: none;
    stroke-dasharray: none;
    opacity: 0.7;
  }
}

.classic-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  min-height: 0;
  color: #4b5d80;
  font-size: 0.88rem;
  line-height: 1.4;
}

.classic-status:empty { display: none; }
.classic-status.is-error { color: #a3283b; }
.classic-status.is-done { color: #157a52; font-weight: 650; }

.classic-banner {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(47, 107, 255, 0.08);
  color: #2b4a99;
  font-size: 0.86rem;
  line-height: 1.45;
}

.classic-form.is-resting .place-field,
.classic-form.is-resting .classic-pair,
.classic-form.is-resting .party,
.classic-form.is-resting .classic-field { opacity: 0.6; }

/* Hotel shelf and the card that opens from it. */
body.has-stay { overflow: hidden; }

.stay-card {
  display: grid;
  overflow: hidden;
  padding: 0.48rem 0.48rem 0.78rem;
  border-radius: 22px;
  border: 1px solid rgba(16, 40, 90, 0.06);
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 52, 102, 0.08);
}

.stay-card:has(:focus-visible) {
  box-shadow: 0 0 0 2px #2f6bff, 0 14px 34px rgba(24, 52, 102, 0.08);
}

.stay-open {
  appearance: none;
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.stay-open:focus-visible { outline: none; }

.stay-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border-radius: 16px;
  background: linear-gradient(160deg, #d7e6fb, #efe7ff);
  touch-action: pan-y;
}

.stay-frame.is-blank img { display: none; }

.stay-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stay-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.stay-photo:focus-visible {
  outline: none;
}

.stay-frame:has(.stay-photo:focus-visible) {
  box-shadow: inset 0 0 0 2px #2f6bff;
}

.stay-count {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0.5rem;
  bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 20, 32, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
}

.stay-count .stay-glyph { width: 0.82rem; height: 0.82rem; }

.stay-copy,
.stay-facts {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.stay-copy { padding: 0.72rem 0.42rem 0.1rem; }

.stay-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
}

.stay-name {
  margin: 0;
  min-width: 0;
  color: #122044;
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.25;
}

.stay-bar .stay-name { font-size: 1.12rem; }

.stay-marks {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
}

.stay-stars {
  flex: none;
  margin-top: 0.16rem;
  color: #f0b429;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.stay-rating {
  flex: none;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #157a52;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.stay-address,
.stay-meta,
.stay-from-room {
  margin: 0;
  color: #6d7c9c;
  font-size: 0.8rem;
  line-height: 1.35;
}

.stay-address,
.stay-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.32rem;
}

.stay-address span,
.stay-meta span { min-width: 0; }

.stay-glyph {
  flex: none;
  width: 0.92rem;
  height: 0.92rem;
  margin-top: 0.08rem;
}

.stay-offer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  margin-top: 0.15rem;
  padding: 0.42rem;
  border-radius: 14px;
  background: #f3f5fa;
}

.stay-offer-photo {
  flex: none;
  width: 4.35rem;
  height: 3.25rem;
  border-radius: 10px;
  object-fit: cover;
  background: #e6eef8;
}

.stay-offer-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.stay-offer-name {
  margin: 0;
  overflow: hidden;
  color: #152044;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.stay-offer-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem 0.7rem;
  min-width: 0;
}

.stay-fact {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #6d7c9c;
  font-size: 0.72rem;
  line-height: 1.2;
}

.stay-fact .stay-glyph {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0;
}

.stay-from-room {
  overflow: hidden;
  color: #1e2a4f;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stay-buy,
.stay-room-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.stay-room-foot .stay-price-moved { flex: 1 1 100%; }

.stay-buy { align-items: center; margin-top: 0.55rem; }

.stay-buy .stay-price-total { font-size: 1.62rem; }

.stay-buy .stay-price-unit { color: #8b97b0; }

.stay-cue {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid #3d74ff;
  border-radius: 999px;
  background: #fff;
  color: #2f6bff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.stay-cue .stay-glyph {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0;
}

[dir="rtl"] .stay-cue .stay-glyph { transform: scaleX(-1); }

.stay-rules-title {
  margin: 0.35rem 0 0;
  color: #5a6a94;
  font-size: 0.72rem;
  font-weight: 700;
}

.stay-rules,
.stay-amenities,
.stay-note {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.stay-rule,
.stay-note-line,
.stay-penalty,
.stay-taxes,
.stay-price-moved {
  margin: 0;
  color: #24325c;
  font-size: 0.8rem;
  line-height: 1.45;
}

.stay-note-line { color: #3d4d73; }
.stay-penalty,
.stay-taxes,
.stay-price-moved { color: #8a5a12; }

.trip-stay-book { display: grid; gap: 0.45rem; margin-top: 0.35rem; }

.trip-stay-guest { display: grid; gap: 0.3rem; }

.trip-stay-guest-label {
  color: #5a6a94;
  font-size: 0.72rem;
  font-weight: 700;
}

.trip-stay-name {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(16, 40, 90, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #10224f;
  font: inherit;
}

.stay-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 20, 42, 0.48);
}

.stay-panel {
  display: grid;
  align-content: start;
  width: min(52rem, 100%);
  max-height: min(92vh, 54rem);
  overflow: auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 28, 58, 0.28);
}

.stay-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem 0.7rem;
  background: #fff;
}

.stay-x,
.stay-nav,
.stay-quiet,
.stay-hold {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.stay-x {
  flex: none;
  min-height: 2rem;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(16, 40, 90, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #24325c;
  font-size: 0.75rem;
  font-weight: 700;
}

.stay-main {
  display: grid;
  gap: 0.85rem;
  padding: 0 0.95rem 0.85rem;
}

.stay-gallery { display: grid; gap: 0.4rem; min-width: 0; }

.stay-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #e6eef8;
  touch-action: pan-y;
}

.stay-stage img,
.stay-look img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stay-stage img { cursor: zoom-in; }

.stay-counter {
  position: absolute;
  inset-inline-start: 0.55rem;
  bottom: 0.55rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(14, 22, 44, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.stay-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.22));
  color: #14203c;
  box-shadow:
    0 8px 20px rgba(12, 22, 48, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transform: translateY(-50%);
  transition: opacity 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.stay-nav svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

[dir="rtl"] .stay-nav svg { transform: scaleX(-1); }

.stay-nav:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34));
}

.stay-nav:active { transform: translateY(-50%) scale(0.96); }

.stay-nav:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 2px;
}

.stay-nav.is-prev { inset-inline-start: 0.55rem; }
.stay-nav.is-next { inset-inline-end: 0.55rem; }
.stay-nav[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .stay-nav { transition: none; }
  .stay-nav:active { transform: translateY(-50%); }
}

@media (hover: hover) and (pointer: fine) {
  .stay-stage .stay-nav,
  .stay-room-stage .stay-nav {
    opacity: 0;
    pointer-events: none;
  }

  .stay-stage:hover .stay-nav,
  .stay-stage:focus-within .stay-nav,
  .stay-room-stage:hover .stay-nav,
  .stay-room-stage:focus-within .stay-nav {
    opacity: 1;
    pointer-events: auto;
  }
}

.stay-frame .stay-nav {
  width: 1.85rem;
  height: 1.85rem;
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.94);
  color: #1b2744;
  box-shadow: 0 2px 10px rgba(16, 28, 58, 0.2);
}

.stay-film {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.stay-film[hidden] { display: none; }

.stay-thumb {
  flex: none;
  width: 4.4rem;
  height: 3rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #e6eef8;
  cursor: pointer;
}

.stay-thumb.is-on { border-color: #2f6bff; }

.stay-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stay-rate { display: grid; gap: 0.32rem; min-width: 0; }

.stay-room-name {
  margin: 0;
  color: #12172a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

.stay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.stay-chip {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #eef2fa;
  color: #3d4e74;
  font-size: 0.72rem;
  font-weight: 700;
}

.stay-chip.is-good { background: rgba(21, 122, 82, 0.12); color: #157a52; }
.stay-chip.is-firm { background: rgba(163, 40, 59, 0.08); color: #a3283b; }
.stay-chip.is-warm { background: rgba(227, 155, 18, 0.16); color: #8a5a12; }

.stay-price { display: grid; min-width: 0; }

.stay-price-total {
  color: #12172a;
  font-family: var(--round);
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.stay-price-unit {
  color: #6b7a9c;
  font-size: 0.72rem;
}

.stay-rooms {
  display: grid;
  gap: 0.5rem;
  padding: 0 0.95rem 1rem;
}

.stay-room {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  background: #f5f7fc;
}

.stay-room-photo { display: grid; gap: 0.35rem; }

.stay-room-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(160deg, #d7e6fb, #efe7ff);
  touch-action: pan-y;
}

.stay-room-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stay-room-note,
.stay-group-name,
.stay-review-head {
  margin: 0;
  color: #5c6d96;
  font-size: 0.75rem;
  line-height: 1.35;
}

.stay-section { display: grid; gap: 0.28rem; }

.stay-score {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.stay-score span {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  color: #2a3a5c;
  font-size: 0.72rem;
}

.stay-review {
  display: grid;
  gap: 0.15rem;
  padding-top: 0.2rem;
}

.stay-review-head strong { color: #157a52; }

.stay-review-plus,
.stay-review-minus {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.stay-review-plus { color: #1d2c4d; }
.stay-review-minus { color: #5c6d96; }

.stay-review-label { font-weight: 700; }

.stay-closed {
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(163, 40, 59, 0.08);
  color: #a3283b;
  font-size: 0.84rem;
}

.stay-rule a { color: #2f4ea8; }

.stay-hold {
  flex: none;
  margin: 0;
  padding: 0.48rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: #2f6bff;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.stay-hold:hover,
.stay-hold:focus-visible { background: #2458d6; outline: none; }

.stay-quiet {
  margin: 0;
  padding: 0.42rem 0.75rem;
  border: 1px solid rgba(16, 40, 90, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #2f4ea8;
  font-size: 0.76rem;
  font-weight: 700;
}

.stay-rooms-wait {
  margin: 0;
  color: #5c6d96;
  font-size: 0.84rem;
}

.stay-look {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 3.2rem 1rem 1rem;
  background: rgba(8, 12, 24, 0.9);
}

.stay-look[hidden] { display: none; }

.stay-look img {
  width: auto;
  height: auto;
  max-width: min(68rem, 100%);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  cursor: default;
}

.stay-look .stay-nav {
  width: 2.6rem;
  height: 2.6rem;
  opacity: 1;
  pointer-events: auto;
}

.stay-look .stay-x {
  position: absolute;
  top: 0.8rem;
  inset-inline-end: 0.8rem;
  background: #fff;
}

.stay-look .stay-counter {
  top: 0.95rem;
  bottom: auto;
  inset-inline-start: 0.8rem;
}

@media (min-width: 760px) {
  .stay-main {
    grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.75fr);
    align-items: start;
  }
}

/* Phone: one zone at a time, the dock stays below. */
@media (max-width: 899px) {
  .desk-main .chat-scroll { padding-top: 0.35rem; }
  .desk-main-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.45rem 0.35rem;
    min-height: 0;
    padding: 0.75rem 0.8rem 0.45rem;
  }
  .desk-main-head .desk-title { font-size: 1.55rem; }
  .desk-main-head .desk-head-plane {
    width: 4.2rem;
    height: 2.3rem;
  }
  .desk-head-cloud-a { inset-inline-start: 42%; width: 5.6rem; }
  .desk-head-cloud-b { display: none; }
  .desk-mode { min-height: 2.05rem; padding: 0 0.8rem; font-size: 0.84rem; }
  .desk-mode-sofia { padding-inline: 0.28rem 0.75rem; }
  .desk-mode-face { width: 1.3rem; height: 1.3rem; }
  .desk-search-kinds .classic-kind {
    min-height: 2.05rem;
    padding-inline: 0.9rem;
    font-size: 0.84rem;
  }
  .desk-head { padding: 0.6rem 0.8rem 0.55rem; }
  .desk-main-head.desk-head { padding: 0.95rem 0.9rem 0.45rem; }
  .desk-offers-head.desk-head { padding: 0.7rem 0.85rem; }
  .desk-scroll { padding: 0.15rem 0.75rem calc(1.25rem + var(--safe-b)); }
  .desk-classic { padding: 0 0.55rem 0.7rem; }
  .classic-card { padding: 0.8rem 0.75rem 0.9rem; border-radius: 22px; }
  .classic-switch { width: 100%; grid-auto-columns: minmax(0, 1fr); }
  .classic-switch-option { padding-inline: 0.2rem; font-size: 0.68rem; }
  .classic-route {
    --route-shell: 2.5rem;
    --route-swap: 1.8rem;
  }
  .classic-pair { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
  .classic-route .place-shell {
    gap: 0.35rem;
    padding: 0.16rem 0.4rem;
  }
  .classic-route .place-badge {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 8px;
  }
  .classic-route .place-icon { width: 0.84rem; height: 0.84rem; }
  .classic-route .place-input { font-size: 0.84rem; }
  .classic-route .place-code {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }
  .classic-swap-icon { width: 0.95rem; height: 0.95rem; }
  .classic-route .place-list { width: min(22rem, calc(100cqi - 2.4rem)); }
  .classic-route .place-field:first-child .place-list { inset-inline: 0 auto; }
}

/* Two columns: the main zone, and options or the trip behind tabs. */
@media (min-width: 900px) {
  #view-assistant .desk {
    grid-template-columns: minmax(0, 1fr) minmax(21rem, 25rem);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 1rem;
    row-gap: 0.65rem;
    padding: 0.6rem 1.25rem 1.1rem;
  }
  .desk-main {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
  }
  .desk-tabs {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .desk-tab[data-tab="main"] { display: none; }
  .desk-offers,
  .desk-trip { grid-column: 2; grid-row: 2; }
  .desk .desk-offers,
  .desk .desk-trip { display: none; }
  .desk[data-side="offers"] .desk-offers,
  .desk[data-side="trip"] .desk-trip { display: flex; }
  .desk-main .chat-scroll { padding: 0.5rem 0.75rem 1rem; }
  .desk-main .composer { padding: 0.4rem 0.75rem 0.25rem; }
  .desk-classic { padding: 0 0.75rem 0.85rem; }
  .desk-pointer { display: none; }
}

/* Three zones at once. Search and options swapped: options is the wide
   column, search the narrower one. The trip track is unchanged. */
@media (min-width: 1200px) {
  #view-assistant .desk {
    grid-template-columns: minmax(24rem, 1fr) minmax(26rem, 1.2fr) minmax(19rem, 0.78fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: 1.1rem;
    max-width: 104rem;
    margin-inline: auto;
    padding: 0.4rem 1.5rem 1.25rem;
  }
  .desk-tabs { display: none; }
  .desk-main { grid-row: 1; }
  .desk .desk-offers,
  .desk .desk-trip { display: flex; grid-row: 1; }
  .desk-offers { grid-column: 2; }
  .desk-trip { grid-column: 3; }
  .desk-pane.is-fresh { animation: desk-fresh 1.1s ease; }
}

@keyframes desk-fresh {
  0% { box-shadow: 0 18px 44px rgba(24, 52, 102, 0.09); }
  30% { box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28), 0 18px 44px rgba(24, 52, 102, 0.12); }
  100% { box-shadow: 0 18px 44px rgba(24, 52, 102, 0.09); }
}

@media (prefers-reduced-motion: reduce) {
  .desk-tab.is-new::after,
  .desk-pane.is-fresh,
  .classic-card,
  .stay-card,
  .desk-pointer,
  .desk-head-plane { animation: none; }
}

.offer-rules-link {
  justify-self: start;
  appearance: none;
  border: 0;
  background: none;
  padding: 0.25rem 0;
  color: #2f6bff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.offer-rules-link:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 2px;
  border-radius: 6px;
}

.dialog.fare-rules {
  display: flex;
  flex-direction: column;
  width: min(36rem, 100%);
  max-height: min(80vh, 44rem);
}

.fare-rules-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fare-rules-route {
  margin: 0.9rem 0 0.35rem;
  color: #131c4e;
  font-size: 0.95rem;
  font-weight: 800;
}

.fare-rules-segment:first-child .fare-rules-route {
  margin-top: 0.2rem;
}

.fare-rules-text {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #f1f5fd;
  color: #26335f;
  font: 0.8rem/1.55 ui-monospace, "SF Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fare-rules-note {
  margin: 0.9rem 0 0;
  color: #56638c;
  font-size: 0.78rem;
  line-height: 1.4;
}

.fare-rules-actions {
  grid-template-columns: 1fr;
}

.fare-rules-retry {
  width: 100%;
}
