/* RARE TAP - My Page iOS Style */

/* リセットとベース設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
    background: #f2f2f7;
    color: #000000;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body[data-page="game"] {
    background: #202020;
    color: #ffffff;
}

.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f2f2f7;
}

body[data-page="game"] .container {
    background: transparent;
}

/* ヘッダー（トップページと統一） */
.header {
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    position: sticky;
    border-bottom: 1px solid #e9ecef;
    top: 0;
    z-index: 100;
}

.header-left,
.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-start;
}

.header-actions {
    justify-content: flex-end;
    gap: 0.75rem;
}

.header .logo {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header .logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 0.2rem;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.3rem;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4);
    border-radius: 999px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logged-in .header-auth-buttons {
    display: none;
}

.header-globe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.header-globe:hover .fa-globe {
    transform: scale(1.05);
    color: rgba(255, 255, 255, 0.85);
}

.header-auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    min-width: 86px;
    text-align: center;
}

.header-auth-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.header-auth-btn--primary {
    border-color: #ff9500;
    background: #ff9500;
    color: #0d1b2a;
}

.header-auth-btn--primary:hover {
    background: #ffaf33;
    border-color: #ffaf33;
    color: #0b1623;
}

.notification-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: inherit;
    text-decoration: none;
}

.notification-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-link .fa-bell,
.notification-link .fa-solid.fa-bell {
    font-size: 1.15rem;
    color: #ffffff;
    transition: transform 0.2s ease, color 0.2s ease;
}

.notification-icon-wrapper .fa-bell:not([class*="fa"]) + .notification-fallback,
.notification-icon-wrapper .fa-bell span + .notification-fallback,
.notification-icon-wrapper .fa-bell.fallback-active + .notification-fallback {
    display: inline-flex;
}

.notification-link:hover .fa-bell,
.notification-link:hover .fa-solid.fa-bell {
    color: rgba(255, 255, 255, 0.85);
}

.list-item-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.list-item-toggle .item-actions {
    margin-left: auto;
}

.list-item-toggle .item-icon-square {
    margin-right: 0.75rem;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    display: inline-flex;
    align-items: center;
}

.toggle-input {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.toggle-slider {
    width: 100%;
    height: 100%;
    background: rgba(120, 120, 128, 0.32);
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.12);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.toggle-input:checked + .toggle-slider {
    background: #34C759;
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.settings-action-bar {
    position: sticky;
    bottom: 0;
    background: rgba(242, 242, 247, 0.94);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 20;
}

.settings-status {
    font-size: 0.88rem;
    color: #6e6e73;
}

.settings-status.text-warning {
    color: #ff9f0a;
}

.settings-save-button {
    margin-left: auto;
    background: linear-gradient(135deg, #007aff, #5856d6);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 8px 16px rgba(88, 86, 214, 0.25);
}

.settings-save-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(88, 86, 214, 0.28);
}

.settings-save-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.settings-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%);
    background: rgba(28, 28, 30, 0.95);
    color: #ffffff;
    border-radius: 14px;
    padding: 0.85rem 1.2rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    min-width: 220px;
}

.settings-toast.show {
    display: flex;
}

.settings-toast[data-type="error"] {
    background: rgba(255, 59, 48, 0.95);
}

.settings-toast button {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
}

.settings-loading {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1900;
}

.settings-loading.show {
    display: flex;
}

.settings-loading::after {
    content: '';
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.4);
    border-top-color: #007aff;
    animation: settings-spinner 0.9s linear infinite;
}

@keyframes settings-spinner {
    to {
        transform: rotate(360deg);
    }
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    background: #FF3B30;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
}

.points-display {
    background: #2a2a2a;
    color: #ffffff;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #404040;
}

.points-label {
    display: none;
}

.points-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.language-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 2200;
}

.language-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.language-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    background: rgba(28, 28, 30, 0.96);
    color: #ffffff;
    width: min(360px, 90%);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    padding: 1.75rem 1.5rem;
    z-index: 2250;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.language-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.language-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.language-modal-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.language-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    cursor: pointer;
}

.language-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-modal-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.language-options {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.language-options li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.language-options li:hover,
.language-options li:focus {
    background: rgba(88, 86, 214, 0.3);
    outline: none;
}

.language-options li:focus-visible {
    box-shadow: 0 0 0 2px rgba(88, 86, 214, 0.6);
}

.language-options li.is-active {
    background: rgba(52, 199, 89, 0.2);
    border: 1px solid rgba(52, 199, 89, 0.6);
}

.language-name {
    font-size: 1rem;
    font-weight: 600;
}

.language-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    max-width: 768px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

.notification-detail-page {
    background: #f5f5f7;
}

.notification-detail-page .container {
    background: transparent;
    min-height: 100vh;
}

.notification-detail-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
    width: 100%;
}

.notification-detail-container {
    padding: 0 2rem;
}

.notification-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.notification-detail-hero .breadcrumb {
    margin-bottom: 0;
}

.notification-detail-hero .breadcrumb span[aria-current="page"] {
    font-weight: 600;
    color: #0f172a;
}

.page-intro {
    padding: 0 1rem 1rem 1rem;
}

.page-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breadcrumb {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.85rem;
    color: #6e6e73;
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #007aff;
}

.breadcrumb-separator {
    color: rgba(110, 110, 115, 0.6);
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.35rem;
}

.page-title-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #6e6e73;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.page-title-action:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #007aff;
}

.page-title-action .fa-gear {
    font-size: 1rem;
}

.page-title-action .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-description {
    font-size: 0.95rem;
    color: #6e6e73;
    line-height: 1.6;
    margin: 0;
}

/* リストセクション */
.list-section {
    margin-bottom: 2rem;
}

.section-header {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #6e6e73;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 1rem 0.5rem 1rem;
    margin-top: 1.5rem;
}

.section-header:first-child {
    margin-top: 0;
}

.section-footer {
    font-size: 0.8125rem;
    color: #6e6e73;
    padding: 0.5rem 1rem 0 1rem;
    line-height: 1.4;
}

/* リストカード（iOS風の白い背景カード） */
.list-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* リストアイテム */
.list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    min-height: 44px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.list-item:active {
    background-color: #f2f2f7;
}

.notification-item[onclick] {
    cursor: default;
}

.notification-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.notification-detail {
    background: #ffffff;
    border-radius: 28px;
    padding: 3rem clamp(1.75rem, 3vw, 3.2rem);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.08);
    margin: 0 0 3rem;
    line-height: 1.8;
    position: relative;
    overflow: hidden;
}

.notification-detail__header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.notification-detail__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    width: fit-content;
    letter-spacing: 0.04em;
}

.notification-detail__badge i {
    font-size: 0.95rem;
}

.notification-detail__title {
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 700;
    color: #0b1120;
    margin: 0;
    line-height: 1.3;
}

.notification-detail__meta {
    margin-top: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.15rem;
}

.notification-detail__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    color: #4b5563;
    padding: 0.45rem 0.85rem;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 999px;
}

.notification-detail__meta-item i {
    color: inherit;
}

.notification-detail__meta-label {
    font-weight: 600;
    color: #1f2937;
}

.notification-detail__meta-item time,
.notification-detail__meta-item span:not(.notification-detail__meta-label) {
    font-weight: 500;
    color: #1f2937;
}

.notification-detail__body {
    margin-top: 2.5rem;
    font-size: 1.05rem;
    color: #1f2937;
    white-space: normal;
}

.notification-detail__body p {
    margin-bottom: 1.8rem;
    line-height: 1.9;
}

.notification-detail__body p:last-child {
    margin-bottom: 0;
}

.notification-detail__body strong {
    font-weight: 700;
    color: #111827;
}

.notification-detail__body em {
    font-style: italic;
}

.notification-detail__actions {
    margin-top: 2.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.notification-detail__link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    border-radius: 14px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 18px 32px rgba(79, 70, 229, 0.18);
}

.notification-detail__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(79, 70, 229, 0.28);
}

.notification-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    color: #0f172a;
    text-decoration: none;
    padding: 0.55rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notification-detail__back:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(148, 163, 184, 0.24);
}

@media (max-width: 1024px) {
    .notification-detail-main {
        padding: 2rem 0 3.5rem;
    }

    .notification-detail-container {
        padding: 0 1.75rem;
    }

    .notification-detail {
        padding: 2.5rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .notification-detail-container {
        padding: 0 1.25rem;
    }

    .notification-detail-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .notification-detail__back {
        box-shadow: none;
        border-color: rgba(15, 23, 42, 0.12);
    }

    .notification-detail {
        padding: 2.2rem 1.85rem;
        border-radius: 22px;
    }

    .notification-detail__meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .notification-detail__meta-item {
        width: 100%;
        border-radius: 14px;
    }

    .notification-detail__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .notification-detail-main {
        padding: 1.5rem 0 3rem;
    }

    .notification-detail-container {
        padding: 0 1rem;
    }

    .notification-detail {
        padding: 1.85rem 1.4rem;
        border-radius: 18px;
    }

    .notification-detail__title {
        font-size: 1.65rem;
    }

    .notification-detail__body {
        font-size: 1rem;
    }

    .notification-detail__link {
        width: 100%;
        justify-content: center;
    }
}

.ranking-page {
    background: #f2f2f7;
}

.ranking-page .container {
    background: transparent;
    min-height: 100vh;
}

.ranking-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
    width: 100%;
}

.ranking-last-updated {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #6e6e73;
}

.ranking-section-subtitle {
    font-size: 0.85rem;
    color: #6e6e73;
    margin: 0.25rem 0 0;
}

.ranking-top-card,
.ranking-table-card,
.ranking-self-card,
.ranking-empty-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.ranking-top-card {
    padding: 1.6rem 1.8rem;
}

.ranking-top-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ranking-highlight {
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease;
}

.ranking-highlight:hover {
    transform: translateY(-1px);
}

.ranking-highlight--gold {
    background: rgba(255, 214, 102, 0.18);
    border-color: rgba(255, 214, 102, 0.45);
}

.ranking-highlight--silver {
    background: rgba(178, 190, 195, 0.18);
    border-color: rgba(178, 190, 195, 0.4);
}

.ranking-highlight--bronze {
    background: rgba(205, 132, 96, 0.18);
    border-color: rgba(205, 132, 96, 0.4);
}

.ranking-highlight.is-self {
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 14px 32px rgba(79, 70, 229, 0.18);
}

.ranking-highlight__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    color: #0f172a;
}

.ranking-highlight__rank {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
}

.ranking-highlight__header i {
    color: rgba(255, 184, 0, 0.8);
}

.ranking-highlight__name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.ranking-highlight__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.ranking-highlight__stats dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(15, 23, 42, 0.55);
}

.ranking-highlight__stats dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0b1120;
}

.ranking-highlight__meta {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.ranking-table-card {
    padding: 0;
    overflow: hidden;
}

.ranking-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.ranking-table thead {
    background: rgba(15, 23, 42, 0.04);
}

.ranking-table th,
.ranking-table td {
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 0.95rem;
    color: #0f172a;
}

.ranking-table tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.02);
}

.ranking-table tbody tr.is-self {
    background: rgba(79, 70, 229, 0.1);
    font-weight: 600;
}

.ranking-table tbody tr:not(:last-child) {
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.ranking-table-rank {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.ranking-table-name {
    font-weight: 600;
}

.ranking-self-card {
    padding: 1.6rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
}

.ranking-self-card--outside {
    border-color: rgba(14, 165, 233, 0.35);
}

.ranking-self-content {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex: 1;
}

.ranking-self-message {
    margin: 0 0 0.35rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.ranking-self-meta {
    margin: 0.1rem 0 0;
    font-size: 0.9rem;
    color: #6e6e73;
}

.ranking-self-badge {
    min-width: 54px;
    min-height: 54px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
}

.ranking-self-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ranking-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ranking-cta--primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

.ranking-cta--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(37, 99, 235, 0.3);
}

.ranking-cta--ghost {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(37, 99, 235, 0.35);
    color: #2563eb;
}

.ranking-cta--ghost:hover {
    background: rgba(37, 99, 235, 0.08);
}

.ranking-empty-card {
    padding: 3rem 2.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    text-align: center;
}

.ranking-empty-card i {
    font-size: 2rem;
    color: #94a3b8;
}

.ranking-empty-card p {
    margin: 0;
    font-size: 1rem;
    color: #475569;
}

@media (max-width: 960px) {
    .ranking-top-card,
    .ranking-table-card,
    .ranking-self-card,
    .ranking-empty-card {
        border-radius: 16px;
    }
}

@media (max-width: 900px) {
    .ranking-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .ranking-main {
        padding: 1.5rem 0 3rem;
    }

    .ranking-top-grid {
        grid-template-columns: 1fr;
    }

    .ranking-self-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .ranking-self-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ranking-cta--ghost,
    .ranking-cta--primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .ranking-table thead {
        display: none;
    }

    .ranking-table,
    .ranking-table tbody,
    .ranking-table tr,
    .ranking-table td {
        display: block;
        width: 100%;
    }

    .ranking-table tr {
        margin-bottom: 1rem;
        border-radius: 16px;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.22);
        background: #ffffff;
    }

    .ranking-table td {
        padding: 0.85rem 1rem;
        position: relative;
    }

    .ranking-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.8rem;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 0.2rem;
    }
}

@media (max-width: 520px) {
    .ranking-self-badge {
        min-width: 48px;
        min-height: 48px;
        font-size: 1rem;
    }

    .ranking-highlight__stats {
        grid-template-columns: 1fr;
    }
}

.list-item-border {
    border-top: 0.5px solid #e5e5ea;
}

/* プロフィールアイテム（大きめ） */
.profile-item {
    padding: 1rem;
    min-height: 60px;
}

/* アイコン - 円形（プロフィール用） */
.item-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.85rem;
    flex-shrink: 0;
}

.profile-emoji {
    font-size: 1.65rem;
}

/* アイコン - 角丸四角（設定項目用） */
.item-icon-square {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem;
    flex-shrink: 0;
    font-size: 1.25rem;
}

/* コンテンツエリア */
.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 1rem;
    font-weight: 400;
    color: #000000;
    line-height: 1.4;
}

.item-subtitle {
    font-size: 0.875rem;
    color: #6e6e73;
    margin-top: 0.125rem;
    line-height: 1.3;
}

/* 右側の値 */
.item-value {
    font-size: 1rem;
    color: #6e6e73;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* シェブロン（›） */
.item-chevron {
    font-size: 1.25rem;
    color: #c7c7cc;
    font-weight: 300;
    flex-shrink: 0;
    width: 20px;
    text-align: right;
}

/* ウォレットアドレス */
.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    word-break: break-all;
    line-height: 1.4;
}

/* アイテムアクション */
.item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* コピーボタン */
.copy-btn {
    background: #f2f2f7;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #e5e5ea;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* エラーメッセージ */
.error-message {
    background: #ffffff;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.error-message p {
    color: #ff3b30;
    margin: 0;
    font-size: 0.9375rem;
}

/* 空の履歴 */
.empty-history {
    padding: 2rem;
    text-align: center;
    color: #6e6e73;
}

.empty-history p {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.start-game-btn {
    display: inline-block;
    background: #007AFF;
    color: white;
    text-decoration: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: opacity 0.2s ease;
}

.start-game-btn:hover {
    opacity: 0.8;
}

/* フッター */
.footer {
    background: #ffffff;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: #007AFF;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9375rem;
    transition: opacity 0.2s ease;
}

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

.footer-text {
    color: #6e6e73;
    font-size: 0.8125rem;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 0.5px solid #e5e5ea;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000000;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6e6e73;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #007AFF;
}

.form-group small {
    display: block;
    color: #6e6e73;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

/* ウォレット選択ドロップダウン */
.wallet-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.wallet-select:focus {
    outline: none;
    border-color: #007AFF;
}

.wallet-select option {
    padding: 0.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 0.5px solid #e5e5ea;
}

.btn-cancel, .btn-submit {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-cancel {
    background: #f2f2f7;
    color: #000000;
}

.btn-cancel:hover {
    opacity: 0.8;
}

.btn-submit {
    background: #007AFF;
    color: white;
}

.btn-submit:hover {
    opacity: 0.8;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .header {
    padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo-image {
        height: 42px;
        max-width: 180px;
    }
    
    .user-info {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: auto;
    }
    
    .points-display {
        padding: 0.4rem 0.8rem;
        align-items: center;
        white-space: nowrap;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .section-header {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .section-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    }
    
@media (max-width: 480px) {
    .header {
        padding: 0.8rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo-image {
        height: 36px;
        max-width: 160px;
    }
    
    .points-display {
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .list-item {
        padding: 0.625rem 1rem;
    }
    
    .profile-item {
        padding: 0.875rem 1rem;
    }
    
    .item-icon-circle {
        width: 44px;
        height: 44px;
    }
    
    .profile-emoji {
        font-size: 1.75rem;
    }
    
    .item-icon-square {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
    }
    
    .item-title {
        font-size: 0.9375rem;
    }
    
    .item-subtitle {
        font-size: 0.8125rem;
    }
    
    .item-value {
        font-size: 0.9375rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        gap: 0.5rem;
    }

    .notification-detail {
        padding: 1.35rem 1.2rem;
        border-radius: 16px;
    }

    .notification-detail__title {
        font-size: 1.15rem;
    }
}

/* ============================================
   統計詳細モーダル用スタイル
   ============================================ */

.stats-detail-list {
    max-height: 400px;
    overflow-y: auto;
}

.stats-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 0.5px solid #e5e5ea;
}

.stats-detail-item:last-child {
    border-bottom: none;
}

.stats-detail-info {
    flex: 1;
}

.stats-detail-title {
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 0.25rem;
}

.stats-detail-subtitle {
    font-size: 0.875rem;
    color: #6e6e73;
}

.stats-detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #007AFF;
}

.stats-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
        padding: 1rem;
}

.stats-summary-item {
    background: #f2f2f7;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stats-summary-label {
    font-size: 0.875rem;
    color: #6e6e73;
        margin-bottom: 0.5rem;
    }
    
.stats-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
}

@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: 1fr;
    }
}

.mobile-footer-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    gap: 0.5rem;
    background: rgba(20, 20, 20, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.6rem 0.85rem 0.75rem;
    justify-content: space-between;
    align-items: center;
    z-index: 1200;
    backdrop-filter: blur(18px);
}

.mobile-footer-nav__item {
    flex: 1 1 0;
    display: flex;
        flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.4rem;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-footer-nav__icon {
    font-size: 1.15rem;
    line-height: 1;
}

.mobile-footer-nav__item.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.mobile-footer-nav__item:active {
    transform: translateY(1px);
}

body[data-page="game"] .mobile-footer-nav {
    background: rgba(14, 14, 14, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-page="game"] .mobile-footer-nav__item.is-active {
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 768px) {
    .mobile-footer-nav {
        display: flex;
    }

    .container {
        padding-bottom: 80px;
    }

    .header-auth-buttons {
        gap: 0.45rem;
    }

    .header-auth-btn {
        font-size: 0.78rem;
        padding: 0.26rem 0.6rem;
        min-width: 74px;
    }

    .item-icon-circle {
        width: 44px;
        height: 44px;
        margin-right: 0.75rem;
    }

    .item-icon-square {
        width: 36px;
        height: 36px;
        margin-right: 0.55rem;
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .mobile-footer-nav__icon {
        font-size: 1.05rem;
    }

    .mobile-footer-nav__item {
        font-size: 0.7rem;
    }
}
