/* ─── 공통 요소 ───────────────────────────────────────── */
.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -64px;
    z-index: 200;
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    background: var(--cocoa);
    color: var(--cocoa-fg);
    font-weight: 700;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease), opacity 0.2s;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn--sm {
    height: 38px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 14px;
}

.btn--lg {
    height: 54px;
    border-radius: 16px;
    font-size: 16px;
}

.btn--block {
    width: 100%;
}

.btn--primary {
    background: var(--primary);
    color: var(--primary-fg);
}

.btn--primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn--primary:disabled {
    opacity: 0.42;
}

.btn--soft {
    background: var(--surface-2);
    color: var(--text);
}

.btn--soft:hover:not(:disabled) {
    background: var(--surface-3);
}

.btn--ghost {
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--text-2);
    font-size: 14px;
}

.btn--ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn--ghost .icon {
    width: 18px;
    height: 18px;
}

.btn.is-busy {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-busy::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--primary-fg);
    border-right-color: transparent;
    animation: spin 0.7s linear infinite;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--text-2);
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.icon-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}

.link-btn {
    color: var(--brand-strong);
    font-size: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
    border-radius: 4px;
}

.chips {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: none;
    height: 34px;
    padding: 0 13px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.chip:hover {
    border-color: var(--brand-line);
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.theme-toggle__sun,
[data-theme="dark"] .theme-toggle__moon {
    display: none;
}

[data-theme="dark"] .theme-toggle__sun {
    display: block;
}

/* ─── 헤더 ─────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.1) blur(20px);
    backdrop-filter: saturate(1.1) blur(20px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 0 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand__word em {
    margin-left: 2px;
    font-style: normal;
    color: var(--brand-strong);
}

.visits {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.visits strong {
    color: var(--text);
    font-weight: 700;
}

.visits__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 2.4s ease-out infinite;
}

.visits__sep {
    width: 1px;
    height: 12px;
    background: var(--border-strong);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-actions__menu {
    display: none;
}

/* ─── 광고 ─────────────────────────────────────────── */
.ad-strip,
.ad-inline {
    display: none;
}

.ad-slot {
    overflow: hidden;
    border-radius: 14px;
    background: var(--surface-2);
}

.ad-slot iframe {
    display: block;
}

.ad-slot.is-pending {
    display: grid;
    place-items: center;
}

.ad-slot.is-pending::before {
    content: 'AD';
    color: var(--text-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

/* ─── 검색 영역 ─────────────────────────────────────── */
.finder__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--brand-strong);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.finder__title {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.04em;
}

.finder__art {
    flex: none;
    width: 108px;
    height: auto;
    margin: -10px -8px -12px 0;
}

.segmented {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 15px;
    background: var(--surface-2);
}

.segmented__thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 3);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transform: translateX(calc(var(--index, 0) * 100%));
    transition: transform 0.35s var(--ease);
}

[data-theme="dark"] .segmented__thumb {
    background: var(--surface-3);
}

.segmented__tab {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    border-radius: 11px;
    color: var(--text-3);
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s var(--ease);
}

.segmented__tab:hover,
.segmented__tab[aria-selected="true"] {
    color: var(--text);
}

.locate {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    background: var(--brand-soft);
}

.locate__icon {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--primary);
    color: var(--primary-fg);
}

.locate[data-state="pending"] .locate__icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 16px;
    border: 2px solid var(--primary);
    animation: ring 1.6s ease-out infinite;
}

.locate__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.locate__text strong {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.locate__text span {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.4;
}

.locate[data-state="denied"],
.locate[data-state="error"] {
    border-color: var(--border);
    background: var(--surface-2);
}

.locate[data-state="denied"] .locate__icon,
.locate[data-state="error"] .locate__icon {
    background: var(--surface-3);
    color: var(--text-2);
}

.locate .btn--soft {
    background: var(--surface);
}

.search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 54px;
    padding: 0 7px 0 15px;
    border: 1.5px solid transparent;
    border-radius: 17px;
    background: var(--surface-2);
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search-field:focus-within {
    border-color: var(--brand-strong);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.search-field__icon {
    color: var(--text-3);
}

.search-field__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 15px;
}

.search-field__input:focus-visible {
    box-shadow: none;
}

.search-field__input::placeholder {
    color: var(--text-3);
}

.search-field__kbd {
    padding: 3px 7px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text-3);
    font: 600 12px/1.2 var(--font-sans);
}

.search-field:focus-within .search-field__kbd {
    display: none;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.select {
    position: relative;
    display: block;
}

.select__label {
    position: absolute;
    top: 9px;
    left: 13px;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    pointer-events: none;
}

.select select {
    width: 100%;
    height: 60px;
    padding: 23px 28px 8px 12px;
    border: 1.5px solid transparent;
    border-radius: 15px;
    outline: none;
    background: var(--surface-2);
    font-size: 14.5px;
    font-weight: 650;
    text-overflow: ellipsis;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.select select:focus-visible {
    border-color: var(--brand-strong);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.select select:disabled {
    color: var(--text-3);
    cursor: not-allowed;
}

.select__chevron {
    position: absolute;
    top: 50%;
    right: 9px;
    color: var(--text-3);
    transform: translateY(-50%);
    pointer-events: none;
}

/* ─── 보기 전환 (모바일) ───────────────────────────────── */
.viewtabs {
    display: none;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.viewtabs__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    border-radius: 13px;
    color: var(--text-2);
    font-size: 14.5px;
    font-weight: 650;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.viewtabs__tab[aria-selected="true"] {
    background: var(--cocoa);
    color: var(--cocoa-fg);
}

.viewtabs__count {
    font-variant-numeric: tabular-nums;
    opacity: 0.72;
}

/* ─── 매장 목록 ─────────────────────────────────────── */
.results:focus {
    outline: none;
}

.results__head {
    padding: 18px 22px 10px;
}

.results__title {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.results__meta {
    margin-top: 2px;
    color: var(--text-2);
    font-size: 13px;
}

.store-list {
    display: grid;
    gap: 2px;
}

.store {
    position: relative;
    border-radius: 18px;
    transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    animation: rise 0.36s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 28ms);
}

.store__main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    width: 100%;
    padding: 14px 12px;
    border-radius: 18px;
    text-align: left;
}

.store__main:focus-visible {
    box-shadow: inset 0 0 0 2px var(--brand-strong);
}

.store__num {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    border-radius: 9px;
    background: var(--cocoa);
    color: var(--cocoa-fg);
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.store__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.store__name {
    overflow: hidden;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store__addr {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.store__tag {
    margin-top: 3px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.store__tag--area {
    background: var(--surface-2);
    color: var(--text-2);
}

.store__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 14px 52px;
}

.store:not(.is-selected) .store__actions {
    display: none;
}

.store.is-selected {
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1.5px var(--brand-line);
}

.store.is-selected .store__num {
    background: var(--primary);
    color: var(--primary-fg);
}

.store.is-selected .store__tag--area {
    background: var(--surface);
}

@media (hover: hover) {
    .store:not(.is-selected):hover {
        background: var(--surface-2);
    }
}

.action-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.action-chip:hover {
    border-color: var(--border-strong);
}

.action-chip .icon {
    width: 16px;
    height: 16px;
}

.action-chip--map {
    display: none;
}

.icon-naver {
    flex: none;
    width: 16px;
    height: 16px;
}

.skeleton-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 12px;
}

.sk {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 40%, var(--surface-2) 60%);
    background-size: 300% 100%;
    animation: shimmer 1.3s ease-in-out infinite;
}

.sk--num {
    width: 28px;
    height: 28px;
    border-radius: 9px;
}

.sk--title {
    width: 62%;
    height: 15px;
    margin-top: 2px;
}

.sk--text {
    width: 88%;
    height: 12px;
    margin-top: 9px;
}

.state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 26px 22px 30px;
    text-align: center;
}

.state__art {
    width: 140px;
    height: auto;
    margin-bottom: 8px;
}

.state__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    border-radius: 18px;
    background: var(--surface-2);
    color: var(--text-2);
}

.state__icon .icon {
    width: 26px;
    height: 26px;
}

.state__icon--error {
    background: var(--danger-soft);
    color: var(--danger);
}

.state__title {
    font-size: 16.5px;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.state__desc {
    max-width: 290px;
    color: var(--text-2);
    font-size: 13.5px;
}

.state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.state .chips {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
}

.more-btn {
    margin-top: 12px;
}

.results__foot {
    display: grid;
    gap: 4px;
    padding: 14px 22px 22px;
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.55;
}

/* ─── 지도 ─────────────────────────────────────────── */
.mapview {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    isolation: isolate;
}

.map-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    background: var(--map-bg);
}

.map-canvas {
    position: absolute;
    inset: 0;
}

/* 네이버 지도가 이 요소에 position: relative를 넣으므로 크기는 바깥 요소에서 받는다 */
.map-canvas__inner {
    width: 100%;
    height: 100%;
}

[data-theme="dark"] .map-canvas img[src*="pstatic.net/styles"] {
    filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.86) saturate(0.5);
}

.map-fallback {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 24px;
    background: radial-gradient(60% 50% at 50% 40%, var(--brand-soft), transparent 70%), var(--surface-2);
    text-align: center;
}

.map-fallback img {
    margin-bottom: 10px;
}

.map-fallback strong {
    font-size: 16px;
    font-weight: 750;
}

.map-fallback span {
    color: var(--text-2);
    font-size: 13.5px;
}

.map-chip {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    max-width: calc(100% - 90px);
    overflow: hidden;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-research {
    position: absolute;
    top: 16px;
    left: 50%;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    background: var(--cocoa);
    color: var(--cocoa-fg);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 650;
    transform: translateX(-50%);
    animation: drop-in 0.35s var(--ease);
}

.map-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-controls__group,
.map-ctrl--solo {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.map-controls__group {
    display: flex;
    flex-direction: column;
}

.map-ctrl {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--text);
    transition: background-color 0.2s var(--ease);
}

.map-ctrl:hover {
    background: var(--surface-2);
}

.map-controls__group .map-ctrl + .map-ctrl {
    border-top: 1px solid var(--border);
}

.map-controls[hidden] {
    display: none;
}

/* 지도 마커 */
.pin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 28px;
    padding: 0 9px;
    border-radius: var(--radius-pill);
    background: var(--marker-bg);
    color: var(--marker-fg);
    box-shadow: 0 0 0 2px var(--surface), 0 4px 10px rgba(20, 12, 8, 0.28);
    font: 700 12.5px/1 var(--font-sans);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    cursor: pointer;
    transform-origin: 14px 33px;
    transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.pin::after {
    content: '';
    position: absolute;
    left: 9px;
    bottom: -4px;
    z-index: -1;
    width: 10px;
    height: 10px;
    border-radius: 0 0 3px 0;
    background: inherit;
    transform: rotate(45deg);
}

.pin:hover {
    transform: scale(1.1);
}

.pin__label {
    display: none;
}

.pin.is-selected {
    background: var(--primary);
    color: var(--primary-fg);
    transform: scale(1.14);
}

.is-far .pin.is-minor:not(.is-selected),
.is-very-far .pin:not(.is-selected) {
    color: transparent;
    transform: scale(0.46);
}

.is-far .pin.is-minor:not(.is-selected):hover,
.is-very-far .pin:not(.is-selected):hover {
    transform: scale(0.6);
}

.pin.is-selected .pin__label {
    display: block;
    max-width: 150px;
    margin-left: 6px;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
}

.me-dot {
    position: relative;
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #3F7EF0;
    box-shadow: 0 2px 8px rgba(20, 40, 90, 0.35);
}

.me-dot::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: rgba(63, 126, 240, 0.22);
    animation: me-pulse 2.2s ease-out infinite;
}

/* 지도 위 매장 카드 (모바일) */
.carousel {
    display: none;
}

.ccard {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.ccard.is-selected {
    border-color: var(--brand-line);
}

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

.ccard .store__num {
    background: var(--primary);
    color: var(--primary-fg);
}

.ccard__actions {
    display: flex;
    gap: 6px;
}

.ccard__actions .action-chip {
    flex: 1;
    justify-content: center;
}

/* ─── 시트 (모달) ───────────────────────────────────── */
.sheet {
    width: min(440px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-lg);
}

.sheet[open] {
    animation: sheet-in 0.3s var(--ease);
}

.sheet::backdrop {
    background: var(--backdrop);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: fade-in 0.2s ease;
}

.sheet.is-closing {
    animation: sheet-out 0.18s ease forwards;
}

.sheet.is-closing::backdrop {
    animation: fade-out 0.18s ease forwards;
}

.sheet__body {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.sheet__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sheet__badge {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.sheet__heading {
    flex: 1;
    min-width: 0;
}

.sheet__title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.sheet__desc {
    margin-top: 2px;
    color: var(--text-2);
    font-size: 13.5px;
}

.sheet__close {
    margin: -6px -8px 0 0;
}

.field {
    display: grid;
    gap: 7px;
}

.field__label {
    font-size: 13.5px;
    font-weight: 650;
}

.input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    border: 1.5px solid var(--border);
    border-radius: 15px;
    outline: none;
    background: var(--surface);
    font-size: 15px;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input::placeholder {
    color: var(--text-3);
}

.input:focus,
.input:focus-visible {
    border-color: var(--brand-strong);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-soft);
}

.textarea {
    height: auto;
    min-height: 150px;
    padding: 13px 15px;
    line-height: 1.6;
    resize: vertical;
}

.field__row {
    display: flex;
    gap: 12px;
}

.field__error {
    color: var(--danger);
    font-size: 12.5px;
    font-weight: 650;
}

.field__count {
    margin-left: auto;
    color: var(--text-3);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

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

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: var(--surface-2);
    text-align: left;
}

.menu-item__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--surface);
    color: var(--brand-strong);
}

.menu-item strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.menu-item span span {
    color: var(--text-2);
    font-size: 13px;
}

.menu-visits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.menu-visits strong {
    color: var(--text);
}

/* ─── 토스트 ────────────────────────────────────────── */
.toasts {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 120;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 12px 12px;
    border-radius: 16px;
    background: var(--cocoa);
    color: var(--cocoa-fg);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    animation: toast-in 0.32s var(--ease);
}

.toast .icon {
    color: #93C572;
}

[data-theme="dark"] .toast .icon {
    color: #3E7519;
}

.toast--error .icon,
[data-theme="dark"] .toast--error .icon {
    color: #E0604B;
}

.toast.is-leaving {
    animation: toast-out 0.2s ease forwards;
}

.toast__action {
    margin-left: 4px;
    padding: 6px 10px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--cocoa-fg) 16%, transparent);
    font-size: 13px;
    font-weight: 700;
}

/* ─── PC (1024px 이상): 검색·목록 패널 + 지도를 한 화면에 ─── */
@media (min-width: 1024px) {
    body {
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .ad-strip {
        display: flex;
        justify-content: center;
        padding: 12px 12px 0;
    }

    .ad-slot--pc {
        width: 970px;
        height: 90px;
    }

    .app {
        flex: 1;
        display: grid;
        grid-template-columns: 400px minmax(0, 1fr);
        gap: 12px;
        min-height: 0;
        padding: 12px;
    }

    .panel {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: var(--radius-xl);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .finder {
        padding: 22px 22px 18px;
        border-bottom: 1px solid var(--border);
    }

    .results {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--border-strong) transparent;
    }

    .results__head {
        position: sticky;
        top: 0;
        z-index: 2;
        background: color-mix(in srgb, var(--surface) 90%, transparent);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    .store-list {
        padding: 0 10px;
    }

    .state {
        margin: 0 10px;
    }

    .more-btn {
        display: none !important;
    }

    .mapview {
        border: 1px solid var(--border);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-sm);
    }
}

/* 노트북처럼 세로가 짧은 화면에서는 소개를 줄여 목록 자리를 넓힌다 */
@media (min-width: 1024px) and (max-height: 880px) {
    .finder {
        padding: 16px 18px 14px;
    }

    .finder__intro {
        margin-bottom: 12px;
    }

    .eyebrow {
        display: none;
    }

    .finder__title {
        font-size: 19px;
        line-height: 1.3;
    }

    .finder__title br {
        display: none;
    }

    .finder__art {
        width: 54px;
        margin: -6px -2px -8px 0;
    }

    .segmented {
        margin-bottom: 10px;
    }

    .locate {
        padding: 9px 10px 9px 12px;
    }

    .locate__icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .search-field {
        height: 48px;
    }

    .chips {
        margin-top: 10px;
    }

    .select select {
        height: 54px;
        padding-top: 21px;
    }

    .results__head {
        padding-top: 14px;
    }
}

/* 세로가 아주 짧은 PC 화면은 페이지 스크롤로 바꾼다. 광고 줄이 없으면 기준을 낮춘다 */
@media (min-width: 1024px) and (max-height: 620px) {
    body:has(.ad-strip:not([hidden])) {
        height: auto;
        overflow: auto;
    }

    body:has(.ad-strip:not([hidden])) .app {
        height: 620px;
    }
}

@media (min-width: 1024px) and (max-height: 540px) {
    body {
        height: auto;
        overflow: auto;
    }

    .app {
        height: 540px;
    }
}

@media (min-width: 1440px) {
    .app {
        grid-template-columns: 440px minmax(0, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .ad-strip {
        padding: 16px 16px 0;
    }

    .finder {
        padding: 26px 26px 20px;
    }

    .results__head {
        padding: 18px 26px 10px;
    }

    .store-list {
        padding: 0 14px;
    }

    .results__foot {
        padding: 14px 26px 24px;
    }
}

/* ─── 태블릿·모바일 공통 ─────────────────────────────── */
@media (max-width: 1023px) {
    .app {
        display: flex;
        flex-direction: column;
    }

    .panel {
        display: contents;
    }

    .finder {
        order: 1;
        border: 1px solid var(--border);
        border-radius: var(--radius-xl);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .ad-inline {
        order: 2;
        display: flex;
        justify-content: center;
    }

    .ad-slot--mobile {
        width: 320px;
        height: 100px;
    }

    .viewtabs {
        order: 3;
    }

    .mapview {
        order: 4;
        border: 1px solid var(--border);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-sm);
    }

    .results {
        order: 5;
    }

    .results__head {
        padding: 6px 4px 12px;
    }

    .store {
        border: 1px solid var(--border);
        background: var(--surface);
        box-shadow: var(--shadow-xs);
    }

    .store.is-selected {
        border-color: var(--brand-line);
        box-shadow: 0 0 0 3px var(--brand-soft);
        background: var(--surface);
    }

    .store.is-selected .store__tag--area {
        background: var(--surface-2);
    }

    .skeleton-card {
        border: 1px solid var(--border);
        border-radius: 18px;
        background: var(--surface);
    }

    .state {
        border: 1px dashed var(--border-strong);
        border-radius: var(--radius-xl);
    }

    .results__foot {
        padding: 18px 4px 0;
        text-align: center;
    }
}

/* ─── 태블릿 (768~1023px): 지도 위, 목록은 2열 카드 ───────── */
@media (min-width: 768px) and (max-width: 1023px) {
    .app {
        gap: 16px;
        max-width: 960px;
        margin: 0 auto;
        padding: 20px 24px 40px;
    }

    .finder {
        display: grid;
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        grid-template-rows: auto 1fr;
        column-gap: 28px;
        padding: 26px;
    }

    .finder__intro {
        grid-row: 1 / 3;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        margin: 0;
    }

    .finder__art {
        width: 124px;
        margin: 12px 0 -8px -4px;
    }

    .segmented {
        align-self: start;
    }

    .mapview {
        height: 440px;
    }

    .store-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .store {
        align-self: start;
    }
}

@media (min-width: 768px) {
    .map-chip {
        display: none !important;
    }
}

@media (max-width: 899px) {
    .visits {
        display: none;
    }

    .header-actions {
        margin-left: auto;
    }
}

/* ─── 모바일 (767px 이하): 목록/지도 탭 + 지도 위 가로 카드 ─── */
@media (max-width: 767px) {
    :root {
        --header-h: 56px;
    }

    .site-header__inner {
        padding: 0 10px 0 16px;
    }

    .brand {
        font-size: 18px;
    }

    .brand .brand-mark {
        width: 32px;
        height: 32px;
    }

    .header-actions__wide {
        display: none;
    }

    .header-actions__menu {
        display: grid;
    }

    .app {
        gap: 12px;
        padding: 12px 14px 28px;
    }

    .finder {
        padding: 20px 16px 16px;
    }

    .finder__intro {
        margin-bottom: 16px;
    }

    .finder__title {
        font-size: 22px;
    }

    .finder__art {
        width: 92px;
        margin: -8px -4px -10px 0;
    }

    .segmented__tab {
        gap: 5px;
        font-size: 13.5px;
    }

    .search-field__kbd {
        display: none;
    }

    .region-grid {
        gap: 6px;
    }

    .select select {
        padding-right: 22px;
        padding-left: 10px;
        font-size: 14px;
    }

    .select__label {
        left: 11px;
    }

    .select__chevron {
        right: 6px;
    }

    .viewtabs {
        position: sticky;
        top: calc(var(--header-h) + 8px);
        z-index: 30;
        display: grid;
    }

    .mapview {
        height: calc(100vh - var(--header-h) - 84px);
        height: calc(100dvh - var(--header-h) - 84px);
        min-height: 460px;
    }

    .app[data-view="list"] .mapview,
    .app[data-view="map"] .results {
        display: none;
    }

    .store-list {
        gap: 10px;
    }

    .action-chip--map {
        display: inline-flex;
    }

    .store__actions {
        padding-left: 12px;
    }

    .store__actions .action-chip {
        flex: 1;
        justify-content: center;
        padding: 0 8px;
    }

    .carousel {
        position: relative;
        display: flex;
        flex: none;
        gap: 10px;
        padding: 12px 14px 14px;
        overflow-x: auto;
        border-top: 1px solid var(--border);
        background: var(--surface);
        scroll-padding: 0 14px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    .carousel::-webkit-scrollbar {
        display: none;
    }

    .ccard {
        flex: 0 0 calc(100% - 36px);
        border-color: transparent;
        background: var(--surface-2);
        box-shadow: none;
        scroll-snap-align: center;
    }

    .ccard.is-selected {
        border-color: var(--brand-line);
        background: var(--brand-soft);
    }

    .map-research {
        top: auto;
        bottom: 16px;
    }

    .map-chip {
        top: 12px;
        left: 12px;
    }

    .map-controls {
        top: 12px;
        right: 12px;
    }

    .sheet {
        width: 100%;
        max-height: 92dvh;
        margin: auto 0 0;
        border-bottom: 0;
        border-radius: 26px 26px 0 0;
    }

    .sheet[open] {
        animation: sheet-up 0.34s var(--ease);
    }

    .sheet.is-closing {
        animation: sheet-down 0.2s ease forwards;
    }

    .sheet__body {
        padding: 12px 18px calc(20px + env(safe-area-inset-bottom));
    }

    .sheet__body::before {
        content: '';
        justify-self: center;
        width: 40px;
        height: 4px;
        margin-bottom: 2px;
        border-radius: 2px;
        background: var(--border-strong);
    }

    .toasts {
        bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* ─── 애니메이션 ────────────────────────────────────── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 70%, transparent);
    }

    70%,
    100% {
        box-shadow: 0 0 0 7px transparent;
    }
}

@keyframes ring {
    0% {
        opacity: 0.8;
        transform: scale(0.9);
    }

    100% {
        opacity: 0;
        transform: scale(1.25);
    }
}

@keyframes me-pulse {
    0% {
        opacity: 1;
        transform: scale(0.4);
    }

    100% {
        opacity: 0;
        transform: scale(1.4);
    }
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

@keyframes drop-in {
    from {
        opacity: 0;
        transform: translate(-50%, -8px);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

@keyframes sheet-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

@keyframes sheet-out {
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

@keyframes sheet-up {
    from {
        transform: translateY(100%);
    }
}

@keyframes sheet-down {
    to {
        transform: translateY(100%);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}
