* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(218, 165, 32, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6';
    position: fixed;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    font-size: 15rem;
    font-weight: 900;
    font-family: 'Noto Sans JP', sans-serif;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.08);
    text-stroke: 2px rgba(255, 255, 255, 0.08);
    line-height: 1.5;
    word-spacing: 3rem;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    white-space: pre-wrap;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 12px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.container.home-layout {
    justify-content: center;
}

.container > .screen {
    flex-shrink: 0;
}

/* ===== ステータスバー ===== */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 8px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(218, 165, 32, 0.4);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-rank {
    flex-direction: column;
    gap: 0;
}

.status-label {
    font-size: 0.6rem;
    color: #aaa;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-rank .status-value {
    font-size: 0.75rem;
    color: #ffd700;
    font-weight: 900;
}

.status-icon {
    font-size: 0.9rem;
    font-weight: 900;
    color: #ffd700;
}

.status-points .status-icon {
    background: linear-gradient(135deg, #daa520, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-value {
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
}

.header {
    text-align: center;
    margin-bottom: 8px;
    animation: slideDown 0.6s ease-out;
    display: none;
}

.header.visible {
    display: block;
}

.header h1 {
    font-weight: 900;
    font-size: clamp(1.4rem, 4vw, 2rem);
    background: linear-gradient(135deg, #ffd700 0%, #ffffff 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.header p {
    font-size: 0.85rem;
    color: #e0e0e0;
    font-weight: 500;
}

.screen {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border-radius: 24px;
    padding: 24px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.4),
        0 0 100px rgba(255, 215, 0, 0.2),
        inset 0 -2px 10px rgba(0,0,0,0.05);
    border: 3px solid #daa520;
    position: relative;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.screen-decor-1,
.screen-decor-2 {
    position: absolute;
    top: -14px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
    line-height: 0;
}

.screen-decor-1 {
    left: 20px;
}

.screen-decor-2 {
    right: 20px;
    animation-delay: 1.5s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hidden {
    display: none !important;
}

.center-screen {
    text-align: center;
}

.title {
    font-weight: 900;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #daa520 0%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

.input {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    fontSize: 1.2rem;
    border-radius: 15px;
    border: 3px solid #daa520;
    margin-bottom: 20px;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
    background: linear-gradient(135deg, #daa520 0%, #ffd700 100%);
    color: #000;
    border: none;
    padding: 20px 60px;
    font-size: 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(218, 165, 32, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    background: transparent;
    color: #daa520;
    border: 3px solid #daa520;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.btn-secondary:hover {
    background: rgba(218, 165, 32, 0.1);
    transform: translateY(-2px);
}

.btn-secondary span {
    position: relative;
    z-index: 1;
}

.small-btn {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #daa520 0%, #ffd700 100%);
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    margin: 0 5px;
}

/* ===== ログインボタン ===== */
.btn-google {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
    padding: 14px 32px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-google:hover {
    border-color: #4285F4;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    transform: translateY(-2px);
}

.btn-google svg {
    flex-shrink: 0;
}

/* ===== ログイン画面コンテンツ ===== */
.login-hero {
    margin-bottom: 20px;
}

.login-logo {
    font-weight: 900;
    font-size: clamp(2.5rem, 9vw, 4rem);
    color: #fff;
    text-shadow: 0 0 20px rgba(218, 165, 32, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    line-height: 1.2;
}

.login-tagline {
    font-size: 0.85rem;
    color: #daa520;
    margin-top: 6px;
    letter-spacing: 1px;
    opacity: 0.85;
}

.login-cta {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.login-quiz-examples {
    margin-top: 28px;
    position: relative;
    height: 420px;
    overflow: hidden;
}

.login-quiz-card {
    position: absolute;
    width: 70%;
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(218, 165, 32, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.login-quiz-card.card-1 {
    top: 0;
    left: 0;
    transform: rotate(-4deg);
    z-index: 1;
}

.login-quiz-card.card-2 {
    top: 50px;
    right: 0;
    left: auto;
    transform: rotate(3deg);
    z-index: 2;
}

.login-quiz-card.card-3 {
    top: 120px;
    left: 5%;
    transform: rotate(-2deg);
    z-index: 3;
}

.login-quiz-card.card-4 {
    top: 190px;
    right: 2%;
    left: auto;
    transform: rotate(4deg);
    z-index: 4;
}

.login-quiz-card.card-5 {
    top: 270px;
    left: 8%;
    transform: rotate(-3deg);
    z-index: 5;
}

.login-quiz-card.card-6 {
    top: 340px;
    right: 5%;
    left: auto;
    transform: rotate(2deg);
    z-index: 6;
}

.login-quiz-q {
    font-size: 0.8rem;
    font-weight: 700;
    color: #eee;
    margin-bottom: 8px;
    line-height: 1.4;
}

.login-quiz-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.login-quiz-opts span {
    font-size: 0.6rem;
    color: #bbb;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-site-info {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid rgba(218, 165, 32, 0.2);
}

.login-site-info > p {
    font-size: 0.65rem;
    color: #777;
    line-height: 1.6;
    margin-bottom: 8px;
}

.login-site-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.login-site-links a {
    font-size: 0.65rem;
    color: #999;
    text-decoration: none;
}

.login-site-links a:hover {
    color: #daa520;
}

/* ===== ログアウトボタン ===== */
.btn-logout {
    font-family: 'Noto Sans JP', sans-serif;
    background: transparent;
    border: none;
    color: #999;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px;
    margin-top: 8px;
    text-decoration: underline;
}

.btn-logout:hover {
    color: #daa520;
}

.change-username-btn {
    background: transparent;
    border: none;
    color: #daa520;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Noto Sans JP', sans-serif;
    margin-bottom: 16px;
}

.profile-username-edit {
    margin-bottom: 16px;
}

.profile-username-edit .input {
    margin-bottom: 8px;
}

.profile-username-edit-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* 称号表示 */
.title-display {
    background: linear-gradient(135deg, #fffaf0 0%, #fff8dc 100%);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    border: 4px solid #daa520;
    animation: fadeIn 0.5s ease;
}

.title-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #888;
    margin-bottom: 10px;
    text-align: center;
}

.title-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.title-emoji {
    font-size: 2rem;
}

.title-name {
    font-weight: 900;
    font-size: 1.5rem;
    color: #daa520;
}

.title-comment {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

/* 称号達成バナー */
.achievement-banner {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    border: 6px solid #daa520;
    box-shadow: 0 10px 30px rgba(218, 165, 32, 0.4);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-text {
    font-weight: 900;
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

.title-badge-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.title-emoji-large {
    font-size: 3rem;
    animation: float 2s ease-in-out infinite;
}

.title-name-large {
    font-weight: 900;
    font-size: 2rem;
    color: #000;
}

.title-comment-large {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.8;
    font-weight: bold;
}

.stats-box {
    background: linear-gradient(135deg, #fffaf0 0%, #fff8dc 100%);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    border: 4px solid #daa520;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    flex: 1;
    min-width: 150px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-weight: 900;
    font-size: 2rem;
    color: #daa520;
}

.stat-detail {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.question-counter {
    font-weight: 800;
    font-size: 1rem;
    color: #daa520;
    background: #fffaf0;
    padding: 6px 14px;
    border-radius: 16px;
    border: 2px solid #daa520;
}

.timer {
    font-weight: 900;
    font-size: 1.5rem;
    color: #daa520;
    background: #fff;
    padding: 6px 16px;
    border-radius: 16px;
    border: 3px solid #daa520;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 70px;
    text-align: center;
    animation: pulse 1s ease-in-out infinite;
}

.timer.warning {
    animation: shake 0.5s ease-in-out infinite;
    background: #ffebee;
    color: #c62828;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.score-display {
    font-weight: 800;
    font-size: 1rem;
    color: #000;
    background: #fff;
    padding: 6px 14px;
    border-radius: 16px;
    border: 2px solid #daa520;
}

.question-box {
    background: linear-gradient(135deg, #fffaf0 0%, #fff8dc 100%);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 3px solid #daa520;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.question-text {
    font-size: 1.15rem;
    font-weight: bold;
    color: #333;
    line-height: 1.5;
}

.proposed-by {
    text-align: right;
    font-size: 0.7rem;
    color: #999;
    margin-top: 6px;
}

.options {
    display: grid;
    gap: 8px;
}

.option {
    background: #fff;
    border: 3px solid #ddd;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.3), transparent);
    transition: left 0.5s;
}

.option:hover::before {
    left: 100%;
}

.option:hover {
    border-color: #daa520;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

.option.correct {
    background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
    color: white;
    border-color: #2e7d32;
    animation: correctPulse 0.5s ease;
}

.option.wrong {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: white;
    border-color: #c62828;
    animation: wrongShake 0.5s ease;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

@keyframes correctPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes wrongShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.result-emoji {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.result-score {
    font-weight: 900;
    font-size: 2.5rem;
    color: #daa520;
    margin-bottom: 8px;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1);
}

.result-message {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

.ranking {
    background: #f5f5f5;
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    border: 3px solid #daa520;
}

.ranking-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: #daa520;
    margin-bottom: 6px;
}

.ranking-note {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    background: #fff;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #ddd;
    font-weight: bold;
    font-size: 0.9rem;
}

.ranking-item.first {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #daa520;
}

.ranking-item.second {
    background: linear-gradient(135deg, #c0c0c0 0%, #e0e0e0 100%);
}

.ranking-item.third {
    background: linear-gradient(135deg, #cd7f32 0%, #d4a574 100%);
}

.ranking-item.current {
    border: 3px solid #daa520;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
}

.rank-number {
    font-weight: 900;
    font-size: 1.5rem;
    color: #daa520;
    margin-right: 15px;
}

.rank-username {
    font-size: 1.1rem;
}

.rank-rate {
    font-weight: 900;
    font-size: 1.3rem;
    color: #daa520;
    margin-right: 10px;
}

.rank-detail {
    font-size: 0.9rem;
    color: #888;
}

.no-ranking {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* 〇×演出 */
.answer-effect-correct,
.answer-effect-wrong {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    z-index: 9999;
    pointer-events: none;
    animation: answerEffect 1s ease-out;
}

@keyframes answerEffect {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ホーム画面ロゴ ===== */
.home-logo {
    margin: 12px 0;
    padding: 20px 20px 30px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 20px;
    border: 2px solid #daa520;
    position: relative;
    overflow: hidden;
}

.home-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(218, 165, 32, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.home-logo-text {
    font-weight: 900;
    font-size: clamp(2.8rem, 10vw, 4.5rem);
    background: linear-gradient(135deg, #ffd700 0%, #fff 40%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    line-height: 1.2;
    position: relative;
}

.home-logo-sub {
    font-weight: 900;
    font-size: clamp(2.5rem, 9vw, 4rem);
    background: linear-gradient(135deg, #daa520 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 8px;
    line-height: 1.2;
    position: relative;
}

.home-welcome {
    font-size: 1.1rem;
    color: #888;
    font-weight: 700;
    margin: 12px 0 16px;
}

/* ===== ホーム メインボタン ===== */
.home-main-btn {
    width: 100%;
    max-width: 100%;
    padding: 18px 20px;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* ===== ホーム ナビグリッド ===== */
.home-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 4px;
}

.home-nav-btn {
    font-family: 'Noto Sans JP', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 16px;
    padding: 14px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.home-nav-btn:hover {
    background: #fffaf0;
    border-color: #daa520;
    transform: translateY(-2px);
}

.home-nav-btn:active {
    transform: translateY(0);
}

.home-nav-icon {
    font-size: 2rem;
    line-height: 1;
}

.home-nav-label {
    font-size: 0.55rem;
    font-weight: 700;
    color: #555;
    line-height: 1.3;
}

.home-nav-sub {
    font-size: 0.55rem;
    color: #aaa;
    font-weight: 500;
}

/* 2列グリッド（下段） */
.home-nav-grid-2col {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 8px;
}

/* 無効化ナビボタン */
.home-nav-btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #e8e8e8;
}

.home-nav-btn-disabled:hover {
    transform: none;
    border-color: #ddd;
    background: #e8e8e8;
}

/* SVGアイコン共通 */
.home-nav-icon svg {
    display: block;
    color: #666;
}

.home-nav-btn:hover .home-nav-icon svg {
    color: #daa520;
}

.home-nav-btn-disabled .home-nav-icon svg {
    color: #aaa;
}

.btn-icon {
    vertical-align: middle;
    margin-right: 4px;
}

/* ===== ホーム画面旧スタイル互換 ===== */
.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.home-buttons .btn,
.home-buttons .btn-secondary {
    width: 100%;
    max-width: 320px;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.home-stats .stat-item {
    min-width: auto;
}

.home-stats .stat-value {
    font-size: 1.3rem;
}

/* ログインボーナス通知 */
.login-bonus-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 3px solid #42a5f5;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1565c0;
    animation: fadeIn 0.5s ease, bounce 1s ease;
}

/* ===== ゲームメニュー ===== */
.menu-section {
    background: #fffaf0;
    border: 3px solid #daa520;
    border-radius: 16px;
    padding: 16px;
    margin: 10px 0;
}

.menu-section-title {
    font-weight: 900;
    font-size: 1.3rem;
    color: #daa520;
    margin-bottom: 4px;
}

.menu-description {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.difficulty-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-difficulty {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    padding: 12px;
    border-radius: 12px;
    border: 3px solid;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-difficulty.beginner {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.btn-difficulty.intermediate {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.btn-difficulty.advanced {
    background: #fce4ec;
    border-color: #e91e63;
    color: #c2185b;
}

.btn-difficulty.random {
    background: #e8eaf6;
    border-color: #5c6bc0;
    color: #283593;
}

.btn-difficulty:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* 戻るボタン */
.btn-back {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    padding: 15px;
    margin-top: 20px;
    transition: color 0.3s;
}

.btn-back:hover {
    color: #daa520;
}

/* ===== 絆クイズ級選択 ===== */
.stone-info {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
    font-weight: 700;
}

.bond-grade-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-bond {
    font-family: 'Noto Sans JP', sans-serif;
    background: #fff;
    border: 2px solid #daa520;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-bond:hover {
    background: #fffaf0;
    transform: translateX(5px);
}

.btn-bond.disabled-btn {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.btn-bond.disabled-btn:hover {
    transform: none;
}

.bond-grade-name {
    font-weight: 900;
    font-size: 1.2rem;
    color: #daa520;
    min-width: 40px;
}

.bond-grade-info {
    font-size: 0.8rem;
    color: #666;
    flex: 1;
}

.stone-cost {
    font-weight: 700;
    font-size: 0.9rem;
    color: #42a5f5;
}

/* ===== クイズアクション ===== */
.quiz-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-explanation {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    background: #e8eaf6;
    color: #283593;
    border: 2px solid #5c6bc0;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-explanation:hover {
    background: #c5cae9;
}

.btn-next {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #daa520 0%, #ffd700 100%);
    color: #000;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
}

/* ===== 解説モーダル ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    border: 3px solid #daa520;
    text-align: center;
}

.modal-content h3 {
    font-size: 1.5rem;
    color: #daa520;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ===== 絆クイズ結果 ===== */
.bond-result-grade {
    font-weight: 900;
    font-size: 3rem;
    color: #daa520;
    margin-bottom: 10px;
}

.bond-result-pass {
    font-weight: 900;
    font-size: 2rem;
    color: #4caf50;
    margin-bottom: 15px;
}

.bond-result-fail {
    font-weight: 900;
    font-size: 2rem;
    color: #f44336;
    margin-bottom: 15px;
}

.bond-result-score {
    font-weight: 700;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.bond-result-passline {
    font-size: 1rem;
    color: #888;
    margin-bottom: 25px;
}

/* ===== シェアボタン ===== */
.btn-share {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    background: #000;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px 0;
}

.btn-share:hover {
    background: #333;
    transform: translateY(-2px);
}

/* ===== 結果画面ポイント表示 ===== */
.result-points-display {
    font-weight: 700;
    font-size: 1.3rem;
    color: #daa520;
    margin-bottom: 20px;
}

/* ===== 履歴画面 ===== */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: #daa520;
    transform: translateX(5px);
}

.history-question {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    color: #888;
    align-items: center;
}

.correct-mark {
    color: #4caf50;
    font-weight: 700;
}

.wrong-mark {
    color: #f44336;
    font-weight: 700;
}

.bond-badge {
    background: #daa520;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.no-data {
    text-align: center;
    color: #888;
    padding: 20px;
    list-style: none;
}

/* ===== 履歴詳細 ===== */
.history-detail {
    text-align: left;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
}

.detail-options {
    list-style: none;
    padding: 0;
}

.detail-options li {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 8px;
    background: #f5f5f5;
}

.detail-options li.correct-option {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    font-weight: 700;
}

.detail-options li.wrong-option {
    background: #fce4ec;
    border: 2px solid #f44336;
}

/* ===== プロフィール ===== */
.profile-card {
    background: linear-gradient(135deg, #fffaf0 0%, #fff8dc 100%);
    border: 3px solid #daa520;
    border-radius: 16px;
    padding: 16px;
    margin: 10px 0;
}

.profile-username {
    font-weight: 900;
    font-size: 1.5rem;
    color: #daa520;
    margin-bottom: 4px;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.profile-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    padding: 8px 4px;
}

.profile-stat-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 2px;
}

.profile-stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

/* ===== 遊び方画面 ===== */
.help-section {
    background: #fffaf0;
    border: 2px solid #daa520;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 8px 0;
    text-align: left;
}

.help-section-title {
    font-weight: 900;
    font-size: 1rem;
    color: #daa520;
    margin-bottom: 4px;
}

.help-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}

/* ===== ツール画面 ===== */
.tool-section {
    background: #fffaf0;
    border: 3px solid #daa520;
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.tool-section h3 {
    font-weight: 700;
    font-size: 1.3rem;
    color: #daa520;
    margin-bottom: 10px;
}

.tool-section p {
    color: #666;
    margin-bottom: 15px;
}

.disabled-btn {
    opacity: 0.5;
    cursor: not-allowed !important;
}

/* ===== ランキング拡張 ===== */
.ranking-season-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 10px;
}

.rank-rank {
    font-size: 0.85rem;
    color: #888;
    margin-right: 8px;
}

.rank-points {
    font-weight: 900;
    font-size: 1.3rem;
    color: #daa520;
}

.rank-grade {
    font-size: 0.85rem;
    background: #daa520;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.ranking-history-list {
    list-style: none;
    padding: 0;
}

.ranking-history-item {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.ranking-history-item:hover {
    border-color: #daa520;
    transform: translateX(5px);
}

@media (max-width: 600px) {
    .container {
        padding: 8px;
    }

    .screen {
        padding: 16px;
        border-radius: 20px;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .option {
        padding: 15px;
        font-size: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .result-score {
        font-size: 3rem;
    }

    .answer-effect-correct,
    .answer-effect-wrong {
        font-size: 10rem;
    }

    .btn {
        padding: 15px 40px;
        font-size: 1.2rem;
    }

    .btn-secondary {
        padding: 12px 30px;
        font-size: 1rem;
        width: 90%;
        max-width: 300px;
    }

    .home-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .home-stats .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .difficulty-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .profile-stats {
        grid-template-columns: 1fr 1fr 1fr;
    }

    /* ホーム画面コンパクト調整 */
    .status-bar {
        padding: 8px 14px;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .home-logo {
        margin: 10px 0;
        padding: 20px 16px 12px;
    }

    .home-main-btn {
        padding: 16px 16px;
        font-size: 1.4rem;
    }

    .home-nav-grid {
        gap: 8px;
    }

    .home-nav-btn {
        padding: 12px 4px;
        border-radius: 14px;
    }

    .home-nav-icon {
        font-size: 1.8rem;
    }

    .home-nav-label {
        font-size: 0.7rem;
    }

    /* スクリーン内モバイル調整 */
    .title {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .stats-box {
        padding: 15px;
        margin: 12px 0;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .menu-section {
        padding: 18px;
        margin: 12px 0;
    }

    .menu-section-title {
        font-size: 1.3rem;
    }

    .result-emoji {
        font-size: 3.5rem;
        margin-bottom: 10px;
    }

    .result-message {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .ranking {
        padding: 18px;
        margin: 15px 0;
    }

    .ranking-title {
        font-size: 1.3rem;
    }

    .profile-card {
        padding: 20px;
        margin: 12px 0;
    }

    .profile-username {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .tool-section {
        padding: 18px;
        margin: 12px 0;
    }

    .btn-back {
        padding: 10px;
        margin-top: 10px;
    }
}

/* ===== 💎獲得画面 ===== */
.stone-get-section {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    text-align: left;
}

.stone-get-section-title {
    color: #daa520;
    font-size: 1.2rem;
    margin-bottom: 8px;
    text-align: center;
}

.stone-get-description {
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-align: center;
}

.proposal-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: #eee;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 4px;
}

.form-label .required {
    color: #ff6b6b;
}

.form-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid rgba(218, 165, 32, 0.4);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.form-textarea:focus {
    outline: none;
    border-color: #daa520;
}

.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(218, 165, 32, 0.4);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    border-color: #daa520;
}

.form-select option {
    background: #1a1a2e;
    color: #fff;
}

/* 間違い報告ボタン */
.btn-report {
    background: transparent;
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-report:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
}

/* 報告モーダル */
.report-question-text {
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.modal-buttons .btn {
    flex: 1;
}

.modal-buttons .btn-back {
    flex: 1;
    margin-top: 0;
}

/* 提案成功メッセージ */
.proposal-success {
    text-align: center;
    padding: 20px;
}

.proposal-success-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.proposal-success-text {
    color: #daa520;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.proposal-success-stones {
    color: #4ecdc4;
    font-size: 1.3rem;
    font-weight: bold;
}

/* ホーム画面サブタイトル */
.home-subtitle {
    font-size: 0.85rem;
    color: #daa520;
    margin: -2px 0 8px;
    letter-spacing: 1px;
    opacity: 0.85;
}

/* フッター（免責事項） */
.app-footer {
    margin-top: 24px;
    padding: 16px 12px 12px;
    border-top: 1px solid rgba(218, 165, 32, 0.2);
    text-align: center;
}

.footer-disclaimer {
    font-size: 0.65rem;
    color: #777;
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.65rem;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #daa520;
}
