/* ==========================================================================
   PlayU — 동네 오락실
   규칙 네 가지만 지킵니다.
   1) 색은 일곱 개: 먹, 백, 회색 둘, 그리고 오락실 버튼 색 넷(노랑·빨강·파랑·초록)
   2) 모서리는 전부 직각. 번지는 그림자, 그라데이션, 유리 효과는 쓰지 않는다
   3) 이름표·숫자·버튼은 픽셀 글꼴(갈무리), 사람이 쓴 문장은 고딕(프리텐다드)
   4) 그림자는 화면 위에 "떠 있는 것"(메뉴·창·알림)에만, 번지지 않게
   ========================================================================== */
:root {
  --ink: #111111;
  --paper: #ffffff;
  --fog: #f0f0f0;
  --line: #cfcfcf;
  --mute: #666666;
  --coin: #ffdc00; /* 노랑: 강조, 지금 고른 것 */
  --p1: #e8261c; /* 빨강(1P): 제일 중요한 버튼, 위험 */
  --p2: #1f3fff; /* 파랑(2P): 링크, 입력 중 */
  --go: #00a651; /* 초록: 성공 */

  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --px: 'Galmuri11', var(--sans); /* 12 · 24 · 36 · 48px 로만 */
  --px14: 'Galmuri14', 'Galmuri11', var(--sans); /* 15 · 30 · 45px 로만 */

  --b: 2px solid var(--ink);
  --wrap: 1200px;
  --bar: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + 16px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}
body.no-scroll {
  overflow: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  color: var(--p2);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border-radius: 0;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
code {
  font-family: 'GalmuriMono11', ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: var(--fog);
  padding: 1px 5px;
}
[hidden] {
  display: none !important;
}
::selection {
  background: var(--coin);
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid var(--p2);
  outline-offset: 2px;
}
.i {
  flex: none;
  vertical-align: -3px;
}
.muted {
  color: var(--mute);
}
.small {
  font-size: 13px;
}
.nowrap {
  white-space: nowrap;
}
.spacer {
  flex: 1;
}
.px {
  font-family: var(--px);
  font-size: 12px;
  line-height: 1.5;
}

.app {
  flex: 1;
  width: 100%;
}
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow {
  max-width: 720px;
}
.page {
  padding-top: 32px;
  padding-bottom: 72px;
}

/* ---- 버튼: 눌리는 키캡 ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 14px;
  font: 400 15px/1.2 var(--px14);
  color: var(--ink);
  background: var(--paper);
  border: var(--b);
  box-shadow: 0 3px 0 var(--ink);
  text-decoration: none !important;
  white-space: nowrap;
  user-select: none;
}
.btn:hover {
  background: var(--coin);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: none;
}
.btn:disabled {
  background: var(--fog);
  color: var(--mute);
  cursor: default;
  transform: none;
  box-shadow: 0 3px 0 var(--line);
  border-color: var(--line);
}
.btn-primary {
  background: var(--p1);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ink);
  color: var(--coin);
}
.btn-dark {
  background: var(--ink);
  color: var(--coin);
}
.btn-dark:hover {
  background: var(--coin);
  color: var(--ink);
}
.btn-danger {
  color: var(--p1);
}
.btn-danger:hover {
  background: var(--p1);
  color: #fff;
}
.btn-lg {
  min-height: 48px;
  padding: 8px 22px;
}
.btn-sm {
  min-height: 30px;
  padding: 3px 10px;
  font: 400 12px/1.2 var(--px);
  box-shadow: 0 2px 0 var(--ink);
}
.btn-sm:active {
  transform: translateY(2px);
}
.btn-block {
  display: flex;
  width: 100%;
}
.danger-text {
  color: var(--p1);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
}
.icon-btn:hover {
  background: var(--coin);
  color: var(--ink);
}
.row-gap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---- 이름표 ---------------------------------------------------------------- */
.label {
  display: inline-block;
  font: 400 12px/1 var(--px);
  padding: 4px 6px 3px;
  background: var(--ink);
  color: #fff;
  white-space: nowrap;
  vertical-align: middle;
}
.label-coin {
  background: var(--coin);
  color: var(--ink);
}
.label-red {
  background: var(--p1);
}
.label-line {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* ---- 아바타: 색 네모 + 첫 글자 ------------------------------------------- */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--s, 32px);
  height: var(--s, 32px);
  font: 700 12px/1 var(--px);
  border: var(--b);
  overflow: hidden;
  text-transform: uppercase;
}
.avatar.lg {
  font-size: 24px;
}
.avatar.xl {
  font-size: 48px;
  border-width: 3px;
}
.av-0 {
  background: var(--p1);
  color: #fff;
}
.av-1 {
  background: var(--p2);
  color: #fff;
}
.av-2 {
  background: var(--go);
  color: #fff;
}
.av-3 {
  background: var(--coin);
  color: var(--ink);
}
.av-4 {
  background: var(--ink);
  color: var(--coin);
}
.av-5 {
  background: var(--paper);
  color: var(--ink);
}

/* ---- 상단바 ---------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
}
.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  height: var(--bar);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: var(--coin);
  font: 700 24px/1 var(--px);
  text-decoration: none !important;
}
.logo img {
  width: 28px;
  height: 28px;
}
.search {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  display: flex;
  height: 36px;
}
.search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}
.search input::placeholder {
  color: #8a8a8a;
}
.search input:focus {
  outline: 0;
  background: #fff9c2;
}
.search button {
  flex: none;
  padding: 0 12px;
  background: var(--coin);
  color: var(--ink);
  font: 400 15px/1 var(--px14);
}
.search button:hover {
  background: #fff;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-link {
  color: #fff;
  font: 400 15px/1 var(--px14);
  padding: 8px 4px;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--coin);
}
.topbar .btn {
  border-color: #fff;
  box-shadow: 0 3px 0 #5a5a5a;
}
.topbar .btn:active {
  box-shadow: none;
}
.topbar .btn-primary:hover {
  background: var(--coin);
  color: var(--ink);
}
.avatar-btn {
  display: block;
  line-height: 0;
}
.avatar-btn .avatar {
  border-color: #fff;
}
.menu-anchor {
  position: relative;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  min-width: 220px;
  background: var(--paper);
  color: var(--ink);
  border: var(--b);
  box-shadow: 5px 5px 0 var(--ink);
}
.topbar .menu {
  box-shadow: 5px 5px 0 var(--coin);
}
.menu-up {
  top: auto;
  bottom: calc(100% + 8px);
}
.menu a,
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  color: var(--ink);
  font: 400 15px/1.2 var(--px14);
  text-align: left;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.menu a:hover,
.menu button:hover {
  background: var(--coin);
}
.menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--fog);
}
.menu-head b {
  display: block;
  font-weight: 700;
  line-height: 1.3;
}
.menu-head small {
  color: var(--mute);
  font-size: 12px;
}

/* ---- 홈: 전광판 줄 + 노랑 띠 --------------------------------------------- */
.ticker {
  border-bottom: var(--b);
  font: 400 12px/1 var(--px);
  background: var(--paper);
}
.ticker-in {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 34px;
  white-space: nowrap;
  overflow: hidden;
}
.ticker b {
  font-weight: 700;
  margin-left: 4px;
  letter-spacing: 1px;
}
.ticker-r {
  margin-left: auto;
  color: var(--mute);
}

.band {
  background: var(--coin);
  border-bottom: var(--b);
}
.band-in {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: end;
  padding-top: 44px;
  padding-bottom: 44px;
}
.band-kicker {
  font: 400 12px/1 var(--px);
  margin-bottom: 18px;
}
.band h1 {
  font: 700 48px/1.25 var(--px);
  letter-spacing: -1px;
  word-break: keep-all;
}
.band-lead {
  margin-top: 18px;
  max-width: 30em;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
}
.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.board {
  background: var(--ink);
  color: #fff;
  font-family: var(--px);
}
.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 2px solid #3a3a3a;
}
.board-head b {
  font-size: 24px;
  line-height: 1;
  color: var(--coin);
}
.board-head span {
  font-size: 12px;
  color: #bdbdbd;
}
.board-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 6px;
}
.board-list a,
.board-empty {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 14px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}
.board-list a:hover {
  background: var(--coin);
  color: var(--ink);
}
.board-list a:hover small {
  color: var(--ink);
}
.board-list i {
  font-style: normal;
  color: var(--coin);
}
.board-list a:hover i {
  color: var(--ink);
}
.board-list li:nth-child(n + 2) i {
  color: #fff;
}
.board-list li:nth-child(n + 2) a:hover i {
  color: var(--ink);
}
.board-name {
  min-width: 0;
  font: 700 14px/1.35 var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-name small {
  margin-left: 8px;
  font: 400 12px/1 var(--sans);
  color: #a9a9a9;
}
.board-list b {
  font-weight: 400;
  letter-spacing: 1px;
}
.board-empty {
  display: block;
  color: #bdbdbd;
  padding: 18px 14px;
  line-height: 1.7;
}

/* ---- 고르기: 장르, 태그, 정렬 ------------------------------------------- */
.filters {
  padding-top: 26px;
  padding-bottom: 72px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  padding-left: 2px;
}
.chip {
  margin: 0 0 -2px -2px;
  padding: 7px 13px 6px;
  border: var(--b);
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.2 var(--px14);
  white-space: nowrap;
  text-decoration: none !important;
  position: relative;
}
.chip:hover {
  background: var(--coin);
}
.chip.active,
.chip-radio input:checked + span {
  background: var(--ink);
  color: var(--coin);
}
.chip-radio {
  padding: 0;
  cursor: pointer;
}
.chip-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip-radio span {
  display: block;
  padding: 7px 13px 6px;
}
.chip-radio input:focus-visible + span {
  outline: 3px solid var(--p2);
  outline-offset: -3px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 14px;
}
.tag {
  font: 400 12px/1.6 var(--px);
  color: var(--ink);
}
.tag:hover,
.tag.active {
  background: var(--coin);
  text-decoration: none;
}

.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 34px 0 14px;
  padding-bottom: 10px;
  border-bottom: var(--b);
}
.list-head h2 {
  font: 700 24px/1.2 var(--px);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.list-head h2 small {
  font: 400 12px/1 var(--px);
  color: var(--mute);
}
.list-head h2 .q {
  font: 800 22px/1.2 var(--sans);
}
.clear-filter {
  font: 400 12px/1 var(--px);
  color: var(--p1);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
}
.tab {
  font: 400 15px/1.3 var(--px14);
  color: var(--mute);
  padding: 2px 1px;
  white-space: nowrap;
}
.tab:hover {
  color: var(--ink);
}
.tab.active {
  color: var(--ink);
  background: linear-gradient(transparent 55%, var(--coin) 55%);
}
.tabs-sm .tab {
  font: 400 12px/1.4 var(--px);
}
.count-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 5px 1px;
  background: var(--p1);
  color: #fff;
  font: 400 12px/1 var(--px);
}

/* ---- 게임 목록: 칸이 붙어 있는 진열표 ------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  padding: 0 0 2px 2px;
}
.card {
  display: flex;
  flex-direction: column;
  margin: 0 0 -2px -2px;
  border: var(--b);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none !important;
  min-width: 0;
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: var(--b);
  overflow: hidden;
  background: var(--fog);
}
.thumb {
  width: 100%;
  height: 100%;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-no {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 6px 3px;
  background: var(--ink);
  color: #fff;
  font: 400 12px/1 var(--px);
}
.card-flag {
  position: absolute;
  right: 0;
  top: 0;
}
.card-go {
  position: absolute;
  right: 0;
  bottom: 0;
  display: none;
  padding: 5px 8px 4px;
  background: var(--p1);
  color: #fff;
  font: 700 12px/1 var(--px);
}
.card:hover .card-go,
.card:focus-visible .card-go {
  display: block;
}
.card:hover .card-body,
.card:focus-visible .card-body {
  background: var(--coin);
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 12px 10px;
}
.card-title {
  font: 700 16px/1.35 var(--sans);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.card-by {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
  min-width: 0;
}
.card-by span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-by .avatar {
  border-width: 1px;
  font-size: 0;
}
.card-stats {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font: 400 12px/1.5 var(--px);
  color: #444;
}
.card-stats b {
  font-weight: 700;
  color: var(--ink);
}

/* 썸네일이 없을 때: 색 딱지 + 무늬 + 제목 */
.thumb-fallback {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  overflow: hidden;
}
.tf-title {
  position: relative;
  font: 700 24px/1.3 var(--px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  background-color: inherit;
}
/* 글자가 무늬와 겹쳐도 읽히도록 글자 뒤에 딱지 색을 깝니다 */
.tf-title span {
  background-color: inherit;
  padding: 1px 6px 1px 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.tf-genre {
  position: relative;
  align-self: flex-start;
  margin-top: 6px;
  padding: 1px 6px 1px 0;
  font: 400 12px/1.2 var(--px);
  background-color: inherit;
}
.thumb-sm .tf-title {
  font-size: 12px;
}
.thumb-sm .tf-genre {
  display: none;
}
.thumb-sm.thumb-fallback {
  padding: 6px;
}
.tf-0 {
  background: var(--p1);
  color: #fff;
}
.tf-1 {
  background: var(--p2);
  color: #fff;
}
.tf-2 {
  background: var(--go);
  color: #fff;
}
.tf-3 {
  background: var(--coin);
  color: var(--ink);
}
.tf-4 {
  background: var(--ink);
  color: var(--coin);
}
.tf-5 {
  background: var(--paper);
  color: var(--ink);
}
.thumb-fallback::before {
  content: '';
  position: absolute;
  inset: 0 0 auto auto;
  width: 44%;
  height: 54%;
}
/* 무늬 셋: 바둑판, 빗금, 점 (경계가 딱 끊어지는 것만) */
.tp-0::before {
  background: conic-gradient(currentColor 25%, transparent 0 50%, currentColor 0 75%, transparent 0) 0 0 / 16px 16px;
}
.tp-1::before {
  background: repeating-linear-gradient(135deg, currentColor 0 6px, transparent 6px 14px);
}
.tp-2::before {
  background: linear-gradient(currentColor 6px, transparent 6px) 0 0 / 14px 14px;
  -webkit-mask: linear-gradient(90deg, #000 6px, transparent 6px) 0 0 / 14px 14px;
  mask: linear-gradient(90deg, #000 6px, transparent 6px) 0 0 / 14px 14px;
}

.skeleton {
  pointer-events: none;
}
.skeleton .card-media {
  animation: blink 1s steps(2, jump-none) infinite;
}
.skeleton i {
  display: block;
  height: 12px;
  background: var(--fog);
}
.skeleton i + i {
  width: 55%;
}
.more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* ---- 빈 화면, 불러오는 중 ------------------------------------------------ */
.empty {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.grid > .empty {
  margin: 0 0 0 -2px;
  border: var(--b);
}
.empty-code {
  font: 700 36px/1 var(--px);
  background: var(--ink);
  color: var(--coin);
  padding: 12px 16px 10px;
  margin-bottom: 8px;
}
.empty h3 {
  font: 800 20px/1.4 var(--sans);
}
.empty p {
  color: #444;
  max-width: 32em;
}
.empty .btn,
.empty .row-gap {
  margin-top: 12px;
}
.empty .row-gap .btn {
  margin-top: 0;
}
.page-loading {
  display: grid;
  place-items: center;
  padding: 110px 0;
}
.page-loading.small {
  padding: 36px 0;
}
.loading {
  font: 400 12px/1 var(--px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.loading i {
  display: flex;
  gap: 4px;
}
.loading i::before,
.loading i::after,
.loading i span {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--ink);
  animation: blink 0.9s steps(2, jump-none) infinite;
}
.loading i span {
  animation-delay: 0.3s;
}
.loading i::after {
  animation-delay: 0.6s;
}
@keyframes blink {
  50% {
    opacity: 0.15;
  }
}

/* ---- 알림(토스트) ---------------------------------------------------------- */
.toasts {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast {
  padding: 11px 14px 11px 12px;
  background: var(--ink);
  color: #fff;
  border-left: 10px solid var(--coin);
  box-shadow: 5px 5px 0 var(--coin);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  max-width: 420px;
  visibility: hidden;
}
.toast.show {
  visibility: visible;
}
.toast-success {
  border-left-color: var(--go);
}
.toast-error {
  background: var(--p1);
  border-left-color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

/* ---- 창(모달) -------------------------------------------------------------- */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.72);
  overflow-y: auto;
  visibility: hidden;
}
.modal-wrap.show {
  visibility: visible;
}
.modal {
  width: min(100%, 460px);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--coin);
}
.modal-wide {
  width: min(100%, 980px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  padding: 6px 6px 6px 14px;
}
.modal-head h3 {
  font: 400 15px/1.3 var(--px14);
}
.modal-head .icon-btn {
  color: #fff;
}
.modal-head .icon-btn:hover {
  color: var(--ink);
}
.modal-body {
  padding: 18px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 20px;
}
.confirm-msg {
  white-space: pre-line;
  font-size: 15px;
}
.capture-preview {
  width: 100%;
  border: var(--b);
}
.code-box {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: var(--b);
  background: var(--fog);
  font: 400 12px/1.6 'GalmuriMono11', ui-monospace, Consolas, monospace;
  resize: vertical;
}
.preview-box {
  margin: 0 auto;
  background: #000;
  border: var(--b);
}
.preview-box iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- 입력 폼 ---------------------------------------------------------------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field > label {
  font: 400 15px/1.3 var(--px14);
}
.field > label small {
  font: 400 12px/1.3 var(--sans);
  color: var(--mute);
  margin-left: 6px;
}
.field > label em {
  font-style: normal;
  color: var(--p1);
}
.field input:not([type='radio']):not([type='checkbox']):not([type='file']),
.field textarea,
.admin-toolbar input,
.share-link input {
  width: 100%;
  padding: 9px 11px;
  border: var(--b);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}
.field input:focus,
.field textarea:focus,
.admin-toolbar input:focus,
.comment-input textarea:focus,
.code-editor:focus {
  outline: 3px solid var(--coin);
  outline-offset: 0;
  border-color: var(--ink);
}
.field input:disabled {
  background: var(--fog);
  color: var(--mute);
}
.field input::placeholder,
.field textarea::placeholder {
  color: #999;
}
.hint {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}
.radio-list {
  display: flex;
  flex-direction: column;
  border: var(--b);
}
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}
.radio + .radio {
  border-top: 1px solid var(--line);
}
.radio:hover {
  background: var(--fog);
}
.radio input,
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
  border: var(--b);
  background: var(--paper);
}
.radio input:checked,
.check input:checked {
  background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--coin);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
}

.page-head {
  margin-bottom: 26px;
}
.page-head h1 {
  font: 700 36px/1.2 var(--px);
}
.page-head p {
  margin-top: 8px;
  color: #444;
}
.panel {
  position: relative;
  border: var(--b);
  padding: 30px 20px 22px;
  margin-top: 28px;
  background: var(--paper);
}
.panel:first-child {
  margin-top: 12px;
}
.panel-h {
  position: absolute;
  left: -2px;
  top: -14px;
  margin: 0;
  padding: 6px 10px 5px;
  background: var(--ink);
  color: #fff;
  font: 400 15px/1 var(--px14);
  white-space: nowrap;
}
.panel-h b {
  color: var(--coin);
  font-weight: 400;
  margin-right: 8px;
}
.panel-h small {
  color: #bdbdbd;
  font: 400 12px/1 var(--px);
  margin-left: 8px;
}
.panel-note {
  margin-bottom: 16px;
  color: #444;
  font-size: 14px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: var(--b);
  background: var(--fog);
  font-size: 14px;
  margin-bottom: 14px;
}
.notice-warn {
  background: var(--coin);
  font-weight: 600;
}

/* ---- 게임 화면 -------------------------------------------------------------- */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 72px;
}
.game-main {
  min-width: 0;
}
.player {
  display: grid;
  place-items: center;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-bottom: 0;
  overflow: hidden;
  position: relative;
}
.stage {
  position: relative;
  background: #000;
  max-width: 100%;
}
.stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  overflow: hidden;
}
.cover-bg {
  position: absolute;
  inset: 0;
}
.cover-bg .thumb img {
  filter: grayscale(1) contrast(1.1) brightness(0.45);
}
.cover:hover .cover-bg .thumb img {
  filter: brightness(0.6);
}
.cover-bg .tf-title,
.cover-bg .tf-genre {
  display: none;
}
.cover-bg .thumb-fallback::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
}
.cover-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 22px 14px;
  background: var(--ink);
  border: 3px solid #fff;
}
.cover-box b {
  font: 700 24px/1 var(--px);
  color: var(--coin);
  animation: blink 1s steps(2, jump-none) infinite;
}
.cover-box small {
  font: 400 12px/1 var(--px);
}
.cover:hover .cover-box {
  background: var(--p1);
  border-color: var(--ink);
}
.cover:hover .cover-box b {
  color: #fff;
  animation: none;
}
.fs-exit {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 7px 10px 6px;
  background: var(--ink);
  color: #fff;
  border: 2px solid #fff;
  font: 400 12px/1 var(--px);
  opacity: 0.4;
}
.fs-exit:hover {
  opacity: 1;
}
.player.pseudo-fs {
  position: fixed;
  inset: 0;
  z-index: 300;
  border: 0;
  height: 100% !important;
}
.player.pseudo-fs .fs-exit,
.player.is-fs .fs-exit {
  display: block;
}
.player.is-fs {
  border: 0;
}
.player-bar {
  display: flex;
  align-items: center;
  background: var(--ink);
  color: #fff;
  border: 3px solid var(--ink);
  border-top: 2px solid #3a3a3a;
}
.bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  color: #fff;
  font: 400 12px/1 var(--px);
  white-space: nowrap;
  text-decoration: none !important;
}
.bar-btn:hover {
  background: var(--coin);
  color: var(--ink);
}

.game-info {
  padding-top: 22px;
}
.game-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.game-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.game-title-row h1 {
  font: 800 30px/1.3 var(--sans);
  letter-spacing: -0.5px;
  word-break: keep-all;
}
.owner-actions {
  display: flex;
  gap: 8px;
  flex: none;
  padding-top: 4px;
}
.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 8px;
  font: 400 12px/1.6 var(--px);
  color: #444;
}
.game-meta b {
  color: var(--ink);
}
.author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 0;
  border-top: var(--b);
  border-bottom: var(--b);
}
.author {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  min-width: 0;
  text-decoration: none !important;
}
.author b {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}
.author:hover b {
  background: var(--coin);
}
.author small {
  color: var(--mute);
  font-size: 13px;
}
.share-btns {
  display: flex;
  gap: 10px;
}

/* 도장판: 다섯 칸, 찍으면 삐딱하게 찍힌다 */
.stamps-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 26px 0 10px;
}
.stamps-head h2 {
  font: 700 24px/1 var(--px);
}
.stamps-head span {
  font: 400 12px/1 var(--px);
  color: var(--mute);
}
.stamps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 0 2px 2px;
}
.stamp {
  margin: 0 0 -2px -2px;
  border: var(--b);
  padding: 16px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  --tone: var(--ink);
  --on: #fff;
}
.stamp-blue {
  --tone: var(--p2);
}
.stamp-red {
  --tone: var(--p1);
}
.stamp-green {
  --tone: var(--go);
}
.stamp-yellow {
  --tone: #8a6d00;
}
.stamp-face {
  display: grid;
  place-items: center;
  min-width: 76px;
  height: 46px;
  padding: 0 8px;
  border: 2px dashed var(--tone);
  color: var(--tone);
  font: 700 24px/1 var(--px);
  white-space: nowrap;
}
.stamp:hover {
  background: var(--fog);
}
.stamp:hover .stamp-face {
  border-style: solid;
}
.stamp.active .stamp-face {
  border: 3px solid var(--tone);
  background: var(--tone);
  color: var(--on);
  transform: rotate(-5deg);
}
.stamp-yellow.active .stamp-face {
  --tone: var(--coin);
  --on: var(--ink);
  border-color: var(--ink);
}
.stamp:nth-child(even).active .stamp-face {
  transform: rotate(4deg);
}
.stamp.pop .stamp-face {
  animation: stamp 0.24s steps(3, jump-none);
}
@keyframes stamp {
  0% {
    transform: scale(1.7) rotate(-12deg);
  }
}
.stamp-hint {
  font-size: 12px;
  color: #444;
  line-height: 1.2;
}
.stamp b {
  font: 700 12px/1 var(--px);
}

.desc {
  margin-top: 26px;
}
.desc-text {
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.75;
  max-height: 9.2em;
  overflow: hidden;
}
.desc.open .desc-text {
  max-height: none;
}
.desc-more {
  margin-top: 8px;
  font: 400 12px/1 var(--px);
  color: var(--p2);
}
.desc-more:hover {
  background: var(--coin);
  color: var(--ink);
}
.game-info .tag-row {
  margin-top: 18px;
}
.file-meta {
  margin-top: 12px;
  font: 400 12px/1.5 var(--px);
  color: var(--mute);
}

/* 댓글 */
.comments {
  margin-top: 44px;
}
.comments-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: var(--b);
  margin-bottom: 18px;
}
.comments-head h2 {
  font: 700 24px/1.2 var(--px);
}
.comments-head h2 span {
  margin-left: 6px;
  color: var(--p1);
}
.comment-form {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.comment-input {
  flex: 1;
  min-width: 0;
}
.comment-input textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: var(--b);
  resize: none;
  font-size: 15px;
  line-height: 1.6;
  background: var(--paper);
}
.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.comment-form-foot > div {
  display: flex;
  gap: 8px;
}
.comment-form-foot .px {
  color: var(--mute);
}
.comment-form.is-reply {
  margin: 12px 0 4px;
}
.comment-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border: 2px dashed var(--ink);
  font-weight: 600;
}
.comment-list {
  margin-top: 22px;
}
.comment-empty {
  padding: 36px 12px;
  text-align: center;
  color: #444;
  border: 2px dashed var(--line);
}
.cmt-thread {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.cmt-thread:first-child {
  border-top: 0;
  padding-top: 0;
}
.cmt {
  display: flex;
  gap: 12px;
}
.cmt-avatar {
  flex: none;
  line-height: 0;
}
.cmt-main {
  flex: 1;
  min-width: 0;
}
.cmt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.cmt-name {
  font-weight: 700;
  color: var(--ink);
}
.cmt-time {
  font: 400 12px/1 var(--px);
  color: var(--mute);
}
.cmt-body {
  margin-top: 3px;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.65;
}
.cmt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 6px;
}
.cmt-actions button {
  font: 400 12px/1.6 var(--px);
  color: var(--mute);
}
.cmt-actions button:hover {
  color: var(--ink);
  background: var(--coin);
}
.cmt-actions .cmt-like.active {
  color: var(--p1);
  font-weight: 700;
}
.replies {
  margin: 14px 0 0 50px;
  padding-left: 14px;
  border-left: var(--b);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reply-slot {
  margin-left: 50px;
}
.cmt-deleted p {
  color: var(--mute);
  font-size: 14px;
}
.cmt.flash .cmt-main {
  animation: flash 1.2s steps(4, jump-none);
}
@keyframes flash {
  0%,
  50% {
    background: var(--coin);
  }
}

/* 옆줄: 다른 게임 */
.game-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: calc(var(--bar) + 20px);
}
.side-block h3 {
  display: inline-block;
  font: 400 15px/1 var(--px14);
  background: var(--ink);
  color: #fff;
  padding: 6px 10px 5px;
}
.side-list {
  border: var(--b);
}
.side-card {
  display: flex;
  gap: 10px;
  padding: 8px;
  color: var(--ink);
  text-decoration: none !important;
  border-top: 1px solid var(--line);
}
.side-card:first-child {
  border-top: 0;
}
.side-card:hover {
  background: var(--coin);
}
.side-card .thumb {
  width: 96px;
  height: 60px;
  flex: none;
  border: 1px solid var(--ink);
  overflow: hidden;
}
.side-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.side-info b {
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-info span {
  font-size: 12px;
  color: #444;
}
.side-info .side-stats {
  font: 400 12px/1.4 var(--px);
  margin-top: auto;
}

/* 공유 창 */
.share-link {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.share-link input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  background: var(--fog);
}
.share-targets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 16px 0 12px;
  padding: 0 0 2px 2px;
}
.share-target {
  margin: 0 0 -2px -2px;
  padding: 11px 8px 10px;
  border: var(--b);
  text-align: center;
  color: var(--ink);
  font: 400 15px/1.2 var(--px14);
  text-decoration: none !important;
}
.share-target:hover {
  background: var(--coin);
}

/* ---- 올리기 화면 ------------------------------------------------------------ */
.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.upload-main,
.upload-side {
  min-width: 0;
}
.upload-side {
  position: sticky;
  top: calc(var(--bar) + 20px);
}
.upload-main .panel > * + * {
  margin-top: 16px;
}
.upload-main .panel > .panel-h {
  margin-top: 0;
}
.seg {
  display: flex;
  padding-left: 2px;
}
.seg button {
  flex: 1;
  margin-left: -2px;
  padding: 9px 8px 8px;
  border: var(--b);
  background: var(--paper);
  font: 400 15px/1.2 var(--px14);
  white-space: nowrap;
  position: relative;
}
.seg button:hover {
  background: var(--fog);
}
.seg button.active {
  background: var(--ink);
  color: var(--coin);
}
.drop {
  display: block;
  border: 2px dashed var(--ink);
  background: var(--paper);
  cursor: pointer;
}
.drop:hover,
.drop.over {
  background: var(--coin);
  border-style: solid;
}
.drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 16px;
  text-align: center;
}
.drop-inner b {
  font-size: 15px;
}
.drop-inner span {
  font-size: 13px;
  color: #444;
}
.code-editor {
  display: block;
  width: 100%;
  padding: 12px;
  border: var(--b);
  background: var(--ink);
  color: #f3f3f3;
  font: 400 13px/1.6 ui-monospace, 'D2Coding', Consolas, monospace;
  resize: vertical;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}
.code-editor::placeholder {
  color: #8a8a8a;
}
.code-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.chosen {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: var(--b);
  background: var(--fog);
  font-size: 14px;
  min-width: 0;
}
.chosen b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chosen .icon-btn {
  margin-left: auto;
}
.preview-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.aspect-pick {
  display: flex;
  flex-wrap: wrap;
  padding-left: 2px;
}
.aspect-opt {
  margin: 0 0 -2px -2px;
  cursor: pointer;
  position: relative;
}
.aspect-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.aspect-opt > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border: var(--b);
  font-size: 13px;
  font-weight: 600;
  background: var(--paper);
}
.aspect-opt:hover > span {
  background: var(--fog);
}
.aspect-opt input:checked + span {
  background: var(--ink);
  color: var(--coin);
}
.aspect-opt input:focus-visible + span {
  outline: 3px solid var(--p2);
  outline-offset: -3px;
}
.aspect-shape {
  border: 2px solid currentColor;
  flex: none;
}
.thumb-drop {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.thumb-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-preview .drop-inner {
  padding: 10px;
}
.thumb-actions {
  margin-top: 10px;
}
.upload-side .panel > .hint {
  margin-top: 12px;
}
.tips ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.65;
  color: #333;
}
.tips li {
  padding: 7px 0 7px 18px;
  position: relative;
}
.tips li + li {
  border-top: 1px solid var(--line);
}
.tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--ink);
}
.submit-box {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.progress span {
  display: block;
  margin-top: 6px;
  font: 400 12px/1 var(--px);
}
.progress-bar {
  height: 14px;
  border: var(--b);
  background: var(--paper);
}
.progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, var(--p1) 0 8px, var(--paper) 8px 10px);
}

/* ---- 로그인 / 가입 / 비밀번호 찾기: 이어하기 화면 ------------------------ */
.auth {
  max-width: 920px;
  margin: 44px auto 72px;
  display: grid;
  grid-template-columns: 5fr 6fr;
  border: 3px solid var(--ink);
}
.auth-screen {
  background: var(--ink);
  color: #fff;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 420px;
}
.auth-code {
  font: 700 36px/1.15 var(--px);
  color: var(--coin);
  word-break: keep-all;
}
.auth-code::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 30px;
  margin-left: 6px;
  vertical-align: -3px;
  background: var(--coin);
  animation: blink 1s steps(2, jump-none) infinite;
}
.auth-screen p {
  font-size: 14px;
  line-height: 1.7;
  color: #dcdcdc;
  word-break: keep-all;
}
.auth-list {
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  font: 400 12px/1.5 var(--px);
  color: #fff;
}
.auth-list li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #3a3a3a;
}
.auth-list li i {
  font-style: normal;
  color: var(--coin);
  flex: none;
}
.auth-form {
  padding: 30px 28px 28px;
  min-width: 0;
}
.auth-form h1 {
  font: 700 24px/1.3 var(--px);
}
.auth-form .lead {
  margin: 6px 0 22px;
  color: #444;
  font-size: 14px;
}
.auth-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-form .seg {
  margin-bottom: 20px;
}
.sent-box {
  border: var(--b);
  background: var(--coin);
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
}
.sent-box b {
  display: block;
  font: 700 24px/1.3 var(--px);
  margin-bottom: 6px;
}

/* 복구 코드: 딱 한 번 보여 주는 표 */
.ticket {
  border: 2px dashed var(--ink);
  background: var(--coin);
  padding: 18px 12px 14px;
  text-align: center;
  margin: 14px 0;
}
.ticket small {
  display: block;
  font: 400 12px/1 var(--px);
  margin-bottom: 12px;
}
.ticket b {
  display: block;
  font: 700 24px/1.3 var(--px);
  letter-spacing: 1px;
  user-select: all;
  word-break: break-all;
}
.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.recovery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.recovery-row + .recovery-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.recovery-row > div {
  min-width: 0;
  flex: 1 1 240px;
}
.recovery-row b {
  display: block;
}
.recovery-row span {
  font-size: 13px;
  color: #444;
}

/* ---- 프로필 ---------------------------------------------------------------- */
.profile-head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}
.profile-info {
  flex: 1;
  min-width: 220px;
}
.profile-info h1 {
  font: 800 30px/1.25 var(--sans);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-id {
  margin-top: 4px;
  font: 400 12px/1.5 var(--px);
  color: var(--mute);
}
.profile-bio {
  margin-top: 12px;
  white-space: pre-wrap;
  max-width: 44em;
}
.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.scoreline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  background: var(--ink);
  color: #fff;
}
.scoreline-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.score {
  padding: 14px 16px 12px;
  border-left: 2px solid #3a3a3a;
  min-width: 0;
}
.score:first-child {
  border-left: 0;
}
.score span {
  display: block;
  font: 400 12px/1 var(--px);
  color: #bdbdbd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score b {
  display: block;
  margin-top: 8px;
  font: 700 24px/1 var(--px);
  color: var(--coin);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ---- 관리자 ---------------------------------------------------------------- */
.admin-tabs {
  margin: 30px 0 0;
  padding-bottom: 10px;
  border-bottom: var(--b);
}
.admin-body {
  padding-top: 18px;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.admin-toolbar input {
  max-width: 300px;
  padding: 5px 10px;
  font-size: 14px;
}
.admin-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.admin-item:first-child {
  border-top: 0;
}
.admin-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.admin-item-main a {
  color: var(--ink);
  font-weight: 700;
}
.admin-detail {
  padding: 8px 10px;
  background: var(--fog);
  font-size: 14px;
  white-space: pre-wrap;
}
.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  justify-content: flex-end;
  flex: none;
  max-width: 50%;
}
.table-wrap {
  overflow-x: auto;
  border: var(--b);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  background: var(--ink);
  color: #fff;
  font: 400 12px/1 var(--px);
  text-align: left;
  padding: 9px 10px 8px;
  white-space: nowrap;
}
.table td {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:hover td {
  background: #fffbd6;
}
.table td a {
  color: var(--ink);
  font-weight: 600;
}
.table-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.table .btn + .btn {
  margin-left: 6px;
}
.table .num {
  font: 400 12px/1 var(--px);
}

/* ---- 바닥 ------------------------------------------------------------------ */
.footer {
  background: var(--ink);
  color: #fff;
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 32px;
}
.footer-mark {
  font: 700 24px/1.2 var(--px);
  color: var(--coin);
}
.footer-sub {
  margin-top: 8px;
  font: 400 12px/1.5 var(--px);
  color: #bdbdbd;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.footer-links a {
  color: #fff;
  font: 400 15px/1.3 var(--px14);
}
.footer-links a:hover {
  color: var(--coin);
  text-decoration: none;
}

/* ---- 좁은 화면 -------------------------------------------------------------- */
@media (max-width: 1000px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .game-side {
    position: static;
  }
  .upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .upload-side {
    position: static;
  }
  .scoreline-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .scoreline-6 .score:nth-child(4) {
    border-left: 0;
  }
  .scoreline-6 .score:nth-child(n + 4) {
    border-top: 2px solid #3a3a3a;
  }
}
@media (max-width: 860px) {
  .band-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 32px;
    padding-bottom: 32px;
  }
  .band h1 {
    font-size: 36px;
  }
  .auth {
    grid-template-columns: minmax(0, 1fr);
    margin: 24px 16px 56px;
  }
  .auth-screen {
    min-height: 0;
    padding: 20px;
  }
  .auth-list {
    display: none;
  }
  .auth-form {
    padding: 24px 20px;
  }
}
@media (max-width: 640px) {
  .hide-sm {
    display: none !important;
  }
  .container,
  .topbar-inner,
  .footer-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topbar-inner {
    gap: 10px;
  }
  .logo span {
    display: none;
  }
  .nav {
    gap: 10px;
  }
  .search button {
    display: none;
  }
  .ticker-r {
    display: none;
  }
  .ticker-in {
    gap: 14px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-body {
    padding: 9px 9px 8px;
  }
  .card-title {
    font-size: 15px;
  }
  .tf-title {
    font-size: 12px;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .game-title-row {
    flex-direction: column;
    gap: 10px;
  }
  .game-title-row h1 {
    font-size: 24px;
  }
  .bar-btn span {
    display: none;
  }
  .stamps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stamp-face {
    min-width: 64px;
    padding: 0 6px;
  }
  /* 아이폰은 16px 보다 작은 입력 칸을 누르면 화면을 확대해 버립니다 */
  .field input:not([type='radio']):not([type='checkbox']):not([type='file']),
  .field textarea,
  .comment-input textarea,
  .search input,
  .admin-toolbar input,
  .share-link input {
    font-size: 16px;
  }
  .ticker-opt {
    display: none;
  }
  .scoreline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scoreline .score:nth-child(odd) {
    border-left: 0;
  }
  .scoreline .score:nth-child(n + 3) {
    border-top: 2px solid #3a3a3a;
  }
  .scoreline-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scoreline-6 .score:nth-child(4) {
    border-left: 2px solid #3a3a3a;
  }
  .replies,
  .reply-slot {
    margin-left: 18px;
  }
  .panel {
    padding: 28px 14px 18px;
  }
  .seg button {
    font: 400 12px/1.3 var(--px);
    padding: 10px 4px 9px;
  }
  .admin-item {
    flex-direction: column;
  }
  .admin-item-actions {
    max-width: none;
    justify-content: flex-start;
  }
  .toasts {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }
  .modal-wrap {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
