:root{--game-ink:#172033;--game-primary:#493be8;--game-primary-hover:#372bc4;--game-line:#dfe5f5;--game-stage:#263a5a}*{box-sizing:border-box}body{margin:0;background:#f6f7fb;color:var(--game-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;line-height:1.7}a{color:#3c32bf}.game-header{background:#07172a;color:#fff}.game-header-inner,.game-main,.game-footer-inner{width:min(100% - 32px,1040px);margin:auto}.game-header-inner{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{color:#fff;font-size:1.2rem;font-weight:800;text-decoration:none}.brand span{color:#a9a2ff}.game-header a:not(.brand){color:#fff}.game-main{padding:32px 0 56px}.hero{padding:24px 0 14px}.hero h1{margin:0;font-size:clamp(2rem,6vw,3rem)}.section{margin-top:28px}.section h2{margin:0 0 12px;font-size:1.3rem}.game-grid,.category-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}.game-card,.empty-state,.category-note,.category-card{margin:0;padding:18px;border:1px solid var(--game-line);border-radius:16px;background:#fff}.game-card{display:flex;flex-direction:column;align-items:stretch;gap:12px}.game-card-content{min-width:0}.game-card h3,.category-card h3{margin:0}.game-card h3{font-size:1.1rem}.game-card h3 a{display:flex;align-items:center;gap:.35em}.game-card-icon{display:inline-grid;flex:0 0 auto;place-items:center;width:1.7em;font-size:1.25em}.game-card-title{min-width:0;word-break:keep-all}.game-card p,.category-card p{margin:6px 0 0;color:#60708a;font-size:.92rem}.category-card span{display:block;margin-top:12px;color:#4438d0;font-size:.9rem;font-weight:700}.favorite-button{align-self:flex-end;width:42px;height:42px;flex:0 0 auto;border:1px solid #c9c5ff;border-radius:12px;background:#fff;color:#4438d0;font-size:1.35rem;cursor:pointer}.game-primary-button,.game-button,#start-button,#retry-button,#start,#retry{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:12px 22px;border:0;border-radius:14px;background:var(--game-primary);color:#fff;font:inherit;font-weight:800;line-height:1.3;cursor:pointer;touch-action:manipulation;transition:background .15s ease,transform .15s ease}.game-primary-button:hover,.game-button:hover,#start-button:hover,#retry-button:hover,#start:hover,#retry:hover{background:var(--game-primary-hover)}.game-primary-button:active,.game-button:active,#start-button:active,#retry-button:active,#start:active,#retry:active{transform:translateY(1px)}.game-primary-button:disabled,.game-button:disabled,#start-button:disabled,#retry-button:disabled,#start:disabled,#retry:disabled{opacity:.5;cursor:not-allowed;transform:none}.game-button.secondary,#retry-button,#retry{background:#fff;color:#302896;border:1px solid #c9c5ff}.reaction-controls{margin-top:18px;display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.favorite-button:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #ffbd59;outline-offset:3px}.result-area{margin-top:18px;padding:20px;border:1px solid var(--game-line);border-radius:16px;background:#fff;text-align:center}.result-area h2,.result-area p{margin:0 0 8px}.result-score{color:#302896;font-size:clamp(2rem,8vw,3.4rem)}.result-best{color:#60708a}.game-copy{margin-top:32px;padding:22px;border:1px solid var(--game-line);border-radius:16px;background:#fff}.game-copy h2{margin-top:0}.game-copy dt{font-weight:800;margin-top:14px}.game-copy dd{margin:4px 0 0}.game-footer{border-top:1px solid var(--game-line);padding:22px 0;color:#60708a;font-size:.9rem}@media(max-width:600px){.game-main{padding-top:20px}.game-header-inner{min-height:58px}.game-primary-button,.game-button,#start-button,#retry-button,#start,#retry{width:100%;min-height:54px}.reaction-controls{display:grid;grid-template-columns:1fr}.game-card-icon{width:1.5em}}
.game-button.secondary,#retry-button,#retry{background:var(--game-primary);color:#fff;border:0}
[hidden]{display:none!important}
#account-name,#account-email{overflow-wrap:anywhere}
.hero h1,.game-copy h2,.result-area,.result-send-status,.result-xp-status{overflow-wrap:anywhere}
.public-username-form{display:grid;gap:8px;margin:18px 0 24px;padding:16px;border:1px solid var(--game-line);border-radius:12px}.public-username-form label{font-weight:800}.public-username-form input{width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--game-line);border-radius:9px;background:#fff;color:#172033;font:inherit}.public-username-form .game-button{justify-self:start;min-height:42px}.public-username-form p{margin:0}.public-username-form [aria-live]{font-weight:700}[data-theme="dark"] .public-username-form input{background:#101827;color:#edf1ff}
.game-card{position:relative;padding-bottom:72px}.favorite-button{position:absolute;right:18px;bottom:18px}.header-actions{display:flex;align-items:center;gap:10px}.language-selector{display:inline-flex;align-items:center;gap:5px;font-size:1.05rem}.language-selector select{max-width:118px;min-height:32px;padding:4px 24px 4px 8px;border:1px solid #a9a2ff;border-radius:8px;background:#fff;color:#172033;font:inherit;font-size:.82rem;cursor:pointer}.game-header .game-top-link{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:4px 12px;border:1px solid #6e62ef;border-radius:8px;background:#493be8;color:#fff;font-size:.9rem;font-weight:800;text-decoration:none}.game-header .game-top-link:hover{background:#372bc4}
.leaderboard{margin-top:24px;padding:20px;border:1px solid var(--game-line);border-radius:16px;background:#fff}.leaderboard h2{margin:0 0 12px}.leaderboard-tabs{display:flex;gap:8px}.leaderboard-tabs button{min-height:40px;padding:8px 14px;border:1px solid #c9c5ff;border-radius:10px;background:#fff;color:#302896;font:inherit;font-weight:700}.leaderboard-tabs button[aria-pressed="true"]{background:var(--game-primary);color:#fff}.leaderboard-status{color:#60708a}.leaderboard-list{margin:12px 0 0;padding:0;list-style:none}.leaderboard-list li{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid var(--game-line)}
.game-header a.game-login-link{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:4px 12px;border:1px solid #c9c5ff;border-radius:8px;background:#fff;color:#302896;font-size:.9rem;font-weight:800;text-decoration:none;white-space:nowrap}.game-header a.game-login-link:hover{background:#eceaff;color:#302896}@media(max-width:420px){.game-header-inner{gap:8px}.brand{font-size:1.05rem}.header-actions{gap:5px;flex:1 1 100%;flex-wrap:wrap;justify-content:center;min-width:0}.language-selector{gap:2px}.language-selector select{max-width:80px;padding-right:18px}.game-header .game-top-link,.game-header .game-login-link{padding:4px 7px;font-size:.82rem;white-space:nowrap}}
.game-header a.game-login-link.is-account-icon{width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;background:#a9a2ff;color:#07172a;font-size:1rem;line-height:1}.game-header a.game-login-link.is-account-icon:hover{background:#c9c5ff;color:#07172a}
.game-countdown-host{position:relative}.game-countdown{position:absolute;z-index:4;inset:0;display:grid;place-items:center;border-radius:inherit;background:rgba(7,23,42,.7);color:#fff;font-size:clamp(4rem,18vw,9rem);font-weight:900;line-height:1;text-shadow:0 3px 0 #302896;animation:game-countdown-pop .7s ease-out both}@keyframes game-countdown-pop{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}#flash-stage{min-height:clamp(180px,24vw,240px);display:grid;place-items:center}.theme-toggle{border:1px solid #a9a2ff;border-radius:10px;background:transparent;color:#fff;padding:7px 10px;font:inherit;cursor:pointer}.game-footer-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}.game-footer-links a{color:inherit}[data-theme="dark"]{--game-ink:#edf1ff;--game-line:#334561;--game-primary:#9b8cff;--game-primary-hover:#b7adff;--game-stage:#17243a}[data-theme="dark"] body{background:#101827;color:var(--game-ink)}[data-theme="dark"] .game-card,[data-theme="dark"] .empty-state,[data-theme="dark"] .category-note,[data-theme="dark"] .category-card,[data-theme="dark"] .result-area,[data-theme="dark"] .game-copy{background:#17243a;color:var(--game-ink)}[data-theme="dark"] .game-footer{background:#101827}
.reaction-panel:focus-visible,.click-panel:focus-visible{outline:3px solid #ffbd59;outline-offset:3px}
.maze-grid:focus-visible{outline:3px solid #ffbd59;outline-offset:3px}
.puzzle-stage[tabindex="0"]:focus-visible{outline:3px solid #ffbd59;outline-offset:3px}
[data-theme="dark"] .game-primary-button,[data-theme="dark"] .game-button,[data-theme="dark"] #start-button,[data-theme="dark"] #retry-button,[data-theme="dark"] #start,[data-theme="dark"] #retry,[data-theme="dark"] .leaderboard-tabs button[aria-pressed="true"]{color:#172033}
[data-theme="dark"] .leaderboard{background:#17243a;color:var(--game-ink)}[data-theme="dark"] .game-card p,[data-theme="dark"] .category-card p,[data-theme="dark"] .result-best,[data-theme="dark"] .leaderboard-status,[data-theme="dark"] .account-play-note{color:#c8d7f0}
[data-theme="dark"] .result-score,[data-theme="dark"] .category-card span,[data-theme="dark"] .game-main nav a,[data-theme="dark"] .game-copy a,[data-theme="dark"] .game-news-card a,[data-theme="dark"] .category-note a,[data-theme="dark"] .empty-state a,[data-theme="dark"] .account-play-list a,[data-theme="dark"] .account-play-list strong{color:#a9a2ff}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}.game-card:hover,.category-card:hover,.game-primary-button:active,.game-button:active,#start-button:active,#retry-button:active,#start:active,#retry:active{transform:none!important}}
