@font-face { font-family: 'Pix'; src: url(../assets/fonts/04b03.ttf); }
@font-face { font-family: 'Komika'; src: url(../assets/fonts/komika.ttf); }
@font-face { font-family: 'Arm'; src: url(../assets/fonts/armwrestler.ttf); }
@font-face { font-family: 'Typer'; src: url(../assets/fonts/specialelite.ttf); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
#app { position: fixed; inset: 0; background: #000; }
#stage { position: absolute; touch-action: manipulation; }

body[data-skin="pony"] { --font: 'Pix', monospace; --head: 'Pix', monospace; --paper: url(../assets/pony/gfx/bg_notepaper.png); --ink: #1a1a1a; --accent: #c80000; }
body[data-skin="school"] { --font: 'Typer', serif; --head: 'Arm', serif; --paper: url(../assets/school/gfx/im_notes.png); --ink: #111; --accent: #e60f1e; }

.screen { position: absolute; inset: 0; display: none; flex-direction: column; overflow-y: auto; z-index: 5;
  max-width: 620px; margin: 0 auto; padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  background: #eee var(--paper) center top / 100% 100% no-repeat; color: var(--ink); font-family: var(--font); font-size: 16px; }
.screen.on { display: flex; }
body[data-skin="pony"] .screen { image-rendering: pixelated; }
h1 { font-family: var(--head); font-weight: normal; color: var(--accent); font-size: 30px; margin: .2em 0 .5em; }
h3 { font-family: var(--head); font-weight: normal; margin: 10px 0 4px; }
.hint { font-size: 13px; opacity: .8; }
button { font-family: var(--font); font-size: 16px; color: #fff; background: #222; border: 2px solid #555; border-radius: 6px; padding: 9px 14px; cursor: pointer; }
button.go { background: var(--accent); border-color: #0003; }
button.small { font-size: 13px; padding: 6px 10px; }
button.on { background: var(--accent); }
button:disabled { opacity: .45; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.bottom { margin-top: auto; padding-top: 12px; justify-content: space-between; }
input { font-family: inherit; font-size: 16px; padding: 8px; border-radius: 6px; border: 2px solid #8886; background: #fff; color: #222; }
label { display: block; margin: 8px 0; }
.or { text-align: center; margin: 14px 0 6px; opacity: .7; }
#on-code { width: 110px; text-transform: uppercase; letter-spacing: 3px; }
.code-box { font-size: 18px; margin-bottom: 8px; }
.code-box b { font-size: 26px; letter-spacing: 3px; color: var(--accent); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 80px; }
.seatrow { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.seatrow .fname { flex: 1; font-family: var(--head); }
.chal { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: 13px; }
.plist { margin: 6px 0; font-size: 14px; }
.cast-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cslot { display: flex; flex-direction: column; gap: 3px; }
.cslot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #ccc; cursor: pointer; }
.cslot input { font-size: 12px; padding: 4px; width: 100%; }
.help-body { font-size: 14px; line-height: 1.4; }
.help-body h3 { color: var(--accent); }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 30; background: #000e; color: #fff; padding: 10px 16px; border-radius: 8px; border: 1px solid #c00; font: 14px sans-serif; max-width: 90vw; }
