.app-shell {
    flex: 1;
    width: 100%;
}

.planner-layout {
    width: min(100%, 1540px);
    min-height: calc(100vh - 132px);
    margin: 0 auto;
    padding: 18px;
    display: grid;
    grid-template-columns: 340px minmax(440px, 1fr) 420px;
    gap: 14px;
    align-items: start;
}

.create-trip-layout {
    width: min(100%, 900px);
    margin: 0 auto;
    padding: 24px 18px;
}

.create-only-panel {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 24px;
}

.create-only-panel .section-heading h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
}

.create-only-panel .section-heading h1::after {
    content: "";
    display: block;
    width: 38px;
    height: 3px;
    margin-top: 9px;
    background: var(--amber);
}

.create-only-panel .mode-tabs {
    max-width: 560px;
    margin: 18px auto;
}

.create-only-panel .mode-panel > .primary-action {
    display: flex;
    width: min(100%, 340px);
    margin: 20px auto 0;
}

.planner-editor-layout {
    width: min(100%, 1440px);
    grid-template-columns: minmax(0, 1fr) 420px;
}

.planner-editor-layout .itinerary-panel {
    min-height: 720px;
}

.panel-topline .section-heading h1 {
    margin: 0;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.25;
}

.panel-topline .section-heading h1::after {
    content: "";
    display: block;
    width: 38px;
    height: 3px;
    margin-top: 9px;
    background: var(--amber);
}

.setup-panel,
.itinerary-panel,
.preview-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.setup-panel,
.itinerary-panel,
.preview-panel,
.community-panel {
    background-image: none;
}

.setup-panel {
    border-top: 4px solid var(--red);
}

.itinerary-panel {
    border-top: 4px solid var(--green);
}

.preview-panel {
    border-top: 4px solid var(--blue);
}

.setup-panel,
.preview-panel {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.setup-panel {
    padding: 18px;
}

.itinerary-panel,
.preview-panel {
    padding: 18px;
}

.section-heading {
    min-width: 0;
}

.section-heading h2 {
    font-size: 22px;
    line-height: 1.25;
    margin: 0;
}

.section-heading h2::after {
    content: "";
    display: block;
    width: 38px;
    height: 3px;
    margin-top: 9px;
    background: var(--amber);
}

.eyebrow {
    color: var(--stamp);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 18px 0;
}

.mode-tab,
.tool-button,
.primary-action,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}

.mode-tab svg,
.tool-button svg,
.primary-action svg,
.icon-button svg,
[data-lucide] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

[data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

[data-lucide]::before {
    content: ".";
}

[data-lucide="sparkles"]::before,
[data-lucide="wand-sparkles"]::before {
    content: "*";
}

[data-lucide="upload"]::before {
    content: "^";
}

[data-lucide="file-input"]::before,
[data-lucide="route"]::before {
    content: ">";
}

[data-lucide="plus"]::before {
    content: "+";
}

[data-lucide="save"]::before,
[data-lucide="file-down"]::before {
    content: "v";
}

[data-lucide="trash-2"]::before,
[data-lucide="x"]::before {
    content: "x";
}

[data-lucide="refresh-cw"]::before {
    content: "~";
}

[data-lucide="arrow-up"]::before {
    content: "^";
}

[data-lucide="arrow-down"]::before {
    content: "v";
}

[data-lucide="map"]::before {
    content: "#";
}

.mode-tab {
    background: #fff;
    color: var(--muted);
    border: 1px solid #ead9c9;
    padding: 10px 12px;
    font-weight: 800;
}

.mode-tab.is-active {
    background: var(--peach);
    border-color: #f0b56f;
    color: #7a3e22;
}

.mode-tab:hover,
.tool-button:hover,
.primary-action:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.mode-panel {
    display: none;
}

.mode-panel.is-active {
    display: block;
}

.pending-place-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
    padding: 13px 14px;
    border-left: 4px solid var(--green);
    background: #f1faf5;
}

.pending-place-notice > div {
    min-width: 0;
}

.pending-place-notice span,
.pending-place-notice strong,
.pending-place-notice small {
    display: block;
}

.pending-place-notice span {
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 900;
}

.pending-place-notice strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: 17px;
}

.pending-place-notice small {
    margin-top: 3px;
    color: #596963;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.field,
.field-grid {
    margin-bottom: 14px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field label {
    display: block;
    color: #3d4a47;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea,
.stop-card input,
.stop-card select,
.stop-card textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #eadccd;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 10px 11px;
    outline: none;
}

.field textarea,
.stop-card textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.stop-card input:focus,
.stop-card select:focus,
.stop-card textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(137, 199, 164, 0.22);
}

.primary-action {
    width: 100%;
    background: var(--amber);
    color: #4a2d19;
    padding: 11px 14px;
    font-weight: 900;
    text-decoration: none;
}

.primary-action:hover,
.primary-action:focus-visible {
    background: #ffd98a;
}

.attachment-list {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
}

.field-help {
    display: block;
    margin-top: 7px;
    color: #65736e;
    font-size: 13px;
    line-height: 1.55;
}

.import-status {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #cfe7dc;
    border-radius: 10px;
    background: #f1faf6;
    color: var(--ink);
}

.import-status[hidden] {
    display: none;
}

.import-status[data-status="error"] {
    border-color: #f0c5bd;
    background: #fff4f1;
}

.import-status[data-status="success"] {
    border-color: #afd7c5;
    background: #edf9f3;
}

.import-status > div,
.import-preview-heading > div {
    min-width: 0;
}

.import-status strong,
.import-status small {
    display: block;
}

.import-status small {
    margin-top: 3px;
    color: #66726e;
    line-height: 1.45;
}

.import-status-spinner {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 3px solid #c5e2d6;
    border-top-color: var(--green-dark);
    border-radius: 50%;
}

.import-status[data-status="loading"] .import-status-spinner {
    animation: import-status-spin 0.9s linear infinite;
}

.import-status[data-status="success"] .import-status-spinner {
    border: 0;
    border-radius: 0;
}

.import-status[data-status="success"] .import-status-spinner::before {
    content: "✓";
    color: var(--green-dark);
    font-size: 22px;
    line-height: 1;
}

.import-status[data-status="error"] .import-status-spinner {
    border-color: #efb7ad;
    border-top-color: var(--red);
}

@keyframes import-status-spin {
    to { transform: rotate(360deg); }
}

.import-preview {
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid #cfe3db;
    border-left: 4px solid var(--green);
    border-radius: 10px;
    background: #fcfffd;
}

.import-preview[hidden] {
    display: none;
}

.import-preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.import-preview-heading span,
.import-preview-heading strong {
    display: block;
}

.import-preview-heading span {
    color: var(--stamp);
    font-size: 11px;
    font-weight: 900;
}

.import-preview-heading strong {
    margin-top: 3px;
    font-size: 20px;
}

.import-preview-heading > small {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--mint);
    color: var(--green-dark);
    font-weight: 900;
}

.import-preview > p {
    margin: 10px 0 14px;
    color: #5f6c68;
    line-height: 1.65;
}

.import-preview-days {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 520px;
    overflow: auto;
    padding-right: 3px;
}

.import-preview-day {
    min-width: 0;
    border: 1px solid #dbe9e3;
    border-radius: 9px;
    background: #fff;
    overflow: hidden;
}

.import-preview-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    background: #eef8f4;
}

.import-preview-day header small {
    color: #687570;
}

.import-preview-day ul,
.import-preview-warnings ul,
.import-rules ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.import-preview-day li {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
    padding: 9px 11px;
    border-top: 1px solid #edf1ef;
}

.import-preview-day time {
    color: var(--green-dark);
    font-weight: 900;
}

.import-preview-day li span,
.import-preview-day li strong,
.import-preview-day li small {
    display: block;
    min-width: 0;
}

.import-preview-day li small {
    margin-top: 2px;
    color: #71807a;
    line-height: 1.4;
}

.import-preview-warnings {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff8ec;
}

.import-preview-warnings > strong {
    display: block;
    margin-bottom: 7px;
    color: #855225;
}

.import-preview-warnings li {
    margin-top: 5px;
    color: #67594b;
    line-height: 1.5;
}

.import-preview-warnings li span {
    margin-right: 6px;
    color: #80401f;
    font-weight: 900;
}

.import-preview-warnings p {
    margin: 0;
    color: var(--green-dark);
}

.import-rules {
    margin: 4px 0 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f7f4ed;
}

.import-rules > strong {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
}

.import-rules li {
    position: relative;
    padding-left: 16px;
    color: #66716d;
    font-size: 13px;
    line-height: 1.6;
}

.import-rules li::before {
    content: "";
    position: absolute;
    top: 0.7em;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
}

.import-submit-action:disabled {
    cursor: wait;
    opacity: 0.6;
}

@media (max-width: 680px) {
    .import-preview-days {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .import-preview-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .import-preview-heading > small {
        align-self: flex-start;
    }
}

.attachment-chip {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: #fbfdfc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.attachment-chip img,
.attachment-thumb {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--sky);
}

.attachment-chip strong,
.attachment-chip span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-chip strong {
    font-size: 13px;
}

.attachment-chip span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.panel-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.tool-button,
.icon-button {
    background: #fff;
    border: 1px solid #ead9c9;
    color: #2d3834;
    padding: 9px 12px;
    font-weight: 800;
    text-decoration: none;
}

.tool-button.accent {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.tool-button.danger {
    color: var(--red);
}

.tool-button:hover,
.tool-button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
    background: #fff1db;
    outline: none;
}

.tool-button.accent:hover,
.tool-button.accent:focus-visible {
    background: #d84b42;
}

.trip-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.trip-summary div {
    min-width: 0;
    background: #fffaf2;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
}

.trip-summary span,
.trip-summary strong {
    display: block;
}

.trip-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.trip-summary strong {
    margin-top: 4px;
    font-size: 18px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.route-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff2dd;
    border: 1px solid #f5c58d;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
}

.route-bar strong,
.route-bar span {
    display: block;
}

.route-bar span {
    color: #956038;
    font-size: 13px;
    margin-top: 2px;
}

.route-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.route-links a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f4bd83;
    color: #8d562d;
    font-weight: 800;
    text-decoration: none;
}

.empty-state {
    min-height: 320px;
    border: 1px dashed #e9bd91;
    border-radius: 8px;
    background: rgba(255, 250, 242, 0.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
    padding: 28px;
}

.empty-state svg {
    width: 44px;
    height: 44px;
    color: var(--green);
    margin-bottom: 12px;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 20px;
}

.empty-state p {
    margin: 0;
}

.itinerary-list {
    display: grid;
    gap: 12px;
}

.day-tabs {
    display: flex;
    gap: 8px;
    margin: 4px 0 16px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.day-tab {
    min-width: 112px;
    min-height: 54px;
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid #dfd8cc;
    border-radius: 6px;
    background: #fff;
    color: #59655f;
    cursor: pointer;
    text-align: left;
}

.day-tab strong,
.day-tab span {
    display: block;
}

.day-tab strong {
    color: var(--ink);
    font-size: 13px;
}

.day-tab span {
    margin-top: 3px;
    font-size: 10px;
}

.day-tab.is-active {
    border-color: var(--green);
    background: var(--mint);
    box-shadow: inset 0 -3px 0 var(--green-dark);
}

.day-empty-state {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    border: 1px dashed #bfd9cd;
    background: #f8fcfa;
    color: var(--muted);
    text-align: center;
}

.day-empty-state strong {
    color: var(--ink);
}

.day-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--green-dark);
    font-weight: 900;
    margin: 10px 0 2px;
}

.day-heading::after {
    content: "";
    height: 1px;
    background: #e7f1ef;
    flex: 1;
}

.stop-card {
    border: 1px solid #ead9c9;
    border-left: 4px solid var(--green);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.stop-card[data-type="meal"] {
    border-left-color: #f7b985;
}

.stop-card[data-type="transfer"] {
    border-left-color: var(--blue);
}

.stop-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.stop-title-wrap {
    min-width: 0;
}

.stop-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.stop-title {
    font-weight: 900;
    margin: 0 0 4px;
    overflow-wrap: anywhere;
}

.system-added-badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border: 1px solid #b8dccc;
    border-radius: 4px;
    background: var(--mint);
    color: var(--green-dark);
    font-size: 10px;
    font-weight: 900;
}

.stop-time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.stop-actions {
    display: flex;
    gap: 6px;
}

.icon-button {
    width: auto;
    min-width: 46px;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
}

.icon-button.danger {
    color: var(--red);
}

.stop-fields {
    display: grid;
    grid-template-columns: 70px minmax(0, 1.4fr) 110px 110px 120px;
    gap: 10px;
    align-items: end;
}

.stop-fields .wide {
    grid-column: span 2;
}

.stop-fields .full {
    grid-column: 1 / -1;
}

.compact-field label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 5px;
}

.stop-card textarea {
    min-height: 72px;
}

.booklet-preview {
    background: #f2eadf;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    min-height: 540px;
}

.booklet-page {
    background: var(--paper);
    color: var(--ink);
    border-radius: 4px;
    box-shadow: 0 10px 24px rgba(123, 83, 54, 0.16);
    padding: 28px;
}

.booklet-cover {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #ead9c9;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.booklet-sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 42px);
    gap: 6px;
    margin-bottom: 18px;
}

.booklet-sticker-grid span {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    box-shadow: 0 5px 12px rgba(123, 83, 54, 0.12);
    font-size: 15px;
    font-weight: 900;
}

.booklet-sticker-grid span:nth-child(1) {
    background: #e95f54;
    color: #fff;
}

.booklet-sticker-grid span:nth-child(2) {
    background: #f7c86b;
}

.booklet-sticker-grid span:nth-child(3) {
    background: #8cc9d6;
}

.booklet-sticker-grid span:nth-child(4) {
    background: #e7f5df;
}

.booklet-cover h2 {
    font-size: 32px;
    line-height: 1.18;
    margin: 0 0 12px;
}

.booklet-cover p {
    color: var(--muted);
    margin: 0;
}

.booklet-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.booklet-meta div {
    border: 1px solid #e4efec;
    border-radius: 6px;
    padding: 10px;
}

.booklet-meta span,
.booklet-meta strong {
    display: block;
}

.booklet-meta span {
    color: var(--muted);
    font-size: 12px;
}

.booklet-meta strong {
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.booklet-section {
    margin-top: 22px;
}

.booklet-section h3 {
    font-size: 18px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ead9c9;
}

.booklet-stop {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf6f3;
}

.booklet-stop:last-child {
    border-bottom: 0;
}

.booklet-stop time {
    color: var(--green-dark);
    font-weight: 900;
    font-size: 13px;
}

.booklet-stop strong {
    display: block;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
}

.booklet-stop p,
.booklet-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    overflow-wrap: anywhere;
}

.booklet-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.booklet-gallery figure {
    margin: 0;
}

.booklet-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e4efec;
}

.booklet-gallery figcaption {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.pdf-generation-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 18px 14px;
    padding: 13px 14px;
    border: 1px solid #cfe5de;
    border-radius: 8px;
    background: #f1faf6;
    color: #365b52;
}

.pdf-generation-status[hidden] {
    display: none;
}

.pdf-generation-status > span:last-child,
.pdf-generation-status strong,
.pdf-generation-status small {
    display: block;
}

.pdf-generation-status strong {
    color: var(--ink);
    font-size: 14px;
}

.pdf-generation-status small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.pdf-generation-spinner {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 3px solid #cfe5de;
    border-top-color: var(--green-dark);
    border-radius: 50%;
    animation: pdf-generation-spin 0.8s linear infinite;
}

.pdf-generation-status[data-status="success"] {
    border-color: #b9ddca;
    background: #eaf8ef;
}

.pdf-generation-status[data-status="success"] .pdf-generation-spinner {
    animation: none;
    border: 0;
    background: var(--green-dark);
    position: relative;
}

.pdf-generation-status[data-status="success"] .pdf-generation-spinner::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 5px;
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.pdf-generation-status[data-status="error"] {
    border-color: #efc4bd;
    background: #fff0ed;
}

.pdf-generation-status[data-status="error"] .pdf-generation-spinner {
    animation: none;
    border-color: var(--red);
}

@keyframes pdf-generation-spin {
    to { transform: rotate(360deg); }
}

/* A4 PDF sheets are built off-screen, then rendered page by page to avoid cutting a stop in half. */
.pdf-book-render-root {
    position: fixed;
    left: -100000px;
    top: 0;
    width: 794px;
    z-index: -1;
    pointer-events: none;
    font-family: var(--font-primary);
    color: #293943;
}

.pdf-sheet {
    position: relative;
    width: 794px;
    height: 1123px;
    overflow: hidden;
    margin: 0;
    background:
        radial-gradient(circle at 92% 9%, rgba(131, 201, 210, 0.15) 0 80px, transparent 81px),
        linear-gradient(90deg, rgba(131, 201, 210, 0.045) 1px, transparent 1px),
        linear-gradient(0deg, rgba(237, 92, 80, 0.035) 1px, transparent 1px),
        #fffaf3;
    background-size: auto, 32px 32px, 32px 32px, auto;
    color: #293943;
    font-size: 16px;
    font-weight: 500;
}

.pdf-sheet h1,
.pdf-sheet h2,
.pdf-sheet h3,
.pdf-sheet p,
.pdf-sheet figure {
    margin: 0;
}

.pdf-cover-art {
    position: relative;
    height: 520px;
    overflow: hidden;
    background: #dceee8;
}

.pdf-cover-art > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-cover-art-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 46, 42, 0.83) 0%, rgba(31, 66, 59, 0.55) 42%, rgba(31, 66, 59, 0.06) 78%),
        linear-gradient(0deg, rgba(24, 45, 40, 0.62) 0%, transparent 55%);
}

.pdf-cover-fallback {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(145deg, transparent 55%, #71b7b4 55% 69%, #3b8278 69%),
        radial-gradient(circle at 73% 29%, #f8c762 0 65px, transparent 66px),
        linear-gradient(135deg, #f8e7ca, #b8ded2 55%, #82c8d2);
}

.pdf-cover-fallback span {
    position: absolute;
    display: block;
    background: rgba(255, 255, 255, 0.86);
    border: 10px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 18px 30px rgba(40, 79, 71, 0.18);
    transform: rotate(-8deg);
}

.pdf-cover-fallback span:nth-child(1) {
    width: 170px;
    height: 220px;
    right: 105px;
    top: 110px;
}

.pdf-cover-fallback span:nth-child(2) {
    width: 135px;
    height: 170px;
    right: 25px;
    top: 225px;
    transform: rotate(9deg);
}

.pdf-cover-fallback span:nth-child(3) {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    right: 260px;
    top: 315px;
    background: #ed5c50;
    border-width: 5px;
}

.pdf-cover-brand,
.pdf-cover-title {
    position: absolute;
    left: 52px;
    z-index: 2;
    color: #fff;
}

.pdf-cover-brand {
    top: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-cover-brand small {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 5px;
    font-family: var(--font-accent);
    font-size: 12px;
    letter-spacing: 1px;
}

.pdf-cover-brand strong {
    font-size: 15px;
}

.pdf-cover-title {
    right: 195px;
    bottom: 52px;
}

.pdf-cover-title p {
    margin-bottom: 10px;
    color: #ffe19e;
    font-family: var(--font-accent);
    font-size: 17px;
    letter-spacing: 1px;
}

.pdf-cover-title h1 {
    max-width: 550px;
    color: #fff;
    font-size: 43px;
    font-weight: 900;
    line-height: 1.18;
    overflow-wrap: anywhere;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.22);
}

.pdf-cover-title span {
    display: block;
    margin-top: 13px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
}

.pdf-cover-summary {
    padding: 28px 46px 66px;
}

.pdf-cover-meta {
    display: grid;
    grid-template-columns: 1.45fr 0.85fr 0.85fr 0.85fr;
    border: 1px solid #dfebe6;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
}

.pdf-cover-meta div {
    min-width: 0;
    padding: 14px 16px;
    border-right: 1px solid #dfebe6;
}

.pdf-cover-meta div:last-child {
    border-right: 0;
}

.pdf-cover-meta small,
.pdf-cover-meta strong {
    display: block;
}

.pdf-cover-meta small,
.pdf-cover-lower > section > small,
.pdf-simple-header small {
    color: #6d7d78;
    font-family: var(--font-accent);
    font-size: 11px;
    letter-spacing: 0.8px;
}

.pdf-cover-meta strong {
    margin-top: 5px;
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pdf-cover-lower {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-top: 26px;
}

.pdf-cover-lower h2 {
    margin-top: 5px;
    font-size: 23px;
}

.pdf-highlight-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 15px;
}

.pdf-highlight-list span {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 7px;
    background: #edf7f3;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pdf-highlight-list b {
    flex: 0 0 auto;
    color: #df5a4f;
    font-family: var(--font-accent);
}

.pdf-cover-note {
    padding-left: 24px;
    border-left: 3px solid #f5bc4f;
}

.pdf-cover-note p {
    margin-top: 14px;
    color: #5f6c6c;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pdf-page-footer {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 24px;
    display: flex;
    justify-content: space-between;
    padding-top: 9px;
    border-top: 1px solid rgba(91, 124, 115, 0.2);
    color: #7a8683;
    font-size: 10px;
    letter-spacing: 0.4px;
}

.pdf-day-sheet,
.pdf-notes-sheet,
.pdf-gallery-sheet {
    padding: 42px 48px 62px;
}

.pdf-day-banner {
    position: relative;
    height: 184px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #3a7467, #8fc9ad);
    color: #fff;
}

.pdf-day-banner > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
}

.pdf-day-banner-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(27, 57, 51, 0.92), rgba(31, 67, 59, 0.7) 62%, rgba(31, 67, 59, 0.22));
}

.pdf-day-number,
.pdf-day-heading {
    position: relative;
    z-index: 1;
}

.pdf-day-number {
    align-self: stretch;
    width: 126px;
    display: grid;
    place-content: center;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.pdf-day-number small,
.pdf-day-heading small {
    font-family: var(--font-accent);
    letter-spacing: 1px;
}

.pdf-day-number strong {
    display: block;
    margin-top: 4px;
    color: #ffe19a;
    font-size: 43px;
    line-height: 1;
}

.pdf-day-heading {
    min-width: 0;
    padding: 0 28px;
}

.pdf-day-heading h2 {
    margin-top: 5px;
    color: #fff;
    font-size: 29px;
}

.pdf-day-heading p {
    max-width: 490px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-day-content {
    height: 790px;
    overflow: hidden;
    padding-top: 20px;
}

.pdf-stop-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
    padding: 15px 5px 15px 0;
    border-bottom: 1px solid #e4ddd4;
    break-inside: avoid;
}

.pdf-stop-time {
    position: relative;
    padding-left: 15px;
    border-left: 4px solid #ed5c50;
}

.pdf-day-palette-2 .pdf-stop-time { border-left-color: #e8a932; }
.pdf-day-palette-3 .pdf-stop-time { border-left-color: #50aeb5; }
.pdf-day-palette-4 .pdf-stop-time { border-left-color: #68a889; }

.pdf-stop-time strong,
.pdf-stop-time small,
.pdf-stop-time i {
    display: block;
}

.pdf-stop-time strong {
    font-size: 19px;
}

.pdf-stop-time small {
    margin-top: 2px;
    color: #70807c;
    font-size: 11px;
}

.pdf-stop-time i {
    margin-top: 12px;
    color: #c4d9d2;
    font-family: var(--font-accent);
    font-size: 12px;
    font-style: normal;
}

.pdf-stop-body {
    min-width: 0;
}

.pdf-stop-body h3 {
    font-size: 20px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pdf-stop-body h3 small {
    color: #7b8784;
    font-size: 11px;
}

.pdf-stop-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.pdf-stop-facts span {
    padding: 4px 8px;
    border-radius: 99px;
    background: #e8f3ef;
    color: #406a60;
    font-size: 11px;
    font-weight: 900;
}

.pdf-stop-line,
.pdf-stop-notes {
    margin-top: 7px !important;
    color: #536360;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pdf-stop-line b,
.pdf-stop-notes b {
    display: inline-block;
    min-width: 43px;
    color: #314b45;
    font-size: 11px;
}

.pdf-stop-link {
    color: #367267;
}

.pdf-stop-card.is-continuation {
    background: rgba(241, 248, 245, 0.66);
}

.pdf-simple-header {
    position: relative;
    height: 178px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 0 34px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e6f4ef, #f8e7c8);
}

.pdf-simple-header h2 {
    margin-top: 7px;
    font-size: 32px;
}

.pdf-simple-header img {
    position: absolute;
    right: 0;
    top: 0;
    width: 235px;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
    mask-image: linear-gradient(90deg, transparent, #000 45%);
}

.pdf-notes-paper {
    min-height: 640px;
    margin-top: 28px;
    padding: 32px 36px;
    border: 1px solid #e4ded3;
    border-radius: 12px;
    background:
        repeating-linear-gradient(transparent 0 32px, rgba(104, 168, 137, 0.18) 32px 33px),
        rgba(255, 255, 255, 0.88);
}

.pdf-notes-paper p {
    color: #40514e;
    font-size: 16px;
    line-height: 2.06;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pdf-note-reminder {
    display: flex;
    gap: 16px;
    margin-top: 22px;
    padding: 15px 18px;
    border-left: 4px solid #f5bc4f;
    background: #fff7e7;
    color: #626e6b;
    font-size: 12px;
}

.pdf-note-reminder strong {
    flex: 0 0 auto;
    color: #304740;
}

.pdf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.pdf-gallery-grid figure {
    padding: 10px;
    border: 1px solid #e3dbd0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(63, 86, 79, 0.08);
}

.pdf-gallery-grid img {
    width: 100%;
    height: 295px;
    object-fit: cover;
    border-radius: 6px;
}

.pdf-gallery-grid figcaption {
    padding: 9px 4px 2px;
    color: #596865;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    max-width: min(360px, calc(100vw - 36px));
    background: #2f4f48;
    color: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
    font-weight: 800;
}

.community-page {
    flex: 1;
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 20px;
}

.admin-page {
    width: min(100%, 1180px);
    padding: 14px;
}

.community-hero {
    min-height: 220px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: center;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 42px);
    margin-bottom: 16px;
    border-top: 5px solid var(--red);
}

.compact-hero {
    min-height: 150px;
}

.admin-hero {
    min-height: 0;
    padding: 18px 20px;
    margin-bottom: 12px;
}

.admin-hero h1 {
    font-size: clamp(24px, 3vw, 34px);
}

.admin-hero p {
    line-height: 1.6;
}

.community-hero h1 {
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.05;
    margin: 0 0 12px;
}

.community-hero p {
    color: var(--muted);
    line-height: 1.8;
    margin: 0;
}

.sticker-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    transform: rotate(-1deg);
}

.sticker-board span {
    min-height: 72px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(70, 42, 22, 0.12);
    color: #302b28;
    font-weight: 900;
}

.sticker-board span:nth-child(1),
.sticker-board span:nth-child(4) {
    background: #e95f54;
    color: #fff;
}

.sticker-board span:nth-child(2),
.sticker-board span:nth-child(6) {
    background: #f7c86b;
}

.sticker-board span:nth-child(3),
.sticker-board span:nth-child(5) {
    background: #8cc9d6;
}

.community-grid {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.community-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
    min-width: 0;
}

.community-grid > .community-panel:first-child,
.auth-layout > .community-panel:first-child {
    border-top: 4px solid var(--amber);
}

.community-grid > .community-panel:nth-child(2),
.auth-layout > .community-panel:nth-child(2),
.my-trips-panel {
    border-top: 4px solid var(--green);
}

.share-form {
    margin-top: 16px;
}

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-weight: 800;
}

.notice p {
    margin: 0;
}

.notice.success {
    background: #e9f7df;
    border: 1px solid #b9dda2;
    color: #315f28;
}

.notice.error {
    background: #fff0ee;
    border: 1px solid #f1bbb5;
    color: #9e3028;
}

.search-strip {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 160px;
    gap: 8px;
    margin: 16px 0 6px;
}

.search-strip input,
.search-strip select {
    width: 100%;
    border: 1px solid #eadccd;
    border-radius: 8px;
    background: #fff;
    padding: 10px 11px;
}

.live-search-status {
    min-height: 18px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
}

.place-card[hidden] {
    display: none !important;
}

.place-list,
.admin-place-list {
    display: grid;
    grid-template-columns: minmax(0, 980px);
    justify-content: center;
    align-items: start;
    gap: 14px;
}

.place-card,
.admin-place-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #ead9c9;
    border-left: 5px solid var(--red);
    border-radius: 8px;
    padding: 14px;
}

.place-card {
    padding: 17px 18px 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(56, 71, 65, 0.06);
}

.admin-page .community-panel {
    padding: 18px;
    margin-bottom: 16px;
}

.admin-page .community-panel > .section-heading {
    margin-bottom: 22px;
}

.admin-place-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    border-left-width: 0;
    padding: 0;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    box-shadow: 0 14px 30px rgba(123, 83, 54, 0.1);
}

.place-card[data-category="restaurant"] {
    border-left-color: #f7c86b;
}

.place-card[data-category="hotel"] {
    border-left-color: #8cc9d6;
}

.place-card[data-category="guesthouse"],
.place-card[data-category="hostel"],
.place-card[data-category="resort"],
.place-card[data-category="campground"] {
    border-left-color: #77b8aa;
}

.place-card[data-category="spot"] {
    border-left-color: #e95f54;
}

.place-card-top,
.admin-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.place-card-top {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(180px, 2fr) minmax(90px, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.place-card .place-card-name {
    min-width: 0;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
}

.place-card-top > .place-badge {
    width: max-content;
    justify-self: start;
    padding-right: 12px;
    padding-left: 12px;
}

.place-card-title,
.place-card-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.place-card-title {
    min-width: 0;
}

.place-card-title strong {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.place-card-tools {
    flex: 0 0 auto;
}

.place-card-tools .icon-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 7px;
    text-decoration: none;
    font-size: 16px;
}

.place-card-tools .place-add-button,
.place-card-add .place-add-button {
    background: var(--mint);
    border-color: #b9ddca;
    color: var(--green-dark);
    font-size: 22px;
    line-height: 1;
}

.place-card .tag-row {
    justify-content: flex-end;
    margin-left: auto;
    margin-top: 14px;
}

.place-card .place-card-tags {
    justify-self: end;
    margin: 0;
}

.place-card-add {
    display: flex;
    justify-content: center;
    padding-top: 14px;
}

.place-card-add .place-add-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
}

.admin-card-head {
    padding-bottom: 12px;
    border-bottom: 1px solid #f1e4d8;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.admin-card-head > div {
    min-width: 0;
}

.place-card strong,
.admin-card-head strong {
    font-size: 18px;
}

.admin-card-head strong {
    display: block;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.admin-review-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background:
        linear-gradient(135deg, rgba(233, 95, 84, 0.06) 25%, transparent 25%),
        #fff6e8;
    background-size: 18px 18px;
    border-right: 1px solid #ead9c9;
    padding: 18px;
}

.admin-review-summary strong {
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.admin-review-summary dl {
    display: grid;
    gap: 10px;
    margin: 6px 0 0;
}

.admin-review-summary dt,
.admin-review-summary dd {
    margin: 0;
}

.admin-review-summary dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.admin-review-summary dd {
    margin-top: 2px;
    color: var(--ink);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.admin-review-body {
    min-width: 0;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.82);
}

.admin-compact-grid {
    display: grid;
    grid-template-columns: minmax(120px, 0.75fr) minmax(150px, 1fr) minmax(150px, 0.9fr);
    gap: 14px 14px;
    align-items: end;
    padding-top: 16px;
}

.admin-compact-grid .field {
    margin-bottom: 0;
}

.admin-compact-grid .wide {
    grid-column: 1 / -1;
}

.admin-compact-grid .field-name {
    grid-column: 1 / -1;
}

.admin-compact-grid .field-address {
    grid-column: 1 / -1;
}

.admin-compact-grid .field-map {
    grid-column: 1 / -1;
}

.admin-compact-grid .field-tags {
    grid-column: span 1;
}

.admin-compact-grid .field-notes {
    grid-column: span 2;
}

.admin-place-card .field label {
    font-size: 12px;
    margin-bottom: 5px;
}

.admin-place-card .field input,
.admin-place-card .field select,
.admin-place-card .field textarea {
    min-height: 40px;
    padding: 9px 10px;
}

.admin-place-card .field textarea {
    min-height: 72px;
}

.place-card p {
    color: var(--muted);
    line-height: 1.7;
    margin: 6px 0;
}

.place-card-details {
    border-top: 1px solid #eee3d8;
}

.place-info-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 10px 14px;
    align-items: center;
    min-height: 46px;
    padding: 10px 0;
    border-bottom: 1px solid #f1e8df;
}

.place-info-label {
    color: #475955;
    font-size: 12px;
    font-weight: 900;
}

.place-card .place-info-value {
    min-width: 0;
    margin: 0;
    color: #344641;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.place-copy-address {
    min-width: 0;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: #344641;
    cursor: copy;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
    overflow-wrap: anywhere;
}

.place-copy-address:hover,
.place-copy-address:focus-visible {
    color: var(--green-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    outline: none;
}

.place-copy-address.is-copied {
    color: var(--green-dark);
}

.place-location-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 9px;
}

.place-card .place-location-value strong {
    flex: 0 0 auto;
    color: #243b36;
    font-size: 14px;
}

.place-location-value span {
    color: #50615d;
}

.place-inline-map,
.place-inline-official {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 9px;
    border: 1px solid #9fcfd7;
    border-radius: 6px;
    background: var(--sky);
    color: #285c68;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.place-inline-map:hover,
.place-inline-map:focus-visible,
.place-inline-official:hover,
.place-inline-official:focus-visible {
    border-color: #4b929f;
    background: #d3edf1;
    outline: none;
}

.place-inline-official {
    border-color: #e8c177;
    background: #fff5dc;
    color: #80561c;
}

.place-inline-official:hover,
.place-inline-official:focus-visible {
    border-color: #d79d36;
    background: #ffedc2;
}

.place-description-row {
    align-items: start;
}

.place-description-row .place-info-label {
    padding-top: 2px;
}

.place-card .place-description-row .place-info-value {
    color: #2d403b;
    font-weight: 700;
}

.optional-label {
    margin-left: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.place-products-row {
    align-items: start;
}

.place-products-row .place-info-label {
    padding-top: 7px;
}

.place-product-list {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.place-product-item {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 5px 4px 11px;
    border: 1px solid #ead7ad;
    border-radius: 6px;
    background: #fff8e7;
    color: #554126;
    font-size: 13px;
    font-weight: 800;
}

.place-product-add {
    min-height: 27px;
    padding: 4px 8px;
    border: 1px solid #b7dbc7;
    border-radius: 5px;
    background: var(--mint);
    color: var(--green-dark);
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.place-product-add:hover,
.place-product-add:focus-visible,
.place-product-add.is-added {
    border-color: var(--green-dark);
    background: #d1ecdc;
    outline: none;
}

.place-product-add:disabled {
    cursor: wait;
    opacity: 0.75;
}

/* Public recommendation cards */
.place-card {
    --place-accent: var(--green);
    width: 100%;
    overflow: hidden;
    padding: 0;
    border: 1px solid #e5ddd3;
    border-top: 5px solid var(--place-accent);
    border-left-width: 1px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(54, 76, 69, 0.1);
}

.place-card[data-category="restaurant"] { --place-accent: #f2bd56; }
.place-card[data-category="cafe"] { --place-accent: #d9a96e; }
.place-card[data-category="bar"] { --place-accent: #9f80b8; }
.place-card[data-category="hotel"] { --place-accent: #79c2cf; }
.place-card[data-category="guesthouse"] { --place-accent: #82bba7; }
.place-card[data-category="hostel"] { --place-accent: #70a9a2; }
.place-card[data-category="resort"] { --place-accent: #6eb9c0; }
.place-card[data-category="campground"] { --place-accent: #85ad72; }
.place-card[data-category="spa"] { --place-accent: #83afd0; }
.place-card[data-category="spot"] { --place-accent: #eb655a; }
.place-card[data-category="activity"] { --place-accent: #e98b65; }
.place-card[data-category="shop"] { --place-accent: #82c5a4; }
.place-card[data-category="market"] { --place-accent: #d9aa5f; }
.place-card[data-category="transport"] { --place-accent: #75b9d0; }
.place-card[data-category="travel_service"] { --place-accent: #789fc5; }
.place-card[data-category="other"] { --place-accent: #e89b7e; }

.place-card .place-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    padding: 20px 22px 18px;
    border-bottom: 1px solid #eee5dc;
    background: linear-gradient(120deg, color-mix(in srgb, var(--place-accent) 10%, #fff) 0%, #fff 55%);
}

.place-card-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.place-card .place-card-identity > .place-badge {
    flex: 0 0 auto;
    width: max-content;
    padding: 7px 12px;
}

.place-card .place-card-name {
    min-width: 0;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.3;
    text-align: left;
    overflow-wrap: anywhere;
}

.place-card .place-card-tags {
    max-width: 48%;
    justify-content: flex-end;
    justify-self: auto;
    margin: 0;
}

.place-card-body {
    display: grid;
    gap: 14px;
    padding: 20px 22px;
}

.place-location-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 15px 16px;
    border: 1px solid #dcebe4;
    border-radius: 10px;
    background: #f5faf7;
}

.place-location-copy { min-width: 0; }

.place-info-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 10px;
}

.place-info-heading span {
    color: #38534c;
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 800;
}

.place-info-heading small {
    color: var(--muted);
    font-size: 11px;
}

.place-card .place-copy-address {
    display: block;
    margin-top: 6px;
    color: #263e38;
    font-size: 15px;
    font-weight: 800;
}

.place-link-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.place-card .place-inline-map,
.place-card .place-inline-official {
    min-height: 40px;
    padding: 8px 12px;
}

.place-quick-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.place-fact {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #eee5dc;
    border-radius: 9px;
    background: #fffdf9;
}

.place-fact:only-child {
    grid-column: 1 / -1;
}

.place-fact span,
.place-fact strong {
    display: block;
}

.place-fact span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.place-fact strong {
    margin-top: 4px;
    color: #2f4640;
    font-size: 15px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.place-card .place-description-row,
.place-card .place-products-row {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 15px 16px;
    border: 1px solid #eee5dc;
    border-radius: 10px;
    background: #fff;
}

.place-card .place-description-row .place-info-value {
    margin: 0;
    color: #30453f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
}

.place-card .place-products-row {
    border-color: #ebddbc;
    background: #fffaf0;
}

.place-card .place-product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.place-card .place-product-item {
    min-height: 40px;
    padding: 5px 6px 5px 12px;
    border-radius: 8px;
    background: #fff;
}

.place-card .place-card-add {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 22px;
    border-top: 1px solid #eee5dc;
    background: #faf7f1;
}

.place-card-add > div {
    min-width: 0;
}

.place-card-add > div strong,
.place-card-add > div span {
    display: block;
}

.place-card-add > div strong {
    color: #30443e;
    font-size: 14px;
}

.place-card-add > div span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.place-card .place-card-add .place-add-button {
    width: auto;
    min-width: 126px;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
    font-size: 13px;
}

.place-card .place-card-add .place-add-button:hover,
.place-card .place-card-add .place-add-button:focus-visible {
    background: #285c50;
    border-color: #285c50;
}

.place-card .place-card-add .place-add-button span {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: 16px;
}

.admin-compact-grid .field-products {
    grid-column: 1 / -1;
}

.admin-compact-grid .field-products small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.shopping-page {
    width: min(100%, 1180px);
}

.shopping-hero {
    border-top-color: var(--amber);
}

.shopping-summary {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.shopping-summary span {
    min-width: 112px;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 11px 14px;
    border: 1px solid #ead9c9;
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.shopping-summary strong {
    color: var(--ink);
    font-size: 21px;
    line-height: 1;
}

.shopping-workspace {
    border-top: 4px solid var(--amber);
}

.shopping-add-form {
    display: grid;
    grid-template-columns: minmax(210px, 1.3fr) minmax(180px, 1fr) 90px minmax(210px, 1.2fr) auto;
    column-gap: 14px;
    row-gap: 10px;
    align-items: end;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.shopping-form-heading {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.shopping-add-form .field {
    margin: 0;
}

.shopping-add-button {
    min-width: 118px;
}

.shopping-toolbar {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.shopping-filters {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #e8ddd1;
    border-radius: 7px;
    background: #f9f7f2;
}

.shopping-filters button {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.shopping-filters button:hover,
.shopping-filters button:focus-visible,
.shopping-filters button.is-active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(41, 57, 67, 0.08);
    outline: none;
}

.shopping-clear-button {
    min-height: 36px;
    padding: 6px 10px;
    color: #9a443b;
    font-size: 12px;
}

.shopping-clear-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.shopping-status {
    min-height: 20px;
    margin: -2px 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.shopping-status:empty,
.shopping-list:empty {
    display: none;
}

.shopping-status.success {
    color: var(--green-dark);
}

.shopping-status.error {
    color: #a13c34;
}

.shopping-list {
    display: grid;
    gap: 10px;
}

.shopping-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 15px;
    border: 1px solid #ead9c9;
    border-left: 5px solid var(--amber);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(64, 78, 73, 0.05);
}

.shopping-item.is-purchased {
    border-left-color: var(--green);
    background: #f8fcf9;
}

.shopping-check {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    position: relative;
    cursor: pointer;
}

.shopping-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shopping-check span {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 2px solid #d5c7b8;
    border-radius: 50%;
    background: #fff;
}

.shopping-check input:focus-visible + span {
    outline: 3px solid rgba(137, 199, 164, 0.25);
    outline-offset: 2px;
}

.shopping-check input:checked + span {
    border-color: var(--green-dark);
    background: var(--green-dark);
}

.shopping-check input:checked + span::after {
    content: "✓";
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

.shopping-item-main {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1fr) minmax(220px, 1.2fr);
    gap: 12px;
    align-items: center;
}

.shopping-item-main input {
    min-width: 0;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    padding: 7px 8px;
    outline: none;
}

.shopping-item-main input:hover,
.shopping-item-main input:focus {
    border-color: #e4d7c9;
    background: #fff;
}

.shopping-item-name {
    font-size: 16px;
    font-weight: 900;
}

.shopping-item.is-purchased .shopping-item-name {
    color: var(--muted);
    text-decoration: line-through;
}

.shopping-item-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shopping-item-store,
.shopping-item-note {
    color: #566560 !important;
    font-size: 13px;
}

.shopping-map-link {
    flex: 0 0 auto;
    padding: 5px 7px;
    border: 1px solid #acd6dc;
    border-radius: 5px;
    background: var(--sky);
    color: #2b6570;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.shopping-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shopping-item-quantity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.shopping-item-quantity input {
    width: 58px;
    min-height: 36px;
    border: 1px solid #e1d5c8;
    border-radius: 6px;
    background: #fff;
    padding: 6px;
    color: var(--ink);
    text-align: center;
}

.shopping-delete-button {
    width: 36px;
    height: 36px;
    border: 1px solid #efc9c4;
    border-radius: 6px;
    background: #fff5f3;
    color: var(--red);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.shopping-delete-button:hover,
.shopping-delete-button:focus-visible {
    border-color: var(--red);
    background: #ffe8e4;
    outline: none;
}

.shopping-empty {
    margin-top: 6px;
    padding: 28px 24px;
}

.shopping-empty h3 {
    margin: 0 0 12px;
}

.shopping-empty p {
    margin: 0;
    line-height: 1.65;
}

.shopping-empty .tool-button {
    margin-top: 16px;
}

.shopping-login-panel {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
}

body.has-open-modal {
    overflow: hidden;
}

.trip-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 18px;
}

.trip-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(33, 47, 50, 0.48);
    backdrop-filter: blur(3px);
}

.trip-picker-dialog {
    position: relative;
    width: min(100%, 620px);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    padding: 22px;
    border: 1px solid #dfd2c4;
    border-top: 5px solid var(--red);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(31, 48, 48, 0.24);
    outline: none;
}

.trip-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.trip-picker-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 24px;
}

.trip-picker-close {
    min-width: 38px;
    width: 38px;
    padding: 6px;
    font-size: 18px;
}

.trip-picker-place {
    margin: 18px -22px 0;
    padding: 14px 22px;
    border-top: 1px solid #eadfd3;
    border-bottom: 1px solid #eadfd3;
    background: #fff8eb;
}

.trip-picker-place span,
.trip-picker-place strong,
.trip-picker-place small {
    display: block;
}

.trip-picker-place span {
    color: var(--stamp);
    font-size: 11px;
    font-weight: 900;
}

.trip-picker-place strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: 19px;
}

.trip-picker-place small {
    margin-top: 4px;
    color: #53625f;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.trip-picker-options {
    display: grid;
    gap: 9px;
    margin-top: 18px;
}

.trip-picker-option {
    min-height: 66px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 11px 13px;
    border: 1px solid #dcd5cb;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.trip-picker-option:has(input:checked) {
    border-color: var(--green);
    background: #f0faf5;
    box-shadow: inset 4px 0 0 var(--green-dark);
}

.trip-picker-option.is-disabled {
    background: #f5f3ef;
    cursor: not-allowed;
    opacity: 0.7;
}

.trip-picker-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--green-dark);
}

.trip-picker-option-copy,
.trip-picker-option-copy strong,
.trip-picker-option-copy small {
    display: block;
    min-width: 0;
}

.trip-picker-option-copy strong {
    color: var(--ink);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.trip-picker-option-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.trip-picker-option-status {
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 900;
}

.trip-picker-option.is-disabled .trip-picker-option-status {
    color: var(--red);
}

.trip-picker-empty {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    border: 1px dashed #d9c9b8;
    color: var(--muted);
    text-align: center;
}

.trip-picker-empty strong {
    color: var(--ink);
}

.trip-picker-message {
    min-height: 20px;
    margin: 12px 0 0;
    color: #6a5a47;
    font-size: 12px;
    line-height: 1.5;
}

.trip-picker-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin: 16px -22px -22px;
    padding: 16px 22px;
    border-top: 1px solid #eadfd3;
    background: #fbfaf6;
}

.trip-picker-actions .tool-button {
    min-width: 150px;
}

.trip-picker-actions .tool-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.place-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 8px;
    background: #fff1db;
    color: #8d562d;
    font-size: 12px;
    font-weight: 900;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag-row span {
    padding: 5px 9px;
    border: 1px solid #b9ddca;
    border-radius: 4px;
    background: var(--mint);
    color: #326c59;
    font-size: 12px;
    font-weight: 900;
}

.tag-row span::before {
    content: "#";
    margin-right: 1px;
    color: var(--stamp);
}

.hashtag-input {
    border-color: #b9ddca !important;
    background: var(--mint) !important;
    color: #326c59 !important;
    font-weight: 800;
}

.place-actions,
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.admin-actions {
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1e4d8;
}

.admin-actions .tool-button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 14px;
}

.place-actions a {
    text-decoration: none;
}

.login-panel {
    max-width: 440px;
}

.auth-page {
    max-width: 1080px;
}

.my-trips-page {
    max-width: 1120px;
}

.ai-recommend-page {
    max-width: 1120px;
}

.ai-recommend-hero {
    min-height: 0;
    padding: 26px;
    background:
        linear-gradient(120deg, rgba(118, 88, 167, 0.1), transparent 55%),
        var(--surface);
}

.ai-page-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}

.ai-page-benefits span {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #ded2e9;
    border-radius: 7px;
    background: #fbf7ff;
    color: #5d5662;
    font-size: 12px;
    line-height: 1.45;
}

.ai-page-benefits strong {
    display: block;
    margin-bottom: 3px;
    color: #654590;
    font-size: 14px;
}

.my-hero {
    min-height: 0;
    padding: 22px;
}

.my-trips-panel {
    padding: 18px;
}

.ai-trip-panel {
    margin-bottom: 16px;
    border-top: 4px solid #7658a7;
    background:
        radial-gradient(circle at 94% 4%, rgba(142, 112, 190, 0.14), transparent 25%),
        var(--surface);
}

.ai-standalone-panel {
    margin-bottom: 0;
    padding: 24px;
}

.my-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ai-panel-heading,
.ai-form-actions,
.ai-result-head,
.ai-result-actions,
.ai-review-summary,
.ai-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ai-panel-heading .muted-copy {
    margin: 6px 0 0;
}

.ai-model-chip,
.ai-result-label,
.ai-verdict,
.ai-issue span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.ai-model-chip {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid #d8c9ea;
    background: #f5effc;
    color: #654590;
}

.ai-recommend-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed #d9cce5;
}

.field-grid.ai-four-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.ai-form-actions > .primary-action {
    flex: 0 0 auto;
}

.ai-form-actions > small {
    width: 100%;
    max-width: none;
    text-align: center;
}

.ai-form-actions small,
.ai-result-actions small,
.ai-result-disclaimer {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.ai-form-actions .primary-action {
    width: auto;
    min-width: 190px;
    margin: 0;
    background: #7658a7;
}

.ai-form-actions button:disabled,
.ai-review-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.ai-status {
    margin-top: 16px;
    padding: 11px 13px;
    border-left: 4px solid #7658a7;
    background: #f5effc;
    color: #533a78;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.6;
}

.ai-status.is-loading::before {
    content: "";
    width: 10px;
    height: 10px;
    display: inline-block;
    margin-right: 9px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: ai-spin 0.8s linear infinite;
}

.ai-status.is-success {
    border-color: var(--green);
    background: #edf8f2;
    color: var(--green-dark);
}

.ai-status.is-error {
    border-color: var(--red);
    background: #fff0ed;
    color: #8d352b;
}

.ai-recommend-result {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #d9cce5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
}

.ai-result-head h3 {
    margin: 6px 0 6px;
    font-size: 22px;
}

.ai-result-head p,
.ai-review-summary p {
    margin: 0;
    color: #52615d;
    line-height: 1.65;
}

.ai-result-label {
    padding: 5px 8px;
    background: #eee5f8;
    color: #654590;
}

.ai-score-badge {
    flex: 0 0 92px;
    width: 92px;
    min-height: 82px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 2px solid #7658a7;
    border-radius: 8px;
    background: #f8f3fd;
    color: #654590;
}

.ai-score-badge strong {
    font-size: 30px;
    line-height: 1;
}

.ai-score-badge span {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 900;
}

.ai-score-badge.compact {
    flex-basis: 66px;
    width: 66px;
    min-height: 64px;
}

.ai-score-badge.compact strong {
    font-size: 24px;
}

.ai-day-grid,
.ai-day-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.ai-day-card,
.ai-day-review-grid > article {
    padding: 14px;
    border: 1px solid #e7ddef;
    border-radius: 7px;
    background: #fff;
}

.ai-day-card h4,
.ai-review-section h3 {
    margin: 0 0 12px;
    color: #654590;
    font-size: 15px;
}

.ai-day-card ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ai-day-card li {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.ai-day-card time {
    color: #7658a7;
    font-size: 11px;
    font-weight: 900;
}

.ai-day-card strong,
.ai-day-card small {
    display: block;
    overflow-wrap: anywhere;
}

.ai-day-card strong {
    font-size: 13px;
}

.ai-day-card small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.ai-tips {
    margin-top: 14px;
    padding: 13px 14px;
    border-left: 4px solid var(--amber);
    background: #fff8e8;
}

.ai-tips ul,
.ai-check-list,
.ai-day-review-grid ul {
    margin: 7px 0 0;
    padding-left: 19px;
    color: #4f5e5a;
    line-height: 1.65;
}

.ai-result-actions {
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e7ddef;
}

.ai-review-button {
    border-color: #bca8d5;
    color: #654590;
}

.ai-review-dialog {
    width: min(900px, calc(100vw - 28px));
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 22px;
    border: 0;
    border-top: 5px solid #7658a7;
    border-radius: 10px;
    background: #fffdf9;
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(45, 31, 54, 0.32);
}

.ai-review-setup {
    margin-top: 18px;
}

.ai-review-trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ai-review-trip-meta span,
.ai-review-trip-meta strong {
    padding: 6px 9px;
    border: 1px solid #ded2e9;
    border-radius: 999px;
    background: #faf6fe;
    color: #654590;
    font-size: 11px;
}

.ai-review-intro {
    margin: 13px 0 0;
    padding: 11px 13px;
    border-left: 4px solid #7658a7;
    background: #f7f1fc;
    color: #5d5662;
    font-size: 12px;
    line-height: 1.6;
}

.ai-review-form {
    display: grid;
    gap: 14px;
    margin-top: 17px;
}

.ai-priority-fieldset {
    margin: 0;
    padding: 13px 14px 14px;
    border: 1px solid #ded2e9;
    border-radius: 7px;
}

.ai-priority-fieldset legend {
    padding: 0 6px;
    color: #4e4356;
    font-size: 12px;
    font-weight: 900;
}

.ai-priority-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-priority-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid #e1d7e9;
    border-radius: 6px;
    background: #fff;
    color: #554d58;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ai-priority-options label:has(input:checked) {
    border-color: #9276b7;
    background: #f3ebfa;
    color: #654590;
}

.ai-review-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ai-review-submit-row .primary-action {
    width: auto;
    margin: 0;
    background: #7658a7;
}

.ai-review-submit-row small {
    color: var(--muted);
    font-size: 11px;
}

.ai-review-dialog::backdrop {
    background: rgba(35, 30, 39, 0.55);
    backdrop-filter: blur(2px);
}

.ai-dialog-head {
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e7ddef;
}

.ai-dialog-head h2 {
    margin: 3px 0 0;
    font-size: 22px;
}

.ai-dialog-head .icon-button {
    flex: 0 0 auto;
    font-size: 22px;
}

.ai-review-summary {
    align-items: center;
    margin-top: 18px;
}

.ai-review-summary h3 {
    margin: 8px 0 7px;
    font-size: 21px;
}

.ai-outcome {
    margin-top: 9px !important;
    padding-top: 9px;
    border-top: 1px dashed #ddcfeb;
    font-size: 12px;
}

.ai-expectation-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px 18px;
    align-items: center;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #d9cce5;
    border-radius: 8px;
    background: #f9f5fd;
}

.ai-expectation-card > div:first-child {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 90px;
    border-right: 1px solid #ddcfeb;
    color: #654590;
}

.ai-expectation-card > div:first-child span,
.ai-expectation-card > div:first-child small {
    font-size: 11px;
    font-weight: 900;
}

.ai-expectation-card > div:first-child strong {
    margin: 4px 0;
    font-size: 30px;
    line-height: 1;
}

.ai-expectation-card > p {
    margin: 0;
    color: #52615d;
    line-height: 1.65;
}

.ai-expectation-columns {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ai-expectation-columns > div {
    padding: 11px 12px;
    background: #fff;
    border-radius: 6px;
}

.ai-expectation-columns strong {
    color: #654590;
    font-size: 12px;
}

.ai-expectation-columns ul,
.ai-checklist-grid ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #52615d;
    font-size: 12px;
    line-height: 1.6;
}

.ai-dimension-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ai-dimension {
    padding: 12px 13px;
    border: 1px solid #e2d8ea;
    border-radius: 7px;
    background: #fff;
}

.ai-dimension > div:first-child,
.ai-day-review-head,
.ai-day-scores {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ai-dimension > div:first-child span {
    color: #654590;
    font-size: 15px;
    font-weight: 900;
}

.ai-meter {
    height: 6px;
    margin: 8px 0;
    overflow: hidden;
    border-radius: 99px;
    background: #eee9f1;
}

.ai-meter i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #7658a7;
}

.ai-dimension.status-good .ai-meter i { background: var(--green); }
.ai-dimension.status-risk .ai-meter i { background: var(--red); }

.ai-dimension p,
.ai-dimension small {
    display: block;
    margin: 5px 0 0;
    color: #52615d;
    font-size: 12px;
    line-height: 1.5;
}

.ai-dimension small {
    color: #7658a7;
}

.ai-flag-list,
.ai-change-list {
    display: grid;
    gap: 10px;
}

.ai-flag {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px 13px;
    border-left: 4px solid var(--amber);
    background: #fff8e8;
}

.ai-flag.severity-high { border-color: var(--red); background: #fff0ed; }
.ai-flag.severity-low { border-color: var(--blue); background: #eef7fb; }

.ai-flag > span {
    height: fit-content;
    padding: 4px 7px;
    border-radius: 999px;
    background: #fff;
    color: #765927;
    font-size: 10px;
    font-weight: 900;
}

.ai-flag p,
.ai-flag small {
    display: block;
    margin: 5px 0 0;
    color: #52615d;
    line-height: 1.55;
}

.ai-day-review-head > span {
    padding: 3px 7px;
    border-radius: 99px;
    background: #f0e8f7;
    color: #654590;
    font-size: 10px;
    font-weight: 900;
}

.ai-day-scores {
    justify-content: flex-start;
    margin-top: 7px;
}

.ai-day-scores small {
    padding: 3px 6px;
    background: #f4f1f5;
    color: #605967;
    font-size: 10px;
}

.ai-day-risks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.ai-day-risks span {
    padding: 4px 6px;
    border-left: 3px solid var(--amber);
    background: #fff8e8;
    color: #765927;
    font-size: 10px;
}

.ai-section-lead {
    margin: -3px 0 12px;
    color: #52615d;
    line-height: 1.6;
}

.ai-change-list article {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 11px;
    padding: 12px 13px;
    border: 1px solid #e2d8ea;
    background: #fff;
}

.ai-change-list article > span {
    color: #654590;
    font-size: 11px;
    font-weight: 900;
}

.ai-change-list del,
.ai-change-list strong,
.ai-change-list p {
    display: block;
    margin: 0 0 5px;
    line-height: 1.5;
}

.ai-change-list del { color: #9a7771; font-size: 11px; }
.ai-change-list strong { color: var(--green-dark); }
.ai-change-list p { color: #52615d; font-size: 12px; }

.ai-contingency-grid,
.ai-blind-spot-grid,
.ai-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.ai-contingency-grid article,
.ai-blind-spot-grid article,
.ai-checklist-grid article {
    padding: 13px;
    border: 1px solid #e2d8ea;
    border-radius: 7px;
    background: #fff;
}

.ai-contingency-grid small,
.ai-blind-spot-grid small {
    display: block;
    margin-top: 6px;
    color: #7658a7;
    font-size: 11px;
    line-height: 1.5;
}

.ai-contingency-grid p,
.ai-blind-spot-grid p {
    margin: 7px 0 0;
    color: #52615d;
    font-size: 12px;
    line-height: 1.6;
}

.ai-questions {
    padding: 15px;
    border: 1px dashed #bda9d2;
    background: #faf6fe;
}

.ai-questions ol {
    margin: 0;
    padding-left: 20px;
    color: #52615d;
    line-height: 1.7;
}

.ai-verdict {
    margin-bottom: 7px;
    padding: 5px 9px;
    background: #eee5f8;
    color: #654590;
}

.ai-verdict.verdict-excellent,
.ai-verdict.verdict-good {
    background: #e4f5ec;
    color: var(--green-dark);
}

.ai-verdict.verdict-risky {
    background: #fde5df;
    color: #8d352b;
}

.ai-review-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e7ddef;
}

.ai-check-list.positive li::marker {
    color: var(--green);
}

.ai-issue-list {
    display: grid;
    gap: 10px;
}

.ai-issue {
    padding: 13px 14px;
    border-left: 4px solid var(--amber);
    background: #fff8e8;
}

.ai-issue.severity-high {
    border-color: var(--red);
    background: #fff0ed;
}

.ai-issue.severity-low {
    border-color: var(--blue);
    background: #eef7fb;
}

.ai-issue div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-issue span {
    padding: 3px 7px;
    background: rgba(255, 255, 255, 0.8);
    color: #765927;
}

.ai-issue p,
.ai-issue small,
.ai-day-review-grid p {
    display: block;
    margin: 7px 0 0;
    color: #4f5e5a;
    line-height: 1.6;
}

.ai-optimized-order p {
    margin: 7px 0;
    line-height: 1.65;
}

.ai-result-disclaimer {
    margin: 20px 0 0;
    padding-top: 14px;
    border-top: 1px solid #e7ddef;
}

@keyframes ai-spin {
    to { transform: rotate(360deg); }
}

.my-trips-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.trip-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.trip-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce8e2;
    border-top: 4px solid #8fc9ad;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(55, 84, 75, 0.08);
}

.trip-card-main {
    flex: 1;
    padding: 20px 20px 17px;
}

.trip-card-head,
.trip-card-labels,
.trip-card-head-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.trip-card-head {
    justify-content: space-between;
    min-height: 30px;
}

.trip-card-head-tools {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.trip-purpose-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #cdded6;
    border-radius: 999px;
    color: #526760;
    background: #f7faf8;
    font-size: 11px;
    font-weight: 800;
}

.draft-badge {
    background: var(--sky);
    color: #2b5d91;
}

.trip-card h3 {
    margin: 17px 0 15px;
    font-size: 23px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.trip-card-meta {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 0.85fr;
    gap: 0;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid #e2ebe6;
    border-radius: 9px;
    background: #f8fbf9;
}

.trip-card-meta > div {
    min-width: 0;
    padding: 0 13px;
    border-left: 1px solid #dfe8e3;
}

.trip-card-meta > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.trip-card-meta > div:last-child {
    padding-right: 0;
}

.trip-card-meta dt,
.trip-card-meta dd {
    margin: 0;
}

.trip-card-meta dt {
    margin-bottom: 4px;
    color: #76847f;
    font-size: 10px;
    font-weight: 800;
}

.trip-card-meta dd {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.trip-card-updated {
    margin: 11px 0 0;
    color: #7a8581;
    font-size: 12px;
    line-height: 1.5;
}

.trip-card-actions {
    padding: 14px 20px 17px;
    border-top: 1px solid #e6ece8;
    background: #fcfdfc;
}

.trip-card-primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.trip-card-actions .tool-button {
    width: 100%;
    min-height: 44px;
    padding-inline: 11px;
}

.trip-card-actions svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trip-delete-button {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #eaded8;
    border-radius: 50%;
    color: #d9544b;
    background: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.trip-delete-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trip-delete-button:hover,
.trip-delete-button:focus-visible {
    border-color: #f0c9c4;
    background: #fff5f3;
    outline: none;
    transform: translateY(-1px);
}

.pro-button-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 5px;
    border-radius: 999px;
    font-family: var(--font-accent);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.03em;
    color: #8b401f;
    background: #ffe4b9;
}

.tool-button.accent .pro-button-badge {
    color: #9c3029;
    background: #fff;
}

.pro-trial-dialog {
    width: min(calc(100% - 28px), 520px);
    padding: 34px 34px 30px;
    border: 1px solid #e8d9cb;
    border-top: 5px solid var(--red);
    border-radius: 16px;
    color: var(--ink);
    background: #fffdf9;
    box-shadow: 0 28px 80px rgba(35, 58, 51, 0.24);
    text-align: center;
}

.pro-trial-dialog::backdrop {
    background: rgba(30, 45, 41, 0.48);
    backdrop-filter: blur(3px);
}

.pro-trial-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 50%;
}

.pro-trial-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 14px;
    border-radius: 20px;
    font-family: var(--font-accent);
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(145deg, var(--red), #e9a34b);
    box-shadow: 0 12px 25px rgba(233, 95, 84, 0.25);
}

.pro-trial-dialog h2 {
    margin: 3px 0 9px;
    font-size: 30px;
}

.pro-trial-lead {
    margin: 0;
    color: #5d6965;
    font-size: 17px;
    line-height: 1.7;
}

.pro-trial-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 22px 0 18px;
}

.pro-trial-features span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 9px;
    border: 1px solid #dde9e3;
    border-radius: 10px;
    color: #36584f;
    background: #f4faf7;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.45;
}

.pro-trial-status {
    min-height: 0;
    margin-bottom: 10px;
    color: #5d6965;
    font-size: 13px;
}

.pro-trial-status:empty {
    display: none;
}

.pro-trial-status.is-success {
    color: #24745f;
}

.pro-trial-status.is-error {
    color: #b43d36;
}

.pro-trial-dialog .primary-action,
.pro-trial-dialog > .tool-button {
    width: 100%;
}

.pro-trial-note,
.pro-trial-used {
    display: block;
    margin: 10px 0 0;
    color: #77817d;
    font-size: 12px;
    line-height: 1.55;
}

.pro-trial-used {
    margin: 2px 0 14px;
}

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

.auth-layout.single {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
}

.auth-card {
    min-width: 0;
    background:
        linear-gradient(135deg, rgba(233, 95, 84, 0.04) 25%, transparent 25%),
        linear-gradient(315deg, rgba(140, 201, 214, 0.055) 25%, transparent 25%),
        var(--surface);
    background-size: 24px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.account-summary {
    display: grid;
    gap: 8px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #ead9c9;
    border-radius: 8px;
    background: #fffaf2;
}

.account-summary strong {
    font-size: 24px;
    overflow-wrap: anywhere;
}

.account-summary span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.role-chip {
    width: fit-content;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    background: #fff1db;
    color: #8d562d !important;
    font-size: 13px;
    font-weight: 900;
    padding: 5px 9px;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.auth-actions a {
    text-decoration: none;
}

.muted-copy,
.admin-card-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.field input[readonly] {
    background: #fff7e8;
    color: var(--muted);
    cursor: not-allowed;
}

.empty-state.compact {
    min-height: 150px;
}

/* Travel-handbook review layout */
.admin-page {
    width: min(100%, 1240px);
    padding: 18px;
}

.admin-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    border-top: 5px solid var(--red);
    background: var(--surface);
    padding: 22px 24px;
    margin-bottom: 18px;
}

.admin-hero > .tool-button {
    min-width: 112px;
}

.admin-page .community-panel {
    padding: 24px;
    margin-bottom: 20px;
    border-top: 4px solid var(--amber);
}

.admin-page .community-panel:nth-of-type(3) {
    border-top-color: var(--blue);
}

.admin-page .admin-records-panel {
    border-top-color: var(--blue);
}

.admin-page .community-panel > .section-heading {
    margin-bottom: 26px;
}

.admin-place-list {
    grid-template-columns: minmax(0, 1080px);
    gap: 20px;
}

.admin-record-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1.65fr) repeat(3, minmax(140px, 0.75fr)) auto;
    align-items: end;
    gap: 14px;
    margin: -6px 0 18px;
    padding: 18px;
    border: 1px solid #dfd5c8;
    border-radius: 8px;
    background: var(--paper);
}

.admin-record-filters .field {
    gap: 6px;
}

.admin-record-filters .field label {
    font-size: 12px;
}

.admin-record-filters input,
.admin-record-filters select {
    min-height: 46px;
    background: #fff;
}

.admin-record-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-record-filter-actions .tool-button {
    min-height: 46px;
    white-space: nowrap;
}

.admin-record-result-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto 16px;
    max-width: 1080px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-record-result-summary p {
    margin: 0;
    color: var(--ink);
}

.admin-record-result-summary span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--mint);
}

.ai-collection-source-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 20px;
    padding: 13px 15px;
    border: 1px solid #b9d9cb;
    border-left: 5px solid var(--green-dark);
    border-radius: 7px;
    background: var(--mint);
}

.ai-collection-source-note strong,
.ai-collection-source-note span {
    display: block;
}

.ai-collection-source-note span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.ai-collection-source-note a {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 2px;
}

.admin-pagination a,
.admin-pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid #d9cdbf;
    border-radius: 5px;
    background: #fffefa;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.admin-pagination a:hover,
.admin-pagination a:focus-visible,
.admin-pagination a.is-current {
    border-color: var(--blue);
    background: var(--sky);
    color: #2e6770;
}

.admin-pagination a.is-current {
    box-shadow: inset 0 -3px 0 var(--blue);
}

.admin-pagination span {
    min-width: 24px;
    border-color: transparent;
    background: transparent;
}

.admin-place-card {
    display: block;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7d9ca;
    border-top: 4px solid var(--red);
    border-left-width: 1px;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(56, 71, 65, 0.1);
}

.admin-place-card.status-approved {
    border-top-color: var(--green);
}

.admin-place-card.status-rejected {
    border-top-color: var(--muted);
}

.admin-review-summary {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 22px;
    background: var(--paper);
    border: 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background-color 160ms ease;
}

.admin-place-card:not(.is-open) .admin-review-summary {
    border-bottom-color: transparent;
}

.admin-review-summary:hover {
    background: #fffaf1;
}

.admin-review-summary:focus-visible {
    outline: 3px solid rgba(77, 156, 169, 0.22);
    outline-offset: -3px;
}

.admin-accordion-action {
    display: inline-grid;
    grid-template-columns: auto 18px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 90px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #d9cdbf;
    border-radius: 5px;
    background: #fffefa;
    color: #41524f;
    font-size: 12px;
    font-weight: 900;
}

.admin-accordion-action > [data-admin-accordion-label] {
    min-width: 2em;
    line-height: 1;
    text-align: center;
}

.admin-accordion-chevron {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--stamp);
    transform-origin: center;
    transition: transform 180ms ease;
}

.admin-accordion-chevron svg {
    display: block;
    width: 18px;
    height: 18px;
    overflow: visible;
}

.admin-accordion-chevron path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-place-card.is-open .admin-accordion-chevron {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .admin-accordion-chevron {
        transition: none;
    }
}

.admin-accordion-panel[hidden] {
    display: none;
}

.review-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.review-title-block > div {
    min-width: 0;
}

.review-title-block small,
.review-title-block strong {
    display: block;
}

.review-title-block small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.admin-review-summary .review-title-block strong {
    margin-top: 2px;
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.review-summary-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 10px 20px;
    width: min(100%, 540px);
    margin: 0;
}

@media (min-width: 981px) {
    [data-admin-all-records] .admin-review-summary {
        display: grid;
        grid-template-columns: var(--admin-record-title-width, 300px) minmax(0, 1fr) 90px;
        align-items: center;
        gap: 24px;
    }

    [data-admin-all-records] .review-title-block {
        width: 100%;
        min-width: 0;
    }

    [data-admin-all-records] .review-summary-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        width: 100%;
        max-width: none;
    }

    [data-admin-all-records] .admin-review-summary .review-summary-meta > div {
        padding-right: 12px;
        padding-left: 16px;
    }

    [data-admin-all-records] .admin-accordion-action {
        justify-self: end;
    }
}

.admin-review-summary .review-summary-meta > div {
    min-width: 0;
    padding-left: 12px;
    border-left: 2px solid var(--mint);
}

.admin-review-summary .review-summary-meta dt,
.admin-review-summary .review-summary-meta dd {
    margin: 0;
}

.admin-review-summary .review-summary-meta dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.admin-review-summary .review-summary-meta dd {
    margin-top: 3px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.admin-review-body {
    padding: 0 22px 20px;
    background: #fff;
}

.review-check-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 2px;
    padding: 11px 13px;
    background: var(--sky);
    border-left: 4px solid var(--blue);
    border-radius: 6px;
    color: #3f6068;
    font-size: 13px;
    line-height: 1.5;
}

.review-check-note strong {
    flex: 0 0 auto;
    color: var(--ink);
}

.review-form-section {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.review-section-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 2px;
}

.review-section-title > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--peach);
    border-radius: 6px;
    color: #9a4c35;
    font-size: 11px;
    font-weight: 900;
}

.review-section-title strong,
.review-section-title small {
    display: block;
}

.review-section-title strong {
    font-size: 14px;
    line-height: 1.35;
}

.review-section-title small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.admin-compact-grid {
    padding-top: 0;
    align-items: end;
}

.review-basic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.review-basic-grid .field-name {
    grid-column: 1 / -1;
}

.review-location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.review-location-grid .field-address,
.review-location-grid .field-map,
.review-location-grid .field-site {
    grid-column: 1 / -1;
}

.review-content-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.review-content-grid .field-tags,
.review-content-grid .field-notes {
    grid-column: 1 / -1;
}

.admin-tag-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.admin-tag-list {
    display: contents;
}

.admin-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #add8c3;
    border-radius: 5px;
    background: var(--mint);
    color: #326c59;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.admin-tag-chip span:last-child {
    color: #6a8e82;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.admin-tag-chip:hover,
.admin-tag-chip:focus-visible {
    border-color: #ef9f92;
    background: #fff0eb;
    color: #a44638;
}

.admin-tag-chip:hover span:last-child,
.admin-tag-chip:focus-visible span:last-child {
    color: #c34f40;
}

.admin-place-card .admin-tag-entry {
    width: min(150px, 100%);
    min-height: 36px;
    padding: 7px 10px;
    border: 1px dashed #add8c3;
    border-radius: 5px;
    background: #fbfffc;
    color: #326c59;
    font-size: 12px;
    font-weight: 800;
}

.admin-place-card .admin-tag-entry:focus {
    border-style: solid;
    outline: 2px solid rgba(111, 182, 151, 0.18);
    outline-offset: 1px;
}

.review-location-grid .field-address,
.review-location-grid .field-map {
    grid-column: auto;
}

.map-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.map-link-button {
    min-height: 40px;
    color: #356873;
    text-decoration: none;
}

.admin-place-card .field label {
    color: #41524f;
    font-size: 12px;
    margin-bottom: 6px;
}

.admin-place-card .field input,
.admin-place-card .field select,
.admin-place-card .field textarea {
    min-height: 42px;
    border-color: #dfd5ca;
    background: #fffefa;
    padding: 10px 11px;
}

.admin-place-card .field textarea {
    min-height: 88px;
}

.admin-actions {
    justify-content: center;
    gap: 9px;
    margin: 0 -22px -20px;
    padding: 16px 22px;
    background: #fbfaf6;
    border-top: 0;
}

.admin-actions .tool-button {
    min-width: 112px;
    min-height: 40px;
    padding: 8px 13px;
}

.verification-panel {
    margin: 18px -22px 0;
    padding: 16px 22px;
    border-top: 1px solid #cfe5dc;
    border-bottom: 1px solid #cfe5dc;
    background: #f5fbf8;
}

.verification-panel-head,
.verification-title,
.verification-head-actions,
.verification-check-top,
.verification-panel-foot {
    display: flex;
    align-items: center;
}

.verification-panel-head,
.verification-panel-foot {
    justify-content: space-between;
    gap: 16px;
}

.verification-title {
    gap: 10px;
    min-width: 0;
}

.verification-status-mark {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 1px #d99d32;
}

.verification-panel.status-verified .verification-status-mark {
    background: var(--green-dark);
    box-shadow: 0 0 0 1px var(--green-dark);
}

.verification-panel.status-needs_review .verification-status-mark,
.verification-panel.status-not_found .verification-status-mark {
    background: var(--amber);
    box-shadow: 0 0 0 1px #d99d32;
}

.verification-panel.status-running .verification-status-mark,
.verification-panel.is-running .verification-status-mark {
    background: #7658a7;
    box-shadow: 0 0 0 4px #eee5f8;
}

.verification-panel.status-error .verification-status-mark,
.verification-panel.status-unconfigured .verification-status-mark {
    background: var(--red);
    box-shadow: 0 0 0 1px var(--red);
}

.verification-title strong,
.verification-title small {
    display: block;
}

.verification-title strong {
    color: var(--ink);
    font-size: 15px;
}

.verification-title small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.verification-head-actions {
    justify-content: flex-end;
    gap: 9px;
}

.verification-status-label {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid #d3dfd9;
    border-radius: 4px;
    background: #fff;
    color: #53625f;
    font-size: 11px;
    font-weight: 900;
}

.verification-score {
    color: var(--green-dark);
    font-size: 20px;
    line-height: 1;
}

.verification-score-pair {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.verification-score-pair .verification-score {
    min-width: 44px;
    display: grid;
    place-items: center;
    padding: 5px 7px;
    border: 1px solid #c7ddd5;
    border-radius: 5px;
    background: #fff;
}

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

.verification-correction-summary,
.verification-manager-note {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    margin-top: 13px;
    padding: 11px 12px;
    border-left: 4px solid var(--green);
    background: #edf8f2;
}

.verification-correction-summary strong,
.verification-manager-note strong {
    color: var(--green-dark);
    font-size: 12px;
}

.verification-correction-summary p,
.verification-manager-note p {
    margin: 0;
    color: #485c57;
    font-size: 12px;
    line-height: 1.6;
}

.verification-manager-note {
    border-color: #7658a7;
    background: #f7f1fc;
}

.verification-manager-note strong {
    color: #654590;
}

.verification-change-section {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid #dceae4;
}

.verification-change-section > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.verification-change-section > header strong {
    color: var(--green-dark);
    font-size: 13px;
}

.verification-change-section.review > header strong {
    color: #765927;
}

.verification-change-section > header span {
    color: var(--muted);
    font-size: 10px;
}

.verification-change-list {
    display: grid;
    gap: 8px;
}

.verification-change {
    padding: 11px 12px;
    border-left: 4px solid var(--green);
    background: #fff;
}

.verification-change-section.review .verification-change {
    border-color: var(--amber);
    background: #fffaf0;
}

.verification-change > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.verification-change > div strong {
    font-size: 12px;
}

.verification-change > div span {
    padding: 3px 6px;
    border-radius: 99px;
    background: #e8f5ee;
    color: var(--green-dark);
    font-size: 9px;
    font-weight: 900;
}

.verification-change-section.review .verification-change > div span {
    background: #fff0cf;
    color: #765927;
}

.verification-change p {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin: 8px 0 0;
    color: #485c57;
    font-size: 11px;
}

.verification-change del,
.verification-change ins {
    min-width: 0;
    padding: 7px 8px;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.verification-change del {
    background: #fff0ed;
    color: #87534d;
}

.verification-change ins {
    background: #edf8f2;
    color: var(--green-dark);
}

.verification-change small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.verification-change-heading > div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.verification-change-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #efb4aa;
    border-radius: 6px;
    background: #fff4f1;
    color: #95483d;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.verification-change-choice input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #cf5847;
}

.verification-change-heading .verification-change-choice span {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.verification-change.is-reverted {
    border-color: #d18b7f;
    background: #fff8f6;
}

.verification-change.is-reverted ins {
    color: #74817d;
    text-decoration: line-through;
}

.verification-selection-feedback {
    min-height: 18px;
    margin: -3px 0 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.verification-selection-feedback:empty {
    min-height: 0;
    margin: 0;
}

.verification-selection-feedback[data-state="saving"] {
    color: #765927;
}

.verification-selection-feedback[data-state="success"] {
    color: var(--green-dark);
}

.verification-selection-feedback[data-state="error"] {
    color: #a33f32;
}

.verification-panel.is-selection-saving .verification-change-choice {
    cursor: wait;
    opacity: 0.62;
}

.verification-missing-fields {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 14px;
    align-items: start;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid #dceae4;
}

.verification-missing-fields > strong {
    padding-top: 4px;
    color: #765927;
    font-size: 12px;
}

.verification-missing-fields > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.verification-missing-fields span {
    padding: 4px 7px;
    border: 1px solid #efd59b;
    background: #fff8e8;
    color: #765927;
    font-size: 10px;
}

.admin-final-review-note {
    flex: 1 1 100%;
    margin: 0;
    padding: 9px 11px;
    border-left: 4px solid #7658a7;
    background: #f7f1fc;
    color: #5b5260;
    font-size: 11px;
    line-height: 1.5;
}

.admin-final-review-note strong {
    margin-right: 8px;
    color: #654590;
}

.verification-run-button {
    min-height: 34px;
    padding: 6px 10px;
    border-color: #b9d9cd;
    color: var(--green-dark);
    font-size: 12px;
}

.verification-run-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.verification-panel.is-running .verification-status-mark {
    animation: verification-pulse 1s ease-in-out infinite;
}

.verification-summary {
    margin: 12px 0 0;
    color: #485c57;
    font-size: 13px;
    line-height: 1.6;
}

.verification-progress {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #d9cce5;
    border-radius: 8px;
    background:
        radial-gradient(circle at 8% 20%, rgba(118, 88, 167, 0.1), transparent 30%),
        #fbf8fe;
    overflow: hidden;
}

.verification-progress[hidden] {
    display: none;
}

.verification-progress-visual {
    position: relative;
    width: 96px;
    height: 96px;
    margin: auto;
}

.verification-progress-visual::before,
.verification-progress-visual::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 2px dashed #bba8d1;
    border-radius: 50%;
    animation: verification-orbit 7s linear infinite;
}

.verification-progress-visual::after {
    inset: 27px;
    border-style: solid;
    border-color: #d8c9e8;
    animation-direction: reverse;
    animation-duration: 4s;
}

.verification-progress-visual span {
    position: absolute;
    z-index: 2;
    width: 13px;
    height: 13px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #7658a7;
    box-shadow: 0 2px 7px rgba(76, 54, 105, 0.28);
    animation: verification-node 2.4s ease-in-out infinite;
}

.verification-progress-visual span:nth-child(1) { top: 6px; left: 42px; }
.verification-progress-visual span:nth-child(2) { right: 7px; bottom: 20px; animation-delay: -0.8s; }
.verification-progress-visual span:nth-child(3) { left: 7px; bottom: 20px; animation-delay: -1.6s; }

.verification-progress-visual i {
    position: absolute;
    z-index: 3;
    top: 33px;
    left: 33px;
    width: 27px;
    height: 27px;
    border: 5px solid #654590;
    border-radius: 50%;
    background: #fff;
    animation: verification-lens 2.8s ease-in-out infinite;
}

.verification-progress-visual i::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 5px;
    right: -14px;
    bottom: -8px;
    border-radius: 4px;
    background: #654590;
    transform: rotate(45deg);
    transform-origin: left center;
}

.verification-progress-content > strong {
    display: block;
    color: #654590;
    font-size: 14px;
}

.verification-progress-bar {
    position: relative;
    height: 7px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 99px;
    background: #e9e1ef;
}

.verification-progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: verification-shimmer 1.7s linear infinite;
}

.verification-progress-bar i {
    display: block;
    width: 16%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7658a7, #a789c7);
    transition: width 0.8s ease;
}

.verification-progress ol {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.verification-progress li {
    position: relative;
    padding: 7px 7px 7px 19px;
    border-radius: 5px;
    background: #f0ebf4;
    color: #817889;
    font-size: 9px;
    line-height: 1.35;
}

.verification-progress li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b9afbf;
}

.verification-progress li.is-current {
    background: #eee5f8;
    color: #654590;
    font-weight: 900;
}

.verification-progress li.is-current::before {
    background: #7658a7;
    animation: verification-pulse 1s ease-in-out infinite;
}

.verification-progress li.is-complete {
    background: #e7f4ed;
    color: var(--green-dark);
}

.verification-progress li.is-complete::before {
    background: var(--green);
}

.verification-progress-content > small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 10px;
}

.verification-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dceae4;
}

.verification-check {
    min-width: 0;
    padding-left: 10px;
    border-left: 3px solid #a7b7b2;
}

.verification-check.status-match {
    border-left-color: var(--green);
}

.verification-check.status-conflict {
    border-left-color: var(--red);
}

.verification-check.status-unknown {
    border-left-color: var(--amber);
}

.verification-check-top {
    justify-content: space-between;
    gap: 8px;
}

.verification-check-top strong {
    font-size: 12px;
}

.verification-check-top span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}

.verification-check p,
.verification-check small {
    display: block;
    margin: 5px 0 0;
    color: #425450;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.verification-check small {
    color: var(--muted);
    font-size: 11px;
}

.verification-warnings {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.verification-warnings span {
    padding: 5px 8px;
    border-left: 3px solid var(--amber);
    background: #fff7e5;
    color: #765927;
    font-size: 11px;
}

.verification-sources {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 14px;
    align-items: start;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #dceae4;
}

.verification-sources > strong {
    padding-top: 6px;
    font-size: 12px;
}

.verification-sources > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.verification-sources a {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #cbded7;
    border-radius: 4px;
    background: #fff;
    color: #365f56;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.verification-sources a:hover,
.verification-sources a:focus-visible {
    border-color: var(--green-dark);
    outline: none;
}

.verification-sources a span {
    flex: 0 0 auto;
    color: var(--stamp);
    font-size: 10px;
    font-weight: 900;
}

.verification-panel-foot {
    align-items: flex-start;
    margin-top: 12px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.verification-panel-foot time {
    flex: 0 0 auto;
}

@keyframes verification-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes verification-orbit {
    to { transform: rotate(360deg); }
}

@keyframes verification-node {
    0%, 100% { transform: scale(0.8); opacity: 0.55; }
    50% { transform: scale(1.25); opacity: 1; }
}

@keyframes verification-lens {
    0%, 100% { transform: translate(-5px, -3px) rotate(-7deg); }
    50% { transform: translate(6px, 4px) rotate(7deg); }
}

@keyframes verification-shimmer {
    from { transform: translateX(-120%); }
    to { transform: translateX(340%); }
}

@media print {
    .site-header,
    .site-footer,
    .setup-panel,
    .itinerary-panel,
    .preview-panel > .panel-topline {
        display: none !important;
    }

    body,
    html,
    .app-shell,
    .planner-layout,
    .preview-panel,
    .booklet-preview,
    .booklet-page {
        display: block;
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        background: #fff;
        border: 0;
        box-shadow: none;
    }

    .planner-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1280px) {
    .planner-layout {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .preview-panel {
        grid-column: 1 / -1;
        position: static;
        max-height: none;
    }

    .booklet-preview {
        max-width: 860px;
        margin: 0 auto;
    }
}

@media (max-width: 920px) {
    .planner-layout {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .setup-panel,
    .preview-panel {
        position: static;
        max-height: none;
    }

    .panel-topline,
    .route-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar,
    .route-links {
        justify-content: flex-start;
    }

    .stop-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stop-fields .wide,
    .stop-fields .full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .planner-layout {
        padding: 10px;
    }

    .setup-panel,
    .itinerary-panel,
    .preview-panel {
        padding: 14px;
    }

    .field-grid,
    .trip-summary,
    .booklet-meta,
    .booklet-gallery {
        grid-template-columns: 1fr;
    }

    .tool-button {
        width: auto;
        white-space: normal;
        padding: 9px 10px;
    }

    .stop-header {
        grid-template-columns: 1fr;
    }

    .stop-fields {
        grid-template-columns: 1fr;
    }

    .booklet-page {
        padding: 20px;
    }

    .booklet-cover h2 {
        font-size: 26px;
    }

    .booklet-stop {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 980px) {
    .community-hero,
    .community-grid,
    .auth-layout,
    .auth-layout.single {
        grid-template-columns: 1fr;
    }

    .sticker-board {
        max-width: 420px;
    }

    .search-strip {
        grid-template-columns: 1fr;
    }

    .field-grid.ai-four-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-record-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-record-search,
    .admin-record-filter-actions {
        grid-column: 1 / -1;
    }

    .ai-page-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-review-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .admin-accordion-action {
        align-self: flex-end;
    }

    .review-summary-meta {
        width: 100%;
    }

    .review-form-section {
        grid-template-columns: 128px minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 760px) {
    .admin-page {
        padding: 10px;
    }

    .ai-collection-source-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-page .community-panel {
        padding: 18px 14px;
    }

    .admin-record-filters {
        grid-template-columns: 1fr;
        gap: 11px;
        padding: 14px;
    }

    .admin-record-search,
    .admin-record-filter-actions {
        grid-column: auto;
    }

    .admin-record-filter-actions .tool-button {
        flex: 1 1 0;
    }

    .admin-record-result-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .admin-place-card {
        grid-template-columns: 1fr;
    }

    .admin-review-summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 16px;
    }

    .admin-accordion-action {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .admin-review-summary .review-title-block {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .admin-review-summary .review-summary-meta {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .admin-review-summary .review-summary-meta > div {
        padding-left: 8px;
    }

    .admin-review-body {
        padding: 0 16px 18px;
    }

    .my-trips-topline,
    .ai-panel-heading,
    .ai-result-head,
    .ai-result-actions,
    .ai-review-summary,
    .ai-review-submit-row,
    .admin-card-head,
    .admin-card-head > div,
    .admin-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-form-actions {
        display: flex;
        align-items: stretch;
        flex-direction: column;
    }

    .ai-form-actions > small {
        max-width: none;
        text-align: center;
    }

    .ai-model-chip {
        align-self: flex-start;
    }

    .ai-form-actions .primary-action,
    .ai-result-actions .tool-button {
        width: 100%;
    }

    .ai-score-badge,
    .ai-score-badge.compact {
        width: 72px;
        min-height: 64px;
        flex-basis: 72px;
    }

    .ai-review-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        padding: 17px 15px;
    }

    .ai-review-submit-row {
        align-items: stretch;
    }

    .ai-review-submit-row .primary-action {
        width: 100%;
    }

    .ai-expectation-card,
    .ai-expectation-columns,
    .ai-dimension-grid {
        grid-template-columns: 1fr;
    }

    .ai-expectation-card > div:first-child {
        min-height: 70px;
        border-right: 0;
        border-bottom: 1px solid #ddcfeb;
        padding-bottom: 10px;
    }

    .ai-expectation-columns {
        grid-column: auto;
    }

    .my-hero-actions {
        justify-content: flex-start;
    }

    .admin-compact-grid {
        grid-template-columns: 1fr;
    }

    .review-form-section {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 20px 0;
    }

    .review-section-title {
        align-items: center;
    }

    .review-check-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .map-input-row {
        grid-template-columns: 1fr;
    }

    .admin-compact-grid .wide,
    .admin-compact-grid .field-name,
    .admin-compact-grid .field-address,
    .admin-compact-grid .field-map,
    .admin-compact-grid .field-site,
    .admin-compact-grid .field-tags,
    .admin-compact-grid .field-notes {
        grid-column: auto;
    }

    .admin-actions .tool-button {
        width: 100%;
    }

    .admin-actions {
        margin: 0 -16px -18px;
        padding: 16px;
    }

    .verification-panel {
        margin: 16px -16px 0;
        padding: 15px 16px;
    }

    .verification-panel-head,
    .verification-head-actions,
    .verification-panel-foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .verification-head-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .verification-run-button {
        margin-left: auto;
    }

    .verification-check-grid {
        grid-template-columns: 1fr;
    }

    .verification-sources {
        grid-template-columns: 1fr;
    }

    .verification-progress {
        grid-template-columns: 1fr;
    }

    .verification-progress-visual {
        width: 82px;
        height: 82px;
    }

    .verification-progress-visual span:nth-child(1) { top: 0; left: 35px; }
    .verification-progress-visual span:nth-child(2) { right: 1px; bottom: 14px; }
    .verification-progress-visual span:nth-child(3) { left: 1px; bottom: 14px; }
    .verification-progress-visual i { top: 26px; left: 26px; }

    .verification-progress ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .verification-correction-summary,
    .verification-manager-note,
    .verification-missing-fields {
        grid-template-columns: 1fr;
    }

    .verification-change-section > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .verification-change-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .verification-change-choice {
        width: 100%;
        justify-content: center;
    }

    .verification-change p {
        grid-template-columns: 1fr;
    }

    .verification-change p b {
        transform: rotate(90deg);
        text-align: center;
    }

    .verification-panel-foot time {
        flex: auto;
    }
}

/* Typography roles: Kamabit is reserved for compact labels; Latte remains the reading face. */
.eyebrow,
.place-badge,
.trip-purpose-badge,
.role-chip {
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.trip-card-meta dt {
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 900;
}

.field label,
.tool-button,
.primary-action,
.mode-tab {
    font-family: var(--font-primary);
    font-weight: 900;
}

@media (max-width: 760px) {
    .trip-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .trip-card-main {
        padding: 17px 15px 15px;
    }

    .trip-card-head {
        align-items: flex-start;
    }

    .trip-card h3 {
        font-size: 21px;
    }

    .trip-card-meta {
        grid-template-columns: 1.25fr 0.75fr 0.8fr;
        padding: 12px 10px;
    }

    .trip-card-meta > div {
        padding: 0 8px;
    }

    .trip-card-meta dd {
        font-size: 12px;
    }

    .trip-card-actions {
        padding: 14px 15px;
    }

    .trip-card-primary-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trip-card-primary-actions .tool-button {
        gap: 5px;
        padding-inline: 8px;
        font-size: 12px;
    }

    .trip-card-primary-actions .tool-button svg {
        width: 16px;
        height: 16px;
    }

    .pro-button-badge {
        font-size: 8px;
    }

    .pro-trial-dialog {
        padding: 29px 18px 24px;
    }

    .pro-trial-dialog h2 {
        font-size: 25px;
    }

    .pro-trial-features {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pro-trial-features span {
        min-height: 42px;
    }
}

@media (max-width: 620px) {
    .field-grid.ai-four-fields {
        grid-template-columns: 1fr;
    }

    .ai-page-benefits {
        grid-template-columns: 1fr;
    }

    .ai-standalone-panel {
        padding: 17px 14px;
    }

    .ai-priority-options label {
        width: 100%;
    }

    .ai-change-list article,
    .ai-flag {
        grid-template-columns: 1fr;
    }

    .place-card {
        padding: 0;
    }

    .place-card-top {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
    }

    .place-card-identity { gap: 10px; }

    .place-card .place-card-name {
        font-size: 20px;
    }

    .place-card .place-card-tags {
        max-width: none;
        justify-content: flex-start;
        justify-self: auto;
    }

    .place-card-body { padding: 14px; }

    .place-location-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 13px;
    }

    .place-link-actions {
        justify-content: stretch;
        width: 100%;
    }

    .place-card .place-inline-map,
    .place-card .place-inline-official {
        flex: 1 1 120px;
    }

    .place-quick-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .place-card .place-description-row,
    .place-card .place-products-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 13px;
    }

    .place-card .place-product-item {
        width: 100%;
        justify-content: space-between;
    }

    .place-card .place-card-add {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
    }

    .place-card .place-card-add .place-add-button {
        width: 100%;
    }

    .create-trip-layout {
        padding: 10px;
    }

    .create-only-panel {
        padding: 16px 14px;
    }

    .pending-place-notice {
        align-items: flex-start;
    }

    .day-tab {
        min-width: 102px;
    }

    .trip-picker-modal {
        align-items: end;
        padding: 8px;
    }

    .trip-picker-dialog {
        width: 100%;
        max-height: calc(100vh - 16px);
        padding: 18px 16px;
    }

    .trip-picker-place {
        margin: 16px -16px 0;
        padding: 13px 16px;
    }

    .trip-picker-option {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .trip-picker-option-status {
        grid-column: 2;
    }

    .trip-picker-actions {
        align-items: stretch;
        flex-direction: column;
        margin: 14px -16px -18px;
        padding: 14px 16px;
    }

    .trip-picker-actions .tool-button {
        width: 100%;
    }
}

@media (min-width: 921px) and (max-width: 1280px) {
    .planner-editor-layout {
        grid-template-columns: minmax(0, 1fr) 390px;
    }

    .planner-editor-layout .preview-panel {
        grid-column: auto;
        position: sticky;
        max-height: calc(100vh - 110px);
    }
}

@media (max-width: 920px) {
    .planner-editor-layout {
        grid-template-columns: 1fr;
    }

    .planner-editor-layout .preview-panel {
        grid-column: auto;
    }
}

.setup-panel.create-only-panel {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
}

.planner-editor-layout .preview-panel .panel-topline {
    align-items: stretch;
    flex-direction: column;
}

.planner-editor-layout .preview-panel .toolbar {
    justify-content: flex-start;
}

@media (max-width: 1080px) {
    .shopping-add-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px;
    }

    .shopping-note-field {
        grid-column: 1 / span 2;
    }

    .shopping-add-button {
        grid-column: 3;
    }

    .shopping-item-main {
        grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr);
    }

    .shopping-item-note {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .shopping-summary {
        width: 100%;
    }

    .shopping-summary span {
        min-width: 0;
        flex: 1;
    }

    .shopping-add-form {
        grid-template-columns: minmax(0, 1fr) 118px;
    }

    .shopping-name-field,
    .shopping-store-field,
    .shopping-note-field {
        grid-column: 1 / -1;
    }

    .shopping-quantity-field {
        grid-column: 1;
    }

    .shopping-add-button {
        grid-column: 2;
        width: 100%;
        min-width: 0;
    }

    .shopping-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 14px 0;
    }

    .shopping-filters {
        width: 100%;
    }

    .shopping-filters button {
        flex: 1;
    }

    .shopping-clear-button {
        align-self: center;
    }

    .shopping-item {
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        padding: 13px 12px;
    }

    .shopping-item-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-item-note {
        grid-column: auto;
    }

    .shopping-item-controls {
        grid-column: 2;
        justify-content: space-between;
    }
}

/* Trip Creator member administration */
.trip-members-page {
    width: min(100%, 1240px);
    padding: 18px;
}

.trip-members-hero {
    grid-template-columns: minmax(0, 1fr) auto;
}

.trip-members-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.trip-members-hero-actions .tool-button {
    min-width: 120px;
}

.trip-member-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.trip-member-stats article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 86px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--green);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.trip-member-stats article:nth-child(2) { border-top-color: var(--amber); }
.trip-member-stats article:nth-child(3) { border-top-color: var(--blue); }

.trip-member-stats span,
.trip-members-panel-heading > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.trip-member-stats strong {
    color: var(--green-dark);
    font-size: 30px;
}

.trip-members-panel {
    padding: 26px;
    border-top: 5px solid var(--red);
}

.trip-members-panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.trip-members-panel-heading h2,
.trip-members-panel-heading p {
    margin-bottom: 0;
}

.trip-member-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.trip-member-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.trip-member-card[open] {
    border-color: #9ec9b7;
    box-shadow: 0 12px 30px rgba(66, 83, 78, 0.09);
}

.trip-member-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
    padding: 17px 20px;
    cursor: pointer;
    list-style: none;
    background: #fffdf8;
}

.trip-member-card > summary::-webkit-details-marker { display: none; }

.trip-member-card > summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--green-dark);
    font-size: 18px;
    font-weight: 900;
}

.trip-member-card[open] > summary::after { content: "-"; }

.trip-member-identity {
    display: grid;
    gap: 4px;
    min-width: 220px;
}

.trip-member-identity strong { font-size: 17px; }

.trip-member-identity small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.trip-member-summary-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 7px;
}

.trip-member-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 5px;
    color: #766f64;
    background: #f2f0eb;
    font-size: 11px;
    font-weight: 900;
}

.trip-member-chip.is-role {
    color: #8a5239;
    background: #fff0e8;
}

.trip-member-chip.is-active {
    color: #286b5f;
    background: #e4f3eb;
}

.trip-member-chip.is-suspended {
    color: #a4413b;
    background: #fdeae6;
}

.trip-member-form {
    padding: 24px;
    border-top: 1px solid var(--line);
}

.trip-member-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.trip-member-fields .field small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.trip-member-details {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    margin: 22px 0 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--line);
}

.trip-member-details div {
    min-width: 0;
    padding: 13px;
    background: #f8fbf9;
}

.trip-member-details dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.trip-member-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 800;
}

.trip-member-protection {
    margin: 18px 0 0;
    color: #9a5d21;
    font-size: 12px;
    text-align: center;
}

.trip-member-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

@media (max-width: 780px) {
    .trip-members-page { padding: 12px; }
    .trip-members-hero { grid-template-columns: 1fr; }
    .trip-members-hero-actions { justify-content: flex-start; }
    .trip-member-stats,
    .trip-member-fields,
    .trip-member-details { grid-template-columns: 1fr; }
    .trip-members-panel { padding: 20px 16px; }
    .trip-member-card > summary { align-items: flex-start; flex-wrap: wrap; }
    .trip-member-identity { min-width: 0; }
    .trip-member-summary-meta { justify-content: flex-start; order: 3; width: 100%; }
}

@media (max-width: 480px) {
    .trip-member-stats { grid-template-columns: 1fr; }
    .trip-members-panel-heading { align-items: flex-start; flex-direction: column; }
    .trip-member-form { padding: 18px; }
    .trip-members-hero-actions { align-items: stretch; flex-direction: column; }
    .trip-members-hero-actions .tool-button { width: 100%; }
}

/* Planner trip details and cross-day editing */
.trip-info-panel {
    margin: 18px 0;
    padding: 20px 0;
    border-top: 1px solid #dce9e4;
    border-bottom: 1px solid #dce9e4;
}

.trip-info-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.trip-info-heading h2,
.trip-info-heading p {
    margin: 0;
}

.trip-info-heading h2 {
    margin-top: 3px;
    font-size: 20px;
}

.trip-info-heading > p {
    max-width: 440px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: right;
}

.trip-info-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    border: 1px solid #dbe7e3;
    border-radius: 7px;
    background: #f5f9f7;
}

.trip-info-tab {
    min-height: 42px;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #60716c;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.trip-info-tab.is-active {
    background: #fff;
    color: var(--green-dark);
    box-shadow: 0 2px 9px rgba(54, 91, 82, 0.1), inset 0 -3px 0 var(--green);
}

.trip-info-content {
    padding-top: 18px;
}

.trip-info-toolbar,
.trip-info-subheading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.trip-info-toolbar {
    margin-bottom: 14px;
}

.trip-info-toolbar > strong {
    font-size: 16px;
}

.trip-info-subheading {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eadfd4;
}

.trip-info-subheading > span {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.trip-transport-grid,
.trip-list-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.trip-transport-leg,
.trip-accommodation-item,
.trip-list-editor {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e5ddd2;
    border-radius: 7px;
    background: #fffdfa;
}

.trip-accommodation-list,
.trip-detail-list {
    display: grid;
    gap: 12px;
}

.trip-info-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.trip-info-field.is-full {
    grid-column: 1 / -1;
}

.trip-info-field > span {
    display: block;
    margin-bottom: 6px;
    color: #53645f;
    font-size: 11px;
    font-weight: 900;
}

.trip-info-field input,
.trip-info-field select,
.trip-info-field textarea {
    width: 100%;
    min-height: 42px;
    border-color: #ded7cc;
    background: #fff;
    font-size: 13px;
}

.trip-info-field textarea {
    min-height: 72px;
    resize: vertical;
}

.trip-info-empty {
    min-height: 90px;
    display: grid;
    place-items: center;
    border: 1px dashed #cbded6;
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.trip-detail-list-item {
    display: grid;
    grid-template-columns: 30px minmax(120px, 1.4fr) minmax(110px, 0.8fr) auto;
    align-items: center;
    gap: 8px;
}

.trip-detail-list-item.is-checked .trip-detail-text {
    color: #84918d;
    text-decoration: line-through;
}

.trip-detail-check {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.trip-detail-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--green-dark);
}

.trip-detail-text,
.trip-detail-place {
    min-width: 0;
    min-height: 40px;
    font-size: 13px;
}

.stop-actions {
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stop-day-move {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 9px;
    border: 1px solid #d8e5e0;
    border-radius: 6px;
    background: #f6faf8;
    color: #5f6f6a;
    font-size: 11px;
    font-weight: 900;
}

.stop-day-move select {
    width: auto;
    min-width: 82px;
    min-height: 28px;
    padding: 3px 24px 3px 7px;
    border: 0;
    background-color: #fff;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
}

/* Compact handbook preview details */
.booklet-info-grid,
.booklet-checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.booklet-detail-list {
    display: grid;
    gap: 9px;
}

.booklet-info-card,
.booklet-checklist {
    min-width: 0;
    padding: 11px;
    border-left: 3px solid var(--green);
    background: #f7fbf8;
}

.booklet-info-card > strong,
.booklet-checklist h4 {
    display: block;
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 13px;
}

.booklet-info-card p {
    margin: 4px 0 0;
    color: #586963;
    font-size: 11px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.booklet-info-card p b {
    display: inline-block;
    min-width: 48px;
    color: #345349;
}

.booklet-check-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 7px;
    padding: 5px 0;
    border-top: 1px solid #e1ece7;
}

.booklet-check-item > span {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    margin-top: 1px;
    border: 1px solid #9ebdb0;
    color: var(--green-dark);
    font-size: 10px;
    font-weight: 900;
}

.booklet-check-item p,
.booklet-check-item small {
    display: block;
    margin: 0;
    overflow-wrap: anywhere;
}

.booklet-check-item p {
    color: #465852;
    font-size: 11px;
    line-height: 1.45;
}

.booklet-check-item small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.booklet-check-item.is-checked p {
    color: #87918e;
    text-decoration: line-through;
}

/* Structured trip details in generated A4 PDF */
.pdf-details-sheet {
    padding: 42px 48px 62px;
}

.pdf-details-content {
    height: 806px;
    overflow: hidden;
    padding-top: 22px;
}

.pdf-detail-block {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
    padding: 18px 0;
    border-bottom: 1px solid #dedbd3;
    break-inside: avoid;
}

.pdf-detail-block:first-child {
    padding-top: 0;
}

.pdf-detail-block > header small {
    color: #df5a4f;
    font-family: var(--font-accent);
    font-size: 10px;
    letter-spacing: 0.8px;
}

.pdf-detail-block > header h3 {
    margin-top: 5px;
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pdf-detail-card-grid,
.pdf-detail-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pdf-detail-card {
    min-width: 0;
    padding: 13px;
    border-left: 4px solid #68a889;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.88);
}

.pdf-detail-card h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 15px;
}

.pdf-detail-card h4 span {
    color: #50776c;
    font-size: 10px;
}

.pdf-detail-card p,
.pdf-detail-facts p {
    margin: 5px 0 0;
    color: #51635e;
    font-size: 11px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pdf-detail-card p b,
.pdf-detail-facts p b {
    display: inline-block;
    min-width: 55px;
    color: #304b43;
}

.pdf-detail-facts .is-wide {
    grid-column: 1 / -1;
}

.pdf-check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.pdf-check-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #dce8e3;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
}

.pdf-check-item > span {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border: 1px solid #96b9ab;
    color: #327162;
    font-size: 11px;
    font-weight: 900;
}

.pdf-check-item p,
.pdf-check-item small {
    display: block;
    overflow-wrap: anywhere;
}

.pdf-check-item p {
    color: #40534e;
    font-size: 12px;
    line-height: 1.4;
}

.pdf-check-item small {
    margin-top: 2px;
    color: #788581;
    font-size: 9px;
}

.pdf-check-item.is-checked p {
    color: #87918e;
    text-decoration: line-through;
}

@media (max-width: 920px) {
    .trip-info-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .trip-info-heading > p {
        text-align: left;
    }

    .trip-transport-grid,
    .trip-list-editor-grid {
        grid-template-columns: 1fr;
    }

    .stop-header {
        grid-template-columns: 1fr;
    }

    .stop-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .trip-info-panel {
        margin: 14px 0;
        padding: 16px 0;
    }

    .trip-info-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trip-info-field-grid,
    .booklet-info-grid,
    .booklet-checklist-grid {
        grid-template-columns: 1fr;
    }

    .trip-detail-list-item {
        grid-template-columns: 30px minmax(0, 1fr) auto;
    }

    .trip-detail-place {
        grid-column: 2 / -1;
    }

    .trip-transport-leg,
    .trip-accommodation-item,
    .trip-list-editor {
        padding: 13px;
    }

    .stop-actions .icon-button {
        flex: 1 1 70px;
    }

    .stop-day-move {
        width: 100%;
        justify-content: space-between;
    }
}

/* Refined planner details: keep itinerary editing focused on transport and stays. */
.trip-info-heading {
    align-items: center;
}

.trip-checklist-link {
    flex: 0 0 auto;
    color: var(--green-dark);
    border-color: #b9d8cc;
    background: #f3faf6;
    text-decoration: none;
}

.trip-info-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 26px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #dce6e2;
    border-radius: 0;
    background: transparent;
}

.trip-info-tab {
    width: auto;
    min-width: 112px;
    min-height: 44px;
    padding: 8px 4px 11px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
}

.trip-info-tab.is-active {
    border-bottom-color: var(--green);
    background: transparent;
    box-shadow: none;
}

.trip-info-content {
    padding-top: 22px;
}

.trip-transport-grid {
    gap: 30px;
}

.trip-transport-leg,
.trip-accommodation-item {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.trip-transport-leg + .trip-transport-leg {
    padding-left: 30px;
    border-left: 1px solid #e1e7e3;
}

.trip-transport-leg .trip-info-subheading,
.trip-accommodation-item .trip-info-subheading {
    margin-bottom: 17px;
    padding: 0 0 11px;
    border-bottom-color: #e3ded6;
}

.trip-transport-leg .trip-info-subheading > span,
.trip-accommodation-item .trip-info-subheading > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-left: 4px solid var(--red);
    background: #fff6ef;
    color: #714d3c;
}

.trip-transport-leg:nth-child(2) .trip-info-subheading > span {
    border-left-color: var(--blue);
    background: #eff8f9;
    color: #3a656d;
}

.trip-info-field input,
.trip-info-field select,
.trip-info-field textarea {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d9e2de;
    border-radius: 6px;
    background: #fbfdfc;
    box-shadow: none;
}

.trip-info-field input:focus,
.trip-info-field select:focus,
.trip-info-field textarea:focus {
    border-color: #78b7a1;
    background: #fff;
    outline: 3px solid rgba(120, 183, 161, 0.14);
}

.trip-accommodation-list {
    gap: 24px;
}

.trip-accommodation-item + .trip-accommodation-item {
    padding-top: 24px;
    border-top: 1px solid #e1e7e3;
}

/* Dedicated per-trip preparation, shopping and souvenir page. */
.trip-checklist-page {
    width: min(100%, 1420px);
    padding: 22px;
}

.trip-checklist-hero {
    grid-template-columns: minmax(0, 1fr) auto;
}

.trip-checklist-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.trip-checklist-picker {
    display: grid;
    grid-template-columns: 190px minmax(260px, 1fr) minmax(160px, auto);
    align-items: end;
    gap: 22px;
    margin-top: 18px;
    padding: 20px 26px;
    border-top: 4px solid var(--amber);
}

.trip-checklist-picker-copy h2,
.trip-checklist-picker-copy p {
    margin: 0;
}

.trip-checklist-picker-copy h2 {
    margin-top: 3px;
    font-size: 21px;
}

.trip-checklist-select > span {
    display: block;
    margin-bottom: 6px;
    color: #53645f;
    font-size: 11px;
    font-weight: 900;
}

.trip-checklist-select select {
    width: 100%;
    min-height: 46px;
    padding: 9px 38px 9px 12px;
    border: 1px solid #ccdcd5;
    border-radius: 6px;
    background-color: #fff;
    color: var(--ink);
    font-weight: 800;
}

.trip-checklist-save-status {
    min-height: 24px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.trip-checklist-save-status[data-status="saved"] {
    color: var(--green-dark);
}

.trip-checklist-save-status[data-status="saving"] {
    color: #9a681f;
}

.trip-checklist-empty {
    margin-top: 18px;
    padding: 54px 26px;
    text-align: center;
}

.trip-checklist-empty h2 {
    margin: 5px 0 8px;
}

.trip-checklist-empty p:not(.eyebrow) {
    margin: 0 0 20px;
    color: var(--muted);
}

.trip-checklist-workspace {
    margin-top: 18px;
    overflow: hidden;
    padding: 0;
    border-top: 5px solid var(--green);
}

.trip-checklist-workspace-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px;
    border-bottom: 1px solid #e0e8e4;
    background: #fffdf8;
}

.trip-checklist-workspace-head h2,
.trip-checklist-workspace-head p {
    margin: 0;
}

.trip-checklist-workspace-head h2 {
    margin-top: 4px;
    font-size: 28px;
}

.trip-checklist-counts {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trip-checklist-counts span {
    min-width: 104px;
    padding: 10px 12px;
    border-left: 3px solid var(--amber);
    background: #fff7e7;
    color: #6f695f;
    font-size: 11px;
    font-weight: 800;
}

.trip-checklist-counts span:last-child {
    border-left-color: var(--green);
    background: #edf8f2;
}

.trip-checklist-counts strong {
    margin-right: 5px;
    color: var(--ink);
    font-size: 20px;
}

.trip-checklist-sections {
    padding: 0 30px 16px;
}

.trip-checklist-section {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 34px;
    padding: 30px 0;
    border-bottom: 1px solid #e0e7e3;
}

.trip-checklist-section:last-child {
    border-bottom: 0;
}

.trip-checklist-section-title {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.trip-checklist-section-title > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 6px;
    background: var(--peach);
    color: #9a5038;
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 900;
}

.trip-checklist-section:nth-child(2) .trip-checklist-section-title > span {
    background: #fff0c9;
    color: #875d18;
}

.trip-checklist-section:nth-child(3) .trip-checklist-section-title > span {
    background: var(--mint);
    color: var(--green-dark);
}

.trip-checklist-section-title h3,
.trip-checklist-section-title p,
.trip-checklist-section-title small {
    display: block;
    margin: 0;
}

.trip-checklist-section-title h3 {
    margin-top: 3px;
    font-size: 19px;
}

.trip-checklist-section-title small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.trip-checklist-section-body {
    min-width: 0;
}

.trip-checklist-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding-bottom: 15px;
}

.trip-checklist-add.has-place {
    grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 0.8fr) auto;
}

.trip-checklist-add input {
    min-width: 0;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #d5e0db;
    border-radius: 6px;
    background: #fbfdfc;
}

.trip-checklist-add input:focus,
.trip-checklist-row input[type="text"]:focus {
    border-color: #78b7a1;
    background: #fff;
    outline: 3px solid rgba(120, 183, 161, 0.14);
}

.trip-checklist-add .tool-button {
    min-width: 94px;
    min-height: 44px;
}

.trip-checklist-list {
    border-top: 1px solid #e2e8e5;
}

.trip-checklist-row {
    display: grid;
    grid-template-columns: 34px minmax(180px, 1.3fr) minmax(150px, 0.7fr) 38px;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 2px;
    border-bottom: 1px solid #e8edea;
}

.trip-checklist-section[data-with-place="false"] .trip-checklist-row {
    grid-template-columns: 34px minmax(0, 1fr) 38px;
}

.trip-checklist-check {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.trip-checklist-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.trip-checklist-check span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 2px solid #9cb9ae;
    border-radius: 5px;
    background: #fff;
}

.trip-checklist-check input:checked + span {
    border-color: var(--green-dark);
    background: var(--green-dark);
}

.trip-checklist-check input:checked + span::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.trip-checklist-row input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--ink);
}

.trip-checklist-row input[type="text"]:hover {
    border-color: #dbe4df;
    background: #fff;
}

.trip-checklist-row.is-checked .trip-checklist-item-text {
    color: #8a9591;
    text-decoration: line-through;
}

.trip-checklist-item-place {
    color: #61716c !important;
    font-size: 12px;
}

.trip-checklist-remove {
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #c35a50;
    cursor: pointer;
    font-size: 19px;
}

.trip-checklist-remove:hover,
.trip-checklist-remove:focus-visible {
    border-color: #efc9c2;
    background: #fff1ee;
    outline: none;
}

.trip-checklist-list-empty {
    min-height: 86px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 920px) {
    .trip-transport-leg + .trip-transport-leg {
        padding-top: 22px;
        padding-left: 0;
        border-top: 1px solid #e1e7e3;
        border-left: 0;
    }

    .trip-checklist-hero,
    .trip-checklist-picker,
    .trip-checklist-section {
        grid-template-columns: 1fr;
    }

    .trip-checklist-hero-actions {
        justify-content: flex-start;
    }

    .trip-checklist-picker {
        align-items: stretch;
        gap: 14px;
    }

    .trip-checklist-save-status {
        margin: 0;
        text-align: left;
    }

    .trip-checklist-section {
        gap: 18px;
    }
}

@media (max-width: 620px) {
    .trip-info-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

    .trip-info-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .trip-info-tab {
        width: 100%;
        min-width: 0;
    }

    .trip-checklist-page {
        padding: 12px;
    }

    .trip-checklist-hero-actions,
    .trip-checklist-workspace-head {
        align-items: stretch;
        flex-direction: column;
    }

    .trip-checklist-hero-actions .tool-button {
        width: 100%;
    }

    .trip-checklist-picker,
    .trip-checklist-workspace-head,
    .trip-checklist-sections {
        padding-right: 17px;
        padding-left: 17px;
    }

    .trip-checklist-counts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trip-checklist-counts span {
        min-width: 0;
    }

    .trip-checklist-add,
    .trip-checklist-add.has-place {
        grid-template-columns: 1fr;
    }

    .trip-checklist-add .tool-button {
        width: 100%;
    }

    .trip-checklist-row,
    .trip-checklist-section[data-with-place="false"] .trip-checklist-row {
        grid-template-columns: 32px minmax(0, 1fr) 36px;
    }

    .trip-checklist-item-place {
        grid-column: 2 / -1;
    }
}
