html, body { margin: 0; height: 100%; overflow: hidden; background: #111; color: #eee; font: 14px system-ui, sans-serif; }
#game { position: fixed; inset: 0; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }

/* Custom (mt2-custom, docs/59-mobil.md): the full screen button, the "turn the phone" curtain and the mobile HUD
   (client/src/mobile.js), in the original UI's look: the thin board and the board of d:/ymir work/ui/pattern at their
   own size (tiled, not scaled), the buttons, the slots and the gauges drawn from the original images' colours, Tahoma. */
:root {
  --m-text: #f0eada;
  --m-dim: #c8c0ad;
  --m-font: Tahoma, Verdana, Arial, sans-serif;
  --m-pattern: /assets/ymir_work/ui/pattern;
}
.mfull svg, .mrotate svg, .mhud svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ThinBoard: 16 px corners and lines (a grey highlight over a black edge), the middle half-transparent black. */
.mthin {
  background:
    url(/assets/ymir_work/ui/pattern/thinboard_corner_lefttop.png) left top no-repeat,
    url(/assets/ymir_work/ui/pattern/thinboard_corner_righttop.png) right top no-repeat,
    url(/assets/ymir_work/ui/pattern/thinboard_corner_leftbottom.png) left bottom no-repeat,
    url(/assets/ymir_work/ui/pattern/thinboard_corner_rightbottom.png) right bottom no-repeat,
    url(/assets/ymir_work/ui/pattern/thinboard_line_top.png) 16px 0 / calc(100% - 32px) 16px no-repeat,
    url(/assets/ymir_work/ui/pattern/thinboard_line_bottom.png) 16px 100% / calc(100% - 32px) 16px no-repeat,
    url(/assets/ymir_work/ui/pattern/thinboard_line_left.png) 0 16px / 16px calc(100% - 32px) no-repeat,
    url(/assets/ymir_work/ui/pattern/thinboard_line_right.png) 100% 16px / 16px calc(100% - 32px) no-repeat,
    linear-gradient(#00000080, #00000080) 16px 16px / calc(100% - 32px) calc(100% - 32px) no-repeat;
}
/* Board (the menu, the turn-the-phone curtain): plain dark (the user's wish: the stone pattern was ugly), a thin grey
   edge over a black one like the thin board's. */
.mboard {
  background: #000000b8; border: 1px solid #000; border-radius: 3px;
  box-shadow: inset 0 0 0 1px #4a4741, 0 4px 16px #000000c0;
}
/* The original's look drawn in CSS from its images' colours (no image is scaled: a scaled one is blurred): */
/* the button (public large_button: a grey body, a light top edge, a dark bottom; pressed, its third image), */
.mbtnlook {
  border: 1px solid #000000aa; border-radius: 2px; box-sizing: border-box; color: var(--m-text);
  background: linear-gradient(#393831, #33342e 45%, #2e302b);
  box-shadow: inset 0 2px 0 #a59e94, inset 0 3px 0 #6e6962, inset 0 -2px 0 #151513, inset 1px 0 0 #7b7973, inset -1px 0 0 #49483f;
  text-shadow: 1px 1px 0 #000;
}
.mbtnlook:active, .mbtnlook.on {
  background: #292821; box-shadow: inset 0 3px 0 #000, inset 0 -1px 0 #101410, inset 1px 0 0 #000, inset -1px 0 0 #000;
}
/* the slot (public slot_base: near black, a brown top-left edge over a black one). */
.mslotlook {
  box-sizing: border-box; background: #0d0c0b; border: 1px solid; border-color: #3f3019 #000 #000 #3f3019;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #1c1712, 0 0 0 1px #00000080;
}

.mfull {
  position: absolute; top: 4px; right: 6px; z-index: 30; width: 40px; height: 32px; padding: 0;
  display: grid; place-items: center; border: 0; color: var(--m-text); cursor: pointer; opacity: 0.85;
}
.mfull:hover { opacity: 1; }
/* No focus ring (the user's wish, 2026-11-15): the buttons over the game give their focus back at once (mobile.js). */
.mfull:focus, .mfull-hint:focus, .mrotate-full:focus { outline: none; }
.mfull[hidden] { display: none; }
.mfull.covered { visibility: hidden; }
/* Custom (the user's wish, 2026-11-15): the "click here for the full screen" hint left of the button, on the first
   screen and the login only, while the page is not full screen. */
.mfull-hint {
  position: absolute; top: 4px; z-index: 30; height: 32px; padding: 0 14px; display: flex; align-items: center;
  border: 0; color: var(--m-text); font: 12px var(--m-font); text-shadow: 1px 1px 0 #000; cursor: pointer;
  white-space: nowrap; opacity: 0.9;
}
.mfull-hint:hover { opacity: 1; color: #fff; }
.mfull-hint[hidden] { display: none; }
/* Custom (the user's wish, 2026-11-30): the legal notice on the bottom decoration bar, in the middle (mobile.js). */
.mlegal {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); z-index: 30; height: 32px; padding: 0 14px;
  display: flex; align-items: center; color: var(--m-dim); font: 11px var(--m-font); text-shadow: 1px 1px 0 #000;
  white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.mlegal[hidden] { display: none; }
/* Custom (the user's wish, 2026-11-15): the "install the game as an app" bar in the top left corner (mobile.js). */
.minstall {
  position: absolute; top: 4px; left: 6px; z-index: 30; height: 32px; padding: 0 14px; display: flex; align-items: center;
  border: 0; color: var(--m-text); font: 12px var(--m-font); text-shadow: 1px 1px 0 #000; cursor: pointer;
  white-space: nowrap; opacity: 0.9;
}
.minstall:hover { opacity: 1; color: #fff; }
.minstall:focus { outline: none; }
.minstall[hidden] { display: none; }
/* Custom (docs/66-wiki.md): the wiki's link in the page (index.html) for the search engines and screen readers, not
   shown: the login screen's quick buttons have the wiki (uiquick.js). */
.mwiki {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
/* Custom (the user's wish, 2026-11-22): the "not preloaded" badge left of the full screen button (mobile.js). */
.mpreload {
  position: absolute; top: 4px; z-index: 30; height: 32px; padding: 0 14px; display: flex; align-items: center;
  border: 0; color: var(--m-text); font: 12px var(--m-font); text-shadow: 1px 1px 0 #000; cursor: pointer;
  white-space: nowrap; opacity: 0.95;
}
.mpreload.missing { color: #ffb347; }
.mpreload:hover { opacity: 1; }
.mpreload:focus { outline: none; }
.mpreload[hidden] { display: none; }
.mpreload.covered { visibility: hidden; }

.mrotate {
  position: absolute; inset: 0; z-index: 40; display: none; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; color: var(--m-text); text-align: center; padding: 24px;
  font-family: var(--m-font);
}
.mrotate.show { display: flex; }
.mrotate p { margin: 0; font-size: 16px; max-width: 280px; text-shadow: 1px 1px 0 #000; }
.mrotate-phone {
  width: 44px; height: 76px; border: 3px solid var(--m-dim); border-radius: 8px; background: #000000a0;
  animation: mrotate 2.4s ease-in-out infinite;
}
@keyframes mrotate { 0%, 25% { transform: rotate(0); } 55%, 100% { transform: rotate(-90deg); } }
/* large_button (88 × 21) at 2×. */
.mrotate-full, .mmenu-panel button {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 176px; height: 40px; padding: 0 8px;
  font: 14px var(--m-font);
}
.mrotate-full[hidden] { display: none; }

.mhud { position: absolute; inset: 0; z-index: 20; pointer-events: none; font-family: var(--m-font); }
/* Under a shown window (the windows are over the HUD): hidden and not touched. */
.mhud .covered { visibility: hidden; pointer-events: none !important; }
.mhud .mbtn, .mhud .mjoy, .mhud .mmenu.show, .mhud .mside { pointer-events: auto; }
.mbtn { position: absolute; display: grid; place-items: center; box-sizing: border-box; color: var(--m-text); touch-action: none; }
/* The attack, the pick up and the side buttons: the button's look; the quick slots: the slot's. */
/* The attack: the button's look like the pick up, but round (the user's wish), a plain light sword in it. */
.mattack.mbtnlook { border-radius: 50%; }
.mattack .msword { width: 58%; height: 58%; fill: #c9c1aa; stroke: none; filter: drop-shadow(1px 1px 0 #000); }
.mattack.on .msword { transform: scale(0.94); }
.mpick svg, .mside-btn svg { width: 60%; height: 60%; color: #c9c1aa; filter: drop-shadow(1px 1px 0 #000); }
.mslot:active { filter: brightness(1.6); }
.mslot canvas { width: 32px; height: 32px; }
.mslot.empty canvas { visibility: hidden; }
.mslot.active { box-shadow: 0 0 8px 2px #ffe08a; }
.mslot-key { position: absolute; left: 3px; top: 1px; font-size: 9px; color: var(--m-dim); text-shadow: 1px 1px 0 #000; }
.mslot-count { position: absolute; right: 4px; bottom: 2px; font-size: 11px; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
.mslot-cool { position: absolute; inset: 9%; pointer-events: none; }

/* The joystick: a thin board ring (a grey edge over a black one), a round button as its knob. */
.mjoy { position: absolute; left: 14px; bottom: 14px; width: 130px; height: 130px; touch-action: none; }
.mjoy-base {
  position: absolute; inset: 12%; border-radius: 50%; box-sizing: border-box;
  border: 2px solid #555; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000; background: #00000070;
}
.mjoy-knob {
  position: absolute; left: 50%; top: 50%; width: 38%; height: 38%; margin: -19% 0 0 -19%; border-radius: 50%;
  box-sizing: border-box; border: 1px solid #000; background: radial-gradient(circle at 50% 35%, #4a4840, #2e302b 70%);
  box-shadow: inset 0 2px 0 #a59e94, inset 0 -2px 0 #151513, 0 1px 3px #000;
}

.mside { position: absolute; left: 8px; top: 34%; display: flex; flex-direction: column; gap: 8px; }
.mside-btn { position: static; width: 42px; height: 42px; }

.mmenu { position: absolute; inset: 0; display: none; place-items: center; background: #00000080; }
.mmenu.show { display: grid; }
.mmenu-panel { display: grid; grid-template-columns: repeat(4, 176px); gap: 6px 8px; padding: 26px 24px; }

/* The gauges (ui.Gauge): the slot's and the colours' 7 rows of the original images (gauge_slot_*, gauge_red /
   blue / pink), as stripes that stay sharp at any height. */
.mbars {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: min(36vw, 300px);
  display: flex; flex-direction: column; gap: 1px;
}
.mbar { position: relative; height: 13px; border: 1px solid #000; border-radius: 2px; background: linear-gradient(rgb(3, 3, 3) 0.000% 14.286%, rgb(84, 84, 84) 14.286% 28.571%, rgb(46, 46, 46) 28.571% 42.857%, rgb(0, 0, 0) 42.857% 57.143%, rgb(15, 15, 15) 57.143% 71.429%, rgb(67, 67, 67) 71.429% 85.714%, rgb(39, 39, 39) 85.714% 100.000%); }
.mbar i { position: absolute; left: 1px; top: 1px; bottom: 1px; width: 0; max-width: calc(100% - 2px); }
.mbar b { position: relative; display: block; font-size: 9px; line-height: 13px; text-align: center; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
.mhp i { background: linear-gradient(rgb(114, 50, 55) 0.000% 14.286%, rgb(253, 185, 176) 14.286% 28.571%, rgb(205, 102, 100) 28.571% 42.857%, rgb(100, 39, 41) 42.857% 57.143%, rgb(183, 18, 19) 57.143% 71.429%, rgb(255, 116, 117) 71.429% 85.714%, rgb(211, 71, 74) 85.714% 100.000%); }
.msp i { background: linear-gradient(rgb(50, 85, 114) 0.000% 14.286%, rgb(176, 203, 253) 14.286% 28.571%, rgb(100, 147, 205) 28.571% 42.857%, rgb(39, 69, 100) 42.857% 57.143%, rgb(18, 96, 183) 57.143% 71.429%, rgb(116, 182, 255) 71.429% 85.714%, rgb(71, 139, 211) 85.714% 100.000%); }
.mexp { height: 6px; }
.mexp i { background: linear-gradient(rgb(114, 50, 96) 0.000% 14.286%, rgb(253, 176, 217) 14.286% 28.571%, rgb(205, 100, 166) 28.571% 42.857%, rgb(100, 39, 80) 42.857% 57.143%, rgb(183, 18, 126) 57.143% 71.429%, rgb(255, 116, 207) 71.429% 85.714%, rgb(211, 71, 165) 85.714% 100.000%); }

/* Custom (mt2-custom, ui/uiregister.js): reCAPTCHA v3's badge hidden; the registration window says the check is there. */
.grecaptcha-badge { visibility: hidden; }
