.game-settings-head{position:relative;display:flex;align-items:center;justify-content:center;min-height:52px;margin-bottom:8px}.game-settings-brand{display:flex;align-items:center;justify-content:center;gap:10px}.game-settings-brand img{width:48px;height:48px;object-fit:cover;border-radius:16%;box-shadow:0 2px 6px #0002}.game-settings-brand h1,.game-settings-brand h2{margin:0!important;font-size:clamp(28px,7vw,40px);line-height:1}.game-home-button{position:absolute;top:0;right:0;display:grid;place-items:center;width:38px;height:38px;padding:0;border:2px solid #ffd36c;border-radius:12px;background:#fff7df;color:#4b372d;text-decoration:none;font-size:20px;box-shadow:none}.game-start-button{width:100%;padding:13px 16px;border:0;border-radius:20px;background:#58c76f;color:#fff;font:inherit;font-size:clamp(21px,6vw,28px);font-weight:1000;box-shadow:0 6px 0 #299c43}.game-panel-lead{margin:4px 0 12px;text-align:center;font-weight:800}.quick-start-card .genre-title{margin:4px 0 12px!important;text-align:center!important;font-size:0!important;font-weight:800!important}.quick-start-card .genre-title::after{content:"ジャンルを選んですぐスタートできます。";font-size:14px}.advanced-settings{margin-top:12px;border:3px solid #f0d593!important;border-radius:18px!important;background:#fffaf0!important;overflow:hidden}.advanced-settings summary{padding:11px!important;font-weight:1000!important;cursor:pointer;text-align:center;list-style:none}.advanced-settings summary::-webkit-details-marker{display:none}.advanced-settings summary::after{content:" ▼";font-size:12px}.advanced-settings[open] summary::after{content:" ▲"}.advanced-settings-body{padding:0 14px 14px!important;border-top:2px solid #f4e3b8}.setting-block{padding:10px 14px 14px;border-top:2px solid #f4e3b8}.advanced-settings>.setting-block:first-of-type{border-top:2px solid #f4e3b8}.setting-readout{display:flex;justify-content:space-between;align-items:baseline;font-weight:900}.setting-readout strong{font-size:23px;color:#ef6c00}.setting-block input{width:100%;accent-color:#ff9f1c}.advanced-settings .memory-pair-control{margin-top:0}.game-subhome-button{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border:0;border-radius:14px;background:#71b7ee;color:#fff;font:inherit;font-weight:900;box-shadow:0 4px 0 #3c85bf}.game-subhome-button.full{width:100%;margin-top:12px}

/* In-game settings buttons: stay inside each centered game header instead of hugging the viewport edge. */
#restart,#memorySettingsButton,#settingsButton{position:fixed!important;z-index:40;top:max(10px,env(safe-area-inset-top))!important;width:42px!important;height:42px!important;min-width:42px!important;padding:0!important;margin:0!important;border:2px solid #ffd36c!important;border-radius:13px!important;background:#fff7df!important;color:#4b372d!important;box-shadow:0 3px 0 #e3ae36!important;font-size:0!important;line-height:1!important;display:grid!important;place-items:center!important}
#restart{right:max(24px,calc((100vw - 920px)/2 + 24px))!important}
#memorySettingsButton{right:max(24px,calc((100vw - 860px)/2 + 24px))!important}
#settingsButton{right:max(24px,calc((100vw - 820px)/2 + 24px))!important}
#restart::before,#memorySettingsButton::before,#settingsButton::before{content:"⚙️";font-size:21px;line-height:1}

/* Keep the play headers consistent: centered game identity, progress on the left, settings on the right. */
.memory-top{position:relative!important;justify-content:center!important;padding-right:64px!important;padding-left:64px!important}.memory-status{position:absolute;left:14px;white-space:nowrap}.memory-footer{justify-content:center!important}.sort-top{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;min-height:62px;padding-left:62px!important;padding-right:62px!important}.sort-brand{justify-content:center!important}.sort-status{position:fixed;z-index:10;top:max(20px,calc(env(safe-area-inset-top) + 10px));left:max(20px,calc((100vw - 820px)/2 + 20px));margin:0;padding:7px 10px;border-radius:12px;background:#fff9e8;border:2px solid #ffd36c;line-height:1}.footer{justify-content:center!important}

/* Shared answer / completion feedback used across games. */
.game-feedback{position:fixed;inset:0;z-index:120;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;pointer-events:none;background:radial-gradient(circle,#fffdf7 0,#fff4c5ed 54%,#ffd36ced 100%)}.game-feedback.hidden{display:none!important}.game-feedback-emoji{font-size:clamp(108px,29vw,220px);line-height:1;filter:drop-shadow(0 10px 8px #0002)}.game-feedback-title{margin-top:10px;font-size:clamp(44px,12vw,82px);font-weight:1000;color:#ef7b16;text-shadow:0 4px 0 #fff,0 7px 0 #f6c25c}.game-feedback-subtitle{margin-top:8px;font-size:clamp(21px,5.5vw,34px);font-weight:1000;color:#4b372d}.game-feedback.is-wrong{background:radial-gradient(circle,#fff 0,#fff0e9ee 55%,#ffc5b5ed 100%)}.game-feedback.is-wrong .game-feedback-title{color:#e55f55;text-shadow:0 4px 0 #fff,0 7px 0 #f4b1a7}.game-feedback.play .game-feedback-emoji{animation:game-feedback-pop .55s cubic-bezier(.2,1.5,.4,1) both}.game-feedback.play .game-feedback-title{animation:game-feedback-rise .42s .1s ease-out both}.game-feedback.play .game-feedback-subtitle{animation:game-feedback-rise .4s .16s ease-out both}@keyframes game-feedback-pop{0%{opacity:0;transform:scale(.2) rotate(-8deg)}65%{opacity:1;transform:scale(1.18) rotate(3deg)}100%{opacity:1;transform:scale(1)}}@keyframes game-feedback-rise{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:none}}

@media(max-width:480px){.game-settings-head{min-height:46px}.game-settings-brand img{width:42px;height:42px}.game-home-button{width:34px;height:34px;font-size:18px}.quick-start-card .genre-title::after{font-size:13px}#restart,#memorySettingsButton,#settingsButton{top:max(8px,env(safe-area-inset-top))!important;width:38px!important;height:38px!important;min-width:38px!important}#restart,#memorySettingsButton,#settingsButton{right:20px!important}#restart::before,#memorySettingsButton::before,#settingsButton::before{font-size:19px}.memory-top{padding-left:58px!important;padding-right:58px!important}.memory-status{left:10px;font-size:12px}.sort-top{min-height:56px;padding-left:54px!important;padding-right:54px!important}.sort-status{top:max(17px,calc(env(safe-area-inset-top) + 8px));left:10px;padding:6px 8px;font-size:12px}}