/* Travel guide: four sections (trip plan, days, places, expenses), the hero toolbar,
   compact metrics, per-place stories, ratings and the expense infographic.
   Loaded after the other guide styles; colours come from the studio tokens so the
   dark theme follows automatically. */

/* ---------- which block shows in which section ---------- */
.ai-guide[data-guide-view="route"] [data-guide-metrics],
.ai-guide[data-guide-view="selection"] [data-guide-metrics],
.ai-guide[data-guide-view="route"] [data-guide-assumptions],
.ai-guide[data-guide-view="selection"] [data-guide-assumptions],
.ai-guide[data-guide-view="budget"] [data-guide-assumptions],
.ai-guide[data-guide-view="budget"] [data-guide-journey],
.ai-guide[data-guide-view="overview"] [data-guide-budget-summary],
.ai-guide[data-guide-view="overview"] [data-guide-discovery],
.ai-guide[data-guide-view="overview"] [data-guide-day-tabs],
.ai-guide[data-guide-view="overview"] [data-guide-day-content] { display: none !important; }

/* ---------- hero toolbar ---------- */
.ai-guide__result-top .ai-guide__hero-copy { display: grid; gap: 4px; max-width: 760px; }
.ai-guide__hero-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    background: rgba(10, 24, 18, .55);
    backdrop-filter: blur(14px);
}

.ai-guide__hero-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-guide__hero-group:not(.ai-guide__hero-group--main) .is-danger { margin-left: auto; }

.ai-guide__hero-btn {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: background .15s, transform .15s;
}

.ai-guide__hero-btn img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.ai-guide__hero-btn:hover { background: rgba(255, 255, 255, .26); transform: translateY(-1px); }
.ai-guide__hero-btn.is-primary { border-color: transparent; background: #ff671d; }
.ai-guide__hero-btn.is-primary:hover { background: #ff7a38; }
.ai-guide__hero-btn.is-danger { border-color: rgba(255, 138, 122, .45); color: #ffd3cc; background: rgba(255, 90, 70, .12); }
.ai-guide__hero-btn[hidden] { display: none; }

.ai-guide__howto-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 18px 8px 10px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffb27a, #ff671d);
    color: #2b1204;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(255, 103, 29, .35);
    transition: transform .15s, box-shadow .15s;
}

.ai-guide__howto-button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 103, 29, .45); }

.ai-guide__howto-button-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: #ff671d;
    font-size: 19px;
    font-weight: 800;
}

.ai-guide__howto-button-copy { display: grid; gap: 1px; flex: 1; }
.ai-guide__howto-button::after { content: '→'; margin-left: auto; padding-right: 6px; font-size: 22px; font-weight: 800; }
.ai-guide__howto-button-copy b { font-size: 14.5px; }
.ai-guide__howto-button-copy small { font-size: 11.5px; opacity: .8; }

/* ---------- compact metrics + budget card ---------- */
.ai-guide__metrics {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px !important;
    margin: 14px 0 !important;
}

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

.ai-guide__stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px 0 12px;
    border: 1px solid var(--tp-line, #e3e8ee);
    border-radius: 14px;
    background: var(--tp-card, #fff);
    color: var(--tp-muted, #4c5b6b);
    font-size: 13px;
}

.ai-guide__stat img { width: 20px; height: 20px; }
.ai-guide__stat b { color: var(--tp-ink, #14212b); font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }

.ai-guide__budget-card {
    display: grid;
    flex: 1 1 280px;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 2px 14px;
    min-width: 0;
    padding: 12px 18px;
    border: 1px solid #f0cfae;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff6ea, #ffeedd);
    color: #5a3a14;
}

.ai-guide__budget-card-label {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ai-guide__budget-card-label img { width: 16px; height: 16px; }
.ai-guide__budget-card strong { font-size: clamp(20px, 2.4vw, 26px); font-weight: 830; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ai-guide__budget-card strong small { font-size: .55em; font-weight: 800; letter-spacing: .05em; }
.ai-guide__budget-card-rub { color: #b4560f; font-size: 15px; font-weight: 800; white-space: nowrap; }
.ai-guide__budget-card em { grid-column: 1 / -1; font-size: 12px; font-style: normal; opacity: .8; }
.ai-guide__budget-card.is-empty { border-color: var(--tp-line, #e3e8ee); background: var(--tp-card, #fff); color: var(--tp-muted, #4c5b6b); }

/* ---------- overview: trip story, days, map ---------- */
.ai-guide__overview { display: grid; gap: 16px; }

.ai-guide__trip-story,
.ai-guide__trip-days,
.ai-guide__trip-map-section {
    padding: 20px;
    border: 1px solid var(--tp-line, #e3e8ee);
    border-radius: 20px;
    background: var(--tp-card, #fff);
}

.ai-guide__trip-story h3,
.ai-guide__trip-days h3,
.ai-guide__trip-map-section h3 { margin: 0; font-size: 19px; }

.ai-guide__trip-map-section .ai-guide__section-title { align-items: center; }
.ai-guide__trip-map-section .ai-guide__outline-action { margin-left: auto; }

.ai-guide__trip-story-text { display: grid; gap: 12px; margin-top: 14px; }
.ai-guide__trip-story-text p { margin: 0; max-width: 74ch; color: var(--tp-ink, #1d2a35); font-size: 16.5px; line-height: 1.7; }
.ai-guide__trip-story-text { gap: 10px; }
.ai-guide__trip-story-text p.is-day { margin: 0; padding: 8px 12px; border-left: 3px solid #ff671d; border-radius: 4px 10px 10px 4px; background: var(--tp-accent-soft, #fff4ea); font-size: 15px; line-height: 1.55; }

.ai-guide__trip-day-list { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }

.ai-guide__trip-day {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--tp-line, #e3e8ee);
    border-radius: 14px;
    background: var(--tp-card, #fff);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.ai-guide__trip-day:hover { border-color: #ff671d; box-shadow: 0 6px 18px rgba(255, 103, 29, .12); }
.ai-guide__trip-day .ai-guide__day-number { flex: none; width: 34px; height: 34px; color: #fff; font-weight: 800; }
.ai-guide__trip-day-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ai-guide__trip-day-copy strong { color: var(--tp-ink, #14212b); font-size: 15px; }
.ai-guide__trip-day-copy small { color: var(--tp-muted, #5b6b78); font-size: 12.5px; }
.ai-guide__trip-day-places { color: var(--tp-muted, #5b6b78); font-size: 13px; overflow-wrap: anywhere; }
.ai-guide__trip-day-open { flex: none; color: #ff671d; font-size: 13px; white-space: nowrap; }

.ai-guide__trip-map { height: clamp(300px, 42vw, 460px); margin-top: 14px; overflow: hidden; border-radius: 16px; background: #dfe8e2; }
.ai-guide__trip-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--tp-muted, #5b6b78); font-size: 13px; }
.ai-guide__trip-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ai-guide__trip-legend i { width: 14px; height: 14px; border-radius: 50%; }

/* ---------- per-place story spoiler ---------- */
.ai-guide__place > .ai-guide__timeline-time { grid-row: 1 / span 2 !important; }
.ai-guide__place > .ai-guide__place-story { grid-column: 2; grid-row: 1; margin: 0 0 8px; }
.ai-guide__place > .ai-guide__place-card { grid-row: 2 !important; }

.ai-guide__place-story {
    border: 1px solid #f1d6bf;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff8f0, #fff2e5);
    color: #4b3320;
}

.ai-guide__place-story summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 700;
}

.ai-guide__place-story summary::-webkit-details-marker { display: none; }
.ai-guide__place-story-title { display: inline-flex; align-items: center; gap: 8px; }
.ai-guide__place-story-title img { width: 18px; height: 18px; }
.ai-guide__place-story-action { margin-left: auto; color: #ff671d; font-size: 13px; }
.ai-guide__place-story[open] .ai-guide__place-story-action::after { content: ' ▲'; }
.ai-guide__place-story:not([open]) .ai-guide__place-story-action::after { content: ' ▼'; }
.ai-guide__place-story p { margin: 0; padding: 0 16px 14px; max-width: 76ch; font-size: 15.5px; line-height: 1.65; }

/* ---------- day story extras ---------- */
.ai-guide__story-hint { margin: 0 0 12px; color: var(--tp-muted, #5b6b78); font-size: 13px; }
.ai-guide__story-outro { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: #fff6ec; color: #5a3a14; }
.ai-guide__story-outro img { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.ai-guide__story-outro p { margin: 0; font-size: 15px; line-height: 1.6; }

/* ---------- rating under the photo, photo credit below the photo ---------- */
.ai-guide__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 2px; }
.ai-guide__rating-stars { color: #f5a623; font-size: 17px; letter-spacing: 1px; line-height: 1; }
.ai-guide__rating-stars i { color: #d6dbe1; font-style: normal; }
.ai-guide__rating b { color: var(--tp-ink, #14212b); font-size: 18px; font-weight: 800; }
.ai-guide__rating small { color: var(--tp-muted, #5b6b78); font-size: 12.5px; }

.ai-guide__place-media > .ai-guide__gallery-attribution {
    position: static !important;
    display: block;
    margin: 6px 2px 0;
    padding: 0 !important;
    background: none !important;
    color: var(--tp-muted, #6b7a86) !important;
    font-size: 11.5px;
    line-height: 1.35;
    text-shadow: none !important;
}

.ai-guide__place-media > .ai-guide__gallery-attribution a { color: inherit; text-decoration: underline; }

/* ---------- food: photo, menu link ---------- */
.ai-guide__meal-stop-card { display: grid !important; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px; }
.ai-guide__meal-stop-card > .ai-guide__icon-tile { display: none; }
.ai-guide__meal-stop-media { display: grid; gap: 4px; }

.ai-guide__meal-stop-photo {
    position: relative;
    display: grid;
    place-items: center;
    width: 112px;
    height: 84px;
    overflow: hidden;
    border-radius: 12px;
    background: #f3e6d9;
}

.ai-guide__meal-stop-photo img:not(.ai-guide__icon-image) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ai-guide__meal-stop-photo.is-empty img { width: 34px; height: 34px; }
.ai-guide__meal-stop-credit { color: var(--tp-muted, #6b7a86); font-size: 10.5px; line-height: 1.3; }
.ai-guide__meal-stop-body { display: grid; gap: 4px; min-width: 0; }
.ai-guide__meal-stop-kind { color: #d9531a; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ai-guide__meal-stop-body > strong { font-size: 16px; }
.ai-guide__meal-stop-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.ai-guide__meal-stop-links a,
.ai-guide__menu-link { display: inline-flex; align-items: center; gap: 6px; color: #d9531a; font-size: 13px; font-weight: 700; text-decoration: none; }
.ai-guide__meal-stop-links a:hover,
.ai-guide__menu-link:hover { text-decoration: underline; }
.ai-guide__meal-stop-links img,
.ai-guide__menu-link img { width: 15px; height: 15px; }
.ai-guide__food-item { display: grid; gap: 4px; }
.ai-guide__food-item > .ai-guide__menu-link { padding: 0 14px 6px; }

/* ---------- places section ---------- */
.ai-guide__discovery-card-body > .ai-guide__discovery-photo-credit { position: static !important; display: block; margin: 0 0 4px; color: var(--tp-muted, #6b7a86); font-size: 11px; background: none !important; }
.ai-guide__discovery-about { margin: 6px 0; font-size: 13px; }
.ai-guide__discovery-about summary { color: #d9531a; font-weight: 700; cursor: pointer; }
.ai-guide__discovery-about p { margin: 6px 0 0; color: var(--tp-muted, #4c5b6b); line-height: 1.55; }

/* ---------- expenses ---------- */
.ai-guide__budget { display: grid; gap: 16px; }
.ai-guide__budget-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ai-guide__budget-head h3 { margin: 0; font-size: 20px; }
.ai-guide__budget[data-x] { display: grid; }
[data-guide-budget-summary][data-budget-mode="group"] [data-budget-person],
[data-guide-budget-summary][data-budget-mode="person"] [data-budget-group] { display: none; }

.ai-guide__budget-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ai-guide__budget-total { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--tp-line, #e3e8ee); border-radius: 18px; background: var(--tp-card, #fff); }
.ai-guide__budget-total:first-child { border-color: #f0cfae; background: linear-gradient(135deg, #fff6ea, #ffeedd); color: #5a3a14; }
.ai-guide__budget-total > span:first-child { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.ai-guide__budget-total > strong { font-size: clamp(22px, 3vw, 30px); font-weight: 830; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ai-guide__budget-total small { font-size: 13px; opacity: .8; }

.ai-guide__budget-status { width: fit-content; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.ai-guide__budget-status.is-ok { background: #dff3e8; color: #1b6b45; }
.ai-guide__budget-status.is-warn { background: #fde7d9; color: #a2400d; }

.ai-guide__budget-chart,
.ai-guide__budget-block,
.ai-guide__budget-days,
.ai-guide__budget-note { padding: 18px 20px; border: 1px solid var(--tp-line, #e3e8ee); border-radius: 18px; background: var(--tp-card, #fff); }

.ai-guide__budget h4 { margin: 0 0 12px; font-size: 16px; }
.ai-guide__budget h5 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--tp-ink, #14212b); font-size: 13px; }
.ai-guide__budget h5 img { width: 16px; height: 16px; }

.ai-guide__budget-bar { display: flex; height: 22px; overflow: hidden; border-radius: 999px; background: #edf0f3; }
.ai-guide__budget-bar i { display: block; height: 100%; }
.ai-guide__budget-bar i + i { box-shadow: -2px 0 0 var(--tp-card, #fff); }
.is-road { background: #4d6fbf; }
.is-meals { background: #ed7042; }
.is-transit { background: #237b6b; }
.is-other { background: #b67d25; }

.ai-guide__budget-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; }
.ai-guide__budget-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 8px; font-size: 13.5px; }
.ai-guide__budget-legend li i { width: 12px; height: 12px; border-radius: 4px; }
.ai-guide__budget-legend b { font-variant-numeric: tabular-nums; }
.ai-guide__budget-legend small { color: var(--tp-muted, #5b6b78); min-width: 34px; text-align: right; }

.ai-guide__budget-lines { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ai-guide__budget-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.ai-guide__budget-lines li span { min-width: 0; color: var(--tp-muted, #4c5b6b); overflow-wrap: anywhere; }
.ai-guide__budget-lines li b { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.ai-guide__budget-block small { display: block; margin-top: 8px; color: var(--tp-muted, #5b6b78); }

.ai-guide__budget-day { padding: 14px 0; border-top: 1px solid var(--tp-line, #e8ecf0); }
.ai-guide__budget-day:first-of-type { border-top: 0; padding-top: 0; }
.ai-guide__budget-day > header { display: flex; align-items: center; gap: 12px; }
.ai-guide__budget-day > header .ai-guide__day-number { flex: none; width: 30px; height: 30px; color: #fff; font-weight: 800; }
.ai-guide__budget-day > header div { display: grid; flex: 1; min-width: 0; }
.ai-guide__budget-day > header strong { font-size: 15px; }
.ai-guide__budget-day > header small { color: var(--tp-muted, #5b6b78); }
.ai-guide__budget-day > header > b { text-align: right; font-variant-numeric: tabular-nums; }
.ai-guide__budget-daybar { height: 8px; margin: 10px 0 12px; overflow: hidden; border-radius: 999px; background: #edf0f3; }
.ai-guide__budget-daybar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffb27a, #ff671d); }
.ai-guide__budget-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

.ai-guide__budget-note ul { margin: 0; padding-left: 20px; color: var(--tp-muted, #4c5b6b); font-size: 13.5px; line-height: 1.6; }

/* ---------- dialogs ---------- */
.ai-guide__congrats { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(8, 20, 15, .62); backdrop-filter: blur(6px); }
.ai-guide__congrats[hidden] { display: none; }

.ai-guide__congrats-dialog {
    width: min(480px, 100%);
    padding: 32px 28px 26px;
    border-radius: 26px;
    background: var(--tp-card, #fff);
    color: var(--tp-ink, #14212b);
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    animation: ai-guide-pop .35s ease;
}

.ai-guide__congrats-icon { display: block; margin-bottom: 8px; font-size: 52px; line-height: 1; }
.ai-guide__congrats-dialog h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.2; text-wrap: balance; }
.ai-guide__congrats-dialog p { margin: 0 0 22px; color: var(--tp-muted, #4c5b6b); font-size: 15px; line-height: 1.6; }
.ai-guide__congrats-actions { display: grid; gap: 10px; }

.ai-guide__congrats-btn {
    min-height: 50px;
    padding: 0 20px;
    border: 1.5px solid var(--tp-line, #d9e0e6);
    border-radius: 14px;
    background: var(--tp-card, #fff);
    color: var(--tp-ink, #14212b);
    font: inherit;
    font-size: 15.5px;
    font-weight: 750;
    cursor: pointer;
}

.ai-guide__congrats-btn:hover { border-color: #ff671d; }
.ai-guide__congrats-btn.is-primary { border-color: transparent; background: #ff671d; color: #fff; }
.ai-guide__congrats-btn.is-primary:hover { background: #ff7a38; }

@keyframes ai-guide-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ai-guide__congrats-dialog { animation: none; } }

.ai-guide__how-dialog--guide { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.ai-guide__how-sections { display: grid; gap: 10px; margin: 16px 0; }
.ai-guide__how-sections article { display: flex; gap: 14px; padding: 14px; border-radius: 14px; background: var(--tp-accent-soft, #f6f8fa); }
.ai-guide__how-sections article > span { flex: none; color: #ff671d; font-size: 20px; font-weight: 830; }
.ai-guide__how-sections strong { display: block; margin-bottom: 4px; font-size: 16px; }
.ai-guide__how-sections p { margin: 0; color: var(--tp-muted, #4c5b6b); font-size: 14px; line-height: 1.55; }
.ai-guide__how-subtitle { margin: 18px 0 8px; font-size: 16px; }
.ai-guide__how-list { margin: 0 0 12px; padding-left: 20px; color: var(--tp-muted, #4c5b6b); font-size: 14px; line-height: 1.6; }
.ai-guide__how-list b { color: var(--tp-ink, #14212b); }

/* ---------- dark theme ---------- */
html[data-theme="dark"] .ai-guide__budget-card,
html[data-theme="dark"] .ai-guide__budget-total:first-child { border-color: #5a4126; background: linear-gradient(135deg, #2b2218, #33261a); color: #f3dcc0; }
html[data-theme="dark"] .ai-guide__budget-card-rub { color: #ffb27a; }
html[data-theme="dark"] .ai-guide__place-story,
html[data-theme="dark"] .ai-guide__story-outro { border-color: #4a3524; background: #2a2018; color: #eed9c2; }
html[data-theme="dark"] .ai-guide__budget-bar,
html[data-theme="dark"] .ai-guide__budget-daybar { background: #26313d; }
html[data-theme="dark"] .ai-guide__budget-status.is-ok { background: #16302a; color: #8fd9b4; }
html[data-theme="dark"] .ai-guide__budget-status.is-warn { background: #3a241a; color: #ffb48a; }
html[data-theme="dark"] .ai-guide__rating-stars i { color: #3a4552; }
html[data-theme="dark"] .ai-guide__meal-stop-photo { background: #2a2018; }

/* ---------- phones ---------- */
@media (max-width: 700px) {
    .ai-guide__hero-toolbar { padding: 10px; }
    .ai-guide__hero-btn { flex: 1 1 calc(50% - 8px); justify-content: center; padding: 0 10px; font-size: 13px; white-space: normal; text-align: center; line-height: 1.2; min-height: 44px; }
    .ai-guide__hero-group:not(.ai-guide__hero-group--main) .is-danger { margin-left: 0; }
    .ai-guide__stats { width: 100%; }
    .ai-guide__stat { flex: 1 1 0; justify-content: center; padding: 0 8px; }
    .ai-guide__budget-card { flex-basis: 100%; }
    .ai-guide__trip-story, .ai-guide__trip-days, .ai-guide__trip-map-section,
    .ai-guide__budget-chart, .ai-guide__budget-block, .ai-guide__budget-days, .ai-guide__budget-note { padding: 14px; }
    .ai-guide__trip-day-open { display: none; }
    .ai-guide__trip-story-text p { font-size: 15.5px; }
    .ai-guide__meal-stop-card { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
    .ai-guide__meal-stop-photo { width: 92px; height: 72px; }
    .ai-guide__congrats-dialog { padding: 26px 20px 20px; }
    .ai-guide__budget-legend li { grid-template-columns: 12px 1fr auto; }
    .ai-guide__budget-legend small { display: none; }
}

.ai-guide__timeline-time.is-meal > strong { padding-right: 20px; }

.ai-guide__discovery-card-body .ai-guide__rating { display: flex; justify-content: flex-start; gap: 2px 8px; margin: 4px 0; }
.ai-guide__discovery-card-body .ai-guide__rating b { font-size: 15px; }

html[data-theme="dark"] .ai-guide__rating b,
html[data-theme="dark"] .ai-guide__stat b,
html[data-theme="dark"] .ai-guide__trip-day-copy strong,
html[data-theme="dark"] .ai-guide__trip-story-text p,
html[data-theme="dark"] .ai-guide__budget h4,
html[data-theme="dark"] .ai-guide__budget h5,
html[data-theme="dark"] .ai-guide__budget-day > header strong,
html[data-theme="dark"] .ai-guide__how-list b,
html[data-theme="dark"] .ai-guide__congrats-dialog,
html[data-theme="dark"] .ai-guide__congrats-btn { color: #eef3f8; }
html[data-theme="dark"] .ai-guide__rating small,
html[data-theme="dark"] .ai-guide__trip-day-copy small,
html[data-theme="dark"] .ai-guide__trip-day-places,
html[data-theme="dark"] .ai-guide__budget-lines li span,
html[data-theme="dark"] .ai-guide__how-sections p,
html[data-theme="dark"] .ai-guide__how-list,
html[data-theme="dark"] .ai-guide__congrats-dialog p { color: #b9c6d4; }
html[data-theme="dark"] .ai-guide__congrats-dialog,
html[data-theme="dark"] .ai-guide__congrats-btn:not(.is-primary) { background: #18222d; }
@media (max-width: 420px) {
    .ai-guide__hero-btn { padding: 0 6px; font-size: 12.5px; min-width: 0; }
}

@media (max-width: 700px) {
    .ai-guide__trip-map-section .ai-guide__section-title { flex-wrap: wrap; }
    .ai-guide__trip-map-section .ai-guide__outline-action { width: 100%; margin-left: 0; justify-content: center; }
    .ai-guide__stat { gap: 5px; padding: 0 6px; font-size: 12px; }
    .ai-guide__stat b { font-size: 17px; }
}

.ai-guide__budget-basis { padding: 18px 20px; border: 1px solid var(--tp-line, #e3e8ee); border-radius: 18px; background: var(--tp-card, #fff); }
.ai-guide__budget-basis ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ai-guide__budget-basis li { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--tp-accent-soft, #f6f8fa); }
.ai-guide__budget-basis li > img { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.ai-guide__budget-basis strong { display: block; margin-bottom: 3px; font-size: 14px; }
.ai-guide__budget-basis p { margin: 0; color: var(--tp-muted, #4c5b6b); font-size: 13px; line-height: 1.55; }
.ai-guide__budget-basis .ai-guide__budget-basis-note { margin-top: 12px; font-size: 12.5px; }
html[data-theme="dark"] .ai-guide__budget-basis h4, html[data-theme="dark"] .ai-guide__budget-basis strong { color: #eef3f8; }
html[data-theme="dark"] .ai-guide__budget-basis p { color: #b9c6d4; }

/* ---------- a reader from the showcase: same guide, no author tools ---------- */
.ai-guide.is-shared-view .ai-guide__hero-group,
.ai-guide.is-shared-view .ai-guide__hero-toolbar [data-guide-edit],
.ai-guide.is-shared-view .ai-guide__hero-toolbar [data-guide-delete],
.ai-guide.is-shared-view .ai-guide__hero-toolbar [data-guide-pdf],
.ai-guide.is-shared-view .ai-guide__hero-toolbar [data-guide-share],
.ai-guide.is-shared-view .ai-guide__hero-toolbar [data-guide-visibility],
.ai-guide.is-shared-view .ai-guide__hero-toolbar [data-guide-research],
.ai-guide.is-shared-view .ai-guide__hero-toolbar [data-guide-cover-editor] { display: none !important; }

.ai-guide__showcase {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin: 14px 0;
    padding: 14px 18px;
    border: 1px solid var(--tp-line, #e3e8ee);
    border-radius: 18px;
    background: var(--tp-card, #fff);
}

.ai-guide__showcase-author { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.ai-guide__showcase-author i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #ff671d; color: #fff; font-style: normal; font-weight: 800; }
.ai-guide__showcase-author span { display: grid; font-weight: 750; }
.ai-guide__showcase-author small { color: var(--tp-muted, #5b6b78); font-size: 12px; font-weight: 600; }
.ai-guide__showcase-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }

.ai-guide__showcase-btn {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1.5px solid var(--tp-line, #d9e0e6);
    border-radius: 12px;
    background: var(--tp-card, #fff);
    color: var(--tp-ink, #14212b);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.ai-guide__showcase-btn.is-primary { border-color: transparent; background: #ff671d; color: #fff; }
.ai-guide__showcase-note { flex: 1 1 100%; margin: 0; color: var(--tp-muted, #5b6b78); font-size: 12.5px; }
.ai-guide__showcase-status { flex: 1 1 100%; margin: 0; font-size: 13.5px; font-weight: 700; }
.ai-guide__showcase-status a { color: #d9531a; }
html[data-theme="dark"] .ai-guide__showcase-btn:not(.is-primary) { color: #eef3f8; background: #18222d; }
@media (max-width: 700px) { .ai-guide__showcase-actions { margin-left: 0; width: 100%; } }

.ai-guide__budget-found { margin-top: 14px; padding: 14px 16px; border: 1px solid #cfe7da; border-radius: 14px; background: #f1f9f4; }
.ai-guide__budget-found strong { display: block; margin-bottom: 8px; font-size: 14px; }
.ai-guide__budget-found ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ai-guide__budget-found li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13.5px; }
.ai-guide__budget-found li span { flex: 1 1 200px; color: var(--tp-muted, #4c5b6b); }
.ai-guide__budget-found li b { font-variant-numeric: tabular-nums; }
.ai-guide__budget-found li a { color: #d9531a; font-weight: 700; text-decoration: none; }
.ai-guide__budget-found small { display: block; margin-top: 8px; color: var(--tp-muted, #5b6b78); }
html[data-theme="dark"] .ai-guide__budget-found { border-color: #2b4a40; background: #14261f; }
html[data-theme="dark"] .ai-guide__budget-found strong { color: #eef3f8; }

.ai-guide__hero-credit { position: absolute; right: 14px; bottom: 8px; max-width: min(70%, 520px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: rgba(255, 255, 255, .82); text-decoration: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.ai-guide__hero-credit:hover { text-decoration: underline; }
