:root {
    --ink: #1d2922;
    --ink-soft: #34453a;
    --muted: #768078;
    --paper: #f1ece3;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --line: #e3ddd2;
    --accent: #e85d36;
    --accent-dark: #c94726;
    --green: #244d39;
    --green-soft: #e5eee7;
    --shadow: 0 16px 48px rgba(39, 45, 39, 0.09);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at 7% 8%, rgba(232, 93, 54, 0.08), transparent 24rem),
        radial-gradient(circle at 94% 90%, rgba(36, 77, 57, 0.09), transparent 30rem),
        var(--paper);
    font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
button svg,
.search-box svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-shell {
    height: 100vh;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.topbar {
    position: relative;
    z-index: 1600;
    min-height: 76px;
    padding: 12px 16px 12px 14px;
    display: grid;
    grid-template-columns: minmax(235px, 1fr) minmax(280px, 380px) auto;
    align-items: center;
    gap: 18px;
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(42, 48, 40, 0.06);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff8eb;
    background: var(--green);
    border-radius: 15px 15px 15px 5px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 22px rgba(36, 77, 57, 0.18);
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 25px;
    font-weight: 700;
}

.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font-size: 20px; letter-spacing: 0.08em; }
.brand-copy small { color: var(--muted); font-size: 11px; letter-spacing: 0.03em; }

.search-box {
    height: 48px;
    padding: 0 12px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    background: #f5f1e9;
    border: 1px solid transparent;
    border-radius: 15px;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
    background: var(--surface-strong);
    border-color: rgba(232, 93, 54, 0.5);
    box-shadow: 0 0 0 4px rgba(232, 93, 54, 0.09);
}

.search-box svg { flex: 0 0 auto; }
.search-box input {
    width: 100%;
    min-width: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 14px;
}
.search-box input::placeholder { color: #959b95; }
.search-box kbd {
    padding: 3px 7px;
    color: #919890;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    font-family: inherit;
    font-size: 11px;
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    color: #6e786f;
    background: #f3f2ec;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
}
.connection-status i { width: 7px; height: 7px; background: #9ea69e; border-radius: 50%; }
.connection-status[data-state="ready"] { color: #2e6547; background: var(--green-soft); }
.connection-status[data-state="ready"] i { background: #45a56f; box-shadow: 0 0 0 4px rgba(69, 165, 111, 0.12); }
.connection-status[data-state="error"] { color: #a13e28; background: #fcebe5; }
.connection-status[data-state="error"] i { background: var(--accent); }

.button, .icon-button {
    border: 0;
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}
.button:active, .icon-button:active { transform: scale(0.97); }
.button {
    min-height: 42px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.button-ghost { background: var(--surface); border: 1px solid var(--line); }
.button-ghost:hover { color: var(--accent-dark); background: #fff8f3; }
.button-primary { color: white; background: var(--accent); box-shadow: 0 8px 18px rgba(232, 93, 54, 0.2); }
.button-primary:hover { background: var(--accent-dark); }

.workspace {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: 376px minmax(0, 1fr);
    gap: 14px;
}

.sidebar {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 253, 248, 0.91);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 22px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.19em;
}
.sidebar-header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 21px;
    letter-spacing: 0.02em;
}
.shop-count {
    min-width: 25px;
    height: 22px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}

.source-badge {
    padding: 3px 7px;
    color: #8a5b22;
    background: #f7ead4;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.source-badge[data-source="amap"] {
    color: #2f6849;
    background: #e5f1e8;
}

.source-badge[hidden] {
    display: none;
}
.icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #f4f1ea;
    border-radius: 11px;
}
.icon-button:hover { color: var(--accent); background: #faece6; }
.icon-button svg { width: 18px; height: 18px; }

.discovery-controls {
    margin: 0 16px 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    background: #f6f2ea;
    border: 1px solid #ebe4d9;
    border-radius: 13px;
}

.select-control {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.select-control > span {
    color: #8a918a;
    font-size: 8px;
    font-weight: 700;
}

.select-control select {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    color: var(--ink);
    background: white;
    border: 1px solid #e2dbcf;
    border-radius: 8px;
    outline: 0;
    font-size: 10px;
}

.select-control select:focus {
    border-color: rgba(232, 93, 54, 0.45);
    box-shadow: 0 0 0 3px rgba(232, 93, 54, 0.07);
}

.scope-switch {
    grid-column: 1 / -1;
    padding-top: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #667068;
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
}

.scope-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.scope-switch-track {
    width: 34px;
    height: 20px;
    padding: 2px;
    flex: 0 0 auto;
    background: #cbd0ca;
    border-radius: 999px;
    transition: background 150ms ease;
}

.scope-switch-track i {
    width: 16px;
    height: 16px;
    display: block;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(31, 39, 32, 0.18);
    transition: transform 150ms ease;
}

.scope-switch input:checked + .scope-switch-track {
    background: var(--green);
}

.scope-switch input:checked + .scope-switch-track i {
    transform: translateX(14px);
}

.shop-list {
    min-height: 0;
    padding: 0 16px 8px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d8d2c7 transparent;
}
.shop-list::-webkit-scrollbar { width: 5px; }
.shop-list::-webkit-scrollbar-thumb { background: #d8d2c7; border-radius: 999px; }

.shop-card {
    width: 100%;
    padding: 13px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 11px;
    text-align: left;
    background: var(--surface-strong);
    border: 1px solid #ebe5dc;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.shop-card:hover {
    transform: translateY(-1px);
    border-color: #d9d0c3;
    box-shadow: 0 8px 24px rgba(44, 48, 41, 0.07);
}
.shop-card.is-active {
    background: #fff9f3;
    border-color: rgba(232, 93, 54, 0.52);
    box-shadow: 0 8px 24px rgba(232, 93, 54, 0.1);
}
.shop-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: var(--avatar-bg, #f4eee4);
    border-radius: 14px 14px 14px 5px;
    font-size: 23px;
}
.shop-info { min-width: 0; }
.shop-topline, .shop-meta, .popup-stats { display: flex; align-items: center; gap: 8px; }
.shop-topline {
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
}
.shop-rating { margin-left: auto; color: #9b6b13; letter-spacing: 0; }
.shop-info h3 {
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shop-address {
    margin: 0 0 7px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shop-meta { color: #6e766e; font-size: 10px; }
.shop-meta span + span::before { content: "·"; margin-right: 8px; color: #b4b9b3; }
.shop-chevron { color: #b9beb9; font-size: 20px; }

.empty-state { min-height: 0; padding: 28px 30px; flex: 1; align-content: center; text-align: center; }
.empty-state:not([hidden]) { display: grid; }
.empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    background: #f3eee5;
    border-radius: 18px;
    font-size: 28px;
}
.empty-state h2 { margin: 0 0 8px; font-size: 16px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.empty-state .button { justify-self: center; }
.sidebar-footer {
    padding: 13px 20px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #828981;
    border-top: 1px solid rgba(227, 221, 210, 0.72);
    font-size: 10px;
}
.footer-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

.map-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #e8e3d9;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
#map { width: 100%; height: 100%; z-index: 1; }

.map-note {
    position: absolute;
    z-index: 500;
    top: 18px;
    left: 18px;
    padding: 10px 14px 10px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f9f6ef;
    background: rgba(29, 41, 34, 0.91);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(21, 29, 23, 0.18);
    backdrop-filter: blur(8px);
    pointer-events: none;
}
.map-note-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: #fff8eb;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
}
.map-note div { display: flex; flex-direction: column; gap: 2px; }
.map-note strong { font-size: 12px; }
.map-note span:not(.map-note-icon) { color: rgba(255, 255, 255, 0.62); font-size: 9px; }

.map-legend {
    position: absolute;
    z-index: 500;
    right: 16px;
    bottom: 16px;
    padding: 8px 11px;
    color: #58645b;
    background: rgba(255, 253, 248, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 11px;
    box-shadow: 0 8px 24px rgba(35, 44, 37, 0.1);
    font-size: 10px;
    backdrop-filter: blur(8px);
    pointer-events: none;
}
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-pin {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border: 2px solid white;
    border-radius: 50% 50% 50% 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transform: rotate(-45deg);
}

.map-loading {
    position: absolute;
    z-index: 700;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(238, 233, 223, 0.84);
    backdrop-filter: blur(5px);
    transition: opacity 220ms ease, visibility 220ms ease;
}
.map-loading.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-card {
    min-width: 260px;
    padding: 24px 28px;
    text-align: center;
    background: rgba(255, 253, 248, 0.95);
    border: 1px solid white;
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(40, 46, 38, 0.12);
}
.loading-card strong { display: block; margin: 12px 0 6px; font-size: 14px; }
.loading-card p { margin: 0; color: var(--muted); font-size: 11px; }
.spinner {
    width: 25px;
    height: 25px;
    display: inline-block;
    border: 3px solid #e7dfd2;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-error { color: var(--accent-dark); }
.retry-button { margin-top: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(232, 93, 54, 0.2) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    color: white !important;
    background-color: var(--accent) !important;
    box-shadow: 0 4px 12px rgba(165, 61, 34, 0.28);
    font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
    font-weight: 800;
}

.food-marker-container { background: transparent; border: 0; }
.food-pin {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--pin-color, var(--accent));
    border: 3px solid rgba(255, 255, 255, 0.96);
    border-radius: 50% 50% 50% 9px;
    box-shadow: 0 7px 18px rgba(35, 42, 35, 0.25);
    transform: rotate(-45deg);
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.food-pin span { display: block; font-size: 18px; line-height: 1; transform: rotate(45deg); }
.food-marker-container:hover .food-pin {
    box-shadow: 0 10px 24px rgba(35, 42, 35, 0.32);
    transform: rotate(-45deg) scale(1.1);
}

.leaflet-container {
    background: #e8e3d9;
    font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
.leaflet-control-zoom {
    margin-right: 16px !important;
    margin-bottom: 16px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 12px !important;
    box-shadow: 0 7px 22px rgba(35, 44, 37, 0.12) !important;
}
.leaflet-control-zoom a {
    width: 34px !important;
    height: 32px !important;
    color: var(--ink) !important;
    background: rgba(255, 253, 248, 0.96) !important;
    border-color: #e7e1d6 !important;
    line-height: 31px !important;
}
.leaflet-control-zoom a:hover { color: var(--accent) !important; background: white !important; }
.leaflet-control-attribution {
    padding: 3px 7px !important;
    color: #7c837b !important;
    background: rgba(255, 253, 248, 0.82) !important;
    font-size: 8px !important;
    backdrop-filter: blur(4px);
}
.leaflet-control-attribution a { color: #56665a !important; }
.leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    background: var(--surface);
    border-radius: 17px;
    box-shadow: 0 16px 44px rgba(28, 34, 27, 0.2);
}
.leaflet-popup-content { width: 260px !important; margin: 0 !important; }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-close-button {
    top: 7px !important;
    right: 7px !important;
    width: 28px !important;
    height: 28px !important;
    color: #8c928c !important;
    background: rgba(255, 255, 255, 0.84) !important;
    border-radius: 50%;
    font: 20px/26px Arial, sans-serif !important;
}
.map-popup { padding: 18px; }
.popup-kicker {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
}
.map-popup h3 { margin: 0 0 7px; padding-right: 24px; font-size: 17px; }
.popup-address { margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.popup-description { margin: 0 0 12px; color: #48534b; font-size: 11px; line-height: 1.65; }
.popup-stats {
    padding-top: 10px;
    color: #6b746c;
    border-top: 1px solid #eee8de;
    font-size: 10px;
    flex-wrap: wrap;
}
.popup-rating { color: #a56f10; font-weight: 800; }

@media (max-width: 1160px) {
    .topbar { grid-template-columns: minmax(210px, 1fr) minmax(260px, 380px) auto; }
    .connection-status { display: none; }
    .workspace { grid-template-columns: 346px minmax(0, 1fr); }
}

@media (max-width: 860px) {
    body { overflow: auto; }
    .app-shell { height: auto; min-height: 100vh; padding: 10px; }
    .topbar { grid-template-columns: 1fr auto; gap: 12px; border-radius: 20px; }
    .search-box { grid-column: 1 / -1; grid-row: 2; }
    .top-actions { grid-column: 2; grid-row: 1; }
    .button-ghost { min-width: 42px; padding: 0 12px; font-size: 0; }
    .button-ghost svg { width: 19px; height: 19px; }
    .workspace { flex: none; display: flex; flex-direction: column; }
    .map-stage { order: -1; height: 56vh; min-height: 410px; border-radius: 20px; }
    .sidebar { min-height: 360px; max-height: 560px; border-radius: 20px; }
    .discovery-controls {
    margin: 0 16px 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    background: #f6f2ea;
    border: 1px solid #ebe4d9;
    border-radius: 13px;
}

.select-control {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.select-control > span {
    color: #8a918a;
    font-size: 8px;
    font-weight: 700;
}

.select-control select {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    color: var(--ink);
    background: white;
    border: 1px solid #e2dbcf;
    border-radius: 8px;
    outline: 0;
    font-size: 10px;
}

.select-control select:focus {
    border-color: rgba(232, 93, 54, 0.45);
    box-shadow: 0 0 0 3px rgba(232, 93, 54, 0.07);
}

.scope-switch {
    grid-column: 1 / -1;
    padding-top: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #667068;
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
}

.scope-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.scope-switch-track {
    width: 34px;
    height: 20px;
    padding: 2px;
    flex: 0 0 auto;
    background: #cbd0ca;
    border-radius: 999px;
    transition: background 150ms ease;
}

.scope-switch-track i {
    width: 16px;
    height: 16px;
    display: block;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(31, 39, 32, 0.18);
    transition: transform 150ms ease;
}

.scope-switch input:checked + .scope-switch-track {
    background: var(--green);
}

.scope-switch input:checked + .scope-switch-track i {
    transform: translateX(14px);
}

.shop-list { min-height: 250px; }
}

@media (max-width: 520px) {
    .brand-copy small { display: none; }
    .brand-mark { width: 42px; height: 42px; }
    .brand-copy strong { font-size: 18px; }
    .topbar { padding: 10px; }
    .map-stage { min-height: 390px; }
    .map-note { top: 12px; left: 12px; }
    .map-note span:not(.map-note-icon) { display: none; }
    .map-legend { display: none; }
    .leaflet-control-zoom { margin-right: 12px !important; margin-bottom: 12px !important; }
}

.route-panel {
    position: absolute;
    z-index: 650;
    top: 18px;
    right: 18px;
    width: min(420px, calc(100% - 36px));
    max-height: calc(100% - 36px);
    padding: 16px;
    overflow-y: auto;
    background: rgba(255, 253, 248, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 20px;
    box-shadow: 0 22px 60px rgba(30, 39, 31, 0.2);
    backdrop-filter: blur(18px);
    animation: route-panel-in 220ms ease both;
}

.route-panel[hidden],
.route-content[hidden],
.route-loading[hidden],
.route-error[hidden] {
    display: none;
}

@keyframes route-panel-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.route-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.route-eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.route-panel-header h2 {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 18px;
    line-height: 1.25;
}

.route-panel-header h2 small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.route-close {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
}

.route-location {
    margin-top: 12px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #536158;
    background: #f2f3ed;
    border-radius: 10px;
    font-size: 10px;
}

.location-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    background: #3b8f63;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(59, 143, 99, 0.14);
}

.text-button {
    margin-left: auto;
    padding: 0;
    color: var(--accent-dark);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

.route-loading {
    padding: 30px 10px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: var(--muted);
    font-size: 11px;
}

.route-loading .spinner {
    width: 19px;
    height: 19px;
    border-width: 2px;
}

.route-content {
    padding-top: 12px;
}

.route-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.travel-mode {
    position: relative;
    min-width: 0;
    padding: 10px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    text-align: left;
    color: var(--ink);
    background: white;
    border: 1px solid #e7e0d5;
    border-radius: 13px;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.travel-mode:hover {
    transform: translateY(-1px);
    border-color: #cec3b5;
    box-shadow: 0 7px 18px rgba(39, 45, 37, 0.07);
}

.travel-mode.is-selected {
    background: #fff8f2;
    border-color: var(--mode-color, var(--accent));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mode-color, var(--accent)) 12%, transparent);
}

.mode-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--mode-color, var(--accent)) 12%, white);
    border-radius: 10px;
    font-size: 17px;
}

.mode-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mode-name {
    color: #657067;
    font-size: 9px;
    font-weight: 700;
}

.mode-duration {
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mode-meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mode-recommend-badge {
    position: absolute;
    top: -7px;
    right: 7px;
    padding: 2px 6px;
    color: white;
    background: var(--accent);
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.route-recommendation {
    margin: 10px 0;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #365a43;
    background: #edf4ed;
    border-radius: 12px;
    font-size: 10px;
    line-height: 1.55;
}

.recommendation-mark {
    flex: 0 0 auto;
    padding: 2px 6px;
    color: white;
    background: #3b8f63;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 800;
}

.review-panel {
    margin: 0 0 10px;
    padding: 11px;
    background: #f8f5ee;
    border: 1px solid #e8e1d6;
    border-radius: 14px;
}

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

.review-header {
    margin-bottom: 9px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.review-header > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-eyebrow {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.review-header strong {
    color: #9a6817;
    font-size: 16px;
}

.review-header small {
    color: #8a918a;
    font-size: 8px;
}

.review-provider {
    padding: 4px 7px;
    color: #2f6849;
    background: #e5f1e8;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

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

.review-platform {
    min-width: 0;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    background: white;
    border: 1px solid #e5ded3;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.review-platform:hover {
    transform: translateY(-1px);
    border-color: #cfc5b8;
    box-shadow: 0 6px 16px rgba(39, 45, 37, 0.07);
}

.platform-logo {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: white;
    border-radius: 8px 8px 8px 3px;
    font-size: 12px;
    font-weight: 900;
}

.review-platform.dianping .platform-logo {
    background: #ff6633;
}

.review-platform.meituan .platform-logo {
    color: #1e241e;
    background: #ffd43b;
}

.platform-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.platform-copy strong {
    font-size: 10px;
}

.platform-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-arrow {
    margin-left: auto;
    color: #a0a69f;
    font-size: 12px;
}

.review-disclaimer {
    margin: 8px 1px 0;
    color: #929891;
    font-size: 8px;
    line-height: 1.45;
}

.route-open-button {
    width: 100%;
    min-height: 39px;
}

.route-source {
    margin: 8px 2px 0;
    color: #8b918a;
    font-size: 8px;
    line-height: 1.5;
}

.route-error {
    padding: 20px 8px 6px;
    text-align: center;
}

.route-error strong {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-dark);
    font-size: 14px;
}

.route-error p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.user-location-marker {
    background: transparent;
    border: 0;
}

.user-location-marker span {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.user-location-marker .user-location-pulse {
    width: 32px;
    height: 32px;
    background: rgba(48, 126, 220, 0.2);
    animation: location-pulse 1.8s ease-out infinite;
}

.user-location-marker .user-location-dot {
    width: 14px;
    height: 14px;
    background: #2f7edc;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(20, 79, 150, 0.36);
}

@keyframes location-pulse {
    0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.55); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

.map-stage.route-active .map-note,
.map-stage.route-active .map-legend {
    opacity: 0;
    visibility: hidden;
}

@media (max-width: 860px) {
    .route-panel {
        top: auto;
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100% - 20px);
    }
}

@media (max-width: 520px) {
    .route-panel {
        padding: 14px;
        border-radius: 17px;
    }

    .route-panel-header h2 {
        font-size: 16px;
    }

    .route-options {
        gap: 6px;
    }

    .travel-mode {
        padding: 8px;
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 7px;
    }

    .mode-icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }
}
.account-area {
    position: relative;
    flex: 0 0 auto;
}

.account-login-button {
    min-height: 42px;
    padding: 0 14px;
    color: #fffaf2;
    background: var(--green);
    border: 1px solid var(--green);
    box-shadow: 0 8px 18px rgba(36, 77, 57, 0.16);
}

.account-login-button:hover {
    background: #1d402f;
}

.account-login-button[hidden] {
    display: none;
}

.account-login-button svg {
    width: 17px;
    height: 17px;
}

.user-menu {
    position: relative;
}

.user-menu[hidden] {
    display: none;
}

.user-menu-trigger {
    min-height: 42px;
    padding: 4px 8px 4px 5px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    background: #f4f1ea;
    border: 1px solid var(--line);
    border-radius: 13px;
    cursor: pointer;
}

.user-menu-trigger:hover {
    background: #eee9df;
}

.user-menu-trigger > svg {
    width: 14px;
    height: 14px;
    color: #8d948d;
}

.user-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: white;
    background: var(--accent);
    border-radius: 10px 10px 10px 4px;
    font-size: 13px;
    font-weight: 800;
}

.user-menu-name {
    max-width: 88px;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 8px);
    right: 0;
    width: 190px;
    padding: 12px;
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid rgba(227, 221, 210, 0.95);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(31, 39, 32, 0.16);
    backdrop-filter: blur(12px);
}

.user-dropdown[hidden] {
    display: none;
}

.user-summary {
    padding: 2px 3px 10px;
    border-bottom: 1px solid #eee8de;
}

.user-summary strong,
.user-summary small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-summary strong {
    font-size: 13px;
}

.user-summary small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.user-dropdown .menu-action {
    width: 100%;
    margin-top: 5px;
    padding: 8px 10px;
    color: #5b655e;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

.user-dropdown .menu-action:hover {
    color: var(--ink);
    background: #f4f1ea;
}

.user-dropdown .menu-action.danger {
    margin-top: 8px;
    color: var(--accent-dark);
    background: #faece6;
}

.user-dropdown .menu-action:disabled {
    cursor: wait;
    opacity: 0.55;
}

.button-danger {
    color: white;
    background: #b9432c;
    box-shadow: 0 8px 18px rgba(164, 55, 35, 0.18);
}

.button-danger:hover {
    background: #99331f;
}

.delete-account-dialog {
    width: min(410px, 100%);
}

.delete-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-right: 30px;
}

.delete-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: white;
    background: #b9432c;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 900;
}

.delete-heading p {
    margin: 0 0 3px;
    color: #b9432c;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.delete-heading h2 {
    margin: 0 0 4px;
    font-size: 19px;
}

.delete-heading span:not(.delete-icon) {
    color: var(--muted);
    font-size: 10px;
}

.delete-warning {
    margin: 20px 0 15px;
    padding: 11px 12px;
    color: #794a3d;
    background: #fbebe6;
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.55;
}

.delete-warning strong {
    color: #a43a24;
}

.delete-actions {
    margin-top: 4px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 8px;
}

.delete-actions .button {
    width: 100%;
}

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

.auth-modal[hidden] {
    display: none;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 31, 25, 0.48);
    backdrop-filter: blur(7px);
}

.auth-dialog {
    position: relative;
    width: min(430px, 100%);
    max-height: calc(100vh - 36px);
    padding: 26px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: 0 32px 90px rgba(19, 27, 21, 0.28);
    animation: auth-in 180ms ease both;
}

@keyframes auth-in {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.auth-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-right: 30px;
}

.auth-logo {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff8eb;
    background: var(--green);
    border-radius: 16px 16px 16px 5px;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 26px;
    font-weight: 700;
}

.auth-heading p {
    margin: 0 0 3px;
    color: var(--accent);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.17em;
}

.auth-heading h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.auth-heading span:not(.auth-logo) {
    color: var(--muted);
    font-size: 10px;
}

.auth-tabs {
    margin: 22px 0 18px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: #f3efe7;
    border-radius: 12px;
}

.auth-tabs button {
    min-height: 35px;
    color: #778078;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.auth-tabs button.is-active {
    color: var(--ink);
    background: white;
    box-shadow: 0 4px 12px rgba(38, 44, 37, 0.08);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field[hidden] {
    display: none;
}

.auth-field > span {
    color: #5f6961;
    font-size: 10px;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    color: var(--ink);
    background: #f7f4ed;
    border: 1px solid transparent;
    border-radius: 11px;
    outline: 0;
    font-size: 12px;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.auth-field input:focus {
    background: white;
    border-color: rgba(232, 93, 54, 0.5);
    box-shadow: 0 0 0 4px rgba(232, 93, 54, 0.08);
}

.auth-error {
    margin: 0;
    padding: 8px 10px;
    color: #a5432c;
    background: #fcebe5;
    border-radius: 9px;
    font-size: 10px;
    line-height: 1.45;
}

.auth-error[hidden] {
    display: none;
}

.auth-submit {
    width: 100%;
    min-height: 44px;
    margin-top: 2px;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.7;
}

.auth-security-note {
    margin: 14px 0 0;
    color: #919891;
    text-align: center;
    font-size: 8px;
    line-height: 1.55;
}

body.auth-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    .account-login-button {
        width: 42px;
        padding: 0;
        font-size: 0;
    }

    .account-login-button span {
        display: none;
    }

    .user-menu-name,
    .user-menu-trigger > svg {
        display: none;
    }

    .user-menu-trigger {
        padding: 4px;
    }
}

@media (max-width: 520px) {
    .auth-modal {
        align-items: end;
        padding: 10px;
    }

    .auth-dialog {
        max-height: calc(100vh - 20px);
        padding: 22px 18px;
        border-radius: 20px;
    }
}
.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.add-shop-button {
    min-height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: white;
    background: var(--green);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.add-shop-button:hover {
    background: #1c402e;
}

.add-shop-button svg {
    width: 14px;
    height: 14px;
}

.shop-avatar-photo {
    padding: 0;
    overflow: hidden;
    background: #eee7dc;
}

.shop-avatar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-shop-image {
    width: 100%;
    height: 120px;
    display: block;
    object-fit: cover;
    background: #eee7dc;
}

.add-shop-dialog {
    width: min(470px, 100%);
}

.add-shop-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-right: 30px;
}

.add-shop-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: white;
    background: var(--green);
    border-radius: 16px 16px 16px 5px;
    font-size: 26px;
    font-weight: 500;
}

.add-shop-heading p {
    margin: 0 0 3px;
    color: var(--accent);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.17em;
}

.add-shop-heading h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.add-shop-heading span {
    color: var(--muted);
    font-size: 10px;
}

.add-shop-heading strong {
    color: var(--ink);
}

.add-shop-form {
    margin-top: 20px;
}

.add-shop-location-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.location-pick-button {
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid #cfe0d2;
    border-radius: 9px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
}

.location-pick-button:hover {
    background: #dcebdd;
}

.location-pick-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.location-pick-button svg {
    width: 14px;
    height: 14px;
}

.add-shop-location-status {
    min-height: 34px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #356746;
    background: #eef6ef;
    border-radius: 9px;
    font-size: 9px;
}

.add-shop-location-status[hidden] {
    display: none;
}

.add-shop-location-status button {
    padding: 0;
    color: var(--accent-dark);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 8px;
    font-weight: 700;
}

.field-help {
    color: #949b94;
    font-size: 8px;
    line-height: 1.45;
}

.optional-label {
    margin-left: 4px;
    padding: 1px 5px;
    color: #8a918a;
    background: #f0ece4;
    border-radius: 5px;
    font-size: 7px;
    font-weight: 600;
}

.shop-image-picker {
    min-height: 104px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #6c776e;
    text-align: center;
    background: #f7f4ed;
    border: 1px dashed #cfc6ba;
    border-radius: 13px;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}

.shop-image-picker:hover {
    background: #fff9f3;
    border-color: rgba(232, 93, 54, 0.48);
}

.shop-image-picker svg {
    width: 25px;
    height: 25px;
    color: var(--accent);
}

.shop-image-picker strong {
    color: var(--ink);
    font-size: 11px;
}

.shop-image-picker small {
    color: var(--muted);
    font-size: 8px;
}

.shop-image-picker[hidden] {
    display: none;
}

.shop-image-preview {
    position: relative;
    overflow: hidden;
    border-radius: 13px;
}

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

.shop-image-preview img {
    width: 100%;
    height: 165px;
    display: block;
    object-fit: cover;
}

.shop-image-preview button {
    position: absolute;
    right: 9px;
    bottom: 9px;
    padding: 6px 9px;
    color: white;
    background: rgba(26, 35, 28, 0.8);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

@media (max-width: 520px) {
    .add-shop-button {
        width: 36px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .add-shop-button svg {
        width: 17px;
        height: 17px;
    }
}
.ai-launcher {
    position: fixed;
    z-index: 2100;
    right: 26px;
    bottom: 96px;
    padding: 8px 14px 8px 8px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fffaf2;
    background: var(--green);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(28, 55, 39, 0.24);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: transform 150ms ease, background 150ms ease;
}

.ai-launcher:hover {
    background: #1b3f2d;
    transform: translateY(-2px);
}

.ai-launcher[hidden] {
    display: none;
}

.ai-launcher-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #244d39;
    background: #f3e3bf;
    border-radius: 10px 10px 10px 4px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.ai-panel {
    position: fixed;
    z-index: 2400;
    top: 106px;
    right: 18px;
    bottom: 18px;
    width: min(400px, calc(100vw - 36px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(23, 33, 25, 0.24);
    backdrop-filter: blur(16px);
    animation: ai-panel-in 200ms ease both;
}

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

@keyframes ai-panel-in {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-panel-header {
    padding: 17px 17px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    color: #fffaf2;
    background: var(--green);
}

.ai-panel-header p {
    margin: 0 0 3px;
    color: #e7c986;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.ai-panel-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.ai-panel-header small {
    color: rgba(255, 255, 255, 0.63);
    font-size: 9px;
}

.ai-panel-header .icon-button {
    color: #e7eee8;
    background: rgba(255, 255, 255, 0.1);
}

.ai-messages {
    min-height: 0;
    padding: 15px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 100% 0, rgba(232, 93, 54, 0.05), transparent 16rem),
        #f7f4ed;
    scrollbar-width: thin;
}

.ai-message {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 11px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-message.assistant {
    align-self: flex-start;
    color: #38443b;
    background: white;
    border: 1px solid #e8e1d6;
    border-bottom-left-radius: 5px;
}

.ai-message.user {
    align-self: flex-end;
    color: white;
    background: var(--accent);
    border-bottom-right-radius: 5px;
}

.ai-message.error {
    color: #a13e28;
    background: #fcebe5;
    border-color: #f4d3c8;
}

.ai-message.typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 52px;
}

.ai-message.typing span {
    width: 6px;
    height: 6px;
    background: #9aa39b;
    border-radius: 50%;
    animation: ai-dot 1.1s infinite ease-in-out;
}

.ai-message.typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-message.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ai-dot {
    0%, 70%, 100% { transform: translateY(0); opacity: 0.45; }
    35% { transform: translateY(-3px); opacity: 1; }
}

.ai-suggestions {
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    background: #fffdf8;
    border-top: 1px solid #eee8de;
}

.ai-suggestions[hidden] {
    display: none;
}

.ai-suggestions button {
    padding: 6px 9px;
    color: #5b675e;
    background: #f4f1ea;
    border: 1px solid #e5ded3;
    border-radius: 999px;
    cursor: pointer;
    font-size: 9px;
    white-space: nowrap;
}

.ai-suggestions button:hover {
    color: var(--accent-dark);
    background: #fff7f1;
}

.ai-form {
    padding: 10px 12px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #fffdf8;
    border-top: 1px solid #eee8de;
}

.ai-form textarea {
    min-height: 42px;
    max-height: 110px;
    padding: 10px 11px;
    flex: 1;
    resize: none;
    color: var(--ink);
    background: #f4f1ea;
    border: 1px solid transparent;
    border-radius: 11px;
    outline: 0;
    font-size: 11px;
    line-height: 1.5;
}

.ai-form textarea:focus {
    background: white;
    border-color: rgba(232, 93, 54, 0.46);
    box-shadow: 0 0 0 3px rgba(232, 93, 54, 0.07);
}

.ai-send-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: white;
    background: var(--accent);
    border: 0;
    border-radius: 11px;
    cursor: pointer;
}

.ai-send-button:hover {
    background: var(--accent-dark);
}

.ai-send-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.ai-send-button svg {
    width: 18px;
    height: 18px;
}

.ai-cost-note {
    margin: 0;
    padding: 0 12px 10px;
    color: #9a9f99;
    background: #fffdf8;
    text-align: center;
    font-size: 8px;
}

@media (max-width: 520px) {
    .ai-launcher {
        right: 14px;
        bottom: 82px;
        padding: 6px;
        border-radius: 13px;
    }

    .ai-launcher > span:last-child {
        display: none;
    }

    .ai-panel {
        top: 76px;
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
    }
}
.community-review-panel {
    margin: 0 0 10px;
    padding: 0 11px 10px;
    background: white;
    border: 1px solid #e8e1d6;
    border-radius: 13px;
}

.community-review-panel summary {
    padding: 10px 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--ink);
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    list-style: none;
}

.community-review-panel summary::-webkit-details-marker {
    display: none;
}

.community-review-panel summary::before {
    content: "›";
    margin-right: 2px;
    color: var(--accent);
    transition: transform 150ms ease;
}

.community-review-panel[open] summary::before {
    transform: rotate(90deg);
}

.community-review-summary {
    margin-left: auto;
    color: #9a6817;
    font-size: 9px;
    font-weight: 700;
}

.community-review-list {
    max-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.community-review-item {
    padding: 8px 9px;
    background: #f8f5ee;
    border-radius: 9px;
}

.community-review-item-head {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #667068;
    font-size: 9px;
}

.community-review-item-head strong {
    color: #445047;
    font-size: 9px;
}

.community-review-item-head time {
    margin-left: auto;
    color: #9aa09a;
    font-size: 8px;
}

.community-review-item-stars {
    color: #d99a2b;
    font-size: 9px;
    letter-spacing: 1px;
}

.community-review-item p {
    margin: 5px 0 0;
    color: #4b564e;
    font-size: 9px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.community-review-empty {
    margin: 1px 0 8px;
    color: #969d96;
    text-align: center;
    font-size: 9px;
}

.community-review-form {
    margin-top: 9px;
    padding-top: 9px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    border-top: 1px solid #eee8de;
}

.community-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #687168;
    font-size: 9px;
}

.community-stars {
    display: inline-flex;
    gap: 1px;
}

.community-stars button {
    padding: 0 1px;
    color: #d9d2c7;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: color 100ms ease, transform 100ms ease;
}

.community-stars button:hover,
.community-stars button.is-active {
    color: #e1a52f;
    transform: scale(1.05);
}

.community-review-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 8px 9px;
    resize: vertical;
    color: var(--ink);
    background: #f7f4ed;
    border: 1px solid transparent;
    border-radius: 9px;
    outline: 0;
    font-size: 10px;
    line-height: 1.5;
}

.community-review-form textarea:focus {
    background: white;
    border-color: rgba(232, 93, 54, 0.42);
    box-shadow: 0 0 0 3px rgba(232, 93, 54, 0.06);
}

.community-review-submit {
    align-self: flex-end;
    padding: 6px 10px;
    color: white;
    background: var(--green);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
}

.community-review-submit:disabled {
    cursor: wait;
    opacity: 0.6;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* View mode switcher */
.view-switcher {
    padding: 3px;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px;
    background: #f1eee6;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.view-choice {
    height: 34px;
    min-width: 34px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #7a837b;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.view-choice:hover {
    color: var(--green);
    background: rgba(255, 255, 255, 0.72);
}

.view-choice svg {
    width: 15px;
    height: 15px;
}

html[data-view-mode="desktop"] .view-choice-desktop,
html[data-view-mode="mobile"] .view-choice-mobile {
    color: white;
    background: var(--green);
    box-shadow: 0 5px 12px rgba(36, 77, 57, 0.2);
}

/* Deliberate mobile layout, also available as a desktop preview. */
html[data-view-mode="mobile"] body {
    overflow: auto;
}

html[data-view-mode="mobile"] .app-shell {
    width: min(100%, 520px);
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    gap: 10px;
}

html[data-view-mode="mobile"] .topbar {
    min-height: 0;
    padding: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px;
    border-radius: 20px;
}

html[data-view-mode="mobile"] .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    gap: 9px;
}

html[data-view-mode="mobile"] .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px 13px 13px 5px;
    font-size: 22px;
}

html[data-view-mode="mobile"] .brand-copy {
    min-width: 0;
}

html[data-view-mode="mobile"] .brand-copy strong {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .brand-copy small,
html[data-view-mode="mobile"] .connection-status {
    display: none;
}

html[data-view-mode="mobile"] .top-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
}

html[data-view-mode="mobile"] .view-choice {
    width: 30px;
    min-width: 30px;
    height: 32px;
    padding: 0;
}

html[data-view-mode="mobile"] .view-choice span {
    display: none;
}

html[data-view-mode="mobile"] .top-actions .button-ghost {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
}

html[data-view-mode="mobile"] .top-actions .button-ghost svg {
    width: 18px;
    height: 18px;
}

html[data-view-mode="mobile"] .account-login-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
}

html[data-view-mode="mobile"] .account-login-button span,
html[data-view-mode="mobile"] .user-menu-name,
html[data-view-mode="mobile"] .user-menu-trigger > svg {
    display: none;
}

html[data-view-mode="mobile"] .user-menu-trigger {
    min-height: 38px;
    padding: 3px;
}

html[data-view-mode="mobile"] .user-avatar {
    width: 30px;
    height: 30px;
}

html[data-view-mode="mobile"] .search-box {
    height: 44px;
    grid-column: 1 / -1;
    grid-row: 2;
}

html[data-view-mode="mobile"] .workspace {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

html[data-view-mode="mobile"] .map-stage {
    order: -1;
    height: clamp(340px, 48svh, 460px);
    min-height: 340px;
    border-radius: 20px;
}

html[data-view-mode="mobile"] .sidebar {
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-radius: 20px;
}

html[data-view-mode="mobile"] .sidebar-header {
    padding: 18px 16px 13px;
}

html[data-view-mode="mobile"] .sidebar-header h1 {
    font-size: 19px;
}

html[data-view-mode="mobile"] .discovery-controls {
    margin: 0 12px 12px;
}

html[data-view-mode="mobile"] .shop-list {
    min-height: 250px;
    padding: 0 12px 10px;
    overflow: visible;
}

html[data-view-mode="mobile"] .shop-card {
    padding: 12px;
}

html[data-view-mode="mobile"] .sidebar-footer {
    padding-bottom: max(15px, env(safe-area-inset-bottom));
}

html[data-view-mode="mobile"] .map-note {
    top: 12px;
    left: 12px;
}

html[data-view-mode="mobile"] .map-note span:not(.map-note-icon),
html[data-view-mode="mobile"] .map-legend {
    display: none;
}

html[data-view-mode="mobile"] .route-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100% - 20px);
    padding: 14px;
    border-radius: 17px;
}

html[data-view-mode="mobile"] .travel-mode {
    padding: 8px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
}

html[data-view-mode="mobile"] .mode-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
}

html[data-view-mode="mobile"] .ai-launcher {
    right: max(14px, calc((100vw - 520px) / 2 + 12px));
    bottom: max(18px, env(safe-area-inset-bottom));
}

html[data-view-mode="mobile"] .ai-panel {
    top: 10px;
    right: auto;
    bottom: 10px;
    left: 50%;
    width: min(500px, calc(100vw - 20px));
    transform: translateX(-50%);
    animation: none;
}

@media (max-width: 420px) {
    html[data-view-mode="mobile"] .brand-copy {
        display: none;
    }

    html[data-view-mode="mobile"] .top-actions {
        gap: 4px;
    }

    html[data-view-mode="mobile"] .view-switcher {
        padding: 2px;
    }

    html[data-view-mode="mobile"] .view-choice {
        width: 28px;
        min-width: 28px;
        height: 32px;
    }

    html[data-view-mode="mobile"] .top-actions .button-ghost,
    html[data-view-mode="mobile"] .account-login-button {
        width: 36px;
        min-width: 36px;
        min-height: 36px;
    }
}

/* Keep the full desktop composition when desktop mode is chosen on a phone. */
html[data-view-mode="desktop"] body {
    overflow: auto;
}

@media (max-width: 860px) {
    html[data-view-mode="desktop"] .app-shell {
        width: 1200px;
        min-width: 1200px;
        height: 100vh;
        min-height: 700px;
        padding: 16px;
        gap: 14px;
    }

    html[data-view-mode="desktop"] .topbar {
        min-height: 76px;
        padding: 12px 16px 12px 14px;
        grid-template-columns: minmax(235px, 1fr) minmax(280px, 380px) auto;
        gap: 18px;
        border-radius: 24px;
    }

    html[data-view-mode="desktop"] .search-box {
        height: 48px;
        grid-column: auto;
        grid-row: auto;
    }

    html[data-view-mode="desktop"] .top-actions {
        grid-column: auto;
        grid-row: auto;
        gap: 10px;
    }

    html[data-view-mode="desktop"] .connection-status {
        display: inline-flex;
    }

    html[data-view-mode="desktop"] .view-choice {
        width: auto;
        min-width: 34px;
        height: 34px;
        padding: 0 7px;
    }

    html[data-view-mode="desktop"] .view-choice span {
        display: inline;
    }

    html[data-view-mode="desktop"] .top-actions .button-ghost {
        width: auto;
        min-width: 0;
        min-height: 42px;
        padding: 0 15px;
        font-size: 13px;
    }

    html[data-view-mode="desktop"] .account-login-button {
        width: auto;
        min-width: 0;
        min-height: 42px;
        padding: 0 14px;
        font-size: 13px;
    }

    html[data-view-mode="desktop"] .account-login-button span,
    html[data-view-mode="desktop"] .user-menu-name,
    html[data-view-mode="desktop"] .user-menu-trigger > svg {
        display: initial;
    }

    html[data-view-mode="desktop"] .user-menu-trigger {
        min-height: 42px;
        padding: 4px 8px 4px 5px;
    }

    html[data-view-mode="desktop"] .workspace {
        flex: 1;
        display: grid;
        grid-template-columns: 376px minmax(0, 1fr);
        gap: 14px;
    }

    html[data-view-mode="desktop"] .map-stage {
        order: 0;
        height: auto;
        min-height: 0;
        border-radius: 24px;
    }

    html[data-view-mode="desktop"] .sidebar {
        min-height: 0;
        max-height: none;
        overflow: hidden;
        border-radius: 24px;
    }

    html[data-view-mode="desktop"] .shop-list {
        min-height: 0;
        overflow-y: auto;
    }

    html[data-view-mode="desktop"] .route-panel {
        top: 18px;
        right: 18px;
        bottom: auto;
        left: auto;
        width: min(420px, calc(100% - 36px));
        max-height: calc(100% - 36px);
        padding: 16px;
        border-radius: 20px;
    }

    html[data-view-mode="desktop"] .ai-panel {
        top: 106px;
        right: 18px;
        bottom: 18px;
        left: auto;
        width: min(400px, calc(100vw - 36px));
        transform: none;
        animation: ai-panel-in 200ms ease both;
    }
}

/* Compact mobile header: all controls stay in the top icon dock. */
.mobile-only-action,
.mobile-filter-heading {
    display: none;
}

html[data-view-mode="mobile"] .mobile-only-action {
    display: inline-flex !important;
}

html[data-view-mode="mobile"] .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px;
}

html[data-view-mode="mobile"] .brand {
    grid-column: 1;
    grid-row: 1;
}

html[data-view-mode="mobile"] .top-actions {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 5px;
}

html[data-view-mode="mobile"] .search-box {
    display: none;
    grid-column: 1 / -1;
    grid-row: 3;
}

html[data-view-mode="mobile"] body.mobile-search-open .search-box {
    display: flex;
}

html[data-view-mode="mobile"] .mobile-top-action {
    color: #59655d;
    background: #f6f2ea;
}

html[data-view-mode="mobile"] body.mobile-search-open #mobileSearchBtn,
html[data-view-mode="mobile"] body.mobile-filter-open #mobileFilterBtn {
    color: white;
    background: var(--green);
    border-color: var(--green);
}

html[data-view-mode="mobile"] .sidebar-header,
html[data-view-mode="mobile"] .sidebar-footer {
    display: none;
}

html[data-view-mode="mobile"] .discovery-controls {
    display: none;
}

html[data-view-mode="mobile"] .sidebar {
    background: transparent;
    border: 0;
    box-shadow: none;
}

html[data-view-mode="mobile"] .empty-state {
    min-height: 260px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

html[data-view-mode="mobile"] body.mobile-filter-open .discovery-controls {
    position: fixed;
    z-index: 1900;
    top: var(--mobile-topbar-bottom, 112px);
    left: 50%;
    width: min(500px, calc(100vw - 20px));
    margin: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 18px 52px rgba(30, 39, 31, 0.2);
    transform: translateX(-50%);
    backdrop-filter: blur(18px);
}

html[data-view-mode="mobile"] body.mobile-filter-open .mobile-filter-heading {
    padding: 0 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-column: 1 / -1;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.mobile-filter-close {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #68736b;
    background: #f1eee6;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

.mobile-filter-close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

html[data-view-mode="mobile"] .discovery-controls .select-control select {
    height: 38px;
    font-size: 11px;
}

html[data-view-mode="mobile"] .discovery-controls .scope-switch {
    min-height: 32px;
    font-size: 10px;
}

html[data-view-mode="mobile"] .ai-launcher {
    padding: 6px;
    border-radius: 13px;
}

html[data-view-mode="mobile"] .ai-launcher > span:last-child {
    display: none;
}

/* Mobile shop list is stored in a bottom drawer. */
.mobile-shop-drawer-handle {
    display: none;
}

html[data-view-mode="mobile"] body {
    overflow: hidden;
}

html[data-view-mode="mobile"] .app-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

html[data-view-mode="mobile"] .workspace {
    min-height: 0;
    flex: 1;
}

html[data-view-mode="mobile"] .map-stage {
    height: auto;
    min-height: 0;
    flex: 1;
}

html[data-view-mode="mobile"] .sidebar {
    position: fixed;
    z-index: 1850;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 50%;
    width: min(500px, calc(100vw - 20px));
    height: 74px;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 20px;
    box-shadow: 0 20px 56px rgba(27, 37, 29, 0.22);
    transform: translateX(-50%);
    transition: height 220ms ease, box-shadow 220ms ease;
    backdrop-filter: blur(18px);
}

html[data-view-mode="mobile"] body.mobile-shop-drawer-open .sidebar {
    height: min(68dvh, 620px);
    box-shadow: 0 26px 72px rgba(27, 37, 29, 0.3);
}

html[data-view-mode="mobile"] .mobile-shop-drawer-handle {
    position: relative;
    width: 100%;
    min-height: 72px;
    padding: 17px 16px 10px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.drawer-grip {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 38px;
    height: 4px;
    background: #d6d0c5;
    border-radius: 999px;
    transform: translateX(-50%);
}

.drawer-copy {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.drawer-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-chevron {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    transition: transform 180ms ease;
}

html[data-view-mode="mobile"] body.mobile-shop-drawer-open .drawer-chevron {
    transform: rotate(180deg);
}

html[data-view-mode="mobile"] .sidebar .shop-list {
    min-height: 0;
    flex: 1;
    padding: 0 10px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

html[data-view-mode="mobile"] .sidebar .empty-state {
    min-height: 0;
    flex: 1;
    margin: 0 10px 12px;
    overflow-y: auto;
}

html[data-view-mode="mobile"] .leaflet-control-zoom {
    margin-right: 12px !important;
    margin-bottom: 94px !important;
}

html[data-view-mode="mobile"] .ai-launcher {
    z-index: 1700;
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 84px));
}

html[data-view-mode="mobile"] body.mobile-route-open .sidebar {
    display: none;
}

/* Mobile motion system */
@keyframes mobile-soft-drop-in {
    from { opacity: 0; transform: translateY(-10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mobile-pop-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mobile-sheet-up {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mobile-center-sheet-up {
    from { opacity: 0; transform: translate(-50%, 18px) scale(0.975); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes mobile-drawer-content-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-card-in {
    from { opacity: 0; transform: translateY(10px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mobile-menu-card-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

html[data-view-mode="mobile"] .search-box {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
    transition:
        opacity 180ms ease,
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        display 200ms allow-discrete;
}

html[data-view-mode="mobile"] body.mobile-search-open .search-box {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@starting-style {
    html[data-view-mode="mobile"] body.mobile-search-open .search-box {
        opacity: 0;
        transform: translateY(-10px) scale(0.985);
    }
}

html[data-view-mode="mobile"] body.mobile-filter-open .discovery-controls {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
    transition:
        opacity 180ms ease,
        transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
        display 220ms allow-discrete;
}

html[data-view-mode="mobile"] .discovery-controls {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-10px) scale(0.97);
    transform-origin: top center;
}

@starting-style {
    html[data-view-mode="mobile"] body.mobile-filter-open .discovery-controls {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.97);
    }
}

html[data-view-mode="mobile"] .mobile-filter-heading {
    animation: mobile-menu-card-in 220ms ease both;
}

html[data-view-mode="mobile"] .discovery-controls .select-control,
html[data-view-mode="mobile"] .discovery-controls .scope-switch {
    animation: mobile-menu-card-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] .discovery-controls .select-control:nth-of-type(2) {
    animation-delay: 35ms;
}

html[data-view-mode="mobile"] .discovery-controls .scope-switch {
    animation-delay: 70ms;
}

html[data-view-mode="mobile"] .view-choice svg,
html[data-view-mode="mobile"] #mobileSearchBtn svg,
html[data-view-mode="mobile"] #mobileFilterBtn svg {
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-view-mode="mobile"] body.mobile-search-open #mobileSearchBtn svg {
    transform: scale(1.12);
}

html[data-view-mode="mobile"] body.mobile-filter-open #mobileFilterBtn svg {
    transform: rotate(90deg);
}

html[data-view-mode="mobile"] .sidebar {
    will-change: height, transform;
    transform: translateX(-50%) translateY(4px);
    transition:
        height 360ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 280ms ease;
}

html[data-view-mode="mobile"] body.mobile-shop-drawer-open .sidebar {
    transform: translateX(-50%) translateY(0);
}

html[data-view-mode="mobile"] body.mobile-shop-drawer-open .drawer-copy {
    animation: mobile-drawer-content-in 260ms 40ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] body.mobile-shop-drawer-open .shop-list {
    animation: mobile-drawer-content-in 280ms 60ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] body.mobile-shop-drawer-open .shop-card {
    animation: mobile-card-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] body.mobile-shop-drawer-open .shop-card:nth-child(2) { animation-delay: 35ms; }
html[data-view-mode="mobile"] body.mobile-shop-drawer-open .shop-card:nth-child(3) { animation-delay: 70ms; }
html[data-view-mode="mobile"] body.mobile-shop-drawer-open .shop-card:nth-child(4) { animation-delay: 105ms; }
html[data-view-mode="mobile"] body.mobile-shop-drawer-open .shop-card:nth-child(5) { animation-delay: 140ms; }
html[data-view-mode="mobile"] body.mobile-shop-drawer-open .shop-card:nth-child(6) { animation-delay: 175ms; }

html[data-view-mode="mobile"] .route-panel {
    animation: mobile-sheet-up 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] .route-panel .travel-mode {
    animation: mobile-menu-card-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] .route-panel .travel-mode:nth-child(2) { animation-delay: 35ms; }
html[data-view-mode="mobile"] .route-panel .travel-mode:nth-child(3) { animation-delay: 70ms; }
html[data-view-mode="mobile"] .route-panel .travel-mode:nth-child(4) { animation-delay: 105ms; }

html[data-view-mode="mobile"] .review-panel,
html[data-view-mode="mobile"] .community-review-panel,
html[data-view-mode="mobile"] .route-recommendation {
    animation: mobile-menu-card-in 280ms 90ms ease both;
}

html[data-view-mode="mobile"] .ai-panel {
    animation: mobile-center-sheet-up 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] .user-dropdown {
    transform-origin: top right;
    animation: mobile-pop-in 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] .auth-backdrop {
    animation: mobile-backdrop-in 180ms ease both;
}

html[data-view-mode="mobile"] .auth-dialog {
    animation: mobile-sheet-up 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    html[data-view-mode="mobile"] .search-box,
    html[data-view-mode="mobile"] .discovery-controls,
    html[data-view-mode="mobile"] .sidebar,
    html[data-view-mode="mobile"] .route-panel,
    html[data-view-mode="mobile"] .ai-panel,
    html[data-view-mode="mobile"] .auth-dialog,
    html[data-view-mode="mobile"] .user-dropdown {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    html[data-view-mode="mobile"] .shop-card,
    html[data-view-mode="mobile"] .travel-mode,
    html[data-view-mode="mobile"] .drawer-copy,
    html[data-view-mode="mobile"] .shop-list {
        animation: none !important;
    }
}

/* Location-independent shop details */
.route-error-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 8px;
}

.route-error-actions .button {
    width: 100%;
}

body.shop-detail-open {
    overflow: hidden;
}

.shop-detail-modal {
    z-index: 2950;
}

.shop-detail-dialog {
    width: min(520px, 100%);
    padding: 24px;
}

.shop-detail-hero {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding-right: 28px;
}

.shop-detail-visual {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(232, 93, 54, 0.13), transparent 65%),
        #f4eee4;
    border: 1px solid #ebe2d6;
    border-radius: 22px 22px 22px 7px;
    font-size: 46px;
}

.shop-detail-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.shop-detail-visual img[hidden] {
    display: none;
}

.shop-detail-heading {
    min-width: 0;
}

.shop-detail-category {
    display: inline-flex;
    padding: 4px 7px;
    color: var(--accent-dark);
    background: #faece6;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 800;
}

.shop-detail-heading h2 {
    margin: 7px 0 8px;
    font-size: 22px;
    line-height: 1.3;
    word-break: break-word;
}

.shop-detail-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #707970;
    font-size: 10px;
}

.shop-detail-stats strong {
    color: #9a6817;
    font-size: 13px;
}

.shop-detail-description {
    margin: 18px 0 14px;
    color: #465249;
    font-size: 12px;
    line-height: 1.7;
}

.shop-detail-facts {
    margin: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: #f7f4ed;
    border: 1px solid #ebe4d9;
    border-radius: 13px;
}

.shop-detail-facts > div:first-child {
    grid-column: 1 / -1;
}

.shop-detail-facts dt {
    margin-bottom: 3px;
    color: #90978f;
    font-size: 8px;
    font-weight: 700;
}

.shop-detail-facts dd {
    margin: 0;
    color: #4e5951;
    font-size: 10px;
    line-height: 1.5;
    word-break: break-word;
}

.shop-detail-platforms {
    margin-top: 13px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.shop-detail-location-note {
    margin: 13px 0;
    padding: 9px 10px;
    color: #48634f;
    background: #edf4ed;
    border-radius: 10px;
    font-size: 9px;
    line-height: 1.55;
}

.shop-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
    gap: 8px;
}

.shop-detail-actions .button {
    width: 100%;
}

html[data-view-mode="mobile"] .shop-detail-dialog {
    width: min(500px, 100%);
    max-height: calc(100dvh - 20px);
    padding: 22px 18px;
    border-radius: 22px;
    animation: mobile-sheet-up 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-view-mode="mobile"] .shop-detail-hero {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
}

html[data-view-mode="mobile"] .shop-detail-visual {
    width: 86px;
    height: 86px;
    border-radius: 18px 18px 18px 6px;
    font-size: 36px;
}

html[data-view-mode="mobile"] .shop-detail-heading h2 {
    font-size: 19px;
}

html[data-view-mode="mobile"] .shop-detail-facts {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .shop-detail-facts > div:first-child {
    grid-column: auto;
}

html[data-view-mode="mobile"] .shop-detail-platforms {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .shop-detail-actions {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .shop-detail-actions .button {
    min-height: 42px;
}

@media (max-width: 420px) {
    .route-error-actions {
        grid-template-columns: 1fr;
    }

    .shop-detail-hero {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .shop-detail-visual {
        width: 74px;
        height: 74px;
        font-size: 31px;
    }

    .shop-detail-heading h2 {
        font-size: 18px;
    }
}

.shop-detail-actions .button {
    color: var(--ink);
    font-size: 12px;
}

.shop-detail-actions .button-primary {
    color: white;
}

.shop-detail-dialog .auth-close:focus-visible {
    outline: 3px solid rgba(232, 93, 54, 0.28);
    outline-offset: 2px;
}

/* Persistent mobile city and district switcher */
.mobile-location-switcher {
    display: none;
}

html[data-view-mode="mobile"] .mobile-location-switcher {
    position: absolute;
    z-index: 520;
    top: 72px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 24px);
}

.mobile-location-button {
    min-width: 0;
    max-width: 154px;
    min-height: 42px;
    padding: 6px 10px 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    text-align: left;
    background: rgba(255, 253, 248, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 12px;
    box-shadow: 0 7px 22px rgba(28, 38, 30, 0.15);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.mobile-location-button:hover,
.mobile-location-button:focus-visible {
    border-color: rgba(232, 93, 54, 0.42);
    box-shadow: 0 9px 24px rgba(28, 38, 30, 0.18);
    transform: translateY(-1px);
}

.mobile-location-button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--green);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-location-button > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mobile-location-button small {
    color: #90978f;
    font-size: 7px;
    font-weight: 700;
}

.mobile-location-button strong {
    max-width: 112px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .map-stage.route-active .mobile-location-switcher {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 360px) {
    html[data-view-mode="mobile"] .mobile-location-button {
        max-width: 140px;
        padding-right: 8px;
    }

    html[data-view-mode="mobile"] .mobile-location-button strong {
        max-width: 96px;
    }
}

/* Nearby shop picker for the add-shop form */
.nearby-shop-finder {
    padding: 13px;
    background:
        radial-gradient(circle at 100% 0, rgba(36, 77, 57, 0.08), transparent 12rem),
        #f4f7f1;
    border: 1px solid #dce6dc;
    border-radius: 15px;
}

.nearby-finder-heading {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.nearby-finder-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fffaf2;
    background: var(--green);
    border-radius: 9px 9px 9px 3px;
    font-size: 16px;
}

.nearby-finder-heading > div {
    min-width: 0;
}

.nearby-finder-heading strong {
    display: block;
    color: var(--ink);
    font-size: 11px;
}

.nearby-finder-heading p {
    margin: 3px 0 0;
    color: #758078;
    font-size: 8px;
    line-height: 1.5;
}

.nearby-search-row {
    margin-top: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.nearby-search-row input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    color: var(--ink);
    background: white;
    border: 1px solid #dfe7dd;
    border-radius: 9px;
    outline: 0;
    font-size: 10px;
}

.nearby-search-row input:focus {
    border-color: rgba(36, 77, 57, 0.48);
    box-shadow: 0 0 0 3px rgba(36, 77, 57, 0.08);
}

.nearby-search-button {
    min-height: 36px;
    padding: 0 11px;
    color: white;
    background: var(--green);
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.nearby-search-button:hover {
    background: #193f2d;
}

.nearby-search-button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.nearby-shop-status {
    margin: 8px 1px 0;
    color: #647269;
    font-size: 8px;
    line-height: 1.5;
}

.nearby-shop-status.is-error {
    color: var(--accent-dark);
}

.nearby-shop-status[hidden],
.nearby-shop-results[hidden] {
    display: none;
}

.nearby-shop-results {
    max-height: 235px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.nearby-shop-candidate {
    width: 100%;
    padding: 8px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    text-align: left;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e1e8df;
    border-radius: 11px;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
    animation: nearby-candidate-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nearby-shop-candidate:hover,
.nearby-shop-candidate.is-selected {
    background: #fffdf8;
    border-color: rgba(232, 93, 54, 0.45);
    box-shadow: 0 7px 18px rgba(41, 52, 43, 0.08);
    transform: translateY(-1px);
}

.nearby-shop-candidate.is-selected {
    box-shadow: 0 0 0 2px rgba(232, 93, 54, 0.1);
}

.nearby-candidate-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: #f7eadf;
    border-radius: 10px 10px 10px 4px;
    font-size: 17px;
}

.nearby-candidate-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nearby-candidate-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nearby-candidate-copy small {
    overflow: hidden;
    color: #7e8780;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nearby-candidate-meta {
    color: #9a6817;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.nearby-candidate-select {
    min-width: 44px;
    padding: 5px 7px;
    color: var(--green);
    text-align: center;
    background: var(--green-soft);
    border-radius: 7px;
    font-size: 8px;
    font-weight: 800;
}

.nearby-shop-candidate.is-selected .nearby-candidate-select {
    color: white;
    background: var(--accent);
}

@keyframes nearby-candidate-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .nearby-search-row {
        grid-template-columns: 1fr;
    }

    .nearby-search-button {
        min-height: 38px;
    }

    .nearby-shop-results {
        max-height: 250px;
    }
}

.recovery-code-input {
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 15px !important;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.recovery-code-help {
    margin: -3px 0 0;
    padding: 8px 10px;
    color: #52645a;
    background: #edf4ed;
    border-radius: 9px;
    font-size: 9px;
    line-height: 1.55;
}

.recovery-code-help[hidden] {
    display: none;
}

.auth-error.is-success {
    color: #286044;
    background: #e8f5ec;
}

/* Draggable AI window */
.ai-panel-header {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.ai-panel-header:active {
    cursor: grabbing;
}

.ai-panel-header .icon-button {
    cursor: pointer;
    touch-action: manipulation;
}

.ai-drag-hint {
    display: inline-flex;
    margin-top: 5px;
    padding: 3px 6px;
    color: #dce8df !important;
    background: rgba(255, 255, 255, 0.09);
    border-radius: 5px;
    font-size: 7px !important;
    letter-spacing: 0.03em;
}

.ai-panel.is-dragging {
    animation: none !important;
    transition: none !important;
    user-select: none;
    box-shadow: 0 30px 80px rgba(18, 30, 22, 0.32);
}

.recovery-email-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.recovery-email-row input {
    min-width: 0;
}

.recovery-send-button {
    min-height: 44px;
    padding: 0 11px;
    color: white;
    background: var(--green);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.recovery-send-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.recovery-send-status {
    margin: 2px 0 0;
    color: #326447;
    font-size: 9px;
}

.recovery-send-status.is-error {
    color: var(--accent-dark);
}

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

@media (max-width: 420px) {
    .recovery-email-row {
        grid-template-columns: 1fr;
    }
}

.global-search-trigger {
    min-height: 28px;
    padding: 0 8px;
    flex: 0 0 auto;
    color: var(--green);
    background: var(--green-soft);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.global-search-trigger:hover { background: #d7e8db; }
.global-search-dialog { width: min(720px, 100%); }
.global-search-heading { display: flex; align-items: center; gap: 13px; padding-right: 30px; }
.global-search-icon { width: 50px; height: 50px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--green); border-radius: 16px 16px 16px 5px; font-size: 20px; font-weight: 800; }
.global-search-heading p { margin: 0 0 3px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: 0.15em; }
.global-search-heading h2 { margin: 0 0 4px; font-size: 20px; }
.global-search-heading span:not(.global-search-icon) { color: var(--muted); font-size: 9px; }
.global-search-form { margin-top: 18px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.global-search-form input { height: 44px; padding: 0 12px; background: #f5f7f2; border: 1px solid transparent; border-radius: 11px; outline: 0; font-size: 11px; }
.global-search-form input:focus { background: white; border-color: rgba(232,93,54,.42); box-shadow: 0 0 0 3px rgba(232,93,54,.07); }
.global-search-form button { min-width: 80px; color: white; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 800; }
.global-search-form button:disabled { cursor: wait; opacity: .6; }
.global-search-status { margin: 10px 0; color: var(--muted); font-size: 9px; }
.global-search-status.is-error { color: var(--accent-dark); }
.global-search-results { max-height: min(55vh, 480px); display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.global-shop-result { width: 100%; padding: 11px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; text-align: left; background: white; border: 1px solid #e7e1d7; border-radius: 12px; cursor: pointer; }
.global-shop-result:hover { border-color: rgba(232,93,54,.45); box-shadow: 0 7px 20px rgba(41,48,42,.08); }
.global-shop-result-icon { width: 42px; height: 42px; display: grid; place-items: center; background: #f7eadf; border-radius: 11px 11px 11px 4px; font-size: 20px; }
.global-shop-result-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.global-shop-result-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.global-shop-result-copy small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.global-shop-result-meta { color: #9a6817; font-size: 8px; font-weight: 800; white-space: nowrap; }
.shop-video-panel { margin-top: 14px; padding: 12px; background: #f8f5ee; border: 1px solid #e8e1d6; border-radius: 14px; }
.shop-video-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.shop-video-header > div { display: flex; flex-direction: column; gap: 2px; }
.shop-video-header span { color: #d45b78; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.shop-video-header strong { font-size: 12px; }
.shop-video-bind { min-height: 30px; padding: 0 9px; color: white; background: #d45b78; border: 0; border-radius: 8px; cursor: pointer; font-size: 8px; font-weight: 800; }
.shop-video-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.shop-video-card { overflow: hidden; background: white; border: 1px solid #e6dfd4; border-radius: 11px; }
.shop-video-frame { position: relative; width: 100%; aspect-ratio: 16/9; background: #111; }
.shop-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.shop-video-info { padding: 8px; }
.shop-video-info strong { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.shop-video-info a { display: inline-block; margin-top: 4px; color: #d45b78; text-decoration: none; font-size: 8px; font-weight: 700; }
.shop-video-empty { grid-column: 1/-1; margin: 4px 0; padding: 12px; color: var(--muted); text-align: center; font-size: 9px; }
@media (max-width: 520px) {
    .global-search-trigger { padding: 0 6px; font-size: 7px; }
    .global-search-form { grid-template-columns: 1fr; }
    .global-search-form button { min-height: 38px; }
    .global-search-dialog { max-height: calc(100vh - 20px); }
    .shop-video-list { grid-template-columns: 1fr; }
}