:root {
    --bg: #f4f4f2;
    --bg-elevated: #ffffff;
    --bg-soft: #fafaf9;
    --text: #0a0a0a;
    --text-secondary: #52525b;
    --text-tertiary: #71717a;
    --line: rgba(0,0,0,0.07);
    --line-strong: rgba(0,0,0,0.12);
    --accent: #1a365d;
    --accent-hover: #0f2440;
    --accent-soft: rgba(26, 54, 93, 0.09);
    --blue: #1a365d;
    --blue-hover: #0f2440;
    --blue-soft: rgba(26, 54, 93, 0.09);
    --cta: #0a0a0a;
    --cta-hover: #27272a;
    --gold: #92600a;
    --gold-soft: rgba(146, 96, 10, 0.1);
    --success: #166534;
    --success-soft: rgba(22, 101, 52, 0.1);
    --brand-from: #1a365d;
    --brand-mid: #1e4976;
    --brand-to: #0f2440;
    --brand-gradient: linear-gradient(160deg, #1a365d 0%, #0f2440 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-lg: 0 24px 64px rgba(0,0,0,0.12);
    --shadow-icon: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.08);
    --radius: 18px;
    --radius-sm: 12px;
    --radius-pill: 980px;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --header-h: 52px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --spring: cubic-bezier(0.34, 1.25, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.47059;
    font-size: 17px;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
    width: min(1080px, calc(100% - 48px));
    margin-inline: auto;
}

/* ─── Header ─── */
.store-header {
    position: sticky;
    top: 0;
    z-index: 200;
}

.store-header > .container {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 44px;
    padding-bottom: 8px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    margin: 0 -4px;
}

.header-nav::-webkit-scrollbar { display: none; }

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-pill .tab-icon {
    display: flex;
    align-items: center;
    color: var(--text-tertiary);
}

.nav-pill .tab-icon svg {
    width: 16px;
    height: 16px;
}

.nav-pill:hover {
    color: var(--text);
    background: rgba(0,0,0,0.04);
}

.nav-pill.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.nav-pill.active .tab-icon { color: var(--accent); }

.header-wrap {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
}

.store-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.store-tab {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
    white-space: nowrap;
}

.store-tab:hover { color: var(--text); background: rgba(0,0,0,0.04); }

.store-tab.is-active {
    color: var(--blue);
    background: var(--blue-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-blur {
    position: absolute;
    inset: 0;
    background: rgba(251,251,253,0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark { flex-shrink: 0; display: block; }

.brand-name {
    display: flex;
    align-items: baseline;
    gap: 1px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.brand-copy {
    color: var(--text);
}

.brand-promt {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.04em;
}

.footer-brand .brand-copy,
.footer-brand .brand-promt { font-size: 1rem; }

.store-search {
    position: relative;
    width: 180px;
}

.store-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.store-search input {
    width: 100%;
    height: 34px;
    padding: 0 14px 0 34px;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(0,0,0,0.06);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.2s, box-shadow 0.2s;
}

.store-search input::placeholder { color: var(--text-tertiary); }

.store-search input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,113,227,0.25), var(--shadow-sm);
}

.header-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.header-admin svg { width: 18px; height: 18px; }
.header-admin:hover { background: rgba(0,0,0,0.06); color: var(--text); }

/* ─── Squircle icons (iOS style) ─── */
.squircle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(145deg, var(--accent, var(--blue)), color-mix(in srgb, var(--accent, var(--blue)) 70%, #000));
    box-shadow:
        0 1px 1px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.25);
}

.squircle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
    pointer-events: none;
}

.squircle img { width: 100%; height: 100%; object-fit: cover; }

.squircle span {
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.icon-md {
    width: 64px;
    height: 64px;
    border-radius: 22%;
    flex-shrink: 0;
}

.icon-md span { font-size: 1.5rem; }

.icon-lg {
    width: 120px;
    height: 120px;
    border-radius: 22%;
}

.icon-lg span { font-size: 2.8rem; }

.icon-hero {
    width: 140px;
    height: 140px;
    border-radius: 22%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.icon-hero span { font-size: 3.5rem; color: var(--accent); text-shadow: none; }

.icon-story {
    width: 72px;
    height: 72px;
    border-radius: 22%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.icon-story span { font-size: 1.75rem; }

.icon-detail {
    width: 128px;
    height: 128px;
    border-radius: 22%;
}

.icon-detail span { font-size: 3rem; }

/* ─── Store intro strip ─── */
.store-intro { padding: 20px 0 4px; }

.store-intro-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.store-intro-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.store-intro-title {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 4px;
}

.store-intro-title strong { color: var(--accent); }

.store-intro-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.price-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0 16px;
    flex-wrap: wrap;
}

.price-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.price-chip:hover {
    color: var(--accent);
    border-color: rgba(26,54,93,0.25);
}

.price-chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(26,54,93,0.2);
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 24px rgba(26,54,93,0.15));
}

.publisher-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent-soft);
    border: 1px solid rgba(26,54,93,0.12);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.publisher-badge svg { color: #f59e0b; }

.price-tag {
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
}

.price-free { background: rgba(16,185,129,0.12); color: #059669; }
.price-paid { background: rgba(99,102,241,0.12); color: #4f46e5; }

.pill-btn.pill-free { background: rgba(16,185,129,0.12); color: #059669; }
.pill-btn.pill-paid { background: rgba(99,102,241,0.12); color: #4f46e5; min-width: 80px; }
.app-row:hover .pill-btn.pill-free { background: #10b981; color: #fff; }
.app-row:hover .pill-btn.pill-paid { background: var(--blue); color: #fff; }

.rate-section { padding-top: 8px; }
.rate-hint { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 14px; }
.rate-form { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rate-stars { display: flex; flex-direction: row-reverse; gap: 4px; }
.rate-star { cursor: pointer; }
.rate-star input { display: none; }
.rate-star span {
    font-size: 1.75rem;
    color: #d2d2d7;
    transition: color 0.15s, transform 0.15s;
}
.rate-star:hover span,
.rate-star:hover ~ .rate-star span,
.rate-star input:checked ~ span { color: #ff9500; }
.rate-star:hover span { transform: scale(1.15); }

/* legacy alias cleanup */
.vibe-intro { padding: 20px 0 4px; }

/* ─── Hero editorial card ─── */
.editorial-hero {
    padding: 28px 0 8px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 420px;
    background: var(--bg-elevated);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.hero-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-card-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.hero-mesh {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.7;
    animation: float 8s ease-in-out infinite;
}

.mesh-1 {
    width: 280px; height: 280px;
    background: #1a365d;
    top: -40px; left: -40px;
    opacity: 0.35;
}

.mesh-2 {
    width: 220px; height: 220px;
    background: #1e4976;
    bottom: -20px; right: 20%;
    animation-delay: -3s;
    opacity: 0.25;
}

.mesh-3 {
    width: 180px; height: 180px;
    background: #0f2440;
    top: 30%; right: -30px;
    animation-delay: -5s;
    opacity: 0.2;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -16px) scale(1.05); }
}

.hero-eyebrow {
    position: absolute;
    top: 28px;
    left: 28px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.hero-icon-wrap {
    position: relative;
    z-index: 2;
}

.hero-card-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
}

.hero-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 12px;
}

.hero-card-copy h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 14px;
}

.hero-card-copy > p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 28px;
    max-width: 36ch;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hero-meta {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ─── Buttons ─── */
.btn-blue, .pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: var(--radius-pill);
    transition: transform 0.2s var(--spring), background 0.2s, color 0.2s;
}

.btn-blue {
    padding: 12px 24px;
    font-size: 0.92rem;
}

.btn-blue:hover {
    background: var(--brand-gradient);
    color: #fff;
    transform: scale(1.03);
}

.pill-btn {
    min-width: 72px;
    height: 32px;
    padding: 0 18px;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.pill-btn.sm {
    min-width: 58px;
    height: 28px;
    font-size: 0.68rem;
    margin-top: 10px;
}

.app-row:hover .pill-btn,
.app-tile:hover .pill-btn {
    background: var(--blue);
    color: #fff;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s var(--spring);
    box-shadow: 0 4px 16px rgba(26,54,93,0.25);
}

.btn-primary:hover { opacity: 0.92; transform: scale(1.03); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0,0,0,0.05);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    border: none;
    cursor: pointer;
}

.btn-danger {
    background: rgba(255,59,48,0.1);
    color: #ff3b30;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

/* ─── Sections ─── */
.page-body { padding-bottom: 80px; }

.store-section { margin-top: 44px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2,
.page-title-head h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.page-title-head h1 { font-size: 2.2rem; margin-bottom: 4px; }

.section-head p,
.page-title-head p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.section-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--blue);
    white-space: nowrap;
    transition: opacity 0.2s;
}

.section-link:hover { opacity: 0.7; }

/* ─── Horizontal scroll rows ─── */
.scroll-row {
    margin: 0 -24px;
    padding: 4px 24px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.scroll-row::-webkit-scrollbar { display: none; }

.scroll-track {
    display: flex;
    gap: 16px;
    width: max-content;
}

.tiles-track { gap: 20px; }

/* Story cards */
.story-card {
    position: relative;
    width: 300px;
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.story-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.story-card-bg {
    position: absolute;
    inset: 0;
}

.story-1 .story-card-bg { background: linear-gradient(165deg, #1a365d 0%, #0f2440 100%); }
.story-2 .story-card-bg { background: linear-gradient(165deg, #292524 0%, #1c1917 100%); }
.story-3 .story-card-bg { background: linear-gradient(165deg, #1e3a2f 0%, #14532d 100%); }

.story-card-inner {
    position: relative;
    height: 100%;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.story-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 8px;
}

.story-copy h3 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 6px;
}

.story-copy p {
    font-size: 0.88rem;
    opacity: 0.85;
    line-height: 1.4;
}

.story-card .icon-story {
    position: absolute;
    top: 28px;
    left: 28px;
}

/* App tiles (horizontal scroll) */
.app-tile {
    width: 148px;
    flex-shrink: 0;
    text-align: center;
    transition: transform 0.25s var(--ease);
}

.app-tile:hover { transform: translateY(-4px); }

.app-tile .squircle { margin: 0 auto 12px; }

.app-tile h3 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-tile p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* App list rows (App Store style) */
.card-panel {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.app-list { display: flex; flex-direction: column; }

.app-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s;
}

.app-row:last-child { border-bottom: none; }
.app-row:hover { background: rgba(0,113,227,0.03); }

.app-row-rank {
    width: 24px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-tertiary);
    text-align: center;
    flex-shrink: 0;
}

.app-row-body { flex: 1; min-width: 0; overflow: hidden; }

.app-row-top {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-width: 0;
    width: 100%;
}

.app-row-top h3 {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-row-body > p,
.app-row-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-row-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.stars { color: #ff9500; letter-spacing: -1px; }
.stars .dim { color: #d2d2d7; }

.pill {
    padding: 2px 8px;
    background: rgba(0,113,227,0.08);
    color: var(--blue);
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ─── App detail page ─── */
.detail-page { padding: 24px 0 80px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--blue);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 28px;
}

.back-link:hover { opacity: 0.7; }

.detail-hero {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 36px;
}

.detail-info { flex: 1; min-width: 0; }

.detail-info h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 10px 0 6px;
}

.detail-tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

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

.detail-developer {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.detail-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.detail-actions .btn-primary { min-width: 140px; }

.detail-rating-big {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.detail-rating-big strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.detail-rating-big .stars {
    font-size: 0.7rem;
    display: block;
    margin-top: 2px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.detail-section h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.detail-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.info-panel h3 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.info-panel dl {
    display: grid;
    gap: 14px;
}

.info-panel dt {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

.info-panel dd {
    font-size: 0.92rem;
    font-weight: 600;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud span {
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ─── Empty state ─── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.92rem; }

/* ─── Footer ─── */
.store-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    padding: 48px 0 24px;
    margin-top: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-brand {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.footer-col p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 32ch;
}

.footer-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--blue); }

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* ─── Admin (light theme match) ─── */
.admin-page { padding: 32px 0 80px; }

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px;
}

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.admin-table-wrap {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.admin-table th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    background: var(--bg);
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(0,113,227,0.02); }

.admin-actions { display: flex; gap: 8px; }

.form-card {
    max-width: 640px;
    padding: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--bg-soft);
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: auto; }

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    font-weight: 500;
}

.alert-success { background: rgba(52,199,89,0.1); color: #248a3d; border: 1px solid rgba(52,199,89,0.2); }
.alert-error { background: rgba(255,59,48,0.08); color: #d70015; border: 1px solid rgba(255,59,48,0.15); }

.login-page {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 44px 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 16px 0 6px;
}

.login-card > p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 28px; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .hero-card { grid-template-columns: 1fr; }
    .hero-card-visual { min-height: 260px; }
    .hero-card-copy { padding: 32px 28px 36px; }
    .detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .container { width: calc(100% - 32px); }

    .store-search { width: 120px; }

    .header-nav {
        gap: 4px;
        padding-bottom: 8px;
    }

    .nav-pill {
        padding: 5px 12px;
        font-size: 0.78rem;
    }

    .nav-pill .tab-icon svg {
        width: 14px;
        height: 14px;
    }

    .detail-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-actions { width: 100%; }
    .detail-actions .btn-primary { width: 100%; }

    .story-card { width: 260px; height: 340px; }

    .form-row { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }

    .admin-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-card-copy h1 { font-size: 1.75rem; }
    .store-intro-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .app-row { padding: 14px 14px; gap: 10px; align-items: flex-start; }
    .icon-md { width: 52px; height: 52px; }
    .icon-md span { font-size: 1.25rem; }
    .app-row-cta { min-width: 64px; margin-top: 2px; }
    .get-btn { min-width: 60px; height: 30px; padding: 0 10px; font-size: 0.66rem; }
    .cta-sub { font-size: 0.6rem; max-width: 64px; }
    .app-row-meta { flex-wrap: wrap; gap: 4px 6px; }
    .pill-btn { min-width: 64px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
