.gate-page { max-width: 1370px; padding-bottom: 22px; }
.gate-intro { display: flex; justify-content: space-between; gap: 28px; padding: 35px 0 32px; align-items: flex-end; }
.back-link { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.gate-intro h1 { font-size: clamp(40px, 4.5vw, 62px); font-weight: 550; line-height: 1.35; margin: 8px 0 10px; letter-spacing: -.055em; }
.heading-dot { color: var(--accent); }
.gate-intro h1 > span:last-child { color: var(--warm); font-size: .42em; margin-left: 20px; letter-spacing: -.03em; }
.gate-lead { color: var(--muted); font-size: 14px; line-height: 1.9; }
.demo-stamp { padding: 15px 0 10px 23px; border-left: 1px solid var(--line); min-width: 228px; }
.demo-stamp > span { color: var(--muted-low); font: 10px/1.8 var(--mono); display: block; }
.demo-stamp strong { display: block; color: var(--accent); font-size: 23px; line-height: 1.5; font-weight: 400; margin: 10px 0; }
.gate-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; border: 1px solid #c5f2d523; border-radius: 18px; background: linear-gradient(130deg, #15241e88, #11171c 55%); overflow: hidden; }
.playing-column { min-width: 0; padding: 26px clamp(22px, 5vw, 68px) 24px; }
.run-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.run-head .eyebrow { font-size: 9px; }
.run-head h2 { font-size: 20px; font-weight: 500; margin-top: 4px; }
.small-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 12px; min-height: 42px; border: 1px solid #ffffff24; background: #152023; color: var(--text); border-radius: 7px; font-size: 12px; }
.small-button:hover:not(:disabled) { color: var(--accent); border-color: #c5f2d566; }
button:disabled { cursor: default; opacity: .45; }
.hud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.hud > div { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #0e171bbb; }
.hud > div > span { display: block; color: var(--muted); font-size: 10px; }
.hud strong { display: block; font: 500 21px/1.5 var(--font); color: var(--accent); }
.hud strong span { font-size: 12px; font-weight: 400; color: var(--muted); }
.hud strong { overflow-wrap: anywhere; }
.hud > div.is-hit { border-color: #efa58e; background: #512e2d; }
.hud > div.is-hit strong { color: #efa58e; }
.squad-render-note { margin: -5px 0 12px; color: var(--muted-low); font-size: 10px; }
.scene { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid #ffffff23; border-radius: 12px; background: #172b2d; max-width: 570px; margin-inline: auto; }
#game { display: block; width: 100%; height: 100%; touch-action: none; outline-offset: -5px; }
.run-overlay { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; padding: 30px 22px 45px; background: linear-gradient(transparent 12%, #0b14191a 52%, #0b1419ec); pointer-events: none; }
.overlay-card { width: 100%; max-width: 400px; text-align: center; padding: 26px 16px 20px; border: 1px solid #c5f2d533; border-radius: 12px; background: #11201fed; box-shadow: 0 12px 45px #0003; pointer-events: auto; }
.overlay-card .eyebrow { justify-content: center; color: var(--accent); font-size: 9px; letter-spacing: .08em; }
.overlay-card h2 { font-size: clamp(24px, 3vw, 31px); font-weight: 500; margin-top: 11px; }
.overlay-card p:not(.eyebrow) { font-size: 13px; color: var(--muted); margin: 11px 0 20px; line-height: 1.9; }
.overlay-card .button { min-width: 155px; }
.progress-track { height: 3px; background: #ffffff12; margin-top: 17px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .15s linear; }
.run-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 9px 0 14px; color: var(--muted-low); font-size: 11px; }
.run-footer .mono { font-size: 10px; }
.run-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.run-controls .small-button { padding-inline: 4px; touch-action: none; }
.gate-sidebar { border-left: 1px solid var(--line); padding: 28px; }
.aside-heading { display: flex; align-items: center; justify-content: space-between; color: var(--accent); }
.aside-heading > span:last-child { font-size: 24px; }
.gate-sidebar > h2 { font-size: 34px; font-weight: 500; line-height: 1.45; margin: 19px 0 15px; letter-spacing: -.04em; }
.gate-sidebar > h2 span { color: var(--accent); }
.gate-sidebar > p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.route-picker { padding: 24px 0; border-block: 1px solid var(--line); margin-top: 25px; }
.route-picker label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 9px; }
select, input[type=text] { background: #111c20; color: var(--text); padding: 10px 12px; border: 1px solid #ffffff26; border-radius: 7px; font: 13px var(--font); min-height: 44px; width: 100%; }
.route-picker p { font-size: 11px; color: var(--muted-low); margin-top: 9px; }
.play-guide { margin: 24px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 23px; }
.play-guide li { display: flex; gap: 12px; }
.play-guide li > span { font: 12px var(--mono); color: var(--warm); padding-top: 4px; }
.play-guide strong { font-size: 13px; font-weight: 500; }
.play-guide p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 5px; }
.record-panel { padding: 19px 0; border-block: 1px solid var(--line); }
.record-panel > span { font-size: 12px; color: var(--muted); }
.record-panel strong { display: block; font: 35px/1.6 var(--mono); color: var(--accent); }
.record-panel p { font-size: 11px; color: var(--muted-low); }
.workshop-button { width: 100%; margin: 24px 0 13px; }
.gate-sidebar .local-note { font-size: 11px; color: var(--muted-low); }
.demo-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 25px 0 0; color: var(--muted-low); font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
dialog { width: min(1050px, calc(100% - 36px)); max-height: calc(100dvh - 40px); padding: 28px; color: var(--text); background: #111b20; border: 1px solid #c5f2d547; border-radius: 16px; box-shadow: 0 25px 100px #0007; overflow-y: auto; }
dialog::backdrop { background: #050c11c9; backdrop-filter: blur(5px); }
.workshop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.workshop-head h2 { font-size: 29px; font-weight: 500; margin-top: 4px; }
.workshop-head h2 span { font-size: 13px; color: var(--muted); }
.workshop-lead { margin: 16px 0 22px; color: var(--muted); font-size: 13px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.workshop-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: 26px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.slot-button { padding: 11px 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: #0c171b; color: var(--muted); min-width: 0; }
.slot-button[aria-pressed=true] { border-color: #c5f2d58c; background: #21382d; color: var(--accent); }
.slot-button img { width: 74px; height: 82px; object-fit: contain; margin: 0 auto 7px; }
.slot-button > span { display: block; font-size: 11px; }
.slot-button small { display: block; font-size: 9px; color: var(--muted-low); margin-top: 2px; }
.slot-button.has-custom small { color: var(--warm); }
.pack-summary { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; color: var(--muted-low); font-size: 11px; }
.asset-editor { padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: #0d171b; }
.asset-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.asset-heading h3 { font-size: 16px; font-weight: 500; }
.asset-heading > span { color: var(--warm); font-size: 10px; }
.asset-preview { display: grid; place-items: center; height: 162px; margin-top: 15px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background-color: #1b292c; background-image: linear-gradient(45deg, #ffffff06 25%, transparent 25%), linear-gradient(-45deg, #ffffff06 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ffffff06 75%), linear-gradient(-45deg, transparent 75%, #ffffff06 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
.asset-preview img { max-width: 150px; max-height: 143px; object-fit: contain; transition: transform .1s; }
.asset-hint { color: var(--muted); font-size: 11px; margin: 10px 0 14px; }
.asset-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.asset-actions .button { gap: 12px; padding: 9px 14px; }
.file-help { color: var(--muted-low); font-size: 10px; margin-top: 10px; }
.image-adjustments { padding-top: 19px; }
.image-adjustments label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.image-adjustments output { color: var(--accent); font-family: var(--mono); }
input[type=range] { display: block; width: 100%; margin: 10px 0 13px; accent-color: var(--accent); min-height: 22px; }
input:disabled { opacity: .4; }
.offset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.image-adjustments .flip-label { justify-content: flex-start; align-items: center; gap: 8px; }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.pack-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.pack-controls > div { flex: 1; min-width: 170px; }
.pack-controls label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.pack-confirm { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px; border: 1px solid #e5b69666; background: #3b3022; border-radius: 8px; margin-top: 17px; }
.pack-confirm p { font-size: 12px; }
.pack-confirm > div { display: flex; gap: 8px; flex-shrink: 0; }
.workshop-message { margin-top: 15px; font-size: 12px; color: var(--accent); min-height: 22px; }
.workshop-message.is-error { color: #efa58e; }
.workshop-footnote { color: var(--muted-low); font-size: 11px; margin-top: 6px; line-height: 1.8; }
@media (min-width: 1500px) { .playing-column { padding-inline: 95px; } }
@media (max-width: 1000px) { .gate-layout { grid-template-columns: minmax(0, 1fr) 290px; } .playing-column { padding-inline: 20px; } .gate-sidebar { padding: 23px; } .gate-sidebar > h2 { font-size: 30px; } }
@media (max-width: 760px) {
  .gate-intro { padding: 25px 0; } .demo-stamp { display: none; } .gate-intro h1 > span:last-child { display: block; margin: 3px 0 0; font-size: 22px; } .gate-lead { font-size: 12px; }
  .gate-layout { grid-template-columns: 1fr; } .gate-sidebar { border-left: 0; border-top: 1px solid var(--line); } .playing-column { padding: 19px; }
  .gate-sidebar > h2 br { display: none; } .gate-sidebar > h2 { font-size: 27px; } .play-guide { gap: 18px; } .route-picker { padding-block: 17px; }
  .workshop-grid { grid-template-columns: 1fr; gap: 18px; } .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .slot-button img { height: 45px; width: 55px; } .slot-button { padding-top: 7px; }
  dialog { width: calc(100% - 20px); padding: 19px; max-height: calc(100dvh - 24px); } .workshop-head h2 { font-size: 24px; } .workshop-head h2 span { display: block; margin-top: 4px; }
  .workshop-head { align-items: flex-start; } .pack-controls > div { flex-basis: 100%; } .pack-confirm { flex-direction: column; align-items: stretch; } .pack-confirm > div { justify-content: flex-end; }
}
@media (max-width: 420px) { .gate-page { padding-inline: 14px; } .playing-column { padding: 15px 11px; } .hud > div { padding: 8px 10px; } .hud strong { font-size: 19px; } .run-head h2 { font-size: 18px; } .run-controls .small-button { font-size: 10px; } .run-overlay { padding: 14px 12px 22px; } .overlay-card { padding: 18px 10px; } .overlay-card h2 { font-size: 22px; } .overlay-card p:not(.eyebrow) { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .progress-track span, .asset-preview img { transition: none; } }
