.seat-map-wrap {
    position: relative;
    min-height: 410px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    background: linear-gradient(180deg, #ffffff, #f6f9fb);
    overflow: hidden;
}
.seat-map-wrap::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 2px solid #dfe8e1;
    border-radius: 30px 30px 18px 18px;
    pointer-events: none;
}
.seat-map {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    max-width: 860px;
    min-height: 240px;
    margin: 0 auto;
}
.layout.is-readonly-seat-map {
    grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
}
.layout.is-readonly-seat-map .filters {
    display: none;
}
.layout.is-readonly-seat-map .trip-list {
    min-height: 0;
}
.closed-seat-nav {
    display: grid;
    gap: 16px;
}
.return-location-picker {
    display: grid;
    gap: 16px;
}
.return-leg {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.return-leg-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(207,219,212,.85);
    padding-bottom: 8px;
}
.return-leg-head > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.return-leg-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
}
.return-leg-head strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 950;
    line-height: 1.15;
}
.return-location-options {
    display: grid;
    gap: 9px;
}
.return-location-option {
    width: 100%;
    min-height: 104px;
    border: 1px solid rgba(207,219,212,.95);
    border-radius: 15px;
    padding: 12px;
    background: linear-gradient(180deg, #fff, #f8faf9);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.return-location-option:hover,
.return-location-option.active {
    border-color: rgba(33,95,143,.42);
    box-shadow: 0 12px 24px rgba(33,95,143,.12);
    transform: translateY(-1px);
}
.return-location-option.active {
    background: linear-gradient(135deg, #e0f2fe, #fff 64%);
}
.return-option-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.trip-card-badges {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}
.selected-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    border-radius: 999px;
    padding: 3px 7px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}
.return-location-option strong,
.return-location-option span,
.return-location-option em,
.return-location-option b {
    display: block;
}
.return-location-option strong {
    min-width: 0;
    font-size: 16px;
    font-weight: 950;
    line-height: 1.15;
}
.return-trip-price {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 8px;
    color: #0c4a6e;
    background: #e0f2fe;
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}
.return-location-option span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}
.return-location-option em {
    margin-top: 7px;
    color: var(--blue);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}
.return-location-option b {
    width: fit-content;
    margin-top: 8px;
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 10px;
    font-weight: 950;
}
.return-location-option b.loading {
    background: #eef3ef;
    color: var(--muted);
}
.return-location-option b.soldout {
    background: var(--red-soft);
    color: var(--red);
}
.return-location-empty {
    border: 1px dashed rgba(207,219,212,.95);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}
.return-location-empty strong,
.return-location-empty span {
    display: block;
}
.return-location-empty strong {
    font-size: 14px;
    font-weight: 950;
}
.return-location-empty span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.return-cost-summary {
    display: grid;
    gap: 6px;
    max-width: 390px;
    margin-top: 12px;
    border: 1px solid rgba(207,219,212,.92);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
}
.return-cost-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.return-cost-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.return-cost-summary strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
}
.return-cost-summary .total {
    border-top: 1px solid rgba(207,219,212,.92);
    padding-top: 7px;
}
.return-cost-summary .total span,
.return-cost-summary .total strong {
    color: var(--green);
}
.closed-trip-choice {
    display: grid;
    gap: 10px;
}
.closed-trip-option {
    position: relative;
    width: 100%;
    min-height: 96px;
    border: 1px solid rgba(207,219,212,.95);
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, #fff, #f8faf9);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.closed-trip-option:hover,
.closed-trip-option.active {
    border-color: rgba(33,95,143,.42);
    box-shadow: 0 14px 28px rgba(33,95,143,.12);
    transform: translateY(-1px);
}
.closed-trip-option.active {
    background: linear-gradient(135deg, #e0f2fe, #fff 64%);
}
.closed-trip-option:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
    transform: none;
}
.closed-trip-option strong,
.closed-trip-option span,
.closed-trip-option b {
    display: block;
}
.closed-trip-option strong {
    font-size: 17px;
    font-weight: 950;
    line-height: 1.12;
}
.closed-trip-option span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}
.closed-trip-option b {
    width: fit-content;
    margin-top: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    background: #eef3ef;
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
}
.closed-trip-option.active b {
    background: #dbeafe;
    color: var(--blue);
}
.closed-location-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: stretch;
}
.closed-location-tab {
    position: relative;
    flex: 1 1 145px;
    min-width: 0;
    min-height: 86px;
    border: 1px solid rgba(207,219,212,.95);
    border-radius: 15px;
    padding: 11px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.closed-location-tab:hover,
.closed-location-tab.active {
    border-color: rgba(33,95,143,.38);
    box-shadow: 0 12px 24px rgba(33,95,143,.10);
    transform: translateY(-1px);
}
.closed-location-tab.active {
    background: linear-gradient(135deg, #e0f2fe, #fff 64%);
}
.closed-location-tab span,
.closed-location-tab small,
.closed-location-tab b {
    display: block;
}
.closed-location-tab span {
    font-size: 14px;
    font-weight: 950;
    line-height: 1.12;
}
.closed-location-tab small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
}
.closed-location-tab b {
    width: fit-content;
    margin-top: 8px;
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef3ef;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
}
.closed-location-tab b.soldout {
    background: var(--red-soft);
    color: var(--red);
}
.closed-location-empty,
.closed-seat-empty {
    display: grid;
    place-items: center;
    min-height: 190px;
    border: 1px dashed rgba(207,219,212,.95);
    border-radius: 16px;
    padding: 22px;
    background: linear-gradient(180deg, #fff, #f8faf9);
    text-align: center;
}
.closed-location-empty strong,
.closed-seat-empty strong {
    font-size: 17px;
    font-weight: 950;
}
.closed-location-empty span,
.closed-seat-empty span {
    max-width: 330px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}
.layout.is-readonly-seat-map .seat-section {
    border-color: rgba(180,35,24,.14);
    background:
        linear-gradient(135deg, rgba(253,232,229,.68), transparent 36%),
        rgba(255,255,255,.90);
}
.layout.is-readonly-seat-map .seat-section-head em {
    color: var(--red);
}
.seat-section {
    display: grid;
    gap: 12px;
    min-width: 0;
    border: 1px solid rgba(219,229,223,.9);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255,255,255,.84);
}
.seat-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.seat-section-head strong, .seat-section-head span, .seat-section-head em {
    display: block;
}
.seat-section-head strong { font-size: 15px; }
.seat-section-head span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.seat-section-head em {
    flex: none;
    color: var(--green);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}
.seat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(48px,1fr));
    gap: 12px;
    width: min(100%,390px);
    margin: 0 auto;
}
.seat-grid-standalone {
    grid-column: 1 / -1;
}
.seat-placeholder {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(48px,1fr));
    gap: 12px;
    width: 100%;
}
.seat-placeholder span, .seat {
    aspect-ratio: 1 / .86;
    border-radius: 14px 14px 18px 18px;
}
.seat-placeholder span {
    border: 1px solid rgba(19,115,77,.12);
    background: linear-gradient(180deg, rgba(231,245,237,.95), rgba(247,251,248,.95));
    box-shadow: inset 0 -4px 0 rgba(19,115,77,.05);
}
.seat-placeholder span:nth-child(3n) {
    background: linear-gradient(180deg, rgba(231,241,248,.95), rgba(247,251,248,.95));
}
.seat {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    padding: 6px;
    border: 1px solid transparent;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.05);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.seat-no { line-height: 1; }
.seat.available { background: var(--green-soft); color: var(--green); border-color: rgba(19,115,77,.24); }
.seat.available:hover { background: #d6f0e0; transform: translateY(-1px); box-shadow: inset 0 -4px 0 rgba(0,0,0,.05), 0 8px 18px rgba(19,115,77,.12); }
.seat.readonly {
    cursor: default;
}
.seat.available.readonly:hover {
    background: var(--green-soft);
    transform: none;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.05);
}
.seat.held {
    border-color: #f4bf45;
    background: #ffd666;
    color: #6d4300;
}
.seat.sold {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
    cursor: not-allowed;
}
.seat.sold[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    z-index: 5;
    width: max-content;
    max-width: 190px;
    transform: translateX(-50%) translateY(4px);
    border-radius: 10px;
    padding: 7px 9px;
    background: #15211b;
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    white-space: normal;
    box-shadow: 0 12px 26px rgba(21,33,27,.18);
    transition: opacity .14s ease, transform .14s ease;
}
.seat.sold[data-tooltip]:hover::after,
.seat.sold[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.seat.selected {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}
.checkout-panel {
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
}
.checkout-head {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: stretch;
    gap: 12px;
    border-bottom: 1px solid rgba(219,229,223,.9);
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(19,115,77,.10), transparent 42%),
        linear-gradient(180deg, #fbfdfb, #f5faf7);
}
.selected-seat-block,
.countdown-block {
    min-width: 0;
}
.selected-seat-block span,
.countdown-block span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
}
.selected-seat-block strong {
    display: block;
    max-width: 100%;
    margin-top: 6px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 950;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.countdown-block {
    display: grid;
    justify-items: end;
    align-content: center;
    gap: 6px;
}
.countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    min-height: 38px;
    border: 1px solid rgba(160,90,0,.16);
    border-radius: 12px;
    padding: 8px 12px;
    background: var(--amber-soft);
    color: var(--amber);
    text-align: center;
    font-size: 16px;
    font-weight: 950;
}
.form-section-title {
    margin: 16px 16px 10px;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 950;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
    padding: 0 16px 16px;
}
.form-grid label {
    min-width: 0;
}
.form-grid input,
.form-grid select {
    height: 50px;
    border-radius: 13px;
    background: #fff;
}
.wide { grid-column: 1 / -1; }
.donation-panel {
    display: grid;
    gap: 12px;
    margin: 0 16px 16px;
    border: 1px solid rgba(219,229,223,.95);
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(180deg, #fbfdfb, #f4faf6);
}
.donation-panel legend {
    padding: 0 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
}
.donation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.donation-options label {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px 10px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.donation-options label:has(input:checked) {
    border-color: rgba(19,115,77,.34);
    background: var(--green-soft);
    box-shadow: 0 8px 18px rgba(19,115,77,.08);
}
.donation-options input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--green);
}
.donation-custom-option { border-radius: 14px; }
.donation-custom-option input[type="number"] {
    width: 112px;
    height: 32px;
    margin-left: 4px;
    border-radius: 10px;
    padding: 6px 8px;
}
.donation-custom-option input[type="number"]:disabled {
    background: #eef2ef;
    color: var(--muted);
}
.payment-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(19,115,77,.16);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #f8fcfa);
    padding-top: 10px;
    padding: 13px 14px;
}
.payment-total span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}
.payment-total strong {
    color: var(--green-dark);
    font-size: 22px;
    font-weight: 950;
}
.checkout-actions {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(180px,240px);
    align-items: end;
    gap: 14px;
    border-top: 1px solid rgba(219,229,223,.9);
    padding: 16px;
    background: #fbfdfb;
}
.terms-gate {
    display: grid;
    gap: 8px;
    margin-top: 0;
}
.terms-gate .button {
    width: fit-content;
    margin-top: 0;
}
.terms-gate span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.terms-gate span.accepted {
    color: var(--green);
}
.checkout-actions #payButton {
    width: 100%;
    min-height: 50px;
    margin-top: 0;
}
.checkout-panel .form-note {
    margin: 0;
    padding: 0 16px 16px;
    font-size: 12px;
    font-weight: 800;
}
.modal-open { overflow: hidden; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(12, 22, 18, .58);
}
.modal-backdrop[hidden] { display: none; }
.terms-modal {
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    border: 1px solid rgba(255,255,255,.48);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(12,22,18,.24);
    overflow: hidden;
}
.terms-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 18px;
}
.terms-modal-head .section-kicker {
    margin-bottom: 5px;
}
.terms-modal-head h2 {
    margin: 0;
}
.icon-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}
.terms-content {
    min-height: 0;
    overflow: auto;
    padding: 16px 18px;
}
.terms-content ol {
    margin: 0;
    padding-left: 22px;
}
.terms-content li {
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
}
.terms-check {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding: 14px 18px;
    background: #f8fbf8;
    font-size: 14px;
    font-weight: 900;
}
.terms-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}
.terms-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding: 14px 18px;
}
.terms-actions .button {
    margin-top: 0;
}
.field-error {
    min-height: 16px;
    color: var(--red);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 14px;
    border: 0;
    border-radius: 13px;
    padding: 10px 16px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}
.button.primary {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    box-shadow: 0 12px 24px rgba(19,115,77,.22);
}
.button.secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.button:disabled { cursor: wait; opacity: .68; }
.button:disabled#payButton,
.terms-actions .button:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
}

@media (max-width: 560px) {
    .return-leg-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
