@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;800;900&family=Outfit:wght@600;700;800&display=swap');
:root{--ink:#172b46;--muted:#4c5c70;--red:#c93632;--yellow:#ffd454;--line:#d9e0e7;--cream:#f6f8fb;--focus:#135bd2}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:24px}body{margin:0;background:var(--cream);color:var(--ink);font-family:'Noto Sans JP',sans-serif;font-size:1rem;line-height:1.75}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:5px}button:disabled{cursor:default}img{max-width:100%;display:block}h1,h2,h3,p{overflow-wrap:anywhere}button{touch-action:manipulation}.ribbon{background:var(--ink);color:#fff;text-align:center;padding:10px 20px;font-size:0.875rem;font-weight:700}.ribbon span{margin-left:20px;font-weight:400;color:#e2eaf4}
header{max-width:1248px;margin:auto;padding:25px 32px;display:flex;justify-content:space-between;align-items:center;gap:24px}.brand{display:flex;align-items:center;gap:14px;font-size:1.5rem;font-weight:900;line-height:1.4}.brand small{display:block;font:700 0.875rem Outfit,sans-serif;letter-spacing:2px;margin-bottom:5px}.brand-icon{width:50px;height:50px;object-fit:cover;border-radius:12px;box-shadow:0 2px 8px #172b4630}.red{color:var(--red)}nav{display:flex;align-items:center;gap:24px;font-size:1rem;font-weight:700}nav a:hover{color:var(--red)}nav button{padding:9px 17px;background:#fff;border:1px solid #b8c3d0;border-radius:9px;font-size:0.875rem;min-height:44px;color:var(--ink)}main{max-width:1248px;margin:auto;padding:0 32px}
.welcome{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center;padding:22px 0 38px}.eyebrow{font-size:0.875rem;color:#31594d;font-weight:800;display:flex;align-items:center;gap:10px;margin:0 0 14px}.live-dot{display:inline-block;width:9px;height:9px;background:#128057;border-radius:50%;flex-shrink:0}.welcome h1{font-size:clamp(1.875rem,3.1vw,2.6875rem);line-height:1.55;letter-spacing:.01em;margin:0 0 20px;font-weight:900}.welcome h1 span{color:var(--red)}.intro{font-size:1.0625rem;color:var(--muted);line-height:1.9;margin:0}.pills{display:flex;flex-wrap:wrap;gap:9px;margin-top:24px}.pills span{background:#fff;border:1px solid #c9d4df;padding:6px 14px;font-size:0.875rem;font-weight:700;border-radius:6px}.welcome-art{margin:0;position:relative;border-radius:18px;overflow:hidden;box-shadow:0 10px 30px #263d5712}.welcome-art img{width:100%;height:320px;object-fit:cover}.welcome-art figcaption{padding:9px 16px;background:var(--ink);color:#fff;font-size:0.875rem;letter-spacing:.03em}
.floor{margin:0 0 42px}.floor-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0 24px;border-top:2px solid var(--ink)}.floor-label{font:700 0.875rem Outfit,sans-serif;letter-spacing:2px;color:#4c5c70}.floor-heading h2{font-size:1.8125rem;font-weight:900;line-height:1.5;margin:5px 0 0}.floor-count{display:flex;align-items:center;gap:10px;color:#415668;font-size:0.875rem}.machines{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}.machine-wrap{min-width:0;background:white;border:1px solid #ccd6e2;border-radius:15px;overflow:hidden;box-shadow:0 5px 16px #16305209;transition:box-shadow .2s,transform .2s}.machine-wrap:hover{box-shadow:0 10px 28px #16305217;transform:translateY(-3px)}.game-cover{position:relative;background:#182b48;overflow:hidden;aspect-ratio:2/1}.game-cover img{width:100%;height:100%;object-fit:cover;transition:transform .35s}.machine-wrap:hover .game-cover img{transform:scale(1.025)}.cover-tag{position:absolute;top:16px;left:16px;background:#fff;color:var(--ink);font-size:0.875rem;font-weight:800;padding:5px 12px;border-radius:5px;box-shadow:0 2px 8px #14274030}.machine-info{padding:23px 26px 25px}.genre{display:block;font-size:0.875rem;font-weight:700;color:#516079;margin-bottom:4px}.machine-info h3{font-size:1.6875rem;font-weight:900;line-height:1.5;margin:0 0 9px}.machine-info p{font-size:1rem;color:var(--muted);margin:0 0 22px;line-height:1.8}.play-label{display:flex;gap:20px;align-items:center;justify-content:space-between}.machine{border:0;background:var(--red);color:#fff;border-radius:8px;padding:12px 23px;font-size:1rem;font-weight:800;min-height:48px;display:flex;align-items:center;gap:32px}.machine:hover{background:#a92a26}.play-label small{font-size:0.875rem;color:var(--muted)}.play-label b{font-family:Outfit,sans-serif;font-size:1.125rem;color:var(--ink);margin-left:6px}.floor-line{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 0 0;font-size:0.875rem;color:var(--muted)}.floor-line span:first-child,.floor-line span:last-child{font:600 0.875rem Outfit,sans-serif;letter-spacing:1px}
.guide{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:24px;align-items:start;padding:28px 0 34px;border-top:1px solid #c8d3df}.guide-title>span{font-size:0.875rem;color:var(--muted)}.guide h2{font-size:1.4375rem;margin:4px 0;line-height:1.5}.guide p{display:flex;gap:13px;margin:0;font-size:0.875rem;color:var(--muted);line-height:1.8}.guide b{font:700 1.75rem Outfit;color:var(--red)}.guide strong{display:block;font-size:1rem;font-weight:800;color:var(--ink);margin-bottom:5px}footer{max-width:1248px;margin:auto;border-top:1px solid #c8d3df;padding:25px 32px 36px;display:flex;align-items:center;gap:20px;font-size:0.875rem;color:var(--muted);flex-wrap:wrap}.footer-brand{font-size:1.125rem;font-weight:800;color:var(--ink)}footer button{font-size:0.875rem;background:transparent;border:0;color:var(--ink);text-decoration:underline;min-height:44px;margin-left:auto}
/* Shared game and information screens */
dialog{width:min(850px,96vw);max-height:94dvh;border:1px solid #becbda;border-radius:18px;padding:26px;background:#fff;color:var(--ink);overscroll-behavior:contain;box-shadow:0 20px 80px #03112644}dialog::backdrop{background:#07142cd9;backdrop-filter:blur(5px)}.game-top{display:flex;justify-content:space-between;align-items:center;gap:16px}.game-top span{font:700 0.875rem Outfit,sans-serif;letter-spacing:1px;color:var(--muted)}.game-top h2{font-size:1.75rem;line-height:1.5;margin:4px 0 0;font-weight:900}.close{width:2.875rem;height:2.875rem;min-width:2.875rem;border:1px solid #c6d1df;border-radius:50%;background:#f4f7fb;font-size:1.75rem;color:var(--ink);line-height:1}.close:hover{background:#e7edf5}.game-stats{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:19px 0 16px;font-size:0.875rem;font-weight:700}.game-stats b{font:800 1.625rem Outfit;margin-left:8px}.game-stats #status{font-size:0.875rem}.playfield{position:relative;width:100%;min-width:0;background:#101d32;border-radius:12px;overflow:hidden;touch-action:none;aspect-ratio:720/460}#canvas{display:block;width:100%;height:100%;outline-offset:-4px}#overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:25px;text-align:center;background:#0c1a30f2;color:#fff;overflow:auto}#overlay-kicker{font:700 0.875rem Outfit,sans-serif;letter-spacing:2px;color:#ffda75}#overlay h3{font-size:1.75rem;line-height:1.5;margin:14px 0 6px}#instructions{font-size:1rem;line-height:1.8;max-width:480px;margin:8px 0 22px}.start-button{padding:13px 24px;background:#ffd454;color:#172b46;font-weight:900;font-size:1rem;border:0;border-radius:8px;box-shadow:0 4px #b68712;min-height:48px;flex-shrink:0}.start-button:hover{background:#ffe185}.game-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-top:16px}.game-bottom p{font-size:1rem;color:#334760;line-height:1.8;margin:0;flex:1;min-width:180px}.game-bottom button{font-size:0.875rem;padding:10px 12px;border:1px solid #aebccc;border-radius:7px;background:#fff;color:var(--ink);min-height:44px}.game-bottom button:hover{background:#edf2f8}.game-actions{display:flex;gap:8px;flex-wrap:wrap}.save-note{font-size:0.875rem;color:#4c5c70;line-height:1.75;margin:18px 0 0}#memory-board{position:absolute;inset:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:20px}.memory-card{background:#243f60;border:2px solid #9bb3ce;border-radius:9px;color:#ffe082;font:800 1.875rem Outfit;min-height:44px}.memory-card.revealed,.memory-card.matched{background:#fff5db;border-color:#ffce39;color:#24324b}.memory-card.matched{background:#bcebd1;border-color:#47b591}#about-dialog{max-width:680px;font-size:1rem;line-height:1.9}#about-dialog>.close{float:right;margin-left:12px}#about-dialog h2{font-size:1.625rem;line-height:1.5;margin:4px 0 25px}#about-dialog h3{font-size:1.25rem;margin-top:26px}body:has(dialog[open]){overflow:hidden}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
@media(max-width:1000px){.welcome{gap:28px}.welcome-art img{height:300px}.welcome h1{font-size:2rem}.brand{font-size:1.375rem}nav{gap:16px}.guide{grid-template-columns:1fr 1fr;gap:26px}.machine-info{padding:21px}.machine-info h3{font-size:1.5rem}.play-label{gap:10px}.machine{padding:12px 18px;gap:22px}}
@media(max-width:720px){header{padding:20px;align-items:center;gap:12px}.brand{font-size:1.25rem;gap:10px}.brand-icon{width:42px;height:42px}.brand small{font-size:0.875rem;letter-spacing:.5px}nav>a{display:none}nav button{padding:8px 10px;font-size:0.875rem}.ribbon{font-size:0.875rem;padding:8px 14px}.ribbon span{display:none}main{padding:0 20px}.welcome{grid-template-columns:1fr;gap:24px;padding:10px 0 30px}.welcome h1{font-size:2rem;margin-bottom:15px}.intro{font-size:1rem}.pills{margin-top:18px}.welcome-art img{height:auto;aspect-ratio:2/1;object-fit:cover}.welcome-art figcaption{font-size:0.875rem}.floor-heading{padding:20px 0;align-items:flex-start;flex-direction:column;gap:10px}.floor-heading h2{font-size:1.625rem}.floor-label{font-size:0.875rem}.floor-count{font-size:0.875rem}.machines{grid-template-columns:1fr;gap:24px}.machine-info h3{font-size:1.625rem}.machine-info{padding:22px}.machine-info p{font-size:1rem}.play-label{gap:15px}.floor-line{justify-content:center}.floor-line span:first-child,.floor-line span:last-child{display:none}.guide{grid-template-columns:1fr;gap:22px}.guide h2{font-size:1.4375rem}.guide p{font-size:1rem}.guide strong{font-size:1.0625rem}footer{padding:20px;gap:12px;align-items:flex-start;flex-direction:column}footer button{margin:0;padding-left:0}dialog{padding:18px 14px;max-height:96dvh}.game-top h2{font-size:1.5rem}.game-top span{font-size:0.875rem}.game-stats{gap:8px;flex-wrap:wrap}.game-stats b{font-size:1.4375rem;margin-left:4px}.playfield{min-height:310px}#overlay{padding:20px 16px}#overlay h3{font-size:1.5rem}#instructions{font-size:1rem;margin:8px 0 18px}.game-bottom{display:block;margin-top:18px}.game-bottom p{font-size:1rem}.game-actions{margin:14px 0 0;justify-content:flex-end}.save-note{font-size:0.875rem}#memory-board{padding:12px;gap:9px}.memory-card{font-size:1.6875rem}#about-dialog h2{font-size:1.4375rem}}
@media(max-width:380px){header{flex-wrap:wrap}.brand{font-size:1.25rem}.welcome h1{font-size:1.75rem}.machine-info{padding:19px}.machine-info h3{font-size:1.5rem}.play-label{align-items:stretch;flex-direction:column}.play-label .machine{justify-content:space-between}.game-stats #status{order:3;flex-basis:100%;text-align:center}main{padding:0 16px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

@media(min-width:381px) and (max-width:720px){header .brand-icon{display:none}header .brand{white-space:normal}header nav button{white-space:nowrap}}
#overlay{justify-content:safe center}#overlay>*{flex-shrink:0}

header,.play-label{flex-wrap:wrap}.brand{min-width:0}.machine-info h3{word-break:normal}.game-top>div{min-width:0}
