.portal-theme-toggle:not([hidden]) {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--soft);
    color: var(--ink);
    cursor: pointer;
}

.portal-theme-toggle:hover { border-color: var(--dark); }
.portal-theme-toggle .theme-sun,
[data-theme="dark"] .portal-theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .portal-theme-toggle .theme-sun { display: block; }

.portal-heading-actions,
.portal-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.portal-toolbar-actions { margin-inline-start: auto; }
.portal-sidebar-heading .portal-theme-toggle:not([hidden]) { display: none; }

.world .bio-shell {
    display: block;
    width: min(100%, 640px);
    min-height: 100dvh;
}

.bio-shell .world-content { padding: 32px 20px; }
.bio-heading { margin-bottom: 26px; }
.bio-heading-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bio-heading h1, .bio-heading p { margin: 0; }
.bio-heading p { margin-top: 8px; color: var(--muted); }
.bio-brand {
    color: var(--dark);
    font: 700 clamp(42px, 9vw, 58px)/1.04 "Travel Ever Hand", "Segoe Print", cursive;
    letter-spacing: -1.6px;
    text-decoration: none;
}

.bio-links { display: grid; gap: 10px; }
.bio-link {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 72px;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--theme-surface, #fff);
    color: var(--ink);
    text-decoration: none;
}

.bio-link:first-child {
    border-color: var(--dark);
    background: var(--dark);
    color: #fff;
}

.bio-link strong, .bio-link small { display: block; }
.bio-link strong { font-weight: 800; }
.bio-link small { margin-top: 2px; color: var(--muted); font-size: 13px; }
.bio-link:first-child small { color: #f1ebff; }
.bio-link-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 9px;
    background: var(--soft);
    color: var(--theme-link, var(--dark));
}

.bio-link:first-child .bio-link-icon { background: rgb(255 255 255 / 15%); color: inherit; }
.bio-link-arrow { font-size: 20px; }
.bio-link:hover { border-color: var(--theme-link, var(--dark)); }
.bio-link:hover strong { text-decoration: underline; }
.bio-shell .world-footer .social-links { flex-basis: 100%; }

@media (max-width: 760px) {
    .portal-sidebar-heading .portal-theme-toggle:not([hidden]) { display: inline-grid; margin-inline-start: auto; }
    .portal-theme-toggle--desktop:not([hidden]),
    .portal-toolbar-actions:not(:has(.portal-edit)) { display: none; }
    .bio-shell .world-content { padding-inline: 16px; }
}

@media (max-width: 380px) {
    .world .sidebar .portal-logo { font-size: 32px; }
    .portal-sidebar-heading { gap: 8px; }
}

html[data-theme="dark"] { color-scheme: dark; background: #181722; }
[data-theme="dark"] .world {
    --ink: #f0edf8;
    --muted: #bcb6cd;
    --dark: #6955ba;
    --accent: #403363;
    --soft: #30293f;
    --line: #4b425c;
    --paper: #181722;
    --theme-surface: #232131;
    --theme-link: #c6b6ff;
}

[data-theme="dark"] .world :is(
    .sidebar, .portal-shortcuts a, .searchbox label, .portal-toolbar form,
    .white-panel, .reading-panel, .planning-rail, .trip-sidebar,
    .portal-inner .card, .portal-inner .filter, .portal-inner .service,
    .portal-inner .article, .portal-inner .city-hero, .destination,
    .catalogue-filters, .catalogue-empty, .analytics-consent, .analytics-secondary,
    .portal-edit, .route-city-toggle
) { background-color: var(--theme-surface); }

[data-theme="dark"] .world :is(
    .catalogue-filters input, .catalogue-filters select, .filter input,
    .flight-fields input, .flight-fields select, .editor-form input:not([type="checkbox"]),
    .editor-form select, .editor-form textarea, .route-city-field select, .route-city-field input,
    .route-city-search li button
) { border-color: var(--line); background-color: var(--paper); color: var(--ink); }

[data-theme="dark"] .world :is(input, textarea)::placeholder { color: var(--muted); }
[data-theme="dark"] .world :is(.route-overview, .walks-section, .promo-dialog-close) {
    border-color: var(--line);
    background-color: var(--soft);
}
[data-theme="dark"] .world .promo-dialog-subscribe { border-color: var(--line); }

[data-theme="dark"] .world .route-day-action:not(.route-day-action-primary),
[data-theme="dark"] .world .journal-pagination > a,
[data-theme="dark"] .world .carousel-controls:not(.sidebar-carousel-controls, .route-gallery .carousel-controls) button {
    background-color: var(--theme-surface);
}

[data-theme="dark"] .world :is(
    .sidebar .portal-logo, .bio-brand, .kicker, .portal-edit, .route-city-toggle,
    .route-day-action-icon, .trip-links > a > span, .service-card-icon, .photo-card-action,
    .travel-faq a, .hotel-stars, .portal-inner .page-tabs [aria-current="page"],
    .carousel-controls:not(.sidebar-carousel-controls, .route-gallery .carousel-controls) button,
    .social-links a:hover, .catalogue-filters button, .catalogue-empty button
) { color: var(--theme-link); }

[data-theme="dark"] .world :is(.catalogue-filters button:not(:disabled), .catalogue-empty button):hover {
    background-color: #403452;
}

[data-theme="dark"] .world .route-day-action-primary:is(:hover, :active) { background-color: #5946a6; }
[data-theme="dark"] .world .searchbox button:hover { filter: brightness(.92); }

[data-theme="dark"] .world .route-day-action-primary .route-day-action-icon { color: inherit; }
[data-theme="dark"] .world :focus-visible { outline-color: var(--theme-link); }

[data-theme="dark"] .world .world-feature > div a { color: #282a4b; }
[data-theme="dark"] .world .travel-notice { background: #34291f; border-color: #785a31; border-inline-start-color: #c78931; }
[data-theme="dark"] .world .travel-notice-label { color: #ffd990; }
[data-theme="dark"] .world .travel-notice-label span { background: #604622; }
[data-theme="dark"] .world .form-error { color: #ffadba; }
[data-theme="dark"] .world .promo-action summary {
    border-color: var(--line);
    background: repeating-linear-gradient(135deg, #30293f 0 7px, #3b314c 7px 9px);
    color: var(--ink);
}

[data-theme="dark"] .world .photo-attribution-overlay:hover,
[data-theme="dark"] .world .world-feature > .photo-attribution-overlay:hover,
[data-theme="dark"] .world .photo-attribution-overlay:is(:hover, :focus-visible) > .photo-attribution-label,
[data-theme="dark"] .world .photo-attribution-icon:is(:hover, :focus-visible) > span,
[data-theme="dark"] .world .article-photo-trigger:hover .article-photo-zoom { background-color: #342c49; }

[data-theme="dark"] .world .partner-widget-content { color-scheme: light; }
