/* Гра «Боби» в додатку: темний екран без корпусу телефона, монохромний LCD у стилі телефонів 2002 року.
   Шрифт Press Start 2P (SIL OFL 1.1, assets/fonts/OFL.txt) — локально, працює офлайн. */
@font-face {
  font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/press-start-2p-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.bobi-view {
  --room: #1d2126; --bezel: #15181c; --lcd: #a7b584; --ink: #26301d; --ink-soft: #5f6b4a;
  --key: #cfd3c8; --key-ink: #2a2e33; --note: #9aa3ad;
  --pix: "Press Start 2P", "Courier New", monospace;
  min-height: 100dvh; background: var(--room); color: var(--key);
  padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
  color-scheme: dark;
}
body.bobi-mode, body.bobi-mode .screen.main { background: #1d2126; }
.bobi-view > * { max-width: 420px; margin-left: auto; margin-right: auto; }

.bobi-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 0; }
.bobi-back { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 8px 0 0; border: 0;
  background: transparent; color: var(--key); font-weight: 600; }
.bobi-title { text-align: center; font-family: var(--pix); font-size: 11px; letter-spacing: .3em; color: var(--note); }
.bobi-view .coin-pill { --gold-soft: #2e2a1c; --gold-line: #6e5a1e; --gold-ink: #ffd75e; }

.bobi-box .bezel { background: var(--bezel); border-radius: 16px; padding: 12px; }
.bobi-box .lcd { background: var(--lcd); border-radius: 6px; padding: 8px 8px 6px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35);
  color: var(--ink); min-height: 190px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.bobi-box .lcd::after { content: ""; position: absolute; inset: 0; border-radius: 6px; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .035) 0 1px, transparent 1px 3px); }
.bobi-box canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges;
  cursor: pointer; touch-action: manipulation; }
.bobi-box .status { font-family: var(--pix); font-size: 9px; line-height: 1.5; min-height: 28px; text-align: center; letter-spacing: .02em; }
.bobi-box .menu { font-family: var(--pix); font-size: 10px; line-height: 1.4; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.bobi-box .menu .hd, .bobi-box .limit .hd { text-align: center; font-size: 12px; padding-bottom: 8px; letter-spacing: .06em; }
.bobi-box .menu .it { padding: 5px 6px; cursor: pointer; }
.bobi-box .menu .it.sel { background: var(--ink); color: var(--lcd); }
.bobi-box .menu .ft, .bobi-box .limit .ft { font-size: 8px; color: var(--ink-soft); text-align: center; padding-top: 8px; }
.bobi-box .rules { font-family: var(--pix); font-size: 8px; line-height: 1.75; max-height: 200px; overflow-y: auto; padding-right: 4px; }
.bobi-box .rules p { margin: 0 0 8px; }
.bobi-box .limit { font-family: var(--pix); font-size: 9px; line-height: 1.7; text-align: center; padding: 18px 6px 6px; }
.bobi-box .limit p { margin: 0 0 10px; }

.bobi-box .keys { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: center; margin: 18px 12px 0; }
.bobi-box button.k { font-weight: 600; font-size: 15px; color: var(--key-ink); background: var(--key); border: 0; border-radius: 18px; height: 48px;
  box-shadow: 0 3px 0 #8e948a, inset 0 1px 0 rgba(255, 255, 255, .6); cursor: pointer; touch-action: manipulation; }
.bobi-box button.k:active { transform: translateY(2px); box-shadow: 0 1px 0 #8e948a; }
.bobi-box button.k:focus-visible { outline: 3px solid var(--lcd); outline-offset: 2px; }
.bobi-box button.ok { border-radius: 50%; width: 62px; height: 62px; justify-self: center; font-size: 14px; }
.bobi-box button.soft { font-size: 13px; height: 40px; border-radius: 12px; }

.bobi-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.bobi-info > div { background: #262b31; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.bobi-info span { font-size: 12px; color: var(--note); }
.bobi-info b { color: var(--key); overflow-wrap: anywhere; }
.bobi-limit { text-align: center; font-size: 13px; color: var(--note); margin-top: 12px; }

@media (prefers-reduced-motion: reduce) { .bobi-box button.k:active { transform: none; } }
