/* HOME presentation follows DHP/game; analysis screens keep their existing layout. */
.analysis-brand{display:flex;align-items:center;gap:inherit}
.home-brand{display:none}
body:has(#homePage:not([hidden])){height:100svh;min-height:100svh;padding:clamp(20px,4vw,64px);background:#e5e7e9;color:#25282c;font-family:Arial,Helvetica,Meiryo,sans-serif}
body:has(#homePage:not([hidden])) .app-header{height:auto;min-height:0;padding:0 0 22px;gap:12px;border-bottom:1px solid #bfc4ca;background:transparent}
body:has(#homePage:not([hidden])) .brand{padding:0;color:#25282c;font:inherit}
body:has(#homePage:not([hidden])) .analysis-brand{display:none}
body:has(#homePage:not([hidden])) .home-brand{display:flex;align-items:center;gap:12px;font-size:19px;font-weight:800;letter-spacing:.2em}
.home-brand img{width:28px;height:28px;object-fit:contain}
body:has(#homePage:not([hidden])) .test-label{display:none}
#homePage{display:flex;flex-direction:column;flex:1;min-height:0;max-width:none;margin:0;padding:30px 10px 0;overflow:visible}
.home-menu{width:100%;max-width:1060px;margin:auto}
#homePage h1{text-align:center;font-size:clamp(22px,2.5vw,32px);font-weight:700;letter-spacing:.07em;margin:0 0 30px}
#homePage .mode-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
#homePage .mode-card{--accent:#424a53;min-width:0;min-height:218px;padding:18px;background:#f5f6f7;border:1px solid #bcc2c8;border-radius:0;box-shadow:none;color:inherit;transition:background .18s,border-color .18s}
#homePage .mode-card:hover{background:#fff;border-color:var(--accent)}
#homePage .mode-card:active{background:#dce0e4}
#homePage .mode-card:focus-visible{outline:3px solid var(--accent);outline-offset:5px}
#homePage .card-number{font-family:"Courier New",monospace;font-size:10px;letter-spacing:.12em;color:#69717a}
.home-icon,.home-arrow{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.home-icon{width:48px;height:48px;margin:22px 0 20px;color:#b44b48}
[data-mode=two] .home-icon{color:#3977b4}
[data-mode=motion] .home-icon{color:#96744d}
#homePage .mode-card h2{margin:auto 0 8px;font-size:clamp(15px,1.6vw,20px);font-weight:700;letter-spacing:.025em}
#homePage .card-bottom{width:100%;margin-top:0;padding-top:12px;border-top:1px solid #d5d9de;color:#424a53}
.home-arrow{width:22px;height:22px}
.home-footer{display:flex;flex:none;justify-content:space-between;gap:12px;border-top:1px solid #bfc4ca;padding-top:18px;margin-top:30px;color:#69717a;font:9px "Courier New",monospace;letter-spacing:.15em}
@media(max-width:700px){
 body:has(#homePage:not([hidden])){padding:16px}
 body:has(#homePage:not([hidden])) .app-header{padding-bottom:16px}
 #homePage{padding:12px 8px 0}
 #homePage h1{margin-bottom:16px}
 #homePage .mode-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 #homePage .mode-card{min-height:clamp(94px,18dvh,132px);padding:10px}
 .home-icon{width:26px;height:26px;margin:7px 0}
 #homePage .mode-card h2{font-size:14px;margin-bottom:5px}
}
@media(max-width:420px){body:has(#homePage:not([hidden])) .home-brand{gap:7px;font-size:15px;letter-spacing:.12em}}
@media(max-height:650px){
 body:has(#homePage:not([hidden])){padding-top:16px;padding-bottom:14px}
 body:has(#homePage:not([hidden])) .app-header{padding-bottom:12px}
 #homePage{padding:14px 10px 0}
 #homePage .mode-card{min-height:140px;padding:12px 16px}
 .home-icon{width:34px;height:34px;margin:9px 0}
 .home-footer{padding-top:10px;margin-top:14px}
}
@media(max-height:440px) and (min-width:550px){
 #homePage .mode-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 #homePage h1{font-size:20px;margin-bottom:12px}
 #homePage .mode-card h2{font-size:17px}
}
@media(prefers-reduced-motion:reduce){#homePage .mode-card{transition:none}}

/* Feature descriptions remain inside each existing mode button. */
#homePage h1{margin-bottom:8px}
.home-subtitle{text-align:center;margin:0 0 30px;color:#69717a;font:10px "Courier New",monospace;letter-spacing:.24em}
#homePage .mode-card{position:relative;min-height:340px}
#homePage .mode-card h2{margin:0 0 12px}
.card-features{display:block;margin:0 0 18px;padding-left:1.2em;font-size:12px;line-height:1.7;color:#59616a}
.card-features [role=listitem]{display:list-item;list-style-type:disc;margin:0 0 4px}
#homePage .card-bottom{margin-top:auto}
@media(max-width:700px){
 .home-subtitle{margin-bottom:20px}
 #homePage .mode-card{min-height:0}
 #homePage .mode-card h2{margin-bottom:10px}
 .card-features{font-size:11px;line-height:1.6;margin-bottom:12px}
 .card-features [role=listitem]{margin-bottom:3px}
}
@media(max-height:650px){
 .home-subtitle{margin-bottom:16px}
 #homePage .mode-card{min-height:0}
}
@media(max-height:440px) and (min-width:550px){
 #homePage h1{margin-bottom:6px}
 .home-subtitle{font-size:9px;margin-bottom:14px}
 #homePage .home-icon{position:absolute;top:10px;right:12px;width:24px;height:24px;margin:0}
 #homePage .mode-card h2{margin:12px 0 8px}
 .card-features{font-size:11px;line-height:1.5;margin-bottom:10px}
 .card-features [role=listitem]{margin-bottom:3px}
 #homePage .card-bottom{padding-top:8px}
 .home-arrow{width:18px;height:18px}
}

/* Keep all three choices and descriptions visible in a short phone viewport. */
@media(orientation:landscape) and (max-height:550px){
 body:has(#homePage:not([hidden])){height:100dvh;min-height:100dvh;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))}
 body:has(#homePage:not([hidden])) .app-header{padding-bottom:6px}
 #homePage{padding:6px 0 0}
 #homePage h1{font-size:20px;line-height:1.2;margin:0 0 3px}
 #homePage .home-subtitle{font-size:9px;line-height:1.2;margin-bottom:8px}
 #homePage .mode-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 #homePage .mode-card{min-height:0;padding:9px 10px}
 #homePage .home-icon{position:absolute;top:7px;right:9px;width:22px;height:22px;margin:0}
 #homePage .mode-card h2{font-size:16px;line-height:1.2;margin:7px 0}
 #homePage .card-features{font-size:11px;line-height:1.4;margin-bottom:7px}
 #homePage .card-features [role=listitem]{margin-bottom:2px}
 #homePage .card-bottom{padding-top:5px}
 #homePage .home-arrow{width:16px;height:16px}
 #homePage .home-footer{padding-top:6px;margin-top:8px;font-size:8px;line-height:1.2}
}
