@font-face {
  font-family: 'Chakra Petch';
  font-weight: 700;
  src: url('../fonts/ChakraPetch-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Permanent Marker';
  src: url('../fonts/PermanentMarker.woff2') format('woff2');
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05060a; color: #e7e9f3; font-family: system-ui, -apple-system, 'Segoe UI', 'Noto Sans KR', sans-serif; }
.app { display: flex; height: 100vh; }
.panel { width: 360px; flex: none; overflow-y: auto; padding: 18px 18px 40px; background: #0b0d16; border-right: 1px solid #1d2133; }
.panel h1 { font-family: 'Chakra Petch', sans-serif; font-size: 28px; margin: 0 0 14px; letter-spacing: 1px; color: #ffcc1a; }
.panel h1 span { font-size: 13px; color: #8f9bc0; letter-spacing: 0; }
section { border-top: 1px solid #1d2133; padding: 12px 0 6px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #8f9bc0; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; }
label { display: block; font-size: 12px; color: #aab2cf; margin-bottom: 8px; flex: 1; }
input[type=text], input[type=number], select { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; background: #131726; color: #fff; border: 1px solid #262c44; border-radius: 6px; font-size: 14px; }
input[type=range] { width: 100%; margin-top: 10px; }
input[type=file] { display: block; margin-top: 6px; font-size: 12px; color: #aab2cf; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row.buttons { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
button { background: #ffcc1a; color: #111; border: 0; border-radius: 6px; padding: 9px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .4; cursor: default; }
button.rec { background: #ff3b30; color: #fff; }
button.ghost { background: #1a1f33; color: #e7e9f3; border: 1px solid #2b3150; }
button.small { padding: 5px 9px; font-size: 12px; }
.row > button { margin-bottom: 8px; }
.check { display: flex; gap: 8px; align-items: center; }
.hint { font-size: 12px; color: #77809f; margin-bottom: 6px; }
.status { font-size: 13px; color: #ffcc1a; margin: 4px 0 8px; min-height: 18px; }
#download a { display: inline-block; margin-top: 4px; color: #5fe0b4; font-weight: 700; }
table.standings { display: block; max-height: 320px; overflow-y: auto; width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
table.standings td { padding: 3px 4px; }
table.standings td.name { font-family: 'Chakra Petch', sans-serif; font-weight: 700; }
table.standings input { width: 52px; display: inline-block; margin: 0; padding: 4px; }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px; min-width: 0; }
canvas { height: calc(100vh - 24px); aspect-ratio: 9 / 16; max-width: 100%; background: #07080d; border-radius: 6px; box-shadow: 0 0 0 1px #1d2133; }

@media (max-width: 820px) {
  .app { flex-direction: column-reverse; height: auto; }
  .panel { width: 100%; border-right: 0; }
  canvas { height: auto; width: 100%; }
}
