
:root {
  color-scheme: light;
  --bg: #eef2f7;
  --panel: #ffffff;
  --text: #101827;
  --text-secondary: #5f6b7a;
  --muted: var(--text-secondary);
  --line: #d9dee7;
  --strong-line: #9aa1ac;
  --accent: #1269f2;
  --accent-dark: #0b52bd;
  --warning-bg: #f8e8e5;
  --warning: #9a2517;
  --success: var(--brand-emerald-strong);
  --soft: #f5f7fa;
  --blue-soft: #edf5ff;
}

/* Accommodation reuses the interaction language of the flight generator. */
.accommodation-shell {
  gap: 14px;
  padding: 0;
}

.accommodation-stage {
  overflow: visible;
  padding: 20px;
}

.stay-search-panel {
  position: relative;
  grid-template-columns: minmax(230px, 1.45fr) minmax(155px, .8fr) minmax(140px, .65fr) minmax(140px, .65fr) minmax(160px, .75fr) 132px;
  align-items: stretch;
  overflow: visible;
  border-radius: 8px;
}

.stay-search-panel > .stay-field {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 80px;
  align-content: center;
  gap: 5px;
  border-right: 1px solid var(--line);
  padding: 12px 14px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  transition: box-shadow .16s ease, background .16s ease;
}

.stay-search-panel > .stay-field.is-active {
  z-index: 2;
  background: #fff;
  box-shadow: inset 0 0 0 3px rgba(18, 105, 242, .16);
}

.stay-search-panel > .stay-field.is-error {
  box-shadow: inset 0 0 0 2px rgba(154, 37, 23, .35);
}

.stay-search-panel > .stay-field:focus-within {
  background: #fff;
}

.stay-field > span {
  line-height: 1;
}

.stay-search-panel .stay-field input,
.stay-search-panel .stay-guests-field select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  border: 0;
  padding: 2px 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
}

.stay-date-field input {
  cursor: pointer;
}

.stay-guests-field select {
  cursor: pointer;
}

.stay-search-button {
  min-height: 80px;
  border-radius: 0 7px 7px 0;
}

.stay-suggestions,
.stay-calendar-popover {
  z-index: 90;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 39, .18);
}

.stay-calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: min(32%, 360px);
  width: min(680px, calc(100vw - 64px));
  overflow: hidden;
}

.stay-calendar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.stay-calendar-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stay-calendar-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stay-calendar-month + .stay-calendar-month {
  border-left: 1px solid var(--line);
}

.stay-calendar-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  padding: 14px 12px 8px;
  text-align: center;
}

.stay-calendar-head strong {
  font-size: 19px;
}

.stay-calendar-head button,
.stay-calendar-day {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.stay-calendar-head button {
  min-width: 38px;
  min-height: 38px;
  border-radius: 6px;
  font-size: 22px;
}

.stay-calendar-head button:hover {
  background: var(--soft);
}

.stay-calendar-weekdays,
.stay-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding-inline: 12px;
  text-align: center;
}

.stay-calendar-weekdays {
  gap: 2px;
  padding-block: 7px 6px;
  font-size: 13px;
  font-weight: 900;
}

.stay-calendar-grid {
  gap: 4px;
  padding-bottom: 13px;
}

.stay-calendar-day {
  height: 34px;
  border-radius: 6px;
  font-size: 16px;
}

.stay-calendar-day:hover:not(:disabled) {
  background: var(--soft);
}

.stay-calendar-day.muted {
  color: var(--text-secondary);
}

.stay-calendar-day.disabled {
  color: #cfd3d8;
  cursor: not-allowed;
}

.stay-calendar-day.in-range {
  border-radius: 0;
  background: #e7edff;
}

.stay-calendar-day.range-start,
.stay-calendar-day.range-end {
  background: var(--accent);
  color: #fff;
}

.stay-calendar-day.range-start {
  border-radius: 6px 0 0 6px;
}

.stay-calendar-day.range-end {
  border-radius: 0 6px 6px 0;
}

.stay-results-area {
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
}

.stay-filters {
  overflow: hidden;
}

.stay-filters > label,
.stay-filters fieldset,
.stay-filters fieldset label {
  min-width: 0;
  max-width: 100%;
}

.stay-filters fieldset label {
  align-items: flex-start;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stay-filters input[type="checkbox"],
.stay-filters input[type="radio"] {
  flex: 0 0 auto;
}

.stay-card {
  grid-template-columns: 220px minmax(0, 1fr);
}

.stay-card-title,
.stay-card-bottom {
  min-width: 0;
}

.stay-card-title > div {
  min-width: 0;
}

.stay-card h3,
.stay-card-address,
.stay-card-details {
  overflow-wrap: anywhere;
}

.stay-rating small {
  white-space: nowrap;
}

.stay-card-bottom > div:last-child {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stay-selected-summary dl {
  grid-template-columns: 1.2fr .55fr .65fr 1fr .9fr;
}

.stay-resident-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.stay-resident-toolbar .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stay-resident-toolbar svg,
.stay-resident-head svg {
  width: 18px;
  height: 18px;
}

.stay-resident-head .icon-button {
  width: 38px;
  height: 38px;
}

.stay-template-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.stay-template-section h3,
.stay-template-section p {
  margin: 0;
}

.stay-template-section p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.stay-templates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
  gap: 10px;
}

.stay-template-card {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  background: #fff;
  cursor: pointer;
}

.stay-template-card > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.stay-template-card svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.stay-template-card > svg:last-child {
  opacity: 0;
}

.stay-template-card.selected {
  border-color: var(--accent);
  background: var(--blue-soft);
  color: var(--accent-dark);
}

.stay-template-card.selected svg,
.stay-template-card.selected > svg:last-child {
  color: var(--accent);
  opacity: 1;
}

@media (max-width: 980px) {
  .stay-search-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stay-search-panel > .stay-field {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .stay-location-field {
    grid-column: 1 / -1;
  }

  .stay-property-type-field,
  .stay-guests-field {
    grid-column: 1;
  }

  .stay-search-button {
    grid-column: 2;
    border-radius: 0 0 7px 0;
  }

  .stay-calendar-popover {
    top: 168px;
    left: 0;
    width: 100%;
  }

  .stay-results-area,
  .stay-card,
  .stay-selected-summary {
    grid-template-columns: 1fr;
  }

  .stay-filters {
    position: static;
  }

  .stay-selected-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .accommodation-stage {
    padding: 14px;
  }

  .stay-search-panel {
    grid-template-columns: 1fr;
  }

  .stay-location-field,
  .stay-property-type-field,
  .stay-guests-field,
  .stay-search-button {
    grid-column: 1;
  }

  .stay-search-panel > .stay-field {
    border-right: 0;
  }

  .stay-search-button {
    border-radius: 0 0 7px 7px;
  }

  .stay-calendar-popover {
    top: 248px;
    width: 100%;
    max-height: min(600px, 70vh);
    overflow-y: auto;
  }

  .stay-calendar-months {
    grid-template-columns: 1fr;
  }

  .stay-calendar-month + .stay-calendar-month {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stay-calendar-meta,
  .stay-resident-toolbar,
  .stay-card-title,
  .stay-card-bottom,
  .stay-results-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stay-card-photo,
  .stay-card-photo img,
  .stay-card-photo > div {
    min-height: 210px;
    max-height: 270px;
  }

  .stay-card-bottom > div:last-child,
  .stay-card-bottom .button,
  .stay-resident-toolbar .button,
  .stay-templates {
    width: 100%;
  }

  .stay-templates {
    grid-template-columns: 1fr;
  }

  .stay-selected-summary dl {
    grid-template-columns: 1fr;
  }
}

/* Accommodation search mirrors the established flight-search controls. */
#accommodationShell .stay-search-panel {
  position: sticky;
  top: 0;
  z-index: 120;
  gap: 0;
  border: 0;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: none;
  transition: border-radius .16s ease, box-shadow .16s ease, padding .16s ease;
}

#accommodationShell .stay-search-panel.is-stuck {
  border-radius: 0 0 8px 8px;
  padding: 10px 12px;
  box-shadow: 0 14px 30px rgba(16, 24, 39, .12);
}

#accommodationShell .stay-search-panel > .stay-field {
  display: block;
  min-height: 56px;
  border: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

#accommodationShell .stay-field > span {
  color: transparent;
  font-size: 0;
}

#accommodationShell .stay-search-panel .stay-field > input,
#accommodationShell .stay-search-panel .stay-property-type-field > button,
#accommodationShell .stay-search-panel .stay-guests-field > select {
  display: block;
  width: 100%;
  height: 56px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  padding: 12px 16px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

#accommodationShell .stay-location-field > input {
  border-radius: 12px 0 0 12px;
}

#accommodationShell .stay-search-panel .stay-guests-field > select {
  display: block;
  border-right: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
  cursor: pointer;
}

#accommodationShell .stay-search-panel .stay-property-type-field > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

#accommodationShell .stay-search-panel > .stay-field.is-active,
#accommodationShell .stay-search-panel > .stay-field:focus-within {
  background: transparent;
  box-shadow: none;
}

#accommodationShell .stay-search-panel > .stay-field.is-active > input,
#accommodationShell .stay-search-panel > .stay-field.is-active > button,
#accommodationShell .stay-search-panel > .stay-field.is-active > select,
#accommodationShell .stay-search-panel .stay-field > input:focus,
#accommodationShell .stay-search-panel .stay-property-type-field > button:focus,
#accommodationShell .stay-search-panel .stay-guests-field > select:focus {
  position: relative;
  z-index: 2;
  outline: 3px solid rgba(18, 105, 242, .14);
}

#accommodationShell .stay-search-panel > .stay-field.is-error > input,
#accommodationShell .stay-search-panel > .stay-field.is-error > button,
#accommodationShell .stay-search-panel > .stay-field.is-error > select {
  position: relative;
  z-index: 2;
  outline: 2px solid rgba(154, 37, 23, .45);
}

#accommodationShell .stay-search-button {
  min-height: 56px;
  border-radius: 10px;
  margin-left: 8px;
}

#accommodationShell .stay-search-panel.is-stuck .stay-field > input,
#accommodationShell .stay-search-panel.is-stuck .stay-property-type-field > button,
#accommodationShell .stay-search-panel.is-stuck .stay-guests-field > select,
#accommodationShell .stay-search-panel.is-stuck .stay-search-button {
  height: 52px;
  min-height: 52px;
}

#accommodationShell .stay-suggestions,
#accommodationShell .stay-property-type-picker,
#accommodationShell .stay-calendar-popover {
  z-index: 140;
}

#accommodationShell .stay-loading .search-progress-text {
  font-size: 19px;
}

#accommodationShell .stay-price-filter {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 13px;
}

#accommodationShell .stay-price-filter .filter-range-label {
  margin-top: 8px;
}

#accommodationShell .stay-price-filter .range-fields input[type="number"] {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

#accommodationShell.stay-search-sticky-active .stay-filters {
  top: 86px;
}

@media (max-width: 980px) {
  #accommodationShell .stay-search-panel,
  #accommodationShell .stay-search-panel.is-stuck {
    position: relative;
    gap: 8px;
    border-radius: 8px;
    padding: 18px;
    box-shadow: none;
  }

  #accommodationShell .stay-search-panel .stay-field > input,
  #accommodationShell .stay-search-panel .stay-property-type-field > button,
  #accommodationShell .stay-search-panel .stay-guests-field > select,
  #accommodationShell .stay-search-button {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 0;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

button {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.intro,
.panel,
.result {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(25, 34, 48, 0.06);
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 22px;
}

.intro-actions,
.auth-actions,
.profile-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.intro-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-actions {
  gap: 10px;
}

.text-action {
  min-height: 38px;
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.text-action:hover {
  color: var(--accent-dark);
}

.profile-button {
  gap: 8px;
}

.profile-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.profile-area {
  width: 100%;
}

.sample-action {
  margin-left: auto;
  padding-inline: 12px;
  font-size: 13px;
}

body.auth-required #workspace {
  display: none;
}

body.telegram-binding-required #workspace {
  display: none;
}

.auth-screen {
  --accent: var(--brand-emerald-strong);
  --accent-dark: var(--brand-emerald-pressed);
  --text: #111827;
  --muted: #6b7280;
  --line: #d1d5db;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 32px 16px;
  background: #f3f4f6;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.auth-screen .auth-card {
  width: min(480px, 100%);
  min-width: 0;
  max-height: none;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: none;
}

.auth-screen .auth-card.hidden {
  display: none;
}

.auth-screen .modal-head {
  border-bottom: 0;
  padding: 24px 24px 16px;
}

.auth-screen .eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.auth-screen h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.auth-screen .auth-tabs {
  gap: 4px;
  margin: 0 24px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px;
  background: #f9fafb;
}

.auth-screen .auth-tab {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 12px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}

.auth-screen .auth-tab:hover {
  color: var(--accent);
}

.auth-screen .auth-tab.active {
  border-color: var(--brand-emerald-line);
  background: var(--brand-emerald-soft);
  color: var(--accent-dark);
}

.auth-screen .auth-body {
  max-height: none;
  overflow: visible;
  padding: 24px;
}

.auth-screen .auth-pane {
  gap: 16px;
}

.auth-screen label {
  gap: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.auth-screen input {
  min-width: 0;
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 400;
}

.auth-screen input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--brand-emerald-line);
  outline-offset: 1px;
}

.auth-screen .button {
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}

.auth-screen .button.ghost {
  color: #374151;
}

.auth-screen .button.ghost:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.auth-screen :is(button, a):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.auth-screen .auth-message {
  min-height: 0;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.auth-screen .auth-message:empty {
  display: none;
}

.auth-screen .text-action {
  min-height: 44px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.auth-screen :is(.telegram-binding-card, .registration-thanks) {
  padding: 24px;
}

.auth-screen .telegram-bot-identity {
  border-radius: 8px;
  background: #f9fafb;
}

.auth-screen .telegram-bot-identity span {
  font-weight: 500;
}

.auth-screen .telegram-binding-actions {
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 24px 16px;
  }

  .auth-screen .modal-head {
    padding: 20px 16px 16px;
  }

  .auth-screen .auth-tabs {
    margin-inline: 16px;
  }

  .auth-screen :is(.auth-body, .telegram-binding-card, .registration-thanks) {
    padding: 20px 16px;
  }
}

.profile-menu strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  text-overflow: ellipsis;
}

.intro h1 {
  max-width: 760px;
}

.panel {
  padding: 24px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

h4 {
  margin-bottom: 12px;
  font-size: 15px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  scroll-margin-top: 18px;
}

.product-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(25, 34, 48, 0.05);
}

.product-tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.product-tab:hover {
  background: var(--soft);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

.product-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.step-pill,
.toggle-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.link-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 8px 4px;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent-dark);
}

.step-pill.active,
.toggle-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.step-pill.completed {
  border-color: var(--brand-emerald-line);
  background: var(--brand-emerald-soft);
  color: var(--brand-emerald-strong);
}

.step-pill.completed::before {
  content: "✓ ";
}

.step-screen {
  display: none;
}

.step-screen.active {
  display: block;
}

.section-head,
.segment-title,
.result-head,
.verify-head,
.modal-head,
.modal-actions,
.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.accommodation-shell {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.accommodation-shell.hidden {
  display: none;
}

.stay-search-card {
  display: grid;
  gap: 16px;
}

.accommodation-steps {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.accommodation-steps button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 16px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.accommodation-steps button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.accommodation-steps button.complete {
  border-color: var(--brand-emerald-line);
  background: var(--brand-emerald-soft);
  color: var(--brand-emerald-strong);
}

.accommodation-steps button.complete::before {
  content: "✓ ";
}

.accommodation-stage {
  padding: 22px;
}

.stay-search-panel {
  display: grid;
  grid-template-columns: minmax(230px, 1.45fr) minmax(155px, .8fr) minmax(140px, .65fr) minmax(140px, .65fr) minmax(160px, .75fr) auto;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stay-search-panel > label,
.stay-property-type-field,
.stay-guests-field {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 78px;
  align-content: center;
  gap: 5px;
  border-right: 1px solid var(--line);
  padding: 11px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stay-search-panel input,
.stay-search-panel select,
.stay-property-type-field button,
.stay-guests-field select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 0;
  padding: 2px 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.stay-search-panel input:focus,
.stay-guests-field:focus-within,
.stay-search-panel > label:focus-within {
  background: var(--blue-soft);
}

.stay-guests-field select {
  cursor: pointer;
}

.stay-property-type-field button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.stay-search-button {
  min-height: 80px;
  border-radius: 0 7px 7px 0;
  padding-inline: 24px;
}

.stay-suggestions,
.stay-property-type-picker {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  left: 0;
  width: min(520px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 39, .16);
}

.stay-suggestions {
  max-height: 440px;
  overflow-y: auto;
  padding: 8px;
}

.stay-property-type-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: min(310px, calc(100vw - 48px));
  padding: 10px;
}

.stay-property-type-picker label {
  display: block;
}

.stay-property-type-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stay-property-type-picker span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.stay-property-type-picker svg {
  width: 19px;
  color: var(--accent);
}

.stay-property-type-picker input:checked + span {
  border-color: var(--accent);
  background: var(--blue-soft);
  color: var(--accent);
}

.stay-suggestions h3 {
  margin: 9px 10px 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.stay-suggestions button,
.stay-suggestion-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.stay-suggestion-row {
  cursor: default;
}

.stay-suggestions [data-stay-suggestion-level="1"] {
  padding-left: 24px;
}

.stay-suggestions [data-stay-suggestion-level="2"] {
  padding-left: 44px;
}

.stay-suggestions [data-stay-suggestion-type="city"] {
  background: #f6f9ff;
}

.stay-suggestions button:hover,
.stay-suggestions button:focus-visible {
  background: var(--blue-soft);
}

.stay-suggestion-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #f0f4ff;
  color: var(--accent);
}

.stay-suggestion-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.25;
  color: var(--accent);
}

.stay-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.stay-suggestion-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stay-suggestions small {
  display: block;
}

.stay-suggestions small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stay-child-ages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}

.stay-child-ages label {
  color: var(--muted);
  font-size: 11px;
}

.stay-child-ages select {
  min-height: 38px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
}

.stay-loading {
  margin-top: 18px;
  text-align: center;
}

.stay-loading p {
  font-size: 18px;
  font-weight: 900;
}

.stay-results-area {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 22px;
}

.stay-filters {
  position: sticky;
  top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.stay-filter-head,
.stay-results-head,
.stay-card-title,
.stay-card-bottom,
.stay-resident-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stay-filter-head button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.stay-filters > label,
.stay-filters fieldset {
  display: grid;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 13px 0 0;
  padding: 13px 0 0;
  font-size: 13px;
}

.stay-filters legend {
  margin-bottom: 7px;
  padding: 0;
  font-weight: 900;
}

.stay-filters fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stay-filters input[type="range"] {
  padding: 0;
}

.stay-results-column,
.stay-results {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.stay-results-head label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stay-results-head select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 30px 6px 9px;
  background: #fff;
}

.stay-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stay-card-photo {
  min-height: 230px;
  background: var(--soft);
}

.stay-card-photo img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.stay-card-photo > div {
  display: grid;
  height: 100%;
  min-height: 230px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
}

.stay-card-main {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 18px;
}

.stay-card h3,
.stay-card p {
  margin: 0;
}

.stay-card h3 {
  margin-top: 3px;
  font-size: 21px;
}

.stay-card-title > div > span,
.stay-card-main > p,
.stay-card-bottom small,
.stay-card-bottom span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stay-rating {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  color: var(--muted);
  font-size: 11px;
}

.stay-rating strong {
  display: grid;
  width: 38px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
}

.stay-card-tags,
.stay-amenity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stay-card-tags span,
.stay-amenity-list span {
  border-radius: 5px;
  padding: 5px 7px;
  background: var(--blue-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
}

.stay-card-bottom {
  align-items: end;
  margin-top: auto;
}

.stay-card-bottom > div:first-child {
  display: grid;
}

.stay-card-bottom > div:last-child {
  display: flex;
  gap: 8px;
}

.stay-card-bottom strong {
  font-size: 24px;
}

.stay-card-warning {
  color: var(--warning) !important;
}

.stay-card-details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.stay-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stay-detail-grid > div,
.stay-room {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
}

.stay-detail-grid span,
.stay-room span {
  color: var(--muted);
  font-size: 12px;
}

.stay-selected-summary {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 2fr;
  gap: 18px;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}

.stay-selected-summary > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.stay-selected-summary img {
  width: 84px;
  height: 68px;
  border-radius: 6px;
  object-fit: cover;
}

.stay-selected-summary span,
.stay-selected-summary small {
  display: grid;
}

.stay-selected-summary small {
  margin-top: 3px;
  color: var(--muted);
}

.stay-selected-summary dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.stay-selected-summary dl div {
  min-width: 0;
}

.stay-selected-summary dd {
  overflow-wrap: anywhere;
}

.stay-residents {
  display: grid;
  gap: 12px;
}

.stay-resident {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}

.stay-resident h3 {
  margin: 0 0 12px;
}

.stay-resident-head label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-dark);
  font-weight: 800;
}

@media (max-width: 980px) {
  .stay-search-panel,
  .stay-results-area,
  .stay-card,
  .stay-selected-summary {
    grid-template-columns: 1fr;
  }

  .stay-search-panel > label,
  .stay-property-type-field,
  .stay-guests-field {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stay-search-button {
    border-radius: 0 0 7px 7px;
  }

  .stay-filters {
    position: static;
  }

  .stay-card-photo,
  .stay-card-photo img,
  .stay-card-photo > div {
    min-height: 220px;
    max-height: 300px;
  }

  .stay-selected-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .accommodation-shell,
  .accommodation-stage {
    padding: 14px;
  }

  .stay-card-title,
  .stay-card-bottom,
  .stay-results-head,
  .stay-resident-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stay-card-bottom > div:last-child,
  .stay-card-bottom .button {
    width: 100%;
  }

  .stay-detail-grid,
  .stay-child-ages,
  .stay-selected-summary dl {
    grid-template-columns: 1fr;
  }
}

.compact-head {
  margin: 14px 0;
}

.trip-toggle,
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-toggle .toggle-button {
  display: none;
}

.fields,
.route-fields,
.passenger-fields {
  display: grid;
  gap: 12px;
}

.fields.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fields.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-fields {
  grid-template-columns: 1.25fr 1.25fr 0.85fr 0.85fr 0.75fr 0.65fr;
  align-items: start;
}

.route-fields input,
.route-fields select {
  height: 50px;
  min-height: 50px;
  font-weight: 850;
}

.passenger-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.full {
  grid-column: 1 / -1;
}

label {
  position: relative;
  display: grid;
  gap: 7px;
  color: #3f4a5e;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(18, 105, 242, 0.14);
}

.disabled {
  opacity: 0.55;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 9px 15px;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.ghost {
  border-color: var(--line);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
}

.flight-search-panel {
  position: sticky;
  top: 0;
  z-index: 120;
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: none;
  transition: border-radius 0.16s ease, box-shadow 0.16s ease, padding 0.16s ease;
}

.flight-search-panel.is-stuck {
  gap: 0;
  border-radius: 0 0 8px 8px;
  padding: 10px 12px;
  box-shadow: 0 14px 30px rgba(16, 24, 39, 0.12);
}

.flight-search-panel.is-stuck .search-trip-toggle,
.flight-search-panel.is-stuck > .complex-route-link,
.flight-search-panel.is-stuck > #simpleRouteToggle {
  display: none;
}

.flight-search-panel.is-stuck .flight-search-row {
  align-items: stretch;
}

.flight-search-panel.is-stuck .flight-cell > input,
.flight-search-panel.is-stuck .passenger-picker-button,
.flight-search-panel.is-stuck .swap-route,
.flight-search-panel.is-stuck .search-submit {
  height: 52px;
  min-height: 52px;
}

.search-trip-toggle {
  justify-content: flex-end;
}

.search-trip-toggle .toggle-button {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.search-trip-toggle .toggle-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.flight-search-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.12fr) 42px minmax(130px, 1.12fr) minmax(120px, 0.78fr) minmax(120px, 0.78fr) minmax(150px, 0.96fr) 120px;
  align-items: center;
  gap: 0;
}

.flight-cell {
  display: block;
  min-height: 56px;
  gap: 0;
  border-right: 1px solid var(--line);
  padding: 0;
  color: transparent;
  font-size: 0;
  font-weight: 900;
  line-height: 0;
}

.flight-cell > input,
.passenger-picker-button {
  display: block;
  height: 56px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  padding: 12px 16px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.flight-cell:first-child > input {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.flight-cell .field-caption,
.flight-cell > span:first-child,
.flight-cell {
  color: transparent;
}

.flight-cell input::placeholder {
  color: var(--text-secondary);
}

.flight-cell input:focus,
.passenger-picker-button:focus {
  outline: 3px solid rgba(18, 105, 242, 0.14);
}

.flight-cell.disabled input {
  background: var(--soft);
}

.date-cell {
  position: relative;
}

.date-picker-popover {
  position: absolute;
  z-index: 35;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  box-shadow: 0 18px 48px rgba(16, 24, 39, 0.18);
}

.date-picker-range {
  width: min(680px, calc(100vw - 48px));
}

.date-picker-range.align-right {
  right: 0;
  left: auto;
}

.date-picker-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.date-picker-panel {
  min-width: 0;
}

.date-picker-panel-title {
  margin: 12px 12px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.date-picker-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 14px 12px 8px;
  text-align: center;
}

.date-picker-head strong {
  font-size: 20px;
}

.date-picker-head button,
.date-picker-day {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.date-picker-head button {
  font-size: 22px;
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 12px;
  text-align: center;
}

.date-picker-weekdays {
  gap: 2px;
  padding-top: 8px;
  padding-bottom: 6px;
  font-weight: 900;
}

.date-picker-grid {
  gap: 4px;
  padding-bottom: 12px;
}

.date-picker-day {
  height: 34px;
  border-radius: 6px;
  color: #222831;
  font-size: 18px;
}

.date-picker-day:hover:not(:disabled) {
  background: var(--soft);
}

.date-picker-day.muted {
  color: var(--text-secondary);
}

.date-picker-day.disabled {
  color: #cfd3d8;
  cursor: not-allowed;
}

.date-picker-day.selected,
.date-picker-return .date-picker-day.range-start,
.date-picker-return .date-picker-day.range-end,
.date-picker-range .date-picker-day.range-start,
.date-picker-range .date-picker-day.range-end {
  background: var(--accent);
  color: #fff;
}

.date-picker-return .date-picker-day.range-preview,
.date-picker-return .date-picker-day.selected:not(.range-start):not(.range-end),
.date-picker-range .date-picker-day.range-preview,
.date-picker-range .date-picker-day.selected:not(.range-start):not(.range-end) {
  background: #e7edff;
  color: var(--text);
}

.date-picker-return .date-picker-day.range-preview,
.date-picker-return .date-picker-day.range-start,
.date-picker-return .date-picker-day.range-end,
.date-picker-range .date-picker-day.range-preview,
.date-picker-range .date-picker-day.range-start,
.date-picker-range .date-picker-day.range-end {
  border-radius: 0;
}

.date-picker-return .date-picker-day.range-start,
.date-picker-range .date-picker-day.range-start {
  border-radius: 6px 0 0 6px;
}

.date-picker-return .date-picker-day.range-end,
.date-picker-range .date-picker-day.range-end {
  border-radius: 0 6px 6px 0;
}

.date-picker-oneway {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.date-picker-oneway:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.field-caption {
  display: none;
}

.swap-route {
  z-index: 2;
  width: 42px;
  height: 56px;
  align-self: center;
  border: 1px solid var(--line);
  border-right: 0;
  background: #fff;
  color: var(--accent);
  font-size: 25px;
  font-weight: 900;
  cursor: pointer;
}

.passenger-cell {
  position: relative;
}

.passenger-picker-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.flight-search-row .passenger-picker-button {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-right: 1px solid var(--line);
}

.passenger-picker {
  position: absolute;
  z-index: 25;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 92vw);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 24px 70px rgba(16, 24, 39, 0.22);
}

.passenger-picker h3,
.service-class-row {
  padding: 18px 20px;
  line-height: 1.2;
}

.passenger-counter {
  display: grid;
  grid-template-columns: 1fr 44px 42px 44px;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 20px;
}

.passenger-counter strong,
.passenger-count-input {
  font-size: 20px;
  line-height: 1.15;
}

.passenger-count-input {
  width: 42px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  text-align: center;
  appearance: textfield;
}

.passenger-count-input::-webkit-inner-spin-button,
.passenger-count-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.passenger-count-input:focus {
  border-color: var(--accent);
  background: #fff;
  outline: 2px solid rgba(18, 105, 242, 0.16);
}

.passenger-counter span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.passenger-counter > button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
}

.passenger-counter > button:last-child {
  background: var(--accent);
  color: #fff;
}

.service-class-row {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.service-class-row > strong {
  margin-bottom: 4px;
  font-size: 19px;
  line-height: 1.15;
}

.class-options {
  display: grid;
}

.class-option {
  display: grid;
  grid-template-columns: 1fr 26px;
  gap: 16px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  cursor: pointer;
}

.class-option:last-child {
  border-bottom: 0;
}

.class-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.class-option i {
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid #c2cad7;
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.class-option i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.16s ease;
}

.class-option input:checked + i {
  border-color: var(--accent);
  background: var(--accent);
}

.class-option input:checked + i::after {
  transform: translate(-50%, -50%) scale(1);
}

.search-submit {
  height: 56px;
  min-height: 56px;
  align-self: center;
  border: 0;
  border-radius: 8px;
  padding: 0 26px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}

.search-submit:hover {
  background: var(--accent-dark);
}

.complex-route-link {
  width: fit-content;
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.complex-panel {
  margin-top: 14px;
  overflow: visible;
}

.complex-routes {
  display: grid;
  gap: 6px;
}

.complex-route-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.7fr 42px;
  align-items: center;
}

.complex-route-row .flight-cell > input {
  border-radius: 0;
}

.complex-route-row:first-child .flight-cell:first-child > input {
  border-top-left-radius: 12px;
}

.complex-route-row:first-child .complex-remove {
  border-top-right-radius: 12px;
}

.complex-remove {
  height: 56px;
  align-self: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  font-size: 30px;
  cursor: pointer;
}

.complex-controls {
  display: grid;
  grid-template-columns: 1fr 0.85fr 130px;
  align-items: center;
}

.complex-add {
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 0 0 0 12px;
  background: #fff;
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.complex-passenger-cell .passenger-picker-button {
  border-radius: 0 0 12px 0;
}

.search-button {
  min-height: 50px;
  min-width: 150px;
}

.combo-label {
  z-index: 30;
}

.combo-label:focus-within {
  z-index: 300;
}

.complex-route-row {
  position: relative;
}

.complex-route-row:focus-within {
  z-index: 250;
}

.airport-menu {
  position: absolute;
  z-index: 200;
  top: calc(100% + 8px);
  left: 0;
  width: min(390px, 92vw);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  box-shadow: 0 18px 48px rgba(16, 24, 39, 0.16);
}

.airport-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.airport-option.city-option {
  background: #f2f6ff;
}

.airport-option[data-airport-level="2"] {
  padding-left: 36px;
}

.airport-option:hover {
  background: var(--blue-soft);
}

.airport-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #f0f4ff;
  color: #4266ff;
  font-size: 18px;
}

.airport-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.airport-icon.country-icon {
  background: #f7f3ff;
  color: #7c4dff;
}

.airport-icon.city-icon {
  background: #eef4ff;
  color: #4266ff;
}

.airport-icon.airport-plane-icon {
  background: var(--brand-emerald-soft);
  color: var(--brand-emerald-strong);
}

.airport-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  line-height: 1.18;
}

.airport-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.airport-copy small,
.airport-copy em,
.airport-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.airport-copy em {
  font-style: normal;
}

.airport-code {
  color: var(--text-secondary);
  font-size: 16px;
}

.airport-empty {
  padding: 12px;
}

.progress-card {
  margin: 16px 0 4px;
}

.search-progress-card {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.search-progress-card .search-progress-text {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.search-progress-card .search-progress-text.is-changing {
  opacity: 0;
  transform: translateY(3px);
}

.results-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  margin: 10px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filters label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.quick-filters input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.compact-actions {
  align-items: end;
}

.sort-label {
  min-width: 240px;
}

.complex-route {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}

.complex-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.complex-legs {
  display: grid;
  gap: 12px;
}

.complex-leg {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.complex-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 0.7fr;
  gap: 12px;
}

.progress-card p {
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
}

.progress-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce4ef;
}

.progress-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #90bdf7);
  animation: progress 1.05s ease-in-out infinite;
}

@keyframes progress {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(260%);
  }
}

.capacity-note,
.status,
.muted {
  margin: 0;
  color: var(--muted);
}

.capacity-note {
  font-size: 13px;
}

.error-text,
.check-message.error,
.status.error,
.option-warning {
  color: var(--warning);
}

.check-message {
  min-height: 20px;
  margin: 14px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.flight-results {
  display: grid;
  gap: 16px;
}

.flight-results-head {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16, 24, 39, 0.08);
}

.flight-results-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.flight-results-head p {
  margin: 0;
  font-weight: 800;
}

.adjacent-dates-panel {
  position: sticky;
  top: 16px;
  z-index: 85;
  display: grid;
  gap: 14px;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px 22px 22px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(16, 24, 39, 0.08);
}

body.search-sticky-active .adjacent-dates-panel,
body.search-sticky-active .flight-filter-panel {
  top: 86px;
}

.adjacent-dates-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.adjacent-dates-head h3 {
  margin: 0;
  font-size: 18px;
}

.adjacent-dates-head span {
  color: var(--muted);
  font-size: 14px;
}

.adjacent-dates-scroll {
  display: grid;
  grid-auto-columns: minmax(150px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.adjacent-date-card {
  display: grid;
  min-height: 72px;
  gap: 6px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.adjacent-date-card:hover,
.adjacent-date-card.selected {
  border-color: var(--accent);
  background: var(--blue-soft);
}

.adjacent-date-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.adjacent-date-card strong {
  color: var(--accent);
  font-size: 16px;
  font-weight: 950;
}

.flight-results-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.flight-filter-panel {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(16, 24, 39, 0.08);
}

.adjacent-dates {
  width: 100%;
}

.adjacent-dates.active {
  border-color: var(--accent);
  background: var(--blue-soft);
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-head h3 {
  font-size: 16px;
}

.filter-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.filter-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.filter-section summary::-webkit-details-marker {
  display: none;
}

.filter-section summary::after {
  color: var(--accent);
  content: "⌄";
  font-size: 24px;
  line-height: 1;
}

.filter-section[open] summary::after {
  transform: rotate(180deg);
}

.filter-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.filter-options label {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 850;
}

.filter-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.filter-muted,
.filter-range-label {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.filter-section input[type="range"] {
  width: 100%;
  margin-top: 16px;
  accent-color: var(--accent);
}

.range-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.range-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.range-fields input[type="number"],
.range-fields input[type="time"],
.range-fields input[type="text"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-weight: 850;
}

.dual-range {
  display: grid;
  grid-column: 1 / -1;
  gap: 2px;
  padding-top: 2px;
}

.dual-range input[type="range"] {
  margin-top: 0;
}

.airline-filter-row {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  gap: 9px;
}

.airline-filter-row span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.airline-filter-row em {
  color: var(--muted);
  font-style: normal;
}

.airline-filter-row strong {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.airline-dot,
.airline-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.airline-dot {
  width: 28px;
  height: 28px;
  background: #e92c2c;
}

.airline-logo-mark {
  background: #fff;
}

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

.airline-logo-mark > span {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  background: #e92c2c;
}

.airline-logo-mark.logo-failed img {
  display: none;
}

.airline-logo-mark.logo-failed > span {
  display: grid;
}

.flight-results-main {
  display: grid;
  gap: 12px;
}

.results-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.results-list-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.results-list-head label {
  min-width: 220px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.flight-card-list {
  display: grid;
  gap: 16px;
}

.flight-option {
  position: relative;
  display: grid;
  gap: 22px;
  border: 3px solid transparent;
  border-radius: 28px;
  padding: 24px 64px 24px 24px;
  background: #fff;
  box-shadow: 0 4px 0 var(--strong-line), 0 18px 42px rgba(27, 39, 56, 0.08);
  cursor: pointer;
}

.flight-option:hover,
.flight-option.selected {
  border-color: var(--accent);
}

.flight-option.shared-highlight {
  border-color: #ff6a2a;
  box-shadow: 0 4px 0 #ff6a2a, 0 18px 42px rgba(255, 106, 42, 0.16);
}

.option-price strong {
  display: inline-block;
  margin: 0 16px 0 0;
  color: #6c747f;
  font-size: 32px;
  line-height: 1;
}

.tag-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  vertical-align: middle;
}

.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--blue-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.tag-row span:first-child {
  background: var(--accent);
  color: #fff;
}

.favorite-button {
  position: absolute;
  top: 22px;
  right: 24px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.favorite-button::before,
.favorite-button::after {
  position: absolute;
  right: calc(100% + 10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  transform: translateY(4px);
}

.favorite-button::before {
  top: 50%;
  z-index: 2;
  min-width: max-content;
  border-radius: 6px;
  padding: 8px 10px;
  background: #111;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 14px;
  font-weight: 850;
  transform: translateY(-50%) translateY(4px);
}

.favorite-button::after {
  top: 50%;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 7px solid #111;
  content: "";
  transform: translateY(-50%) translateY(4px);
}

.favorite-button:hover::before,
.favorite-button:hover::after,
.favorite-button:focus-visible::before,
.favorite-button:focus-visible::after,
.favorite-button.feedback-visible::before,
.favorite-button.feedback-visible::after {
  opacity: 1;
  transform: translateY(-50%);
}

.favorite-button.feedback-error::before {
  background: var(--warning);
}

.favorite-button.feedback-error::after {
  border-left-color: var(--warning);
}

.favorite-button:hover {
  background: var(--blue-soft);
}

.favorite-button svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.4;
}

.option-price small,
.class-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.class-summary {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

.flight-card-routes {
  display: grid;
  gap: 18px;
}

.result-route-line {
  display: grid;
  grid-template-columns: 54px 130px minmax(220px, 1fr) 130px;
  gap: 20px;
  align-items: center;
}

.airline-logo {
  width: 46px;
  height: 46px;
  border: 2px solid #e2e7ef;
  background: #fff;
}

.route-time {
  min-width: 0;
}

.route-time strong {
  display: block;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.route-time span,
.route-time small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-weight: 850;
  text-overflow: ellipsis;
}

.route-time span {
  margin-top: 6px;
  font-size: 16px;
}

.route-time small {
  margin-top: 2px;
  font-size: 13px;
}

.route-time.end {
  text-align: right;
}

.result-timeline {
  min-width: 0;
  text-align: center;
}

.result-timeline p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 900;
}

.result-timeline > div:not(.flight-timeline-detail) {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.result-timeline > div:not(.flight-timeline-detail)::before {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #c5cedb;
  content: "";
  transform: translateY(-50%);
}

.result-timeline > div:not(.flight-timeline-detail) i {
  position: relative;
  width: 10px;
  height: 10px;
  border: 3px solid #b7c2d0;
  border-radius: 50%;
  background: #fff;
}

.result-timeline > div:not(.flight-timeline-detail) i.middle {
  border-color: #aab5c5;
}

.result-timeline > span {
  display: block;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-results {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.route-mini {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(180px, 1.4fr) minmax(90px, 0.8fr);
  gap: 16px;
  align-items: center;
}

.route-mini strong {
  display: block;
  color: var(--text);
  font-size: 25px;
}

.route-mini span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.timeline {
  min-width: 0;
  text-align: center;
}

.timeline p {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.timeline div {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.timeline div::before {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #b9c3d1;
  content: "";
  transform: translateY(-50%);
}

.timeline i {
  position: relative;
  width: 10px;
  height: 10px;
  border: 3px solid #b9c3d1;
  border-radius: 50%;
  background: #fff;
}

.details-button {
  min-width: 96px;
}

.option-warning {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.route-next,
.step-actions {
  margin-top: 18px;
}

.selected-flight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 14px;
  background: var(--blue-soft);
}

.selected-flight h3 {
  margin-bottom: 6px;
}

.selected-flight p {
  margin-bottom: 3px;
}

.passengers,
.segments,
.segment-lines {
  display: grid;
  gap: 14px;
}

.modal-segment-groups {
  display: grid;
  gap: 18px;
}

.modal-segment-group {
  display: grid;
  gap: 12px;
}

.modal-direction-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.direction-plane {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
}

.direction-plane.return {
  transform: scaleX(-1);
}

.direction-plane::before {
  width: 34px;
  height: 19px;
  background: var(--text);
  clip-path: polygon(0 55%, 14% 51%, 24% 28%, 34% 28%, 40% 48%, 77% 38%, 92% 40%, 100% 48%, 96% 57%, 43% 67%, 31% 89%, 20% 89%, 23% 66%, 7% 65%);
  content: "";
  transform: rotate(-7deg);
}

.direction-plane > span {
  position: absolute;
  right: 2px;
  bottom: 1px;
  left: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.passenger,
.segment {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}

.passenger-fields input,
.passenger-fields select {
  box-sizing: border-box;
  height: 50px;
  min-height: 50px;
  padding: 9px 11px;
  line-height: 1.2;
}

.passenger-route-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 6px 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.passenger-route-summary > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
}

.passenger-route-summary span,
.passenger-route-summary small,
.document-row span {
  color: var(--muted);
}

.group-hint {
  margin: 14px 0;
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  background: var(--blue-soft);
  color: var(--text);
}

.airport-country {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 16px;
  background: #fff;
}

.airport-country strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.document-row > div:first-child {
  display: grid;
  gap: 3px;
}

.segment-title {
  margin-bottom: 16px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.summary {
  display: grid;
  gap: 20px;
}

.summary-top,
.modal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-top div,
.summary-top .stat-month-trigger,
.modal-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.stat-month-trigger {
  position: relative;
  text-align: left;
  cursor: pointer;
}

.stat-month-trigger svg {
  position: absolute;
  right: 10px;
  bottom: 14px;
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.stat-month-trigger:hover,
.stat-month-trigger[aria-expanded="true"] {
  border-color: var(--accent);
}

.user-months {
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line);
}

.month-toolbar,
.month-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-toolbar {
  justify-content: space-between;
  margin-bottom: 8px;
}

.month-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--accent);
  cursor: pointer;
}

.month-arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

.month-arrow svg {
  width: 18px;
  height: 18px;
}

.month-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  overscroll-behavior-x: contain;
}

.month-option {
  display: grid;
  flex: 0 0 160px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.month-option span {
  font-size: 14px;
  text-transform: capitalize;
}

.month-option strong {
  font-size: 22px;
}

.month-option small,
.month-selection {
  color: var(--muted);
  font-size: 13px;
}

.month-option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--blue-soft);
}

.summary-top span,
.modal-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-top strong,
.modal-summary strong {
  font-size: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.result,
.result-content {
  margin-top: 18px;
  padding: 22px;
}

.result-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.booking-preview {
  width: 100%;
  min-height: 880px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.final-document-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 14px;
  padding-bottom: 2px;
}

.final-document-picker button {
  display: grid;
  gap: 2px;
  min-width: 164px;
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.final-document-picker button[aria-selected="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.final-document-picker span {
  font-size: 12px;
}

.final-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.result-head .final-actions {
  margin-top: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5dvh, 24px) 18px;
}

.modal.hidden,
.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: calc(100dvh - clamp(24px, 5dvh, 48px));
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.auth-card {
  width: min(430px, 100%);
}

.telegram-binding-card {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.telegram-binding-card.hidden {
  display: none;
}

.telegram-binding-card h2,
.telegram-binding-card p {
  margin: 0;
}

.telegram-binding-card > .button,
.telegram-binding-card [data-telegram-binding-pending] > .button,
.telegram-binding-card [data-telegram-binding-success] > .button {
  width: 100%;
}

.telegram-binding-card [data-telegram-binding-pending],
.telegram-binding-card [data-telegram-binding-success] {
  display: grid;
  gap: 14px;
}

.telegram-binding-card [data-telegram-binding-pending].hidden,
.telegram-binding-card [data-telegram-binding-success].hidden {
  display: none;
}

.telegram-bot-identity {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface-soft, #f8fafc);
}

.telegram-bot-identity span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.telegram-binding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.telegram-binding-edit {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.telegram-binding-edit.hidden {
  display: none;
}

.modal-head,
.modal-actions {
  flex: 0 0 auto;
  padding: 18px 20px;
}

.modal-head {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.modal-body {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
}

.modal-actions {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px 0;
}

.auth-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 10px 4px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.auth-tab.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.auth-body {
  max-height: calc(100vh - 220px);
}

.auth-pane {
  display: none;
  gap: 14px;
}

.auth-pane.active {
  display: grid;
}

.auth-pane .button {
  width: 100%;
  margin-top: 4px;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-message.error {
  color: var(--warning);
}

#loginMessage.error {
  padding: 10px 12px;
  border-left: 3px solid var(--warning);
  border-radius: 4px;
  background: var(--warning-bg);
  line-height: 1.5;
}

#loginForm input[aria-invalid="true"] {
  border-color: var(--warning);
}

#loginRegisterSuggestion {
  justify-self: start;
  padding-top: 0;
  font-size: 14px;
}

.profile-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.profile-shell.hidden {
  display: none;
}

.registration-requests summary {
  cursor: pointer;
  font-weight: 700;
}

.registration-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  overflow-wrap: anywhere;
}

.profile-sidebar,
.profile-main,
.profile-card,
.booking-card,
.stats-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(25, 34, 48, 0.06);
}

.profile-sidebar {
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.profile-identity {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0 12px;
  text-align: center;
}

.profile-big-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.profile-identity p {
  max-width: 100%;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-nav {
  display: grid;
  gap: 8px;
}

.profile-nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.profile-nav-item:hover {
  background: var(--soft);
}

.profile-nav-item.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.profile-nav-item span {
  display: grid;
  width: 24px;
  place-items: center;
  color: var(--muted);
}

.profile-nav-item.active span {
  color: #fff;
}

.profile-main {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.profile-hero {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--soft);
  color: var(--text);
}

.profile-hero h1,
.profile-hero p {
  color: var(--text);
}

.profile-card,
.booking-card {
  min-width: 0;
  padding: 18px;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-fields.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-fields.four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.contact-section {
  display: grid;
  gap: 12px;
}

.contact-section-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.contact-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.contact-rows {
  display: grid;
  gap: 10px;
}

.contact-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.contact-check,
.contact-priority {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  background: #fff;
  white-space: nowrap;
}

.contact-check input,
.contact-priority input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stats-grid div {
  padding: 16px;
}

.stats-grid span,
.booking-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-grid strong {
  font-size: 26px;
}

.booking-list {
  display: grid;
  gap: 14px;
}

.booking-card {
  display: grid;
  gap: 14px;
  background: var(--soft);
}

.booking-route {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.booking-route strong {
  font-size: 18px;
}

.booking-route span {
  color: var(--muted);
  font-weight: 800;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.booking-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.row-actions {
  min-width: 230px;
}

.row-actions input {
  min-width: 130px;
}

.table-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.delete-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}

.delete-check input {
  width: 16px;
  min-height: 16px;
}

.profile-loading {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 900;
}

.profile-flash {
  margin: 0;
  border: 1px solid rgba(79, 125, 25, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  background: #eef7e7;
  color: var(--success);
  font-weight: 900;
}

.profile-flash.error {
  border-color: rgba(154, 37, 23, 0.24);
  background: var(--warning-bg);
  color: var(--warning);
}

.monitoring-health,
.monitoring-incidents {
  display: grid;
  gap: 16px;
}

.monitoring-section-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.monitoring-section-head h2,
.monitoring-section-head p {
  margin: 0;
}

.monitoring-section-head p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.monitoring-components {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monitoring-component {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
  padding: 14px 16px;
}

.monitoring-component div,
.monitoring-table td:nth-child(5) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.monitoring-component span:not(.monitoring-badge),
.monitoring-table small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.monitoring-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.monitoring-badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  white-space: nowrap;
}

.health-healthy,
.status-resolved {
  background: var(--brand-emerald-soft);
  border-color: var(--brand-emerald-line);
  color: var(--brand-emerald-strong);
}

.health-degraded,
.severity-warning,
.status-investigating {
  background: #fff6d9;
  border-color: #e5c45c;
  color: #735500;
}

.health-unavailable,
.severity-error,
.severity-critical {
  background: #fff0f0;
  border-color: #e3a29b;
  color: #972718;
}

.severity-critical {
  background: #8b1d12;
  border-color: #8b1d12;
  color: #fff;
}

.status-new {
  background: #eaf2ff;
  border-color: #a9c6ef;
  color: #245993;
}

.status-ignored {
  background: #f0f1f3;
  border-color: #c5cad2;
  color: #4e5969;
}

.priority-p0,
.priority-p1 {
  background: #8b1d12;
  border-color: #8b1d12;
  color: #fff;
}

.priority-p2 {
  background: #fff0f0;
  border-color: #e3a29b;
  color: #972718;
}

.priority-p3 {
  background: #f0f1f3;
  border-color: #c5cad2;
  color: #4e5969;
}

.monitoring-table-wrap {
  margin: 0;
  overflow-x: auto;
}

.monitoring-table {
  min-width: 940px;
  width: 100%;
}

.monitoring-table th,
.monitoring-table td {
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.monitoring-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.monitoring-empty {
  color: var(--muted);
  padding: 24px !important;
  text-align: center !important;
}

.incident-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.incident-summary-grid > div {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
}

.incident-summary-grid span,
.incident-source dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.incident-summary-grid strong {
  overflow-wrap: anywhere;
}

.incident-block {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.incident-block h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.incident-block p {
  margin: 0;
}

.incident-block pre {
  background: #111827;
  border-radius: 6px;
  color: #f3f4f6;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
  max-height: 340px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.incident-source {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.incident-source div {
  min-width: 0;
}

.incident-source dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.incident-examples {
  display: grid;
  gap: 8px;
}

.incident-examples details {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.incident-examples summary {
  cursor: pointer;
  font-weight: 800;
}

.incident-examples pre {
  margin-top: 10px;
}

.incident-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .monitoring-components,
  .monitoring-filters,
  .incident-summary-grid,
  .incident-source {
    grid-template-columns: 1fr;
  }

  .monitoring-section-head {
    align-items: stretch;
    flex-direction: column;
  }
}

.generator-catalog-shell {
  display: grid;
  align-content: start;
  gap: 22px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.generator-catalog-shell.hidden {
  display: none;
}

.generator-catalog-shell.catalog-emphasis {
  border-color: var(--accent);
  background: var(--blue-soft);
}

.generator-catalog-shell.generator-catalog-active {
  margin-bottom: 14px;
}

.generator-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  gap: 12px;
}

.generator-documents-section {
  display: grid;
  gap: 14px;
  scroll-margin-top: 18px;
}

.generator-documents-section.hidden {
  display: none;
}

.generator-documents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.generator-option {
  display: grid;
  min-height: 72px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.generator-option.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.generator-option.active:hover,
.generator-option.active:focus-visible {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.generator-option:hover,
.generator-option:focus-visible {
  border-color: var(--accent);
  background: var(--blue-soft);
  outline: none;
}

.generator-option:disabled {
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .82;
}

.generator-option:disabled:hover,
.generator-option:disabled:focus-visible {
  border-color: var(--line);
  background: var(--soft);
}

.generator-option > svg:first-child {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.generator-option.active > svg:first-child {
  color: #fff;
}

.generator-option span,
.feature-option span,
.user-card span {
  min-width: 0;
}

.generator-option strong,
.generator-option small,
.feature-option strong,
.feature-option small,
.user-card strong,
.user-card small,
.user-card em {
  display: block;
}

.generator-option strong {
  font-size: 18px;
}

.generator-option small,
.feature-option small,
.user-card small,
.user-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.4;
}

.generator-option.active small {
  color: #fff;
}

.registration-thanks {
  padding: 28px;
}

.registration-thanks .button {
  width: 100%;
  margin-top: 14px;
}

.logout-card {
  width: min(420px, 100%);
}

.generator-switch-card {
  width: min(500px, 100%);
}

.generator-switch-card .modal-body p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.logout-countdown {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--accent);
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
}

.subtabs,
.generation-quick-periods,
.page-actions,
.registration-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.subtabs {
  margin: 16px 0 4px;
  border-bottom: 1px solid var(--line);
}

.subtab {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 10px 4px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.subtab.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.registration-request + .registration-request {
  border-top: 1px solid var(--line);
}

.registration-request p,
.registration-request time,
.registration-request small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.field-with-action .text-action {
  white-space: nowrap;
}

.feature-fieldset {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.feature-fieldset.hidden {
  display: none;
}

#newUserCompanyFields .contact-check,
#existingUserCompanyAdminFields .contact-check {
  min-width: 0;
  height: auto;
  padding-block: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#newUserCompanyFields .contact-check input,
#existingUserCompanyAdminFields .contact-check input {
  flex: 0 0 18px;
}

.feature-fieldset legend {
  padding: 0 7px;
  font-weight: 900;
}

.feature-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-radius: 6px;
  padding: 8px;
  background: var(--soft);
}

.feature-option input,
.permission-tree input,
.confirmation-check input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.permission-tree {
  display: grid;
  gap: 8px;
}

.permission-node {
  border-radius: 6px;
  background: var(--soft);
}

.permission-node summary {
  list-style: none;
}

.permission-node summary::-webkit-details-marker {
  display: none;
}

.permission-node summary label,
.permission-leaf {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 8px;
  cursor: pointer;
}

.permission-node summary span {
  font-weight: 900;
}

.permission-generator {
  background: #fff;
  border: 1px solid var(--line);
}

.permission-children {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px 24px;
}

.permission-generator > .permission-children {
  padding-left: 32px;
}

.permission-group-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
}

.permission-group-copy {
  min-width: 0;
}

.permission-group-copy strong,
.permission-group-copy small {
  display: block;
}

.permission-group-copy small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.4;
}

.permission-group-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.permission-group-action {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.permission-group-action-revoke {
  border-color: #d8a09b;
  color: #a13229;
}

@media (max-width: 620px) {
  .permission-group-control,
  .permission-group-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .permission-group-actions,
  .permission-group-action {
    width: 100%;
  }
}

.permission-leaf {
  border-radius: 6px;
  background: var(--soft);
}

.permission-leaf strong,
.permission-leaf small {
  display: block;
}

.permission-leaf small {
  color: var(--muted);
  line-height: 1.4;
}

.company-create-row {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.company-create-row .auth-message {
  grid-column: 1 / -1;
  margin: 0;
}

.company-list {
  display: grid;
  gap: 10px;
}

.company-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.company-card > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  cursor: pointer;
}

.company-card > summary span,
.company-stats {
  color: var(--muted);
}

.company-edit-form {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.company-actions,
.company-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.user-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.user-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.user-card:hover,
.user-card:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.user-card .profile-big-avatar {
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.user-card.archived {
  grid-template-columns: minmax(0, 1fr);
  opacity: 0.72;
}

.archived-users {
  margin-top: 18px;
}

.archived-users summary,
.profile-history summary {
  cursor: pointer;
  font-weight: 900;
}

.profile-history {
  margin-top: 18px;
}

.profile-history > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.profile-history span,
.profile-history time {
  color: var(--muted);
  font-size: 13px;
}

.confirmation-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}

.button.danger {
  border-color: var(--warning);
  background: var(--warning);
  color: #fff;
}

.danger-zone {
  border-color: rgba(154, 37, 23, 0.28);
}

.generation-quick-periods {
  margin: 12px 0;
}

.generation-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.generation-filters + .stats-grid {
  margin-bottom: 18px;
}

.generation-list-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 12px;
}

.generation-list-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.generation-list-toolbar select {
  min-width: 92px;
}

.record-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.pagination-page,
.pagination-arrow {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.pagination-page[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.pagination-page:disabled,
.pagination-arrow:disabled {
  cursor: default;
  opacity: 0.45;
}

.pagination-arrow svg {
  width: 17px;
  height: 17px;
}

.pagination-ellipsis {
  min-width: 24px;
  text-align: center;
  color: var(--text-secondary);
}

.pagination-status {
  flex-basis: 100%;
  margin-top: 4px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 750;
}

.page-actions {
  justify-content: flex-start;
}

.profile-main input[readonly],
.profile-main input:disabled,
.profile-main fieldset:disabled {
  background: var(--soft);
  color: var(--muted);
}

input[aria-invalid="true"] {
  border-color: var(--warning);
  outline-color: rgba(154, 37, 23, 0.16);
}

.app-toast {
  position: fixed;
  z-index: 620;
  top: 22px;
  left: 50%;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(79, 125, 25, 0.24);
  border-radius: 8px;
  padding: 13px 15px;
  background: #eef7e7;
  color: var(--success);
  box-shadow: 0 20px 60px rgba(16, 24, 39, 0.18);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-toast.error {
  border-color: rgba(154, 37, 23, 0.24);
  background: var(--warning-bg);
  color: var(--warning);
}

.app-toast-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--success);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.app-toast.error .app-toast-icon {
  background: var(--warning);
}

.recovery-block {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  border: 1px solid rgba(154, 37, 23, .24);
  border-radius: 8px;
  padding: 16px;
  background: #fff7f5;
  color: var(--text);
  text-align: left;
}

.generator-catalog > .recovery-block,
.generator-catalog > div > .recovery-block {
  grid-column: 1 / -1;
}

.recovery-block-warning {
  border-color: #d7b660;
  background: #fff9e8;
}

.recovery-block-copy,
.recovery-block-message,
.recovery-reference {
  display: block;
}

.recovery-block-copy {
  min-width: 0;
}

.recovery-block-copy > strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 16px;
}

.recovery-block-message {
  color: var(--text-secondary);
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-line;
}

.recovery-reference {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recovery-actions .button {
  min-height: 40px;
}

.recovery-support-link {
  text-decoration: none;
}

.serious-error-card {
  width: min(520px, 100%);
}

body.serious-error-open {
  overflow: hidden;
}

.serious-error-body {
  display: grid;
  gap: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.serious-error-body p {
  margin: 0;
}

.serious-error-body a {
  color: var(--accent-dark);
  font-weight: 900;
}

.stay-suggestion-empty {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  color: var(--text-secondary);
}

.stay-suggestion-empty strong {
  color: var(--text);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 610;
}

.drawer.hidden {
  display: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -24px 0 64px rgba(15, 23, 42, 0.18);
}

.drawer-head,
.drawer-body,
.drawer-actions {
  padding: 18px;
}

.drawer-head,
.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.drawer-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.drawer-body {
  overflow-y: auto;
}

.drawer-body input[type="range"] {
  padding: 0;
}

.range-value {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.segment-line {
  display: grid;
  grid-template-columns: 38px 1.1fr 1fr 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}

.segment-line p {
  margin-bottom: 0;
}

.segment-dot {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.verify-shell {
  width: min(980px, calc(100% - 32px));
  margin: 32px auto;
}

.verify-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.simulation {
  margin-bottom: 20px;
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--warning-bg);
  color: var(--warning);
  font-weight: 800;
  text-align: center;
}

.verify-head h1 {
  margin-bottom: 0;
}

.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.details div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 5px 0 0;
  font-weight: 800;
}

@media (max-width: 980px) {
  .summary-top.user-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #profileDetailModal .modal-head {
    flex-direction: row;
    align-items: center;
  }

  #profileDetailModal .modal-head > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #profileDetailModal .modal-head .icon-button {
    flex: 0 0 36px;
  }
  .search-card,
  .route-fields,
  .flight-search-row,
  .complex-route-row,
  .complex-controls,
  .results-tools,
  .complex-fields,
  .flight-option,
  .flight-results-layout,
  .result-route-line,
  .route-mini,
  .passenger-fields,
  .profile-shell,
  .profile-fields,
  .profile-fields.three,
  .profile-fields.four-cols,
  .company-create-row,
  .generation-filters,
  .contact-row,
  .stats-grid,
  .booking-grid,
  .summary-top,
  .modal-summary,
  .segment-line {
    grid-template-columns: 1fr;
  }

  .search-button,
  .search-submit {
    width: 100%;
  }

  .booking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flight-search-row,
  .complex-route-row,
  .complex-controls {
    gap: 8px;
  }

  .flight-cell,
  .swap-route,
  .complex-remove {
    border-right: 0;
  }

  .flight-cell > input,
  .passenger-picker-button,
  .swap-route,
  .complex-remove,
  .complex-add {
    border-radius: 10px;
  }

  .date-picker-popover {
    width: min(320px, calc(100vw - 48px));
  }

  .date-picker-range {
    width: min(340px, calc(100vw - 48px));
  }

  .date-picker-panels {
    grid-template-columns: 1fr;
  }

  .swap-route {
    width: 100%;
  }

  .details-button {
    width: 100%;
  }

  .flight-filter-panel {
    position: static;
  }

  .flight-search-panel,
  .adjacent-dates-panel {
    position: static;
  }

  .flight-search-panel.is-stuck {
    gap: 12px;
    border-radius: 8px;
    padding: 18px;
    box-shadow: none;
  }

  .flight-search-panel.is-stuck .search-trip-toggle,
  .flight-search-panel.is-stuck > .complex-route-link,
  .flight-search-panel.is-stuck > #simpleRouteToggle {
    display: flex;
  }

  .flight-option {
    padding-right: 24px;
  }

  .favorite-button {
    position: static;
    justify-self: end;
  }

  .results-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .results-list-head label {
    min-width: 0;
  }

  .route-time.end {
    text-align: left;
  }

  .profile-history > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1180px);
    margin-top: 10px;
  }

  .intro,
  .intro-actions,
  .auth-actions,
  .section-head,
  .complex-head,
  .result-head,
  .selected-flight,
  .verify-head,
  .modal-head,
  .modal-actions,
  .step-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .intro-actions,
  .auth-actions,
  .profile-area,
  .profile-button {
    width: 100%;
  }

  .generation-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-actions .button,
  .intro-actions > .button,
  .profile-button {
    width: 100%;
  }

  .telegram-binding-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .telegram-binding-actions .button,
  .telegram-binding-actions .text-action {
    width: 100%;
  }

  .product-tabs {
    overflow-x: auto;
  }

  .product-tab {
    flex: 1 0 auto;
  }

  .steps {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .step-pill {
    flex: 0 0 auto;
  }

  .fields.two,
  .fields.four,
  .split,
  .details {
    grid-template-columns: 1fr;
  }

  .option-price strong {
    font-size: 27px;
  }

  .generator-catalog {
    grid-template-columns: 1fr;
  }

  .field-with-action {
    grid-template-columns: 1fr;
  }

  .field-with-action .text-action {
    justify-self: start;
  }

  .passenger-route-summary {
    grid-template-columns: 1fr;
  }

  .document-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Keep accommodation overrides after the shared responsive rules. */
#accommodationShell.accommodation-shell {
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
}

#accommodationShell .accommodation-steps,
#accommodationShell .accommodation-stage {
  min-width: 0;
  max-width: 100%;
}

#accommodationShell .accommodation-stage {
  overflow: visible;
  padding: 20px;
}

#accommodationShell .stay-search-panel {
  position: relative;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(230px, 1.45fr) minmax(155px, .8fr) minmax(140px, .65fr) minmax(140px, .65fr) minmax(160px, .75fr) 132px;
  align-items: stretch;
  overflow: visible;
}

#accommodationShell .stay-results-area {
  grid-template-columns: 250px minmax(0, 1fr);
}

#accommodationShell .stay-card {
  grid-template-columns: 220px minmax(0, 1fr);
}

#accommodationShell .stay-selected-summary dl {
  grid-template-columns: 1.2fr .55fr .65fr 1fr .9fr;
}

#accommodationShell .stay-filters input[type="checkbox"],
#accommodationShell .stay-filters input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
}

@media (max-width: 980px) {
  #accommodationShell .stay-search-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #accommodationShell .stay-location-field {
    grid-column: 1 / -1;
  }

  #accommodationShell .stay-property-type-field,
  #accommodationShell .stay-guests-field {
    grid-column: 1;
  }

  #accommodationShell .stay-search-button {
    grid-column: 2;
  }

  #accommodationShell .stay-results-area,
  #accommodationShell .stay-card,
  #accommodationShell .stay-selected-summary {
    grid-template-columns: 1fr;
  }

  #accommodationShell .stay-selected-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .recovery-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .recovery-actions .button {
    width: 100%;
  }

  #accommodationShell .accommodation-stage {
    padding: 14px;
  }

  #accommodationShell .stay-search-panel {
    grid-template-columns: 1fr;
  }

  #accommodationShell .stay-location-field,
  #accommodationShell .stay-property-type-field,
  #accommodationShell .stay-guests-field,
  #accommodationShell .stay-search-button {
    grid-column: 1;
  }

  #accommodationShell .stay-selected-summary dl {
    grid-template-columns: 1fr;
  }

  #accommodationShell .stay-resident-head {
    align-items: center;
    flex-direction: row;
  }
}

/* Final accommodation search overrides stay after shared responsive rules. */
@media (min-width: 981px) {
  /* Filters follow the page; only the hotel list owns nested scrolling. */
  #accommodationShell .stay-filters {
    position: static;
  }

  #accommodationShell .stay-results-column {
    position: sticky;
    top: var(--stay-results-top, 0px);
    /* Leave room for the enclosing panel's bottom spacing at the page end. */
    max-height: calc(100dvh - var(--stay-results-top, 0px) - 64px);
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  #accommodationShell .stay-results {
    min-height: 0;
    grid-auto-rows: max-content;
    align-content: start;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  #accommodationShell .stay-search-panel {
    position: sticky;
    top: 0;
    z-index: 120;
  }
}

@media (min-width: 981px) and (max-width: 1100px) {
  #accommodationShell .stay-search-panel,
  #accommodationShell .stay-search-panel.is-stuck {
    position: relative;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  #accommodationShell .stay-location-field {
    grid-column: span 2;
  }

  #accommodationShell .stay-search-button {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  #accommodationShell .stay-search-panel .stay-field > input,
  #accommodationShell .stay-search-panel .stay-property-type-field > button,
  #accommodationShell .stay-search-panel .stay-guests-field > select {
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  #accommodationShell .stay-property-type-picker {
    width: min(310px, 100%);
  }

  #accommodationShell .stay-calendar-popover {
    left: 0;
    width: min(680px, 100%);
  }
}

/* Cashflow generator */
.field-label-row,
.cashflow-heading-label {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-width: 0;
}

.cashflow-heading-label {
  flex-wrap: nowrap;
}

.field-label-row > span:first-child,
.cashflow-heading-label > span:first-child {
  min-width: 0;
}

.field-help-trigger {
  align-items: center;
  align-self: center;
  background: #fff;
  border: 1px solid #aeb9ca;
  border-radius: 50%;
  color: #52627a;
  cursor: help;
  display: inline-flex;
  flex: 0 0 21px;
  font: 800 13px/1 system-ui, sans-serif;
  height: 21px;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 21px;
}

.field-help-trigger:hover,
.field-help-trigger:focus-visible,
.field-help-trigger[aria-expanded="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  outline: none;
}

.field-help-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(18, 105, 242, 0.18);
}

.field-help-popover {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(19, 31, 51, 0.2);
  color: var(--text);
  max-height: min(360px, calc(100vh - 24px));
  max-width: calc(100vw - 24px);
  overflow-y: auto;
  padding: 16px 18px;
  position: fixed;
  width: 360px;
  z-index: 1000;
}

.field-help-popover h3 {
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 12px;
}

.field-help-popover h4 {
  font-size: 13px;
  line-height: 1.35;
  margin: 12px 0 4px;
}

.field-help-popover p {
  color: #46536a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
}

.field-help-popover p:last-child {
  margin-bottom: 0;
}

.cashflow-shell {
  display: grid;
  gap: 16px;
}

.cashflow-shell.hidden {
  display: none;
}

.cashflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cashflow-template-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
}

.cashflow-template-option {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: flex !important;
  flex-direction: row !important;
  gap: 12px;
  min-height: 92px;
  padding: 16px;
}

.cashflow-template-option:has(input:checked) {
  background: #eef5ff;
  border-color: #4b87ef;
  box-shadow: inset 0 0 0 1px #4b87ef;
}

.cashflow-template-option input {
  flex: 0 0 20px;
  height: 20px;
  margin: 1px 0 0;
  width: 20px;
}

.cashflow-template-option span {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.cashflow-template-option strong,
.cashflow-template-option small {
  display: block;
}

.cashflow-template-option small,
.cashflow-template-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cashflow-template-note {
  margin: 14px 0 0;
}

.cashflow-notice {
  align-items: center;
  background: #fff8db;
  border: 1px solid #e8cf68;
  border-radius: 6px;
  color: #2c2713;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
}

.cashflow-notice svg {
  color: #936f00;
  flex: 0 0 20px;
}

.cashflow-stage {
  overflow: visible;
}

.cashflow-section {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.cashflow-section:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.cashflow-section > h3,
.cashflow-section-head h3 {
  font-size: 20px;
  margin: 0 0 16px;
}

.cashflow-section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cashflow-section-head h3 {
  margin: 0;
}

.cashflow-section-head > label {
  max-width: 280px;
}

.cashflow-form .fields.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cashflow-form .fields {
  align-items: start;
  column-gap: 16px;
  row-gap: 16px;
}

.cashflow-form .fields > label {
  align-content: start;
  gap: 8px;
  grid-template-rows: minmax(38px, auto) 44px;
  min-width: 0;
}

.cashflow-form .fields > label > input:not([type="checkbox"]),
.cashflow-form .fields > label > select {
  height: 44px;
  min-height: 44px;
}

.cashflow-form .span-two {
  grid-column: span 2;
}

.cashflow-period-grid {
  grid-template-columns: 1fr 1.15fr 1fr 0.8fr !important;
}

.cashflow-period-summary,
.cashflow-conditional[data-manual-period] {
  margin-top: 16px;
}

.cashflow-form .fields > .switch-field {
  align-items: start;
  display: grid !important;
  grid-template-rows: minmax(38px, auto) 44px;
}

.cashflow-toggle-control {
  align-items: center;
  align-self: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 9px;
  min-height: 44px;
  padding: 0 11px;
}

.cashflow-toggle-control input {
  flex: 0 0 20px;
}

.cashflow-block-help,
.cashflow-category-caption {
  color: #3f4a5e;
  font-size: 13px;
  font-weight: 800;
}

.cashflow-block-help {
  margin-top: 22px;
}

.cashflow-block-help + .cashflow-overrides {
  margin-top: 10px;
}

.cashflow-expense-target {
  margin-bottom: 18px;
}

.cashflow-category-caption {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.cashflow-address-field {
  position: relative;
}

.cashflow-address-menu {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(19, 31, 51, 0.14);
  left: 0;
  max-height: 250px;
  overflow: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
}

.cashflow-address-menu button,
.cashflow-address-menu p {
  background: #fff;
  border: 0;
  color: var(--ink);
  display: block;
  font: inherit;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.cashflow-address-menu button:hover,
.cashflow-address-menu button:focus-visible {
  background: #eef5ff;
}

.cashflow-resolution {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}

.cashflow-resolution.resolved {
  color: var(--brand-emerald-strong);
}

.cashflow-overrides {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
  margin-top: 22px;
}

.cashflow-override {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.7fr);
  min-height: 58px;
  padding: 8px 0;
}

.switch-line,
.switch-field {
  align-items: center;
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
}

.switch-line.hidden,
.switch-field.hidden {
  display: none !important;
}

.switch-line input,
.switch-field input {
  height: 20px;
  margin: 0;
  min-height: 20px;
  padding: 0;
  width: 20px;
}

.cashflow-repeat-list {
  display: grid;
  gap: 10px;
}

.cashflow-repeat-card {
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  position: relative;
}

.cashflow-repeat-card > .icon-button {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.cashflow-repeat-card .fields {
  padding-right: 42px;
}

.cashflow-category-tree {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cashflow-category-group {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  min-width: 0;
  padding: 14px 18px 14px 0;
}

.cashflow-category-group:nth-child(even) {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  padding-right: 0;
}

.cashflow-category-parent,
.cashflow-category-row,
.cashflow-month-options label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.cashflow-category-parent input,
.cashflow-category-row input,
.cashflow-month-options input {
  height: 18px;
  margin: 0;
  width: 18px;
}

.cashflow-category-children {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-left: 28px;
}

.cashflow-category-row {
  justify-content: space-between;
}

.cashflow-category-row label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.cashflow-category-row select {
  height: 36px;
  max-width: 110px;
  padding: 0 28px 0 9px;
}

.cashflow-month-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
}

.cashflow-cash-options {
  max-width: 620px;
}

.cashflow-cash-options label {
  flex: 1;
}

.cashflow-errors {
  background: #fff0f0;
  border-left: 4px solid #d93025;
  color: #7f1d1d;
  margin: 18px 0;
  padding: 14px 18px;
}

.cashflow-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.cashflow-result-head {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.cashflow-result-head h2,
.cashflow-result-head p {
  margin-bottom: 4px;
  margin-top: 0;
}

.cashflow-result-actions {
  display: flex;
  gap: 10px;
}

.cashflow-result-meta {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0;
}

.cashflow-result-meta div {
  padding: 14px 0;
}

.cashflow-result-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.cashflow-result-meta dd {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 0;
}

.cashflow-pdf-viewer {
  border: 1px solid var(--line);
  height: min(78vh, 980px);
  min-height: 640px;
  width: 100%;
}

[data-preview-cashflow-document].active {
  border-color: var(--accent);
  color: var(--accent);
}

.button-spinner {
  animation: cashflow-spin 0.8s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  height: 16px;
  width: 16px;
}

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

@media (max-width: 900px) {
  .cashflow-form .fields.three,
  .cashflow-category-tree,
  .cashflow-result-meta,
  .cashflow-template-grid {
    grid-template-columns: 1fr;
  }

  .cashflow-period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .cashflow-form .span-two {
    grid-column: auto;
  }

  .cashflow-category-group:nth-child(even) {
    border-left: 0;
    padding-left: 0;
  }

  .cashflow-override {
    align-items: stretch;
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .cashflow-result-head,
  .cashflow-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .cashflow-result-actions {
    flex-wrap: wrap;
  }

  .cashflow-pdf-viewer {
    min-height: 520px;
  }
}

@media (min-width: 901px) and (max-width: 1240px) {
  .cashflow-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .cashflow-period-grid {
    grid-template-columns: 1fr !important;
  }

  .field-help-popover {
    width: calc(100vw - 24px);
  }

  .cashflow-category-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .cashflow-category-row select {
    max-width: none;
    width: 100%;
  }
}

:root {
  --form-surface: #ffffff;
  --form-subtle: #f7f9fc;
  --form-subtle-strong: #f0f4f9;
  --form-text: #10213f;
  --form-secondary: #61708a;
  --form-placeholder: #8491a6;
  --form-line: #d5deea;
  --form-line-strong: #aebbd0;
  --form-accent: #1677ff;
  --form-accent-dark: #0b5fcf;
  --form-accent-soft: #eaf3ff;
  --form-danger: #d6404f;
  --form-danger-soft: #fff4f5;
  --form-success: var(--brand-emerald-strong);
  --form-success-soft: var(--brand-emerald-soft);
  --form-card-shadow: 0 8px 24px rgba(34, 55, 86, 0.055);
  --form-control-height: 46px;
  --form-control-radius: 7px;
  --form-control-padding-inline: 12px;
  --form-label-min-height: 26px;
  --form-grid-gap-x: 18px;
  --form-grid-gap-y: 14px;
  --form-section-gap: 12px;
  --form-section-padding: 20px;
}

/* Japan visa preview: one scrollable form built on the shared panel language. */
.japan-visa-shell {
  display: grid;
  gap: 14px;
  scroll-margin-top: 18px;
}

.japan-visa-shell.hidden {
  display: none;
}

.japan-visa-shell .hidden {
  display: none;
}

.visa-intro,
.visa-section,
.visa-results {
  border-radius: 8px;
}

.visa-intro {
  padding: 20px 22px;
}

.visa-intro .section-head {
  align-items: flex-start;
}

.visa-intro-actions,
.visa-local-fixture {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visa-local-fixture {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.visa-local-fixture small {
  flex-basis: 100%;
  color: var(--form-secondary);
  font-size: 11px;
  text-align: right;
}

.visa-intro h2 {
  margin-bottom: 8px;
  color: var(--form-text);
  font-size: 22px;
  line-height: 1.2;
}

.visa-draft-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  margin-top: 10px;
  color: var(--form-secondary);
  font-size: 13px;
  font-weight: 700;
}

.visa-draft-status svg {
  width: 16px;
  height: 16px;
}

.visa-draft-status[data-state="saving"] {
  color: #245dba;
}

.visa-draft-status[data-state="saved"],
.visa-draft-status[data-state="complete"] {
  color: var(--brand-emerald-strong);
}

.visa-draft-status[data-state="error"],
.visa-draft-status[data-state="conflict"] {
  color: #b42318;
}

.visa-draft-status .text-action {
  min-height: 28px;
  padding: 0 4px;
  color: currentColor;
}

.japan-draft-card {
  width: min(560px, 100%);
}

.japan-draft-card .modal-body p {
  margin: 0;
  color: var(--form-secondary);
  line-height: 1.55;
}

.visa-step-current > .visa-draft-status {
  margin: 0;
  justify-self: center;
}

@media (max-width: 640px) {
  .visa-step-current > .visa-draft-status {
    grid-row: 1;
    grid-column: 1 / -1;
    justify-self: center;
  }

  .japan-draft-card .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .japan-draft-card .modal-actions .button {
    width: 100%;
  }
}

.visa-country-flag,
.generator-country-flag {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 32px;
  line-height: 1;
}

.generator-country-flag {
  width: 32px;
  height: 32px;
  font-size: 26px;
}

.visa-document-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.visa-document-choice > label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 82px;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 14px 15px;
  background: var(--form-surface);
  color: var(--form-text);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.visa-document-choice > label:hover {
  border-color: var(--form-line-strong);
}

.visa-document-choice > label:has(input:focus-visible) {
  border-color: var(--form-accent);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .14);
}

.visa-document-choice > label:has(input:checked) {
  border-color: rgba(22, 119, 255, .48);
  background: var(--form-accent-soft);
}

.visa-document-choice input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--form-accent);
}

.visa-document-choice .is-required {
  border-color: rgba(22, 119, 255, .48);
  background: var(--form-accent-soft);
  cursor: default;
}

.visa-document-choice .is-required input:disabled {
  opacity: 1;
  accent-color: var(--accent);
}

.visa-document-choice span {
  display: grid;
  gap: 5px;
}

.visa-document-choice strong {
  color: var(--form-text);
  font-size: 14px;
  line-height: 1.35;
}

.visa-document-choice small,
.visa-result-card span,
.visa-adult-note span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.visa-form {
  display: grid;
  gap: var(--form-section-gap);
}

.visa-purpose-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  border-left: 3px solid var(--form-accent);
  padding: 8px 12px;
  background: var(--form-accent-soft);
  color: var(--form-text);
}

.visa-purpose-summary span {
  color: var(--form-secondary);
  font-size: 12px;
  font-weight: 700;
}

.visa-purpose-summary strong {
  font-size: 13px;
}

.visa-form-progress {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 34%);
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.visa-form-progress > div:first-child {
  display: grid;
  gap: 2px;
}

.visa-form-progress strong {
  color: var(--form-text);
  font-size: 13px;
}

.visa-form-progress [data-form-progress-note] {
  color: var(--form-secondary);
  font-size: 11px;
}

.visa-form-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--form-subtle-strong);
}

.visa-form-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--form-accent);
  transition: width 180ms ease-out;
}

.visa-form-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.visa-form-group-head {
  display: grid;
  gap: 3px;
  padding: 12px 2px 2px;
}

.visa-form-group-head .eyebrow,
.visa-form-group-head h3,
.visa-form-group-head p {
  margin: 0;
}

.visa-form-group-head h3 {
  color: var(--form-text);
  font-size: 18px;
  line-height: 1.25;
}

.visa-form-group-head > p:last-child {
  color: var(--form-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.visa-form-group-sections {
  display: grid;
  gap: var(--form-section-gap);
  min-width: 0;
}

.visa-section {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--form-line);
  background: var(--form-surface);
  overflow: clip;
  scroll-margin-top: 92px;
}

.visa-section.has-errors {
  border-color: var(--form-danger);
}

.visa-section > summary {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 9px 16px;
  background: #fbfcfe;
  color: var(--form-text);
  cursor: pointer;
  list-style: none;
  transition: background .16s ease;
}

.visa-section > summary:hover {
  background: var(--form-subtle);
}

.visa-section > summary::-webkit-details-marker {
  display: none;
}

.visa-section[open] > summary {
  border-bottom: 1px solid var(--form-line);
  background: var(--form-surface);
}

.visa-section-number {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--form-subtle-strong);
  color: var(--form-secondary);
  font-size: 12px;
  font-weight: 900;
}

.visa-section[open] .visa-section-number {
  background: var(--form-accent);
  color: #fff;
}

.visa-section-chevron {
  width: 18px;
  height: 18px;
  color: var(--form-secondary);
  transition: transform 200ms ease-out;
}

.visa-section > summary[aria-expanded="true"] .visa-section-chevron {
  transform: rotate(180deg);
}

.visa-section-status {
  color: var(--form-secondary);
  font-size: 12px;
  font-weight: 800;
}

.visa-section-status[data-state="complete"] { color: var(--form-success); }
.visa-section-status[data-state="error"] { color: var(--form-danger); }

.visa-section-body {
  display: grid;
  gap: 16px;
  padding: var(--form-section-padding);
}

.visa-section.is-animating .visa-section-body {
  overflow: hidden;
  will-change: height, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .visa-section-chevron {
    transition: none;
  }
}

.visa-section .fields {
  align-items: start;
}

.visa-section label,
.visa-section .field-label-row {
  color: var(--form-text);
  font-size: 12px;
  font-weight: 700;
}

.visa-section label > input:not([type="checkbox"]):not([type="radio"]),
.visa-section label > select,
.visa-section label > textarea,
.visa-range-tool input,
.visa-schedule-row input,
.visa-schedule-row textarea {
  width: 100%;
  margin-top: 6px;
  color: var(--form-text);
  font-weight: 600;
}

.visa-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.visa-choice-row label {
  position: relative;
  cursor: pointer;
}

.visa-choice-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visa-choice-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 12px;
  background: #fff;
  color: var(--text);
}

.visa-choice-row input:checked + span {
  border-color: var(--accent);
  background: var(--blue-soft);
  color: var(--accent-dark);
}

.visa-date-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 4px;
}

.visa-date-control .icon-button {
  align-self: end;
  margin-top: 6px;
}

.visa-computed,
.visa-adult-note {
  display: grid;
  gap: 5px;
  min-height: 68px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--soft);
}

.visa-computed span {
  color: var(--text-secondary);
  font-size: 12px;
}

.visa-repeat-card,
.visa-schedule-row {
  display: grid;
  gap: 12px;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--form-subtle);
}

.visa-repeat-card:first-child,
.visa-schedule-row:first-child {
  border-top: 1px solid var(--form-line);
}

.repeat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visa-contact-fields {
  margin-top: 4px;
}

.visa-nested-group,
.visa-suggestion,
.visa-trip-block,
.visa-trip-purpose,
.visa-preview-values {
  display: grid;
  gap: 12px;
  border: 1px solid var(--form-line);
  border-left: 3px solid var(--form-line-strong);
  border-radius: 7px;
  padding: 14px;
  background: var(--form-subtle);
}

.visa-trip-purpose {
  border-left-color: var(--form-accent);
  background: var(--form-accent-soft);
}

.visa-trip-purpose > label {
  max-width: 460px;
}

.visa-suggestion {
  border-left-color: #b56a00;
  background: #fff7e8;
}

.visa-trip-block h4,
.visa-nested-group h4 {
  margin: 0;
  color: var(--form-text);
}

.visa-address {
  display: grid;
  gap: 10px;
}

.visa-country-multi {
  display: grid;
  gap: 8px;
}

.visa-country-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 10px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.visa-country-options label,
.visa-status-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 5px;
  color: var(--text);
  border-radius: 6px;
  font-weight: 600;
}

.visa-country-options label:hover,
.visa-country-options label:focus-within {
  background: var(--form-subtle-strong);
}

.visa-status-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.visa-status-options legend {
  padding-inline: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.visa-warning,
.visa-review-warnings,
.visa-photo-reminder {
  border-left: 3px solid #b56a00;
  padding: 10px 12px;
  background: #fff7e8;
  color: #6b3f00;
}

.visa-legal-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--form-line);
  border-radius: 8px;
}

.visa-legal-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--form-line);
  padding: 12px 14px;
  background: var(--form-surface);
}

.visa-legal-question:last-child {
  border-bottom: 0;
}

.visa-schedule-tools,
.visa-range-tool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visa-row-actions {
  display: flex;
  gap: 4px;
}

.visa-range-tool input:first-child { flex: 1 1 260px; }
.visa-range-tool input[type="number"] { flex: 0 1 100px; }

.visa-schedule-row .fields.five {
  grid-template-columns: 148px 148px repeat(3, minmax(180px, 1fr));
}

.visa-schedule-row .fields.four {
  grid-template-columns: minmax(310px, 1.15fr) repeat(3, minmax(180px, 1fr));
}

.visa-occupation-list {
  display: grid;
  gap: 12px;
}

.visa-occupation-card {
  display: grid;
  gap: 13px;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--form-subtle);
}

.visa-occupation-document-editor,
.visa-occupation-recommendations {
  display: grid;
  gap: 9px;
  border: 1px solid var(--form-line);
  border-radius: 7px;
  padding: 12px;
  background: var(--form-surface);
}

.visa-occupation-document-editor h5,
.visa-occupation-recommendations p,
.visa-occupation-recommendations details {
  margin: 0;
}

.visa-occupation-recommendations {
  color: var(--form-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.visa-occupation-recommendations summary {
  width: fit-content;
  color: var(--form-accent-dark);
  cursor: pointer;
  font-weight: 800;
}

.visa-recommendation-source {
  margin-top: 7px !important;
}

.visa-purpose-fields,
.visa-document-guidance,
.visa-informational-options,
.visa-party {
  margin-top: 14px;
}

.visa-document-guidance,
.visa-informational-options {
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--form-subtle);
}

.visa-document-guidance h3,
.visa-document-guidance h4,
.visa-informational-options p,
.visa-informational-options article,
.visa-party h4 {
  margin: 0;
}

.visa-guidance-grid,
.visa-informational-options > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.visa-guidance-grid section,
.visa-informational-options article {
  display: grid;
  align-content: start;
  gap: 8px;
  border-left: 2px solid var(--form-accent);
  padding-left: 10px;
}

.visa-guidance-grid details,
.visa-guidance-grid p,
.visa-informational-options summary,
.visa-informational-options a {
  color: var(--form-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.visa-guidance-grid summary,
.visa-informational-options summary {
  cursor: pointer;
  color: var(--form-text);
  font-weight: 750;
}

.visa-party {
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--form-surface);
}

.visa-employment-preview {
  display: grid;
  gap: 12px;
}

.visa-employment-preview section {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--form-line);
}

.visa-employment-preview section:last-child { border-bottom: 0; padding-bottom: 0; }
.visa-employment-preview p { margin: 0; color: var(--form-text); font-size: 13px; line-height: 1.4; }
.visa-employment-preview p span { color: var(--form-secondary); font-weight: 700; }
.visa-review-flag { color: #8a4b00; font-size: 11px; font-style: normal; font-weight: 800; }

.visa-auto-reset {
  width: fit-content;
  margin-top: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--form-accent-dark);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.visa-generation-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 16px;
  background: var(--form-surface);
  box-shadow: var(--form-card-shadow);
}

.visa-generation-footer p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.visa-generation-footer .button {
  min-width: 240px;
  min-height: 46px;
}

.visa-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.visa-review-grid > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  background: #fff;
}

.visa-review-grid dt {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
}

.visa-review-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.visa-form-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.visa-overview-block {
  min-width: 0;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--form-subtle);
}

.visa-overview-block h4,
.visa-overview-block p {
  margin: 0;
}

.visa-overview-block h4 {
  margin-bottom: 8px;
  color: var(--form-text);
  font-size: 13px;
}

.visa-overview-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--form-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.visa-overview-issues {
  display: grid;
  gap: 6px;
  margin-top: 8px !important;
  padding: 0 !important;
  list-style: none;
}

.visa-overview-issues button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--form-line);
  border-radius: 7px;
  padding: 7px 9px;
  background: var(--form-surface);
  color: var(--form-accent-dark);
  text-align: left;
  cursor: pointer;
}

.visa-overview-issues small {
  flex: 0 0 auto;
  color: var(--form-secondary);
  font-weight: 700;
}

.visa-overview-ready {
  color: var(--form-success);
  font-size: 12px;
  font-weight: 750;
}

.visa-form-errors {
  max-height: min(360px, 50vh);
  overflow: auto;
  border: 1px solid rgba(214, 64, 79, .38);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--form-danger-soft);
  color: var(--form-danger);
}

.visa-form-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.visa-form-errors p {
  margin: 4px 0 0;
  color: var(--form-danger);
  font-size: 12px;
}

.visa-form-errors button {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--form-danger);
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.visa-form-errors:focus-visible {
  outline: 3px solid rgba(214, 64, 79, .18);
  outline-offset: 2px;
}

.visa-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.visa-result-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.visa-result-card > div:first-child {
  display: grid;
  gap: 4px;
}

.visa-result-card iframe {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.visa-result-card-single {
  max-width: 940px;
}

.visa-photo-reminder {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
}

.visa-birth-place-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1080px) {
  .visa-schedule-row .fields.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visa-schedule-row .fields.five label:nth-child(n + 3) { grid-column: 1 / -1; }
  .visa-schedule-row .fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visa-schedule-row .fields.four .form-date-range-field { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .visa-document-choice { grid-template-columns: 1fr; }
  .visa-country-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visa-schedule-row .fields.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visa-schedule-row .fields.five label:nth-child(n + 3) { grid-column: 1 / -1; }
  .visa-schedule-row .fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visa-schedule-row .fields.four .form-date-range-field { grid-column: 1 / -1; }
  .visa-guidance-grid,
  .visa-informational-options > div { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .visa-intro { padding: 18px 16px; }
  .visa-intro .section-head,
  .visa-intro-actions { align-items: flex-start; }
  .visa-intro-actions { flex-direction: column-reverse; }
  .visa-local-fixture { justify-content: flex-start; }
  .visa-local-fixture small { text-align: left; }
  .visa-purpose-summary { align-items: flex-start; flex-direction: column; gap: 2px; }
  .visa-form-progress { position: static; grid-template-columns: 1fr; gap: 10px; }
  .visa-form-group-head { padding-inline: 0; }
  .visa-section > summary { grid-template-columns: 28px minmax(0, 1fr) 18px; }
  .visa-section-status { grid-column: 2; }
  .visa-section-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .visa-section-body { padding: 14px; }
  .visa-review-grid,
  .visa-form-overview { grid-template-columns: 1fr; }
  .visa-legal-question { grid-template-columns: 1fr; }
  .visa-result-grid { grid-template-columns: minmax(0, 1fr); }
  .visa-result-card iframe { height: 430px; }
  .visa-country-options,
  .visa-status-options { grid-template-columns: 1fr; }
  .visa-birth-place-fields { grid-template-columns: 1fr; }
  .visa-schedule-row .fields.five { grid-template-columns: 1fr; }
  .visa-schedule-row .fields.five label { grid-column: auto; }
  .visa-schedule-row .fields.four { grid-template-columns: 1fr; }
  .visa-schedule-row .fields.four .form-date-range-field { grid-column: auto; }
  .visa-date-range-control { grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 42px; }
  .visa-generation-footer,
  .visa-generation-footer .button { width: 100%; }
  .visa-generation-footer { align-items: stretch; flex-direction: column; }
}

/* Shared form primitives. New forms should use these classes instead of local control sizing. */
.form-container {
  display: grid;
  gap: var(--form-section-gap);
  min-width: 0;
}

.form-section-card {
  border: 1px solid var(--form-line);
  border-radius: 8px;
  background: var(--form-surface);
  box-shadow: var(--form-card-shadow);
}

.form-section-body {
  padding: var(--form-section-padding);
}

.form-grid {
  display: grid;
  min-width: 0;
  align-items: start;
  column-gap: var(--form-grid-gap-x);
  row-gap: var(--form-grid-gap-y);
}

.form-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.form-field {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
  color: var(--form-text);
  font-size: 13px;
  font-weight: 700;
}

.form-field.hidden,
.form-grid.hidden {
  display: none;
}

.form-field-label {
  display: flex;
  min-width: 0;
  min-height: var(--form-label-min-height);
  align-items: center;
  gap: 6px;
  color: var(--form-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.form-field-label > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.form-field-label .field-help-trigger {
  flex: 0 0 21px;
}

.form-control,
.form-multiselect-trigger,
.form-readonly-control,
.form-segmented,
.visa-date-control {
  width: 100%;
  min-width: 0;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  border: 1px solid var(--form-line);
  border-radius: var(--form-control-radius);
  background: var(--form-surface);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.form-field > .form-control {
  margin: 0;
  padding: 0 var(--form-control-padding-inline);
  color: var(--form-text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
}

.form-field > .form-control::placeholder,
.form-field .visa-date-control input::placeholder,
.visa-country-multi > .form-control::placeholder {
  color: var(--form-placeholder);
  font-weight: 500;
}

.japan-visa-shell .visa-section .form-field > .form-control {
  margin-top: 0;
}

.form-field > textarea.form-control {
  height: auto;
  min-height: 96px;
  padding-block: 10px;
  resize: vertical;
}

.form-field > .form-control:hover,
.form-multiselect-trigger:hover,
.visa-date-control:hover {
  border-color: var(--form-line-strong);
}

.form-field > .form-control:focus,
.form-multiselect-trigger:focus-visible,
.form-segmented:focus-within,
.visa-date-control:focus-within {
  border-color: var(--form-accent);
  outline: 3px solid rgba(22, 119, 255, 0.14);
  outline-offset: 0;
}

.form-field.has-value > .form-control,
.form-field.has-value > .visa-date-control,
.form-multiselect.has-value .form-multiselect-trigger {
  border-color: #bbc8d9;
}

.form-field.is-focused .form-field-label,
.form-multiselect.is-open .form-field-label {
  color: var(--form-accent-dark);
}

.form-field > .form-control[aria-invalid="true"],
.form-field.is-error > .form-control,
.form-field.is-error .visa-date-control {
  border-color: var(--form-danger);
  background: var(--form-danger-soft);
}

.form-field.is-success > .form-control,
.form-field.is-success .visa-date-control {
  border-color: var(--form-success);
  background: var(--form-success-soft);
}

.form-field > .form-control:disabled,
.form-multiselect-trigger:disabled {
  border-color: var(--form-line);
  background: var(--form-subtle-strong);
  color: var(--form-secondary);
  cursor: not-allowed;
  opacity: 1;
}

.form-field-message,
.form-field-help,
.form-field-error,
.form-field-success {
  margin: 0;
  color: var(--form-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.form-field-error {
  color: var(--form-danger);
}

.form-field-success {
  color: var(--form-success);
}

.pdf-capacity-warning {
  color: #8a4b00;
}

.form-choice-field .form-segmented {
  margin: 0;
}

.form-segmented,
.visa-choice-row.form-segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 3px;
  margin: 0;
  padding: 3px;
  background: var(--form-subtle-strong);
}

.form-segmented-option,
.visa-choice-row .form-segmented-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.form-segmented-option input,
.visa-choice-row .form-segmented-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-segmented-option span,
.visa-choice-row .form-segmented-option span {
  display: flex;
  width: 100%;
  min-width: 0;
  height: calc(var(--form-control-height) - 8px);
  min-height: calc(var(--form-control-height) - 8px);
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: calc(var(--form-control-radius) - 2px);
  padding: 0 10px;
  background: transparent;
  color: var(--form-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.form-segmented-option input:checked + span,
.visa-choice-row .form-segmented-option input:checked + span {
  border-color: var(--accent);
  background: var(--form-accent-soft);
  color: var(--form-accent-dark);
  box-shadow: 0 1px 3px rgba(16, 33, 63, 0.06);
}

.form-segmented-option input:checked + span::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--form-accent);
  content: "";
}

.form-segmented-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.form-readonly-control {
  display: flex;
  align-items: center;
  padding: 0 var(--form-control-padding-inline);
  background: var(--form-subtle-strong);
  color: var(--form-text);
  font-size: 14px;
  font-weight: 600;
}

.form-readonly-control strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-field .visa-date-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
  gap: 0;
  overflow: visible;
}

.visa-date-range-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 44px;
  align-items: stretch;
  height: var(--form-control-height);
  overflow: visible;
  border: 1px solid var(--form-line);
  border-radius: var(--form-control-radius);
  background: var(--form-surface);
}

.visa-date-range-control > input {
  min-width: 0;
  height: calc(var(--form-control-height) - 2px);
  border: 0;
  padding: 0 var(--form-control-padding-inline);
  background: transparent;
  color: var(--form-text);
  font-size: 14px;
  font-weight: 600;
  outline: 0;
}

.form-date-range-separator {
  display: grid;
  place-items: center;
  color: var(--form-secondary);
}

.visa-date-range-control .icon-button {
  width: 44px;
  height: calc(var(--form-control-height) - 2px);
  border: 0;
  border-left: 1px solid var(--form-line);
  border-radius: 0;
  background: var(--form-subtle);
  color: var(--form-secondary);
}

.form-date-range-popover {
  min-width: min(100%, 360px);
}

.form-calendar-days button[data-in-range="true"] {
  border-radius: 0;
  background: var(--form-accent-soft);
  color: var(--form-accent-dark);
}

.form-field .visa-date-control > input:not(.visa-native-date) {
  width: 100%;
  height: calc(var(--form-control-height) - 2px);
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 var(--form-control-padding-inline);
  color: var(--form-text);
  font-size: 14px;
  font-weight: 600;
  outline: 0;
}

.form-field .visa-date-control .icon-button {
  width: 44px;
  height: calc(var(--form-control-height) - 2px);
  min-height: 0;
  align-self: stretch;
  margin: 0;
  border: 0;
  border-left: 1px solid var(--form-line);
  border-radius: 0;
  background: var(--form-subtle);
  color: var(--form-secondary);
}

.form-date-popover,
.form-search-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 80;
  border: 1px solid var(--form-line);
  border-radius: var(--form-control-radius);
  padding: 8px;
  background: var(--form-surface);
  box-shadow: 0 18px 42px rgba(19, 31, 51, 0.18);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.form-date-popover[hidden],
.form-search-menu[hidden] {
  display: none;
}

.form-calendar-head,
.form-calendar-weekdays,
.form-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 3px;
}

.form-calendar-head {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  margin-bottom: 7px;
}

.form-calendar-head strong {
  text-align: center;
  text-transform: capitalize;
}

.form-calendar-head button,
.form-calendar-days button {
  display: grid;
  min-width: 0;
  min-height: 32px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--form-text);
  font: inherit;
  cursor: pointer;
}

.form-calendar-head button {
  min-height: 44px;
  font-size: 22px;
  font-weight: 700;
}

.form-calendar-head button:hover,
.form-calendar-head button:focus-visible {
  background: var(--form-accent-soft);
  outline: 0;
}

.form-calendar-days button:hover,
.form-calendar-days button:focus-visible {
  background: var(--form-accent-soft);
  outline: 0;
}

.form-calendar-days button[aria-current="date"] {
  background: var(--form-accent);
  color: #fff;
}

.form-calendar-days button:disabled {
  color: var(--form-placeholder);
  cursor: not-allowed;
}

.form-calendar-weekdays {
  margin-bottom: 4px;
  color: var(--form-secondary);
  font-size: 11px;
  text-align: center;
}

.form-searchable,
.form-searchable-multi {
  position: relative;
  z-index: 4;
}

.form-searchable:focus-within,
.form-searchable-multi:focus-within {
  z-index: 50;
}

.form-search-menu {
  /* Anchor to the control's grid row, not messages below it or a stretched field. */
  grid-area: 2 / 1 / 3 / 2;
  top: 100%;
  display: flex;
  max-height: min(320px, calc(100vh - 96px));
  flex-direction: column;
  overflow-y: auto;
}

.form-search-menu [data-search-option],
.form-search-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  color: var(--form-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.form-search-menu [hidden] {
  display: none;
}

.form-search-menu [data-search-option]:hover,
.form-search-menu [data-search-option]:focus-visible,
.form-search-manual:hover,
.form-search-manual:focus-visible {
  background: var(--form-accent-soft);
  outline: 0;
}

.form-search-menu [data-search-option] span,
.form-searchable-multi-menu small {
  color: var(--form-secondary);
  font-size: 12px;
  font-weight: 600;
}

.form-search-empty {
  margin: 0;
  padding: 10px;
  color: var(--form-secondary);
  font-size: 12px;
}

.form-search-canonical {
  color: var(--form-success);
}

.form-searchable-multi-control {
  display: flex;
  min-height: var(--form-control-height);
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--form-line);
  border-radius: var(--form-control-radius);
  padding: 5px 9px;
  background: var(--form-surface);
}

.form-searchable-tags {
  display: contents;
}

.form-searchable-tags .form-tag {
  max-width: 100%;
  border: 0;
  gap: 5px;
  cursor: pointer;
}

.form-searchable-multi-control input {
  min-width: 150px;
  flex: 1 1 180px;
  border: 0;
  padding: 4px;
  color: var(--form-text);
  font: inherit;
  outline: 0;
}

.form-searchable-multi-menu .form-multiselect-option {
  order: 0;
}

.form-searchable-multi-menu [data-search-multi-option][hidden] {
  display: none;
}

.visa-expiry-options {
  display: grid;
  gap: 6px;
}

.visa-expiry-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--form-line);
  border-radius: var(--form-control-radius);
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
}

.visa-expiry-options input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--form-accent);
}

[data-passport-expiry-manual] > .form-field > .form-field-label {
  display: none;
}

.form-multiselect {
  position: relative;
  z-index: 4;
}

.form-multiselect.is-open {
  z-index: 40;
}

.form-multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 var(--form-control-padding-inline);
  color: var(--form-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.form-multiselect-value {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-tag {
  display: inline-flex;
  min-width: 0;
  max-width: calc(50% - 3px);
  align-items: center;
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--form-accent-soft);
  color: var(--form-accent-dark);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-tag:only-child {
  max-width: 100%;
}

.form-multiselect-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  transition: transform 0.16s ease;
}

.form-multiselect.is-open .form-multiselect-trigger svg {
  transform: rotate(180deg);
}

.form-multiselect-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 60;
  max-height: min(320px, calc(100vh - 96px));
  overflow-y: auto;
  border: 1px solid var(--form-line);
  border-radius: var(--form-control-radius);
  padding: 6px;
  background: var(--form-surface);
  box-shadow: 0 18px 42px rgba(19, 31, 51, 0.18);
}

.form-multiselect-menu[hidden] {
  display: none;
}

.form-multiselect-option {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
  border-radius: 6px;
  padding: 9px 8px;
  color: var(--form-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.form-multiselect-option:hover,
.form-multiselect-option:focus-within {
  background: var(--soft);
}

.form-multiselect-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: var(--accent);
}

.visa-country-options input[type="checkbox"],
.visa-document-choice input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.form-multiselect-option.is-disabled {
  color: var(--form-secondary);
  cursor: not-allowed;
}

.form-multiselect-limit {
  position: sticky;
  bottom: -6px;
  margin: 4px -6px -6px;
  border-top: 1px solid var(--form-line);
  padding: 9px 12px;
  background: var(--form-surface);
  color: var(--form-secondary);
  font-size: 12px;
  font-weight: 700;
}

.form-question-row,
.visa-legal-question.form-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(164px, 190px);
  min-width: 0;
  align-items: center;
  gap: 14px 20px;
  border-bottom: 1px solid var(--form-line);
  padding: 12px 14px;
}

.form-question-text {
  min-width: 0;
  color: var(--form-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.form-question-control .form-segmented {
  width: 100%;
}

.form-question-detail {
  grid-column: 1 / -1;
  min-width: 0;
}

.form-question-detail > .form-field,
.form-question-detail > .form-grid {
  width: 100%;
}

.japan-visa-shell .visa-section {
  overflow: visible;
}

/* Japan visa sequential step flow. The prelude is intentionally outside numbering. */
.visa-preparation {
  margin-top: 14px;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--form-surface);
}

.visa-preparation h3,
.visa-preparation ul,
.visa-prelude-actions p {
  margin: 0;
}

.visa-preparation h3 {
  color: var(--form-text);
  font-size: 14px;
}

.visa-preparation ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 24px;
  margin-top: 10px;
  padding-left: 20px;
  color: var(--form-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.visa-prelude-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
}

.visa-prelude-actions-centered {
  justify-content: center;
}

.visa-russia-scope {
  margin: 0;
  border-left: 3px solid var(--form-accent);
  padding: 10px 12px;
  background: var(--form-subtle);
}

.visa-add-menu {
  position: relative;
  width: fit-content;
}

.visa-add-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
}

.visa-add-menu > summary::-webkit-details-marker {
  display: none;
}

.visa-add-menu > div {
  position: absolute;
  z-index: 9;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  min-width: 250px;
  border: 1px solid var(--form-line);
  border-radius: 7px;
  padding: 7px;
  background: var(--form-surface);
  box-shadow: var(--shadow-md);
}

.visa-add-menu .text-action {
  justify-content: flex-start;
  padding: 9px 10px;
  text-align: left;
}

.visa-status-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--form-line);
  border-radius: 7px;
  padding: 12px 14px;
  background: var(--form-subtle);
}

.visa-funding-editor {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.visa-funding-editor .form-segmented {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: minmax(0, 1fr);
  height: auto;
}

.visa-funding-editor .form-segmented-option span {
  height: auto;
  padding-block: 10px;
  justify-content: flex-start;
  white-space: normal;
  text-align: left;
}

.visa-funding-editor .fields > * {
  min-width: 0;
}

.visa-status-card p,
.visa-funding-guidance p {
  margin: 4px 0 0;
  color: var(--form-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.visa-funding-guidance {
  margin-top: 10px;
  border-left: 3px solid var(--form-accent);
  padding: 9px 12px;
  background: var(--form-subtle);
}

.visa-funding-guidance h5 {
  margin: 0 0 5px;
  color: var(--form-text);
  font-size: 12px;
}

.visa-funding-guidance h5:not(:first-child) {
  margin-top: 12px;
}

.visa-sponsor-letter {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--form-line);
  padding-top: 14px;
}

.visa-sponsor-letter.hidden {
  display: none;
}

.visa-sponsor-letter-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.visa-sponsor-letter-choice input,
.visa-sponsor-expenses input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 0;
  accent-color: var(--form-accent);
}

.visa-sponsor-letter-choice span {
  display: grid;
  gap: 3px;
}

.visa-sponsor-letter-choice small {
  color: var(--form-secondary);
  line-height: 1.45;
}

.visa-sponsor-reuse {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.visa-sponsor-expenses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
  margin: 14px 0;
  border: 0;
  padding: 0;
}

.visa-sponsor-expenses legend {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: var(--form-text);
  font-weight: 700;
}

.visa-sponsor-expenses label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--form-text);
}

.visa-prelude-actions p {
  max-width: 420px;
  color: var(--form-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.visa-step-shell {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: grid;
  gap: 9px;
  padding: 11px 16px 13px;
}

.visa-step-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.visa-step-current strong {
  color: var(--form-text);
  font-size: 14px;
}

.visa-step-current span {
  justify-self: end;
  color: var(--form-secondary);
  font-size: 11px;
  font-weight: 750;
}

.visa-step-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--visa-step-count), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.visa-step-track::before {
  position: absolute;
  top: 17px;
  right: calc(50% / var(--visa-step-count));
  left: calc(50% / var(--visa-step-count));
  height: 2px;
  background: var(--form-line-strong);
  content: "";
}

.visa-step-track li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.visa-step-track button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--form-line-strong);
  border-radius: 50%;
  padding: 0;
  background: var(--form-subtle-strong);
  color: var(--form-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.visa-step-track button:not(:disabled) {
  cursor: pointer;
}

.visa-step-track button[data-state="complete"] {
  border-color: var(--brand-emerald-hover);
  background: var(--brand-emerald-soft-hover);
  color: var(--brand-emerald-strong);
}

.visa-step-track button[data-state="pending"] {
  border-color: #d49a22;
  background: #fff2cf;
  color: #76510b;
}

.visa-step-track button[aria-current="step"] {
  border-color: var(--form-accent);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .2);
}

.visa-step-track button:focus-visible {
  outline: 3px solid rgba(22, 119, 255, .28);
  outline-offset: 2px;
}

.visa-step-track li > strong {
  max-width: 132px;
  color: var(--form-secondary);
  font-size: 10px;
  line-height: 1.25;
}

.visa-step-mobile {
  display: none;
}

.visa-form-group-head {
  scroll-margin-top: 148px;
}

.visa-subsection-head {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--form-line);
  padding: 10px 16px;
  background: #fbfcfe;
  color: var(--form-text);
}

.visa-subsection-head strong {
  font-size: 14px;
}

.visa-section-status {
  display: none;
}

.visa-section.needs-completion,
.needs-completion {
  border-color: #d7a23b !important;
  background: #fffaf0;
}

.japan-visa-v2 .needs-completion input:not([type="checkbox"]):not([type="radio"]),
.japan-visa-v2 .needs-completion select,
.japan-visa-v2 .needs-completion textarea,
.japan-visa-v2 .needs-completion .form-segmented {
  border-color: #d7a23b;
  background: #fffdf6;
}

.form-field-warning {
  display: block;
  margin-top: 6px;
  color: #76510b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.visa-step-actions {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--form-line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--form-surface);
}

.visa-step-forward-actions {
  display: flex;
  min-width: 0;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.visa-step-actions .button {
  min-height: 44px;
  white-space: normal;
}

.visa-step-actions > p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--form-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.visa-step-actions [data-step-next] {
  min-width: 180px;
}

.visa-review-prelude-link {
  display: flex;
  justify-content: flex-end;
}

.visa-overview-documents,
.visa-overview-readiness {
  min-height: 100%;
}

.visa-review-steps {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
}

.visa-review-step {
  border: 1px solid var(--form-line);
  border-left: 4px solid var(--form-line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--form-surface);
}

.visa-review-step[data-state="complete"] {
  border-left-color: var(--brand-emerald-hover);
}

.visa-review-step[data-state="pending"] {
  border-left-color: #d49a22;
}

.visa-review-step > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visa-review-step h4,
.visa-review-step p {
  margin: 0;
}

.visa-review-step p {
  margin-top: 2px;
  color: var(--form-secondary);
  font-size: 11px;
}

.visa-review-step > header button,
.visa-review-issues button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--form-accent-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.visa-review-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.visa-review-values li {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.visa-review-values span {
  color: var(--form-secondary);
  font-size: 10px;
  font-weight: 750;
}

.visa-review-values strong {
  overflow-wrap: anywhere;
  color: var(--form-text);
  font-size: 12px;
}

.visa-review-issues {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.visa-review-issues button {
  width: 100%;
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff5dc;
  color: #76510b;
  text-align: left;
}

@media (max-width: 700px) {
  .visa-preparation ul,
  .visa-review-values {
    grid-template-columns: 1fr;
  }

  .visa-prelude-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .visa-prelude-actions .button {
    width: 100%;
  }

  .visa-step-actions {
    align-items: stretch;
  }

  .visa-step-actions > [data-step-back],
  .visa-step-forward-actions {
    flex: 1 1 0;
    min-width: 0;
  }

  .visa-step-forward-actions {
    flex-direction: column;
  }

  .visa-step-actions .button {
    width: 100%;
    min-width: 0;
  }

  .visa-step-shell {
    position: static;
    gap: 7px;
    padding: 10px 12px 11px;
  }

  .visa-step-current {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3px 10px;
  }

  .visa-step-current > .visa-draft-status {
    grid-row: 1;
    grid-column: 1 / -1;
    justify-self: center;
  }

  .visa-step-current > strong {
    grid-row: 2;
    grid-column: 1;
  }

  .visa-step-current > [data-step-current-status] {
    grid-row: 2;
    grid-column: 2;
  }

  .visa-step-track li > strong {
    display: none;
  }

  .visa-step-track::before {
    top: 16px;
  }

  .visa-step-track button {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 360px) {
  .visa-step-track {
    display: none;
  }

  .visa-step-mobile {
    display: grid;
    gap: 8px;
  }

  .visa-step-mobile > button {
    width: 100%;
  }

  .visa-step-mobile-menu {
    display: grid;
    gap: 6px;
    border-top: 1px solid var(--form-line);
    padding-top: 8px;
  }

  .visa-step-mobile-menu button {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--form-line);
    border-radius: 7px;
    padding: 8px 10px;
    background: var(--form-surface);
    color: var(--form-text);
    text-align: left;
  }

  .visa-step-mobile-menu button[aria-current="step"] {
    border-color: var(--form-accent);
    background: var(--form-accent-soft);
  }

  .visa-step-mobile-menu small {
    color: var(--form-secondary);
    font-size: 9px;
    text-align: right;
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.form-actions .button {
  min-height: 44px;
  gap: 7px;
  border-radius: var(--form-control-radius);
  padding-inline: 18px;
}

.form-action-primary {
  min-width: 210px;
  border-color: var(--form-accent);
  background: var(--form-accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(22, 119, 255, .18);
}

.form-action-primary:hover {
  border-color: var(--form-accent-dark);
  background: var(--form-accent-dark);
}

.form-action-secondary {
  border-color: var(--form-line);
  background: var(--form-surface);
  color: var(--form-accent-dark);
}

.form-action-secondary:hover {
  border-color: var(--form-line-strong);
  background: var(--form-subtle);
}

.form-container .button:focus-visible,
.form-section-card .button:focus-visible {
  outline: 3px solid rgba(22, 119, 255, .18);
  outline-offset: 2px;
}

.form-container [data-remove-repeat] {
  border-color: transparent;
  color: var(--form-danger);
}

.form-container [data-remove-repeat]:hover {
  border-color: rgba(214, 64, 79, .3);
  background: var(--form-danger-soft);
}

@media (max-width: 900px) {
  .form-grid-four,
  .form-grid-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .form-grid-two,
  .form-grid-three,
  .form-grid-four,
  .form-grid-five {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-question-row,
  .visa-legal-question.form-question-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .form-question-control,
  .form-question-detail {
    grid-column: 1;
  }

  [data-funding-payer] .form-segmented {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 0;
  }

  .visa-sponsor-expenses {
    grid-template-columns: minmax(0, 1fr);
  }

  .visa-sponsor-reuse .button {
    width: 100%;
  }

  .form-multiselect-menu {
    max-width: calc(100vw - 56px);
  }

  .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .form-actions .button,
  .form-action-primary {
    width: 100%;
    min-width: 0;
  }
}
.applicant-workspace {
  width: 100%;
  min-width: 0;
  margin: 24px 0 48px;
}

.applicant-workspace .panel {
  margin-bottom: 18px;
}

.applicant-progress {
  position: sticky;
  top: 0;
  z-index: 35;
  padding: 12px 22px;
  background: #fff;
}

.applicant-step-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.applicant-step-track button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #d9e0ec;
  border-radius: 6px;
  background: #fff;
  color: #344258;
  text-align: left;
  cursor: pointer;
}

.applicant-step-track button.active {
  border-color: #1768e8;
  background: #ecf3ff;
  color: #124ba5;
}

.applicant-step-track button.status-complete:not(.active) {
  border-color: var(--brand-emerald-line);
  background: var(--brand-emerald-soft);
}

.applicant-step-track button.status-incomplete:not(.active) {
  border-color: #ccd5e1;
  background: #f6f8fa;
}

.applicant-step-track button.status-filled:not(.active) { border-color: #83a8ce; background: #f1f6fc; }
.applicant-workspace .form-readonly-control { flex-wrap: wrap; gap: 4px; height: auto; min-height: 44px; padding-block: 8px; }
.applicant-workspace [data-path] { scroll-margin-top: 180px; }

.applicant-step-track button.status-invalid:not(.active) {
  border-color: #cd6b63;
  background: #fff1ef;
}

.applicant-step-track button.status-untouched:not(.active) {
  color: #657182;
}

.applicant-step-track button > span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e8edf4;
  font-weight: 700;
}

.applicant-step-track button.active > span {
  background: #1768e8;
  color: #fff;
}

.applicant-step-track button.status-complete:not(.active) > span { background: var(--brand-emerald-strong); color: #fff; }
.applicant-step-track button.status-incomplete:not(.active) > span { background: #e8edf4; color: #526171; }
.applicant-step-track button.status-invalid:not(.active) > span { background: #aa2923; color: #fff; }

.applicant-step-track small {
  min-width: 0;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.applicant-step-track small em {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.applicant-step-track button.status-invalid small em { color: #aa2923; }
.applicant-step-track button.status-incomplete small em { color: #657182; }
.applicant-step-track button.status-complete small em { color: var(--brand-emerald-strong); }

.applicant-step-short { display: none; }

.applicant-form {
  padding: 24px;
}

.applicant-form > .section-head {
  margin-bottom: 16px;
}

.applicant-subsection {
  border-top: 1px solid #dce2ec;
  padding: 15px 0;
}

.applicant-subsection summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #172136;
}

.applicant-subsection > .fields {
  margin-top: 16px;
}

.applicant-choice {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.applicant-choice legend {
  margin-bottom: 8px;
  font-weight: 700;
}

.applicant-choice > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.applicant-choice label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  cursor: pointer;
}

.applicant-choice input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
}

.applicant-travel-mode {
  margin: 16px 0;
}

.applicant-travel-mode .applicant-choice > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 4px 16px;
}

.applicant-travel-mode .applicant-choice label {
  width: 100%;
  min-width: 0;
}

.applicant-repeat-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.applicant-identity-number,
.applicant-identity-number .fields {
  min-width: 0;
}

.applicant-identity-number .form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.applicant-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  min-width: 0;
}

.applicant-checkbox input {
  flex: 0 0 auto;
}

.applicant-checkbox span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.applicant-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.applicant-actions:has(> :only-child) {
  justify-content: center;
}

.applicant-draft-list {
  border-top: 1px solid #dce2ec;
  margin-top: 16px;
}

.applicant-draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid #dce2ec;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.applicant-draft-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #dce2ec;
}

.applicant-draft-item .applicant-draft-row { border-bottom: 0; }
.applicant-delete { flex: 0 0 auto; }

.applicant-draft-row span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.applicant-draft-row span:first-child {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.applicant-draft-row small {
  color: #59677a;
}

.applicant-review .visa-form-errors {
  display: block;
}

.applicant-review li {
  overflow-wrap: anywhere;
}

.applicant-issue-summary {
  display: block;
  margin-bottom: 16px;
}

.applicant-checklist {
  margin-top: 28px;
  border-top: 1px solid #d5deea;
  padding-top: 20px;
}

.applicant-checklist-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.applicant-checklist li {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.applicant-checklist li p {
  margin: 3px 0;
}

.applicant-checklist li small {
  display: block;
  color: #59677a;
}

@media (max-width: 700px) {
  .applicant-checklist-columns { grid-template-columns: 1fr; gap: 8px; }
  .applicant-progress,
  .applicant-form { padding: 15px; }
  .applicant-step-track { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .applicant-step-track button { flex-direction: column; align-items: center; padding: 6px 3px; }
  .applicant-step-track small { font-size: 10px; text-align: center; }
  .applicant-step-track small em { font-size: 9px; }
  .applicant-step-full { display: none; }
  .applicant-step-short { display: inline; }
  .applicant-actions { flex-wrap: wrap; }
  .applicant-actions .button { flex: 1 1 auto; }
  .applicant-draft-item { gap: 4px; }
  .applicant-draft-row { gap: 5px; }
  .applicant-draft-row > span:last-child { flex-wrap: wrap; }
  .applicant-delete { padding: 8px; }
  .applicant-delete span { display: none; }
}
.applicant-funding-answer{border:0;padding:0;margin:0;min-width:0;display:flex;flex-wrap:wrap;gap:8px 18px}.applicant-funding-answer legend{font-weight:600;margin-bottom:7px}.applicant-funding-answer label{display:inline-flex;align-items:center;gap:7px;width:auto}.applicant-funding-answer input{width:auto;flex:none}
@media (max-width: 360px) {
  .applicant-progress { padding-inline: 4px; }
  .applicant-step-track { gap: 2px; }
  .applicant-step-track button { padding-inline: 0; }
  .applicant-step-track small { overflow-wrap: normal; }
  .applicant-step-short { white-space: nowrap; }
}
.funding-label-row{display:flex;align-items:center;gap:6px}.funding-label-row .icon-button{width:26px;height:26px;padding:3px}.funding-language-field select{width:100%}
.travel-search-line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.travel-search-line > .form-date-range-field { grid-column: span 2; }
.travel-search-line > *, .travel-route-editor, .travel-offer { min-width: 0; }
.travel-mode-switches { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.travel-own-toggle { display: flex; align-items: center; gap: 8px; width: auto; }
.travel-own-toggle input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }
.travel-manual-panel { border-top: 1px solid var(--border); padding-top: 12px; }
.travel-manual-panel > summary { padding: 8px 0; cursor: pointer; }
.travel-offer { border: 1px solid var(--border); border-radius: 6px; margin: 12px 0; padding: 12px; }
.travel-offer > summary { cursor: pointer; overflow-wrap: anywhere; }
.travel-offer-summary, .travel-alternatives .button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; white-space: normal; }
.travel-offer-summary { margin-top: 8px; }
.travel-alternatives { display: grid; gap: 8px; }
.travel-alternatives .button[aria-current="true"] { border-color: #3478e5; background: #f0f6ff; color: #153a66; }
.travel-cost-breakdown { display: grid; gap: 6px; }
.travel-cost-breakdown > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 6px 0; }
.travel-cost-breakdown dd { margin: 0; text-align: right; }
.travel-stay-periods p { margin: 4px 0; }
.applicant-travel-results button[hidden] { display: none !important; }
@media (max-width: 850px) { .travel-search-line { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .travel-search-line { grid-template-columns: minmax(0, 1fr); } .travel-search-line > .form-date-range-field { grid-column: auto; } .travel-cost-breakdown > div { flex-wrap: wrap; } }

.questionnaire-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.questionnaire-toolbar > .eyebrow { margin-right: auto; }
.questionnaire-check-actions { display: flex; justify-content: center; padding: 20px; }
.questionnaire-visa-intent { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.questionnaire-visa-intent legend { margin-bottom: 10px; font-weight: 700; }
.japan-visa-shell #japanVisaFormAnchor { border: 0; box-shadow: none; background: transparent; padding: 0; }
.japan-visa-shell #japanVisaFormAnchor > .section-head { display: none; }
.japan-visa-shell [data-visa-group="purpose-documents"] { border: 1px solid var(--form-line); border-radius: 8px; padding: var(--form-section-padding); background: var(--form-surface); }
.questionnaire-progress .visa-step-current { grid-template-columns: minmax(0, 1fr) auto; }
.questionnaire-progress .visa-draft-status { justify-self: end; }
.questionnaire-progress [data-step-track] { margin-top: 6px; }
@media (max-width: 700px) {
  .questionnaire-progress .visa-step-current > strong { grid-column: 1 / -1; }
  .questionnaire-progress .visa-draft-status { justify-self: center; }
}
.japan-visa-shell .visa-form-group-head > p { display: none; }
.japan-visa-shell details.visa-section > summary { display: flex; cursor: pointer; list-style: none; }
.japan-visa-shell details.visa-section > summary::after { content: "+"; margin-left: auto; font-size: 18px; }
.japan-visa-shell details.visa-section[open] > summary::after { content: "-"; }
.japan-visa-shell .questionnaire-legacy-parent { display: none !important; }
.japan-visa-shell [data-questionnaire-list] .applicant-draft-row { text-align: left; width: 100%; background: transparent; border: 0; color: inherit; cursor: pointer; font: inherit; }
.japan-visa-shell [data-questionnaire-list] .applicant-draft-row > span { min-width: 0; overflow-wrap: anywhere; }
.japan-visa-shell .visa-step-track button[data-state="checked"] { border-color: var(--brand-emerald-hover); color: var(--brand-emerald-strong); background: var(--brand-emerald-soft-hover); }
.japan-visa-shell [data-visa-section] { scroll-margin-top: 160px; }
.japan-visa-shell .questionnaire-progress { position: sticky; top: 8px; }
.japan-visa-shell [data-step-actions] .visa-generation-footer { border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; }
.japan-visa-shell [data-step-actions] [data-step-back] { align-self: stretch; }
.japan-visa-shell [data-step-actions] [data-generate] { min-width: 0; }
.japan-visa-shell [data-generation-guidance] { margin: 0; color: var(--form-secondary); }
.japan-visa-shell .questionnaire-progress .visa-form-errors { max-height: none; padding: 0; overflow: visible; }
.questionnaire-progress [data-review-issues] { min-width: 0; }
.questionnaire-progress [data-review-issues] > summary { cursor: pointer; padding: 8px 12px; }
.questionnaire-progress [data-review-issues] > summary span { margin-left: 12px; font-size: 12px; }
.questionnaire-progress .questionnaire-issue-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; }
.questionnaire-progress .questionnaire-issue-tools p { margin: 0; }
.questionnaire-progress .questionnaire-issue-tools .icon-button { width: 32px; height: 32px; padding: 5px; }
.questionnaire-progress [data-review-issues] > ul { max-height: min(180px, 20dvh); overflow: auto; margin: 4px 0 8px; padding: 0 12px 0 30px; }
@media (max-width: 700px) {
  .japan-visa-shell [data-step-actions] [data-generate] { width: 100%; height: 100%; }
  .japan-visa-shell [data-step-actions] .visa-generation-footer { height: 100%; }
}

/* Logout retains the existing countdown and modal lifecycle on every route. */
#logoutModal {
  --accent: var(--brand-emerald-strong);
  --accent-dark: var(--brand-emerald-pressed);
  --line: #e5e7eb;
  --muted: #596579;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
}
#logoutModal .modal-backdrop { background: rgb(17 24 39 / 45%); }
#logoutModal .logout-card { border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 24px 80px rgb(17 24 39 / 20%); }
#logoutModal .modal-head { display: flex; flex-direction: row; align-items: flex-start; gap: 16px; padding: 24px; }
#logoutModal .modal-head > div { min-width: 0; }
#logoutModal .eyebrow { margin: 0 0 4px; color: var(--brand-emerald-strong); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
#logoutModal h2 { margin: 0; color: #111827; font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.2px; }
#logoutModal .icon-button { flex: none; width: 44px; height: 44px; border: 1px solid #d1d5db; border-radius: 8px; color: #596579; background: #fff; }
#logoutModal .logout-countdown { min-height: 160px; color: var(--brand-emerald-strong); background: #f9fafb; font-size: 72px; font-weight: 600; font-variant-numeric: tabular-nums; }
#logoutModal .modal-actions { padding: 20px 24px; }
#logoutModal .button.ghost { min-height: 44px; padding: 10px 16px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: var(--brand-emerald-strong); font-size: 14px; font-weight: 600; line-height: 1.35; }
#logoutModal :is(.button.ghost, .icon-button):hover { border-color: var(--brand-emerald-strong); background: var(--brand-emerald-soft); color: var(--brand-emerald-pressed); }
#logoutModal button:focus-visible { outline: 2px solid var(--brand-emerald-strong); outline-offset: 3px; }
@media (max-width: 600px) {
  #logoutModal .modal-head { padding: 20px 16px; gap: 12px; }
  #logoutModal .modal-actions { padding: 16px; }
  #logoutModal .modal-actions .button { width: 100%; }
  #logoutModal h2 { font-size: 18px; }
}
.confirmation-currencies{display:flex;flex-wrap:wrap;align-items:center;gap:20px;padding-top:16px;margin-top:16px;border-top:1px solid var(--border,#dbe2e8)}
.confirmation-currency{display:flex;align-items:center;gap:14px;min-width:0;margin:0;padding:0;border:0}
.confirmation-currency legend{float:left;width:auto;margin:0 14px 0 0;padding:0;font-size:14px;font-weight:600;color:var(--text-muted,#596679);line-height:38px}
.confirmation-currency-options{display:flex;gap:3px;padding:3px;background:#fff;border:1px solid #d3dce4;border-radius:10px}
.confirmation-currency-options label{display:block;position:relative;margin:0;cursor:pointer}
.confirmation-currency-options input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.confirmation-currency-options span{display:grid;place-items:center;min-width:40px;height:32px;padding:0 10px;border-radius:7px;font-size:18px;font-weight:600;color:#526174;transition:background .12s,color .12s}
.confirmation-currency-options input:checked+span{background:var(--brand-emerald-soft);color:var(--brand-emerald-strong);box-shadow:inset 0 0 0 1px var(--brand-emerald-line)}
.confirmation-currency-options input:focus-visible+span{outline:2px solid var(--brand-emerald-strong);outline-offset:2px}
.combined-currency-row .confirmation-currency+.confirmation-currency{border-left:1px solid #d3dce4;padding-left:20px}
#accommodationShell .stay-currency-row{grid-column:1/-1;width:100%;padding-top:12px;margin-top:0}
.flight-currency-row{margin-top:16px}
@media(max-width:600px){.confirmation-currencies{gap:12px}.confirmation-currency{flex-wrap:wrap;row-gap:6px}.confirmation-currency legend{line-height:32px;font-size:13px}.combined-currency-row{display:grid;grid-template-columns:1fr;gap:12px}.combined-currency-row .confirmation-currency+.confirmation-currency{border-left:0;padding-left:0;border-top:1px solid #d3dce4;padding-top:12px}}
/* Native confirmation currency control, shared by the three travel generators. */
#travelCombinedShell .combined-currency-row{grid-column:1/-1;justify-content:flex-start;width:100%;margin-top:2px;padding-top:12px;gap:24px}
#travelCombinedShell .confirmation-currency-options input,#accommodationShell .confirmation-currency-options input,#bookingForm .confirmation-currency-options input{position:absolute;min-height:0;height:1px;width:1px;padding:0;border:0;opacity:0}
#travelCombinedShell .confirmation-currency-options label,#accommodationShell .confirmation-currency-options label,#bookingForm .confirmation-currency-options label{display:block;width:auto;padding:0;min-height:0;gap:0}
#travelCombinedShell .confirmation-currency legend,#accommodationShell .confirmation-currency legend,#bookingForm .confirmation-currency legend{color:#5f6b7a;font-weight:600;font-size:14px}
@media(max-width:600px){#travelCombinedShell .combined-currency-row{gap:12px}}

/* Flight and Combined: readable durations for each flight and connection. */
:is(#bookingForm, #travelCombinedShell) .flight-card-routes { container-type: inline-size; }
:is(#bookingForm, #travelCombinedShell) .flight-card-routes .result-route-line { grid-template-columns: 40px 90px minmax(0, 1fr) 90px; gap: 12px; }
:is(#bookingForm, #travelCombinedShell, #flightModal) .route-time :is(span, small) { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
@container (max-width: 600px) {
  :is(#bookingForm, #travelCombinedShell) .flight-card-routes .result-route-line { grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  :is(#bookingForm, #travelCombinedShell) .flight-card-routes .result-timeline { grid-column: 1 / -1; grid-row: 2; }
  :is(#bookingForm, #travelCombinedShell) .flight-card-routes .route-time.end { grid-column: 3; grid-row: 1; }
}
:is(#bookingForm, #travelCombinedShell) .result-timeline { container-type: inline-size; }
:is(#bookingForm, #travelCombinedShell) .result-timeline > p { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 13px; line-height: 1.35; }
:is(#bookingForm, #travelCombinedShell) .flight-route-label { border-radius: 7px; padding: 5px 8px; color: #0759aa; background: #e5f1ff; font-size: 12px; font-weight: 700; }
:is(#bookingForm, #travelCombinedShell) .flight-card-routes .result-route-line + .result-route-line { border-top: 1px dashed #d7e0eb; padding-top: 16px; }
.flight-timeline-detail { min-width: 0; }
.flight-timeline-row { position: relative; display: flex; min-width: 0; padding: 0 4px 21px; }
.flight-timeline-part { display: grid; flex: 1 1 0; min-width: 0; grid-template-rows: 30px 19px 14px 21px; text-align: center; }
.flight-timeline-part > strong { display: flex; justify-content: center; align-items: end; min-width: 0; padding: 0 2px; color: #111827; font-size: 12px; font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; }
.flight-timeline-part > span { color: #5b687c; font-size: 11px; font-weight: 500; line-height: 1.45; }
.flight-timeline-part > small { display: block; min-width: 0; padding-top: 3px; color: #172033; font-size: 11px; font-weight: 700; text-align: left; white-space: nowrap; }
.flight-timeline-rail { position: relative; display: block; height: 4px; align-self: center; margin: 0 1px; background: #1673d1; }
.flight-timeline-rail::before, .flight-timeline-rail::after { position: absolute; top: -4px; z-index: 1; width: 7px; height: 7px; border: 2px solid #1673d1; border-radius: 50%; background: #fff; content: ""; }
.flight-timeline-rail::before { left: -4px; }
.flight-timeline-rail::after { right: -4px; }
.flight-timeline-part.layover .flight-timeline-rail { background: repeating-linear-gradient(to right, #bcc9d9 0 7px, transparent 7px 12px); }
.flight-timeline-part.layover .flight-timeline-rail::before, .flight-timeline-part.layover .flight-timeline-rail::after { border-color: #9badc2; }
.flight-timeline-final-code { position: absolute; right: 4px; bottom: 21px; color: #172033; font-size: 11px; font-weight: 700; }
.flight-timeline-split { display: none; }
.flight-timeline-split .flight-timeline-row + .flight-timeline-row { margin-top: 6px; }
.flight-timeline-continuation::before { position: absolute; top: 31px; left: 0; color: #64748b; font-size: 10px; content: "↳"; }
@container (max-width: 800px) {
  .flight-timeline-detail.dense .flight-timeline-single { display: none; }
  .flight-timeline-detail.dense .flight-timeline-split { display: grid; }
}
@container (max-width: 550px) {
  .flight-timeline-detail.has-split .flight-timeline-single { display: none; }
  .flight-timeline-detail.has-split .flight-timeline-split { display: grid; }
}
@container (max-width: 380px) {
  .flight-timeline-detail .flight-timeline-single { display: block !important; }
  .flight-timeline-detail .flight-timeline-split { display: none !important; }
  .flight-timeline-row { display: grid; gap: 5px; padding-bottom: 0; }
  .flight-timeline-part { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-rows: auto; gap: 5px; align-items: center; border-left: 3px solid #1673d1; border-radius: 4px; padding: 6px 8px; background: #f8fbff; text-align: left; }
  .flight-timeline-part.layover { border-left-color: #9badc2; background: #f8fafc; }
  .flight-timeline-part > small { grid-column: 1; grid-row: 1; padding: 0; font-size: 11px; }
  .flight-timeline-part > strong { grid-column: 2; grid-row: 1; justify-content: start; padding: 0; font-size: 12px; overflow-wrap: normal; }
  .flight-timeline-part > span { grid-column: 3; grid-row: 1; font-size: 11px; white-space: nowrap; }
  .flight-timeline-rail { display: none; }
  .flight-timeline-final-code { position: static; display: block; padding: 2px 0 0 8px; text-align: left; transform: none; }
}

/* Standalone Flight: route details opened from a result card. */
#flightModal .modal-card { width: min(1230px, 100%); border-radius: 14px; }
#flightModal .modal-head { flex-direction: row; align-items: flex-start; padding: 20px 26px; }
#flightModal .modal-head > div { flex: 1; min-width: 0; }
#flightModal .modal-head .icon-button { flex: 0 0 36px; border-color: #d9e1eb; color: #59677b; }
#flightModal .modal-head .eyebrow { color: var(--brand-emerald-strong); }
#flightModal .modal-head h2 { margin: 4px 0 0; font-size: clamp(22px, 2.2vw, 29px); overflow-wrap: anywhere; }
#flightModal .modal-body { padding: 18px 26px 22px; }
#flightModal .modal-actions { padding: 14px 26px; }
#flightModal .modal-actions .button.primary { border-color: var(--brand-emerald-strong); background: var(--brand-emerald-strong); color: #fff; }
#flightModal .modal-actions .button.primary:hover { background: var(--brand-emerald-pressed); }
#flightModal .flight-detail-summary { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 20px; }
#flightModal .flight-detail-summary:has(> div:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#flightModal .flight-detail-summary:has(> div:nth-child(5)) > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
#flightModal .flight-detail-summary > div { min-width: 0; padding: 13px 16px; background: #f7f9fc; }
#flightModal .flight-detail-summary strong { display: block; overflow-wrap: anywhere; font-size: 20px; }
#flightModal .flight-detail-directions { display: grid; gap: 24px; }
#flightModal .flight-detail-direction + .flight-detail-direction { border-top: 1px dashed #cad4e2; padding-top: 20px; }
#flightModal .flight-detail-direction-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
#flightModal .flight-detail-direction-head svg { width: 25px; height: 25px; color: var(--brand-emerald-strong); }
#flightModal .flight-detail-direction-head h3 { margin: 0; font-size: 19px; }
#flightModal .flight-detail-direction-head > span { color: #5b687c; font-size: 14px; font-weight: 750; }
#flightModal .flight-detail-route { container-type: inline-size; border: 1px solid #d9e1eb; border-radius: 11px; padding: 16px 10px 10px; }
#flightModal .flight-detail-route > .result-route-line { grid-template-columns: 48px 112px minmax(0, 1fr) 112px; gap: 14px; margin: 0 10px 12px; }
#flightModal .result-timeline { container-type: inline-size; }
#flightModal .result-timeline p { display: none; }
#flightModal .route-time strong { font-size: 27px; }
#flightModal .route-time span { font-size: 15px; }
#flightModal .flight-detail-legs { display: grid; gap: 7px; }
#flightModal .flight-detail-segment { min-width: 0; border: 1px solid #d9e1eb; border-radius: 9px; background: #f8fafc; }
#flightModal .flight-detail-segment > summary, #flightModal .flight-detail-row { display: grid; grid-template-columns: 32px 40px minmax(160px, 1.35fr) minmax(125px, 1fr) minmax(125px, 1fr) minmax(93px, .7fr) 16px; gap: 11px; align-items: center; padding: 11px 13px; }
#flightModal .flight-detail-segment > summary { cursor: pointer; list-style: none; }
#flightModal .flight-detail-segment > summary::-webkit-details-marker { display: none; }
#flightModal .flight-detail-segment > summary:focus-visible { outline: 3px solid #1673d1; outline-offset: 2px; border-radius: 8px; }
#flightModal .flight-detail-segment[open] { background: #fff; }
#flightModal .flight-detail-number { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--brand-emerald-strong); color: #fff; font-size: 14px; font-weight: 800; }
#flightModal .flight-detail-segment .airline-logo { width: 38px; height: 38px; }
#flightModal .flight-detail-identity, #flightModal .flight-detail-endpoint { display: grid; gap: 3px; min-width: 0; }
#flightModal .flight-detail-identity strong, #flightModal .flight-detail-endpoint strong { color: #172033; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
#flightModal .flight-detail-endpoint strong { font-size: 18px; }
#flightModal .flight-detail-identity small, #flightModal .flight-detail-endpoint small, #flightModal .flight-detail-endpoint span { color: #59677b; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
#flightModal .flight-detail-duration { display: flex; align-items: center; gap: 5px; color: #344256; font-size: 13px; font-weight: 800; }
#flightModal .flight-detail-duration svg, #flightModal .flight-detail-layover svg { width: 17px; height: 17px; flex: 0 0 auto; color: #697b96; }
#flightModal .flight-detail-chevron { color: #344256; font-size: 23px; line-height: 1; }
#flightModal .flight-detail-segment[open] .flight-detail-chevron { transform: rotate(180deg); }
#flightModal .flight-detail-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; border-top: 1px solid #e1e7ef; padding: 12px 16px 14px 97px; }
#flightModal .flight-detail-extra > div { display: grid; gap: 3px; min-width: 0; }
#flightModal .flight-detail-extra span { color: #66758a; font-size: 11px; font-weight: 800; text-transform: uppercase; }
#flightModal .flight-detail-extra strong { color: #172033; font-size: 13px; overflow-wrap: anywhere; }
#flightModal .flight-detail-layover { display: flex; align-items: center; gap: 9px; margin: 0 7px 0 47px; border-radius: 8px; padding: 8px 12px; background: #eef2f7; color: #4c5b70; font-size: 13px; }
#flightModal .flight-detail-layover span { min-width: 0; overflow-wrap: anywhere; }
#flightModal .flight-detail-layover strong { margin-left: auto; white-space: nowrap; }
#flightModal .flight-detail-empty { margin: 0; color: #59677b; }

@media (max-width: 950px) {
  #flightModal .flight-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #flightModal .flight-detail-summary > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #flightModal .flight-detail-segment > summary, #flightModal .flight-detail-row { grid-template-columns: 32px 38px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 16px; }
  #flightModal .flight-detail-duration { grid-column: 3 / 6; justify-self: end; }
  #flightModal .flight-detail-chevron { grid-column: 6; grid-row: 1; justify-self: end; }
}

@media (max-width: 680px) {
  #flightModal { padding: 8px; }
  #flightModal .modal-card { max-height: calc(100dvh - 16px); }
  #flightModal .modal-head { flex-direction: row; align-items: flex-start; padding: 14px 16px; }
  #flightModal .modal-body { padding: 14px 12px; }
  #flightModal .modal-actions { padding: 12px 16px; }
  #flightModal .flight-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #flightModal .flight-detail-summary > div { padding: 10px; }
  #flightModal .flight-detail-summary span { font-size: 11px; }
  #flightModal .flight-detail-summary strong { font-size: 16px; }
  #flightModal .flight-detail-route { padding: 12px 7px 7px; }
  #flightModal .flight-detail-route > .result-route-line { grid-template-columns: minmax(70px, 1fr) minmax(0, 2.5fr) minmax(70px, 1fr); gap: 8px; margin: 0 5px 10px; }
  #flightModal .flight-detail-route > .result-route-line > .airline-logo { display: none; }
  #flightModal .route-time strong { font-size: 22px; }
  #flightModal .route-time span { font-size: 13px; }
  #flightModal .flight-detail-segment > summary, #flightModal .flight-detail-row { grid-template-columns: 31px 38px minmax(0, 1fr) 18px; gap: 8px; padding: 10px; }
  #flightModal .flight-detail-identity { grid-column: 3; }
  #flightModal .flight-detail-endpoint { grid-row: 2; }
  #flightModal .flight-detail-endpoint:nth-child(4) { grid-column: 1 / 3; }
  #flightModal .flight-detail-endpoint:nth-child(5) { grid-column: 3 / 5; }
  #flightModal .flight-detail-duration { grid-column: 1 / 4; grid-row: 3; justify-self: start; }
  #flightModal .flight-detail-chevron { grid-column: 4; grid-row: 1; }
  #flightModal .flight-detail-extra { padding: 10px 12px; }
  #flightModal .flight-detail-layover { margin-left: 16px; }
}

@media (max-width: 440px) {
  #flightModal .flight-detail-route > .result-route-line { grid-template-columns: 1fr 1fr; }
  #flightModal .flight-detail-route > .result-route-line > .route-time { grid-column: 1; grid-row: 1; }
  #flightModal .flight-detail-route > .result-route-line > .route-time.end { grid-column: 2; }
  #flightModal .flight-detail-route > .result-route-line > .result-timeline { grid-column: 1 / -1; grid-row: 2; }
  #flightModal .flight-detail-layover { display: grid; grid-template-columns: 18px 1fr; gap: 4px 8px; }
  #flightModal .flight-detail-layover strong { grid-column: 2; margin: 0; white-space: normal; }
}

@container (max-width: 850px) {
  #flightModal .flight-detail-route > .result-route-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #flightModal .flight-detail-route > .result-route-line > .airline-logo { display: none; }
  #flightModal .flight-detail-route > .result-route-line > .route-time { grid-column: 1; grid-row: 1; }
  #flightModal .flight-detail-route > .result-route-line > .route-time.end { grid-column: 2; }
  #flightModal .flight-detail-route > .result-route-line > .result-timeline { grid-column: 1 / -1; grid-row: 2; }
}

.flight-layover-filter { display: grid; gap: 9px; margin-top: 13px; }
.flight-layover-filter > label { color: var(--muted); font-size: 13px; font-weight: 800; }
.flight-layover-number { display: flex; align-items: center; gap: 9px; }
.flight-layover-number input { width: min(130px, 100%); min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
.flight-layover-number span { color: var(--text); font-size: 14px; font-weight: 800; }
.flight-layover-filter input[type="range"] { margin: 2px 0 0; }
.flight-layover-filter .text-action { justify-self: start; padding: 0; font-size: 12px; }

/* Shared Stay/Combined distance selector; opens in flow, including on narrow screens. */
#accommodationShell .accommodation-distance-select,
#travelCombinedShell .accommodation-distance-select { min-width: 0; width: 100%; box-sizing: border-box; border: 1px solid #d8e0e9; border-radius: 8px; background: #fff; color: #25344b; }
#accommodationShell .accommodation-distance-select summary,
#travelCombinedShell .accommodation-distance-select summary { display: list-item; min-height: 44px; box-sizing: border-box; margin: 0; padding: 12px; cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.accommodation-distance-select summary small { display: block; margin: 3px 0 0; color: #607086; font-size: 13px; font-weight: 400; line-height: 1.45; }
.accommodation-distance-select[open] summary { border-bottom: 1px solid #e5e7eb; }
#accommodationShell .accommodation-distance-options,
#travelCombinedShell .accommodation-distance-options { display: grid; gap: 4px; padding: 8px 12px 12px; }
#accommodationShell .accommodation-distance-options label,
#travelCombinedShell .accommodation-distance-options label { display: flex; align-items: center; gap: 9px; min-height: 40px; margin: 0; padding: 0; color: #25344b; font-size: 14px; font-weight: 400; line-height: 1.4; cursor: pointer; }
#accommodationShell .accommodation-distance-options input,
#travelCombinedShell .accommodation-distance-options input { flex: 0 0 17px; width: 17px; height: 17px; min-height: 17px; margin: 0; accent-color: var(--brand-emerald-strong); }
.accommodation-distance-options button { justify-self: start; min-height: 40px; border: 0; padding: 4px 0; background: transparent; color: var(--brand-emerald-strong); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.accommodation-distance-options p { margin: 4px 0 0; color: #607086; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#accommodationShell .accommodation-center-distance,
#travelCombinedShell .accommodation-center-distance { margin: 8px 0 12px; color: #50627a; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }

.stay-suggestions .stay-location-credit { display:block; padding:10px 14px; color:#607080; overflow-wrap:anywhere; }
