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

body, html {
    overflow: hidden;
}

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic Pro', 'Public Sans', 'Phudu', Arial, sans-serif;
    background: white;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* 画面管理 */
.screen {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-game-controls {
    display: none!important;
}

.screen.hidden {
    display: none;
}

/* メインコンテナ - フレックスボックスレイアウト */
.figma-container {
    width: 100%;
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ヘッダーエリア */
.header-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* margin-bottom: 22rem; */
}

/* メインロゴ */
.main-logo {
    width: 100%;
    max-width: 500px;
    margin-top: 1rem;
    text-align: center;
}

.logo-img {
    width: 80%;
    height: auto;
    object-fit: contain;
    margin-top: 1.94rem;
}

/* 公開日とサイトリンク */
.release-info {
    text-align: center;
    z-index: 2;
}

.release-date {
    color: #2D7FA4;
    font-size: clamp(14px, 2vw, 18px);
    font-family: 'Public Sans', sans-serif;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.official-site {
    color: #0072AE;
    font-size: clamp(13px, 1.8vw, 16px);
    font-family: 'Phudu', sans-serif;
    font-weight: 600;
    text-decoration: underline;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: color 0.3s;
}

.official-site:hover {
    color: #005580;
}

/* メインコンテンツエリア全体 */
.main-content {
    flex: 1;
}

/* メインタイトル */
.main-title {
    text-align: center;
    color: #EEE9E3;
    font-size: clamp(28px, 5vw, 48px);
    font-family: 'Hiragino Sans', sans-serif;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.2;
    z-index: 1;
    position: absolute;
    top: 0;
}

/* サークルエリア */
/* .circle-area {
    position: relative;
    margin-bottom: 2rem;
    background-image: url("../img/circle.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
*/

.circle-area {
    /* margin-top: -40px; */
    position: relative;
    top: 100px;
    z-index: -1;
}

.circle-img {
    position: absolute;
    top: 50%;
    left: 50%;
    /* padding: 60px; */
    transform: translate(-50%, -50%); 
    width: 50%;
    height: auto;
    z-index: 1000005;
    display: block;
    object-fit: cover; /* 縦横比を維持したまま、短辺を基準にして自動的に拡大・縮小 */
}

.circle-number-img {
    width: 60%; /* "4"の画像のサイズを調整 (例: 親の60%) */
    height: auto; /* アスペクト比を維持 */
    object-fit: contain;
    /* margin-bottom は不要になるはず */
}

.outer-circle {
    width: clamp(200px, 25vw, 438px);
    height: clamp(200px, 25vw, 438px);
    background: #EEE9E3;
    border-radius: 50%;
    border: clamp(6px, 1vw, 10px) solid #2B7EA3;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.inner-circle {
    width: 97%;
    height: 97%;
    border-radius: 50%;
    border: clamp(3px, 0.5vw, 5px) solid #2D80A4;
    display: flex;
    justify-content: center;
    align-items: center;
}

#circle-img {
    z-index: 1000;
}
.circle-logo {
    width: 60%;
    height: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.circle-logo:hover {
    transform: scale(1.05);
}

.number-4 {
    font-size: clamp(60px, 8vw, 120px);
    color: #2D80A4;
    font-weight: bold;
    font-family: 'Phudu', sans-serif;
}

/* PLAYテキスト */
.play-text {
    text-align: center;
    color: white;
    font-size: clamp(40px, 6vw, 78px);
    font-family: 'Phudu', sans-serif;
    font-weight: 700;
    letter-spacing: clamp(3px, 0.5vw, 7px);
    cursor: pointer;
    transition: transform 0.3s;
    margin-bottom: 2rem;
    margin-top: 80px;
}

.play-text:hover {
    transform: scale(1.02);
}

.explanation-text {
    font-size: 32px;
    font-family: Hiragino Kaku Gothic Std;
}

/* ボトムエリア - キャンペーン画像とバナー */
.bottom-area {
    /* display: grid; Gridを使用 */
    /* grid-template-columns: 1fr 1fr; 2つの列を均等幅にする */
    /* gap: 2rem; */
    /* align-items: end; 行内のアイテムを下端に揃える */
    /* margin-top: auto; */
    /* justify-content は grid-template-columns が設定されているため通常不要 */
    /* width: 100%; もデフォルトでブロック要素なので不要な場合が多い */
    z-index: 1;
}

/* 左側のキャンペーン画像 */
.left-campaign {
    position: relative;
    max-width: 400px;
    bottom: 50px;
    /* grid-column: 1;  ← 明示的に1列目と指定することもできる */
}

.campaign-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    position: relative;
    bottom: 20px;
    right: 40px;
}

.campaign-text {
    color: white;
    font-size: clamp(18px, 3vw, 24px);
    font-family: 'Public Sans';
    font-weight: 800;

    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 10px;
}

/* 右側のキャンペーンバナー */
.right-campaign {
    max-width: 400px;
    justify-self: end; /* Gridアイテムなので有効。セル内で右端に寄せる */
    /* grid-column: 2;  ← 明示的に2列目と指定することもできる */
}

.campaign-banner {
    width: 100%;
    height: auto;
    background: rgba(217, 217, 217, 0.9);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 100px;
}

.campaign-banner:hover {
    background: rgba(217, 217, 217, 1);
    transform: translateY(-2px);
}

.banner-text {
    text-align: center;
    color: black;
    font-size: clamp(16px, 2.5vw, 24px);
    font-family: 'Phudu', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* クリック可能要素 */
.clickable {
    cursor: pointer;
    transition: transform 0.3s;
}

.clickable:hover {
    transform: scale(1.02);
}

/* 従来のゲーム画面コンテナ調整 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: url('img/pc-background_01.png') no-repeat center center;
    background-size: cover;
}

/* ボタン */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: clamp(14px, 2vw, 16px);
    cursor: pointer;
    margin: 0.5rem;
    transition: all 0.3s;
    font-weight: bold;
}

.btn.primary {
    background: #0072AE;
    color: white;
}

.btn.primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn.secondary {
    background: #3498db;
    color: white;
}

.btn.secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.overlay {
    position: fixed; /* 画面に固定 */
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(58, 58, 58, 0.46);
    z-index:2; /* 他の要素より手前に表示するため、適切な z-index を設定 */
    transition: opacity 0.3s ease-in-out; /* フェードイン/アウトのアニメーション */
}

.game-start-overlay {
    display: block;
    opacity: 0; /* transitionのために opacity も0にする */
    pointer-events: none; /* クリックイベントを無効にする */
}

.game-start-overlay:not(.hidden) {
    display: none;
    opacity: 1;
}

.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* ゲーム画面 */
.game-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

#game-canvas {
    border: 3px solid #f39c12;
    border-radius: 10px;
    cursor: crosshair;
    background: rgba(255, 255, 255, 0.1);
    max-width: 100%;
    height: auto;
}

.center-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(80px, 10vw, 120px);
    color: #f39c12;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.score-display {
    font-size: clamp(18px, 3vw, 24px);
    color: #f39c12;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 結果画面 */
.result-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
    flex-wrap: wrap;
}

#accuracy-percentage {
    font-size: 64px;
    font-family: Sarpanch;
    font-weight: 700;
}

.score-section {
    flex: 1;
    text-align: left;
    min-width: 250px;
}

.final-score {
    font-size: clamp(48px, 8vw, 64px);
    color: #f39c12;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.score-comment {
    font-size: clamp(18px, 3vw, 24px);
    color: #ecf0f1;
    margin: 1rem 0;
}

.percentile {
    font-size: clamp(14px, 2.5vw, 18px);
    color: #bdc3c7;
}

#result-canvas {
    max-width: 100%;
    height: auto;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* QRコード画面 */
#qr-code-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

#qr-canvas {
    border: 3px solid #f39c12;
    border-radius: 10px;
    background: white;
    padding: 1rem;
    max-width: 100%;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    color: #333;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* 年齢確認モーダル */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.error-message {
    color: #e74c3c;
    background: #fadbd8;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    text-align: center;
}

/* メインコンテンツエリア（ゲーム部分） */
.main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-top: 50px;
}

/* 通常フッター */
.global-footer {
    width: 100%;
    background: rgba(238, 233, 227, 0.95);
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    margin-top: auto;
    position: fixed;
    bottom: 0;
}

.global-footer .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(15px, 3vw, 25px);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.global-footer .footer-link {
    color: #0072AE;
    font-size: clamp(11px, 1.5vw, 13px);
    font-family: 'Hiragino Kaku Gothic Pro', sans-serif;
    font-weight: 300;
    text-decoration: underline;
    transition: color 0.3s;
    text-align: center;
}

.global-footer .footer-link:hover {
    color: #005580;
}

.global-footer .copyright {
    text-align: center;
    color: #0072AE;
    font-size: clamp(10px, 1.2vw, 11px);
    font-family: 'Hiragino Kaku Gothic Pro', sans-serif;
    font-weight: 300;
    margin: 0;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .figma-container {
        padding: 1rem;
    }
    
    .header-area {
        margin-bottom: 1rem;
    }
    
    .main-content-area {
        gap: 1rem;
    }
    
    .bottom-area {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .left-campaign,
    .right-campaign {
        justify-self: center;
        max-width: 300px;
    }
    
    .result-display {
        flex-direction: column;
        text-align: center;
    }
    
    .score-section {
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .global-footer .footer-links {
        /* flex-direction: column; */
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .figma-container {
        padding: 0.5rem;
    }
    
    .bottom-area {
        gap: 0.5rem;
    }
    
    .left-campaign,
    .right-campaign {
        max-width: 250px;
    }
}

/* アニメーション */
.screen {
    animation: fadeIn 0.8s ease-in-out;
    background-image: url("../img/pc-background_01.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 押下効果 */
.btn:active {
    transform: translateY(1px);
}

/* フォーカス効果 */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
}

input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* 無効化された要素のスタイル */
.btn:disabled {
    /* opacity: 0.5; */
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
}

/* 利用規約モーダル専用スタイル */
.terms-modal-content {
    max-width: 800px;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terms-header {
    background: linear-gradient(135deg, #5fa8d3, #2d7fa4);
    padding: 2rem;
    text-align: center;
    color: white;
}

.terms-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.terms-content {
    flex: 1;
    padding: 10px 2rem 2rem 2rem;
    overflow-y: auto;
    max-height: 400px;
    line-height: 1.6;
    background: rgba(234, 234, 234, 0.90);
    border-radius: 5px;
}

.terms-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    text-align: center;
    font-family: "Hiragino Sans";
    color: #0072AE;
    padding: 10px;
}

.terms-content-text {
    background-color: white;
    padding: 0 5px;
    border-radius: 5px;
    overflow-wrap: break-word;
}

.terms-content p {
    margin-bottom: 1rem;
    color: #333;
    font-size: 14px;
}

.terms-footer {
    padding: 1.5rem 2rem;
    background: rgba(234, 234, 234, 0.90);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terms-checkbox input[type="checkbox"] {
    transform: scale(1.2);
}

.terms-checkbox label {
    font-size: 14px;
    cursor: pointer;
    color: #585858;
    font-family: Phudu;
    text-decoration-line: underline;
}

#agree-start-btn {
    padding: 1rem 4rem;
    font-size: 16px;
    font-weight: bold;
    min-width: 200px;
    border-radius: 30px;
    background: #0072AE;
}

#agree-start-btn:hover {
    background: #4a96c7;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .terms-modal-content {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .terms-header {
        padding: 1.5rem;
    }
    
    .terms-logo {
        max-width: 150px;
    }
    
    .terms-content {
        padding: 1.5rem;
        max-height: 300px;
    }
    
    .terms-footer {
        padding: 1rem;
    }
    
    #agree-start-btn {
        padding: 0.75rem 2rem;
        min-width: 180px;
    }
}

/* 結果画面スタイル */
.result-container {
    color: white;
    padding: 20px;
    font-family: 'Phudu', cursive;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.marvel-logo {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.8;
}

.movie-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.movie-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.release-date {
    font-size: 1.5rem;
    opacity: 0.8;
}

.challenge-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 40px;
}

.results-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.score-display {
    flex: 1;
}

.accuracy-result, .percentile-result {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.accuracy-result .label, .percentile-result .label {
    font-size: 16px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.accuracy-result .value, .percentile-result .value {
    font-size: 36px;
    font-weight: bold;
    color: #FFD700;
}

.drawing-result {
    flex: 1;
    text-align: center;
}

#result-canvas {
    border-radius: 50%;
    margin-bottom: 20px;
}

.score-comment {
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
}

.action-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-x-post, .btn-retry, .btn-qr-create {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-x-post {
    background: #1DA1F2;
    color: white;
}

.btn-x-post:hover {
    background: #0d8bd9;
    transform: translateY(-2px);
}

.btn-retry {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-retry:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-qr-create {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

.btn-qr-create:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.x-icon {
    /* font-size: 20px; */
}

.retry-icon {
    /* font-size: 20px; */
}

.x-icon img ,
.retry-icon img {
    max-width: 100%;
}

.qr-icon {
    font-size: 20px;
}

.campaign-banner-bottom {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.banner-text {
    font-size: 16px;
    opacity: 0.8;
}

/* 特別スコア44点用のアニメーション */
@keyframes fantastic-glow {
    from {
        box-shadow: 0 0 20px rgba(156, 39, 176, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(156, 39, 176, 0.8);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .results-area {
        flex-direction: column;
        gap: 30px;
    }
    
    .accuracy-result .value, .percentile-result .value {
        font-size: 28px;
    }
}

/* 年齢確認モーダルのスタイル */
.age-modal-content {
    background: #fff;
    color: #000;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
}

.age-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.age-modal-header h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #FFD700;
}

.challenge-text {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.hashtags {
    font-size: 14px;
    color: #74b9ff;
    margin-bottom: 20px;
}

/* 年齢確認モーダル内のcanvas画像 */
.age-modal-canvas {
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-width: 100%;
    height: auto;
}

.sns-notice {
    text-align: center;
    margin-bottom: 25px;
}

.sns-notice p {
    margin: 8px 0;
    font-size: 16px;
}

.birth-date-inputs {
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.birth-select {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: #E3E3E3;
    color: #333;
    min-width: 80px;
    text-align: center;
    font-weight: bold;
}

.birth-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.5);
}

.post-btn {
    background: #1DA1F2;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.post-btn:hover {
    background: #0d8bd9;
    transform: translateY(-2px);
}

/* #main-game-container {
    left: auto !important;
} */

/* モバイル対応 */
@media (max-width: 768px) {
    /* 結果画面のモバイル対応 */
    .result-container {
        padding: 15px;
    }
    
    .result-header {
        margin-bottom: 20px;
    }
    
    .movie-title {
        font-size: 24px;
    }
    
    .challenge-title {
        font-size: 20px;
        margin-bottom: 30px;
    }
    
    .results-area {
        flex-direction: column;
        gap: 25px;
    }
    
    .accuracy-result .value, .percentile-result .value {
        font-size: 28px;
    }
    
    #result-canvas {
        width: 180px;
        height: 180px;
    }
    
    .score-comment {
        font-size: 20px;
    }
    
    .btn-x-post, .btn-retry, .btn-qr-create {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    /* 年齢確認モーダルのモバイル対応 */
    .age-modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .age-modal-header h3 {
        font-size: 20px;
    }
    
    .challenge-text {
        font-size: 14px;
    }
    
    .input-group {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .birth-select {
        flex: 1;
        min-width: 60px;
        padding: 10px 5px;
        font-size: 14px;
    }
    
    /* メインゲーム画面のモバイル対応 */
    #main-game-container {
        transform: translate(-50%, -50%) scale(0.8);
        left: 50%;
        top: 53%;
    }
    
    #main-game-canvas {
        width: 350px;
        height: 350px;
    }
    
    .center-number {
        font-size: 40px;
    }
    
    #accuracy-display {
        bottom: -100px;
    }
    
    #accuracy-percentage {
        font-size: 28px;
    }
    
    .main-game-controls {
        bottom: -50px;
    }
    
    .main-game-controls button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* より小さな画面用 */
    .result-container {
        padding: 10px;
    }
    
    .accuracy-result, .percentile-result {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .accuracy-result .value, .percentile-result .value {
        font-size: 24px;
    }
    
    #result-canvas {
        width: 150px;
        height: 150px;
    }
    
    .score-comment {
        font-size: 18px;
    }
    
    .age-modal-content {
        padding: 15px;
    }
    
    .birth-select {
        padding: 8px 3px;
        font-size: 12px;
    }
    
    #main-game-container {
        transform: translate(-50%, -50%) scale(0.7);
    }
    
    #main-game-canvas {
        width: 300px;
        height: 300px;
    }
}

/* ランドスケープモード対応 */
@media (max-height: 600px) and (orientation: landscape) {
    .age-modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .result-container {
        padding: 10px;
    }
    
    .results-area {
        flex-direction: row;
        gap: 20px;
    }
    
    #result-canvas {
        width: 120px;
        height: 120px;
    }
}

/* 描画結果プレビューのスタイル */
.drawing-result-preview {
    margin: 20px 0;
    text-align: center;
}

#share-preview-canvas {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

#share-preview-canvas:hover {
    transform: scale(1.05);
}

/* 年齢確認モーダルのスタイル調整 */
.age-modal-content {
    background: #fff;
    color: #000;
    padding: 30px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.age-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.age-modal-header h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #FFD700;
}

.challenge-text {
    font-size: 16px;
    margin: 15px 0;
    line-height: 1.5;
    text-align: left;
}

.hashtags {
    font-size: 14px;
    color: #74b9ff;
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: left;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .drawing-result-preview {
        margin: 15px 0;
    }
    
    #share-preview-canvas {
        width: 100px;
        height: 100px;
    }
    
    .age-modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .age-modal-header h3 {
        font-size: 20px;
    }
    
    .challenge-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #share-preview-canvas {
        width: 80px;
        height: 80px;
    }
    
    .age-modal-content {
        padding: 15px;
    }
}

/* QRコードボタンのスタイル */
.btn-qr {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-qr:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.qr-icon {
    font-size: 20px;
}

/* QRコード画面のスタイル */
.qr-container {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    min-height: 100vh;
    color: white;
    padding: 20px;
    font-family: 'Phudu', cursive;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-header {
    text-align: center;
    margin-bottom: 40px;
}

.qr-header .marvel-logo {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.8;
}

.qr-header .movie-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.qr-header .challenge-title {
    font-size: 20px;
    opacity: 0.9;
}

.qr-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.qr-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #FFD700;
}

.qr-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.qr-code-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

#qr-canvas {
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    max-height: 400px;
    width: 100%;
    height: auto;
}

/* QRリーダー機能のスタイル */
#qr-reader-modal {
    font-family: 'Public Sans', sans-serif;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#qr-reader-modal .qr-reader-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#qr-reader {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    border: 3px solid #2196F3;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#qr-reader-loading {
    color: #666;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

#qr-reader-log {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 150px;
    overflow-y: auto;
    color: #333;
    border: 1px solid #e9ecef;
}

#qr-reader-log::-webkit-scrollbar {
    width: 6px;
}

#qr-reader-log::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#qr-reader-log::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#qr-reader-log::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.qr-reader-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.qr-reader-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 100px;
}

.qr-reader-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#qr-reader-close {
    background: #f44336;
    color: white;
}

#qr-reader-close:hover {
    background: #d32f2f;
}

#qr-reader-toggle {
    background: #FF9800;
    color: white;
}

#qr-reader-toggle:hover {
    background: #f57c00;
}

.qr-manual-input {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.qr-manual-input h4 {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
}

.qr-manual-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
    box-sizing: border-box;
}

.qr-manual-input input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.qr-manual-input button {
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.qr-manual-input button:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

/* QRリーダーのログタイプ別色分け */
.qr-log-info {
    color: #2196F3;
}

.qr-log-success {
    color: #4CAF50;
}

.qr-log-warning {
    color: #FF9800;
}

.qr-log-error {
    color: #f44336;
}

/* QRリーダーレスポンシブ対応 */
@media (max-width: 768px) {
    #qr-reader-modal .qr-reader-container {
        margin: 10px;
        padding: 20px;
        max-width: calc(100vw - 20px);
    }
    
    #qr-reader {
        max-width: 100%;
        min-height: 250px;
    }
    
    .qr-reader-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .qr-reader-buttons button {
        width: 100%;
        max-width: 200px;
    }
    
    #qr-reader-log {
        font-size: 11px;
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    #qr-reader-modal .qr-reader-container {
        padding: 15px;
    }
    
    #qr-reader {
        min-height: 200px;
    }
    
    .qr-manual-input input {
        font-size: 16px; /* iOS zoom prevention */
    }
}

.qr-actions {
    margin-top: 20px;
}

.qr-actions .btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qr-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* QRコード使用方法案内のスタイル */
.qr-instructions {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.qr-instructions h4 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 20px;
}

.qr-instructions ol {
    text-align: left;
    padding-left: 20px;
    line-height: 1.8;
    font-size: 16px;
}

.qr-instructions li {
    margin-bottom: 8px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .action-buttons {
        gap: 15px;
    }
    
    .btn-x-post, .btn-retry, .btn-qr-create {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .qr-container {
        padding: 15px;
    }
    
    .qr-header .movie-title {
        font-size: 24px;
    }
    
    .qr-content h2 {
        font-size: 24px;
    }
    
    .qr-content p {
        font-size: 16px;
    }
    
    .qr-code-display {
        padding: 20px;
    }
    
    #qr-canvas {
        max-width: 350px;
        width: 90%;
        height: auto;
    }
    
    .qr-instructions ol {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-x-post, .btn-retry, .btn-qr-create {
        width: 100%;
        padding: 15px;
    }
    
    .qr-header .movie-title {
        font-size: 20px;
    }
    
    .qr-content h2 {
        font-size: 20px;
    }
    
    .qr-code-display {
        padding: 15px;
    }
}

/* ファンタスティック結果画面 */
.fantastic-result-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

/* ヘッダー */
.fantastic-header {
    text-align: center;
    margin-bottom: 1rem;
}

.marvel-logo {
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-family: 'Public Sans', sans-serif;
}

.header-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.fantastic-header .release-date {
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Public Sans', sans-serif;
}

/* メインタイトル */
.fantastic-title {
    color: white;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Hiragino Sans', sans-serif;
    z-index: 1;
    margin-top: 10%;
}

/* メイン結果エリア */
.fantastic-main-results {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "scores center actions";
    align-items: center;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem 0;
}

/* スコア表示 */
.fantastic-scores {
    grid-area: scores;
    justify-self: start;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
    z-index: 1;
}

.slanted-area-wrapper {
    position: relative;
    /* 親の.main-containerの幅いっぱいに広がる */
    width: 100%;
    /* 斜めに切り取る高さを確保するため、ある程度の高さを持たせる */
    height: 80px; /* 必要に応じて調整 */
    overflow: hidden; /* 子要素がはみ出さないように */
}

.score-item-bottom-bar {
    background-color: #3b82f6; /* 青色のバーの背景 */
    height: 15px; /* バーの高さ */
    width: 120%; /* 斜めにすることで幅が必要になる */
    position: absolute;
    top: 0;
    left: -10%; /* 左にずらすことで、右端が斜めになったときにぴったり合うように調整 */
    transform: skewX(-15deg); /* 右肩上がりに斜めにする */
    transform-origin: top left; /* 左上を基準に回転 */
    border-top: 5px solid #a0a0a0; /* 上部のグレーの線 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 軽い影 */
    z-index: 1; /* 手前に表示 */
}

.striped-background-area {
    position: absolute;
    top: 10px; /* score-item-bottom-barの下から始める */
    left: -10%; /* score-item-bottom-barと合わせて左にずらす */
    width: 120%; /* 幅を広げて斜めになっても途切れないように */
    height: 100%; /* 下まで広がるように */
    background: repeating-linear-gradient(
        45deg,
        #c0c0c0, /* 灰色のストライプ */
        #c0c0c0 10px,
        #d0d0d0 10px,
        #d0d0d0 20px
    );
    transform: skewX(-15deg); /* 右肩上がりに斜めにする */
    transform-origin: top left; /* 左上を基準に回転 */
    z-index: 0; /* score-item-bottom-barの奥に表示 */
}

/* .score-item {
    background: #EEE9E3;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: self-end;
}

.score-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #1A5F7A;
} */

.score-item {
    background: #e0e0e0; /* 薄いグレーの背景色 */
    border-radius: 0;
    padding: 15px 30px; /* 上下左右のパディングを調整 */
    backdrop-filter: none;
    position: relative;
    overflow: visible; /* ::afterで下部に影を出すためvisibleに */
    display: flex;
    align-items: baseline; /* ベースラインで揃える */
    justify-content: space-between; /* ラベルと値を左右に配置 */
    width: fit-content; /* 内容に合わせて幅を調整 */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 濃いめの影 */
    /* border-bottom: 5px solid #a0a0a0; 下部の太い線 */
    /* margin-bottom: -5px; 下のバーと重なるように調整 */
    

    /* box-shadow: inset 0 3px 0 0 #5f9ac7, inset 0 -3px 0 0 #5f9ac7; */

    clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%);

}

/* .score-item::after は、今回は使用しないか、下部のボーダーと影の代わりにするか検討します。
   スクリーンショットでは::afterのような要素ではなく、border-bottomとbox-shadowで
   表現されているように見えます。
   もし下部の青い線を表現するものであれば、このルールは削除し、新しく追加する
   .score-item-bottom-bar で表現します。
*/
.score-item::after {
    /* display: none;  */
    display: block;
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    height: 4px;
    background: #0072ae;
    
}


.score-label {
    font-size: 2.2em; /* スクリーンショットに合わせて調整 */
    color: #4a4a4a; /* 濃いグレー */
    font-weight: bold;
    margin-right: 20px; /* 値との間にスペース */
    white-space: nowrap; /* 改行させない */
    /* text-shadow: 1px 1px 2px rgba(0,0,0,0.1); 軽い文字の影 */
}

.score-value {
    display: flex; /* 数字と単位をflexで横並びにする */
    align-items: baseline; /* ベースラインで揃える */
    color: #4a6a8c; /* スクリーンショットの青みがかったグレー */
    font-family: sans-serif; /* スクリーンショットのフォントに近づけるためSarpanchから変更 */
    font-weight: bold;
    letter-spacing: -1px;
    line-height: 1; /* 行の高さを詰める */
}

.value-number {
    font-size: 5.5em; /* 非常に大きく */
    /* text-shadow: 2px 2px 3px rgba(0,0,0,0.2); 濃い文字の影 */
}

.value-unit {
    font-size: 2.5em; /* パーセント記号のサイズを小さめに */
    margin-left: 5px; /* 数字とパーセントの間のスペース */
    align-self: flex-end; /* パーセント記号を下揃えにする */
    /* text-shadow: 1px 1px 2px rgba(0,0,0,0.1); 軽い文字の影 */
}

/* スクリーンショットの下部の青いバー */
.score-item-bottom-bar {
    background-color: #3b82f6; /* 青色のバーの背景 */
    height: 15px; /* バーの高さ */
    width: calc(100% - 40px); /* .score-itemの幅に合わせる (左右のpadding分を引く) */
    max-width: fit-content; /* .score-itemの最大幅に合わせる */
    align-self: center; /* 中央に配置 */
    position: relative;
    z-index: -1; /* score-itemの下に隠れるように */
    border-top: 5px solid #a0a0a0; /* 上部のグレーの線 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 軽い影 */
}


.score-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.score-label {
    color: #2B7EA3;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0;
    font-family: 'Hiragino Sans', sans-serif;
    /* text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); */
}

.score-value {
    color: #4381A5;
    /* font-size: clamp(36px, 6vw, 56px); */
    font-family: 'Sarpanch', sans-serif;
    font-weight: bold;
    letter-spacing: -1px;
}

/* 中央の楕円形4 */
.fantastic-center {
    grid-area: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fantastic-oval {
    width: 200px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fantastic-number {
    font-size: 72px;
    font-weight: 800;
    color: #2B7EA3;
    font-family: 'Sarpanch', sans-serif;
}

.fantastic-number img {
    /* width: 190px; */
    width: 100px;
    z-index: 2;
}

/* アクションボタン */
.fantastic-actions {
    grid-area: actions;
    justify-self: end;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fantastic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Hiragino Sans', sans-serif;
    min-width: 140px;
}

.fantastic-btn-twitter {
    background: rgba(255, 255, 255, 0.9);
    color: #1DA1F2;
}

.fantastic-btn-twitter:hover {
    /* background: white; */
    transform: translateY(-2px);
}

.fantastic-btn-retry {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.fantastic-btn-retry:hover {
    /* background: rgba(255, 255, 255, 0.2); */
    transform: translateY(-2px);
}

.x-icon {
    /* font-size: 18px; */
    font-weight: bold;
}

.retry-icon {
    /* font-size: 18px; */
    font-weight: bold;
}

/* 下部タイトル */
.fantastic-bottom-title {
    color: white;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    text-align: center;
    margin-top: auto;
    font-family: 'Hiragino Sans', sans-serif;
    z-index: 1;
}

.fantastic-bottom-title-tb {
    display: none;
    z-index: 1;
}

.fantastic-bottom-title-tb img {
    width: 70%;
    max-width: 500px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .fantastic-main-results {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "center"
            "scores"
            "actions";
        gap: 2rem;
        text-align: center;
    }
    
    .fantastic-scores {
        justify-self: center;
        max-width: 100%;
    }
    
    .fantastic-actions {
        justify-self: center;
        flex-direction: row;
        justify-content: center;
    }
    
    .fantastic-oval {
        width: 160px;
        height: 120px;
    }
    
    .value-number {
        font-size: 32px;   
    }

    .value-unit {
        font-size: 32px;
    }

    .fantastic-number {
        font-size: 56px;
    }
    
    .score-content {
        padding: 0.8rem 1rem;
    }
    
    .score-label {
        font-size: 16px;
    }
    
    .score-value {
        font-size: clamp(28px, 5vw, 42px);
    }
}

@media (max-width: 480px) {
    .fantastic-title {
        font-size: 16px;
    }
    .fantastic-result-container {
        padding: 0;
    }
    
    .fantastic-main-results {
        gap: 1.5rem;
    }
    
    .fantastic-actions {
        flex-direction: row;
        align-items: center;
    }
    
    .fantastic-btn {
        min-width: 120px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .score-content {
        padding: 0.6rem 0.8rem;
    }
    
    .score-label {
        font-size: 14px;
    }
} 

@media (max-width: 600px) {
    .main-title {
        font-size: 16px;
    }

    .score-item {
        width: 200px;
        height: 90px;
        display: inline-block;
    }
    .fantastic-scores {
        display: flex;
        justify-content: center; /* 中央寄せにする場合 */
        align-items: center;    /* 垂直方向の中央揃えにする場合 */
        gap: 20px;     
        flex-direction: unset;
                 /* 要素間のスペースを空ける場合 */
      }
    .global-footer {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
        background: #EEE9E3;
        padding: 0.5rem 0 0.2rem 0;
        border-top: 1px solid rgba(0,0,0,0.08);
        position: fixed;
        left: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.03);
        backdrop-filter: blur(4px);
    }

    .slanted-area-wrapper {
        position: relative;
        width: 100%;
        height: 80px;
        overflow: hidden;
    }

    .score-item-bottom-bar {
        /* background-color: #3b82f6; */
        height: 15px;
        width: calc(100% - 40px);
        max-width: fit-content;
        align-self: center;
        position: relative;
        z-index: -1;
        /* border-top: 5px solid #a0a0a0; */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .striped-background-area {
        position: absolute;
        top: 10px;
        left: -10%;
        width: 120%;
        height: 100%;
        background: repeating-linear-gradient(45deg, #c0c0c0, #c0c0c0 10px, #d0d0d0 10px, #d0d0d0 20px);
        transform: skewX(-15deg);
        transform-origin: top left;
        z-index: 0;
    }

    .fantastic-actions {
        display: flex;
    }

    .global-footer .footer-links {
    display: flow;
        text-align: center;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 12px;
        margin-bottom: 0.2rem;
        padding: 0 0.5rem;
        font-size: 12px;
        line-height: 1.5;
    }

    .global-footer .footer-link {
        color: #0072AE;
        font-size: 12px;
        font-family: 'Hiragino Kaku Gothic Pro', sans-serif;
        font-weight: 400;
        text-decoration: underline;
        transition: color 0.3s;
        text-align: center;
        padding: 0 2px;
        white-space: nowrap;
    }

    .global-footer .footer-link:hover {
        color: #005580;
    }

    .global-footer .copyright {
        text-align: center;
        color: #0072AE;
        font-size: 10px;
        font-family: 'Hiragino Kaku Gothic Pro', sans-serif;
        font-weight: 300;
        margin: 0 0 2px 0;
        letter-spacing: 0.2px;
    }
} 


/* レイアウト変更 gn */

.sp-only {
    display: none;
}

.header-official-link {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    max-width: 100%;
    height: 300px;
    z-index: 1000;
    background-color: transparent;
}

.screen {
    /* background-image: url("../img/pc-background_03-linked.jpg"); */
    background-image: url("../img/pc-background_04.jpg");
    background-position: top;
    min-height: auto;
}

.header-area ,
.fantastic-header {
    display: none;
}
.main-title ,
.fantastic-title {
    display: block;
}

/* .main-content-area {
    margin-top: 15%;
} */

.fantastic-result-container {
    justify-content: center;
    padding: 0;
    padding-top: 5%;
}
.fantastic-main-results {
    display: flex;
    justify-content: space-between;
    max-width: none;
}
.fantastic-bottom-title {
    margin-top: 0;
    font-size: 48px;
    width: 30%;
}
.fantastic-bottom-title img {
    max-width: 100%;
}
.fantastic-scores {
    max-width: none;
    /* flex: 1.3; */
    flex: 1;
}

.score-item {
    width: 100%;
    justify-content: center;
    align-items: end;
    text-align: right;
}

.score-label {
    font-size: 36px;
}

.score-label-small {
    font-size: 24px;
}

.value-number {
    font-size: 128px;
}


.slanted-area-wrapper {
    display: none;
}

.fantastic-center {
    position: relative;
    flex: 1;
}
.fantastic-actions {
    flex: 1;
}

.fantastic-btn {
    font-size: 48px;
    margin-right: 14%;
    border-radius: 18px;
}

.fantastic-btn-twitter {
    background: #308CBE;
    border: 3px solid #F0F0F0;
    color: #fff;
}

.x-icon {
    /* font-size: 48px; */
}


.fantastic-btn-retry {
    background: #F0F0F0 ;
    border: 3px solid #308CBE;
    color: #308CBE;
}


.right-campaign {
    position: relative;
    bottom: 100%;
    transform: translateY(-100%);
}
.campaign-img {
    position: static;
}

/* ===============================================
min-height 100vh 解除 
=============================================== */
body, html {
    overflow: auto;
  }
body {
    min-height: auto;
}
.screen {
    min-height: auto;
}
.figma-container {
    /* ここはautoにするとむずい 100vhのままがよいと思う */
    /* min-height: auto; */
}
.global-footer {
    position: static;
}
.main-content-area {
    margin-top: 24%;
}

.right-campaign {
    position: relative;
    bottom: 0;
    transform: none;
    /* max-width: none; */
}
.fantastic-result-container {
    padding-top: 20%;
}

.value-superior-sp {
    display: none;
}


.x-icon ,
.retry-icon {
    display: flex;
    align-items: center;
}

.age-modal-canvas {
    display: none;
}

.bottom-area-tb {
    display: none;
}

.game-explanation-text {
    display: none;
}



/* body.result-screen #result-screen {
    padding-bottom: 10%;
} */

/* 年齢制限で断りモーダル */
.age-restriction-content {
    position: relative;
}
.modal-age-verify-failed-img {
    max-width: 100%;
    width: 100%;
    border-radius: 16px;
    position: relative;
    z-index: 1;
}
.modal-age-verify-failed-retry-btn {
    display: block;
    width: 100%;
    position: absolute;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
}
.modal-age-verify-failed-retry-img {
    
    width: 80%;
}


body.result-screen .fantastic-result-container {
    height: auto;
    min-height: 100vh;
}

body.result-screen .fantastic-title {
    margin-top: 5%;
}

body.result-screen .bottom-area {
    padding-bottom: 3%;
}


/* 
ゲーム画面のみ表示
============================================== */
.bottom-area-footer {
    display: none;
}
body.game-screen .global-footer{
    position: relative;
}
body.game-screen .bottom-area-footer {
    display: block;
    position: absolute;
    bottom: 100%;
    right: 0;
}

body.game-screen .bottom-area {
    display: none;
}

#result-canvas-modal {
    /* display: none; */
}

@media (min-width: 1200px) {
    body.game-screen #main-screen {
        padding-bottom: 10%;
    }
    body.game-screen #main-game-container {
        margin-top: 20%;
    }
    body.game-screen .main-title {

    }
}

@media (max-width: 1300px) {
    .main-content-area {
        margin-top: 34%;
    }
}


@media (min-width: 1400px) {
    body.game-screen #main-screen {
        padding-bottom: 20%;
    }
    body.game-screen #main-game-container {
        margin-top: 40%;
    }
    body.result-screen .fantastic-title {
        /* margin-top: 5%; */
    }
}

@media (max-width: 2000px) {
    .main-content-area {
        margin-top: 29%;
    }
}

@media (max-width: 1600px) {
    .fantastic-main-results {
        gap: 32px;
    }
    .fantastic-scores {
        flex: 1;
    }
    .fantastic-center {
        /* flex: 0 1 auto; */
        flex: 1;
    }
    .score-label {
        font-size: 24px;    
    }
    .value-number {
        font-size: 64px;
    }
    .fantastic-btn {
        font-size: 32px;
    }
    .x-icon ,
    .retry-icon {
        width: 32px;
    }
}
@media (max-width: 1100px) {
    .main-content-area {
        margin-top: 40%;
    }
    .fantastic-main-results {
        gap: 0;
    }
    .score-item {
        padding-left: 0;
    }
    .value-number {
        font-size: 48px;
    }
    .score-label ,
    .score-label-small{
        font-size: 20px;
    }
}

@media (max-width: 1024px) {
    .main-content-area {
        margin-top: 40%;
    }
    /* 
    ファンタスティック結果画面 
    =============================================== */
    .fantastic-main-results {
        gap: 16px;
    }
    .fantastic-btn {
        font-size: 24px;
        margin-right: 8px;
    }
    .x-icon ,
    .retry-icon {
        width: 24px;
    }
    
    .score-label {
        font-size: 18px;
    }
    .score-label-small {
        font-size: 14px;
    }
    .score-item {
        padding-left: 0;
    }
    .value-number {
        font-size: 50px;
    }

}

@media (max-width: 900px) {
    .main-content-area {
        margin-top: 50%;
    }
}

@media (max-width: 768px) {
    .sp-only {
        display: block;
    }
    .header-official-link {
        top: 0;
        height: 18%;
    }
    .screen {
        background-image: url("../img/sp-background_04.jpg");
        background-position: top;
    }
    .main-content-area {
        margin-top: 50%;
    }
    .right-campaign {
        transform: none;
        bottom: 0;
        max-width: none;
    }
    /* 
    ファンタスティック結果画面 
    =============================================== */
    .fantastic-result-container {
        /* justify-content: flex-start;
        flex-direction: column-reverse; */
        justify-content: flex-end;
        flex-direction: column;
        height: auto;
        padding-top: 50%;
    }
    .fantastic-main-results {
        flex-direction: column;
        margin-top: 50%;
    }

    .fantastic-sp-title img {
        max-width: 100%;
    }
    .fantastic-bottom-title {
        display: none;
    }
    
    .fantastic-scores {
        align-items: stretch;
        flex-direction: row;
        gap: 0;
    }
    .fantastic-btn {
        margin-right: 0;
        padding: 10px;
        font-size: 24px;
        border-radius: 8px;
    }

    .fantastic-center {
        position: absolute;
        top: 54%;
        left: 50%;
        transform: translate(-50%, -50%);
        /* border-radius: 50%; */
        flex: auto;
    }
    .score-item {
        clip-path: none;
        height: auto;
        padding: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;

        background: transparent;
        overflow: visible;
        /* z-index: 1; */
        
        background-color: #e0e0e0;

        
    }
    .score-item:first-child {
        align-items: flex-start;
    }
    .score-item:last-child {
        align-items: flex-end;
    }
    .score-item::after {
        display: none;
    }

    .score-item::before {
        content: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: transparent;
        border: 3px solid white; /* 白枠 */
        z-index: 1;
    }
    .score-item:first-child {
        clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%);
    }
    .score-item:last-child {
        clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%);
    }

    .score-item:first-child {
        padding-left: 4%;
    }
    .score-item:last-child {
        padding-right: 4%;
    }
    
    .value-number {
        font-size: 32px;
    }
    .score-label ,
    .score-value {
        /* color: #fff; */
        /* text-shadow: 1px 1px 2px #e3e3e335; */
        z-index: 2;
    }

    .score-label {
        margin-right: 0;
    }
    .score-label ,
    .score-label-small {
        font-size: 18px;
    }
    .score-label-superior {
        font-size: 18px;
        position: absolute;
        bottom: 0;
        left: 0;
        /* transform: translate(-50%, -50%); */
    }
    .fantastic-actions {
        flex-direction: row-reverse;
    }
    
    .bottom-area {
        display: none;
    }

    .score-value {
        position: relative;
    }
    .score-label-superior {
        display: none;
    }
    .value-superior-sp {
        display: block;
        position: absolute;
        font-size: 16px;
        right: calc(100% + 10px);
    }

    .fantastic-actions {
        display: none;
    }

    /* TBのみ表示 */
    .bottom-area-tb {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
        align-items: center;        
    }
    .bottom-area-tb .fantastic-actions {
        display: flex;
        gap: 8px;
    }

    .bottom-area-tb .fantastic-btn {
        min-width: none;
        font-size: 16px;
    }
    .bottom-area-tb .x-icon ,
    .bottom-area-tb .retry-icon {
        width: 24px;
    }
    .fantastic-bottom-title-tb {
        display: block;
    }

    
}

@media (max-width: 480px) {
    .main-content-area {
        margin-top: 45%;
    }
    .fantastic-result-container {
        padding-top: 60%;
    }
    .fantastic-actions {
        display: flex;
        width: 100%;
        gap: 0;
        justify-content: space-around;
    }
    .fantastic-btn {
        width: 48%;
    }
    .bottom-area {
        display: block;
        padding: 8px;
    }
    .bottom-area-tb {
        display: none;
    }
    .fantastic-center {
        top: 44%;
        width: 100%;
    }

    body.result-screen .fantastic-title {
        margin-bottom: 40%;
    }

    .header-official-link {
        height: 21%;
    }
}

/* ===============================================
 年齢確認モーダル
 =============================================== */
#age-verification-modal {
    background-color: #3a3a3a2e;
 }
 .age-modal-content {
    padding: 0;
    /* min-height: 400px; */
}
.age-modal-top {
    /* background-image: url("../img/pc-background_02.jpg");s */
    background-image: url("../img/pc-background_01.png");
    background-position: top;
    background-size: cover;
    background-repeat: no-repeat;
    /* height: 300px; */
    height: 350px;
}
/* iOS Safari対策 */
/* .age-modal-top {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
} */

.age-modal-top-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
}

.age-modal-fantastic-title {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-top: 16px;
    z-index: 2;
}

.age-modal-top-logo {
    text-align: center;
    position: relative;
    z-index: 2;
}
.age-modal-top-logo img {
    width: 30%;
    position: relative;
    top: 10px;
    /* width: 90%; */
}
.age-modal-top-results {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    /* padding-top: 10%; */
    /* padding: 10% 16px 0 16px; */
    padding: 16px;
    position: relative;
}
.age-modal-top-results .fantastic-center {
    width: calc(100% / 3);
}
.age-modal-top-results .fantastic-center img {
    /* width: 90%; */
    width: 50%;
    display: block;
    margin: 0 auto;
}
.age-modal-top .score-item {
    background-color: transparent;
    padding: 0;
    width: fit-content;
    clip-path: none;
    width: calc(100% / 3);
}
.age-modal-top .score-item:last-child {
    align-items: flex-end;
}
.age-modal-top .score-label {
    font-size: 10px;
    margin: 0;
}
.age-modal-top .score-value ,
.age-modal-top .score-label{
    color: #fff;
}
.age-modal-top .value-number {
    font-size: 32px;
}
.age-modal-top .value-unit {
    font-size: 16px;
    align-self: auto;
}

.age-modal-top .fantastic-oval {
    width: 50px;
}
.age-modal-top .circle-img {
    position: relative;
    transform: none;
    aspect-ratio: auto;
    width: 50px;
    top: auto;
    left: auto;
}

.age-modal-top .score-item {
    flex-direction: column;
    align-items: flex-start;
}

.age-modal-top .score-item::after {
    content: none;
    display: none;
}

.age-modal-top .results-comment-area {
    /* transform: translateY(-100%); */
    z-index: 3;
}
.age-modal-top .results-comment-img {
    width: 70%;
    margin: 0 auto;
}
.age-modal-top .results-comment-img img {
    max-width: 100%;
    position: relative;
    z-index: 2;
}

.age-modal-bottom .age-modal-header {
    padding: 16px;
    margin-bottom: 0;
}
.age-modal-bottom .hashtags {
    margin-bottom: 0;
}
.age-modal-bottom .age-modal-bottom-wrapper {
    padding: 16px;
}
.age-modal-bottom .sns-notice {
    border-top: 1px solid #ACACAC;
    margin-top: 16px;
}
.age-modal-bottom-link {
    font-size: 16px;
    margin: 15px 0;
    line-height: 1.5;
    text-align: left;
}
.age-modal-bottom-link a {
    color: rgb(116, 185, 255);
}
.age-modal-bottom-link:active a {
    color: rgb(116, 185, 255);
}
.age-modal-bottom-link:visited a {
    color: rgb(116, 185, 255);
}


@media (max-width: 768px) {
    .age-modal-top-logo img {
        width: 38%;
        position: relative;
        top: 10px;
    }
    .age-modal-top .fantastic-center {
        position: static;
        transform: none;
    }
}

/* モーダル */

/* スマホのみ表示 */
.download-btn-text-note-sp {
    display: none;
}
@media screen and (max-width: 768px) {
    .download-btn-text-step-1 {
        display: none;
    }
    .download-btn-text-step-2 {
        display: none;
    }
    .download-btn-text-note-sp {
        display: block;
        text-align: center;
    }
}


.age-modal-top-copyright p {
    color: #fff;
    font-size: 10px;
}