:root {
    --primary-bg: #1a0b2e;
    --text-gold: #ffd700;
    --text-white: #e0e0e0;
    --overlay-bg: rgba(26, 11, 46, 0.85);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-white);
    height: 100vh;
    overflow: hidden;
/* スクロールなし */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Chrome, Edge (Chromium系) だけに適用 */
@supports selector(::-webkit-scrollbar) {
  /* 1. スクロールバー全体の幅 */
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  /* 2. 背景（トラック）の部分 */
  ::-webkit-scrollbar-track {
    background: #1e0e33;
    border-radius: 10px;
  }

  /* 3. 動くつまみ（ハンドル）の部分 */
  ::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 10px;
  }

  /* 4. つまみにホバーした時 */
  ::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
}

#bg-grid {
	background-image: url('/assets/images/pc_bg.webp');
	background-size: cover;
	background-position: center top;
	opacity: 1;
}
/* 背景のアニメーション */
.bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
/* 少し小さくして密度を上げる */
    grid-auto-rows: minmax(80px, auto);
    gap: 10px;
    opacity: 0.3;
/* 背景としての主張を少し抑える */
    padding: 0;
    overflow: hidden;
}

/* 画像アイテム */
.bg-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}
.bg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(30%) hue-rotate(240deg) saturate(150%);
    transition: filter 0.5s ease;
}
.bg-item:hover img {
    filter: none;
}
.container-wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
    min-height: 100vh;
    text-align: center;
    overflow: auto;
    height: 100%;
    background: var(--overlay-bg);
    z-index: 10;
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(10px);
}

.site-main-title img {
	max-width: 100%;
}
/* センターのコンテンツ */
.main-content {
    z-index: 10;
    text-align: center;
    background: var(--overlay-bg);
    padding: 60px 80px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 90%;
    position: relative;
}
.main-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    z-index: -1;
    border-radius: 22px;
    animation: border-shine 3s infinite;
}
h1 {
	font-size: 3rem;
	color: var(--text-gold);
	text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
	margin-bottom: 10px;
	letter-spacing: 4px;
}
.subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.8);
}
.status {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 20px;
    display: inline-block;
    border-bottom: 2px solid var(--text-gold);
    padding-bottom: 5px;
}
.message {
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.8;
}

/* 星のエフェクト */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: transparent url('https://cdnjs.cloudflare.com/ajax/libs/twinkling-stars/1.0.0/stars.png') repeat top center;
    z-index: 1;
    opacity: 0.5;
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
@keyframes border-shine {
    0% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.2;
    }
}
.copy {
	width: 100%;
	color: #fff;
	display: block;
	font-size:12px;
}

@media (max-width: 768px) {
body {padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
.container {
	padding-bottom: 10px;
}}
#bg-grid {
	background-image: url('/assets/images/sp_bg.webp');
	background-size: cover;
	background-position: center top;
	opacity: 1;
}
    h1 {
        font-size: 2.5rem;
    }
    .main-content {
        padding: 40px 20px;
    }
    .status {
        font-size: 1.5rem;
    }
    .bg-container {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        grid-auto-rows: minmax(60px, auto);
    }
.container-wrap {
	max-width: 90%;
	height: 80%;
	min-height: initial;
	overflow: auto;
	border-radius: 10px;
	padding-bottom: env(safe-area-inset-bottom);
}
    #quiz-form {
        padding: 0 10px;
    }
}
