﻿* { box-sizing: border-box; }

:root {
  --ink: #14212f;
  --muted: #637083;
  --line: #d8e0ea;
  --line-dark: #5c7188;
  --surface: #ffffff;
  --soft: #f5f7fa;
  --soft-blue: #eef5fb;
  --primary: #009CDE;
  --primary-dark: #007caf;
  --accent: #64A70B;
  --orange: #FF671F;
  --danger: #c62828;
}

body {
  margin: 0;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  background: #edf1f5;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.site-header {
  background: var(--primary);
  border-bottom: 4px solid var(--primary-dark);
}

.site-header::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(
    90deg,
    #64A70B 0 33.33%,
    #FF671F 33.33% 66.66%,
    #009CDE 66.66% 100%
  );
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 28px;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.brand-mark,
.period-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.header-inner h1 {
  margin: 0;
  padding: 22px 24px;
  border-left: 8px solid var(--accent);
  background: rgba(255, 255, 255, 0.94);
  color: #08334d;
  font-size: 31px;
  line-height: 1.35;
  letter-spacing: 0;
}

.prize-box {
  margin-top: 14px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-left: 8px solid var(--orange);
  background: rgba(255, 255, 255, 0.96);
  color: #17293b;
}

.prize-box h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.4;
  color: #0d2b44;
}

.prize-box ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prize-box li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 30px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e6ed;
  font-size: 15px;
  line-height: 1.45;
}

.prize-box li:nth-last-child(-n + 2) {
  padding-bottom: 0;
  border-bottom: 0;
}

.prize-box strong {
  flex: 0 0 auto;
  color: var(--orange);
  font-weight: 800;
}

.page-shell {
  max-width: 1100px;
  margin: 24px auto 42px;
  padding: 0 20px;
}

.survey-panel,
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
}

.panel-head,
.admin-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.panel-head h2,
.admin-head h2 {
  margin: 0;
  font-size: 20px;
  color: #17324d;
}

.panel-head p,
.admin-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.form-section {
  padding: 24px 22px;
  border-bottom: 1px solid #e5ebf1;
}

.question-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.question-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 34px;
  padding: 7px 12px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.question-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
  color: #1b2c3d;
}

.question-guide,
.count-text {
  color: var(--muted);
  font-size: 14px;
}

.count-text {
  display: inline-block;
  margin-left: 6px;
  color: var(--primary);
  font-weight: 700;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option-card {
  border: 1px solid #dbe2ea;
  background: #fbfcfd;
  padding: 14px;
}

.option-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.option-top input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  flex-shrink: 0;
}

.option-label {
  font-size: 16px;
  font-weight: 700;
  color: #23384e;
  line-height: 1.5;
}

audio {
  width: 100%;
  display: block;
}

.input-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--line-dark);
  border-bottom: 1px solid var(--line);
}

.input-table th,
.input-table td {
  border-top: 1px solid #dde4eb;
  padding: 14px 12px;
  text-align: left;
}

.input-table th {
  width: 220px;
  background: #f7f9fb;
  color: #24374b;
  font-size: 15px;
  font-weight: 700;
}

.text-input,
.filter-input,
.filter-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #bfcad6;
  background: #fff;
  color: var(--ink);
}

.text-input { max-width: 420px; }

.policy-box {
  border: 1px solid #ccd6e0;
  background: #fafbfd;
  padding: 16px;
  margin: 14px 0;
  line-height: 1.75;
  color: #2f3f50;
  font-size: 14px;
}

.policy-box p { margin: 0 0 6px; }
.policy-box p:last-child { margin-bottom: 0; }

.radio-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.radio-group label {
  font-size: 15px;
  cursor: pointer;
}

.error-text {
  margin-top: 10px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.button-area {
  padding: 28px 22px 32px;
  text-align: center;
  background: #fcfcfd;
}

.submit-btn,
.admin-btn {
  min-width: 140px;
  height: 46px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.submit-btn { min-width: 180px; height: 52px; font-size: 17px; }
.submit-btn:hover,
.admin-btn:hover { background: var(--primary-dark); }
.submit-btn:disabled { background: #8aa4b8; cursor: not-allowed; }

.required-mark { color: var(--danger); margin-left: 4px; }

.result-box {
  display: none;
  max-width: 620px;
  margin: 16px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.6;
}

.admin-tools {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto auto;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.stat-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.stat-label { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.stat-value { margin: 0; color: var(--primary); font-size: 24px; font-weight: 800; }

.chart-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.chart-card {
  border: 1px solid var(--line);
  padding: 14px;
  background: #fff;
}

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  background: #e6edf4;
}

.bar-fill {
  height: 12px;
  background: var(--orange);
}

.table-wrap {
  padding: 18px 22px 24px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  border-top: 2px solid var(--line-dark);
  font-size: 13px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f7f9fb;
  color: #24374b;
}

@media (max-width: 900px) {
  .header-inner h1 { font-size: 24px; padding: 18px; }
  .options-grid,
  .prize-box ul,
  .chart-section,
  .stats-grid,
  .admin-tools { grid-template-columns: 1fr; }
  .prize-box li:nth-last-child(-n + 2) {
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e6ed;
  }
  .prize-box li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .input-table th,
  .input-table td { display: block; width: 100%; }
  .input-table th { border-bottom: 0; padding-bottom: 8px; }
  .input-table td { padding-top: 0; }
}
