/* Controls and states follow Learnio Workspace «Поле» and its «Облако» file interface: ink for the main action,
   hairlines #e0e2ea, capsule buttons and fields, cards 20, sheets 26. The paper and the four pastel stars come from
   the estate cards. The app stays light on purpose, whatever theme MAX reports: the cards are light and their
   lettering is black ink. */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-100_900.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Artegra Sans Extended SC';
  src: url('../assets/fonts/Artegra-Sans-Extended-SC-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --canvas: #f5f6fa;
  --surface-2: #f1f2f6;
  --hover: #e9eaf0;
  --border: #e0e2ea;
  --border-strong: #c9ccd6;
  --ink: #090909;
  --ink-hover: #2a2a2e;
  --on-ink: #ffffff;
  --text: #090909;
  --text-2: #33353f;
  --muted: #5f6270;
  --accent: #1600ed;
  --danger: #cf0000;
  --success-text: #1c6b3a;

  /* The exact tints of assets/{welcome,navigation,success,error}.png. */
  --tint-welcome: #fdeeee;
  --tint-nav: #eef7fd;
  --tint-success: #f3fdee;
  --tint-error: #fdeefd;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-card: 20px;
  --radius-sheet: 26px;
  --radius-control: 999px;

  --shadow-card: 0 1px 2px rgb(15 20 28 / 0.06);
  --shadow-pop: 0 4px 16px rgb(15 20 28 / 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion: 180ms;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Artegra Sans Extended SC', 'Inter', system-ui, sans-serif;

  --gutter: var(--space-4);
  --top-h: 56px;
  --tabs-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

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

html { background: var(--paper); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 15px/22px var(--font);
  font-feature-settings: 'tnum' 0;
  overscroll-behavior-y: none;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* The card shape */
.star {
  position: absolute;
  inset: 0;
  background: var(--tint, var(--tint-nav));
  -webkit-mask: url('../assets/star.svg') center / 100% 100% no-repeat;
  mask: url('../assets/star.svg') center / 100% 100% no-repeat;
  pointer-events: none;
}
.star--welcome { --tint: var(--tint-welcome); }
.star--nav { --tint: var(--tint-nav); }
.star--success { --tint: var(--tint-success); }
.star--error { --tint: var(--tint-error); }

/* Boot and fatal screens */
.boot {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.boot__mark { position: relative; width: 72px; height: auto; }
.noscript { padding: var(--space-6); text-align: center; }

/* Shell */
.shell {
  min-height: 100dvh;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}
.column { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: rgb(255 255 255 / 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
}
.topbar__start { min-width: 0; display: flex; align-items: center; }
.topbar__mark { width: 44px; height: 33px; object-fit: contain; object-position: left center; }

.view:focus { outline: none; }
.view {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--gutter) calc(var(--tabs-h) + var(--safe-b) + var(--space-6));
  display: flex;
  flex-direction: column;
}
.shell[data-chrome='flow'] .view { padding-bottom: 0; }

.page { display: flex; flex-direction: column; gap: var(--space-6); }
.enter { animation: enter var(--motion) var(--ease) both; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }

/* Tabs: a bottom bar on phones, a rail from 960 up */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  min-height: calc(var(--tabs-h) + var(--safe-b));
  padding: var(--space-2) calc(var(--space-2) + var(--safe-r)) calc(var(--space-2) + var(--safe-b)) calc(var(--space-2) + var(--safe-l));
  background: rgb(255 255 255 / 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--border);
}
.shell[data-chrome='flow'] .tabs { display: none; }
.tabs__head { display: none; }
.tabs__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-1); }
.tabs__item[data-rail-only] { display: none; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 48px;
  padding: 0 var(--space-1);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--motion) var(--ease), color var(--motion) var(--ease);
}
.tab .icon { width: 22px; height: 22px; transition: transform var(--motion) var(--ease); }
.tab:active .icon { transform: scale(0.9); }
.tab[aria-current='page'] { color: var(--ink); background: var(--surface-2); }
.tab[aria-current='page'] .icon { stroke-width: 2.1; }
.tab__short { display: inline; }
.tab__full { display: none; }

/* Hero: the card shape, full width, with the card's own lettering */
.hero {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  isolation: isolate;
}
.hero__script { position: relative; height: auto; }
.hero__script--welcome { width: 86%; }
.hero__script--navigation { width: 47%; }
.hero__script--success { width: 65%; }
.hero__script--error { width: 34%; }
.hero__mark { position: absolute; right: 2.4%; bottom: 3.4%; width: 7.5%; height: auto; }
.hero--band { aspect-ratio: 16 / 6; }
.hero--band .star { inset: auto 0; top: 50%; height: auto; aspect-ratio: 16 / 9; transform: translateY(-50%); }

.pagehead {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--space-6) var(--gutter);
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  overflow: hidden;
  isolation: isolate;
}
.pagehead .star { z-index: -1; }
.title {
  font: 900 24px/28px var(--font-head);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.title--sm { font-size: 20px; line-height: 24px; }
.sub { color: var(--muted); font-size: 14px; line-height: 20px; }

.lead { font-size: 16px; line-height: 24px; font-weight: 600; }
.text { color: var(--text-2); }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack--lg { gap: var(--space-5); }

.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px var(--space-2);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.badge--soft { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border-strong); }
.status {
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-control);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.status--confirmed { background: var(--tint-success); color: var(--success-text); box-shadow: inset 0 0 0 1px var(--border); }
.status--pending { background: var(--tint-welcome); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: transparent;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: background-color var(--motion) var(--ease), border-color var(--motion) var(--ease),
    box-shadow var(--motion) var(--ease), color var(--motion) var(--ease), transform var(--motion) var(--ease);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled='true'] { cursor: not-allowed; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn--primary:disabled { background: var(--surface-2); border-color: var(--surface-2); color: var(--muted); }
.btn--secondary { background: var(--paper); border-color: var(--border-strong); color: var(--ink); }
.btn--ghost { color: var(--muted); }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 var(--space-4); font-size: 14px; }
@media (hover: hover) {
  .btn--primary:hover:not(:disabled) { background: var(--ink-hover); border-color: var(--ink-hover); box-shadow: 0 6px 18px -8px rgb(9 9 9 / 0.6); }
  .btn--secondary:hover:not(:disabled) { border-color: var(--ink); background: var(--surface-2); }
  .btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
}
.btn .icon { width: 18px; height: 18px; flex: none; transition: transform var(--motion) var(--ease); }
@media (hover: hover) { .btn:hover .icon--nudge { transform: translateX(-2px); } }
.btn__spinner {
  width: 18px; height: 18px; flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn[data-busy='true'] { cursor: progress; }

/* Cards and lists */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card--pad { padding: var(--space-4); }
.list { display: flex; flex-direction: column; }
.list--card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.row {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: var(--space-3) var(--space-4);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: var(--space-3);
  background: transparent;
  border: 0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--motion) var(--ease);
}
.list > li + li > .row::before {
  content: '';
  position: absolute;
  left: calc(var(--space-4) + 44px + var(--space-3));
  right: 0;
  top: 0;
  height: 1px;
  background: var(--border);
}
.row:active { background: var(--surface-2); }
.row:focus-visible { outline-offset: -2px; border-radius: var(--radius-card); }
@media (hover: hover) { .row:hover { background: var(--surface-2); } .row:hover .row__chevron { transform: translateX(2px); } .row:hover .row__icon .icon { transform: scale(1.08); } }
.row__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tint, var(--tint-nav));
  color: var(--ink);
}
.row__icon[data-tint='welcome'] { --tint: var(--tint-welcome); }
.row__icon[data-tint='nav'] { --tint: var(--tint-nav); }
.row__icon[data-tint='success'] { --tint: var(--tint-success); }
.row__icon[data-tint='error'] { --tint: var(--tint-error); }
.row__icon .icon { width: 22px; height: 22px; transition: transform var(--motion) var(--ease); }
.row__body { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.row__title { font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.row__sub { color: var(--muted); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.row__chevron { width: 20px; height: 20px; color: var(--border-strong); transition: transform var(--motion) var(--ease); }
.row__body .status { margin-top: var(--space-1); }

/* Figures. The renders fade to white, so they sit on white without a frame. */
.figure { display: flex; flex-direction: column; gap: var(--space-2); }
.figure__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-card); background: var(--paper); }
.figure__frame img { width: 100%; height: 100%; object-fit: cover; }
.figure--panorama .figure__frame { aspect-ratio: 700 / 451; }
.figure--map .figure__frame { aspect-ratio: 1 / 1; box-shadow: inset 0 0 0 1px var(--border); }
.figure__badge { position: absolute; left: var(--space-3); top: var(--space-3); }
.figure__caption { color: var(--muted); font-size: 13px; line-height: 18px; }
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
@media (min-width: 520px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Event cards */
.event { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; touch-action: manipulation; transition: box-shadow var(--motion) var(--ease), border-color var(--motion) var(--ease); }
.event:active { border-color: var(--border-strong); }
@media (hover: hover) { .event:hover { box-shadow: var(--shadow-pop); border-color: var(--border-strong); } }
.event .figure__frame { border-radius: 0; }
.event__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.event__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

.facts { display: flex; flex-direction: column; }
.facts__row { padding: var(--space-3) 0; display: flex; flex-direction: column; gap: var(--space-1); }
.facts__row + .facts__row { border-top: 1px solid var(--border); }
.facts__row:first-child { padding-top: 0; }
.facts__row:last-child { padding-bottom: 0; }
.facts dt { color: var(--muted); font-size: 13px; line-height: 18px; }
.facts dd { font-size: 15px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.facts--unknown dd { color: var(--muted); font-weight: 400; }

/* History */
.timeline { display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-1); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 9px; bottom: -9px; width: 1px; background: var(--border-strong); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--tint-welcome); box-shadow: inset 0 0 0 1.5px var(--ink); }
.timeline__period { font-weight: 600; }
.timeline__text { color: var(--text-2); }

/* Wizard: the frame is always one screen tall, a long step scrolls inside it. */
.flow {
  flex: none;
  height: calc(100dvh - var(--top-h) - var(--safe-t));
  display: flex;
  flex-direction: column;
}
.flow__body {
  flex: 1;
  min-height: 0;
  margin-inline: calc(var(--gutter) * -1);
  padding: 0 var(--gutter) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior-y: contain;
}
.flow__body > * { flex: none; }
@media (min-width: 960px) { .flow__body { scrollbar-gutter: stable both-edges; } }
.flow__head {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--space-2) var(--gutter) var(--space-5);
  min-height: 144px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow: hidden;
  isolation: isolate;
}
.flow__head .star { z-index: -1; }
.steps { display: flex; gap: var(--space-1); }
.steps__item { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background-color var(--motion) var(--ease); }
.steps__item[data-state='done'], .steps__item[data-state='current'] { background: var(--ink); }
.flow__count { color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; }
.actions {
  position: relative;
  z-index: 10;
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + var(--safe-b));
  background: var(--paper);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Over the content, just above the bar: a message never changes the height of anything. */
.message-slot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(100% + var(--space-2)); }
.message-slot .banner { box-shadow: var(--shadow-pop); cursor: pointer; animation: enter var(--motion) var(--ease) both; }
.banner {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 20px;
}
.banner--error { background: var(--tint-error); color: var(--text); }
.banner--info { background: var(--tint-nav); color: var(--text); }
.banner .icon { width: 20px; height: 20px; flex: none; }

/* Choice chips */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.chips--count { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips--wide { grid-template-columns: minmax(0, 1fr); }
.day { display: flex; flex-direction: column; gap: var(--space-2); }
.day + .day { margin-top: var(--space-5); }
.day__label { font-size: 15px; font-weight: 600; }
.chip {
  position: relative;
  min-height: 60px;
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--motion) var(--ease), border-color var(--motion) var(--ease), color var(--motion) var(--ease);
  overflow-wrap: anywhere;
}
.chip__hint { color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 500; }
.chip--count { min-height: 56px; }
.chip--line { min-height: 52px; font-size: 15px; }
.chip:active:not(:disabled) { background: var(--surface-2); }
.chip:disabled { cursor: not-allowed; }
@media (hover: hover) { .chip:hover:not(:disabled) { border-color: var(--ink); } }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip[aria-pressed='true'] .chip__hint { color: rgb(255 255 255 / 0.8); }
.chip[data-sold-out='true'] { background: var(--surface-2); border-color: var(--border); border-style: dashed; color: var(--muted); }
.chip[data-sold-out='true'] .chip__hint { color: var(--muted); }

/* Fields */
.fields { display: flex; flex-direction: column; gap: var(--space-2); }
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field__label { font-size: 14px; line-height: 20px; font-weight: 600; }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--paper);
  font-size: 16px;
  line-height: 22px;
  outline: none;
  transition: border-color var(--motion) var(--ease), box-shadow var(--motion) var(--ease);
}
.field__input::placeholder { color: var(--muted); }
@media (hover: hover) { .field__input:hover { border-color: var(--muted); } }
.field__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(22 0 237 / 0.2); }
.field__input[aria-invalid='true'] { border-color: var(--danger); }
.field__input[aria-invalid='true']:focus { box-shadow: 0 0 0 3px rgb(207 0 0 / 0.2); }
.field__message { min-height: 40px; color: var(--danger); font-size: 13px; line-height: 20px; }

/* A limit on the review step */
/* From the top: the card is as tall as the review, and on a short screen its middle sits under the action bar. */
.limit { display: flex; flex-direction: column; justify-content: flex-start; gap: var(--space-4); text-align: center; }

/* Ticket */
.ticket { position: relative; overflow: hidden; }
.ticket__top { position: relative; padding: var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); isolation: isolate; }
.ticket__top .star { z-index: -1; }
.ticket__eyebrow { color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; }
.ticket__code { font: 900 28px/32px var(--font-head); letter-spacing: 0.02em; overflow-wrap: anywhere; }
.ticket__tear { position: relative; height: 1px; margin: 0 var(--space-4); border-top: 1px dashed var(--border-strong); }
.ticket__tear::before, .ticket__tear::after {
  content: ''; position: absolute; top: -9px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--border);
}
.ticket__tear::before { left: calc(var(--space-4) * -1 - 9px); }
.ticket__tear::after { right: calc(var(--space-4) * -1 - 9px); }
.ticket__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }

/* States */
.state {
  position: relative;
  min-height: 212px;
  padding: var(--space-8) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  text-align: center;
  overflow: hidden;
  border-radius: var(--radius-card);
  isolation: isolate;
}
.state--empty { border: 1px dashed var(--border-strong); }
.state__lettering { position: relative; width: 44%; max-width: 180px; height: auto; }
.state__text { max-width: 36ch; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.state .star { z-index: -1; }
.state .btn { min-width: 180px; }
.fatal { flex: 1; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: var(--space-6) var(--gutter) calc(var(--space-6) + var(--safe-b)); gap: var(--space-5); max-width: 640px; margin: 0 auto; width: 100%; }
.fatal .hero { margin-inline: calc(var(--gutter) * -1); }

/* Skeletons match the size of what they stand in for */
.sk, .sk-text {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--hover) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1200ms linear infinite;
}
.sk { display: block; }
.sk-text { color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; user-select: none; }
.sk--line { height: 14px; margin: 4px 0; }
.sk--title { height: 22px; margin: 3px 0; width: 60%; }
.sk--short { width: 40%; }
.sk--wide { width: 88%; }
.sk--chip { height: 60px; border-radius: var(--radius-md); }
.sk--count { height: 56px; border-radius: var(--radius-md); }
.sk--image { aspect-ratio: 16 / 9; border-radius: 0; }
.sk--round { width: 44px; height: 44px; border-radius: 50%; }
.flow__head .sk--title { width: 72%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Offline strip: in the top bar, over the link to the chat, which cannot work offline anyway. The page stays uncovered. */
.offline {
  position: fixed;
  z-index: 30;
  right: var(--gutter);
  top: calc(var(--safe-t) + (var(--top-h) - 44px) / 2);
  min-height: 44px;
  max-width: calc(100vw - var(--gutter) * 2 - 112px);
  display: flex;
  align-items: center;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-pop);
}
.offline[hidden] { display: none; }

@media (min-width: 960px) {
  :root { --gutter: var(--space-6); }
  .shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); }
  .tabs {
    position: sticky;
    top: 0;
    bottom: auto;
    align-self: start;
    height: 100dvh;
    padding: var(--space-5) var(--space-3);
    background: var(--canvas);
    border-top: 0;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
  }
  .shell[data-chrome='flow'] .tabs { display: flex; }
  .tabs__head { display: block; padding: 0 var(--space-3); }
  .topbar__mark { visibility: hidden; }
  .tabs__head img { width: 56px; height: auto; }
  .tabs__list { display: flex; flex-direction: column; }
  .tabs__item[data-rail-only] { display: block; }
  .tab { flex-direction: row; justify-content: flex-start; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-control); font-size: 14px; line-height: 20px; color: var(--text-2); text-align: left; }
  .tab[aria-current='page'] { background: var(--ink); color: var(--on-ink); }
  .tab__short { display: none; }
  .tab__full { display: inline; }
  .view { padding-bottom: var(--space-8); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: hover) and (min-width: 960px) { .tab:not([aria-current='page']):hover { background: var(--hover); color: var(--ink); } }

@media (max-width: 359px) {
  .title:not(.title--sm) { font-size: 21px; line-height: 26px; }
  .flow__head { min-height: 172px; }
  .btn { padding: 0 var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .sk, .sk-text { background: var(--surface-2); }
  .btn__spinner { border-top-color: currentColor; opacity: 0.6; }
}
