html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #14203a; touch-action: none; -webkit-user-select: none; user-select: none; }
#game { position: fixed; left: 0; top: 0; display: block; }
.hidden { display: none !important; }
#introBox { position: fixed; inset: 0; background: #14203a url(assets/cover-bg.webp) center / cover no-repeat; z-index: 20; }
#introBox video { width: 100%; height: 100%; object-fit: cover; display: block; background: transparent; }
.dbtn { font-family: inherit; min-width: 110px; min-height: 48px; padding: 6px 18px; font-size: 18px; font-weight: 900; color: #f4e8cd; background: #c4432b;
  border: 18px solid transparent; border-image-repeat: stretch; border-radius: 0; cursor: pointer; text-shadow: 0 2px 0 #14203a, 0 0 3px #14203a;
  -webkit-text-stroke: 0; box-sizing: border-box; transition: transform 0.08s; }
.dbtn[style*="border-image"] { background: transparent; }
.dbtn:active { transform: scale(0.93); }
.dbtn.alt { color: #14203a; text-shadow: none; background: #efe0bf; border-width: 14px; }
.dbtn.alt[style*="border-image"] { background: transparent; }
#skipBtn { position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
#skipBtn:active { transform: translateX(-50%) scale(0.93); }
#modal { position: fixed; inset: 0; z-index: 30; background: rgba(14, 22, 40, 0.62); display: flex; align-items: center; justify-content: center; }
#modal .mpanel { width: min(88vw, 380px); box-sizing: border-box; border: 30px solid transparent; background: transparent; color: #14203a;
  display: flex; flex-direction: column; gap: 10px; padding: 6px 4px; }
#modal .mpanel:not([style*="border-image"]) { background: #efe0bf; border: 4px solid #1d2b4a; padding: 20px; }
#modal.show .mpanel { animation: pop 0.24s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mtitle { font-size: 22px; font-weight: 900; text-align: center; color: #c4432b; }
.mbody { font-size: 15px; font-weight: 700; text-align: center; line-height: 1.45; color: #1d2b4a; }
.mbody.err { color: #c4432b; }
#mText, #mInput { width: 100%; box-sizing: border-box; font-size: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; color: #14203a;
  background: rgba(255, 250, 238, 0.9); border: 2px solid #1d2b4a; border-radius: 8px; padding: 10px; outline: none; -webkit-user-select: text; user-select: text; }
#mText { height: 120px; resize: none; word-break: break-all; }
#mInput { font-family: inherit; font-weight: 700; }
#mText:focus, #mInput:focus { border-color: #c4432b; box-shadow: 0 0 0 3px rgba(196, 67, 43, 0.25); }
.mrow { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.mrow .dbtn { flex: 1; }
