/* ===================================================
   九五館 MEMBER — Urban Precision
   Skate Edge × App Polish
   =================================================== */

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- CUSTOM PROPERTIES ---- */
:root {
    --m-font: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
    --m-font-display: 'Bebas Neue', sans-serif;
    --m-primary: #ffff00;
    --m-primary-dim: rgba(255,255,0,0.15);
    --m-black: #000;
    --m-dark: #0a0a0a;
    --m-bg: #f6f5f2;
    --m-bg-card: #fff;
    --m-bg-inset: #f0efec;
    --m-border: #e4e2dd;
    --m-text: #1a1a1a;
    --m-text-light: #7a7a7a;
    --m-text-lighter: #aaa;
    --m-nav-h: 60px;
    --m-header-h: 52px;
    --m-danger: #dc2626;
    --m-success: #16a34a;
    --m-info: #2563eb;
    --m-warning: #f59e0b;
    --m-shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.02);
    --m-shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
    --m-shadow-up: 0 -4px 24px rgba(0,0,0,0.15);
    /* ランク用（デフォルト=ビジター） */
    --m-rank-bg: #f0efec;
    --m-rank-text: #1a1a1a;
    --m-rank-sub: #999;
    --m-rank-accent: rgba(0,0,0,0.06);
    --m-rank-qr-dark: #000;
}

body.rank-regular {
    --m-rank-bg: #ffff00;
    --m-rank-text: #000;
    --m-rank-sub: #555;
    --m-rank-accent: rgba(0,0,0,0.08);
    --m-rank-qr-dark: #000;
}
body.rank-team {
    --m-rank-bg: #0a0a0a;
    --m-rank-text: #fff;
    --m-rank-sub: #aaa;
    --m-rank-accent: rgba(255,255,0,0.2);
    --m-rank-qr-dark: #fff;
}
body.rank-royal {
    --m-rank-bg: #0a0a0a;
    --m-rank-text: #fff;
    --m-rank-sub: #ccc;
    --m-rank-accent: rgba(255,215,0,0.25);
    --m-rank-qr-dark: #fff;
}

/* ---- BASE ---- */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    font-family: var(--m-font);
    color: var(--m-text);
    background: var(--m-bg);
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--m-nav-h) + 20px);
    -webkit-font-smoothing: antialiased;
}
/* ---- DARK PAGE VARIANT ---- */
body.m-page-dark {
    background: var(--m-dark);
    color: #fff;
}
body.m-page-dark .m-section-title {
    color: #fff;
}
body.m-page-dark .m-section-title::before {
    background: var(--m-primary);
}
body.m-page-dark .m-facility-info {
    margin-top: 24px;
}
body.m-page-dark .m-card {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    box-shadow: none;
}
body.m-page-dark .m-card-title {
    color: var(--m-primary);
    border-bottom-color: rgba(255,255,255,0.1);
}
body.m-page-dark .m-list-item {
    border-bottom-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
}
body.m-page-dark .m-list-value {
    color: #fff;
}
body.m-page-dark .m-form-label {
    color: rgba(255,255,255,0.5);
}
body.m-page-dark .m-form-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
}
body.m-page-dark .m-form-input:focus {
    border-color: var(--m-primary);
    background: rgba(255,255,0,0.04);
    box-shadow: 0 0 0 3px rgba(255,255,0,0.08);
}
body.m-page-dark .m-form-input::placeholder {
    color: rgba(255,255,255,0.25);
}
body.m-page-dark .m-mypage-link {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: none;
    color: #fff;
}
body.m-page-dark .m-mypage-link .icon {
    color: #fff;
}
body.m-page-dark .m-msg-success {
    background: rgba(22,163,74,0.15);
    color: #4ade80;
    border-color: rgba(22,163,74,0.3);
}
body.m-page-dark .m-msg-error {
    background: rgba(220,38,38,0.15);
    color: #f87171;
    border-color: rgba(220,38,38,0.3);
}
body.m-page-dark .m-btn-outline {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}
body.m-page-dark .m-btn-outline:active {
    background: rgba(255,255,255,0.05);
}
body.m-page-dark .m-text-sub {
    color: rgba(255,255,255,0.4);
}
body.m-page-dark .m-info-box {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}
body.m-page-dark .m-badge-neutral {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}
body.m-page-dark .m-empty {
    color: rgba(255,255,255,0.35);
}
body.m-page-dark .m-card-past {
    opacity: 0.5;
}
body.m-page-dark details > summary.m-section-title {
    color: #fff;
}
/* ダーク版: 履歴ページ (vh-*) */
body.m-page-dark .vh-month-title {
    color: #fff;
}
body.m-page-dark .vh-month-stat {
    color: rgba(255,255,255,0.45);
}
body.m-page-dark .vh-month-dot {
    background: rgba(255,255,255,0.25);
}
body.m-page-dark .vh-visit-row {
    border-bottom-color: rgba(255,255,255,0.08);
}
body.m-page-dark .vh-date-num {
    color: #fff;
}
body.m-page-dark .vh-date-dow {
    color: rgba(255,255,255,0.4);
}
body.m-page-dark .vh-visit-time {
    color: rgba(255,255,255,0.7);
}
body.m-page-dark .vh-visit-duration {
    color: rgba(255,255,255,0.4);
}
body.m-page-dark .vh-memo-btn {
    background: transparent;
}
body.m-page-dark .vh-memo-btn:active {
    background: rgba(255,255,255,0.05);
}
body.m-page-dark .vh-note-preview {
    color: rgba(255,255,255,0.4);
}
body.m-page-dark .vh-note-panel {
    border-top-color: rgba(255,255,255,0.1);
}
body.m-page-dark .vh-note-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
}
body.m-page-dark .vh-note-input::placeholder {
    color: rgba(255,255,255,0.25);
}
body.m-page-dark .vh-note-input:focus {
    border-color: var(--m-primary);
    background: rgba(255,255,0,0.04);
}

a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---- NOISE TEXTURE (共通) ---- */
.m-grain::after,
.m-login-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ---- HEADER ---- */
.m-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--m-header-h);
    background: var(--m-dark);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    border-bottom: 2px solid var(--m-primary);
}
/* スタンドアロンPWA: ステータスバー領域を吸収 */
@supports (padding-top: env(safe-area-inset-top)) {
    .m-header {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--m-header-h) + env(safe-area-inset-top));
    }
}
@media (display-mode: standalone) {
    .m-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--m-primary);
        z-index: 1;
    }
}
.m-header-logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}
.m-header-name {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.m-header-right {
    margin-left: auto;
    font-family: var(--m-font-display);
    font-size: 14px;
    color: var(--m-primary);
    white-space: nowrap;
    letter-spacing: 1.5px;
}

/* ヘッダー戻るリンク */
.m-back-link {
    color: var(--m-primary);
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.m-back-link:active { opacity: 0.5; }

/* ---- BOTTOM NAVIGATION ---- */
.m-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--m-nav-h);
    background: rgba(10,10,10,0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 2px solid rgba(255,255,0,0.3);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: var(--m-shadow-up);
}
.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 10px;
    gap: 3px;
    padding: 6px 8px;
    position: relative;
    transition: color 0.25s;
    -webkit-tap-highlight-color: transparent;
}
.m-nav-item.active { color: var(--m-primary); }
.m-nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--m-primary);
}
.m-nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.m-nav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.m-nav-label {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ---- MEMBER CARD BUTTON (ナビ中央フローティング) ---- */
.m-nav-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
    padding: 0 4px 6px;
    z-index: 2;
}
.m-nav-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--m-primary);
    border-radius: 50%;
    margin-top: -22px;
    box-shadow: 0 2px 12px rgba(255,255,0,0.3), 0 0 0 3px var(--m-dark);
    color: var(--m-dark);
    transition: transform 0.15s, box-shadow 0.15s;
}
.m-nav-card:active .m-nav-card-icon {
    transform: scale(0.92);
    box-shadow: 0 1px 6px rgba(255,255,0,0.2), 0 0 0 3px var(--m-dark);
}
.m-nav-card-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 2px;
    color: var(--m-primary);
}
.m-nav-card--current .m-nav-card-icon {
    background: #fff;
    box-shadow: 0 2px 12px rgba(255,255,255,0.2), 0 0 0 3px var(--m-dark);
}
.m-nav-card--current .m-nav-card-label {
    color: #fff;
}

/* ---- CONTENT LAYOUT ---- */
.m-content {
    padding: 20px;
    max-width: 480px;
    margin: 0 auto;
    min-height: calc(100dvh - var(--m-header-h) - var(--m-nav-h));
}

/* ---- MEMBER CARD (HERO) ---- */
.m-member-card {
    position: relative;
    background: var(--m-rank-bg);
    color: var(--m-rank-text);
    padding: 28px 24px;
    text-align: center;
    margin: -20px -20px 20px;
    overflow: hidden;
}
/* メンバーカード背景（オールブラック） */
.m-member-card .member-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
    position: relative;
    z-index: 2;
}
.m-member-card .member-num {
    font-family: var(--m-font-display);
    font-size: 32px;
    letter-spacing: 3px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}
.m-member-card .qr-wrap {
    margin: 20px auto 16px;
    width: fit-content;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
}
body.rank-visitor .m-member-card .qr-wrap {
    background: #fff;
}
body.rank-regular .m-member-card .qr-wrap {
    background: rgba(255,255,255,0.5);
}
.m-member-card .member-type-label {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 16px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}
.m-member-card .member-expiry {
    font-size: 12px;
    color: var(--m-rank-sub);
    margin-top: 4px;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
}
.m-member-card .member-type-badge {
    display: inline-block;
    padding: 4px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.08);
}
body.rank-team .member-type-badge {
    background: var(--m-primary);
    color: #000;
}
.m-member-card .m-rank-note {
    font-size: 12px;
    margin-top: 6px;
    color: var(--m-rank-sub);
    position: relative;
    z-index: 2;
}

/* ---- CARDS ---- */
.m-card {
    background: var(--m-bg-card);
    border: 1px solid var(--m-border);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--m-shadow-sm);
    position: relative;
    transition: box-shadow 0.25s, border-color 0.25s;
}
.m-card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--m-border);
    letter-spacing: 0.3px;
}

/* カードリンク */
.m-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.m-card-link:active {
    transform: scale(0.985);
    box-shadow: var(--m-shadow-md);
}
.m-card-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--m-primary);
    transition: width 0.25s;
}
.m-card-link:active::before { width: 3px; }

/* カード内レイアウト */
.m-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.m-card-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.4;
}
.m-card-date {
    font-size: 13px;
    color: var(--m-text-light);
}
.m-card-type {
    font-size: 12px;
    color: var(--m-text-light);
    margin-top: 2px;
}
.m-card-note-preview {
    margin-top: 8px;
    font-size: 13px;
    color: var(--m-text);
    line-height: 1.5;
    white-space: pre-wrap;
}
.m-card-past { opacity: 0.6; }

/* ---- CUP CARDS (大会カード) ---- */
.m-cup-card {
    display: block;
    background: var(--m-dark);
    color: #fff;
    padding: 20px;
    margin-bottom: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--m-shadow-md);
    transition: transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.m-cup-card:active {
    transform: scale(0.98);
}
.m-cup-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.m-cup-card-date {
    font-family: var(--m-font-display);
    font-size: 20px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}
.m-cup-card-class {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    color: #fff;
}
.m-cup-card-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}
.m-cup-card-result {
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.m-cup-card-rank {
    font-family: var(--m-font-display);
    font-size: 40px;
    line-height: 1;
    letter-spacing: 1px;
}
.m-cup-card-rank-label {
    font-size: 14px;
    font-weight: 700;
    margin-right: 6px;
}
.m-cup-card-rank-total {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* 未参加大会カード */
.m-cup-card-spectator {
    background: #1a1a1a;
    opacity: 0.7;
}
.m-cup-card-spectator:active {
    opacity: 1;
}
.m-cup-card-spectator-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.5px;
}

/* ---- LISTS ---- */
.m-list { list-style: none; }
.m-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--m-border);
    gap: 8px;
}
.m-list-item:last-child { border-bottom: none; }
.m-list-date {
    font-size: 14px;
    color: var(--m-text);
    min-width: 48px;
    font-weight: 500;
    line-height: 1.4;
}
.m-list-main {
    flex: 1;
    padding: 0 8px;
    min-width: 0;
}
.m-list-value {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ---- VISIT HISTORY (vh-) ---- */

/* 総合サマリー */
.vh-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--m-dark);
    color: #fff;
    padding: 20px;
    margin: -1px -20px 0;
    border-bottom: 2px solid var(--m-primary);
}
.vh-total-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.vh-total-num {
    font-family: var(--m-font-display);
    font-size: 36px;
    letter-spacing: 1px;
    line-height: 1;
    color: var(--m-primary);
}
.vh-total-unit {
    font-size: 22px;
    color: rgba(255,255,255,0.5);
}
.vh-total-label {
    font-family: var(--m-font-display);
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4);
}
.vh-total-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.15);
}

/* 月ヘッダー */
.vh-month {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 24px 0 8px;
    border-bottom: 2px solid var(--m-black);
}
.vh-month-title {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
}
.vh-month-stats {
    display: flex;
    align-items: center;
    gap: 6px;
}
.vh-month-stat {
    font-size: 11px;
    color: var(--m-text-light);
    font-variant-numeric: tabular-nums;
}
.vh-month-dot {
    width: 3px;
    height: 3px;
    background: var(--m-text-lighter);
    border-radius: 50%;
}

/* 共通日付カラム */
.vh-date-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
    flex-shrink: 0;
}
.vh-date-num {
    font-family: var(--m-font-display);
    font-size: 18px;
    letter-spacing: 0.5px;
    line-height: 1.1;
}
.vh-date-dow {
    font-size: 10px;
    color: var(--m-text-light);
    font-weight: 400;
    margin-top: 1px;
}

/* 来店行 */
.vh-visit-row {
    border-bottom: 1px solid var(--m-border);
}
.vh-visit-main {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
}
.vh-visit-info {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.vh-visit-time {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--m-text);
}
.vh-visit-duration {
    font-size: 12px;
    color: var(--m-text-light);
    font-variant-numeric: tabular-nums;
}

/* メモボタン（アイコン） */
.vh-memo-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--m-border);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s, background 0.15s;
    color: var(--m-text-light);
}
.vh-memo-btn:active {
    background: var(--m-bg-inset);
}

/* メモプレビュー */
.vh-note-preview {
    font-size: 12px;
    color: var(--m-text-light);
    padding: 0 0 10px 54px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* メモ編集パネル */
.vh-note-panel {
    padding: 8px 0 14px;
    border-top: 1px dashed var(--m-border);
}
.vh-note-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    font-family: var(--m-font);
    border: 2px solid var(--m-black);
    background: #fff;
    color: var(--m-text);
    resize: vertical;
    min-height: 60px;
    border-radius: 0;
    -webkit-appearance: none;
    transition: border-color 0.2s;
}
.vh-note-input::placeholder { color: var(--m-text-lighter); }
.vh-note-input:focus {
    outline: none;
    border-color: var(--m-primary);
    background: rgba(255,255,0,0.03);
}
.vh-note-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.vh-note-save {
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--m-font);
    background: var(--m-dark);
    color: #fff;
    border: 1px solid #444;
    cursor: pointer;
    transition: opacity 0.2s;
}
.vh-note-save:active { opacity: 0.7; }
.vh-note-save:disabled { opacity: 0.4; }
.vh-note-status { font-size: 12px; }
.vh-note-ok { color: var(--m-success); }
.vh-note-err { color: var(--m-danger); }

/* イベント/大会参加行 */
.vh-event-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--m-dark);
    color: #fff;
    margin: 2px -20px;
}
.vh-event-row .vh-date-col {
    min-width: 44px;
}
.vh-event-row .vh-date-num {
    color: rgba(255,255,255,0.7);
}
.vh-event-row .vh-date-dow {
    color: rgba(255,255,255,0.35);
}
.vh-event-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.vh-event-icon {
    flex-shrink: 0;
    display: flex;
    color: var(--m-primary);
}
.vh-event-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vh-event-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    background: rgba(255,255,0,0.15);
    color: var(--m-primary);
    text-transform: uppercase;
}

/* ---- SECTION TITLES ---- */
.m-section-title {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--m-black);
    margin: 28px 0 12px;
    padding-left: 14px;
    position: relative;
    line-height: 1;
}
/* イエローバー — グラインドレール */
.m-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) skewX(-8deg);
    width: 4px;
    height: 16px;
    background: var(--m-primary);
}

/* ---- BADGES ---- */
.m-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.m-badge-active { background: var(--m-success); color: #fff; }
.m-badge-expired { background: var(--m-danger); color: #fff; }
.m-badge-pending { background: var(--m-warning); color: #fff; }
.m-badge-neutral { background: var(--m-bg-inset); color: var(--m-text-light); }

/* ---- FORMS ---- */
.m-form-group { margin-bottom: 20px; }
.m-form-row {
    display: flex;
    gap: 12px;
}
.m-form-half {
    flex: 1;
    min-width: 0;
}
.m-card-divider {
    border-top: 1px solid var(--m-border);
    margin: 24px 0 20px;
}
.m-form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    color: var(--m-text-light);
}
.m-form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    font-family: var(--m-font);
    border: 2px solid var(--m-border);
    background: var(--m-bg-card);
    color: var(--m-text);
    -webkit-appearance: none;
    border-radius: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.m-form-hint {
    font-size: 11px;
    color: var(--m-text-light);
    margin-top: 6px;
}
.m-form-static {
    padding: 12px 0;
    font-size: 15px;
    color: var(--m-text);
}
.m-form-input:focus {
    outline: none;
    border-color: var(--m-primary);
    box-shadow: 0 0 0 3px var(--m-primary-dim);
}
select.m-form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7a7a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ---- BUTTONS ---- */
.m-btn {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--m-font);
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: transform 0.15s, opacity 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.m-btn:active { transform: scale(0.97); }
.m-btn-primary {
    background: var(--m-primary);
    color: #000;
}
.m-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s;
}
.m-btn-primary:active::after { left: 100%; }
.m-btn-dark { background: #000; color: #fff; }
.m-btn-outline {
    background: transparent;
    border: 2px solid var(--m-border);
    color: var(--m-text);
}
.m-btn-outline:active { background: var(--m-bg-inset); }
.m-btn-danger { background: var(--m-danger); color: #fff; }

/* ---- MESSAGES ---- */
.m-msg {
    padding: 14px 16px;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.m-msg-error {
    background: #fef2f2;
    color: var(--m-danger);
    border-left: 3px solid var(--m-danger);
}
.m-msg-success {
    background: #f0fdf4;
    color: var(--m-success);
    border-left: 3px solid var(--m-success);
}
.m-msg-info {
    background: #eff6ff;
    color: var(--m-info);
    border-left: 3px solid var(--m-info);
}

/* ---- LOGIN ---- */
.m-login-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px 32px;
    position: relative;
    overflow: hidden;
}
/* コンクリートグリッド背景 */
.m-login-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: 0;
}
/* イエローのアクセントライン — 画面左端を縦に走る */
.m-login-accent-line {
    position: absolute;
    top: 0;
    left: 24px;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--m-primary) 20%, var(--m-primary) 80%, transparent 100%);
    opacity: 0.3;
    z-index: 1;
    animation: accentLineReveal 1s ease-out 0.3s both;
}
@keyframes accentLineReveal {
    from { opacity: 0; transform: scaleY(0); transform-origin: top; }
    to { opacity: 0.3; transform: scaleY(1); transform-origin: top; }
}
/* ブランドエリア */
.m-login-brand {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 36px;
}
.m-login-logo {
    display: block;
    height: 110px;
    width: auto;
    margin: 0 auto 10px;
    position: relative;
    filter: drop-shadow(0 0 40px rgba(255,255,0,0.12));
    animation: loginLogoIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes loginLogoIn {
    from { opacity: 0; transform: scale(0.85) translateY(-8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.m-login-tagline {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 8px;
    text-indent: 8px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    position: relative;
    animation: fadeSlideDown 0.5s ease-out 0.2s both;
}
/* フォームボックス */
.m-login-box {
    width: 100%;
    max-width: 340px;
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
.m-login-box .m-form-group {
    margin-bottom: 18px;
    text-align: left;
}
.m-login-box .m-form-input {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #fff;
    padding: 14px 16px;
    font-size: 15px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.m-login-box .m-form-input:focus {
    border-color: var(--m-primary);
    background: rgba(255,255,0,0.03);
    box-shadow: 0 0 0 3px rgba(255,255,0,0.06), 0 0 20px rgba(255,255,0,0.04);
}
.m-login-box .m-form-input::placeholder {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}
.m-login-box .m-form-label {
    color: var(--m-primary);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-align: left;
}
.m-login-box .m-btn-primary {
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    border-radius: 6px;
}
/* ログインページ見出し・説明文 */
.m-login-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}
.m-login-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
}
/* リンク行 — 横並びセパレータ付き */
.m-login-links {
    margin-top: 22px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.m-login-links a {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}
.m-login-links a:active { color: var(--m-primary); }
.m-login-links-sep {
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    user-select: none;
}
/* 会員登録案内 — ボトムに統合 */
.m-login-membership-note {
    margin-top: 32px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    text-align: center;
    width: 100%;
    max-width: 340px;
    position: relative;
    z-index: 2;
    animation: fadeSlideUp 0.5s ease-out 0.5s both;
}
.m-login-membership-icon {
    display: inline-block;
    margin-right: 4px;
    font-size: 13px;
    vertical-align: -1px;
}
.m-login-membership-note a {
    color: var(--m-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,0,0.4);
    transition: border-color 0.2s;
}
.m-login-membership-note a:active {
    border-color: var(--m-primary);
}
/* フッターコピーライト */
.m-login-footer {
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
    font-family: var(--m-font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.25);
    z-index: 2;
}
/* ダークページ内のメッセージボックス調整 */
.m-login-box .m-msg {
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 18px;
    text-align: center;
    border-left: none;
    border-top: 2px solid;
}

/* ---- MYPAGE GRID ---- */
.m-mypage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}
.m-mypage-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 8px;
    background: var(--m-bg-card);
    text-decoration: none;
    color: var(--m-text);
    border: 1px solid var(--m-border);
    box-shadow: var(--m-shadow-sm);
    transition: transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    font-family: var(--m-font);
}
.m-mypage-link:active {
    transform: scale(0.96);
    box-shadow: var(--m-shadow-md);
}
.m-mypage-link .icon {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1;
}
.m-mypage-link .label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ログアウトセクション（ページ下部） */
.m-logout-section {
    text-align: center;
    padding: 32px 0 16px;
}
.m-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: var(--m-font);
    color: var(--m-text-lighter);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.m-logout-link:active { color: var(--m-danger); }

/* ログアウトボタン（旧グリッド内・後方互換） */
.m-logout-form { display: contents; }
.m-logout-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 8px;
    background: var(--m-bg-card);
    border: 1px solid var(--m-border);
    box-shadow: var(--m-shadow-sm);
    cursor: pointer;
    font-family: var(--m-font);
    color: var(--m-text-light);
    transition: transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.m-logout-btn:active { transform: scale(0.96); }
.m-logout-btn .icon { font-size: 28px; margin-bottom: 8px; line-height: 1; }
.m-logout-btn .label { font-size: 13px; font-weight: 600; }

/* ---- FEE GRID (月額) ---- */
.m-fee-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.m-fee-cell {
    text-align: center;
    padding: 14px 4px;
    background: var(--m-bg-inset);
    color: var(--m-text-light);
    transition: background 0.2s;
}
.m-fee-cell-paid {
    background: var(--m-success);
    color: #fff;
}
.m-fee-month {
    font-size: 12px;
    font-weight: 700;
}
.m-fee-status {
    font-size: 18px;
    margin-top: 4px;
}
.m-fee-amount {
    font-size: 10px;
    margin-top: 2px;
}

/* ---- INFO / NOTICE BOX ---- */
.m-info-box {
    padding: 14px;
    background: var(--m-bg-inset);
    font-size: 12px;
    color: var(--m-text-light);
    line-height: 1.7;
    margin-top: 12px;
}
.m-notice-box {
    padding: 16px;
    background: var(--m-bg-inset);
    font-size: 12px;
    color: var(--m-text-light);
    text-align: center;
    line-height: 1.6;
    margin-top: 24px;
}

/* ---- CUP DETAIL (大会詳細) ---- */
.m-cup-hero {
    background: var(--m-dark);
    color: #fff;
    padding: 28px 20px;
    margin: -20px -20px 24px;
    position: relative;
    overflow: hidden;
}
.m-cup-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--m-primary);
    opacity: 0.4;
}
.m-cup-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.m-cup-hero-date {
    font-family: var(--m-font-display);
    font-size: 22px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.45);
}
.m-cup-hero-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

/* 総合順位（ヒーロー内） */
.m-cup-hero-result {
    margin-top: 28px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.m-cup-hero-member {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.m-cup-hero-thanks {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.m-cup-hero-rank {
    display: flex;
    align-items: baseline;
    justify-content: center;
}
.m-cup-hero-rank-num {
    font-family: var(--m-font-display);
    font-size: 80px;
    line-height: 1;
    letter-spacing: 2px;
}
.m-cup-hero-rank-suffix {
    font-size: 26px;
    font-weight: 700;
    margin-left: 2px;
}
.m-cup-hero-rank-top3 .m-cup-hero-rank-num,
.m-cup-hero-rank-top3 .m-cup-hero-rank-suffix {
    color: var(--m-primary);
}
.m-cup-hero-congrats {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-top: 6px;
    letter-spacing: 1px;
}
.m-cup-hero-rank-label {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* 予選/決勝タイトル */
.m-cup-hero ~ .m-section-title {
    font-size: 20px;
    font-weight: 900;
}

/* ラウンドサマリー（控えめ） */
.m-cup-round-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: var(--m-bg-inset);
    font-size: 13px;
    color: var(--m-text-light);
}

/* ラン一覧 */
.m-cup-runs {
    margin-bottom: 24px;
}
.m-cup-run {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--m-border);
}
.m-cup-run:last-child {
    border-bottom: none;
}
.m-cup-run-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.m-cup-run-style {
    font-size: 14px;
    font-weight: 600;
}
.m-cup-run-try {
    font-family: var(--m-font-display);
    font-size: 14px;
    color: var(--m-text-light);
    letter-spacing: 1px;
}
.m-cup-run-data {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.m-cup-run-penalty {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    padding: 2px 8px;
    background: var(--m-danger);
    letter-spacing: 0.5px;
}
.m-cup-run-time {
    font-family: var(--m-font-display);
    font-size: 30px;
    letter-spacing: 0.5px;
}
.m-cup-run-sec {
    font-size: 14px;
    color: var(--m-text-light);
}
.m-cup-run-notime {
    font-size: 28px;
    color: var(--m-text-lighter);
}

/* 大会結果ラッパー */
.m-cup-results-wrap {
    margin-top: 40px;
    border: 2px solid var(--m-dark);
    position: relative;
}

/* 大会結果タイトルバナー */
.m-cup-results-divider {
    padding: 18px 20px;
    background: var(--m-dark);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 3px;
    text-align: center;
}

/* 大会結果ボディ */
.m-cup-results-body {
    padding: 8px 20px 20px;
    background: var(--m-bg);
}

/* クラス間の区切り線 */
.m-cup-lb-sep {
    height: 1px;
    background: var(--m-border);
    margin: 20px 0;
}

/* リーダーボードクラスタイトル */
.m-cup-lb-title {
    margin: 24px 0 12px;
    text-align: center;
}
.m-cup-lb-title .m-cup-card-class {
    font-size: 15px;
    padding: 8px 24px;
    letter-spacing: 1.5px;
}

/* リーダーボード（クラス別上位） */
.m-cup-leaderboard {
    margin-bottom: 4px;
}
.m-cup-lb-header {
    display: grid;
    grid-template-columns: 28px 1fr 56px 56px;
    gap: 8px;
    padding: 8px 0;
    font-size: 10px;
    color: var(--m-text-lighter);
    font-weight: 700;
    text-align: right;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--m-dark);
}
.m-cup-lb-row {
    display: grid;
    grid-template-columns: 28px 1fr 56px 56px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--m-border);
    gap: 8px;
}
.m-cup-lb-row:last-child {
    border-bottom: none;
}
.m-cup-lb-me {
    background: var(--m-primary-dim);
    margin: 0 -20px;
    padding: 12px 20px;
}
.m-cup-lb-rank {
    font-family: var(--m-font-display);
    font-size: 22px;
    text-align: center;
}
.m-cup-lb-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.m-cup-lb-time {
    font-family: var(--m-font-display);
    font-size: 16px;
    letter-spacing: 0.5px;
    text-align: right;
    color: var(--m-text);
}

/* ダーク版: 大会詳細 */
body.m-page-dark .m-cup-round-summary {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
}
body.m-page-dark .m-cup-run {
    border-bottom-color: rgba(255,255,255,0.08);
}
body.m-page-dark .m-cup-run-style {
    color: #fff;
}
body.m-page-dark .m-cup-run-time {
    color: #fff;
}
body.m-page-dark .m-cup-run-try {
    color: rgba(255,255,255,0.45);
}
body.m-page-dark .m-cup-run-sec {
    color: rgba(255,255,255,0.45);
}
body.m-page-dark .m-cup-run-notime {
    color: rgba(255,255,255,0.25);
}
body.m-page-dark .m-cup-results-wrap {
    border-color: rgba(255,255,255,0.1);
}
body.m-page-dark .m-cup-results-body {
    color: var(--m-text);
}

/* ---- HOME PAGE (home.php) ---- */
.m-home-body {
    background: #050505;
    padding-bottom: calc(var(--m-nav-h) + 20px);
}
.m-home-body .m-header {
    display: none;
}
.m-home-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100dvh - var(--m-nav-h));
    padding: 48px 24px 40px;
    padding-top: calc(48px + env(safe-area-inset-top, 0px));
    overflow: hidden;
}
/* 背景: 放射グラデーション — パルス光源 */
.m-home-hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 160%;
    height: 55%;
    background: radial-gradient(ellipse at center, rgba(255,255,0,0.06) 0%, rgba(255,255,0,0.02) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: mhGlow 4s ease-in-out infinite alternate;
}
@keyframes mhGlow {
    from { opacity: 0.6; transform: translateX(-50%) scale(1); }
    to { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
.m-home-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}
/* ロゴ */
.m-home-logo-wrap {
    position: relative;
    z-index: 2;
    animation: mhLogoIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes mhLogoIn {
    from { opacity: 0; transform: scale(0.92); filter: blur(4px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
}
.m-home-logo {
    height: 110px;
    width: auto;
    filter: drop-shadow(0 0 60px rgba(255,255,0,0.08));
    animation: mhLogoPulse 3s ease-in-out infinite alternate;
}
@keyframes mhLogoPulse {
    from { filter: drop-shadow(0 0 40px rgba(255,255,0,0.05)); }
    to { filter: drop-shadow(0 0 80px rgba(255,255,0,0.12)); }
}
/* 挨拶 */
.m-home-greeting {
    position: relative;
    z-index: 2;
    margin-top: 14px;
    text-align: center;
    animation: mhFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
@keyframes mhFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.m-home-welcome {
    display: block;
    font-family: var(--m-font-display);
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 6px;
    text-transform: uppercase;
}
.m-home-member-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.88);
    letter-spacing: 1.5px;
    margin-top: 2px;
}

/* ---- VISIT RING (来店プログレスリング) ---- */
.m-visit-ring-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 300px;
    margin: 24px auto 0;
    text-align: center;
    animation: mhFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}
.m-visit-ring {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto;
}
.m-visit-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.m-visit-track {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 2.5;
}
.m-visit-progress {
    fill: none;
    stroke: var(--m-primary);
    stroke-width: 2.5;
    stroke-linecap: square;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 0 5px rgba(255,255,0,0.25));
    animation: mhRingIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
@keyframes mhRingIn {
    from { stroke-dashoffset: 339.3 !important; opacity: 0; }
    to { opacity: 1; }
}
.m-visit-ring-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.m-visit-count {
    font-family: var(--m-font-display);
    font-size: 34px;
    line-height: 1;
    color: #fff;
    letter-spacing: 1px;
}
.m-visit-unit {
    font-family: var(--m-font-display);
    font-size: 7px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 4px;
    margin-top: 1px;
}
.m-visit-milestone-float {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 12px;
    background: var(--m-primary);
    color: var(--m-dark);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    animation: mhFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 1s both;
}
.m-visit-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 18px;
}
.m-visit-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.m-visit-stat + .m-visit-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: rgba(255,255,255,0.08);
}
.m-visit-stat-num {
    font-family: var(--m-font-display);
    font-size: 22px;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1;
}
.m-visit-stat-label {
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.5px;
    margin-top: 3px;
}

/* ---- TODAY INFO (営業情報) ---- */
.m-today-info {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 300px;
    margin: 24px auto 0;
    padding: 16px 20px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px;
    text-align: center;
    animation: mhFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
/* 上辺アクセントライン */
.m-today-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--m-primary), transparent);
    opacity: 0.4;
}
.m-today-label {
    font-family: var(--m-font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 3px;
}
.m-today-date {
    font-family: var(--m-font-display);
    font-size: 22px;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1;
}
.m-today-status {
    font-family: var(--m-font);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.7;
}
.m-today-open {
    color: var(--m-primary);
    text-shadow: 0 0 20px rgba(255,255,0,0.15);
    animation: mhStatusPulse 2.5s ease-in-out infinite alternate;
}
@keyframes mhStatusPulse {
    from { text-shadow: 0 0 15px rgba(255,255,0,0.1); }
    to { text-shadow: 0 0 30px rgba(255,255,0,0.25); }
}
.m-today-closed {
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255,107,107,0.15);
}

/* ---- HOME NOTICES (お知らせ) ---- */
.m-home-notices {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 320px;
    margin-top: 28px;
}
.m-notice {
    padding: 14px 16px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 2px;
    color: rgba(255,255,255,0.85);
    animation: mhFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.m-notice:nth-child(1) { animation-delay: 0.45s; }
.m-notice:nth-child(2) { animation-delay: 0.52s; }
.m-notice:nth-child(3) { animation-delay: 0.59s; }
.m-notice-unread {
    border-left: 2px solid var(--m-primary);
    background: rgba(255,255,0,0.03);
}
.m-notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.m-notice-date {
    font-family: var(--m-font-display);
    font-size: 14px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
}
.m-notice-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    background: var(--m-primary);
    color: #000;
    border-radius: 1px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.m-notice-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.5;
}
.m-notice-body {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin-top: 4px;
    line-height: 1.7;
}

.m-home-notices-more {
    display: block;
    text-align: center;
    padding: 10px 0;
    font-family: var(--m-font);
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.2s;
    animation: mhFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}
.m-home-notices-more:active {
    color: var(--m-primary);
}

/* プログラムバナー */
.m-program-banner {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 320px;
    margin-top: 24px;
    text-decoration: none;
    animation: mhFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}
.m-program-banner-inner {
    position: relative;
    padding: 20px 22px;
    background: linear-gradient(135deg, rgba(255,255,0,0.12) 0%, rgba(255,255,0,0.03) 100%);
    border: 1px solid rgba(255,255,0,0.25);
    border-radius: 2px;
    overflow: hidden;
    transition: border-color 0.25s, background 0.25s;
}
.m-program-banner:active .m-program-banner-inner {
    border-color: rgba(255,255,0,0.4);
    background: linear-gradient(135deg, rgba(255,255,0,0.1) 0%, rgba(255,255,0,0.03) 100%);
}
.m-program-badge {
    font-family: var(--m-font-display);
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--m-primary);
    opacity: 1;
    margin-bottom: 4px;
}
.m-program-title {
    font-family: var(--m-font-display);
    font-size: 26px;
    letter-spacing: 4px;
    color: #fff;
    line-height: 1;
}
.m-program-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-top: 6px;
    letter-spacing: 0.5px;
}
.m-program-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: rgba(255,255,0,0.25);
    transition: color 0.25s, transform 0.25s;
}
.m-program-banner:active .m-program-arrow {
    color: var(--m-primary);
    transform: translateY(-50%) translateX(3px);
}

/* ご利用ガイドリンク */
.m-guide-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    margin-top: 12px;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    transition: background 0.2s, color 0.2s;
    position: relative;
    z-index: 2;
}
.m-guide-link:active {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
}
.m-guide-icon {
    display: flex;
    color: var(--m-primary);
    opacity: 0.5;
}
.m-guide-text { flex: 1; }
.m-guide-arrow {
    color: rgba(255,255,255,0.2);
    font-size: 14px;
}

.m-home-actions {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 320px;
    margin-top: 24px;
    animation: mhFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

/* ---- BOOKING BUTTON (ホーム予約ボタン) ---- */
.m-booking-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 16px;
    background: var(--m-primary);
    color: var(--m-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--m-font);
    letter-spacing: 0.5px;
    border: none;
    transition: transform 0.15s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.m-booking-btn:active {
    transform: scale(0.97);
    opacity: 0.85;
}
.m-booking-btn + .m-booking-btn {
    margin-top: 12px;
}
.m-booking-btn-outline {
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
}
.m-booking-btn-outline .m-booking-icon {
    color: rgba(255,255,255,0.5);
}
.m-booking-icon {
    display: flex;
    align-items: center;
    color: var(--m-dark);
}
.m-booking-widget {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--m-border);
    padding: 16px;
    min-height: 200px;
}

/* ---- PAGE HERO (ページ冒頭ブロック) ---- */
.m-page-hero {
    text-align: center;
    padding: 24px 16px 28px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.m-page-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,0,0.1);
    color: var(--m-primary);
    margin-bottom: 14px;
}
.m-page-hero-label {
    font-family: var(--m-font-display);
    font-size: 22px;
    letter-spacing: 4px;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
}
.m-page-hero-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
}
.m-hero-name {
    color: #fff;
    font-weight: 700;
}

/* ---- PRICE TABLE ---- */
.pr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}
.pr-table th {
    background: rgba(255,255,0,0.1);
    color: var(--m-primary);
    font-family: var(--m-font-display);
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.pr-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
}
.pr-table tbody tr:last-child td { border-bottom: none; }
.pr-price {
    font-family: var(--m-font-display);
    font-size: 15px;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.pr-note {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    padding: 0 16px;
    margin-bottom: 4px;
}
.pr-info {
    padding: 12px 10px 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 4px;
}
.pr-info-row {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    padding: 3px 0;
    line-height: 1.5;
}
.pr-sub-notes {
    padding: 8px 10px 0;
}
.pr-sub-notes p {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin: 0;
    padding: 2px 0;
    line-height: 1.5;
}
/* 会員ステータス */
.pr-status-list {
    padding: 4px 0;
}
.pr-status-item {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pr-status-item:last-child { border-bottom: none; }
.pr-status-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    margin-bottom: 4px;
}
.pr-status-price {
    font-family: var(--m-font-display);
    font-size: 14px;
    color: var(--m-primary);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.pr-status-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
}
.pr-status-team {
    background: rgba(255,255,0,0.04);
    border-radius: 2px;
}
/* キャンセル規定 */
.pr-cancel {
    margin-top: 12px;
    padding: 12px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 2px;
}
.pr-cancel-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.pr-cancel-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    padding: 3px 0;
}
.pr-cancel-row span:last-child {
    font-family: var(--m-font-display);
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
}
/* ドリンク・フード */
.pr-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 4px 0;
}
.pr-menu-heading {
    font-family: var(--m-font-display);
    font-size: 13px;
    color: var(--m-primary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.pr-menu-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pr-menu-item span:last-child {
    font-family: var(--m-font-display);
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* ---- TEAM VIDEO CARDS ---- */
.m-tv-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}
.m-tv-title {
    padding: 14px 16px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}
.m-tv-fallback {
    padding: 16px;
    text-align: center;
}

/* ---- VIDEO EMBED ---- */
.m-video-wrap {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.m-video-ratio {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.m-video-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---- FACILITY INFO (施設情報) ---- */
.m-facility-info {
    margin-top: 32px;
    background: var(--m-dark);
    margin-left: -20px;
    margin-right: -20px;
    padding: 28px 20px 20px;
    position: relative;
}
.m-facility-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--m-primary) 0%, var(--m-primary) 30%, transparent 100%);
}
.m-facility-header {
    margin-bottom: 20px;
}
.m-facility-title {
    font-family: var(--m-font-display);
    font-size: 22px;
    letter-spacing: 4px;
    color: #fff;
    line-height: 1;
}
.m-facility-title-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 2px;
    margin-top: 3px;
}
.m-facility-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    animation: mcReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.m-facility-item:last-child {
    border-bottom: none;
}
.m-facility-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    color: var(--m-primary);
    margin-top: 2px;
}
.m-facility-body {
    flex: 1;
    min-width: 0;
}
.m-facility-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.m-facility-value {
    font-size: 14px;
    color: #fff;
    line-height: 1.6;
}
.m-facility-hours {
    font-family: var(--m-font-display);
    font-size: 20px;
    letter-spacing: 2px;
}
.m-facility-note {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
    margin-top: 4px;
}
.m-facility-tel {
    color: #fff;
    text-decoration: none;
    font-family: var(--m-font-display);
    font-size: 20px;
    letter-spacing: 2px;
}
.m-facility-tel:active {
    color: var(--m-primary);
}
.m-facility-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--m-primary);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ---- CALENDAR ---- */
.m-calendar-wrap {
    margin: -20px;
}
.m-calendar-iframe {
    width: 100%;
    height: calc(100dvh - var(--m-header-h) - var(--m-nav-h));
    border: none;
    display: block;
}

/* ---- EMPTY STATE ---- */
.m-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--m-text-lighter);
    font-size: 14px;
}

/* ---- DETAILS/SUMMARY (過去のイベント) ---- */
details > summary.m-section-title {
    cursor: pointer;
    user-select: none;
}
details > summary.m-section-title::after {
    content: '▸';
    font-size: 10px;
    margin-left: 6px;
    transition: transform 0.2s;
    display: inline-block;
}
details[open] > summary.m-section-title::after {
    transform: rotate(90deg);
}

/* ---- TEXT UTILITIES ---- */
.m-text-sub { font-size: 13px; color: var(--m-text-light); }
.m-text-center { text-align: center; }
.m-text-pre { white-space: pre-wrap; }
.m-py-sm { padding: 8px 0; }
.m-mt-xs { margin-top: 6px; }
.m-mt-sm { margin-top: 12px; }
.m-mt-md { margin-top: 16px; }
.m-mt-lg { margin-top: 24px; }
.m-hidden { display: none; }

/* エントリーリンクボタン */
.m-btn-entry-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--m-dark);
    background: var(--m-primary);
    padding: 4px 12px;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.m-btn-entry-link:hover { opacity: 0.85; }

/* ---- NEWS FEED (news.php) ---- */
/* タイムラインフィード */
.nw-feed {
    position: relative;
    padding-left: 20px;
}
.nw-feed::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    bottom: 40px;
    width: 1px;
    background: var(--m-border);
}

/* アイテム共通 */
.nw-item {
    position: relative;
    margin-bottom: 16px;
    animation: nwSlideIn 0.4s ease both;
}
@keyframes nwSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.nw-item--event { cursor: pointer; }
.nw-item--event:active .nw-card--event {
    transform: scale(0.985);
}

/* タイムラインドット */
.nw-dot {
    position: absolute;
    left: -20px;
    top: 18px;
    width: 11px;
    height: 11px;
    background: var(--m-bg-card);
    border: 2px solid var(--m-border);
    border-radius: 50%;
    z-index: 1;
}
.nw-dot--event {
    background: var(--m-primary);
    border-color: var(--m-dark);
}
.nw-dot--personal {
    background: var(--m-danger);
    border-color: var(--m-danger);
}

/* カード共通 */
.nw-card {
    background: var(--m-bg-card);
    border: 1px solid var(--m-border);
    padding: 16px 18px;
    box-shadow: var(--m-shadow-sm);
    transition: box-shadow 0.2s, transform 0.15s;
}

/* 講習会カード */
.nw-card--event {
    background: var(--m-dark);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.nw-card--event::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--m-primary), transparent);
}

/* 個別メッセージ */
.nw-item--personal .nw-card {
    border-left: 3px solid var(--m-danger);
}

/* メタ行 */
.nw-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* 日付 */
.nw-date {
    font-family: var(--m-font-display);
    font-size: 14px;
    color: var(--m-text-light);
    letter-spacing: 1.5px;
}
.nw-date--event {
    color: rgba(255,255,255,0.4);
}

/* タグ */
.nw-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.nw-tag--info {
    background: var(--m-bg-inset);
    color: var(--m-text-light);
}
.nw-tag--personal {
    background: rgba(220,38,38,0.1);
    color: var(--m-danger);
}
.nw-tag--event {
    background: var(--m-primary);
    color: var(--m-dark);
    font-weight: 800;
}

/* お知らせ本文 */
.nw-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 6px;
    color: var(--m-text);
}
.nw-body {
    font-size: 13px;
    color: var(--m-text);
    line-height: 1.8;
    opacity: 0.8;
}

/* 講習会カード内容 */
.nw-event-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.nw-event-time {
    font-family: var(--m-font-display);
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
}
.nw-event-link-wrap {
    margin-top: 10px;
}
.nw-event-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--m-dark);
    background: var(--m-primary);
    padding: 5px 14px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
}
.nw-event-link:active { opacity: 0.8; }
.nw-event-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: rgba(255,255,255,0.15);
    font-weight: 300;
    line-height: 1;
}

/* ---- MEMBER CARD PAGE (member_card.php) ---- */
/* "Backstage Pass" — immersive full-screen credential */
.mc-card {
    width: 100%;
    background: var(--m-rank-bg);
    color: var(--m-rank-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px 40px;
    min-height: calc(100dvh - var(--m-header-h) - var(--m-nav-h));
    position: relative;
    overflow: hidden;
}
/* ノイズテクスチャ — 質感を加える */
.mc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}
/* 背景グロウ */
.mc-card::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 90%;
    height: 70%;
    border-radius: 50%;
    background: var(--m-rank-accent);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
body.rank-team .mc-card::before {
    background: rgba(255,255,0,0.06);
}
body.rank-royal .mc-card::before {
    background: radial-gradient(ellipse at center, rgba(255,215,0,0.1) 0%, rgba(255,215,0,0.02) 70%);
}

/* ヘッダー: ロゴ + タイトル */
.mc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mc-logo {
    height: 70px;
    width: auto;
    flex-shrink: 0;
}
.mc-header-text {
    display: flex;
    flex-direction: column;
}
.mc-facility {
    font-family: var(--m-font-display);
    font-size: 24px;
    letter-spacing: 4px;
    line-height: 1;
}
.mc-subtitle {
    font-family: var(--m-font-display);
    font-size: 11px;
    color: var(--m-rank-sub);
    letter-spacing: 3px;
    margin-top: 2px;
}

/* 区切りライン */
.mc-header + .mc-qr-area {
    margin-top: 28px;
}
.mc-header::after {
    display: none;
}

/* QRコード — ヒーロー要素 */
.mc-qr-area {
    position: relative;
    z-index: 2;
    padding: 14px;
    border-radius: 10px;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
body.rank-visitor .mc-qr-area {
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
body.rank-regular .mc-qr-area {
    background: rgba(255,255,255,0.5);
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
body.rank-team .mc-qr-area,
body.rank-royal .mc-qr-area {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}
.mc-qr {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 会員番号 — 大きなディスプレイフォント */
.mc-id {
    font-family: var(--m-font-display);
    font-size: 36px;
    letter-spacing: 5px;
    line-height: 1;
    margin-top: 20px;
    position: relative;
    z-index: 2;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

/* 薄い区切り線 */
.mc-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--m-rank-accent);
    width: 200px;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}
body.rank-visitor .mc-name {
    border-top-color: #ddd;
}
body.rank-regular .mc-name {
    border-top-color: rgba(0,0,0,0.12);
}
body.rank-team .mc-name,
body.rank-royal .mc-name {
    border-top-color: rgba(255,255,255,0.12);
}

/* 会員ランク — テキスト */
.mc-type {
    font-size: 13px;
    color: var(--m-rank-sub);
    letter-spacing: 2px;
    margin-top: 8px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}
/* 会員ランク — チーム系バッジ */
.mc-type-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 20px;
    background: var(--m-primary);
    color: #000;
    font-family: var(--m-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

/* ロイヤル会員証 — スペシャルバッジ */
.mc-royal-badge {
    background: linear-gradient(135deg, #FFD700, #FFF8DC, #FFD700, #DAA520, #FFD700) !important;
    background-size: 300% 300% !important;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both, rkGoldShimmer 3s ease infinite !important;
    font-family: var(--m-font-display) !important;
    font-size: 13px !important;
    letter-spacing: 4px !important;
    padding: 6px 24px !important;
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}
/* ロイヤル会員証 — カード全体にゴールドボーダー */
body.rank-royal .mc-card {
    border: 1px solid rgba(255,215,0,0.2);
}
/* ロイヤル会員証 — サブタイトルをゴールドに */
body.rank-royal .mc-subtitle {
    color: var(--m-primary);
}
/* ロイヤル会員証 — QRエリアにゴールドボーダー */
body.rank-royal .mc-qr-area {
    border-color: rgba(255,215,0,0.15) !important;
}

/* フッター: 有効期限 + 発行日 */
.mc-footer {
    margin-top: 25px;
    padding-top: 16px;
    border-top: 1px solid var(--m-rank-accent);
    text-align: center;
    width: 240px;
    position: relative;
    z-index: 2;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
}
body.rank-visitor .mc-footer {
    border-top-color: #ddd;
}
body.rank-regular .mc-footer {
    border-top-color: rgba(0,0,0,0.12);
}
body.rank-team .mc-footer,
body.rank-royal .mc-footer {
    border-top-color: rgba(255,255,255,0.12);
}
.mc-expiry {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.mc-expired {
    color: #dc2626;
}
.mc-expired-label {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 2px;
    vertical-align: middle;
}
.mc-issue {
    font-size: 12px;
    color: var(--m-rank-sub);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ヒントテキスト */
.mc-hint {
    font-size: 11px;
    color: var(--m-rank-sub);
    margin-top: 32px;
    letter-spacing: 1px;
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0.7;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

/* 戻るリンク */
.m-back-link {
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    color: #fff;
    padding: 4px 8px 4px 0;
    -webkit-tap-highlight-color: transparent;
}

@keyframes mcReveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- CLEAN & RIDE PROGRAM ---- */
.cr-page {
    background: #000;
    color: #fff;
    min-height: calc(100dvh - var(--m-header-h) - var(--m-nav-h));
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
}
.cr-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ヒーロー */
.cr-hero {
    position: relative;
    z-index: 2;
    padding: 48px 24px 32px;
    text-align: center;
    animation: mcReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* ゴーストウォーターマーク — 背景に大きく薄く */
.cr-logo-ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    height: 280px;
    width: auto;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}
/* ヒーロー上部 — ロゴマーク + ラベルを横並び */
.cr-hero-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
/* インラインロゴマーク — 小さくラベル横に */
.cr-logo-mark {
    height: 28px;
    width: auto;
    opacity: 0.7;
}
.cr-hero-label {
    font-family: var(--m-font-display);
    font-size: 11px;
    letter-spacing: 6px;
    color: var(--m-primary);
}
.cr-title {
    font-family: var(--m-font-display);
    font-size: 72px;
    line-height: 0.85;
    letter-spacing: 4px;
    margin: 0;
    color: #fff;
}
.cr-subtitle {
    font-family: var(--m-font-display);
    font-size: 28px;
    letter-spacing: 14px;
    color: rgba(255,255,255,0.25);
    margin-top: 4px;
}
.cr-tagline {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cr-tag-line1, .cr-tag-line2 {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 3px;
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.2);
}
.cr-tag-line2 {
    border-color: var(--m-primary);
    color: var(--m-primary);
}
.cr-tag-eq {
    font-family: var(--m-font-display);
    font-size: 20px;
    color: rgba(255,255,255,0.3);
}

/* イントロ */
.cr-intro {
    position: relative;
    z-index: 2;
    padding: 0 24px 32px;
    animation: mcReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.cr-intro p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}
.cr-intro-highlight {
    color: #fff !important;
    font-weight: 700;
    padding-left: 12px;
    border-left: 2px solid var(--m-primary);
}

/* セクションラベル */
.cr-section-label {
    font-family: var(--m-font-display);
    font-size: 20px;
    letter-spacing: 5px;
    color: #fff;
}
.cr-section-label-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 2px;
    margin-top: 2px;
}

/* タイムスケジュール */
.cr-schedule {
    position: relative;
    z-index: 2;
    padding: 28px 24px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    animation: mcReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.cr-timeline {
    margin-top: 20px;
}
.cr-tl-item {
    display: flex;
    align-items: stretch;
    gap: 12px;
    min-height: 64px;
}
.cr-tl-time {
    font-family: var(--m-font-display);
    font-size: 18px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.5);
    width: 50px;
    flex-shrink: 0;
    padding-top: 8px;
}
.cr-tl-bar {
    width: 3px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
    position: relative;
    border-radius: 2px;
}
.cr-tl-clean .cr-tl-bar { background: rgba(255,255,255,0.25); }
.cr-tl-ride .cr-tl-bar { background: var(--m-primary); }
.cr-tl-open .cr-tl-bar { background: rgba(255,255,255,0.1); }
.cr-tl-bar::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: inherit;
}
.cr-tl-content {
    flex: 1;
    padding: 6px 0 16px;
}
.cr-tl-name {
    font-family: var(--m-font-display);
    font-size: 18px;
    letter-spacing: 3px;
    color: #fff;
}
.cr-tl-ride .cr-tl-name {
    color: var(--m-primary);
}
.cr-tl-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}
.cr-tl-duration {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
    padding-top: 8px;
    width: 24px;
    text-align: right;
}

/* 参加資格 */
.cr-requirements {
    position: relative;
    z-index: 2;
    padding: 28px 24px;
    animation: mcReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}
.cr-req-list {
    list-style: none;
    margin-top: 20px;
    padding: 0;
}
.cr-req-list li {
    position: relative;
    padding: 10px 0 10px 24px;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cr-req-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--m-primary);
}
.cr-req-list li:last-child {
    border-bottom: none;
}
.cr-req-note {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}
.cr-contact {
    margin-top: 24px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}
.cr-contact-tel {
    display: block;
    margin-top: 8px;
    font-family: var(--m-font-display);
    font-size: 22px;
    letter-spacing: 2px;
    color: #fff;
    text-decoration: none;
}
.cr-contact-tel:active {
    color: var(--m-primary);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ========================================
   会員ランク状況 (fees.php)
   ======================================== */
.rk-page {
    padding-top: 0 !important;
}

/* ランクヒーロー — 全幅ブリード */
.rk-hero {
    position: relative;
    padding: 36px 24px 32px;
    margin: 0 -20px;
    text-align: center;
    background: var(--m-dark);
    overflow: hidden;
}
/* ヒーロー下端のシャープな境界線 */
.rk-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.3), transparent);
}
.rk-hero-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}
.rk-hero-greeting {
    position: relative;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rk-hero-tier {
    position: relative;
    font-family: var(--m-font-display);
    font-size: 36px;
    letter-spacing: 4px;
    color: var(--m-primary);
    line-height: 1;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
.rk-hero-label {
    position: relative;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.rk-hero-note {
    position: relative;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 10px;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* ロイヤル スペシャル装飾 */
.rk-royal-special {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}
.rk-royal-text {
    background: linear-gradient(135deg, #FFD700, #FFF8DC, #FFD700, #DAA520, #FFD700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 42px;
    letter-spacing: 6px;
    text-shadow: none;
    animation: rkGoldShimmer 3s ease infinite, mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.3));
}
.rk-royal-stars-l, .rk-royal-stars-r {
    font-size: 14px;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FFD700, #FFF8DC, #DAA520);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rkGoldShimmer 3s ease infinite;
}
.rk-royal-stars-l {
    animation-delay: 0.3s;
}
.rk-royal-stars-r {
    animation-delay: 0.6s;
}
@keyframes rkGoldShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* ロイヤルヒーロー背景にゴールドグロー */
.rk-hero:has(.rk-royal-special) {
    background: radial-gradient(ellipse at center 40%, rgba(255,215,0,0.08) 0%, var(--m-dark) 70%);
}
.rk-hero:has(.rk-royal-special)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255,215,0,0.05) 0%, transparent 60%);
    pointer-events: none;
    animation: rkGlow 4s ease-in-out infinite;
}
@keyframes rkGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ランクプログレッション */
.rk-progression {
    padding: 24px 24px 20px;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.rk-prog-label {
    font-family: var(--m-font-display);
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--m-text-light);
    margin-bottom: 16px;
}
.rk-tier-track {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 20px;
}
.rk-tier {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    animation: mcReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rk-tier-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: var(--m-bg);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.rk-tier-done .rk-tier-dot {
    background: var(--m-dark);
    border-color: var(--m-dark);
}
.rk-tier-current .rk-tier-dot {
    background: var(--m-primary);
    border-color: var(--m-primary);
    box-shadow: 0 0 10px rgba(255,215,0,0.4);
    width: 12px;
    height: 12px;
}
.rk-tier-locked .rk-tier-dot {
    border-color: #ddd;
    background: #eee;
}
.rk-tier-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.rk-tier-en {
    font-family: var(--m-font-display);
    font-size: 16px;
    letter-spacing: 2px;
    color: #bbb;
}
.rk-tier-done .rk-tier-en {
    color: #666;
}
.rk-tier-current .rk-tier-en {
    color: var(--m-dark);
    font-size: 18px;
}
.rk-tier-jp {
    font-size: 11px;
    color: #aaa;
}
.rk-tier-current .rk-tier-jp {
    color: #555;
}
.rk-tier-you {
    font-family: var(--m-font-display);
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--m-dark);
    background: var(--m-primary);
    padding: 2px 8px;
    border-radius: 2px;
    margin-left: auto;
}

/* プログレッションライン */
.rk-tier-line {
    position: absolute;
    left: 24px;
    top: 17px;
    bottom: 17px;
    width: 2px;
    background: #ddd;
}
.rk-tier-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--progress);
    background: var(--m-dark);
    transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ロイヤル進捗 */
.rk-royal-progress {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--m-bg-card);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 4px;
}
.rk-royal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.rk-royal-label {
    font-size: 11px;
    color: var(--m-text-light);
}
.rk-royal-count {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--m-text);
}
.rk-royal-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}
.rk-royal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--m-primary), #ffed4a);
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.rk-royal-achieved {
    font-family: var(--m-font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--m-dark);
    background: var(--m-primary);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    margin-top: 6px;
    float: right;
}

/* セクション共通 */
.rk-section {
    padding: 0 24px 20px;
    animation: mcReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.rk-section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}
.rk-section-title {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--m-text-light);
}
.rk-section-sub {
    font-size: 11px;
    color: #999;
}

/* カード */
.rk-card {
    background: var(--m-bg-card);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 16px;
}
.rk-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rk-badge {
    font-family: var(--m-font-display);
    font-size: 11px;
    letter-spacing: 2px;
    padding: 3px 10px;
    border-radius: 2px;
}
.rk-badge-active {
    background: var(--m-dark);
    color: var(--m-primary);
}
.rk-badge-expired {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.rk-expiry {
    font-family: var(--m-font-display);
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--m-text);
}
.rk-detail-row {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.rk-detail-label {
    display: block;
    font-size: 10px;
    color: var(--m-text-light);
    margin-bottom: 2px;
}
.rk-detail-value {
    font-size: 13px;
    color: var(--m-text);
}

/* チーム月額グリッド */
.rk-term-block {
    margin-bottom: 16px;
}
.rk-term-block:last-child {
    margin-bottom: 0;
}
.rk-term-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.rk-term-label {
    font-family: var(--m-font-display);
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--m-text);
}
.rk-term-range-text {
    font-size: 11px;
    color: var(--m-text-light);
}
.rk-term-current {
    font-family: var(--m-font-display);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--m-dark);
    background: var(--m-primary);
    padding: 1px 6px;
    border-radius: 2px;
    margin-left: auto;
}
.rk-monthly-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.rk-month-slot {
    background: var(--m-bg-card);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 12px 8px;
    text-align: center;
    position: relative;
}
.rk-month-paid {
    border-color: var(--m-primary);
    background: rgba(255,255,0,0.18);
}
.rk-month-num {
    font-family: var(--m-font-display);
    font-size: 28px;
    color: #ccc;
    line-height: 1;
}
.rk-month-paid .rk-month-num {
    color: var(--m-text);
}
.rk-month-label {
    font-size: 10px;
    color: #bbb;
    margin-top: 1px;
}
.rk-month-paid .rk-month-label {
    color: var(--m-text-light);
}
.rk-month-check {
    font-size: 16px;
    color: var(--m-dark);
    font-weight: 700;
    margin-top: 6px;
    min-height: 20px;
}
.rk-month-amt {
    font-size: 10px;
    color: var(--m-text-light);
    margin-top: 2px;
}

/* 説明カード */
.rk-explain {
    font-size: 13px;
    line-height: 1.8;
    color: var(--m-text);
}
.rk-muted {
    font-size: 13px;
    color: var(--m-text-light);
}

.rk-enroll-note {
    font-size: 11px;
    color: var(--m-text);
    font-weight: 600;
    margin-bottom: 8px;
}

/* ランクアップカード */
.rk-upgrade {
    border-left: 3px solid var(--m-primary);
}
.rk-upgrade-title {
    font-family: var(--m-font-display);
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--m-text);
    margin-bottom: 8px;
}
.rk-upgrade-desc {
    font-size: 13px;
    color: var(--m-text);
    margin-bottom: 6px;
}
.rk-upgrade-cost {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--m-text-light);
    margin-bottom: 6px;
}
.rk-upgrade-cost span:not(:nth-child(even)) {
    background: var(--m-bg-inset);
    padding: 3px 8px;
    border-radius: 2px;
    color: var(--m-text);
    font-weight: 500;
}
.rk-upgrade-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--m-text);
    margin: 8px 0;
}
.rk-upgrade-benefit {
    font-size: 11px;
    line-height: 1.7;
    color: var(--m-text-light);
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* ダーク版: 会員ランク */
body.m-page-dark .rk-prog-label { color: rgba(255,255,255,0.4); }
body.m-page-dark .rk-tier-dot { background: transparent; border-color: rgba(255,255,255,0.2); }
body.m-page-dark .rk-tier-done .rk-tier-dot { background: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.5); }
body.m-page-dark .rk-tier-done .rk-tier-en { color: rgba(255,255,255,0.5); }
body.m-page-dark .rk-tier-current .rk-tier-en { color: var(--m-primary); }
body.m-page-dark .rk-tier-current .rk-tier-jp { color: rgba(255,255,255,0.7); }
body.m-page-dark .rk-tier-locked .rk-tier-dot { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); }
body.m-page-dark .rk-tier-line { background: rgba(255,255,255,0.1); }
body.m-page-dark .rk-tier-line::after { background: rgba(255,255,255,0.4); }
body.m-page-dark .rk-section-title { color: rgba(255,255,255,0.5); }
body.m-page-dark .rk-section-sub { color: rgba(255,255,255,0.35); }
body.m-page-dark .rk-card { color: var(--m-text); }
body.m-page-dark .rk-royal-progress { color: var(--m-text); }
body.m-page-dark .rk-enroll-note { color: rgba(255,255,255,0.7); }
body.m-page-dark .rk-term-label { color: #fff; }
body.m-page-dark .rk-term-range-text { color: rgba(255,255,255,0.45); }
body.m-page-dark .rk-month-slot { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
body.m-page-dark .rk-month-num { color: rgba(255,255,255,0.3); }
body.m-page-dark .rk-month-label { color: rgba(255,255,255,0.25); }
body.m-page-dark .rk-month-paid { background: rgba(255,255,0,0.18); border-color: var(--m-primary); }
body.m-page-dark .rk-month-paid .rk-month-num { color: #fff; }
body.m-page-dark .rk-month-paid .rk-month-label { color: rgba(255,255,255,0.7); }
body.m-page-dark .rk-month-check { color: var(--m-primary); }
body.m-page-dark .rk-month-amt { color: rgba(255,255,255,0.6); }

/* ---- ABOUT PAGE ---- */
.about-page {
    position: relative;
    background: var(--m-dark);
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
}
.about-grain {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
    z-index: 1;
}
.about-page > *:not(.about-grain) { position: relative; z-index: 2; }

.about-hero {
    text-align: center;
    padding: 40px 20px 24px;
}
.about-logo {
    width: 48px;
    margin: 0 auto 12px;
    opacity: 0.9;
}
.about-company-name {
    font-family: var(--m-font-display);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--m-primary);
}

.about-section {
    margin: 0 16px 24px;
    padding: 20px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px;
}
.about-section-label {
    font-family: var(--m-font-display);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--m-primary);
    margin-bottom: 2px;
}
.about-section-sub {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.about-detail { display: flex; flex-direction: column; gap: 10px; }
.about-row {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}
.about-key {
    flex: 0 0 60px;
    color: rgba(255,255,255,0.45);
    font-size: 0.75rem;
    padding-top: 1px;
}
.about-val a {
    color: var(--m-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,0,0.25);
}
.about-val a:active { opacity: 0.7; }

/* Social */
.about-social-group { margin-bottom: 16px; }
.about-social-group:last-child { margin-bottom: 0; }
.about-social-brand {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}
.about-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.about-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px;
    color: rgba(255,255,255,0.75);
    font-size: 0.75rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.about-social-link:active {
    background: rgba(255,255,0,0.12);
    color: var(--m-primary);
}
.about-social-link svg { flex-shrink: 0; }

.about-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 16px 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.about-footer-copy {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.25);
}
.about-footer-coet {
    display: inline-block;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.about-footer-coet:hover { opacity: 0.6; }
.about-footer-coet img {
    width: 90px;
    height: auto;
    display: block;
}

/* ---- FESN CHANNEL PAGE ---- */
.vch-page {
    position: relative;
    background: var(--m-dark);
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
}
.vch-grain {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
    z-index: 1;
}
.vch-page > *:not(.vch-grain) { position: relative; z-index: 2; }

/* Hero */
.vch-hero {
    text-align: center;
    padding: 36px 20px 20px;
}
.vch-hero-title {
    font-family: var(--m-font-display);
    font-size: 2.8rem;
    line-height: 0.95;
    letter-spacing: 0.06em;
    color: #fff;
    margin-bottom: 8px;
}
.vch-hero-line {
    width: 40px;
    height: 2px;
    background: var(--m-primary);
    margin: 16px auto 0;
}
.vch-yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 28px;
    background: #ff0000;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.2s, transform 0.15s;
}
.vch-yt-btn:active {
    background: #cc0000;
    transform: scale(0.97);
}

/* Grid */
.vch-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 16px 32px;
}

/* Card */
@keyframes vchCardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vch-card {
    display: block;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: hidden;
    animation: vchCardIn 0.45s ease both;
    transition: border-color 0.2s, background 0.2s;
}
.vch-card:active {
    border-color: rgba(255,255,0,0.3);
    background: rgba(255,255,0,0.04);
}
.vch-thumb-playing {
    cursor: default;
}
.vch-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Thumbnail */
.vch-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}
.vch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.vch-card:active .vch-thumb img { transform: scale(1.03); }

/* VHSスキャンライン */
.vch-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.08) 2px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
}

/* 再生ボタン */
.vch-play-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.vch-play {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--m-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(255,255,0,0.3);
}

/* 下部グラデーション */
.vch-thumb-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(10,10,10,0.85));
    pointer-events: none;
}

/* メタ情報 */
.vch-meta {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.vch-date {
    font-family: var(--m-font-display);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--m-primary);
    opacity: 0.7;
}
.vch-title {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- GUIDE PAGE ---- */
.g-toc {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 20px 16px 16px;
    margin-bottom: 24px;
}
.g-toc-title {
    font-family: var(--m-font-display);
    font-size: 15px;
    letter-spacing: 4px;
    color: var(--m-primary);
    margin-bottom: 14px;
}
.g-toc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    text-decoration: none;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.2s;
}
.g-toc-item:last-child { border-bottom: none; }
.g-toc-item:active { color: var(--m-primary); }
.g-toc-num {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--m-primary);
    opacity: 0.6;
    min-width: 22px;
}

/* セクション */
.g-section {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.g-section:last-of-type { border-bottom: none; }
.g-section-num {
    font-family: var(--m-font-display);
    font-size: 28px;
    letter-spacing: 2px;
    color: var(--m-primary);
    opacity: 0.25;
    line-height: 1;
    margin-bottom: 2px;
}
.g-section-title {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.4;
}
.g-sub-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--m-primary);
    letter-spacing: 0.5px;
    margin: 18px 0 8px;
}
.g-text {
    font-size: 13.5px;
    color: rgba(255,255,255,0.72);
    line-height: 1.85;
    margin-bottom: 10px;
}
.g-text strong {
    color: rgba(255,255,255,0.92);
    font-weight: 600;
}

/* ステップリスト */
.g-steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0 0 10px;
}
.g-steps li {
    counter-increment: step;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 7px 0;
    font-size: 13.5px;
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
}
.g-steps li::before {
    content: counter(step);
    font-family: var(--m-font-display);
    font-size: 15px;
    color: var(--m-primary);
    opacity: 0.7;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
    padding-top: 1px;
}
.g-steps li strong { color: rgba(255,255,255,0.92); font-weight: 600; }

/* 箇条書きリスト */
.g-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
}
.g-list li {
    padding: 6px 0 6px 16px;
    font-size: 13.5px;
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
    position: relative;
}
.g-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 5px;
    height: 5px;
    background: var(--m-primary);
    opacity: 0.5;
}
.g-list li strong { color: rgba(255,255,255,0.92); font-weight: 600; }

/* ヒント・ティップス */
.g-tip {
    background: rgba(255,255,0,0.06);
    border-left: 3px solid rgba(255,255,0,0.35);
    padding: 12px 14px;
    margin: 14px 0 8px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
}
.g-tip strong { color: rgba(255,255,255,0.85); font-weight: 600; }

/* テーブル */
.g-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}
.g-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--m-primary);
    opacity: 0.6;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.g-table td {
    padding: 9px 10px;
    color: rgba(255,255,255,0.72);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    line-height: 1.6;
    vertical-align: top;
}
.g-table td:first-child {
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    white-space: nowrap;
}
.g-table tbody tr:last-child td { border-bottom: none; }

/* ランクフロー */
.g-rank-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.g-rank-step {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.5);
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,0.12);
}
.g-rank-step-top {
    color: var(--m-primary);
    border-color: rgba(255,255,0,0.3);
    background: rgba(255,255,0,0.06);
}
.g-rank-arrow {
    color: rgba(255,255,255,0.2);
    font-size: 14px;
}

/* FAQ */
.g-faq { margin: 0; }
.g-faq-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.g-faq-item:last-child { border-bottom: none; }
.g-faq-q {
    font-size: 13.5px;
    font-weight: 700;
    color: rgba(255,255,255,0.88);
    margin-bottom: 6px;
    line-height: 1.5;
}
.g-faq-a {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
}

/* コンタクト */
.g-contact {
    text-align: center;
    padding: 28px 0 16px;
}
.g-contact-title {
    font-family: var(--m-font-display);
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--m-primary);
    opacity: 0.5;
    margin-bottom: 14px;
}
.g-contact-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
.g-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.g-contact-item:active { color: var(--m-primary); }

/* フッター */
.g-footer {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    line-height: 1.8;
    padding: 20px 0 8px;
}

/* ナビガイド */
.g-nav-guide { border-bottom: none; }

/* ---- COET FOOTER (home用) ---- */
.m-coet-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0 24px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.m-coet-footer:hover { opacity: 0.6; }
.m-coet-footer a {
    display: inline-block;
}
.m-coet-footer img {
    width: 90px;
    height: auto;
    display: block;
}

/* ---- CELEBRATION (お祝い演出) ---- */

/* スパークル粒子フィールド */
.m-sparkle-field {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
}
.m-sparkle {
    position: absolute;
    left: var(--sx);
    top: var(--sy);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0;
    animation: mhSparkle var(--ss) ease-in-out var(--sd) infinite;
}
/* 誕生日: ピンク〜ゴールド系 */
.m-celebrate-birthday .m-sparkle {
    background: #ffd700;
    box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.6);
}
.m-celebrate-birthday .m-sparkle:nth-child(3n) {
    background: #ff69b4;
    box-shadow: 0 0 6px 2px rgba(255, 105, 180, 0.5);
}
.m-celebrate-birthday .m-sparkle:nth-child(3n+1) {
    background: #fff;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.5);
}
/* マイルストーン: ゴールド〜イエロー系 */
.m-celebrate-milestone .m-sparkle {
    background: #ffd700;
    box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.6);
}
.m-celebrate-milestone .m-sparkle:nth-child(3n) {
    background: #ffff00;
    box-shadow: 0 0 6px 2px rgba(255, 255, 0, 0.5);
}
.m-celebrate-milestone .m-sparkle:nth-child(3n+1) {
    background: #fff8dc;
    box-shadow: 0 0 6px 2px rgba(255, 248, 220, 0.5);
}
@keyframes mhSparkle {
    0%   { opacity: 0; transform: scale(0) translateY(0); }
    20%  { opacity: var(--so); transform: scale(1.2) translateY(-10px); }
    50%  { opacity: var(--so); transform: scale(0.8) translateY(-25px); }
    80%  { opacity: calc(var(--so) * 0.5); transform: scale(0.5) translateY(-40px); }
    100% { opacity: 0; transform: scale(0) translateY(-60px); }
}

/* お祝いバナー */
.m-celebrate-banner {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-bottom: 8px;
    animation: mhCelebFadeIn 1s ease-out 0.3s both;
}
.m-celebrate-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 8px;
    animation: mhCelebBounce 2s ease-in-out infinite;
}
.m-celebrate-text {
    font-family: var(--m-font-display);
    font-size: 28px;
    letter-spacing: 4px;
    line-height: 1;
    background: linear-gradient(90deg, #ffd700, #fff, #ffd700);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: mhCelebShimmer 3s linear infinite;
}
.m-celebrate-birthday .m-celebrate-text {
    background-image: linear-gradient(90deg, #ff69b4, #ffd700, #fff, #ff69b4);
    background-size: 300% 100%;
}
.m-celebrate-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    letter-spacing: 0.5px;
}
@keyframes mhCelebFadeIn {
    from { opacity: 0; transform: translateY(-15px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes mhCelebBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes mhCelebShimmer {
    from { background-position: 200% center; }
    to   { background-position: -200% center; }
}

/* お祝い時の背景グロー強化 */
.m-celebrate .m-home-hero::before {
    background: radial-gradient(ellipse at 50% 30%, rgba(255,215,0,0.15) 0%, transparent 70%);
}
.m-celebrate-birthday .m-home-hero::before {
    background: radial-gradient(ellipse at 50% 30%, rgba(255,105,180,0.12) 0%, rgba(255,215,0,0.08) 40%, transparent 70%);
}

/* お祝い時のリング演出: ゴールデングロー */
.m-celebrate .m-visit-progress {
    stroke: #ffd700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}
.m-celebrate .m-visit-count {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
.m-celebrate .m-visit-milestone-float {
    background: #ffd700;
    animation: mhMilestonePulse 1.5s ease-in-out infinite alternate;
}
@keyframes mhMilestonePulse {
    from { box-shadow: 0 0 4px rgba(255, 215, 0, 0.3); }
    to   { box-shadow: 0 0 16px rgba(255, 215, 0, 0.6); }
}

/* 誕生日: ウェルカムメッセージ色変更 */
.m-celebrate-birthday .m-home-welcome {
    background: linear-gradient(90deg, #ff69b4, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- SAFE AREA ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body { padding-bottom: calc(var(--m-nav-h) + env(safe-area-inset-bottom) + 16px); }
    .m-nav { height: calc(var(--m-nav-h) + env(safe-area-inset-bottom)); }
}
