/* Visible button surfaces and safe interaction space; original artwork and FX remain. */
.home .home-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;align-items:stretch}
.home .home-actions button,.home .topbar nav button,.home .home-footer button{border:1px solid #b9a16a;background:linear-gradient(155deg,#294537,#10231c);border-radius:9px;box-shadow:inset 0 1px 0 #f1dcaa25,0 4px 0 #05110d,0 6px 14px #0005;min-height:44px;padding:10px 16px;color:#f4e4bc;cursor:pointer;transition:background .15s,transform .15s,box-shadow .15s}
.home .home-actions button{display:flex;align-items:center;justify-content:space-between;min-width:0;min-height:54px;font-size:17px;clip-path:none;gap:12px}
.home .home-actions button span{margin-left:0}.home .home-actions .primary{background:linear-gradient(120deg,#eddaa5,#bb9859);color:#13251c;border-color:#f6e2aa}
.home .difficulties button{border:1px solid #a58b575e;border-radius:7px;background:#0a241dcc;clip-path:none}.home .difficulties button.chosen{border-color:#ebce88;background:linear-gradient(145deg,#755c30,#2d3822);box-shadow:inset 0 0 0 1px #ecd29344}
.home button:focus-visible{outline:3px solid #f7e5ae;outline-offset:3px}.home .home-actions button:hover,.home .topbar nav button:hover,.home .home-footer button:hover{background-color:#36533e;filter:brightness(1.15)}.home .home-actions button:active,.home .topbar nav button:active,.home .home-footer button:active{transform:translateY(3px);box-shadow:inset 0 2px 5px #0005}
.home .home-footer{flex-wrap:wrap;gap:12px;padding-bottom:100px}.home .topbar{height:auto;min-height:90px}.home .topbar nav{flex-wrap:wrap;gap:10px;justify-content:flex-end}.home .home-content{margin-top:3vh;margin-bottom:30px}
/* Ambient art must never intercept input. Global shortcuts belong outside play/dialogs. */
.world-art,.ambient-dust,.ornament-border,.battle-vignette,.cinema canvas,.cinema-shade,.sigil,.spell-portrait{pointer-events:none}
body:has(.battle) #cloud-dock,body:has(.battle) #app-game-return,body:has(.battle) #language-switch,
body:has(.modal-backdrop) #cloud-dock,body:has(.modal-backdrop) #app-game-return,body:has(.modal-backdrop) #language-switch,
body:has(#friend-room-root:not([hidden])) #cloud-dock,body:has(#friend-room-root:not([hidden])) #app-game-return,
body.online-open #cloud-dock,body.online-open #app-game-return{display:none!important}
body:has(.modal-backdrop) #fx-root,body:has(dialog[open]) #fx-root{visibility:hidden!important}
#friend-room-root{padding-bottom:78px}.modal-backdrop{z-index:400}.modal-backdrop>.modal{overflow:auto;overscroll-behavior:contain}.action-options{flex-wrap:wrap}.action-options>*{max-width:100%}
@media(orientation:landscape) and (max-height:600px){
 body:has(.home):not(:has(#sequence-hud)) #app{height:100dvh!important;overflow:auto!important}
 body:has(#cloud-dock) .home,.home{height:auto!important;min-height:100dvh!important;overflow:visible!important;padding-bottom:70px}
 .home .topbar{height:auto;min-height:54px}.home .topbar nav button{padding:6px 10px;font-size:12px}
 body:has(#cloud-dock) .home-content,.home-content{height:auto!important;min-height:215px;grid-template-rows:auto minmax(54px,1fr) auto auto!important;padding:8px 6% 16px!important;row-gap:6px}
 .home .home-actions{margin-top:4px!important;gap:8px!important}.home .home-actions button,.home .home-actions button:last-child{grid-column:auto!important;min-height:44px!important;padding:8px 12px;font-size:14px}
 body:has(#cloud-dock) .home-footer,.home .home-footer{position:relative!important;inset:auto!important;height:auto!important;min-height:44px;margin:0;padding:8px 6% 12px!important;flex-wrap:wrap;gap:10px}
 #cloud-state{display:none}.home .home-footer>span{margin-left:auto}
 .battle .hand-zone{overflow-y:auto!important;overscroll-behavior:contain;padding-bottom:14px}.battle .hand{flex:0 0 auto;min-height:100px;height:auto;grid-auto-rows:100px;grid-template-rows:repeat(var(--hand-rows,1),100px)}
 .battle .action-console,.battle .action-options,.battle .hand-heading,.battle .trophy-panel{flex-shrink:0}.battle .action-console{height:auto!important;min-height:60px;overflow:visible!important}.battle .action-options{height:auto!important;flex-wrap:wrap!important}.battle .action-options button{min-height:44px}
 .battle .online-header,.battle .topbar{overflow-x:auto;white-space:nowrap;flex-wrap:nowrap}.battle .online-header button,.battle .topbar nav{flex-shrink:0}.battle .online-message{display:none}
 .battle .battle-meta{overflow-x:auto;flex-wrap:nowrap}.battle .battle-meta>*{flex-shrink:0}
}
@media(max-width:650px) and (orientation:portrait){.home .home-actions{gap:10px}.home .home-actions button{font-size:15px;padding:12px}.home .topbar{padding:16px}.home .topbar nav{gap:8px}.home .topbar nav button{padding:7px 10px;font-size:12px}.home .home-footer{padding-bottom:110px}}
@media(prefers-reduced-motion:reduce){.home button{transition:none!important}}
/* Reserve a bottom utility strip instead of overlapping the header buttons. */
body:has(.home) #language-switch{top:auto!important;bottom:14px!important;right:16px!important}
body:has(.home) #cloud-dock{right:82px!important;bottom:14px!important;max-width:calc(100vw - 230px)}
@media(min-height:601px) and (max-height:850px){.home .home-content{margin-top:12px;margin-bottom:24px}.home h1{font-size:82px}.home .title-rule{margin:12px 0}.home .home-motto{margin:6px 0 12px;font-size:21px}.home .difficulty-label{margin-top:20px}.home .difficulties{margin-top:10px}.home .home-actions{margin-top:16px}.home .home-description{font-size:14px;line-height:1.6}}
.home .home-footer>span{order:2;flex-basis:100%;margin-left:0}
