:root {
    color-scheme: dark;
    --bg: #0a0a0b;
    --panel: rgba(255, 255, 255, 0.035);
    --panel-strong: rgba(255, 255, 255, 0.06);
    --ink: rgba(255, 255, 255, 0.94);
    --ink-soft: rgba(255, 255, 255, 0.66);
    --muted: rgba(255, 255, 255, 0.36);
    --line: rgba(255, 255, 255, 0.1);
    --line-soft: rgba(255, 255, 255, 0.06);
    --amber: #f59e0b;
    --green: #10b981;
    --red: #ff6f6f;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 166, 35, 0.06), transparent 28%),
        var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-feature-settings: "ss01", "cv11";
}

button,
a {
    font: inherit;
}

.log-page {
    min-height: 100vh;
}

.log-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    align-items: center;
    height: 64px;
    padding: 0 28px;
    border-bottom: 0.5px solid var(--line-soft);
    background: rgba(15, 16, 18, 0.94);
    backdrop-filter: blur(16px);
}

.back-link,
.add-trip-link,
.share-button,
.secondary-button,
.primary-button {
    text-decoration: none;
}

.back-link {
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    font-weight: 680;
}

.title-block {
    text-align: center;
}

.title-block p,
.title-block h1,
.log-hero p,
.log-hero h2 {
    margin: 0;
}

.title-block p,
.eyebrow {
    color: rgba(255, 255, 255, 0.32);
    font-size: 10px;
    font-weight: 720;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.title-block h1 {
    margin-top: 3px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 760;
    line-height: 1;
}

.log-count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    text-align: right;
}

.log-hero,
.trips-shell {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
}

.log-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 34px 0 22px;
}

.log-hero h2 {
    max-width: 520px;
    margin-top: 8px;
    color: var(--ink);
    font-size: 32px;
    font-weight: 720;
    line-height: 1.08;
}

.hero-copy {
    max-width: 420px;
    margin-top: 10px !important;
    color: rgba(255, 255, 255, 0.42);
    font-size: 13px;
    font-weight: 560;
    line-height: 1.45;
}

.add-trip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 122px;
    height: 38px;
    padding: 0 15px;
    border: 1px solid rgba(245, 166, 35, 0.42);
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 720;
}

.trips-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.72fr);
    gap: 24px;
    align-items: start;
    padding-bottom: 54px;
}

.log-list,
.share-panel {
    min-width: 0;
}

.empty-state {
    display: grid;
    gap: 14px;
    padding: 34px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: var(--panel);
    color: var(--muted);
}

.empty-state strong {
    color: var(--ink);
    font-size: 18px;
}

.empty-state a {
    color: var(--amber);
    font-weight: 720;
    text-decoration: none;
}

.flight-card {
    position: relative;
    --delete-progress: 0;
    display: block;
    min-height: 132px;
    margin-bottom: 12px;
    padding: 0;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: var(--panel);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.trip-card-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr) 126px;
    gap: 18px;
    align-items: center;
    min-height: 130px;
    padding: 16px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.01)),
        #101113;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: pan-y;
    will-change: transform;
}

.trip-card-content.is-dragging {
    transition: none;
}

.flight-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.052);
}

.flight-card:focus-visible {
    outline: 2px solid rgba(245, 166, 35, 0.72);
    outline-offset: 3px;
}

.flight-card.is-selected {
    border-color: rgba(245, 158, 11, 0.5);
    background:
        linear-gradient(90deg, rgba(245, 158, 11, 0.055), transparent 58%),
        var(--panel);
}

.flight-card.is-delete-revealed .trip-card-content {
    transform: translateX(-92px);
}

.delete-trip-button {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 1;
    display: grid;
    width: 92px;
    place-items: center;
    border: 0;
    border-left: 1px solid rgba(255, 111, 111, 0.18);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255, 111, 111, 0.22), rgba(255, 111, 111, 0.12));
    color: rgba(255, 132, 132, 0.95);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: var(--delete-progress);
    text-transform: uppercase;
    transform: translateX(calc((1 - var(--delete-progress)) * 18px));
    transition: opacity 160ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.flight-card.is-delete-revealed .delete-trip-button {
    opacity: 1;
    transform: translateX(0);
}

.flight-card.is-swiping .delete-trip-button {
    transition: none;
}

.delete-trip-button:hover,
.delete-trip-button:focus {
    background: linear-gradient(180deg, rgba(255, 111, 111, 0.32), rgba(255, 111, 111, 0.18));
    color: #ffb2b2;
    outline: none;
}

.thumb-canvas {
    display: block;
    width: 136px;
    height: 96px;
    border-radius: 8px;
    background: #0b0c0e;
}

.flight-info {
    min-width: 0;
}

.flight-line,
.answer-line,
.landmark-line,
.trip-note,
.date-line {
    margin: 0;
}

.flight-line {
    color: var(--muted);
    font-size: 12px;
    font-weight: 680;
    letter-spacing: 0.04em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.answer-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--ink);
    font-size: 21px;
    font-weight: 760;
    line-height: 1.1;
}

.seat-diagram {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 2px;
}

.seat-diagram i {
    width: 7px;
    height: 9px;
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.04);
}

.seat-diagram.is-left i:first-child,
.seat-diagram.is-right i:last-child,
.seat-diagram.is-none i:nth-child(2) {
    border-color: var(--amber);
    background: var(--amber);
}

.landmark-line {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 13px;
    font-weight: 620;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trip-note {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 12px;
    font-weight: 540;
}

.trip-actions {
    display: grid;
    align-content: center;
    justify-items: stretch;
    gap: 8px;
    min-width: 118px;
}

.status-choice-group {
    display: grid;
    gap: 5px;
}

.status-choice {
    min-height: 28px;
    padding: 5px 9px;
    border: 0.5px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-choice.is-active {
    color: var(--ink);
}

.status-choice[data-status="saw_it"].is-active {
    border-color: rgba(49, 210, 153, 0.36);
    background: rgba(49, 210, 153, 0.1);
    color: var(--green);
}

.status-choice[data-status="missed"].is-active {
    border-color: rgba(255, 111, 111, 0.36);
    background: rgba(255, 111, 111, 0.1);
    color: var(--red);
}

.status-choice[data-status="cloudy"].is-active {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.68);
}

.status-caption {
    color: rgba(255, 255, 255, 0.26);
    font-size: 10px;
    font-weight: 650;
}

.row-buttons {
    display: grid;
    gap: 7px;
}

.secondary-button,
.share-button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    height: auto;
    padding: 7px 11px;
    border: 0.5px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.54);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.18;
    text-align: center;
}

.share-button.is-selected {
    border-color: rgba(245, 166, 35, 0.36);
    background: rgba(245, 166, 35, 0.1);
    color: rgba(255, 255, 255, 0.82);
}

.primary-button {
    border-color: rgba(245, 166, 35, 0.36);
    background: rgba(245, 166, 35, 0.12);
    color: rgba(255, 255, 255, 0.82);
}

.share-panel {
    position: sticky;
    top: 82px;
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.026)),
        rgba(255, 255, 255, 0.028);
}

.share-panel.is-empty {
    min-height: 260px;
    align-content: center;
    color: var(--muted);
}

.share-panel h2,
.share-panel p {
    margin: 0;
}

.share-panel h2 {
    color: var(--ink);
    font-size: 18px;
    font-weight: 760;
}

.share-panel p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.share-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.share-meta {
    color: rgba(148, 163, 184, 0.72) !important;
    font-family: var(--mono);
    font-size: 14px !important;
    letter-spacing: 0.05em;
    text-align: right;
    white-space: nowrap;
}

.share-card-copy {
    color: rgba(148, 163, 184, 0.7) !important;
    max-width: none;
    font-size: 17px !important;
    line-height: 1.45 !important;
}

.share-canvas {
    display: block;
    width: 100%;
    max-width: 390px;
    height: auto;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: #0f1012;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

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

.share-actions .primary-button {
    min-width: 138px;
}

.share-actions .secondary-button {
    min-width: 88px;
}

@media (max-width: 900px) {
    .log-header {
        grid-template-columns: 132px 1fr 88px;
        padding: 0 16px;
    }

    .log-hero,
    .trips-shell {
        width: min(100% - 28px, 680px);
    }

    .log-hero {
        align-items: start;
        flex-direction: column;
    }

    .trips-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .share-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .trip-card-content {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .thumb-canvas {
        width: 92px;
        height: 66px;
    }

    .trip-actions {
        grid-column: 1 / -1;
        justify-items: stretch;
    }

    .status-choice-group,
    .row-buttons {
        display: flex;
        justify-content: start;
        flex-wrap: wrap;
    }
}

.title-block p,
.eyebrow,
.share-eyebrow,
.back-link,
.add-trip-link,
.log-count,
.flight-line,
.trip-note,
.status-choice,
.secondary-button,
.share-button,
.primary-button {
    font-family: var(--mono);
}

.eyebrow {
    color: rgba(245, 158, 11, 0.8);
    letter-spacing: 0.18em;
}

.share-eyebrow {
    color: rgba(245, 158, 11, 0.78) !important;
    font-size: 13px !important;
    font-weight: 760;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.back-link,
.add-trip-link,
.secondary-button,
.share-button,
.primary-button {
    letter-spacing: 0.06em;
}

.add-trip-link,
.secondary-button,
.share-button,
.primary-button,
.flight-card,
.empty-state,
.share-panel,
.thumb-canvas,
.share-canvas {
    border-radius: 4px;
}

.add-trip-link,
.secondary-button,
.share-button,
.primary-button {
    text-transform: uppercase;
}

.title-block h1,
.log-hero h2,
.answer-line,
.share-panel h2 {
    letter-spacing: -0.025em;
}

.flight-card.is-selected {
    border-color: rgba(245, 158, 11, 0.5);
}

.share-panel {
    border-color: rgba(71, 85, 105, 0.46);
    padding: 26px;
    background: rgba(7, 9, 12, 0.72);
}

.share-canvas {
    max-width: 340px;
    background: #f5f1e8;
}

.share-panel h2 {
    font-size: 22px;
}

@media (max-width: 760px) {
    :root {
        --mobile-edge: clamp(16px, 4.4vw, 22px);
    }

    html,
    body {
        min-height: 100dvh;
    }

    body {
        background:
            radial-gradient(circle at 80% 0%, rgba(245, 166, 35, 0.055), transparent 30%),
            linear-gradient(180deg, rgba(15, 16, 18, 0.96), var(--bg) 32%);
        overflow-x: hidden;
    }

    .log-page {
        min-height: 100dvh;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    }

    .log-header {
        grid-template-columns: minmax(82px, 0.82fr) minmax(0, 1fr) minmax(56px, 0.58fr);
        height: calc(env(safe-area-inset-top, 0px) + 58px);
        padding:
            env(safe-area-inset-top, 0px)
            var(--mobile-edge)
            0;
        background: rgba(12, 13, 15, 0.82);
        backdrop-filter: blur(18px);
    }

    .back-link {
        overflow: hidden;
        color: rgba(255, 255, 255, 0.6);
        font-size: 0;
        white-space: nowrap;
    }

    .back-link::before {
        content: "< Window";
        font-size: 11px;
    }

    .title-block {
        min-width: 0;
    }

    .title-block p {
        display: none;
    }

    .title-block h1 {
        overflow: hidden;
        font-size: 18px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .log-count {
        overflow: hidden;
        font-size: 0;
        white-space: nowrap;
    }

    .log-count::after {
        font-size: 11px;
        content: "Trips";
    }

    .log-hero,
    .trips-shell {
        width: calc(100% - (var(--mobile-edge) * 2));
    }

    .log-hero {
        gap: 14px;
        padding: 28px 0 18px;
    }

    .eyebrow {
        font-size: 10px;
        letter-spacing: 0.16em;
    }

    .log-hero h2 {
        max-width: 330px;
        margin-top: 7px;
        font-size: clamp(28px, 9.6vw, 38px);
        line-height: 1.02;
    }

    .hero-copy {
        max-width: 320px;
        margin-top: 8px !important;
        font-size: 13px;
        line-height: 1.35;
    }

    .add-trip-link {
        height: 42px;
        min-width: 132px;
        border-radius: 14px;
        background: rgba(245, 166, 35, 0.14);
    }

    .trips-shell {
        gap: 16px;
        padding-bottom: 28px;
    }

    .flight-card,
    .empty-state,
    .share-panel {
        border-radius: 18px;
    }

    .flight-card {
        min-height: 0;
        margin-bottom: 14px;
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
    }

    .flight-card.is-selected {
        border-color: rgba(245, 158, 11, 0.62);
        box-shadow: inset 0 0 0 0.5px rgba(245, 158, 11, 0.2);
    }

    .trip-card-content {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 13px;
        min-height: 0;
        padding: 14px;
        border-radius: 17px;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
            #101113;
    }

    .thumb-canvas {
        width: 88px;
        height: 64px;
        border-radius: 10px;
    }

    .flight-line {
        font-size: 11px;
    }

    .answer-line {
        margin-top: 6px;
        font-size: 22px;
    }

    .landmark-line {
        margin-top: 6px;
        font-size: 12px;
    }

    .trip-note {
        margin-top: 4px;
        font-size: 11px;
    }

    .trip-actions {
        grid-column: 1 / -1;
        display: grid;
        gap: 10px;
        min-width: 0;
    }

    .status-choice-group {
        display: flex;
        gap: 7px;
        overflow-x: auto;
        padding-bottom: 1px;
        scrollbar-width: none;
    }

    .status-choice-group::-webkit-scrollbar {
        display: none;
    }

    .status-choice {
        min-height: 32px;
        flex: 0 0 auto;
        padding: 6px 13px;
        border-radius: 999px;
        font-size: 9px;
    }

    .row-buttons {
        display: flex;
    }

    .secondary-button,
    .share-button,
    .primary-button {
        min-height: 36px;
        border-radius: 12px;
    }

    .secondary-button {
        padding-inline: 14px;
    }

    .share-panel {
        gap: 12px;
        padding: 16px;
        border-color: rgba(71, 85, 105, 0.38);
        background: rgba(7, 9, 12, 0.68);
        box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(16px);
    }

    .share-card-header {
        align-items: center;
        gap: 10px;
    }

    .share-eyebrow {
        font-size: 11px !important;
        letter-spacing: 0.18em;
    }

    .share-meta {
        min-width: 0;
        overflow: hidden;
        font-size: 11px !important;
        text-overflow: ellipsis;
    }

    .share-card-copy {
        display: none;
    }

    .share-canvas {
        width: min(72vw, 260px);
        max-width: 260px;
        border-radius: 14px;
        box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
    }

    .share-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .share-actions .primary-button,
    .share-actions .secondary-button {
        min-width: 0;
        width: 100%;
    }
}
