html,body,#root{min-height:100%;width:100%}
body{overflow-x:hidden}
.title-screen,.selection-screen,.difficulty-screen,.game-screen{min-height:100svh}
.game-screen{padding:72px 18px 28px;align-items:flex-start;background-attachment:fixed}
.game-board{width:min(96vw,1280px)!important;height:auto!important;min-height:calc(100svh - 100px);max-height:none!important}
.game-grid{overflow:visible!important;min-height:0}
.game-header h1{font-size:clamp(1.75rem,3vw,2.25rem)}
.modal-overlay{position:fixed!important;inset:0!important;padding:16px;overflow-y:auto;align-items:center}
.modal-overlay>div{max-height:calc(100svh - 32px);overflow-y:auto;margin:auto!important}
.channel-button{min-height:64px;line-height:1.35}

@media(max-width:1180px){
  .game-board{width:min(95vw,980px)!important;padding:20px!important}
  .game-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px!important}
  .bank-panel{grid-column:span 4/span 4!important}
  .industries-panel{grid-column:span 8/span 8!important}
  .action-panel{grid-column:1/-1!important;min-height:430px;padding:22px 0 0!important;border-left:0!important;border-top:2px dashed #a08c70;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(280px,.72fr);gap:18px;align-items:stretch!important}
  .action-panel>div:first-child{margin-top:0!important;align-self:center}
  .action-panel>div:last-child{margin-top:0!important;min-height:360px}
}

@media(max-width:780px){
  .game-screen{display:block!important;padding:64px 10px 20px;background-attachment:scroll}
  .game-board{width:100%!important;min-height:0;padding:14px!important;border-width:6px!important}
  .game-header{align-items:flex-start!important;gap:10px;margin-bottom:14px!important;padding-bottom:12px!important}
  .game-header h1{font-size:1.55rem;line-height:1.25;letter-spacing:.05em}
  .game-header p{font-size:.82rem;line-height:1.5}
  .game-header .seal-stamp{font-size:.72rem!important;flex:0 0 auto}
  .game-grid{display:block!important}
  .bank-panel,.industries-panel,.action-panel{width:100%;margin-bottom:14px;padding:14px!important}
  .bank-panel .text-4xl{font-size:2rem}
  .industries-panel .grid-cols-2{grid-template-columns:1fr!important}
  .inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .inventory-grid>div{padding:10px!important;transform:none!important}
  .action-panel{display:flex!important;min-height:0;border-top:2px dashed #a08c70!important}
  .action-panel>div:last-child{min-height:320px;max-height:440px}
  .modal-overlay{padding:8px;align-items:flex-start!important}
  .modal-overlay>div{width:100%!important;max-height:calc(100svh - 16px);padding:18px!important;border-width:3px!important}
  .modal-overlay .grid-cols-2,.modal-overlay .grid-cols-3{grid-template-columns:1fr!important}
  .modal-overlay h2{font-size:1.35rem!important;line-height:1.35}
  .modal-overlay p,.modal-overlay button{font-size:.94rem!important}
  .difficulty-screen,.selection-screen{height:auto!important;padding:76px 18px 34px!important;justify-content:flex-start!important}
  .difficulty-grid{display:grid!important;width:100%;gap:14px!important}
  .difficulty-card{width:100%!important;padding:18px!important}
  .selection-screen .w-64{width:min(100%,260px)!important}
  .title-screen h1{font-size:clamp(3rem,18vw,4.5rem)!important}
  .title-screen .tracking-\[0\.6em\]{letter-spacing:.25em!important}
  .game-return{font-size:12px!important;padding:0 10px!important}
}

@media(max-width:420px){
  .game-screen{padding-left:6px;padding-right:6px}
  .game-board{border-width:4px!important;padding:10px!important}
  .bank-panel,.industries-panel,.action-panel{padding:11px!important}
  .inventory-grid>div{padding:8px 4px!important}
  .inventory-grid .text-2xl{font-size:1.25rem}
}
