:root {
  --bg: #09090a;
  --bg-soft: #0f0f11;
  --surface: #151518;
  --surface-2: #1b1b1f;
  --line: #2a2a2f;
  --line-soft: #202025;
  --text: #f1f1ef;
  --muted: #a0a0a6;
  --muted-2: #74747d;
  --white: #ffffff;
  --black: #000000;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #eab308;
  --info: #8b8b92;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -15%, rgba(255,255,255,.08), transparent 32rem),
    linear-gradient(180deg, #0d0d0f 0%, var(--bg) 42%, #050505 100%);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

button,
input,
textarea {
  font: inherit;
}

::selection {
  background: var(--white);
  color: var(--black);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 42px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(9,9,10,.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--white);
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.site-nav a {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.site-nav a:hover,
.site-nav .nav-cta {
  color: var(--text);
  background: rgba(255,255,255,.08);
}

.site-nav .nav-cta {
  border: 1px solid rgba(255,255,255,.18);
}

main {
  width: 100%;
}

.hero-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 28px 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .72fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.surface,
.note-card,
.auth-card,
.empty-state {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 480px;
  padding: 54px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.hero-copy h1 {
  margin: 0 0 22px;
  max-width: 650px;
  color: var(--text);
  font-size: clamp(46px, 8vw, 92px);
  line-height: .94;
  letter-spacing: -0.08em;
}

.hero-copy p {
  max-width: 610px;
  font-size: 17px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  padding: 28px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
}

.panel-symbol {
  position: absolute;
  top: 42px;
  right: 42px;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: rgba(255,255,255,.9);
  font-size: 44px;
  font-weight: 900;
}

.stat-card,
.info-box,
.notice-box {
  position: relative;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(0,0,0,.22);
}

.stat-card {
  padding: 18px;
}

.stat-card span,
.info-box span,
.metric-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.stat-card strong,
.metric-card strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.section,
.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 28px;
}

.page-shell.narrow {
  max-width: 820px;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.section-head.left {
  align-items: flex-start;
  text-align: left;
}

.section-head h1,
.section-head h2,
.page-hero h1,
.auth-card h1,
.article-card h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.06em;
}

.section-head h1,
.auth-card h1,
.article-card h1 {
  font-size: clamp(32px, 5vw, 56px);
}

.section-head h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 54px);
}

.surface {
  border-radius: var(--radius);
  padding: 28px;
}

.surface h3,
.note-card h2,
.split-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 20px;
  letter-spacing: -0.04em;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.split-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.button-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button-group.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.button-group.vertical {
  flex-direction: column;
  align-items: stretch;
}

.btn,
.small-btn,
button.btn {
  border: 0;
  cursor: pointer;
  appearance: none;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}

.btn:hover,
.small-btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  background: #dcdcdc;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
}

.btn-danger {
  background: rgba(239,68,68,.12);
  color: #fecaca;
  border: 1px solid rgba(239,68,68,.34);
}

.btn-full {
  width: 100%;
}

.site-footer {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 13px;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 20px;
}

.auth-card {
  width: min(460px, 100%);
  border-radius: var(--radius-lg);
  padding: 38px;
}

.auth-sub {
  margin: 12px 0 24px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid > div,
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(0,0,0,.26);
  color: var(--text);
  padding: 0 15px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

textarea {
  min-height: 260px;
  padding: 15px;
  resize: vertical;
  line-height: 1.7;
}

input::placeholder,
textarea::placeholder {
  color: #63636c;
}

input:focus,
textarea:focus {
  border-color: rgba(255,255,255,.5);
  background: rgba(0,0,0,.38);
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}

.code-input {
  text-align: center;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: .22em;
}

.form-hint,
.password-guide {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.55;
}

.password-guide {
  margin: 0 0 2px;
  padding-left: 17px;
}

.password-guide li + li {
  margin-top: 4px;
}

.message-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}

.msg {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.msg-success {
  color: #bbf7d0;
  border-color: rgba(34,197,94,.32);
  background: rgba(34,197,94,.1);
}

.msg-error,
.msg-danger {
  color: #fecaca;
  border-color: rgba(239,68,68,.34);
  background: rgba(239,68,68,.1);
}

.msg-warning {
  color: #fef08a;
  border-color: rgba(234,179,8,.32);
  background: rgba(234,179,8,.1);
}

.msg-info {
  color: #d4d4d8;
  border-color: rgba(161,161,170,.28);
  background: rgba(161,161,170,.1);
}

.footer-links,
.text-link-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 700;
}

.footer-links a:hover,
.text-link-row a:hover,
.back-link:hover {
  color: var(--text);
}

.sub-action-form {
  margin-top: 12px;
}

.sub-action-form button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.sub-action-form button:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.info-box,
.notice-box {
  margin-bottom: 12px;
  padding: 14px;
}

.info-box strong {
  display: block;
  overflow-wrap: anywhere;
}

.notice-box {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-list.compact {
  margin: 22px 0 0;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0,0,0,.18);
}

.info-row span {
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 800;
}

.info-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.page-hero {
  padding: 54px 0 36px;
}

.page-hero.compact-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.page-hero p {
  margin-top: 14px;
  max-width: 700px;
}

.page-card,
.article-card {
  padding: 34px;
}

.note-list {
  display: grid;
  gap: 12px;
}

.note-card {
  display: block;
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.note-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.055);
}

.note-meta {
  margin-bottom: 12px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.back-link {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.article-content {
  margin-top: 22px;
  color: var(--muted);
  line-height: 1.9;
  white-space: pre-line;
}

.admin-inline {
  margin-top: 28px;
}

.dashboard-cards {
  margin-bottom: 16px;
}

.metric-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.table-surface {
  padding: 0;
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
}

.admin-table td {
  color: var(--text);
  font-size: 14px;
}

.table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions form {
  margin: 0;
}

.small-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}

.small-btn:hover {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.small-btn.danger {
  color: #fecaca;
  border-color: rgba(239,68,68,.34);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.pill-success {
  color: #bbf7d0;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.28);
}

.pill-danger {
  color: #fecaca;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.28);
}

.empty-row,
.empty-state {
  color: var(--muted-2) !important;
  text-align: center !important;
}

.empty-state {
  padding: 38px;
  border-radius: var(--radius);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--white);
}

@media (max-width: 860px) {
  .site-header {
    padding: 14px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-section {
    padding-top: 46px;
  }

  .hero-grid,
  .grid-3,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel {
    min-height: auto;
    padding: 32px;
  }

  .hero-panel {
    padding-top: 160px;
  }

  .split-card,
  .page-hero.compact-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-page {
    padding: 24px 16px;
  }

  .auth-card {
    padding: 28px;
  }
}

@media (max-width: 520px) {
  .hero-copy h1 {
    font-size: 46px;
  }

  .button-group,
  .button-group.two {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    height: 34px;
    padding: 0 10px;
  }

  .info-row {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 14px;
  }

  .info-row strong {
    text-align: left;
  }
}

/* ============================================================
   Homepage visual upgrade
   ============================================================ */
.visual-hero-grid {
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
}

.hero-art-card {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.018));
  box-shadow: var(--shadow);
}

.hero-art-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  pointer-events: none;
}

.hero-art-card img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
  object-fit: cover;
  opacity: .96;
  transform: scale(1.01);
}

.hero-art-overlay {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(7,7,8,.62);
  backdrop-filter: blur(16px);
}

.hero-art-overlay span,
.mini-stat span,
.screen-card span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.hero-art-overlay strong {
  text-align: right;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.about-layout .section-head {
  max-width: 760px;
  margin-left: 0;
  margin-right: auto;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: stretch;
}

.about-copy {
  min-height: 178px;
  display: flex;
  align-items: center;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.mini-stat {
  min-height: 81px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  letter-spacing: -0.05em;
}

.screen-section {
  padding-top: 56px;
}

.screen-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 16px;
}

.screen-stack {
  display: grid;
  gap: 16px;
}

.screen-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  box-shadow: var(--shadow);
}

.screen-card img {
  width: 100%;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.screen-card.large img {
  aspect-ratio: 1.72 / 1;
  object-fit: cover;
}

.screen-card.compact img {
  height: 180px;
  object-fit: cover;
}

.screen-card > div {
  padding: 20px;
}

.screen-card h3 {
  margin: 6px 0 8px;
  font-size: 21px;
  letter-spacing: -0.045em;
}

.screen-card p {
  font-size: 14px;
}

.feature-grid .surface {
  padding: 24px;
}

.feature-card img {
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  display: block;
}

.feature-card h3 {
  font-size: 21px;
}

.visual-split-card {
  position: relative;
  overflow: hidden;
}

.visual-split-card::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.visual-split-card > * {
  position: relative;
  z-index: 1;
}

.download-card {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  box-shadow: var(--shadow);
}

.download-visual {
  min-height: 260px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,.05), transparent 44%),
    #0B0B0C;
}

.file-badge {
  width: 142px;
  height: 172px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.file-badge::before {
  content: "";
  position: absolute;
  width: 64px;
  height: 64px;
  margin: -112px 0 0 82px;
  border-top: 1px solid rgba(255,255,255,.22);
  border-right: 1px solid rgba(255,255,255,.22);
  border-radius: 0 16px 0 0;
}

.download-lines {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  display: grid;
  gap: 9px;
}

.download-lines span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}

.download-lines span:nth-child(2) {
  width: 74%;
}

.download-lines span:nth-child(3) {
  width: 48%;
}

.download-copy {
  padding: 38px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.download-copy h3 {
  margin: 0 0 12px;
  font-size: 26px;
  letter-spacing: -0.055em;
}

@media (max-width: 980px) {
  .visual-hero-grid,
  .about-grid,
  .screen-showcase,
  .download-card {
    grid-template-columns: 1fr;
  }

  .hero-art-card,
  .hero-art-card img {
    min-height: 420px;
  }

  .download-visual {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
}

@media (max-width: 520px) {
  .hero-art-card,
  .hero-art-card img {
    min-height: 330px;
  }

  .hero-art-overlay {
    left: 18px;
    right: 18px;
    bottom: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-art-overlay strong {
    text-align: left;
  }

  .screen-card.compact img {
    height: 150px;
  }

  .download-copy {
    padding: 28px;
  }
}
