body.portal-shell-page > .container {
  max-width: 880px;
  padding-bottom: 4.5rem;
}

.hidden {
  display: none !important;
}

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

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 40vh;
  color: var(--wingman-muted);
  font-size: 0.95rem;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 193, 7, 0.18);
  border-top-color: var(--wingman-gold);
  animation: travel-spin 0.8s linear infinite;
}

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

@keyframes travel-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.travel-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  animation: travel-fade-in 0.45s ease both;
}

/* —— Hero —— */
.travel-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.75rem;
  padding: 0.1rem 0.05rem 0;
}

.travel-eyebrow {
  margin: 0 0 0.5rem;
  color: rgba(255, 193, 7, 0.9);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.travel-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.9rem, 2.6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.travel-subtitle {
  margin: 0.65rem 0 0;
  max-width: 34rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.55;
}

.travel-hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.status-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-pill-accent {
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.28);
  color: var(--wingman-gold);
}

.status-pill.is-offline {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.status-pill.is-online::before,
.status-pill.is-offline::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.is-online::before {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}

.info-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 193, 7, 0.26);
  background: rgba(255, 193, 7, 0.08);
  color: var(--wingman-gold);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.info-button:hover {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.42);
}

.info-button:active {
  transform: translateY(1px);
}

/* —— Banners —— */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.banner.offline {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: var(--wingman-gold);
}

.banner.error {
  background: rgba(244, 67, 54, 0.12);
  border: 1px solid rgba(244, 67, 54, 0.35);
  color: #fca5a5;
}

.banner.success {
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(76, 175, 80, 0.35);
  color: #86efac;
}

/* —— Workspace card —— */
.travel-workspace {
  position: relative;
  overflow: hidden;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 38%, rgba(0, 0, 0, 0.18) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.travel-workspace::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.08);
  filter: blur(40px);
  pointer-events: none;
}

.travel-section {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.45rem;
}

.travel-section + .travel-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.14);
  border: 1px solid rgba(255, 193, 7, 0.28);
  color: var(--wingman-gold);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.section-hint {
  margin: 0.28rem 0 0;
  color: #94a3b8;
  font-size: 0.84rem;
  line-height: 1.45;
}

/* —— Bid period —— */
.period-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.period-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: #e2e8f0;
  border-radius: 1rem;
  padding: 1rem 1.05rem;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.period-chip:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.period-chip.active {
  border-color: rgba(255, 193, 7, 0.5);
  background: linear-gradient(160deg, rgba(255, 193, 7, 0.16), rgba(255, 193, 7, 0.05));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(255, 193, 7, 0.06),
    0 12px 28px rgba(255, 193, 7, 0.08);
}

.period-chip.active::after {
  content: "";
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--wingman-gold);
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.7);
}

.period-code {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.period-chip.active .period-code {
  color: var(--wingman-gold);
}

.period-range {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

/* —— Paste —— */
.section-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.toggle-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.toggle-chevron {
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.section-toggle:hover .toggle-chevron {
  background: rgba(255, 255, 255, 0.09);
}

.section-toggle[aria-expanded="true"] .toggle-chevron {
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.3);
  color: var(--wingman-gold);
}

.paste-body {
  margin-top: 1rem;
  animation: travel-fade-in 0.28s ease both;
}

#pasteInput {
  width: 100%;
  min-height: 190px;
  background: rgba(0, 0, 0, 0.38);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1rem 1.05rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#pasteInput::placeholder {
  color: #64748b;
}

#pasteInput:focus {
  outline: none;
  border-color: rgba(255, 193, 7, 0.48);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12);
}

#pasteInput:disabled {
  opacity: 0.55;
}

.actions {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border: 0;
  border-radius: 999px;
  padding: 0.74rem 1.15rem;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--wingman-gold);
  color: var(--wingman-brown);
  box-shadow: 0 10px 24px rgba(255, 193, 7, 0.18);
}

.btn-primary:hover:not(:disabled) {
  background: #ffd24a;
}

.btn-secondary,
.btn-clear {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover:not(:disabled),
.btn-clear:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-clear {
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
}

.preview-panel {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  background: rgba(0, 0, 0, 0.24);
}

.preview-summary {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #e2e8f0;
  font-weight: 600;
}

.preview-error {
  border-top: 1px solid rgba(248, 113, 113, 0.22);
  padding-top: 0.7rem;
  margin-top: 0.7rem;
  font-size: 0.84rem;
}

.preview-error-title {
  color: #fca5a5;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.preview-error-snippet {
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-word;
}

/* —— Saved —— */
.saved-shell {
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.2rem;
}

.panel-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.saved-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.panel-hint {
  margin: 0.3rem 0 0;
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.45;
}

.empty-state {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding: 2.1rem 1.2rem;
  border-radius: 1.05rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 193, 7, 0.09), transparent 58%),
    rgba(0, 0, 0, 0.16);
}

.empty-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.22);
  color: var(--wingman-gold);
}

.empty-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.empty-copy {
  margin: 0;
  max-width: 24rem;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.5;
}

.indexes-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
}

.index-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.12));
  transition: border-color 0.18s ease;
}

.index-card:hover {
  border-color: rgba(255, 193, 7, 0.28);
}

.index-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.index-amount {
  color: var(--wingman-gold);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.index-route {
  color: #ffffff;
  font-weight: 600;
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

.index-meta {
  color: #94a3b8;
  font-size: 0.82rem;
  margin-top: 0.28rem;
  line-height: 1.4;
  word-break: break-word;
}

.index-fare-over {
  color: #f87171;
  font-weight: 700;
}

.index-fare-under {
  color: #4ade80;
  font-weight: 700;
}

.index-fare-even {
  color: var(--wingman-gold);
  font-weight: 700;
}

.delete-btn {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.delete-btn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.5);
}

.delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* —— Modals —— */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  z-index: 110;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(53, 28, 21, 0.98), rgba(18, 10, 8, 0.98));
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: travel-fade-in 0.25s ease both;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.modal-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.help-copy {
  color: #cbd5e1;
  line-height: 1.55;
  font-size: 0.92rem;
  margin: 0 0 0.85rem;
}

.guide-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 193, 7, 0.28);
  border-radius: 0.95rem;
  overflow: hidden;
  background: #111827;
  cursor: zoom-in;
  transition: border-color 0.18s ease;
}

.guide-button:hover {
  border-color: rgba(255, 193, 7, 0.5);
}

.guide-button img {
  width: 100%;
  display: block;
}

.help-hint {
  margin: 0.7rem 0 0.85rem;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
}

.modal-done {
  width: 100%;
  margin-top: 0.25rem;
}

.image-card {
  width: min(980px, 100%);
  max-height: 94vh;
  background: rgba(5, 8, 14, 0.96);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.image-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.img-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.img-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.image-scroll {
  overflow: auto;
  max-height: calc(94vh - 50px);
  text-align: center;
}

#zoomableGuideImage {
  transform-origin: center top;
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  body.portal-shell-page > .container {
    padding-bottom: 4rem;
  }
}

@media (max-width: 720px) {
  .travel-hero {
    flex-direction: column;
  }

  .travel-hero-aside {
    width: 100%;
    align-items: stretch;
  }

  .status-pills {
    justify-content: flex-start;
  }

  .info-button {
    justify-content: center;
  }

  .period-row {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-clear {
    width: 100%;
  }

  .index-head {
    flex-direction: column;
  }

  .delete-btn {
    align-self: flex-start;
  }

  .travel-section,
  .saved-shell {
    padding-left: 1.05rem;
    padding-right: 1.05rem;
  }
}
