/* MTTA — THE BLANK · shared visual language (black / white / grey, gallery + select-shop).
   All UI lives in #ui, a 1280x720 DESIGN box scaled to the page (scale ≈ 0.55 on phones):
   design sizes: body text >= 26px, minor labels >= 22px, tap targets >= 84x84, gaps >= 14.
   Reserved corners (platform buttons): top-left 120x120 and top-right 120x120 design px stay empty. */
:root {
  --ink: #121212;
  --char: #1d1d1f;
  --g1: #3b3a38;
  --g2: #6f6b66;
  --g3: #a7a29b;
  --line: rgba(18, 18, 18, 0.16);
  --paper: #f4f1eb;
  --ivory: #ede9e1;
  --glass: rgba(244, 241, 235, 0.86);
  --glass-dark: rgba(18, 18, 18, 0.8);
  --r-common: #9a958e;
  --r-rare: #8aa3b8;
  --r-legendary: #c9a96e;
  --r-mythic: #2a2630;
  --r-secret: #d9d2ff;
  --r-limited: #b8574a;
  --font: "Helvetica Neue", "Inter", "Segoe UI", Arial, sans-serif; /* main.js replaces with I18n.font(...) */
  --mono: "SF Mono", "Menlo", "Consolas", monospace;
  --ease-pop: cubic-bezier(.2, 1.4, .4, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0d0d; user-select: none; -webkit-user-select: none; touch-action: none; }
body { font-family: var(--font); color: var(--ink); }
#gl, #fx { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#fx { pointer-events: none; z-index: 1; }
#ui-wrap { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
#ui { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; pointer-events: none; }
#ui * { pointer-events: auto; }
#ui .passthru, #ui .passthru * { pointer-events: none; }

/* screens: <section class="screen" data-screen-name="home"> is visible while body[data-screen=home] */
.screen { position: absolute; inset: 0; display: none; pointer-events: none !important; }
.screen > * { pointer-events: auto; }
.screen.on { display: block; animation: scrIn 0.28s var(--ease-pop) both; }
@keyframes scrIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* paper panel (museum wall label card) */
.panel {
  background: var(--paper);
  border: 26px solid transparent;
  border-image: url("../assets/ui-panel.webp") 12% fill / 26px stretch;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  color: var(--ink);
  background-clip: padding-box;
}
.panel.dark { background: var(--glass-dark); border-image: none; border: 1px solid rgba(255, 255, 255, 0.12); color: var(--ivory); border-radius: 10px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 84px; min-width: 84px; padding: 0 30px;
  font: 700 26px/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ivory); background: var(--char);
  border: 14px solid transparent;
  border-image: url("../assets/ui-button.webp") 18% fill / 14px stretch;
  background-clip: padding-box;
  cursor: pointer; transition: transform 0.12s, filter 0.12s;
}
/* #ui button's reset (id specificity) strips plain background/border, so the solid ink plate is forced here */
.btn { background: var(--ink) !important; color: var(--ivory) !important; border: 2px solid var(--ink) !important; border-image: none !important; border-radius: 8px; }
.panel.dark .btn:not(.light):not(.ghost), .dark .btn:not(.light):not(.ghost) { border-color: rgba(244,241,235,.55) !important; }
.btn:hover, .btn.focus { filter: brightness(1.25); transform: translateY(-2px) scale(1.02); }
.btn:active { transform: scale(0.95); }
.btn.ghost { background: transparent !important; border: 2px solid var(--ink) !important; border-image: none; color: var(--ink) !important; border-radius: 8px; }
.btn.light { background: var(--paper) !important; color: var(--ink) !important; border-image: none; border: 2px solid var(--ink) !important; border-radius: 8px; }
.dark .btn.ghost, .panel.dark .btn.ghost, .btn.ghost.on-dark-btn { border-color: var(--ivory) !important; color: var(--ivory) !important; }
.btn[disabled], .btn.off { opacity: 0.38; filter: grayscale(1); pointer-events: none; }
.btn .ico { width: 34px; height: 34px; }

/* keyboard / gamepad focus ring (main.js moves .focus between [data-nav] elements) */
.focus { outline: 4px solid var(--ink); outline-offset: 5px; }
.panel.dark .focus, .on-dark .focus { outline-color: var(--ivory); }

/* rarity tag: <span class="rtag" data-r="legendary">LEGENDARY</span> */
.rtag { display: inline-block; padding: 6px 12px; font: 700 22px/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; border: 2px solid currentColor; border-radius: 4px; }
.rtag[data-r="common"] { color: var(--r-common); }
.rtag[data-r="rare"] { color: var(--r-rare); }
.rtag[data-r="legendary"] { color: var(--r-legendary); }
.rtag[data-r="mythic"] { color: #f4f1eb; background: linear-gradient(120deg, #1a1820, #3b3350, #1a2a30, #1a1820); border-color: #5b5370; }
.rtag[data-r="secret"] { color: #1d1d1f; background: linear-gradient(120deg, #ffd6f0, #d9d2ff, #c8fff1, #fff3c4); border-color: #fff; }
.rtag[data-r="limited"] { color: var(--r-limited); }

/* museum label card (the game's signature: every collectible has one, like a gallery price tag)
   <div class="label-card"><div class="lc-no">No.005</div><div class="lc-name">…</div><div class="lc-series">…</div><span class="rtag">…</span></div> */
.label-card { background: #fbfaf7; color: var(--ink); padding: 16px 20px; border-left: 6px solid var(--ink); box-shadow: 0 6px 14px rgba(0,0,0,0.12); }
.lc-no { font: 700 22px/1 var(--mono); letter-spacing: 0.1em; color: var(--g2); }
.lc-name { font: 800 30px/1.15 var(--font); margin: 8px 0 6px; }
.lc-series { font: 500 22px/1.2 var(--font); color: var(--g2); letter-spacing: 0.04em; margin-bottom: 10px; }

/* small headings */
.h-title { font: 900 44px/1 var(--font); letter-spacing: 0.04em; }
.h-sub { font: 600 22px/1.2 var(--font); letter-spacing: 0.24em; text-transform: uppercase; color: var(--g2); }
.mono { font-family: var(--mono); }
.hide { display: none !important; }
