:root {
    --amber: #ffc400;
    --amber-dark: #e3aa00;
    --ink: #172033;
    --muted: #667085;
    --line: #d9dfe8;
    --soft: #f5f7fa;
    --surface: #fff;
    --danger: #b42318;
    --shadow: 0 18px 48px rgba(23, 32, 51, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 196, 0, 0.13), transparent 28rem),
        #f4f6f8;
    color: var(--ink);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.5;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-header {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 13px max(20px, calc((100vw - 1240px) / 2));
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: flex;
    gap: 11px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: var(--amber);
    border-radius: 11px;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 14px;
}

.brand small {
    color: var(--muted);
    font-size: 10px;
}

.help-link {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.page-shell {
    margin: 0 auto;
    max-width: 1288px;
    padding: 50px 24px 70px;
}

.hero {
    max-width: 750px;
    padding-bottom: 32px;
}

.eyebrow {
    color: #846200;
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    margin-bottom: 7px;
}

.hero h1 {
    font-size: clamp(20px, 3vw, 32px);
    letter-spacing: -0.045em;
    line-height: 1.07;
    margin: 0 0 16px;
}

.hero p {
    color: var(--muted);
    font-size: 16px;
    margin: 0;
}

.builder-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
}

.builder-panel,
.summary-panel,
.travel-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 19px;
    box-shadow: var(--shadow);
}

.builder-panel {
    overflow: visible;
}

.panel-heading {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 24px 27px;
}

.panel-heading h2,
.travel-panel h2,
.summary-panel h2 {
    font-size: 20px;
    letter-spacing: -0.025em;
    margin: 0;
}

.panel-heading p {
    color: var(--muted);
    font-size: 12px;
    margin: 3px 0 0;
}

.day-count {
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    white-space: nowrap;
}

.maps-notice {
    background: #fff8dc;
    border-bottom: 1px solid #f1d36d;
    color: #694f00;
    font-size: 12px;
    padding: 11px 27px;
}

.maps-notice[hidden] {
    display: none;
}

#itinerary-form {
    padding: 21px;
}

.day-card {
    background: #fbfcfd;
    border: 1px solid var(--line);
    border-radius: 15px;
    margin-bottom: 17px;
    overflow: visible;
    padding: 23px;
}

.day-header {
    align-items: center;
    border-bottom: 1px solid #e7ebf0;
    display: flex;
    justify-content: space-between;
    margin-bottom: 21px;
    padding-bottom: 16px;
}

.day-title-group {
    align-items: center;
    display: flex;
    gap: 11px;
}

.day-number {
    align-items: center;
    background: var(--amber);
    border-radius: 10px;
    display: flex;
    font-size: 14px;
    font-weight: 800;
    height: 39px;
    justify-content: center;
    width: 39px;
}

.day-date {
    font-size: 14px;
    font-weight: 700;
    min-height: 38px;
    padding: 7px 10px;
    width: 175px;
}

.day-title-group p {
    color: var(--muted);
    font-size: 11px;
    margin: 2px 0 0;
}

.remove-day,
.add-activity,
.remove-activity {
    cursor: pointer;
}

.remove-day {
    background: #fff;
    border: 1px solid #f1a5a0;
    border-radius: 9px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 800;
    min-height: 42px;
    padding: 9px 14px;
}

.remove-day:hover {
    background: #fff1f0;
    border-color: var(--danger);
}

.route-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: minmax(0, 1fr) 155px;
}

.field-group {
    margin-bottom: 19px;
}

.field-group label {
    color: #344054;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px;
}

.field-group label span {
    color: #98a2b3;
    font-weight: 500;
}

input,
textarea,
.manual-location {
    background: #fff;
    border: 1px solid #cbd3de;
    border-radius: 9px;
    color: var(--ink);
    min-height: 44px;
    outline: none;
    padding: 11px 12px;
    width: 100%;
}

input:focus,
textarea:focus,
.manual-location:focus {
    border-color: #d4a200;
    box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.18);
}

textarea {
    resize: vertical;
}

.place-field {
    min-height: 44px;
}

gmp-place-autocomplete {
    color-scheme: light;
    display: block;
    width: 100%;
}

.add-activity {
    background: #fff8dc;
    border: 1px solid #dfb620;
    border-radius: 9px;
    color: #725600;
    font-size: 21px;
    font-weight: 800;
    min-height: 44px;
    padding: 0;
    width: 44px;
}

.add-activity:hover {
    background: #ffefad;
}

.activity-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 27px minmax(0, 1fr) auto auto;
    margin-bottom: 8px;
}

.activity-number {
    align-items: center;
    background: #eef1f5;
    border-radius: 50%;
    color: #667085;
    display: flex;
    font-size: 10px;
    font-weight: 800;
    height: 25px;
    justify-content: center;
    width: 25px;
}

.remove-activity {
    align-items: center;
    background: #fff;
    border: 1px solid #f1a5a0;
    border-radius: 9px;
    color: var(--danger);
    display: flex;
    font-size: 22px;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 44px;
}

.remove-activity:hover {
    background: #fff1f0;
    border-color: var(--danger);
}

.notes-group {
    margin-bottom: 0;
}

.add-day-button {
    background: #fff8dc;
    border: 1px dashed #d2a500;
    border-radius: 11px;
    color: #6b5100;
    cursor: pointer;
    font-weight: 800;
    padding: 13px;
    width: 100%;
}

.add-day-button:hover {
    background: #fff1b9;
}

.sidebar-stack {
    display: grid;
    gap: 24px;
    position: sticky;
    top: 85px;
}

.travel-panel,
.summary-panel {
    padding: 24px;
}

.travel-panel h2 { margin: 0 0 16px; }
.travel-field { margin-bottom: 13px; }
.travel-field label {
    color: #344054;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}
.name-fields {
    display: grid;
    gap: 7px;
    grid-template-columns: 58px minmax(0, 1fr);
}
.name-fields select,
.travel-panel input,
.travel-panel textarea {
    min-height: 40px;
    padding: 9px 10px;
}
.name-fields select {
    background: #fff;
    border: 1px solid #cbd3de;
    border-radius: 9px;
    color: var(--ink);
    outline: none;
    width: 100%;
}
.travel-contact-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 76px;
}
.phone-field {
    width: 100%;
}
.phone-field .iti { width: 100%; }
.phone-field input { border-radius: 9px; }
.iti__country-list { max-width: 310px; }
.travel-notes { margin-bottom: 0; }

.summary-panel > h2 {
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    padding-bottom: 17px;
}

.empty-summary {
    align-items: center;
    background: var(--soft);
    border-radius: 12px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 165px;
    padding: 24px;
    text-align: center;
}

.empty-summary[hidden] {
    display: none;
}

.empty-summary > span {
    color: #bf9000;
    font-size: 34px;
}

.empty-summary p {
    font-size: 12px;
    margin: 7px 0 0;
    max-width: 240px;
}

.summary-day {
    border-left: 2px solid var(--amber);
    margin-bottom: 19px;
    padding-left: 14px;
}

.summary-day h3 {
    font-size: 13px;
    margin: 0 0 9px;
}

.summary-row {
    display: grid;
    font-size: 11px;
    gap: 7px;
    grid-template-columns: 58px minmax(0, 1fr);
    margin-bottom: 6px;
}

.summary-row strong {
    color: var(--muted);
}

.summary-row span {
    overflow-wrap: anywhere;
}

.summary-actions {
    display: grid;
    gap: 8px;
    margin-top: 21px;
}

.primary-button,
.secondary-button {
    border-radius: 9px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    padding: 12px;
}

.primary-button {
    background: var(--amber);
    border: 1px solid var(--amber);
    color: #111827;
}

.primary-button:hover {
    background: var(--amber-dark);
}

.secondary-button {
    background: #fff;
    border: 1px solid #cbd3de;
    color: var(--ink);
}

.privacy-note {
    color: #98a2b3;
    font-size: 9px;
    margin: 11px 0 0;
    text-align: center;
}

.success-dialog {
    width: min(420px, calc(100% - 30px));
    padding: 30px;
    border: 0;
    border-radius: 16px;
    color: var(--ink);
    text-align: center;
    box-shadow: 0 24px 70px rgba(23, 32, 51, 0.28);
}

.success-dialog::backdrop {
    background: rgba(23, 32, 51, 0.62);
}

.success-dialog .success-icon {
    align-items: center;
    background: #e7f7ee;
    border-radius: 50%;
    color: #168657;
    display: flex;
    font-size: 26px;
    font-weight: 800;
    height: 58px;
    justify-content: center;
    margin: 0 auto 16px;
    width: 58px;
}

.validation-dialog .validation-icon {
    align-items: center;
    background: #fff4dc;
    border-radius: 50%;
    color: #9a6700;
    display: flex;
    font-size: 28px;
    font-weight: 800;
    height: 58px;
    justify-content: center;
    margin: 0 auto 16px;
    width: 58px;
}

.success-dialog h2 {
    font-size: 22px;
    margin: 0 0 9px;
}

.success-dialog p {
    color: var(--muted);
    margin: 0 0 22px;
}

.success-dialog .primary-button {
    min-width: 110px;
}

footer {
    align-items: center;
    background: #20242c;
    color: #d0d5dd;
    display: flex;
    font-size: 11px;
    justify-content: space-between;
    padding: 21px max(20px, calc((100vw - 1240px) / 2));
}

footer a {
    color: var(--amber);
}

@media (max-width: 900px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-stack {
        position: static;
    }
}

@media (max-width: 620px) {
    .site-header {
        padding: 10px 14px;
    }

    .brand small {
        display: none;
    }

    .page-shell {
        padding: 34px 13px 48px;
    }

    .hero h1 {
        font-size: 21px;
    }

    .hero p {
        font-size: 14px;
    }

    .panel-heading,
    .travel-panel,
    .summary-panel {
        padding: 19px;
    }

    #itinerary-form {
        padding: 13px;
    }

    .day-card {
        padding: 17px 14px;
    }

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

    .activity-row {
        grid-template-columns: 27px minmax(0, 1fr) auto;
    }

    .activity-row .add-activity {
        grid-column: 2 / 3;
    }

    .activity-row .remove-activity {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
    }

    .day-title-group p {
        display: none;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}
