:root {
    --ink: #18362d;
    --green: #3f735f;
    --green-dark: #285443;
    --cream: #f8f4eb;
    --sand: #e8dcc5;
    --white: #fff;
    --muted: #6e776f;
    --line: #dfe5df;
    --danger: #a6403b;
    --shadow: 0 18px 50px rgba(24, 54, 45, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #f7f8f5;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.app-header {
    position: relative;
    z-index: 10;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 20px rgba(24,54,45,.04);
}
.app-header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.app-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.app-brand img { width: 45px; height: 45px; object-fit: contain; }
.app-brand span { display: grid; line-height: 1.05; }
.app-brand strong { font-family: Georgia, serif; font-size: 20px; }
.app-brand small { color: var(--green); font-size: 12px; margin-top: 4px; }
.app-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 650; }
.app-nav a, .app-nav button { border: 0; background: none; text-decoration: none; color: var(--ink); padding: 0; }
.app-nav form { margin: 0; }
.app-nav .app-nav-cta { color: var(--white); background: var(--green); border-radius: 999px; padding: 11px 18px; }
.app-kicker {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.08; margin-top: 0; }
.app-hero { min-height: 650px; display: flex; align-items: center; overflow: hidden; background: linear-gradient(125deg, #f2ebdd 0 60%, #dce9e1 60%); }
.app-hero-grid { display: grid; grid-template-columns: 1.05fr .85fr; align-items: center; gap: 90px; padding-block: 70px; }
.app-hero h1 { max-width: 680px; margin-bottom: 22px; font-size: clamp(48px, 6.3vw, 80px); }
.app-lead { max-width: 650px; color: #52625b; font-size: 19px; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.app-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 22px;
    font-weight: 750;
    text-decoration: none;
    transition: .2s ease;
}
.app-button:hover { transform: translateY(-1px); }
.app-button-primary { color: var(--white); background: var(--green); }
.app-button-primary:hover { background: var(--green-dark); }
.app-button-light { background: var(--white); border-color: var(--line); }
.app-button-ghost { border-color: var(--line); background: transparent; }
.app-button-full { width: 100%; }
.app-hero-card { overflow: hidden; transform: rotate(2deg); background: var(--white); border-radius: 26px; box-shadow: var(--shadow); }
.app-hero-card > img { display: block; width: 100%; height: 260px; object-fit: cover; }
.app-hero-card-body { padding: 28px; }
.app-hero-card-body > span { display: block; color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.app-hero-card-body > strong { display: block; margin: 7px 0 18px; font-family: Georgia, serif; font-size: 25px; }
.app-hero-card ul { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; color: #59645f; }
.app-hero-card li { display: flex; align-items: center; gap: 9px; }
.app-hero-card i { width: 18px; height: 18px; border-radius: 50%; background: #dce9e1; box-shadow: inset 0 0 0 5px var(--white); border: 1px solid var(--green); }
.app-features { padding: 100px 0 120px; background: var(--white); }
.app-features h2 { max-width: 700px; font-size: clamp(36px, 5vw, 56px); }
.app-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 45px; }
.app-feature-grid article { padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fbfcfa; }
.app-feature-grid article > span { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.app-feature-grid h3 { margin: 38px 0 10px; font-size: 27px; }
.app-feature-grid p { margin: 0; color: var(--muted); }
.app-auth { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 70px 20px; background: radial-gradient(circle at 15% 15%, #e6eee8, transparent 34%), var(--cream); }
.app-auth-card { width: min(480px, 100%); padding: 44px; background: var(--white); border-radius: 24px; box-shadow: var(--shadow); }
.app-auth-card h1 { margin-bottom: 10px; font-size: 44px; }
.app-auth-card > p:not(.app-kicker) { color: var(--muted); }
.app-auth-switch { margin: 24px 0 0; text-align: center; font-size: 14px; }
.app-auth-switch a { color: var(--green); font-weight: 750; }
.app-form { display: grid; gap: 18px; }
.app-auth-card .app-form { margin-top: 30px; }
.app-form label { display: grid; gap: 7px; }
.app-form label > span { font-size: 13px; font-weight: 750; }
.app-form input, .app-form textarea, .quick-add input {
    width: 100%;
    border: 1px solid #cfd8d1;
    border-radius: 11px;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--white);
    outline: none;
}
.app-form input:focus, .app-form textarea:focus, .quick-add input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(63,115,95,.12); }
.app-form textarea { resize: vertical; }
.app-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.app-form .app-check { display: flex; align-items: center; gap: 9px; }
.app-check input { width: 17px; height: 17px; }
.app-check span { font-weight: 500 !important; }
.app-page { min-height: calc(100vh - 155px); width: min(1180px, calc(100% - 40px)); margin-inline: auto; padding: 70px 0 100px; }
.app-page-narrow { width: min(720px, calc(100% - 40px)); }
.app-page-heading { margin-bottom: 35px; }
.app-page-heading h1 { margin-bottom: 12px; font-size: clamp(42px, 6vw, 62px); }
.app-page-heading > p:last-child { color: var(--muted); }
.app-page-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.app-panel { padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 12px 40px rgba(24,54,45,.05); }
.app-notice { margin-top: 22px; padding: 13px 17px; border: 1px solid #b7d3c2; border-radius: 12px; background: #eaf4ed; }
.app-notice-warning { border-color: #e4c878; background: #fff6d9; }
.app-notice-error { border-color: #e2aaa6; background: #fff0ef; color: #8a302c; }
.trip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trip-card { overflow: hidden; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 20px; background: var(--white); transition: .22s ease; }
.trip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.trip-card-image { position: relative; height: 210px; }
.trip-card-image img { width: 100%; height: 100%; object-fit: cover; }
.trip-card-image > span { position: absolute; left: 16px; bottom: 14px; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 800; }
.trip-card-body { padding: 24px; }
.trip-card-body p { margin: 0 0 7px; color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.trip-card-body h2 { margin-bottom: 28px; font-size: 27px; }
.trip-card-body > span { color: var(--green); font-weight: 750; font-size: 14px; }
.app-empty { padding: 75px 25px; text-align: center; border: 1px dashed #bdc9c1; border-radius: 22px; background: var(--white); }
.app-empty img { width: 75px; height: 75px; object-fit: contain; opacity: .75; }
.app-empty h2 { margin: 18px 0 8px; font-size: 31px; }
.app-empty p { margin: 0 0 25px; color: var(--muted); }
.trip-detail { padding: 34px 0 100px; }
.trip-cover { position: relative; min-height: 350px; overflow: hidden; display: flex; align-items: end; padding: 42px; color: var(--white); border-radius: 24px; }
.trip-cover > img, .trip-cover-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.trip-cover > img { object-fit: cover; }
.trip-cover-overlay { background: linear-gradient(90deg, rgba(15,38,31,.88), rgba(15,38,31,.14)); }
.trip-cover-content { position: relative; z-index: 1; }
.trip-cover-content p { margin: 0 0 5px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.trip-cover-content h1 { max-width: 750px; margin: 0 0 12px; font-size: clamp(42px, 6vw, 68px); }
.trip-cover-content span { font-weight: 650; }
.trip-edit { position: absolute; z-index: 1; right: 24px; top: 24px; padding: 9px 15px; color: var(--ink); background: rgba(255,255,255,.92); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 750; }
.trip-notes { margin-top: 18px; padding: 19px 22px; color: #53635d; border-left: 4px solid var(--sand); background: var(--white); border-radius: 0 12px 12px 0; }
.planner-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 24px; align-items: start; margin-top: 24px; }
.planner-sidebar { display: grid; gap: 24px; }
.planner-section { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.planner-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.planner-heading h2 { margin: 0; font-size: 29px; }
.planner-heading > span { color: var(--muted); font-size: 12px; }
.day-block + .day-block { margin-top: 30px; }
.day-block > h3 { margin-bottom: 12px; color: var(--green); font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.timeline-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 15px; padding: 17px 0; border-top: 1px solid var(--line); }
.timeline-item time { color: var(--green); font-weight: 800; }
.timeline-item > div { display: grid; }
.timeline-item strong { font-size: 16px; }
.timeline-item span { color: var(--muted); font-size: 13px; }
.timeline-item p { margin: 8px 0 0; color: #52605b; font-size: 14px; }
.icon-delete { border: 0; padding: 0 4px; color: #9ca7a0; background: transparent; font-size: 22px; line-height: 1; }
.icon-delete:hover { color: var(--danger); }
.planner-empty { color: var(--muted); font-size: 14px; }
.add-box { margin-top: 22px; padding: 0 16px; border: 1px dashed #b9c8be; border-radius: 13px; background: #fbfcfa; }
.add-box summary { padding: 14px 0; color: var(--green); font-weight: 800; cursor: pointer; }
.add-box[open] summary { border-bottom: 1px solid var(--line); }
.app-form-compact { padding: 18px 0; gap: 13px; }
.app-form-compact .app-button { justify-self: start; min-height: 42px; padding: 8px 17px; font-size: 13px; }
.saved-list { display: grid; gap: 12px; }
.saved-list article { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.saved-list article > div { display: grid; }
.saved-list article span { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.saved-list article strong { font-size: 14px; }
.saved-list article strong a { text-decoration: none; }
.saved-list article p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.checklist { display: grid; gap: 9px; }
.check-row { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; }
.check-row form { margin: 0; }
.check-row form:first-child button { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; color: var(--white); border: 1px solid #b7c3bb; border-radius: 6px; background: var(--white); font-size: 12px; }
.check-row.is-done form:first-child button { border-color: var(--green); background: var(--green); }
.check-row.is-done > span { color: #98a29c; text-decoration: line-through; }
.quick-add { display: grid; grid-template-columns: 1fr 40px; gap: 8px; margin-top: 18px; }
.quick-add input { padding: 9px 11px; }
.quick-add button { border: 0; border-radius: 10px; color: var(--white); background: var(--green); font-size: 22px; }
.danger-link { width: 100%; border: 0; color: var(--danger); background: transparent; font-size: 13px; text-decoration: underline; }
.app-footer { padding: 27px 0; color: #d8e1dc; background: var(--ink); font-size: 13px; }
.app-footer .app-container { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 900px) {
    .app-hero-grid { grid-template-columns: 1fr; gap: 45px; }
    .app-hero-card { max-width: 560px; }
    .app-feature-grid, .trip-grid { grid-template-columns: 1fr 1fr; }
    .planner-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .app-container, .app-page, .app-page-narrow { width: min(100% - 28px, 1180px); }
    .app-header-inner { min-height: 68px; }
    .app-brand strong { font-size: 17px; }
    .app-brand img { width: 39px; height: 39px; }
    .app-nav { gap: 12px; }
    .app-nav > a:first-child { display: none; }
    .app-nav .app-nav-cta { padding: 9px 12px; }
    .app-hero { background: linear-gradient(160deg, #f2ebdd 0 72%, #dce9e1 72%); }
    .app-hero-grid { padding-block: 55px; }
    .app-hero h1 { font-size: 48px; }
    .app-feature-grid, .trip-grid { grid-template-columns: 1fr; }
    .app-feature-grid article { padding: 26px; }
    .app-auth-card { padding: 30px 22px; }
    .app-page { padding-top: 50px; }
    .app-page-heading-row { display: block; }
    .app-page-heading-row .app-button { margin-top: 16px; }
    .app-panel { padding: 22px; }
    .app-form-row { grid-template-columns: 1fr; }
    .trip-cover { min-height: 390px; padding: 28px 22px; }
    .trip-cover-overlay { background: linear-gradient(0deg, rgba(15,38,31,.9), rgba(15,38,31,.2)); }
    .trip-edit { right: 14px; top: 14px; }
    .planner-section { padding: 21px 18px; }
    .timeline-item { grid-template-columns: 48px 1fr auto; gap: 9px; }
    .app-footer .app-container { display: grid; }
}
