/* MERGE.EXE */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #0b0e0c;
    color: #e9f2ec;
    font-family: ui-monospace, 'JetBrains Mono', Consolas, Menlo, monospace;
}

[hidden] { display: none !important; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.screen { display: flex; flex-direction: column; align-items: center; text-align: center; }

#menu { position: fixed; inset: 0; z-index: 3; justify-content: center; gap: 16px; padding: 20px; overflow-y: auto; background: rgba(8, 12, 10, .72); }
#menu h1 { margin: 0; color: #fff; font-size: clamp(46px, 11vw, 108px); font-weight: 900; text-shadow: 4px 0 0 #ff5c8a, -4px 0 0 #7ae7ff; }
#menu h1 span { color: #39ff88; }
.tag { margin: 0 0 12px; color: #d3e2d8; font-size: clamp(14px, 2vw, 18px); }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid #5a6e62; border-radius: 7px; background: #101511; color: #e9f2ec; font: 700 13px ui-monospace, Consolas, monospace; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #39ff88; color: #39ff88; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.hack { border-color: #39ff88; color: #39ff88; }
.btn.primary { padding: 15px 34px; border: 0; background: #39ff88; color: #06140c; font-size: 20px; }
.btn.primary:hover { background: #7dffaf; color: #06140c; }
.site-home { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; z-index: 4; }

#bar { position: fixed; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 8px 0; pointer-events: none; }
#bar a, #bar button { pointer-events: auto; }
.bar-right { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.modal { position: fixed; inset: 0; z-index: 5; justify-content: center; gap: 14px; padding: 16px; overflow-y: auto; background: rgba(5, 8, 6, .86); }
.modal h2 { margin: 0; color: #39ff88; font-size: clamp(26px, 5vw, 42px); font-weight: 900; }

#panel-body { display: flex; flex-direction: column; gap: 8px; width: min(520px, 100%); text-align: left; }
#panel-body .help { color: #d3e2d8; font-family: Arial, sans-serif; font-size: 15px; line-height: 1.5; }
#panel-body .help b { color: #39ff88; }
#panel-body .note { margin: 4px 0 0; color: #c7d3cb; font-size: 13px; }

.cheat { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid #5a6e62; border-radius: 7px; background: #0b0e0c; color: #e9f2ec; font: inherit; text-align: left; cursor: pointer; }
.cheat small { display: block; margin-top: 2px; color: #c7d3cb; font-size: 12px; }
.cheat b { font-size: 14px; }
.cheat i { flex: none; font-style: normal; font-weight: 900; font-size: 13px; }
.cheat.on { border-color: #39ff88; background: #39ff88; color: #06140c; }
.cheat.on small { color: #06240f; }

#over-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; width: min(560px, 100%); }
.stat { padding: 10px; border: 1px solid #3a4a40; border-radius: 8px; background: #101511; }
.stat b { display: block; color: #fff; font-size: 21px; }
.stat span { color: #c7d3cb; font-size: 11px; }
.stat.hl b { color: #39ff88; }

.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.board h3 { margin: 0 0 6px; color: #39ff88; font-size: 15px; }
.board ol { margin: 0; padding-left: 26px; font-size: 14px; }
.board p { margin: 0; color: #c7d3cb; font-size: 13px; }
.promo { margin: 4px 0 0; color: #d3e2d8; font-size: 14px; }
.promo a { display: inline-block; padding: 8px 4px; color: #39ff88; font-weight: 700; }
