/* ============================================================
   Store — store list, scan QR, store info, persistent chip
   (routes: #/store-list, #/scan-qr, #/store-info)
   ============================================================ */

/* ── STORE LIST PAGE ── */
#s-store-list { background: var(--surface-grey) }

/* ── SCAN QR CODE SCREEN ── */
.sq-screen {
    background: #1c1c24
}
.sq-hdr {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--surface-white);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: relative;
    z-index: 2
}
.sq-back, .sq-home {
    background: none;
    border: 0;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0
}
.sq-hdr-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-600);
    line-height: 28px
}
.sq-view {
    flex: 1;
    position: relative;
    background:
        radial-gradient(circle at 30% 30%, rgba(80,80,110,0.35), transparent 55%),
        radial-gradient(circle at 70% 80%, rgba(150,140,170,0.25), transparent 60%),
        linear-gradient(180deg, #1c1c24 0%, #2a2832 45%, #3a3742 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden
}
.sq-logo {
    margin-top: 72px;
    display: flex;
    align-items: center;
    justify-content: center
}
.sq-logo img {
    display: block;
    width: 100px;
    height: auto
}
.sq-reticle {
    position: relative;
    width: 250px;
    height: 250px;
    margin-top: 36px;
    background: rgba(255, 255, 255, 0.04)
}
.sq-c {
    position: absolute;
    width: 38px;
    height: 38px;
    border: 3.5px solid var(--surface-white);
    border-radius: 2px
}
.sq-c-tl { top: 0; left: 0; border-right: 0; border-bottom: 0 }
.sq-c-tr { top: 0; right: 0; border-left: 0; border-bottom: 0 }
.sq-c-bl { bottom: 0; left: 0; border-right: 0; border-top: 0 }
.sq-c-br { bottom: 0; right: 0; border-left: 0; border-top: 0 }

.sq-gift {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 56px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1.4px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
    color: var(--surface-white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.1s ease
}
.sq-gift:active { background: rgba(255,255,255,0.14); transform: scale(0.99) }
.sq-home-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center
}
.sq-home-bar > span {
    width: 135px;
    height: 5px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.85)
}

/* ── STORE INFO PAGE ── */
#s-store-info { background: var(--surface-white) }
.si-hdr {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--surface-white);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: relative;
    z-index: 1
}
.si-back, .si-more {
    background: none;
    border: 0;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0
}
.si-hdr-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-600);
    line-height: 28px
}
.si-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch
}
.si-scroll::-webkit-scrollbar { display: none }

.si-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 24px;
    background: var(--surface-white)
}
.si-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-500), var(--color-primary));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--surface-white)
}
.si-avatar-init {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em
}
.si-change {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28px;
    background: rgba(47, 44, 53, 0.45);
    color: var(--surface-white);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    border: 0;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent
}
.si-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink-600);
    line-height: 28px;
    text-align: center
}
.si-hours {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--ink-600);
    line-height: 20px
}
.si-status {
    color: #44BC15;
    font-weight: 400
}
.si-status.closed { color: var(--color-danger) }
.si-hours-dot {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--ink-600)
}

.si-tabs {
    display: flex;
    align-items: center;
    border-top: 1px solid #F1F0F5;
    border-bottom: 1px solid #F1F0F5;
    background: var(--surface-white);
    flex-shrink: 0
}
.si-tab {
    flex: 1;
    background: transparent;
    border: 0;
    padding: 12px 0 0;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    -webkit-tap-highlight-color: transparent
}
.si-tab span {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-400);
    line-height: 24px
}
.si-tab.active span { color: var(--color-primary) }
.si-tab-underline {
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    opacity: 0
}
.si-tab.active .si-tab-underline { opacity: 1 }

.si-panel {
    display: none;
    padding: 16px;
    gap: 24px;
    flex-direction: column
}
.si-panel.active { display: flex }

.si-contact {
    background: #F5F4F5;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px
}
.si-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 8px
}
.si-contact-row svg {
    flex-shrink: 0;
    margin-top: 4px
}
.si-contact-row span {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-600);
    line-height: 24px;
    word-break: break-word
}

.si-fields {
    display: flex;
    flex-direction: column;
    gap: 16px
}
.si-field {
    display: flex;
    flex-direction: column;
    gap: 4px
}
.si-field-lbl {
    font-size: 14px;
    color: var(--ink-600);
    line-height: 20px
}
.si-input {
    background: var(--surface-white);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    line-height: 24px;
    color: var(--ink-600);
    outline: 0;
    width: 100%;
    transition: border-color 0.15s ease
}
.si-input:focus { border-color: var(--color-primary) }

.si-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 24px;
    text-align: center
}
.si-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-600);
    margin-top: 8px
}
.si-empty-sub {
    font-size: 13px;
    color: var(--ink-300);
    line-height: 20px
}

.si-save-wrap {
    flex-shrink: 0;
    background: var(--surface-white);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06)
}
.si-save-btn {
    width: calc(100% - 32px);
    margin: 16px;
    padding: 12px 10px;
    border-radius: 8px;
    border: 0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.1s ease;
    background: var(--border-weak);
    color: #C1C0C2
}
.si-save-btn:not(:disabled) {
    background: var(--color-primary);
    color: var(--surface-white);
    cursor: pointer
}
.si-save-btn:not(:disabled):active {
    background: #4d22c4;
    transform: scale(0.99)
}
.si-save-btn:disabled { cursor: not-allowed }

.sl-search-inline {
    margin: 0 0 12px
}
.sl-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    -webkit-overflow-scrolling: touch
}
.sl-scroll::-webkit-scrollbar { display: none }
.sl-cards {
    display: flex;
    flex-direction: column;
    gap: 12px
}
.sl-empty {
    text-align: center;
    color: var(--ink-300);
    font-size: 13px;
    padding: 24px 12px;
    display: none
}
.sl-empty.show { display: block }

.sl-card {
    position: relative;
    background: var(--surface-white);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    border: 1px solid transparent;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s, transform .12s
}
.sl-card:active { transform: scale(.995); background: #FAF9FC }
.sl-card.current {
    border-color: var(--color-primary);
    cursor: default
}
.sl-card.current:active { transform: none; background: var(--surface-white) }

.sl-card-check {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    pointer-events: none
}
.sl-card-check-bg {
    width: 100%;
    height: 100%;
    display: block
}
.sl-card-check-tick {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 14px;
    height: 14px;
    display: block
}

.sl-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px
}
.sl-card-logo {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--purple-500), var(--color-primary));
    color: var(--surface-white);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .02em;
    overflow: hidden;
    background-size: cover;
    background-position: center
}
.sl-card-logo.has-img span { display: none }
.sl-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px
}
.sl-card-name-block {
    display: flex;
    flex-direction: column;
    gap: 2px
}
.sl-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-600);
    line-height: 28px
}
.sl-card-addr-txt {
    font-size: 14px;
    color: var(--ink-400);
    line-height: 20px;
    font-weight: 400
}
.sl-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 20px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent
}
.sl-card-cta svg { flex-shrink: 0 }
.sl-card-cta:active { opacity: .7 }

.ua-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--surface-white);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-danger);
    line-height: 20px;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s
}
.ua-logout:active {
    background: #FFF5F4
}

.ua-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 60px 24px;
    text-align: center
}
.ua-placeholder-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-600);
    margin-top: 8px
}
.ua-placeholder-sub {
    font-size: 13px;
    color: var(--ink-300);
    line-height: 1.45
}


/* ── PERSISTENT STORE CHIP ── */
.sc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 22px;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.15s ease
}
.sc-chip:active { transform: scale(0.97) }
.sc-chip-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center
}
.sc-chip-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0
}
.sc-chip-chev {
    flex-shrink: 0;
    opacity: 0.85
}

/* Variant: on dark/purple header (Home) */
.sc-chip-dark {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--surface-white);
    max-width: 200px
}
.sc-chip-dark:hover { background: rgba(255, 255, 255, 0.22) }

.cs-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 32px 140px;
    text-align: center
}
.cs-ico {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #f0e9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px
}
.cs-ico-qs {
    background: #d6f6ec
}
.cs-ico-qs img {
    filter: brightness(0) saturate(100%) invert(56%) sepia(73%) saturate(409%) hue-rotate(116deg) brightness(94%) contrast(86%)
}
.cs-h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink-900)
}
.cs-h2 {
    font-size: 14px;
    color: var(--ink-400);
    line-height: 20px
