/* 또또스쿨 게임 등록 사이트 */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--sp-bg);
  color: var(--sp-ink);
  font-family: var(--sp-font-body);
  font-size: 16px;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.ad-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px clamp(14px, 3vw, 32px);
  background: var(--sp-surface);
  border-bottom: 2px solid var(--sp-line);
  position: sticky; top: 0; z-index: 10;
}
.ad-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.ad-brand b { display: block; font-family: var(--sp-font-display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.ad-brand small { color: var(--sp-ink-soft); font-size: 13px; }
.ad-logo {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--sp-primary); color: var(--sp-primary-ink);
  font-family: var(--sp-font-display); font-size: 22px;
  box-shadow: 0 4px 0 var(--sp-primary-press);
}
.ad-nav { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.ad-main { max-width: 1180px; margin: 0 auto; padding: clamp(14px, 3vw, 32px); }
.ad-muted { color: var(--sp-ink-soft); line-height: 1.6; }
.ad-error { color: var(--sp-bad); font-weight: 700; min-height: 1.2em; margin: 8px 0 0; }

.ad-auth {
  max-width: 460px; margin: 6vh auto; padding: 32px;
  background: var(--sp-surface); border-radius: var(--sp-radius-l); box-shadow: var(--sp-shadow);
}
.ad-auth h1 { font-family: var(--sp-font-display); font-weight: 400; font-size: 28px; margin: 0 0 8px; word-break: keep-all; }

.ad-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--sp-radius-s);
  background: var(--sp-bg-2); color: var(--sp-ink); text-decoration: none; cursor: pointer;
  font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 0 var(--sp-line);
}
.ad-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sp-line); }
.ad-btn:disabled { opacity: .55; cursor: default; }
.ad-btn-primary { background: var(--sp-primary); color: var(--sp-primary-ink); box-shadow: 0 3px 0 var(--sp-primary-press); }
.ad-btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--sp-line); }
.ad-btn-danger { color: var(--sp-bad); }
.ad-btn-block { width: 100%; min-height: 52px; font-size: 18px; margin-top: 8px; }
.ad-btn-s { min-height: 36px; padding: 0 12px; font-size: 14px; }
.ad-btn.is-on { background: var(--sp-accent); color: var(--sp-accent-ink); }
.ad-mini {
  width: 32px; height: 32px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--sp-bg-2); color: var(--sp-ink); font-size: 14px;
}
.ad-mini:disabled { opacity: .3; cursor: default; }

.ad-field { display: block; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.ad-field > span { display: block; font-weight: 700; font-size: 14px; color: var(--sp-ink-soft); margin-bottom: 6px; }
.ad-field em { display: block; font-style: normal; font-size: 13px; color: var(--sp-ink-soft); margin-top: 4px; line-height: 1.5; }
.ad-field input:not([type=checkbox]):not([type=file]), .ad-field select, .ad-input {
  width: 100%; height: 46px; padding: 0 12px;
  border: 2px solid var(--sp-line); border-radius: var(--sp-radius-s);
  background: var(--sp-surface); outline: none;
}
.ad-field input:focus, .ad-field select:focus, .ad-input:focus { border-color: var(--sp-primary); }
.ad-field input[type=file] { width: 100%; font-size: 14px; }
.ad-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ad-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 640px) { .ad-grid2, .ad-grid3 { grid-template-columns: 1fr; } }
.ad-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-checks label, .ad-check {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  background: var(--sp-bg-2); border-radius: 999px; cursor: pointer; font-weight: 700;
}
.ad-check { margin-bottom: 14px; border-radius: var(--sp-radius-s); }
.ad-thumbprev {
  aspect-ratio: 8 / 5; border-radius: var(--sp-radius-s); background: var(--sp-bg-2);
  display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; color: var(--sp-ink-soft);
}
.ad-thumbprev img { width: 100%; height: 100%; object-fit: cover; }

.ad-summary { display: grid; grid-template-columns: repeat(3, 1fr) 2fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 860px) { .ad-summary { grid-template-columns: 1fr 1fr; } }
.ad-stat { background: var(--sp-surface); border-radius: var(--sp-radius-m); padding: 14px 16px; box-shadow: var(--sp-shadow); }
.ad-stat small { display: block; color: var(--sp-ink-soft); font-size: 13px; }
.ad-stat b { font-family: var(--sp-font-num); font-size: 30px; }
.ad-stat span { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ad-sub {
  display: inline-block; font-style: normal; font-size: 13px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; background: var(--c); color: #fff;
}

.ad-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-toolbar .ad-input { flex: 1 1 220px; width: auto; }
.ad-toolbar select.ad-input { flex: 0 0 140px; }

.ad-unreg { background: var(--sp-surface); border-radius: var(--sp-radius-m); padding: 14px 16px; margin-bottom: 14px; border: 2px dashed var(--sp-accent); }
.ad-unreg h3 { margin: 0; font-size: 17px; }
.ad-unreg p { margin: 4px 0 10px; font-size: 14px; }
.ad-unreg-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-chipbtn { border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; background: var(--sp-bg-2); font-weight: 700; }
.ad-chipbtn small { color: var(--sp-ink-soft); font-weight: 400; margin-left: 4px; }

.ad-list { display: grid; gap: 10px; }
.ad-empty { padding: 40px; text-align: center; background: var(--sp-surface); border-radius: var(--sp-radius-m); color: var(--sp-ink-soft); }
.ad-row {
  display: grid; grid-template-columns: 160px 1fr auto; gap: 14px; align-items: center;
  background: var(--sp-surface); border-radius: var(--sp-radius-m); padding: 10px; box-shadow: var(--sp-shadow);
}
.ad-row.is-hidden { opacity: .6; }
.ad-thumb {
  position: relative; display: grid; place-items: center; aspect-ratio: 8 / 5; border-radius: var(--sp-radius-s);
  background: var(--c); color: #fff; overflow: hidden; text-decoration: none; font-weight: 700; text-align: center; padding: 6px; font-size: 14px;
}
.ad-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-info { min-width: 0; }
.ad-info h3 { margin: 0 0 4px; font-size: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ad-meta, .ad-desc, .ad-folder { margin: 2px 0; font-size: 14px; }
.ad-desc { color: var(--sp-ink-soft); }
.ad-folder { color: var(--sp-ink-soft); font-size: 13px; }
.ad-badge { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--sp-bg-2); color: var(--sp-ink-soft); }
.ad-badge-star { background: var(--sp-gold); color: #fff; }
.ad-badge-bad { background: var(--sp-bad); color: #fff; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 330px; }
.ad-move { display: flex; gap: 4px; }
@media (max-width: 860px) {
  .ad-row { grid-template-columns: 120px 1fr; }
  .ad-actions { grid-column: 1 / -1; max-width: none; justify-content: flex-start; }
}

.ad-dialog {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  border: 0; border-radius: var(--sp-radius-l); padding: 0;
  background: var(--sp-surface); color: var(--sp-ink); box-shadow: var(--sp-shadow);
}
.ad-dialog-s { width: min(440px, calc(100vw - 24px)); }
.ad-dialog::backdrop { background: rgba(30, 25, 20, .45); }
.ad-dlg-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 2px solid var(--sp-line); position: sticky; top: 0; background: var(--sp-surface); z-index: 1; }
.ad-dlg-head h2 { margin: 0; font-family: var(--sp-font-display); font-weight: 400; font-size: 24px; }
.ad-x { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--sp-bg-2); font-size: 22px; cursor: pointer; }
.ad-dlg-body { padding: 18px 20px; }
.ad-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 2px solid var(--sp-line); position: sticky; bottom: 0; background: var(--sp-surface); }

.ad-board { margin-bottom: 18px; }
.ad-board header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ad-board h3 { margin: 0; font-size: 17px; }
.ad-board h3 small { color: var(--sp-ink-soft); font-weight: 400; }
.ad-board header .ad-btn { margin-left: auto; }
.ad-board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ad-board li { display: grid; grid-template-columns: 32px 1fr auto auto 32px; gap: 10px; align-items: center; padding: 6px 10px; background: var(--sp-bg-2); border-radius: 8px; }
.ad-board li em { font-style: normal; font-weight: 700; }
.ad-board li small { color: var(--sp-ink-soft); font-size: 12px; }
@media (max-width: 560px) { .ad-board li { grid-template-columns: 28px 1fr auto 32px; } .ad-board li small { display: none; } }

.ad-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--sp-ink); color: var(--sp-surface); padding: 12px 20px; border-radius: 999px;
  font-weight: 700; transition: transform .25s; z-index: 100; max-width: calc(100vw - 32px); text-align: center;
}
.ad-toast.show { transform: translate(-50%, 0); }
.ad-toast.bad { background: var(--sp-bad); color: #fff; }
