.history-entry-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 24px;
  padding: 4px;
  border: 1px solid #dce6eb;
  border-radius: 14px;
  background: #eef3f6;
}

.history-entry-switch button {
  display: flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.3;
  cursor: pointer;
}

.history-entry-switch button[aria-selected="true"] {
  color: #fff;
  background: #173f55;
  box-shadow: 0 5px 14px rgba(23, 63, 85, .2);
}

.history-entry-switch .ms {
  flex: 0 0 auto;
  font-size: 20px;
}

.history-entry-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: .2em;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: normal;
}

.history-entry-label > span {
  white-space: nowrap;
}

.history-access-root {
  --history-navy: #173f55;
  --history-ink: #172033;
  --history-muted: #5f6f80;
  --history-line: #dce6eb;
  --history-accent: #e85d24;
  color: #172033;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.history-access-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  text-align: left;
}

.history-access-heading .ms {
  display: grid;
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  margin: 0;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--history-accent);
  box-shadow: 0 8px 18px rgba(232, 93, 36, .18);
  font-size: 22px;
}

.history-access-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.3;
  letter-spacing: -.025em;
  word-break: keep-all;
  overflow-wrap: normal;
}

.history-access-heading p {
  grid-column: 2;
  max-width: 520px;
  margin: 4px 0 0;
  color: var(--history-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.history-access-status,
.history-access-error {
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.history-access-status {
  border: 1px solid #a7f3d0;
  color: #065f46;
  background: #ecfdf5;
}

.history-access-error {
  border: 1px solid #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.history-access-lookup {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--history-line);
  border-radius: 16px;
  background: #f7fafc;
}

.history-access-lookup h3 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.4;
}

.history-access-lookup > p {
  margin: 0 0 12px;
  color: var(--history-muted);
  font-size: 13px;
  line-height: 1.55;
}

.history-access-lookup-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.history-access-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.history-access-field > span {
  color: #405365;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.history-access-lookup input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #c8d4dc;
  border-radius: 11px;
  color: #172033;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.history-access-lookup input:focus {
  outline: 3px solid rgba(23, 63, 85, .16);
  border-color: var(--history-navy);
}

.history-access-button,
.history-offer-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 15px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #173f55;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
  cursor: pointer;
}

.history-access-lookup .history-access-button {
  width: 100%;
}

.history-entry-switch button:focus-visible,
.history-access-button:focus-visible,
.history-offer-link:focus-visible {
  outline: 3px solid rgba(232, 93, 36, .28);
  outline-offset: 2px;
}

.history-access-button[disabled],
.history-offer-link[aria-disabled="true"] {
  color: #94a3b8;
  background: #e2e8f0;
  cursor: default;
  pointer-events: none;
}

.history-access-button--primary {
  background: #e85d24;
}

.history-subscription {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #2e5b70;
  border-radius: 16px;
  color: #fff;
  background: var(--history-navy);
  box-shadow: 0 10px 24px rgba(23, 63, 85, .13);
}

.history-subscription > .ms {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 11px;
  color: #173f55;
  background: #f4c95d;
  font-size: 23px;
}

.history-subscription strong,
.history-subscription span {
  display: block;
}

.history-subscription strong {
  font-size: 15px;
  line-height: 1.4;
}

.history-subscription-copy span {
  margin-top: 3px;
  color: #d8e4ea;
  font-size: 13px;
  line-height: 1.5;
}

.history-subscription .history-offer-link {
  grid-column: 1 / -1;
  width: 100%;
  color: #172033;
  background: #f4c95d;
}

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

.history-experience-card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--history-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
}

.history-experience-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 55%;
}

.history-experience-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
}

.history-experience-label {
  margin-bottom: 5px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.history-experience-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.history-experience-card p {
  margin: 5px 0 12px;
  color: var(--history-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.history-experience-card .history-reservation-hint {
  margin: -3px 0 12px;
  padding: 8px 10px;
  border: 1px solid #bae6d4;
  border-radius: 9px;
  color: #166534;
  background: #f0fdf7;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
}

.history-experience-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.history-experience-actions .history-offer-link {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
}

.history-experience-actions .history-offer-link--single {
  color: #9a3412;
  border: 1px solid #fdba74;
  background: #fff7ed;
}

.history-subscription .history-offer-link[aria-disabled="true"],
.history-experience-actions .history-offer-link[aria-disabled="true"] {
  color: #64748b;
  border-color: #d9e2e8;
  background: #eef2f5;
  box-shadow: none;
}

.history-subscription.is-admin {
  border-color: #2d6d5d;
  background: #174f45;
}

.history-subscription.is-admin .history-offer-link[aria-disabled="true"] {
  color: #173f38;
  background: #f4c95d;
}

.history-access-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.history-access-guard {
  width: min(620px, calc(100% - 28px));
  margin: 32px auto 54px;
}

.history-access-guard .history-access-root {
  padding: 22px;
  border: 1px solid #d8e1e7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(17, 31, 48, .13);
}

.history-access-guard .history-experience-card {
  margin-top: 16px;
}

.history-access-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}

.history-member-gate-panel {
  margin-top: 4px;
}

.history-member-gate-panel .history-offer-link {
  width: 100%;
  margin-top: 2px;
}

@media (max-width: 620px) {
  .history-entry-switch button {
    min-height: 70px;
    flex-direction: column;
    gap: 5px;
    padding: 8px 6px 9px;
    font-size: 12px;
  }

  .history-entry-switch .ms {
    font-size: 18px;
    line-height: 1;
  }

  .history-entry-label {
    display: grid;
    width: 100%;
    gap: 1px;
    line-height: 1.25;
  }

  .history-access-guard {
    width: min(100% - 20px, 620px);
    margin-top: 18px;
  }

  .history-access-guard .history-access-root {
    padding: 17px;
  }
}

@media (max-width: 360px) {
  .history-entry-switch button {
    min-height: 68px;
    gap: 4px;
    padding-inline: 4px;
    font-size: 11.5px;
  }

  .history-entry-switch .ms {
    font-size: 17px;
  }

  .history-access-heading {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 10px;
  }

  .history-access-heading .ms {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .history-access-heading h2 {
    font-size: 20px;
  }
}
