:root {
    --ink: #15251d;
    --muted: #637068;
    --surface: #ffffff;
    --surface-soft: #f3f7f4;
    --border: #d7e2da;
    --accent: #147a4b;
    --accent-dark: #0d5c38;
    --accent-soft: #e6f5ec;
    --warning: #a45a13;
    --danger: #a33131;
    --shadow: 0 14px 38px rgba(27, 63, 43, 0.09);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #edf3ef;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(20, 122, 75, 0.25);
    outline-offset: 2px;
}

.checklist-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 24px;
}

.checklist-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
}

.eyebrow,
.card-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.025em;
}

h2 {
    margin-bottom: 8px;
    font-size: 19px;
}

.intro {
    max-width: 800px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

.back-link,
.progress-actions button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--ink);
    background: var(--surface);
    text-decoration: none;
    cursor: pointer;
}

.back-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.back-link:hover,
.progress-actions button:hover {
    border-color: #93a99a;
    background: #f9fbfa;
}

.strategy-card,
.progress-card {
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.strategy-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.5fr);
    gap: 20px;
}

.strategy-card ol {
    margin: 0;
    padding-left: 22px;
    color: #3c4d43;
    line-height: 1.65;
}

.progress-copy {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.progress-copy span {
    color: var(--muted);
}

.progress-copy strong {
    font-size: 24px;
}

.progress-track {
    height: 10px;
    margin: 10px 0 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe9e2;
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #4caf73);
    transition: width 180ms ease;
}

.progress-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.unfinished-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 9px;
    padding: 0 4px;
    cursor: pointer;
}

.unfinished-toggle input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.progress-actions .danger-button {
    color: var(--danger);
}

.save-status {
    min-height: 20px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.packing-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 0;
    background: rgba(237, 243, 239, 0.96);
    backdrop-filter: blur(8px);
}

.packing-tabs button {
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
}

.packing-tabs button span,
.packing-tabs button small {
    display: block;
}

.packing-tabs button span {
    font-weight: 700;
}

.packing-tabs button small {
    margin-top: 3px;
    color: var(--muted);
}

.packing-tabs button[aria-selected="true"] {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 8px 22px rgba(20, 122, 75, 0.2);
}

.packing-tabs button[aria-selected="true"] small {
    color: #dff5e8;
}

.checklist-panel {
    padding: 8px 0 20px;
}

.panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 8px 0 14px;
}

.panel-heading p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.55;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.check-section {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(27, 63, 43, 0.06);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
}

.section-heading h2 {
    margin: 0;
}

.section-heading span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
}

.check-items {
    margin: 0;
    padding: 6px 0;
    list-style: none;
}

.check-item {
    border-bottom: 1px solid #edf1ee;
}

.check-item:last-child {
    border-bottom: 0;
}

.check-item.is-hidden {
    display: none;
}

.check-label {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    align-items: start;
    gap: 10px;
    min-height: 50px;
    padding: 11px 16px;
    cursor: pointer;
}

.check-label:hover {
    background: #f8fbf9;
}

.check-label input {
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--accent);
}

.item-copy {
    min-width: 0;
}

.item-text {
    display: block;
    line-height: 1.45;
}

.item-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.check-item.is-complete .item-text {
    color: #7a8680;
    text-decoration: line-through;
}

.item-tag {
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 11px;
    white-space: nowrap;
}

.item-tag.optional {
    color: var(--warning);
    background: #fff3df;
}

.item-tag.action {
    color: #46546b;
    background: #eaf0f7;
}

.empty-message {
    grid-column: 1 / -1;
    padding: 40px 20px;
    border: 1px dashed #aabbb0;
    border-radius: 15px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.checklist-footer {
    padding: 18px 20px;
    border-radius: 15px;
    color: #405047;
    background: #dfece3;
    line-height: 1.6;
}

.checklist-footer p:last-child {
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .checklist-shell {
        padding: 14px;
    }

    .checklist-header,
    .strategy-card,
    .panel-heading {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .back-link {
        justify-content: center;
        width: 100%;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .checklist-shell {
        padding: 10px;
    }

    .packing-tabs {
        gap: 5px;
    }

    .packing-tabs button {
        min-height: 54px;
        padding: 7px 4px;
    }

    .packing-tabs button span {
        font-size: 14px;
    }

    .progress-actions,
    .progress-actions button,
    .unfinished-toggle {
        width: 100%;
    }

    .progress-actions button,
    .unfinished-toggle {
        justify-content: center;
    }

    .check-label {
        grid-template-columns: 24px 1fr;
    }

    .item-tag {
        grid-column: 2;
        justify-self: start;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .checklist-shell {
        width: 100%;
        padding: 0;
    }

    .back-link,
    .progress-actions,
    .packing-tabs,
    .save-status {
        display: none !important;
    }

    .checklist-panel[hidden] {
        display: block !important;
    }

    .check-item.is-hidden {
        display: list-item;
    }

    .check-section {
        break-inside: avoid;
        box-shadow: none;
    }
}
