/* pointsite — refined comparison tool
   Design system v3: restraint, type-driven hierarchy, single accent
*/

/* ========== TOKENS ========== */
:root {
    /* Color — one accent (indigo), neutrals everywhere else */
    --c-bg:            #FAFAF9;
    --c-surface:       #FFFFFF;
    --c-surface-2:     #F5F5F4;
    --c-border:        #ECECEA;
    --c-border-2:      #D6D6D3;
    --c-text:          #0A0A0A;
    --c-text-2:        #525252;
    --c-text-3:        #A3A3A3;
    --c-accent:        #4F46E5;
    --c-accent-hover:  #4338CA;
    --c-accent-soft:   #EEF2FF;
    --c-success:       #047857;
    --c-success-soft:  #ECFDF5;
    --c-danger:        #B91C1C;
    --c-danger-soft:   #FEF2F2;

    /* Type */
    --font-sans:
        -apple-system, BlinkMacSystemFont, "Inter",
        "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI",
        "Noto Sans JP", system-ui, sans-serif;

    /* Radii */
    --r-1: 6px;
    --r-2: 10px;
    --r-3: 14px;
    --r-pill: 999px;

    /* Motion */
    --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="dark"] {
    --c-bg:            #0A0A0A;
    --c-surface:       #141414;
    --c-surface-2:     #1C1C1C;
    --c-border:        #232323;
    --c-border-2:      #383838;
    --c-text:          #FAFAFA;
    --c-text-2:        #A3A3A3;
    --c-text-3:        #6B6B6B;
    --c-accent:        #818CF8;
    --c-accent-hover:  #6366F1;
    --c-accent-soft:   #1E1B4B;
    --c-success:       #34D399;
    --c-success-soft:  #052E16;
    --c-danger:        #F87171;
    --c-danger-soft:   #3F0A0A;
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* ========== BASE ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: var(--font-sans);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.55;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern", "palt";
    -webkit-text-size-adjust: 100%;     /* iOS Safari: prevent auto-resize on orientation */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;          /* remove 300ms tap delay */
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
a, button { -webkit-tap-highlight-color: rgba(79, 70, 229, 0.08); }
button { font-family: inherit; cursor: pointer; }
/* iOS: prevent auto-zoom on input focus by ensuring 16px+ font-size */
input, textarea, select { font-size: 16px; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; top: -40px; left: 12px;
    background: var(--c-text); color: var(--c-bg);
    padding: 8px 14px; border-radius: var(--r-1);
    font-size: 0.85rem; font-weight: 500;
    z-index: 100;
    transition: top 0.15s;
}
.skip-link:focus { top: 12px; color: var(--c-bg); }

::selection { background: var(--c-accent-soft); color: var(--c-text); }

/* Focus ring (accessibility) */
:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
    border-radius: 4px;
}
button:focus-visible, a:focus-visible, input:focus-visible {
    outline-offset: 3px;
}

/* ========== HEADER ========== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--c-bg) 85%, transparent);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.logo {
    display: inline-flex; align-items: center; gap: 9px;
    color: var(--c-text); font-weight: 600;
    font-size: 0.94rem; letter-spacing: -0.01em;
}
.logo-mark {
    display: block;
    width: 22px; height: 22px;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.logo:hover { color: var(--c-text); }
.logo:hover .logo-mark { transform: translateY(-1px); transition: transform var(--t-fast); }

.header-nav {
    display: flex; gap: 2px; margin-left: auto; margin-right: 6px;
}
.header-nav a {
    position: relative;
    padding: 8px 12px;
    color: var(--c-text-2); font-size: 0.85rem; font-weight: 500;
    border-radius: var(--r-1);
    transition: color var(--t-fast);
}
.header-nav a:hover { color: var(--c-text); }
.header-nav a.active { color: var(--c-text); font-weight: 600; }
.header-nav a.active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -10px;
    height: 1.5px; background: var(--c-text);
}

.theme-toggle {
    width: 32px; height: 32px;
    border: none; background: transparent;
    color: var(--c-text-3); border-radius: var(--r-1);
    display: inline-flex; align-items: center; justify-content: center;
    transition: color var(--t-fast), background var(--t-fast);
}
.theme-toggle:hover { color: var(--c-text); background: var(--c-surface-2); }
.theme-toggle .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: block; }

/* ========== MAIN ========== */
.main { padding: 48px 24px 80px; }

/* ========== HERO / SEARCH ========== */
.search-section {
    margin: 0 auto 56px;
    max-width: 720px;
}
.search-title {
    font-size: 1.8rem; font-weight: 700;
    letter-spacing: -0.025em; line-height: 1.15;
    margin: 0 0 8px;
    color: var(--c-text);
}
.search-title strong { color: inherit; font-weight: 700; }
.search-subtitle {
    color: var(--c-text-2); margin: 0 0 28px;
    font-size: 0.93rem;
}

.search-form { margin: 0; }
.search-card {
    background: transparent; border: none; padding: 0; box-shadow: none;
}

.search-box { position: relative; }
.search-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--c-text-3); pointer-events: none;
    display: inline-flex;
}
.search-input {
    width: 100%; padding: 15px 44px 15px 46px;
    font-size: 0.96rem; font-family: inherit;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-2);
    color: var(--c-text); outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-input::placeholder { color: var(--c-text-3); }
.search-input:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 4px var(--c-accent-soft);
}
.search-clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px;
    border: none; background: var(--c-surface-2);
    color: var(--c-text-3); border-radius: var(--r-pill);
    font-size: 0.85rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--t-fast), color var(--t-fast);
}
.search-clear:hover { background: var(--c-border); color: var(--c-text); }
.search-kbd {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    padding: 2px 7px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.72rem; line-height: 1.2;
    color: var(--c-text-3);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    pointer-events: none;
    user-select: none;
    transition: opacity var(--t-fast);
}
.search-input:focus ~ .search-kbd { opacity: 0; }
.search-input:not(:placeholder-shown) ~ .search-kbd { display: none; }

/* Discover — text tabs with underline indicator (Linear-style) */
.discover-row { margin-top: 18px; }
.discover-tabs {
    display: flex; gap: 0; align-items: center;
    border-bottom: 1px solid var(--c-border);
    padding: 0;
    margin: 0;
}
.tag-label {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--c-text-3); font-size: 0.78rem; font-weight: 500;
    margin-right: 14px;
}
.tag-label svg { display: none; }
.discover-tab {
    position: relative;
    padding: 10px 0;
    margin-right: 18px;
    background: transparent; border: none;
    color: var(--c-text-3); font-size: 0.86rem; font-weight: 500;
    transition: color var(--t-fast);
}
.discover-tab:hover { color: var(--c-text); }
.discover-tab.active { color: var(--c-text); font-weight: 600; }
.discover-tab.active::after {
    content: ""; position: absolute; left: 0; right: 18px; bottom: -1px;
    height: 1.5px; background: var(--c-text);
}
.discover-tab:last-of-type.active::after { right: 0; }

.discover-toggle {
    margin-left: auto;
    width: 24px; height: 24px;
    border: none; background: transparent;
    color: var(--c-text-3); border-radius: var(--r-1);
    display: inline-flex; align-items: center; justify-content: center;
    transition: color var(--t-fast), background var(--t-fast);
}
.discover-toggle svg { transition: transform var(--t-fast); }
.discover-toggle:hover { color: var(--c-text); background: var(--c-surface-2); }
.discover-toggle.collapsed svg { transform: rotate(180deg); }
.discover-body.collapsed { display: none; }

/* Chips — restrained, no pill */
.discover-chips {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin: 14px 0 0;
    min-height: 32px;
}
.discover-chips.collapsed { display: none; }
.chip, .history-chip {
    display: inline-flex; align-items: center;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--r-1);
    color: var(--c-text-2); font-size: 0.82rem; font-weight: 500;
    text-decoration: none;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
    line-height: 1.4;
}
.chip:hover, .history-chip:hover {
    color: var(--c-text); border-color: var(--c-border-2);
    background: var(--c-surface);
    text-decoration: none;
}
.chip-count, .chip-icon { display: none; }
.chip svg, .history-chip svg { display: none; }

/* History */
.history-section {
    margin-top: 16px; padding-top: 14px;
    border-top: 1px dashed var(--c-border);
}
.history-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
}
.history-actions {
    margin-left: auto; display: inline-flex; align-items: center; gap: 2px;
}
.history-clear {
    padding: 2px 6px; background: transparent; border: none;
    color: var(--c-text-3); font-size: 0.78rem;
    transition: color var(--t-fast);
}
.history-clear:hover { color: var(--c-danger); }
.history-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.history-chips.collapsed { display: none; }
.history-chip {
    display: inline-block;
    vertical-align: middle;
    line-height: 1.5;
    max-width: 230px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-chip-wrap {
    display: inline-flex; align-items: stretch;
    margin-right: 2px;
}
.history-chip-wrap .history-chip {
    border-top-right-radius: 0; border-bottom-right-radius: 0;
    border-right: none;
    margin-right: 0;
}
.history-chip-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-top-right-radius: var(--r-1);
    border-bottom-right-radius: var(--r-1);
    color: var(--c-text-3);
    font-size: 0.95rem; line-height: 1;
    transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
    cursor: pointer; padding: 0;
}
.history-chip-x:hover {
    color: var(--c-danger); background: var(--c-danger-soft);
    border-color: var(--c-danger);
}
.history-chip-wrap:has(.history-chip-x:hover) .history-chip {
    border-color: var(--c-danger);
}

/* ========== SECTION ========== */
.section-title {
    font-size: 1.2rem; font-weight: 700;
    margin: 72px 0 14px;
    color: var(--c-text);
    letter-spacing: -0.022em;
    line-height: 1.2;
    display: flex; align-items: baseline; gap: 12px;
}
.section-title:first-child { margin-top: 8px; }
.section-title strong {
    color: var(--c-text); font-weight: 700;
}
.section-note {
    font-size: 0.78rem; font-weight: 400; color: var(--c-text-3);
}
.search-count {
    font-size: 0.82rem; font-weight: 400; color: var(--c-text-3);
    font-variant-numeric: tabular-nums;
}
.view-search .section-title strong {
    color: var(--c-accent); font-weight: 700;
}

/* ========== ROW LIST (popular / changes / search) ========== */
.offer-rows, .card-list {
    display: flex; flex-direction: column;
    border-top: 1px solid var(--c-border-2);
}
.offer-row, .offer-card {
    position: relative;
    display: grid;
    grid-template-columns: 28px 108px 1fr minmax(110px, auto) 18px;
    align-items: center; column-gap: 16px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--c-border);
    background: transparent;
    color: inherit; text-decoration: none;
    transition: background var(--t-fast);
}
.offer-row:hover, .offer-card:hover {
    background: var(--c-surface-2);
    text-decoration: none;
    cursor: pointer;
}
.offer-row:hover .row-chevron,
.offer-card:hover .row-chevron {
    color: var(--c-accent);
    transform: translateX(3px);
}
.offer-row:hover .name-link,
.offer-card:hover .name-link {
    color: var(--c-text);
}

/* Provider icon */
.provider-icon {
    width: 28px; height: 28px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--c-border);
    flex-shrink: 0; overflow: hidden;
}
.provider-icon img { width: 18px; height: 18px; object-fit: contain; display: block; }
.provider-icon .provider-icon-fallback {
    font-size: 0.62rem; font-weight: 700;
    color: var(--c-text-2); letter-spacing: -0.02em;
}
:root[data-theme="dark"] .provider-icon {
    background: #F5F5F4; border-color: #2A2A2A;
}

/* Provider cell — fixed width for table alignment */
.provider-cell {
    display: flex; flex-direction: column; min-width: 0; gap: 1px;
    overflow: hidden;
}
.provider-badge {
    color: var(--c-text-2); font-size: 0.78rem; font-weight: 500;
    background: none; padding: 0; border-radius: 0;
    white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.row-cat-badge {
    color: var(--c-text-3); font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

/* Name cell */
.name-cell { min-width: 0; }
.name-link {
    color: var(--c-text); font-size: 0.94rem; font-weight: 500;
    text-decoration: none; line-height: 1.4;
    display: inline-flex; align-items: baseline; gap: 5px;
    max-width: 100%;
    transition: color var(--t-fast);
}
.name-link .name-text {
    flex: 0 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-decoration: underline;
    text-decoration-color: var(--c-border-2);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color var(--t-fast);
}
.name-link:hover .name-text {
    text-decoration-color: var(--c-accent);
}
.name-link .ext-icon {
    flex-shrink: 0;
    color: var(--c-text-3);
    transform: translateY(1px);
    transition: color var(--t-fast), transform var(--t-fast);
}
.name-link:hover { color: var(--c-accent); text-decoration: none; }
.name-link:hover .name-text {
    text-decoration-color: var(--c-accent);
}
.name-link:hover .ext-icon {
    opacity: 1; color: var(--c-accent);
    transform: translate(1px, 0);
}
.row-condition {
    font-size: 0.76rem; color: var(--c-text-3); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Point cell */
.point-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}
.point-big {
    font-size: 1.05rem; font-weight: 700;
    color: var(--c-text); letter-spacing: -0.01em;
    display: inline-flex; align-items: baseline; gap: 1px;
    white-space: nowrap;
}
.point-big.percent { color: var(--c-text); }
.point-unit-yen {
    font-size: 0.78em; font-weight: 500;
    color: var(--c-text-3); margin-left: 1px;
}
.point-prev {
    display: block;
    font-size: 0.72rem; color: var(--c-text-3);
    margin-top: 3px; font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.point-prev .diff-up { color: var(--c-success); font-weight: 600; }
.point-prev .diff-down { color: var(--c-danger); font-weight: 600; }

/* Actions */
.actions-cell {
    display: flex; align-items: center; justify-content: flex-end;
}
.row-chevron {
    color: var(--c-text-3);
    display: inline-flex;
    transition: color var(--t-fast), transform var(--t-fast);
}

/* "Top result" — distinctive moment: inline left line + subtle background tint */
.offer-row.is-top {
    background: linear-gradient(90deg, var(--c-accent-soft) 0%, transparent 60%);
}
.offer-row.is-top::before {
    content: ""; position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 2px; background: var(--c-accent); border-radius: 1px;
}
.offer-row.is-top:hover {
    background: linear-gradient(90deg, var(--c-accent-soft) 0%, var(--c-surface-2) 70%);
}
.offer-row.is-top .point-big {
    color: var(--c-accent);
}
.top-badge {
    display: inline-flex; align-items: center;
    margin-left: 8px;
    padding: 1px 6px;
    background: var(--c-accent); color: var(--c-bg);
    font-size: 0.66rem; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
    border-radius: 3px;
    vertical-align: middle;
}

/* Legacy hidden */
.row-btn { display: none; }
.offer-card-head { display: none; }
.offer-name { display: none; }
.offer-point { display: none; }
.point-value { display: none; }
.point-unit { display: none; }
.type-badge { display: none; }
.cat-badge { display: none; }
.change-arrow { display: none; }

/* ========== Filter bar (sub-control of section header) ========== */
.filter-row {
    display: flex; gap: 8px;
    margin: 0 0 14px;
    align-items: center;
    flex-wrap: wrap;
}
.section-title + .filter-row { margin-top: 4px; }
.filter-divider {
    display: inline-block; width: 1px; height: 16px;
    background: var(--c-border-2);
    margin: 0 4px;
}
.filter-label {
    font-size: 0.74rem; color: var(--c-text-3);
    font-weight: 500; letter-spacing: 0.02em;
    margin-right: 2px;
}
.filter-btn {
    padding: 5px 11px; background: transparent;
    border: 1px solid var(--c-border); border-radius: var(--r-pill);
    color: var(--c-text-2); font-size: 0.82rem; font-weight: 500;
    transition: color var(--t-fast), border-color var(--t-fast),
                background var(--t-fast);
}
.filter-btn:hover { color: var(--c-text); border-color: var(--c-border-2); }
.filter-btn.active {
    background: var(--c-surface-2);
    color: var(--c-text);
    border-color: var(--c-border-2);
    font-weight: 600;
}
/* 「すべて」 = リセット意図のスタイル (parent / 親) */
.filter-btn.filter-all { font-weight: 500; }
.filter-btn.filter-all.active {
    background: var(--c-text); color: var(--c-bg);
    border-color: var(--c-text);
}

/* ========== STATS HERO (refined — type-first, no chrome) ========== */
.stats-banner-hero {
    margin: 96px 0 24px;
    padding: 56px 0 48px;
    border-top: 1px solid var(--c-border-2);
    background: transparent; box-shadow: none; border-radius: 0;
    border-bottom: none;
    text-align: center;
}
.stats-banner-hero::before, .stats-banner-hero::after { display: none; }
.stats-banner-inner {
    display: inline-flex; gap: 80px;
    justify-content: center; align-items: baseline;
}
.stats-banner-item { text-align: center; position: relative; padding: 0; }
.stats-banner-item + .stats-banner-item::before { display: none; }
.stats-banner-label {
    display: block; font-size: 0.68rem; font-weight: 600;
    color: var(--c-text-3); letter-spacing: 0.18em;
    margin-bottom: 12px; text-transform: uppercase;
}
.stats-banner-num {
    display: inline-flex; align-items: baseline;
    font-size: 3rem; font-weight: 700; letter-spacing: -0.045em; line-height: 1;
    color: var(--c-text);
    font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
}
.stats-banner-suffix {
    font-size: 1.3rem; font-weight: 600;
    color: var(--c-text-3); margin-left: 2px;
}
.stats-banner-unit {
    font-size: 0.88rem; font-weight: 500;
    color: var(--c-text-3); margin-left: 6px;
}
.stats-banner-caption {
    margin-top: 28px;
    font-size: 0.76rem; color: var(--c-text-3);
    letter-spacing: 0.03em;
}
.status-dot {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--c-success);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
}
.status-dot::after {
    content: ""; position: absolute; inset: -3px;
    border-radius: 50%; border: 1.5px solid var(--c-success);
    opacity: 0; animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
    0%   { transform: scale(0.6); opacity: 0.6; }
    80%  { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .status-dot::after { animation: none; }
}
.stats-banner-dp { margin-top: 64px; }
.stats-banner-bottom { margin-top: 80px; }

/* ========== Categories grid ========== */
.categories-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--c-border);
    border: 1px solid var(--c-border);
    border-radius: var(--r-2);
    overflow: hidden;
}
.category-card {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px; background: var(--c-bg);
    transition: background var(--t-fast);
    color: inherit; text-decoration: none;
}
.category-card:hover { background: var(--c-surface-2); text-decoration: none; }
.category-card-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.category-card-name { font-weight: 500; color: var(--c-text); font-size: 0.92rem; }
.category-card-count {
    font-size: 0.76rem; color: var(--c-text-3);
    font-variant-numeric: tabular-nums; margin-top: 2px;
}

/* ========== Empty / Loading ========== */
.empty {
    padding: 56px 20px; text-align: center;
    color: var(--c-text-3); font-size: 0.88rem;
    line-height: 1.6;
}
.empty-title {
    display: block; font-size: 0.95rem; color: var(--c-text);
    font-weight: 500; margin-bottom: 4px;
}
.empty-hint { color: var(--c-text-3); }

.loading {
    padding: 28px 12px; text-align: center;
    color: var(--c-text-3); font-size: 0.85rem;
}
.spinner {
    display: inline-block; width: 12px; height: 12px;
    border: 1.5px solid var(--c-border);
    border-top-color: var(--c-accent);
    border-radius: 50%; vertical-align: middle; margin-right: 8px;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton rows — matches offer-row layout */
.skeleton-rows {
    border-top: 1px solid var(--c-border-2);
}
.skeleton-row {
    display: grid;
    grid-template-columns: 28px 108px 1fr minmax(110px, auto) 18px;
    align-items: center; column-gap: 16px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--c-border);
}
.skel {
    background: linear-gradient(90deg,
        var(--c-surface-2) 0%,
        var(--c-bg) 40%,
        var(--c-surface-2) 80%);
    background-size: 220% 100%;
    animation: skel-pulse 1.6s ease-in-out infinite;
    border-radius: 4px;
    height: 12px;
}
.skel.icon { height: 28px; width: 28px; border-radius: 6px; }
.skel.short { width: 56px; }
.skel.med   { width: 72%; }
.skel.num   { width: 64px; justify-self: end; height: 14px; }
@keyframes skel-pulse {
    0%   { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .skel { animation: none; opacity: 0.7; }
}

/* ========== Offer Detail ========== */
.detail-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; gap: 12px;
}
.back-link {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--c-text-3); font-size: 0.85rem;
    transition: color var(--t-fast);
}
.back-link:hover { color: var(--c-text); text-decoration: none; }
.detail-share {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--r-1);
    color: var(--c-text-3); font-size: 0.78rem;
    transition: color var(--t-fast), border-color var(--t-fast);
    cursor: pointer;
}
.detail-share:hover { color: var(--c-text); border-color: var(--c-border-2); }
.detail-share.copied { color: var(--c-success); border-color: var(--c-success); }

.offer-detail {
    background: transparent; border: none; padding: 0;
    box-shadow: none; border-radius: 0;
}
.detail-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 8px;
}
.detail-head .provider-badge {
    color: var(--c-text-2); font-size: 0.85rem; font-weight: 500;
    background: none; padding: 0; border-radius: 0;
}
.detail-title {
    font-size: 1.65rem; font-weight: 700; margin: 4px 0 6px;
    color: var(--c-text); letter-spacing: -0.022em; line-height: 1.25;
}
.detail-condition { color: var(--c-text-2); font-size: 0.92rem; }
.detail-point-row {
    margin: 32px 0; padding: 28px 0;
    background: transparent;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    border-radius: 0;
    display: flex; align-items: baseline;
    gap: 24px; flex-wrap: wrap;
}
.detail-point {
    font-size: 2.4rem; font-weight: 700; color: var(--c-text);
    letter-spacing: -0.028em;
    font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.detail-point .point-unit-yen { font-size: 0.4em; }
.detail-point-meta { color: var(--c-text-3); font-size: 0.83rem; }
.detail-cta {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: auto;
    padding: 10px 18px;
    background: var(--c-text); color: var(--c-bg);
    border-radius: var(--r-1); font-weight: 500; font-size: 0.88rem;
    transition: opacity var(--t-fast);
}
.detail-cta:hover {
    color: var(--c-bg); text-decoration: none; opacity: 0.88;
}

.detail-section {
    margin-top: 40px; padding-top: 0;
    border-top: none;
}
.detail-section-title {
    font-size: 0.72rem; font-weight: 600;
    margin: 0 0 16px;
    color: var(--c-text-3);
    text-transform: uppercase; letter-spacing: 0.12em;
}
.chart-wrapper {
    position: relative; height: 240px; padding: 8px 0;
}

.history-table {
    width: 100%; border-collapse: collapse; font-size: 0.86rem;
}
.history-table th, .history-table td {
    padding: 10px 8px; text-align: left;
    border-bottom: 1px solid var(--c-border);
}
.history-table th {
    color: var(--c-text-3);
    font-weight: 500; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.1em;
    border-bottom: 1px solid var(--c-border-2);
}
.history-table td.point {
    font-weight: 600; color: var(--c-text);
    font-variant-numeric: tabular-nums;
}

/* section-action: right-aligned "see more" link in section headings (flex parent) */
.section-action {
    margin-left: auto;
    font-size: 0.8rem; font-weight: 500;
    color: var(--c-text-3);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--r-1);
    transition: color var(--t-fast), background var(--t-fast);
    white-space: nowrap;
    align-self: center;
}
.section-action:hover {
    color: var(--c-accent);
    background: var(--c-accent-soft);
}

/* ========== Rankings page ========== */
.rankings-title {
    font-size: 1.6rem; font-weight: 700;
    color: var(--c-text); letter-spacing: -0.02em;
    margin: 8px 0 8px;
}
.rankings-lead {
    color: var(--c-text-2); font-size: 0.92rem;
    margin: 0 0 24px;
}
.ranking-filter {
    display: inline-flex; gap: 4px;
    padding: 4px;
    background: var(--c-surface-2);
    border-radius: var(--r-2);
    margin-bottom: 20px;
}
.rfbtn {
    padding: 7px 16px;
    background: transparent;
    border: none;
    color: var(--c-text-2);
    font-size: 0.85rem; font-weight: 500;
    border-radius: var(--r-1);
    cursor: pointer;
    transition: color var(--t-fast), background var(--t-fast);
}
.rfbtn:hover { color: var(--c-text); }
.rfbtn.active {
    background: var(--c-surface);
    color: var(--c-text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ========== Pointsite list page (/invite) ========== */
.psite-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 0 56px;
}
.psite-header { margin-bottom: 28px; }
.psite-h1 {
    font-size: 1.75rem; font-weight: 700;
    color: var(--c-text); letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.psite-lead {
    color: var(--c-text-2); font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}
.psite-list {
    display: flex; flex-direction: column;
    gap: 8px;
}
.psite-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 18px;
    align-items: center;
    column-gap: 16px;
    padding: 14px 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-3);
    color: var(--c-text);
    text-decoration: none;
    transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.psite-card:hover {
    border-color: var(--c-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}
.psite-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--c-surface-2);
    padding: 6px;
    object-fit: contain;
    flex-shrink: 0;
}
.psite-body {
    display: flex; flex-direction: column;
    min-width: 0;
}
.psite-name {
    font-weight: 600; color: var(--c-text);
    font-size: 0.98rem;
    letter-spacing: -0.005em;
}
.psite-sub {
    font-size: 0.78rem; color: var(--c-text-3);
    margin-top: 2px;
}
.psite-code {
    display: inline-flex; flex-direction: column;
    align-items: flex-end;
    background: var(--c-surface-2);
    border: 1px solid transparent;
    border-radius: var(--r-1);
    padding: 6px 12px;
    cursor: pointer;
    transition: border-color var(--t-fast), background var(--t-fast);
    font-family: inherit;
}
.psite-code:hover {
    border-color: var(--c-accent);
    background: var(--c-accent-soft);
}
.psite-code.copied {
    background: var(--c-success-soft);
    border-color: var(--c-success);
}
.psite-code-label {
    font-size: 0.62rem;
    color: var(--c-text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.psite-code-value {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85rem; font-weight: 600;
    color: var(--c-text);
    margin-top: 2px;
}
.psite-codeless {
    font-size: 0.76rem;
    color: var(--c-text-3);
    padding: 8px 0;
}
.psite-arrow {
    color: var(--c-text-3);
    font-size: 1rem;
    transition: color var(--t-fast), transform var(--t-fast);
    text-align: center;
}
.psite-card:hover .psite-arrow {
    color: var(--c-accent);
    transform: translateX(3px);
}

.psite-foot {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px dashed var(--c-border);
    font-size: 0.85rem; color: var(--c-text-2);
    line-height: 1.7;
}
.psite-foot p { margin: 0 0 6px; }
.psite-foot a {
    color: var(--c-accent);
    text-decoration: underline;
    text-decoration-color: var(--c-border-2);
    text-underline-offset: 3px;
}
.psite-foot a:hover { text-decoration-color: var(--c-accent); }
.psite-foot-sub { font-size: 0.78rem; color: var(--c-text-3); }

@media (max-width: 720px) {
    .psite-page { padding: 8px 0 40px; }
    .psite-h1 { font-size: 1.35rem; }
    .psite-card {
        grid-template-columns: 38px minmax(0, 1fr) 14px;
        grid-template-rows: auto auto;
        column-gap: 12px;
        row-gap: 8px;
        padding: 12px 14px;
    }
    .psite-icon { width: 38px; height: 38px; grid-row: 1 / 3; align-self: center; }
    .psite-body { grid-column: 2 / 3; grid-row: 1; }
    .psite-arrow { grid-column: 3 / 4; grid-row: 1 / 3; align-self: center; }
    .psite-code {
        grid-column: 2 / 3; grid-row: 2;
        flex-direction: row; gap: 8px; align-items: baseline;
        padding: 4px 8px;
        align-self: flex-start;
    }
    .psite-codeless {
        grid-column: 2 / 3; grid-row: 2;
        padding: 0;
    }
}

/* ========== Pagination (search results) ========== */
.pagination {
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
    margin: 32px 0 8px;
    padding: 20px 0 4px;
    border-top: 1px solid var(--c-border);
}
.pg-info {
    font-size: 0.78rem;
    color: var(--c-text-3);
    font-variant-numeric: tabular-nums;
}
.pg-controls {
    display: inline-flex; flex-wrap: wrap; gap: 4px;
    align-items: center;
    justify-content: center;
}
.pg-prev, .pg-next, .pg-num {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-1);
    color: var(--c-text-2);
    font-size: 0.85rem; font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.pg-prev:hover:not(:disabled),
.pg-next:hover:not(:disabled),
.pg-num:hover:not(.active) {
    border-color: var(--c-accent);
    color: var(--c-accent);
}
.pg-num.active {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
    cursor: default;
}
.pg-prev:disabled, .pg-next:disabled {
    opacity: 0.4; cursor: not-allowed;
}
.pg-ell {
    color: var(--c-text-3);
    padding: 0 4px;
    user-select: none;
}
@media (max-width: 720px) {
    .pg-prev, .pg-next, .pg-num { min-width: 32px; height: 32px; padding: 0 8px; font-size: 0.78rem; }
    .pg-prev, .pg-next { padding: 0 10px; }
}

/* ========== Popular keywords ranking (home) ========== */
.popular-keywords {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-3);
    overflow: hidden;
}
.popkw-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(80px, 200px) 44px;
    align-items: center;
    column-gap: 14px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background var(--t-fast);
}
.popkw-row:last-child { border-bottom: 0; }
.popkw-row:hover { background: var(--c-surface-2); }
.popkw-rank {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.72rem; font-weight: 600;
    color: var(--c-text-3);
    text-align: center;
}
.popkw-row:nth-child(1) .popkw-rank,
.popkw-row:nth-child(2) .popkw-rank,
.popkw-row:nth-child(3) .popkw-rank { color: var(--c-accent); font-weight: 700; }
.popkw-q {
    color: var(--c-text); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.popkw-bar {
    background: var(--c-surface-2);
    border-radius: var(--r-pill);
    height: 4px; overflow: hidden;
}
.popkw-bar-fill {
    display: block; height: 100%;
    background: var(--c-accent);
    border-radius: var(--r-pill);
    transition: width 0.3s ease;
}
.popkw-cnt {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.76rem;
    color: var(--c-text-3);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
    .popkw-row {
        grid-template-columns: 24px minmax(0, 1fr) 40px;
        column-gap: 10px;
        padding: 10px 12px;
    }
    .popkw-bar { display: none; }
}

/* ========== Static pages (about / privacy / disclaimer / tokushoho / contact) ========== */
.static-page {
    max-width: 760px; margin: 0 auto;
    padding: 16px 0 40px;
    color: var(--c-text-2);
    font-size: 0.95rem; line-height: 1.85;
}
.static-page h1 {
    font-size: 1.75rem; font-weight: 700;
    color: var(--c-text); letter-spacing: -0.02em;
    margin: 0 0 24px;
}
.static-page h2 {
    font-size: 1.05rem; font-weight: 700;
    color: var(--c-text);
    margin: 36px 0 12px;
    padding-top: 8px;
}
.static-page p { margin: 0 0 14px; }
.static-page ul {
    margin: 8px 0 18px; padding-left: 1.2em;
    list-style: disc;
}
.static-page li { margin-bottom: 6px; }
.static-page strong { color: var(--c-text); font-weight: 600; }
.static-page code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    background: var(--c-surface-2);
    padding: 1px 6px; border-radius: 4px;
    font-size: 0.85em;
}
.static-page a {
    color: var(--c-accent);
    text-decoration: underline;
    text-decoration-color: var(--c-border-2);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--t-fast);
}
.static-page a:hover { text-decoration-color: var(--c-accent); }
.static-page .static-lead {
    font-size: 1rem; color: var(--c-text-2);
    padding: 16px 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-2);
    margin-bottom: 24px;
}
.static-page .static-meta {
    margin-top: 40px;
    font-size: 0.8rem; color: var(--c-text-3);
    border-top: 1px dashed var(--c-border);
    padding-top: 16px;
}
.static-page .static-table {
    width: 100%; border-collapse: collapse;
    margin: 12px 0 20px;
    font-size: 0.9rem;
}
.static-page .static-table th,
.static-page .static-table td {
    text-align: left; padding: 10px 12px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: top;
}
.static-page .static-table th {
    color: var(--c-text); font-weight: 600;
    width: 32%; background: var(--c-surface);
}
.static-page .contact-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-3);
    padding: 20px 22px;
    margin: 12px 0 24px;
}
.static-page .contact-row {
    display: flex; align-items: center; gap: 16px;
    font-size: 0.95rem;
}
.static-page .contact-label {
    color: var(--c-text-3); font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    min-width: 60px;
}
.static-page .contact-value {
    color: var(--c-accent); font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ========== Global Footer ========== */
.site-footer {
    background: var(--c-surface-2);
    border-top: 1px solid var(--c-border);
    margin-top: 96px;
    padding: 48px 0 24px;
    color: var(--c-text-2);
    font-size: 0.85rem;
}
.footer-inner {
    display: block;
}
.footer-brand {
    margin-bottom: 36px;
    max-width: 720px;
}
.footer-logo-link {
    display: inline-flex; align-items: center; gap: 9px;
    margin-bottom: 12px;
    color: var(--c-text); font-weight: 700;
    font-size: 1.05rem; letter-spacing: -0.01em;
}
.footer-logo-mark {
    display: block; width: 22px; height: 22px;
    border-radius: 5px;
}
.footer-tagline {
    color: var(--c-text-2);
    font-size: 0.85rem; line-height: 1.7;
    margin: 0;
}
.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 32px 24px;
    margin-bottom: 32px;
}
.footer-nav-section h4 {
    color: var(--c-text);
    font-size: 0.85rem; font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.footer-nav-section ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.footer-nav-section ul li a {
    color: var(--c-text-2);
    font-size: 0.83rem;
    text-decoration: none;
    transition: color var(--t-fast);
}
.footer-nav-section ul li a:hover { color: var(--c-accent); }

.footer-seo-keywords-wrapper {
    margin-bottom: 28px;
    border-top: 1px solid var(--c-border);
    padding-top: 20px;
}
.footer-seo-keywords-wrapper summary {
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--c-text-3);
    list-style: none;
    display: inline-flex; align-items: center; gap: 6px;
    user-select: none;
    padding: 4px 0;
}
.footer-seo-keywords-wrapper summary::-webkit-details-marker { display: none; }
.footer-seo-keywords-wrapper summary svg { transition: transform var(--t-fast); }
.footer-seo-keywords-wrapper[open] summary svg { transform: rotate(180deg); }
.footer-seo-keywords {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 12px;
}
.footer-seo-keywords span {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 0.72rem;
    color: var(--c-text-3);
    white-space: nowrap;
}

.footer-disclosure {
    border-top: 1px solid var(--c-border);
    padding: 16px 0;
    text-align: center;
    font-size: 0.72rem;
    color: var(--c-text-3);
    line-height: 1.6;
}
.footer-disclosure a { color: var(--c-text-2); text-decoration: underline; text-decoration-color: var(--c-border-2); }
.footer-disclosure a:hover { color: var(--c-accent); text-decoration-color: var(--c-accent); }

.footer-bottom {
    border-top: 1px solid var(--c-border);
    padding-top: 20px;
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-copyright { font-size: 0.75rem; color: var(--c-text-3); }
.footer-links { display: flex; gap: 18px; }
.footer-links a {
    color: var(--c-text-2); text-decoration: none;
    font-size: 0.78rem;
    transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--c-accent); }

/* ========== RESPONSIVE ========== */
@media (max-width: 720px) {
    .main { padding: 32px 16px 56px; }
    .container { padding: 0 16px; }
    .search-section { margin-bottom: 40px; }
    .search-title { font-size: 1.4rem; }
    .search-input { padding: 13px 40px 13px 42px; font-size: 0.95rem; }
    .search-icon { left: 14px; }
    .search-kbd { display: none; }

    /* Section title condensed */
    .section-title { font-size: 1.05rem; margin-top: 56px; }

    .offer-row, .offer-card {
        grid-template-columns: 32px 1fr auto;
        column-gap: 12px; row-gap: 4px;
        padding: 14px 8px;
    }
    .provider-icon { width: 32px; height: 32px; }
    .provider-icon img { width: 18px; height: 18px; }
    .provider-cell {
        grid-column: 2 / 4; grid-row: 1;
        flex-direction: row; align-items: baseline; gap: 6px;
    }
    .provider-cell .row-cat-badge::before {
        content: "·"; margin-right: 4px; color: var(--c-text-3);
    }
    .name-cell { grid-column: 2 / 4; grid-row: 2; margin-top: 1px; }
    .point-cell { grid-column: 2 / 3; grid-row: 3; text-align: left; margin-top: 2px; }
    .actions-cell { grid-column: 3 / 4; grid-row: 3; }
    .row-chevron { width: 24px; height: 24px; }

    /* Filter row horizontal scroll on small screens */
    .filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter-btn { flex-shrink: 0; padding: 6px 12px; }

    .stats-banner-hero { padding: 40px 0 32px; margin-top: 64px; }
    .stats-banner-inner { gap: 40px; flex-wrap: wrap; }
    .stats-banner-num { font-size: 2rem; }
    .stats-banner-suffix { font-size: 1rem; }

    .detail-toolbar { margin-bottom: 16px; }
    .detail-title { font-size: 1.2rem; }
    .detail-point { font-size: 1.8rem; }
    .detail-cta { width: 100%; justify-content: center; margin-left: 0; margin-top: 8px; }
    .detail-point-row { padding: 20px 0; margin: 20px 0; }

    /* Header nav: tighter spacing to fit 3 items + logo + theme toggle on iPhone SE */
    .header-nav { gap: 0; margin-right: 4px; }
    .header-nav a { padding: 6px 7px; font-size: 0.78rem; }
    .logo { font-size: 0.88rem; gap: 7px; }
    .logo-mark { width: 20px; height: 20px; }

    .section-action { margin-left: auto; font-size: 0.75rem; padding: 4px 8px; }

    /* Rankings mobile */
    .rankings-title { font-size: 1.3rem; }
    .ranking-filter { display: flex; width: 100%; }
    .rfbtn { flex: 1; padding: 7px 4px; font-size: 0.78rem; }

    /* Invite mobile */
    .invite-grid { grid-template-columns: 1fr; gap: 12px; }

    /* Footer: 2 col on mobile */
    .site-footer { padding: 36px 0 20px; margin-top: 64px; }
    .footer-nav { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; margin-bottom: 24px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
    .footer-links { gap: 14px; flex-wrap: wrap; }

    /* Static page on mobile */
    .static-page { padding: 8px 0 32px; font-size: 0.92rem; }
    .static-page h1 { font-size: 1.4rem; margin-bottom: 18px; }
    .static-page h2 { font-size: 1rem; margin-top: 28px; }
    .static-page .static-lead { padding: 14px 16px; font-size: 0.93rem; }
    .static-page .static-table th { width: 38%; padding: 8px 10px; font-size: 0.85rem; }
    .static-page .static-table td { padding: 8px 10px; font-size: 0.85rem; }
}

/* iPhone SE / 小幅端末用 */
@media (max-width: 380px) {
    .container { padding: 0 14px; }
    .header-inner { height: 52px; }
    .header-nav a { padding: 6px 5px; font-size: 0.74rem; }
    .logo { font-size: 0.82rem; }
    .logo-mark { width: 18px; height: 18px; }
    .search-title { font-size: 1.25rem; }
    .search-subtitle { font-size: 0.82rem; }
    .section-title { font-size: 0.98rem; }
}

/* タッチ操作: 主要ボタンの tap target 確保 (Apple HIG 推奨 44px に近づける) */
@media (hover: none) and (pointer: coarse) {
    .filter-btn, .rfbtn, .discover-tab,
    .psite-code, .invite-copy,
    .history-clear, .discover-toggle, .search-clear {
        min-height: 36px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    /* hover 効果をタッチデバイスで無効化（残像感を消す）*/
    .psite-card:hover { transform: none; box-shadow: none; }
    .offer-row:hover { transform: none; }
}
