:root {
  color-scheme: light;
  --ink: #152033;
  --muted: #68758a;
  --line: #dde4ee;
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --blue: #245edb;
  --blue-dark: #1848b6;
  --blue-soft: #eaf1ff;
  --green: #158267;
  --amber: #b45e09;
  --shadow: 0 18px 50px rgba(28, 42, 68, .11);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: #f0f3f8;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #1649b8;
  outline-offset: 3px;
}
.hidden { display: none !important; }
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 9px;
  color: #fff;
  background: #152033;
  text-decoration: none;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }
body.modal-open { overflow: hidden; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dev-ribbon {
  padding: 7px 16px;
  color: #fff;
  background: #293652;
  text-align: center;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .02em;
}
.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: max-content;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(36, 94, 219, .17);
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.025em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.main-nav { display: flex; align-items: center; gap: 6px; margin-right: auto; }
.main-nav a {
  padding: 9px 11px;
  border-radius: 10px;
  color: #536078;
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
}
.main-nav a:hover, .main-nav a.active { color: var(--blue); background: var(--blue-soft); }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: #35435a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.button:hover { border-color: #bdc8d8; background: #f9fbfd; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.button.primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button.ghost { background: var(--surface-soft); }

main { width: min(1180px, calc(100% - 40px)); flex: 1 0 auto; margin: 0 auto; padding: 42px 0 56px; }
.archive-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 34px;
  border: 1px solid #d5e1fb;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 12%, rgba(83, 129, 242, .19), transparent 28%),
    linear-gradient(135deg, #fff 0%, #f4f7ff 100%);
  box-shadow: 0 20px 60px rgba(43, 70, 130, .08);
}
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin: 9px 0 12px; font-size: clamp(28px, 4vw, 45px); line-height: 1.14; letter-spacing: -.045em; }
.archive-intro p { max-width: 690px; margin-bottom: 0; color: var(--muted); font-size: 15px; }

.archive-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 34px;
}
.archive-controls.stacked { display: grid; align-items: stretch; gap: 11px; }
.game-filter-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.game-filter-row > strong { color: #4d5b72; font-size: 12px; }
.game-filters { display: flex; gap: 7px; overflow-x: auto; padding: 3px; }
.game-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #57647a;
  background: #fff;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.game-filter:hover, .game-filter.active { border-color: #b9cdfa; color: var(--blue); background: var(--blue-soft); }
.game-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid #cfd9eb;
  border-radius: 9px;
  background: linear-gradient(145deg, #eef4ff, #dbe7ff);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.game-logo img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.game-logo.small { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }
.game-logo.tiny { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; }
.game-logo.admin { width: 42px; height: 42px; border-radius: 11px; font-size: 15px; }
.game-logo.preview { width: 96px; height: 96px; border-radius: 20px; font-size: 30px; }
.archive-browser-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 24px; }
.archive-category-sidebar { min-width: 0; position: sticky; top: 92px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 26px rgba(30, 44, 70, .045); }
.archive-section { min-width: 0; }
.sidebar-heading { padding: 2px 4px 12px; border-bottom: 1px solid var(--line); }
.sidebar-heading h2 { margin: 4px 0 0; font-size: 18px; }
.sidebar-context { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.archive-category-tree { display: grid; gap: 4px; margin-top: 10px; }
.category-game-group { display: grid; gap: 4px; }
.category-game-group + .category-game-group { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.category-game-heading { display: flex; align-items: center; gap: 7px; padding: 5px 7px 4px; color: #526078; font-size: 10px; font-weight: 900; }
.category-empty { margin: 9px 4px 2px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.category-tree-filter {
  width: 100%;
  min-height: 40px;
  padding: 8px 9px 8px calc(9px + var(--depth, 0) * 16px);
  border: 0;
  border-radius: 9px;
  color: #536078;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}
.category-tree-filter:hover, .category-tree-filter.active { color: var(--blue); background: var(--blue-soft); }
.category-tree-filter.favorite { margin-bottom: 5px; border-bottom: 1px solid var(--line); border-radius: 9px 9px 0 0; }
.search-field { flex: 1; }
.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(30, 44, 70, .04);
}
.category-filters { display: flex; align-items: center; gap: 7px; overflow-x: auto; padding: 4px; }
.filter-chip, .sort-tab {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #57647a;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.filter-chip:hover, .filter-chip.active, .sort-tab:hover, .sort-tab.active { border-color: #b9cdfa; background: var(--blue-soft); color: var(--blue); }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 6px 0 0; font-size: 25px; letter-spacing: -.035em; }
.sort-tabs { display: flex; gap: 7px; }
.result-summary { min-height: 24px; margin: 12px 0 16px; color: var(--muted); font-size: 13px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sheet-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(30, 44, 70, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sheet-card:hover { transform: translateY(-3px); border-color: #c4d3ed; box-shadow: var(--shadow); }
.sheet-card-link { display: block; color: inherit; text-decoration: none; }
.sheet-thumb {
  min-height: 205px;
  display: grid;
  place-items: center;
  padding: 22px;
  background: var(--thumb-bg, linear-gradient(145deg, #e9efff, #dce7ff));
  border-bottom: 1px solid rgba(29, 59, 120, .09);
}
.sheet-thumb-image { width: 138px; max-height: 176px; display: block; object-fit: contain; border-radius: 7px; background: #fff; box-shadow: 0 16px 32px rgba(26, 45, 83, .18); }
.mini-sheet {
  width: 138px;
  min-height: 164px;
  padding: 15px 13px;
  border-radius: 7px;
  color: #26334a;
  background: #fff;
  box-shadow: 0 16px 32px rgba(26, 45, 83, .18);
  transform: rotate(-1.5deg);
}
.mini-sheet strong { display: block; padding-bottom: 8px; border-bottom: 3px solid var(--thumb-accent, #3262d4); font-size: 11px; line-height: 1.3; }
.mini-sheet i { display: block; height: 7px; margin-top: 9px; border-radius: 8px; background: #e7ebf2; }
.mini-sheet i:nth-child(3) { width: 82%; }
.mini-sheet i:nth-child(4) { width: 92%; }
.mini-sheet i:nth-child(5) { width: 67%; }
.card-body { padding: 17px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.game-card-label, .game-meta-chip { display: inline-flex; align-items: center; gap: 5px; }
.status-pill { padding: 3px 7px; border-radius: 999px; background: #e9f8f3; color: var(--green); font-weight: 900; }
.status-pill.unreviewed { background: #fff4db; color: #8b5a12; }
.motion-pill { padding: 3px 7px; border-radius: 999px; color: #5b3aa8; background: #f0eaff; font-weight: 900; }
.card-body h3 { margin: 9px 0 7px; font-size: 17px; line-height: 1.35; letter-spacing: -.025em; }
.card-summary { min-height: 42px; margin-bottom: 14px; color: #637086; font-size: 12.5px; line-height: 1.6; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.card-stats { display: flex; gap: 10px; }
.card-quick-actions { display: flex; justify-content: flex-end; padding: 0 15px 15px; }
.favorite-quick {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #56647a;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.favorite-quick:hover, .favorite-quick[aria-pressed="true"] { border-color: #b9cdfa; color: var(--blue); background: var(--blue-soft); }
.empty-state {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 260px;
  padding: 32px;
  border: 1px dashed #bcc8da;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}
.empty-state strong { color: var(--ink); }

.ad-preview {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 38px;
  border: 1px dashed #b8c4d6;
  border-radius: 15px;
  color: #718097;
  background: #f7f9fc;
  text-align: center;
}
.ad-preview span { font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.ad-preview strong { color: #526078; font-size: 13px; }
.ad-preview small { font-size: 11px; }

.site-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px max(24px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { margin-bottom: 4px; color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  padding: 11px 15px;
  border-radius: 11px;
  color: #fff;
  background: #202a3c;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  font-size: 12px;
  font-weight: 760;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .site-header { gap: 12px; padding: 10px 18px; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .site-header > .button { margin-left: auto; }
  .archive-intro { align-items: flex-start; flex-direction: column; }
  .archive-controls { align-items: stretch; flex-direction: column; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-browser-layout { grid-template-columns: minmax(0, 1fr); }
  .archive-category-sidebar { position: static; }
  .archive-category-tree { display: flex; width: 100%; max-width: 100%; overflow-x: auto; }
  .category-game-group { display: flex; align-items: center; flex: 0 0 auto; }
  .category-game-group + .category-game-group { margin: 0 0 0 7px; padding: 0 0 0 7px; border-top: 0; border-left: 1px solid var(--line); }
  .category-game-heading { min-width: max-content; }
  .category-empty { min-width: max-content; }
  .category-tree-filter { width: auto; min-width: max-content; padding-left: 10px; }
}
@media (max-width: 620px) {
  .brand small { display: none; }
  .site-header > .button { min-height: 38px; padding: 7px 10px; font-size: 11px; }
  main { width: min(100% - 24px, 1180px); padding-top: 22px; }
  .archive-intro { padding: 24px 20px; border-radius: 18px; }
  .archive-intro .button { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .sort-tabs { width: 100%; overflow-x: auto; }
  .card-grid { grid-template-columns: 1fr; }
  .game-logo-modal .form-actions { flex-direction: column; }
  .game-logo-modal .form-actions .button { width: 100%; }
  .site-footer { flex-direction: column; padding: 24px 18px; }
}

/* Development prototype: shared dialogs and account state */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 28, 47, .58);
  backdrop-filter: blur(5px);
}
.modal-card {
  width: min(520px, 100%);
  max-height: min(760px, 90vh);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(10, 20, 40, .28);
}
.modal-card.wide { width: min(660px, 100%); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-heading h2 { margin: 4px 0 7px; font-size: 22px; letter-spacing: -.03em; }
.modal-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #526078;
  cursor: pointer;
}
.login-options { display: grid; gap: 10px; margin-top: 22px; }
.login-option {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.login-option:hover { border-color: #b8c9ed; background: #f7faff; }
.google-glyph {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  border: 1px solid #d7dde7;
  border-radius: 50%;
  color: #3165cc;
  background: #fff;
  font-weight: 900;
}
.login-option strong, .login-option small { display: block; }
.login-option small { margin-top: 3px; color: var(--muted); }
.prototype-notice { margin: 18px 0 0; padding: 11px 12px; border-radius: 10px; background: #fff8e8; color: #82520e; font-size: 11.5px; line-height: 1.55; }
.session-button { max-width: 190px; }
.session-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-button small { color: #7b8798; font-size: 9px; }
.account-actions { display: flex; gap: 9px; margin-top: 18px; }

/* Detail page */
.page-loading { min-height: 420px; display: grid; place-items: center; color: var(--muted); }
.detail-main { padding-top: 24px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(30, 44, 70, .06);
}
.detail-hero h1 { max-width: 820px; margin: 9px 0 12px; font-size: clamp(27px, 4vw, 42px); }
.detail-summary { max-width: 780px; margin: 0 0 18px; color: #5f6d83; font-size: 15px; line-height: 1.7; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip { padding: 6px 9px; border-radius: 999px; background: var(--surface-soft); color: #536078; font-size: 11px; font-weight: 760; }
.selected-game-preview { display: flex; align-items: center; gap: 8px; min-height: 34px; margin-top: 7px; color: #59677c; font-size: 11px; }
.detail-actions { display: flex; flex-direction: column; gap: 9px; min-width: 190px; }
.detail-actions .button { width: 100%; }
.detail-stats { display: flex; justify-content: center; gap: 14px; color: var(--muted); font-size: 11px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .5fr); gap: 22px; margin-top: 22px; }
.content-panel, .info-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(30, 44, 70, .045);
}
.content-panel { padding: 24px; }
.unreviewed-warning { display: grid; gap: 4px; margin-bottom: 18px; padding: 13px 14px; border: 1px solid #efcf8e; border-radius: 12px; color: #73511a; background: #fff9ec; font-size: 12px; line-height: 1.6; }
.unreviewed-warning strong { color: #68430b; }
.sheet-visual {
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 32px;
  border-radius: 16px;
  background: var(--detail-bg, linear-gradient(145deg, #e9efff, #cfddff));
}
.sheet-visual img { display: block; max-width: 100%; max-height: 760px; object-fit: contain; border-radius: 9px; box-shadow: 0 22px 55px rgba(24, 42, 82, .2); }
.sheet-playback-stage {
  position: relative;
  width: min(100%, var(--playback-max-width, 100%));
  aspect-ratio: var(--playback-ratio, auto);
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(24, 42, 82, .2);
}
.sheet-visual .sheet-playback-stage .sheet-playback-poster {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}
.sheet-visual .sheet-playback-layer {
  position: absolute;
  z-index: 1;
  max-width: none;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
  pointer-events: none;
}
.sheet-playback-controls { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.sheet-playback-controls .playback-replay { min-height: 36px; padding: 7px 11px; font-size: 11px; }
.full-sheet {
  width: min(430px, 100%);
  min-height: 560px;
  padding: 30px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(24, 42, 82, .2);
}
.full-sheet h2 { margin: 0 0 9px; padding-bottom: 15px; border-bottom: 5px solid var(--detail-accent, #2f61d6); font-size: 24px; line-height: 1.25; }
.full-sheet > p { color: var(--muted); font-size: 12px; }
.visual-steps { display: grid; gap: 12px; margin-top: 24px; }
.visual-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border-radius: 11px; background: #f4f7fb; }
.visual-step span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--detail-accent, #2f61d6); font-size: 11px; font-weight: 900; }
.visual-step strong { display: block; margin-bottom: 3px; font-size: 12px; }
.visual-step small { color: var(--muted); font-size: 10px; }
.content-copy { padding-top: 24px; }
.content-copy h2 { margin-bottom: 10px; font-size: 21px; letter-spacing: -.03em; }
.content-copy p { color: #5f6d83; font-size: 14px; line-height: 1.75; }
.check-list { display: grid; gap: 9px; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 11px 12px 11px 38px; border-radius: 10px; background: #f5f7fb; font-size: 13px; }
.check-list li::before { content: "✓"; position: absolute; left: 13px; top: 10px; color: var(--green); font-weight: 900; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.info-panel { padding: 20px; }
.info-panel h2 { margin-bottom: 14px; font-size: 16px; }
.definition-list { display: grid; gap: 11px; margin: 0; }
.definition-list div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #edf0f4; }
.definition-list div:last-child { padding-bottom: 0; border-bottom: 0; }
.definition-list dt { color: var(--muted); font-size: 11px; }
.definition-list dd { margin: 0; font-size: 12px; font-weight: 720; overflow-wrap: anywhere; }
.review-card { border-color: #cdeadd; background: #f5fcf9; }
.review-card strong { color: var(--green); }
.report-link { border: 0; padding: 0; color: #9c4d30; background: transparent; font-size: 12px; text-decoration: underline; cursor: pointer; }
.related-section { margin-top: 34px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.related-link { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; }
.related-link:hover { border-color: #b9cbed; box-shadow: 0 8px 22px rgba(30, 44, 70, .07); }
.related-link strong, .related-link span { display: block; }
.related-link span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.unavailable-panel { min-height: 420px; display: grid; place-items: center; padding: 40px; border: 1px solid var(--line); border-radius: 20px; background: #fff; text-align: center; }
.unavailable-panel h1 { margin-bottom: 9px; font-size: 27px; }
.unavailable-panel p { max-width: 560px; color: var(--muted); }
.ad-ineligible { padding: 14px; border: 1px dashed #d4a58e; border-radius: 12px; background: #fff8f4; color: #985132; text-align: center; font-size: 11px; }

/* Forms and upload */
.narrow-main { width: min(860px, calc(100% - 40px)); }
.page-title-block { margin-bottom: 26px; }
.page-title-block h1 { margin: 8px 0 10px; font-size: clamp(30px, 5vw, 44px); }
.page-title-block > p, .page-title-block > div > p { max-width: 760px; margin-bottom: 0; color: var(--muted); }
.login-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 30px rgba(30, 44, 70, .05);
}
.login-gate h2 { margin: 14px 0 8px; font-size: 22px; }
.login-gate p { max-width: 590px; margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.gate-symbol { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #cbd6eb; border-radius: 50%; color: #3165cc; background: #f8faff; font-size: 20px; font-weight: 900; }
.form-panel, .success-panel, .submission-list {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(30, 44, 70, .05);
}
.form-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.form-section-heading > div { display: flex; align-items: center; gap: 10px; }
.form-section-heading h2 { margin: 0; font-size: 19px; }
.form-section-heading.second { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.step-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 12px; font-weight: 900; }
.required-note { color: var(--muted); font-size: 11px; }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: block; margin-bottom: 15px; }
.field > span { display: block; margin-bottom: 6px; color: #45536a; font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid #ccd5e1;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #aebccd; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10.5px; }
.file-field { padding: 15px; border: 1px dashed #b8c4d4; border-radius: 12px; background: #f8fafc; }
.file-field input { padding: 8px; background: #fff; }
.upload-image-preview { margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f5f7fa; text-align: center; }
.upload-image-preview img { max-width: 100%; max-height: 390px; border-radius: 8px; box-shadow: 0 12px 28px rgba(24, 42, 82, .14); }
.editor-handoff-note { margin: 12px 0 0; color: #526078; font-size: 11.5px; line-height: 1.6; }
.check-field { display: flex; gap: 10px; align-items: flex-start; margin: 11px 0; color: #536078; font-size: 12px; line-height: 1.6; }
.check-field input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; accent-color: var(--blue); }
.form-error { margin-top: 15px; padding: 11px 12px; border: 1px solid #f2b8ae; border-radius: 10px; color: #9a3d30; background: #fff5f3; font-size: 12px; }
.form-warning { margin: 14px 0; padding: 12px; border: 1px solid #efcf8e; border-radius: 10px; color: #73511a; background: #fff9ec; font-size: 12px; }
.form-warning p { margin: 0 0 9px; }
.form-warning .button { min-height: 36px; padding: 7px 11px; font-size: 11px; }
.direct-publish-notice { margin: 20px 0; padding: 15px 16px; border: 1px solid #efcf8e; border-radius: 12px; color: #73511a; background: #fff9ec; }
.direct-publish-notice strong { display: block; margin-bottom: 5px; color: #68430b; }
.direct-publish-notice p { margin: 0; font-size: 12px; line-height: 1.65; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.success-panel { border-color: #bee4d5; background: #f5fcf9; }
.success-panel h2 { margin-bottom: 8px; color: #146c56; }
.success-panel p { color: #527166; }
.success-panel .button { margin-top: 8px; }
.submission-list { margin-top: 22px; }
.section-heading.compact { align-items: center; }
.section-heading.compact h2 { font-size: 20px; }
.submission-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.submission-row:last-child { border-bottom: 0; }
.submission-row strong, .submission-row small { display: block; }
.submission-row small { margin-top: 4px; color: var(--muted); }
.state-badge { align-self: center; padding: 5px 8px; border-radius: 999px; background: #fff4db; color: #98600f; font-size: 10px; font-weight: 900; }
.state-badge.approved { background: #e9f8f3; color: var(--green); }
.state-badge.rejected { background: #fff0ed; color: #a13f31; }

/* Admin */
.admin-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.admin-title h1 { max-width: 820px; }
.compact-gate { min-height: 330px; }
.admin-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.admin-panel { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: 0 9px 28px rgba(30, 44, 70, .045); }
.moderation-admin-panel { grid-column: 1 / -1; }
.audit-panel { grid-column: 1 / -1; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 21px; }
.panel-description { margin: 10px 0 18px; color: var(--muted); font-size: 12px; }
.count-badge { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 12px; font-weight: 900; }
.moderation-queue { display: grid; gap: 11px; }
.moderation-card { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfe; }
.moderation-card h3 { margin: 5px 0 6px; font-size: 15px; }
.moderation-card p { margin-bottom: 10px; color: var(--muted); font-size: 11.5px; }
.moderation-preview { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: start; margin: 10px 0; }
.moderation-preview img { width: 88px; height: 112px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.moderation-placeholder { width: 88px; height: 112px; display: grid; place-items: center; padding: 8px; border: 1px dashed #aeb9ca; border-radius: 8px; color: var(--muted); background: #fff; text-align: center; font-size: 10px; }
.moderation-preview strong, .moderation-preview small { display: block; }
.moderation-preview small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.moderation-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 10px; }
.moderation-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.moderation-actions .button { min-height: 35px; padding: 7px 10px; font-size: 11px; }
.button.success { border-color: #8fd2bb; color: #146b54; background: #ecf9f4; }
.button.danger { border-color: #efb7ad; color: #963b2e; background: #fff3f1; }
.queue-empty { padding: 28px 16px; border: 1px dashed #bfc9d8; border-radius: 12px; color: var(--muted); text-align: center; font-size: 12px; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 9px; align-items: end; margin-bottom: 18px; padding: 13px; border-radius: 13px; background: #f5f7fb; }
.inline-form.category-form { grid-template-columns: minmax(150px, .8fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.inline-form.game-form { grid-template-columns: minmax(0, 1fr) minmax(220px, 1.25fr) auto; }
.inline-form .field { margin-bottom: 0; }
.category-tree { display: grid; gap: 6px; }
.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 8px 7px calc(10px + var(--depth, 0) * 22px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.category-row.inactive { opacity: .58; background: #f6f7f9; }
.category-name { min-width: 0; }
.category-name strong, .category-name small { display: block; }
.category-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.category-name small { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.game-admin-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.game-logo-modal { width: min(560px, 100%); }
.game-logo-preview { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 136px; margin-bottom: 16px; padding: 18px; border: 1px dashed #bdc9dc; border-radius: 15px; background: #f8faff; color: #526078; font-size: 12px; font-weight: 800; }
.logo-status { min-height: 20px; margin: 9px 0 14px; color: var(--muted); font-size: 11px; }
.logo-status.form-error { padding: 9px 11px; color: #9d3328; }
.row-actions { display: flex; gap: 4px; }
.mini-action { min-width: 40px; min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #5b687d; cursor: pointer; font-size: 10px; }
.mini-action:hover { border-color: #b9c8e2; background: #f5f8fe; color: var(--blue); }
.audit-log { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.audit-log li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 9px 11px; border-radius: 9px; background: #f7f9fc; color: #526078; font-size: 11px; }
.audit-log time { color: var(--muted); }
.sheet-admin-panel { grid-column: 1 / -1; }
.admin-sheet-list { display: grid; gap: 8px; }
.admin-sheet-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.admin-sheet-row strong, .admin-sheet-row small { display: block; }
.admin-sheet-row strong { margin-top: 5px; font-size: 13px; }
.admin-sheet-row small { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.admin-sheet-actions { display: flex; gap: 7px; }
.admin-sheet-actions .button { min-height: 38px; padding: 7px 11px; font-size: 11px; }

/* Share and report */
.share-preview { margin-top: 18px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #f5f7fb; }
.share-preview strong { display: block; margin-bottom: 6px; }
.share-preview pre { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: #526078; font: 11px/1.55 inherit; }
.share-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.share-options .button { padding-inline: 8px; }
.share-note { margin: 12px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.report-form { margin-top: 18px; }

/* Policy */
.policy-main { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 26px; }
.policy-nav { position: sticky; top: 98px; display: grid; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.policy-nav a { padding: 9px 10px; border-radius: 8px; color: #56647a; text-decoration: none; font-size: 12px; font-weight: 760; }
.policy-nav a:hover { color: var(--blue); background: var(--blue-soft); }
.policy-document { padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 10px 32px rgba(30, 44, 70, .05); }
.policy-document > header { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.policy-document h1 { margin: 8px 0 10px; font-size: 35px; }
.policy-document > header p { color: var(--muted); }
.policy-document section { scroll-margin-top: 100px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.policy-document section:last-child { border-bottom: 0; }
.policy-document section h2 { font-size: 21px; }
.policy-document section p, .policy-document section li { color: #536078; font-size: 13px; line-height: 1.75; }
.policy-document section li + li { margin-top: 6px; }
.operator-check { padding: 22px !important; border: 1px solid #ead39f !important; border-radius: 14px; background: #fffaf0; }
.operator-check dl { display: grid; gap: 10px; margin: 0; }
.operator-check dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
.operator-check dt { color: #8b5a12; font-size: 12px; font-weight: 900; }
.operator-check dd { margin: 0; color: #6f5838; font-size: 12px; }

/* Full editor shell: shared navigation stays visible while the isolated editor fills the remainder. */
.editor-fullscreen-body {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
}
body.editor-fullscreen-body .site-header { position: relative; top: auto; }
.editor-dev-bar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  color: #fff;
  background: #293652;
  font-size: 11px;
  font-weight: 760;
}
.editor-dev-bar a { color: #fff; text-decoration: none; }
.editor-dev-bar a:hover { text-decoration: underline; }
body.editor-fullscreen-body .editor-fullscreen-main { width: 100%; height: auto; min-height: 0; margin: 0; padding: 0; }
.editor-fullscreen-frame { width: 100%; height: 100%; min-width: 0; display: block; border: 0; background: #fff; }
.editor-preview-main { width: min(1320px, calc(100% - 32px)); }
.guided-editor {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid #d5e1fb;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #f3f7ff);
}
.guided-editor h1 { margin: 8px 0 10px; font-size: clamp(27px, 4vw, 40px); }
.guided-editor p { max-width: 850px; margin-bottom: 0; color: var(--muted); font-size: 13px; }
.editor-frame-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 15px 46px rgba(25, 40, 68, .12); }
.frame-heading { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f8fafc; font-size: 11px; }
.frame-heading > div { display: flex; align-items: center; gap: 9px; }
.frame-heading strong { color: var(--ink); font-size: 12px; }
.editor-frame-shell iframe { width: 100%; height: min(860px, 76vh); min-height: 620px; display: block; border: 0; background: #eef2f7; }
.editor-help-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 22px; }
.editor-help-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.editor-help-grid h2 { margin: 12px 0 6px; font-size: 15px; }
.editor-help-grid p { margin-bottom: 0; color: var(--muted); font-size: 11.5px; }
.editor-ad-preview { margin-top: 22px; }

@media (max-width: 900px) {
  .detail-hero { grid-template-columns: 1fr; }
  .detail-actions { min-width: 0; flex-direction: row; flex-wrap: wrap; }
  .detail-actions .button { width: auto; flex: 1; }
  .detail-stats { width: 100%; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-workspace { grid-template-columns: 1fr; }
  .audit-panel { grid-column: auto; }
  .policy-main { grid-template-columns: 1fr; }
  .policy-nav { position: static; display: flex; overflow-x: auto; }
  .guided-editor { align-items: flex-start; flex-direction: column; }
  .editor-help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .detail-hero, .content-panel, .info-panel, .form-panel, .success-panel, .submission-list, .admin-panel, .policy-document { padding: 19px; border-radius: 16px; }
  .detail-actions { flex-direction: column; }
  .detail-actions .button { width: 100%; }
  .detail-side { grid-template-columns: 1fr; }
  .sheet-visual { min-height: 380px; padding: 15px; }
  .full-sheet { min-height: 470px; padding: 20px; }
  .related-grid { grid-template-columns: 1fr; }
  .field-grid.two { grid-template-columns: 1fr; }
  .admin-title { align-items: flex-start; flex-direction: column; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form.category-form { grid-template-columns: 1fr; }
  .inline-form.game-form { grid-template-columns: 1fr; }
  .category-row { grid-template-columns: 1fr; }
  .admin-sheet-row { grid-template-columns: 1fr; }
  .admin-sheet-actions { justify-content: flex-end; }
  .row-actions { flex-wrap: wrap; }
  .audit-log li { grid-template-columns: 1fr; }
  .share-options { grid-template-columns: 1fr; }
  .operator-check dl div { grid-template-columns: 1fr; gap: 3px; }
  .editor-preview-main { width: min(100% - 18px, 1320px); }
  .guided-editor { padding: 20px; }
  .guided-editor .button { width: 100%; }
  .frame-heading { align-items: flex-start; flex-direction: column; }
  .editor-frame-shell iframe { min-height: 680px; height: 82vh; }
  .editor-help-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
