/* Yajomi: one restrained, responsive system across the existing application. */
:root {
  --paper: #fff;
  --ink: #172c34;
  --muted: #596d77;
  --green: #164e60;
  --light: #eff6f8;
  --line: #e1e8ec;
  --orange: #39869d;
  --sand: #f3f6f8;
  --serif: 'Manrope', Arial, sans-serif;
}
body {
  font-size: 15px;
  color: var(--ink);
  background: #fff;
}
.topbar {
  background: #fff;
  min-height: 88px;
  border-color: var(--line);
}
.button {
  border-radius: 9px;
  min-height: 44px;
  font-size: 13px;
  padding: 12px 18px;
  border-color: #d8e2e7;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: none;
}
.text-button {
  font-size: 13px;
  min-height: 44px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #526b77;
}
.fine,
.data-note,
.muted {
  color: #596d77;
  font-size: 12px;
}
.notice {
  background: #f1f6f8;
  border-color: #dce8ed;
  color: #344f5d;
  font-size: 13px;
  line-height: 1.7;
}
.notice.warning {
  background: #fff9ef;
  color: #735525;
}
.notice.danger,
.hotel-warning {
  color: #9d3c32;
}
.hotel-warning {
  font-size: 12px;
}
main {
  padding-top: 28px;
}
.intro-details {
  margin: 0 0 20px;
}
.intro h1 em {
  font-style: normal;
  color: #31768b;
}
.trip-banner {
  background: #f4f7f9;
  border: 0;
  min-height: 200px;
  border-radius: 14px;
}
.banner-picture {
  width: 230px !important;
}
.trip-banner h2 {
  font-size: 31px;
  letter-spacing: -1px;
}
.trip-banner .eyebrow,
.trip-meta {
  color: #526b77;
}
.trip-meta {
  font-size: 13px;
}
.banner-edit {
  right: 18px;
  top: 18px;
  min-height: 44px;
  min-width: 44px;
}
.metrics {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  padding: 24px 0;
  margin: 6px 0 25px;
}
.metric {
  padding: 0 22px;
}
.metric:first-child {
  padding-left: 0;
}
.metric-label {
  color: #60727d;
  font-size: 12px;
}
.metric-value {
  font-size: 23px !important;
}
.tabs button {
  font-size: 13px;
  color: #596d77;
}
.save-state {
  font-size: 11px;
  color: #526b77;
}
.workspace-toolbar {
  margin-bottom: 30px;
}
.planner-grid {
  gap: 38px;
}
.section-heading h3 {
  font-size: 19px;
}
.section-heading p {
  font-size: 12px;
  color: #596d77;
}
.route-card {
  padding: 22px 16px 22px 8px;
  border-color: var(--line);
  border-radius: 12px;
  grid-template-columns: 24px 66px minmax(0, 1fr) auto;
  gap: 14px;
}
.route-card:hover,
.route-card.selected {
  border-color: #79a6b5;
  box-shadow: 0 5px 20px #173b4807;
  background: white;
}
.stop-thumb {
  width: 66px;
  height: 82px;
  border-radius: 8px;
}
.stop-name button {
  font-size: 17px;
}
.stop-country {
  color: #596d77;
}
.stop-name {
  flex-wrap: wrap;
  gap: 0 10px;
}
.stop-date {
  font-size: 12px;
  color: #596d77;
  margin: 7px 0;
}
.status {
  font-size: 10px;
  background: #f0f4f6;
  color: #526b77;
}
.status.booked {
  background: #e9f3f1;
  color: #316b5a;
}
.status.wish {
  background: #f3f5f7;
  color: #64757e;
}
.connector {
  min-height: 42px;
  font-size: 11px;
  color: #667d88;
  border-color: #c7d7df;
}
.connector.unknown {
  color: #80653d;
}
.endpoint {
  font-size: 12px;
  color: #526b77;
}
.endpoint strong {
  color: #2e505f;
}
.route-bottom {
  font-size: 11px;
  color: #596d77;
}
.map-card {
  border-radius: 12px;
  border-color: var(--line);
  background: #f2f6f8;
}
.map-top {
  color: #526b77;
  font-size: 9px;
}
.map-caption {
  font-size: 10px;
  color: #526b77;
  border-color: var(--line);
}
.map-column {
  min-width: 0;
}
.map-card {
  position: sticky;
  top: 18px;
}
.next-section h2 {
  font-size: 25px;
}
.rec-card,
.saved-card {
  border-color: var(--line);
  border-radius: 12px;
  background: white;
}
.rec-card h3 {
  font-size: 19px;
}
.rec-card p {
  color: #526b77;
  font-size: 13px;
}
.rec-kind {
  color: #336879;
  background: #eef5f7;
}
.next-section > p {
  color: #596d77;
}
.journey-marker {
  background: var(--green);
}
.empty-state h3 {
  font-family: 'Manrope', Arial, sans-serif;
}
dialog {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px 32px;
  border-radius: 16px;
  max-width: 740px;
}
dialog::backdrop {
  background: #12283177;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 29px;
  letter-spacing: -1px;
}
dialog .lead {
  font-size: 14px;
  color: #596d77;
}
.field {
  font-size: 13px;
  gap: 8px;
}
input,
select,
textarea {
  font-size: 14px;
  border-color: #d6e1e7;
  min-height: 46px;
  border-radius: 8px;
}
.form-error {
  font-size: 13px;
}
.example-option {
  background: #fff;
  border-color: var(--line);
  padding: 0;
  overflow: hidden;
}
.example-option strong {
  font-family: 'Manrope', Arial, sans-serif;
  font-size: 18px;
}
.visual-examples .example-option {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: center;
}
.visual-examples img {
  width: 130px;
  height: 130px;
  object-fit: cover;
}
.visual-examples .example-option > div {
  padding: 12px 18px 12px 0;
}
.example-option span {
  font-size: 12px;
  color: #596d77;
}
.config-advanced {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.config-advanced summary {
  font-size: 13px;
  color: #526b77;
}
.config-advanced .form-grid {
  padding-top: 12px;
}
.station-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  margin: 22px 0;
}
.station-tabs button {
  min-height: 48px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  padding: 0 0 12px;
}
.station-tabs [aria-selected='true'] {
  border-color: var(--green);
  color: var(--green);
  font-weight: 650;
}
#station-recommendations {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.hotel-record-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}
footer {
  font-size: 12px;
  color: #596d77;
}
footer button {
  font-size: 11px;
  color: #526b77;
}
:focus-visible {
  outline: 3px solid #37859f;
  outline-offset: 4px;
}
@media (max-width: 1000px) {
  .planner-grid {
    gap: 24px;
  }
  .route-card {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }
  .route-card > .stop-thumb {
    display: none;
  }
  main {
    padding-left: 28px;
    padding-right: 28px;
  }
}
@media (max-width: 760px) {
  .trip-banner {
    min-height: 155px;
  }
  .trip-banner h2 {
    font-size: 25px;
  }
  .banner-picture {
    display: none !important;
  }
  .trip-banner-main {
    padding: 24px;
    max-width: calc(100% - 35px);
  }
  .metrics {
    gap: 20px 0;
    padding: 20px 0;
  }
  .metric,
  .metric:first-child {
    padding: 0 14px;
  }
  .metric:nth-child(odd) {
    padding-left: 0;
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric-value {
    font-size: 18px !important;
  }
  .metric-label {
    font-size: 11px;
  }
  .workspace-toolbar {
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .tabs {
    min-height: 44px;
    gap: 24px;
  }
  .tabs button {
    padding-bottom: 10px;
  }
  .toolbar-actions {
    margin: 0 0 12px;
    gap: 7px;
    width: 100%;
  }
  .toolbar-actions .save-state {
    flex: 1;
  }
  .toolbar-actions .button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .route-card {
    padding: 18px 12px 18px 4px;
    gap: 10px;
  }
  .stop-name button {
    font-size: 16px;
  }
  .route-column > .section-heading {
    margin: 18px 0;
  }
  .connector {
    font-size: 10px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .endpoint {
    font-size: 11px;
  }
  .map-card {
    position: static;
  }
  .map-caption {
    gap: 10px;
    font-size: 9px;
  }
  .mobile-view button {
    min-height: 44px;
  }
  .hotel-record-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .station-tabs {
    gap: 22px;
  }
  .station-tabs button {
    font-size: 13px;
  }
  .form-grid {
    gap: 16px;
  }
  .visual-examples .example-option {
    grid-template-columns: 95px 1fr;
    gap: 14px;
  }
  .visual-examples img {
    width: 95px;
    height: 125px;
  }
  .example-option strong {
    font-size: 16px;
  }
  dialog {
    padding: 22px 20px;
  }
  dialog h2 {
    font-size: 25px;
  }
  .dialog-top {
    margin-bottom: 16px;
  }
  .rec-card {
    padding: 22px;
  }
  .saved-card {
    flex-wrap: wrap;
  }
  footer {
    padding: 26px 20px;
    flex-wrap: wrap;
  }
  footer > div {
    margin-left: 0;
    flex-basis: 100%;
    gap: 20px;
  }
}
@media (max-width: 420px) {
  main {
    padding: 22px 16px;
  }
  .hotel-record-actions .button {
    font-size: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: 1;
  }
  .station-tabs {
    gap: 18px;
  }
  .route-card {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 7px;
  }
  .card-actions {
    max-width: 94px;
  }
  .trip-meta {
    font-size: 12px;
  }
}
@media print {
  .station-tabs {
    display: none;
  }
}

/* Shared dialog shell: the body alone scrolls; chrome stays reachable. */
#dialog {
  padding: 0;
  overflow: hidden;
  max-height: calc(100vh - 24px);
  max-height: calc(var(--dialog-height, 100dvh) - 24px);
  width: calc(100% - 24px);
  max-width: 740px;
  inset: calc(var(--dialog-top, 0px) + 12px) 0 auto;
  margin: 0 auto;
  overscroll-behavior: contain;
}
#dialog[open] {
  display: flex;
  flex-direction: column;
}
#dialog .dialog-top {
  flex: none;
  margin: 0;
  padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: #fff;
  z-index: 3;
}
#dialog .dialog-top button {
  min-width: 44px;
  min-height: 44px;
}
#dialog-content {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding: 24px 28px max(24px, env(safe-area-inset-bottom));
  scroll-padding-block: 76px 24px;
  overflow-wrap: anywhere;
}
#dialog-content .station-tabs {
  position: sticky;
  top: -24px;
  z-index: 2;
  background: #fff;
  gap: clamp(8px, 3vw, 24px);
  margin: 16px 0;
  padding-top: 8px;
  flex-wrap: wrap;
}
#dialog-content .station-tabs button {
  flex: 1;
  min-width: 0;
  white-space: normal;
}
#dialog-content :is(input, select, textarea) {
  font-size: 16px;
  min-width: 0;
  max-width: 100%;
}
#dialog-content :is(.form-grid, .field, .saved-actions) {
  min-width: 0;
}
#dialog-content .saved-actions {
  flex-wrap: wrap;
}
#dialog-content .form-actions {
  padding-bottom: 4px;
}
#dialog-content :is(input, select, textarea, button, a, [role='alert']) {
  scroll-margin-block: 76px 24px;
}
@media (max-width: 600px) {
  #dialog-content {
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }
  #dialog-content .station-tabs {
    top: -20px;
  }
  #dialog-content .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #dialog-content .field.full {
    grid-column: 1;
  }
  #dialog-content .button {
    white-space: normal;
    max-width: 100%;
  }
}
@media (max-width: 420px) {
  #dialog-content .station-tabs {
    gap: 8px;
  }
  #dialog-content .station-tabs button {
    flex: 1 1 auto;
    font-size: 12px;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  #dialog-content .form-actions .button {
    flex: 1 1 100%;
  }
  #dialog-content .button {
    overflow-wrap: normal;
  }
}
/* Flight planning shares the existing dialog and journey layout. */
.flight-option {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.flight-option h3 {
  font-size: 28px;
  margin: 10px 0;
}
.flight-option p {
  line-height: 1.6;
}
#flight-options {
  min-width: 0;
}

/* Guided flight comparison, shared scrollable dialog shell. */
.flight-steps {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 4px 0 28px;
  font-size: 12px;
  color: #647a82;
}
.flight-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.flight-steps span {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  height: 25px;
  border-radius: 50%;
  background: #edf3f4;
}
.flight-steps [aria-current] {
  color: #126b70;
  font-weight: 700;
}
.flight-steps [aria-current] span {
  background: #126b70;
  color: white;
}
.flight-hero {
  background: #f0f7f6;
  border: 1px solid #d2e5e2;
  border-radius: 18px;
  padding: clamp(18px, 4vw, 30px);
  margin: 20px 0;
}
.flight-route-lines p {
  padding: 12px 0;
  margin: 0;
}
.flight-route-lines small {
  display: block;
  color: #526b77;
  margin-bottom: 8px;
}
.flight-route-lines strong {
  display: block;
  font-size: clamp(18px, 3vw, 25px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.flight-route-lines strong span {
  color: #168080;
}
.flight-alternatives {
  margin: 20px 0;
}
.flight-alternatives summary,
#flex-flight-form summary {
  cursor: pointer;
  padding: 12px 0;
  color: #126b70;
  font-weight: 600;
  min-height: 44px;
}
.flight-alternatives h3 {
  font-size: 18px;
}
.flight-review-group {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 14px;
  margin: 18px 0;
}
.flight-review-group h3 {
  margin: 0 0 16px;
}
.flight-provider {
  background: #075cb5;
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}
.flight-provider h3 {
  font-size: 25px;
  color: white;
}
.flight-provider .eyebrow {
  color: #d9edff;
}
.flight-provider .button {
  background: white;
  color: #064c92;
  border: 0;
  white-space: normal;
  text-align: center;
}
.flight-provider p {
  line-height: 1.7;
}
#dialog-content .flight-hero .button {
  margin-top: 12px;
}
#dialog-content .flight-steps ~ .form-actions {
  flex-wrap: wrap;
}
@media (max-width: 500px) {
  .flight-steps {
    gap: 5px;
    font-size: 10px;
  }
  .flight-steps li {
    gap: 4px;
  }
  .flight-steps span {
    flex-basis: 21px;
    height: 21px;
  }
  .flight-review-group {
    padding: 12px;
  }
  .flight-provider {
    padding: 18px;
  }
  .flight-hero .button {
    width: 100%;
  }
}
/* Connections stay in the journey, with optional details disclosed inline. */
.inline-leg {
  margin: 12px 0 12px 26px;
  padding: 14px 16px;
  border-left: 2px solid #d7e2eb;
  background: #f7f9fc;
  border-radius: 0 12px 12px 0;
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.leg-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #405369;
}
.inline-leg p {
  margin: 8px 0;
  line-height: 1.6;
}
.inline-leg .fine {
  font-size: 12px;
  color: #5a6879;
}
.inline-leg-editor:empty {
  display: none;
}
.inline-leg-editor {
  margin-top: 14px;
}
.inline-leg details {
  margin: 12px 0;
}
.inline-leg summary {
  cursor: pointer;
  line-height: 1.7;
}
.inline-leg input,
.inline-leg select,
.inline-leg textarea {
  max-width: 100%;
  min-width: 0;
}
.inline-leg .form-actions {
  flex-wrap: wrap;
}
.station-expectation {
  margin: 12px 0 4px;
  font-size: 12px;
  line-height: 1.65;
  max-width: 520px;
  color: #566477;
}
.station-expectation strong {
  font-weight: 600;
  color: #35455a;
}
.station-expectation p {
  margin: 4px 0;
}
@media (max-width: 500px) {
  .inline-leg {
    margin-left: 0;
    padding: 12px;
  }
  .leg-heading {
    align-items: flex-start;
  }
  .leg-heading > span {
    flex: 1;
  }
  .inline-leg .form-grid {
    grid-template-columns: 1fr;
  }
  .inline-leg .form-actions .button {
    max-width: 100%;
  }
  .station-expectation {
    font-size: 12px;
  }
}

/* Help is in the native top layer: reachable inside dialogs and never clipped. */
.help {
  display: inline-flex;
  vertical-align: middle;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
.help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--forest, #244b43);
  cursor: pointer;
  font:
    600 15px Georgia,
    serif;
  border-radius: 50%;
}
.help-trigger::first-letter {
  border: 1px solid currentColor;
}
.help-trigger:hover {
  background: #edf2ee;
}
.help-trigger:focus-visible,
.help-close:focus-visible {
  outline: 2px solid #244b43;
  outline-offset: 2px;
}
.help-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  padding: 20px;
  background: #fffdf8;
  color: #263c35;
  border: 1px solid #d7dfd8;
  border-radius: 16px;
  box-shadow: 0 12px 48px #18352b30;
  overflow: auto;
  overscroll-behavior: contain;
  line-height: 1.6;
  font: 400 15px/1.6 system-ui;
  white-space: normal;
  text-align: left;
  z-index: 10000;
}
.help-popover strong,
.help-copy {
  display: block;
  margin-bottom: 12px;
}
.help-popover a {
  color: #244b43;
  text-decoration: underline;
}
.help-close {
  display: block;
  min-height: 44px;
  padding: 8px 12px;
  margin-top: 12px;
  background: #edf2ee;
  border: 0;
  border-radius: 8px;
  color: #244b43;
  cursor: pointer;
}
.help-popover::backdrop {
  background: transparent;
}
footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
footer a {
  color: inherit;
}
.info-page {
  max-width: 780px;
  margin: 40px auto;
  padding: 24px;
}
.info-page p {
  line-height: 1.7;
}
.info-page nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 30px 0;
}
.info-page h2 {
  margin-top: 32px;
}

.help-trigger {
  font-size: 0;
}
.help-trigger::before {
  content: 'i';
  font:
    600 13px/19px Georgia,
    serif;
  width: 21px;
  height: 21px;
  box-sizing: border-box;
  border: 1px solid #6f8980;
  border-radius: 50%;
  text-align: center;
}

/* Account status remains available at all supported widths. */
.toolbar-actions {
  flex-wrap: wrap;
}
.toolbar-actions .save-state {
  display: block;
  flex: 1 1 150px;
  white-space: normal;
  line-height: 1.5;
  font-size: 11px;
}
.saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}
.saved-card {
  min-width: 0;
}
.saved-card strong {
  overflow-wrap: anywhere;
}
.account-library-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Approved budget preview 2: group totals and actual costs. */
.cost-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 12px;
  margin-top: 8px;
  min-width: 0;
}
.cost-row > span {
  overflow-wrap: anywhere;
}
.cost-row .text-button {
  white-space: normal;
  text-align: left;
}
.cost-entries article {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cost-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  max-width: 100%;
}
.cost-field input,
.cost-field select {
  box-sizing: border-box;
  min-height: 44px;
  min-width: 0;
  width: 140px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: var(--white, #fff);
  color: var(--ink, #263a3a);
  font: inherit;
  font-size: 14px;
}
.cost-field input:focus,
.cost-field select:focus {
  outline: 2px solid var(--teal, #33766f);
  outline-offset: 2px;
}
.cost-row .cost-field {
  flex: 0 1 140px;
}
.cost-error {
  color: #9b302b;
  flex-basis: 100%;
  font-size: 12px;
}
.cost-entries summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.cost-entries form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.cost-row input[aria-invalid='true'] {
  border-color: #9b302b;
}
@media (max-width: 400px) {
  .cost-field input,
  .cost-field select {
    width: 120px;
  }
  .cost-row {
    gap: 8px;
  }
  .cost-row .cost-field {
    flex: 1 1 110px;
  }
}

/* Approved total concept, 29 Oct 2026: quiet connections and compact side budget. */
:root {
  --paper: #fdfcf9;
  --light: #f5f5ef;
  --green: #286e6c;
  --line: #e5e6df;
}
body {
  background: var(--paper);
}
.trip-banner {
  background: #f2f1e9;
  min-height: 250px;
}
.banner-picture {
  width: 42% !important;
}
.trip-banner-main {
  max-width: 56%;
}
.banner-quote {
  display: none;
}
.inline-leg {
  background: transparent;
  border-left: 1px solid #cddad5;
  border-radius: 0;
  padding: 6px 14px;
  margin: 8px 0 8px 24px;
}
.leg-heading {
  font-weight: 400;
}
.leg-heading > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.leg-symbol {
  width: 19px;
  height: 22px;
  flex-shrink: 0;
}
.inline-leg .button.small {
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.inline-leg .cost-row {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 0;
}
.inline-leg p {
  margin: 4px 0;
}
.yajomi-disclosure {
  border-top: 1px solid var(--line);
  width: 100%;
}
.yajomi-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
}
.yajomi-disclosure > summary::-webkit-details-marker {
  display: none;
}
.disclosure-chevron {
  margin-left: auto;
  font-size: 20px;
  transition: transform 0.15s;
}
.yajomi-disclosure[open] > summary .disclosure-chevron {
  transform: rotate(180deg);
}
.disclosure-icon {
  font-size: 18px;
}
.disclosure-content {
  padding: 8px 0 16px;
}
.yajomi-disclosure > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 6px;
}
.route-card {
  grid-template-columns: 24px 112px minmax(0, 1fr) auto;
}
.stop-thumb {
  width: 112px;
  height: 144px;
  object-fit: cover;
}
@media (max-width: 1000px) {
  .route-card {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }
  .route-card > .stop-thumb {
    display: block;
    grid-column: 2/-1;
    width: 100%;
    height: 160px;
    grid-row: 1;
  }
  .route-card > div:not(.card-actions) {
    grid-column: 2;
    grid-row: 2;
  }
  .route-card > .card-actions {
    grid-column: 3;
    grid-row: 2;
  }
}
@media (max-width: 760px) {
  .trip-banner {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .banner-picture {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 200px;
    order: 0;
    clip-path: none !important;
  }
  .trip-banner-main {
    max-width: 100%;
    padding: 22px;
    order: 1;
  }
  .banner-edit {
    background: #fffdf6;
  }
  .inline-leg {
    margin-left: 12px;
    padding: 6px 10px;
  }
  .map-column {
    display: flex;
    flex-direction: column;
  }
  #panel-route:not(.map-mode) .planner-grid > .map-column {
    display: flex !important;
  }
  #panel-route:not(.map-mode) .planner-grid > .map-column > .map-card,
  #panel-route:not(.map-mode) .planner-grid > .map-column > .data-note {
    display: none;
  }
  .planner-grid {
    display: flex;
    flex-direction: column;
  }
  .map-column {
    order: -1;
  }
  .route-column {
    order: 1;
  }
}

@media (max-width: 760px) {
  #panel-route.map-mode .map-column > .map-card {
    display: block;
  }
  #panel-route.map-mode .route-column {
    display: none;
  }
}

/* K41 original mockups supplied: hierarchy, restrained cards and full rollups. */
.cost-entries > .yajomi-disclosure {
  border: 1px solid #c6dcda;
  border-radius: 10px;
  padding: 0 12px;
  box-sizing: border-box;
}
.cost-entries > .yajomi-disclosure > summary {
  color: var(--green);
  gap: 9px;
}
.disclosure-meta {
  margin-left: auto;
  font-size: 11px !important;
  font-weight: 400;
  text-align: right;
  line-height: 1.4;
}
.disclosure-meta + .disclosure-chevron {
  margin-left: 0;
}
.disclosure-icon svg {
  width: 21px;
  height: 23px;
  display: block;
}
.cost-entries form h3 {
  font-size: 13px;
  flex-basis: 100%;
  margin: 12px 0 0;
}
.cost-entries form {
  padding-top: 8px;
}
.cost-entries article > strong {
  font-size: 14px;
}
.cost-entries article {
  padding: 12px 0;
}
.cost-entries article > details > summary {
  font-size: 11px;
  font-weight: 400;
  min-height: 36px;
}
.inline-leg > .yajomi-disclosure {
  border-top: 0;
  margin-top: 10px;
  background: #f6f8f6;
  border-radius: 8px;
  padding: 0 10px;
  box-sizing: border-box;
}
.inline-leg > .yajomi-disclosure {
  background: transparent;
  border-left: 0;
  padding-left: 0;
}
.yajomi-disclosure[data-disclosure^='cost-'] > summary {
  min-height: 44px;
  font-size: 12px;
}
.yajomi-disclosure[data-disclosure^='cost-'] > .disclosure-content {
  padding: 0 0 9px;
}
.yajomi-disclosure .cost-row {
  margin-top: 0;
  gap: 8px 16px;
}
.yajomi-disclosure .cost-row .cost-field {
  flex: 1 1 110px;
}
.inline-leg .yajomi-disclosure {
  margin-bottom: 0;
}
.station-expectation {
  margin-top: 18px;
  display: flow-root;
  max-width: 100%;
}
.station-expectation p {
  padding-top: 5px;
  line-height: 1.65;
}
@media (max-width: 500px) {
  .cost-entries > .yajomi-disclosure > summary {
    flex-wrap: wrap;
    position: relative;
    padding: 8px 22px 8px 0;
  }
  .cost-entries > .yajomi-disclosure > summary > .disclosure-meta {
    flex-basis: 100%;
    text-align: left;
    margin-left: 30px;
  }
  .cost-entries > .yajomi-disclosure > summary > .disclosure-chevron {
    position: absolute;
    right: 0;
    top: 12px;
  }
}

.trip-banner {
  position: relative;
  overflow: hidden;
  min-height: 235px;
  display: flex;
  align-items: flex-end;
}
.trip-banner .banner-picture {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  clip-path: none !important;
}
.trip-banner:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 30, 36, 0.78), rgba(5, 30, 36, 0.12));
  pointer-events: none;
}
.trip-banner .trip-banner-main {
  position: relative;
  z-index: 1;
  padding: 30px;
  max-width: 85%;
  order: 1;
}
.trip-banner h2 {
  color: #fff;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.2;
}
.trip-banner .eyebrow,
.trip-banner .trip-meta {
  color: #fff;
}
.trip-banner .live-dot {
  background: #a5ddd5;
}
.trip-banner .banner-edit {
  z-index: 2;
  background: #fffffff0;
  color: var(--green);
  border-radius: 8px;
}
.trip-banner .separator {
  color: #d3eeea;
}
@media (max-width: 760px) {
  .trip-banner {
    min-height: 250px;
    display: flex;
    flex-direction: row;
  }
  .trip-banner .trip-banner-main {
    padding: 22px;
    max-width: 100%;
  }
  .trip-banner:after {
    background: linear-gradient(0deg, rgba(5, 30, 36, 0.86), rgba(5, 30, 36, 0.15));
  }
  .trip-banner h2 {
    font-size: 27px;
  }
}
.route-card:has(.hotel-context) {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}
.route-card:has(.hotel-context) > .stop-thumb {
  display: none;
}
.route-card:has(.hotel-context) > div:not(.card-actions) {
  grid-column: 2;
  grid-row: 1;
}
.route-card:has(.hotel-context) > .card-actions {
  grid-column: 3;
  grid-row: 1;
}
/* YAJ-T13: inline proposal within the existing route, reference K44. */
.route-optimizer {
  padding: 20px;
  margin: 0 0 22px;
  border: 1px solid var(--line, #dce4df);
  border-radius: 16px;
  background: #fffefa;
  min-width: 0;
}
.route-optimizer h3 {
  margin: 0;
  font-size: 19px;
}
.route-optimizer h4 {
  margin: 18px 0 10px;
}
.route-optimizer p {
  line-height: 1.55;
}
.route-optimizer .section-heading {
  margin-bottom: 14px;
}
.route-optimizer .section-heading p {
  margin: 6px 0 0;
}
.optimizer-result:empty {
  display: none;
}
.optimizer-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.optimizer-comparison > div {
  min-width: 0;
}
.optimizer-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.optimizer-timeline li {
  display: flex;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid #e8ece8;
  overflow-wrap: anywhere;
}
.optimizer-number {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f3ef;
  color: #195c58;
  flex: 0 0 25px;
  height: 25px;
  font-size: 12px;
}
.optimizer-timeline li > div {
  min-width: 0;
}
.optimizer-timeline span:not(.optimizer-number),
.optimizer-timeline small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  color: #52665f;
}
.optimizer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.route-optimizer button {
  white-space: normal;
  max-width: 100%;
  min-height: 44px;
}
.route-optimizer summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
  min-height: 44px;
}
.route-optimizer details {
  margin-top: 10px;
  border-top: 1px solid #e3e9e3;
}
.optimizer-map {
  max-width: 380px;
  margin: auto;
}
.optimizer-map svg {
  display: block;
  width: 100%;
  height: auto;
}
.planning-binding {
  grid-column: 1/-1;
  border: 1px solid #dce4df;
  border-radius: 10px;
  padding: 14px;
  min-width: 0;
}
.planning-binding label {
  display: block;
  line-height: 1.5;
  margin: 8px 0;
}
.planning-binding input[type='checkbox'] {
  width: auto;
  display: inline-block;
  margin-right: 7px;
}
.binding-release {
  background: #fff4df;
  padding: 10px;
  border-radius: 7px;
}
@media (max-width: 600px) {
  .route-optimizer {
    padding: 14px;
  }
  .optimizer-comparison {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .optimizer-actions {
    flex-direction: column;
  }
  .optimizer-actions button {
    width: 100%;
  }
}
