/* 더블랙 — 검정 바탕, 판 하나, 아래 가운데 ＋ 하나 */
:root {
  --bg: #000;
  --fg: #fff;
  --dim: #8b8b8b;
  --line: #262626;
  --card: #111;
  --card2: #1b1b1b;
  --bad: #ff5a5a;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus { outline: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, label.pick:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }

/* ── 판 ── */
.stage { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#board { display: block; width: 100%; height: 100%; cursor: grab; }
#board.drag { cursor: grabbing; }

/* ── ＋ 단추 ── */
.plus {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 10;
  width: 64px; height: 64px; margin-left: -32px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: #000; display: grid; place-items: center;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, .55), 0 10px 30px rgba(0, 0, 0, .7);
  transition: transform .18s var(--ease);
}
.plus svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.plus:hover { transform: scale(1.06); }
.plus:active { transform: scale(.94); }

/* ── 영상 보기 ── */
/* 판 위 가운데 작은 창 — 바깥은 판이 어둡게 비친다. 「전체 보기」 면 창이 화면을 다 채운다 */
.viewer { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.vbox {
  position: relative; width: min(880px, 100%); display: flex; flex-direction: column;
  background: #000; border: 1px solid #2a2a2a; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 90px #000;
}
.vstage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100dvh - 120px); background: #000; display: flex; align-items: center; justify-content: center; }
.vstage video, .vstage iframe { width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; display: block; }
.vbox:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; }
.vbox:fullscreen .vstage { flex: 1; aspect-ratio: auto; max-height: none; }
.vbox:-webkit-full-screen { width: 100%; height: 100%; border: 0; border-radius: 0; }
.vbox:-webkit-full-screen .vstage { flex: 1; aspect-ratio: auto; max-height: none; }
.vbar { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; background: #0c0c0c; border-bottom: 1px solid #1d1d1d; }
.vleft { flex: 1; min-width: 0; font-size: 14px; color: #ddd; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbtn { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid #ffffff40; background: #0008; font-size: 14px; }
.vbtn:hover { background: #222; }
.vx { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #1b1b1b; font-size: 16px; flex: none; }
@media (max-width: 420px) { .vbtn { padding: 0 11px; font-size: 13px; } .vleft { font-size: 13px; } }
.vx:hover { background: #222; }
.vnav {
  position: absolute; top: 50%; z-index: 2; width: 48px; height: 72px; margin-top: -36px; border: 0; border-radius: 12px;
  background: #0006; font-size: 38px; line-height: 1; color: #fff; opacity: .75;
}
.vnav:hover { opacity: 1; background: #000a; }
.vnav.prev { left: max(10px, calc(50% - 440px - 70px)); }
.vnav.next { right: max(10px, calc(50% - 440px - 70px)); }
@media (hover: none) { .vnav { display: none; } }

/* ── 창(올리기·신고) ── */
.sheet { position: fixed; inset: 0; z-index: 40; background: #000b; display: flex; align-items: center; justify-content: center; padding: 16px; }
.card {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 22px 22px;
  box-shadow: 0 30px 80px #000;
}
.card.wide { max-width: 560px; }
.card h2 { margin: 0 0 14px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.cx { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card2); font-size: 15px; }
.cx:hover { background: #2a2a2a; }
.sub { margin: 0 0 14px; color: var(--dim); font-size: 14px; line-height: 1.5; }
.big { margin: 4px 0 12px; font-size: 18px; font-weight: 700; }
.msg { min-height: 20px; margin: 10px 0 0; font-size: 14px; color: var(--bad); line-height: 1.45; }
.msg.ok { color: #9be39b; }
.row { display: flex; gap: 10px; margin-top: 16px; }
.row > * { flex: 1; }
.solid, .ghost { height: 48px; border-radius: 14px; font-size: 16px; font-weight: 700; }
.solid { background: #fff; color: #000; border: 0; }
.solid:disabled { background: #333; color: #777; cursor: default; }
.ghost { background: transparent; border: 1px solid #3a3a3a; }
.ghost:hover { background: #1c1c1c; }

.rules { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.rules li { position: relative; padding-left: 16px; font-size: 14.5px; line-height: 1.55; color: #d6d6d6; }
.rules li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.rules li.no { color: #ffb4b4; }
.rules li.no::before { background: var(--bad); }
.rules b { color: #fff; }
.agree { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--card2); font-size: 14.5px; line-height: 1.45; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #fff; }
.pick {
  position: relative; display: flex; align-items: center; justify-content: center; height: 52px; margin-top: 12px;
  border-radius: 14px; background: #fff; color: #000; font-size: 16px; font-weight: 800; cursor: pointer;
}
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pick[aria-disabled="true"] { background: #2a2a2a; color: #6c6c6c; cursor: default; }
.pick[aria-disabled="true"] input { cursor: default; }

.bar { height: 8px; border-radius: 4px; background: #262626; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: 4px; transition: width .25s linear; }
.bar.busy i { width: 35% !important; animation: busy 1.1s ease-in-out infinite; }
@keyframes busy { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
#uSub { margin-top: 10px; }

.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs button {
  position: relative; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: #000;
  aspect-ratio: 4 / 5;
}
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumbs button[aria-checked="true"] { border-color: #fff; }
.thumbs button[aria-checked="true"]::after {
  content: '✓'; position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #000; font-size: 13px; font-weight: 900; display: grid; place-items: center;
}
@media (max-width: 420px) { .thumbs { grid-template-columns: repeat(2, 1fr); } }

.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.reasons button { min-height: 42px; padding: 8px 10px; border-radius: 12px; border: 1px solid #333; background: var(--card2); font-size: 14px; text-align: left; }
.reasons button[aria-checked="true"] { border-color: #fff; background: #fff; color: #000; font-weight: 700; }
textarea {
  width: 100%; resize: none; border-radius: 12px; border: 1px solid #333; background: var(--card2); color: #fff;
  padding: 10px 12px; font: inherit; font-size: 14px;
}

.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: #fff; color: #000;
  font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px #000a; text-align: center;
}
