:root {
  --bg: #f5f0e5;
  --surface: rgba(255, 253, 247, 0.9);
  --line: rgba(52, 50, 44, 0.12);
  --text: #1d231f;
  --muted: #5d635d;
  --brand: #214c3a;
  --brand-strong: #163629;
  --accent: #bf6a2f;
  --danger: #a04132;
  --success: #1f6a44;
  --shadow: 0 18px 40px rgba(35, 32, 28, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 219, 176, 0.75), transparent 32%),
    radial-gradient(circle at right 20%, rgba(64, 103, 83, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #f8f4ea 50%, #efe6d9 100%);
  color: var(--text);
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.brand small {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.brand strong {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 800;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(33, 76, 58, 0.92), rgba(25, 37, 31, 0.92)),
    linear-gradient(45deg, rgba(240, 202, 159, 0.18), transparent 55%);
  color: #f9f6f1;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -28% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 150, 0.35), transparent 64%);
}

.hero h1,
.hero h2 {
  margin: 0 0 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  text-align: center;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(249, 246, 241, 0.84);
  font-size: clamp(0.98rem, 1.8vw, 1.08rem);
}

.mobile-break {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.mobile-admin-entry {
  display: none;
}

.panel,
.card,
.table-panel,
.empty-state,
.auth-card,
.notice-box {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.panel,
.table-panel,
.auth-card,
.empty-state,
.notice-box {
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin: 36px 0 18px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
}

.list-card {
  padding: 22px;
}

.list-card .card-body {
  padding: 0;
}

.button-row form {
  margin: 0;
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #eee1cb, #d7c2a4);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 20px;
  color: rgba(29, 35, 31, 0.5);
  font-weight: 700;
  background:
    linear-gradient(135deg, rgba(33, 76, 58, 0.15), transparent 60%),
    linear-gradient(315deg, rgba(191, 106, 47, 0.18), transparent 55%);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.card-title {
  margin: 0;
  font-size: 1.2rem;
}

.card-text {
  margin: 0;
  color: var(--muted);
}

.card-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.93rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge-success {
  color: var(--success);
  background: rgba(31, 106, 68, 0.09);
  border-color: rgba(31, 106, 68, 0.16);
}

.badge-warn {
  color: var(--accent);
  background: rgba(191, 106, 47, 0.1);
  border-color: rgba(191, 106, 47, 0.18);
}

.button,
.button-ghost,
.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button-ghost:hover,
.button-danger:hover {
  transform: translateY(-1px);
}

.button {
  background: linear-gradient(135deg, var(--accent), #d1884f);
  color: #fffaf5;
  box-shadow: 0 12px 24px rgba(191, 106, 47, 0.24);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--brand);
  border: 1px solid rgba(33, 76, 58, 0.16);
}

.button-danger {
  background: rgba(160, 65, 50, 0.1);
  color: var(--danger);
  border: 1px solid rgba(160, 65, 50, 0.18);
}

.button-inline {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.button-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a2e5a;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(26, 46, 90, 0.35);
  font-weight: 600;
  border-radius: 50px;
  gap: 7px;
  letter-spacing: 0.02em;
}

.button-home:hover {
  background: #22397a;
  transform: translateY(-1px);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-group {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.choice-item input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.choice-item span {
  color: var(--text);
}

.stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 24px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 248, 238, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.65rem;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.flash {
  margin-bottom: 20px;
  padding: 15px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
}

.flash-success {
  background: rgba(31, 106, 68, 0.11);
  color: var(--success);
  border: 1px solid rgba(31, 106, 68, 0.2);
}

.flash-error {
  background: rgba(160, 65, 50, 0.1);
  color: var(--danger);
  border: 1px solid rgba(160, 65, 50, 0.18);
}

.alert-list {
  margin: 0 0 20px;
  padding: 14px 18px 14px 34px;
  border-radius: var(--radius-md);
  background: rgba(160, 65, 50, 0.08);
  border: 1px solid rgba(160, 65, 50, 0.12);
  color: var(--danger);
}

.form-stack {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.fieldset-title {
  font-weight: 800;
}

.field small,
.field-hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(33, 76, 58, 0.45);
  box-shadow: 0 0 0 4px rgba(33, 76, 58, 0.08);
}

.check-grid {
  display: grid;
  gap: 12px;
}

.check-row,
.field-builder-row {
  display: grid;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.72);
}

.check-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.field-builder-row {
  grid-template-columns: minmax(0, 1.15fr) 170px minmax(0, 1fr) auto auto;
}

.field-builder-row .textarea {
  min-height: 88px;
}

.stack {
  display: grid;
  gap: 10px;
}

.poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #fff7ea;
}

.poster img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.poster-full {
  overflow: visible;
}

.poster-full img {
  width: 100%;
  max-height: none;
  height: auto;
  object-fit: contain;
}

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px 16px;
}

.auth-card {
  width: min(560px, 100%);
}

.table-scroll {
  overflow-x: auto;
}

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

.data-table th,
.data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(29, 35, 31, 0.08);
  vertical-align: top;
}

.data-table th {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 800;
}

.data-table td {
  font-size: 0.96rem;
  white-space: pre-wrap;
}

.muted {
  color: var(--muted);
}

.empty-state {
  text-align: center;
}

.empty-state h3,
.empty-state h2 {
  margin-top: 0;
}

.footer-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 920px) {
  .check-row {
    grid-template-columns: 1fr;
  }

  .field-builder-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 20px;
  }

  .topbar,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar .nav-links {
    display: none;
  }

  .hero {
    border-radius: 26px;
  }

  .mobile-break {
    display: block;
  }

  .mobile-admin-entry {
    display: flex;
    margin-top: 28px;
  }

  .panel,
  .table-panel,
  .auth-card,
  .empty-state,
  .notice-box {
    border-radius: 22px;
  }

  .button,
  .button-ghost,
  .button-danger {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
  }
}
