*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--bg-warm);
    background-image:
        radial-gradient(at 0% 0%, rgba(163, 184, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(91, 140, 106, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding-top: 80px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* Screen-reader only utility */
.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;
}

/* ============================================================
   Web Interface Guidelines — グローバル改善
   ============================================================ */

/* 1. Focus-visible: すべてのインタラクティブ要素にフォーカスリング */
:focus-visible {
    outline: 2px solid var(--primary-dark, #5B8C6A);
    outline-offset: 2px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* 2. Touch: ダブルタップズーム遅延を排除 */
html {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(91, 140, 106, 0.1);
}

/* 3. Tabular-nums: 数値表示を等幅に */
.card-value,
.hsc-val,
.stat-value,
.entry-amount-input,
[style*="font-weight:900"][style*="font-size:1.2rem"],
[style*="font-weight:900"][style*="font-size:0.85rem"] {
    font-variant-numeric: tabular-nums;
}

/* 4. Text-wrap: 見出しのwidow防止 */
h1, h2, h3, .kz-sec-heading, .kz-hero-catch, .kz-final-catch, .kz-how-msg {
    text-wrap: balance;
}
p, .subtitle {
    text-wrap: pretty;
}

/* 5. prefers-reduced-motion: アニメーション全体の制御 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .calendar-day:hover,
    .stat-card:hover,
    .btn-primary:hover,
    .btn-accent:hover {
        transform: none;
    }
}

/* 6. glass-card 内のクリッカブルカード: キーボードフォーカス対応 */
.glass-card[onclick],
.glass-card[role="button"],
.glass-card[tabindex] {
    cursor: pointer;
}
.glass-card[onclick]:focus-visible,
.glass-card[role="button"]:focus-visible,
.glass-card[tabindex]:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

/* 7. ボタンhover状態の強化（コントラスト増加） */
.btn:hover {
    filter: brightness(0.95);
}
.btn:active {
    filter: brightness(0.9);
}

/* 8. Bottom nav focus & hover */
.bottom-nav-item:hover {
    color: var(--primary-dark);
    background: var(--primary-light);
}
.bottom-nav-item:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: -2px;
    border-radius: 8px;
}

/* 9. モーダル内スクロール制御 */
.modal {
    overscroll-behavior: contain;
}

/* 10. 数値列の等幅フォント */
.kz-gift-banner-amount,
.kz-marker-label strong {
    font-variant-numeric: tabular-nums;
}
