/* ══════════════════════════════════════════════════════════════════════
   2026 충북지역 상권 혁신 경진대회 — 디자인 시스템
   레퍼런스 : 토스 디자인 시스템 (Pretendard / Primary #0064FF / 모바일 우선)
   ══════════════════════════════════════════════════════════════════════ */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  /* Primary */
  --blue-50:  #E8F2FF;
  --blue-100: #C9DEFF;
  --blue:     #0064FF;
  --blue-600: #0054D6;
  --blue-700: #0040A3;

  /* Neutral */
  --white:  #FFFFFF;
  --bg:     #F2F4F6;
  --surface:#FFFFFF;
  --line:   #E5E8EB;
  --line-2: #D1D6DB;
  --t1:     #191F28;
  --t2:     #4E5968;
  --t3:     #8B95A1;
  --t4:     #B0B8C1;

  /* Semantic */
  --green:  #00A85A;
  --green-bg:#E7F8EF;
  --orange: #FF9500;
  --orange-bg:#FFF4E5;
  --red:    #F04452;
  --red-bg: #FEECEE;

  /* Radius */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(0,0,0,.04);
  --sh:    0 4px 12px rgba(0,0,0,.06);
  --sh-lg: 0 8px 24px rgba(0,0,0,.10);

  --header-h: 56px;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--t1);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
img { max-width: 100%; display: block; }

/* ── 헤더 ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--blue);
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 800;
  flex: none;
}
.brand h1 {
  margin: 0;
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-nav { display: flex; gap: 4px; flex: none; }
.site-nav a {
  padding: 7px 11px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  color: var(--t3);
  transition: background .12s, color .12s;
}
.site-nav a:hover { background: var(--bg); color: var(--t2); }
.site-nav a.on { color: var(--blue); background: var(--blue-50); }

/* ── 레이아웃 ─────────────────────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 20px 120px;
}
.section { margin-bottom: 32px; }
.section + .section { margin-top: 36px; }

.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: var(--sh-sm);
}
.card + .card { margin-top: 14px; }

/* ── 타이포 ──────────────────────────────────────────────────────── */
.display {
  font-size: 30px; font-weight: 800; line-height: 1.3;
  letter-spacing: -0.035em; margin: 0 0 6px;
}
h2.title {
  font-size: 20px; font-weight: 700; line-height: 1.4;
  letter-spacing: -0.03em; margin: 0 0 14px;
}
h3.sub { font-size: 16px; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.02em; }
.lead { color: var(--t2); font-size: 15px; margin: 0; }
.muted { color: var(--t3); font-weight: 500; }
.tiny { font-size: 13px; color: var(--t3); }
.num { font-variant-numeric: tabular-nums; }

/* ── 히어로 ──────────────────────────────────────────────────────── */
.hero { padding: 28px 4px 22px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--blue);
  background: var(--blue-50);
  padding: 5px 11px; border-radius: var(--r-full);
  margin-bottom: 14px;
}
.hero .eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }
.hero .big {
  font-size: 34px; font-weight: 800; line-height: 1.28;
  letter-spacing: -0.04em; margin: 0 0 10px;
}
.hero .big b { color: var(--blue); font-weight: 800; }
.hero p { margin: 0; color: var(--t2); font-size: 16px; }

/* 카운터 스트립 */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.stat {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px 14px;
  box-shadow: var(--sh-sm);
}
.stat .k { font-size: 13px; color: var(--t3); font-weight: 600; margin-bottom: 4px; }
.stat .v {
  font-size: 24px; font-weight: 800; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat .v small { font-size: 14px; font-weight: 700; color: var(--t3); margin-left: 2px; }

/* D-day 진행 카드 */
.period-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--sh-sm);
  margin-top: 12px;
}
.period-card .row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.period-card .label { font-size: 14px; font-weight: 700; color: var(--t2); }
.period-card .dday {
  font-size: 26px; font-weight: 800; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.period-card .dday.live { color: var(--blue); }
.period-card .dday.off { color: var(--t4); }
.bar {
  height: 8px; border-radius: var(--r-full);
  background: var(--bg); overflow: hidden;
}
.bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--blue), #4D93FF);
  border-radius: var(--r-full);
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}
.period-card .range {
  margin-top: 9px; font-size: 13px; color: var(--t3);
  display: flex; justify-content: space-between;
}

/* ── 알림 박스 ───────────────────────────────────────────────────── */
.notice {
  background: var(--blue-50);
  border-radius: var(--r);
  padding: 14px 16px;
  font-size: 14px; color: var(--blue-700);
  line-height: 1.6;
}
.notice strong { font-weight: 700; }
.notice.warn { background: var(--orange-bg); color: #8A5A00; }
.notice.voted { background: var(--blue); color: var(--white); }
.notice.err  { background: var(--red-bg); color: #B3202C; }

/* ── 필터 ────────────────────────────────────────────────────────── */
.filters {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin: 0 0 4px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--t2);
  font-size: 14px; font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); }
.chip.on {
  background: var(--t1); border-color: var(--t1); color: #fff;
}

.searchbar {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface);
  border-radius: var(--r);
  padding: 0 14px;
  box-shadow: var(--sh-sm);
  margin-bottom: 12px;
}
.searchbar svg { flex: none; color: var(--t4); }
.searchbar input[type="search"] {
  flex: 1 1 auto;
  width: auto; min-width: 0; height: auto;
  border: 0; outline: none; background: transparent;
  border-radius: 0; box-shadow: none;
  padding: 14px 0; font-size: 15px; font-weight: 500;
}
.searchbar input[type="search"]:focus { box-shadow: none; border: 0; }
.searchbar input[type="search"]::placeholder { color: var(--t4); }
.searchbar select {
  flex: none;
  width: auto; height: auto;
  border: 0; outline: none; background: transparent;
  box-shadow: none;
  color: var(--t2); font-size: 14px; font-weight: 600;
  padding: 13px 22px 13px 8px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none' stroke='%238B95A1' stroke-width='2' stroke-linecap='round'><path d='M5 8l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
}
.searchbar select:focus { box-shadow: none; border: 0; }

/* ── 참가작 리스트 ───────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; gap: 10px; }

.entry {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 12px;
  box-shadow: var(--sh-sm);
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s;
}
.entry:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.entry:active { transform: scale(.995); }

.entry .thumb {
  width: 96px; height: 96px; flex: none;
  border-radius: var(--r);
  background: var(--bg) center bottom/cover no-repeat;
  display: grid; place-items: center;
  color: var(--t4); font-size: 12px; font-weight: 600;
  overflow: hidden;
}
.entry .body { flex: 1; min-width: 0; }
.entry .tag {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  color: var(--t3);
  margin-bottom: 3px;
}
.entry h3 {
  margin: 0 0 3px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry .sum {
  font-size: 13px; color: var(--t3);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 7px;
}
.entry .meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--t3);
}
.entry .meta .votes { color: var(--t1); font-variant-numeric: tabular-nums; }
.entry .meta .rank { color: var(--blue); }
.entry .meta .sep { color: var(--t4); }

.heart {
  flex: none; z-index: 2;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  border: 0; background: var(--bg);
  color: var(--t4);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .12s, color .12s, transform .12s;
}
.heart:hover { background: var(--blue-50); color: var(--blue); }
.heart.on { background: var(--blue); color: #fff; }
.heart:active { transform: scale(.9); }

/* 갤러리(데스크톱 2~3열) */
@media (min-width: 720px) {
  .list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 1000px) {
  .list { grid-template-columns: repeat(3, 1fr); }
  .entry { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
  .entry .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .entry h3 { font-size: 17px; }
  .entry .sum { -webkit-line-clamp: 2; min-height: 38px; }
  .entry .heart { position: absolute; }
  .entry { position: relative; }
  .entry .heart { top: 20px; right: 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); }
}

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--t3);
  background: var(--surface);
  border-radius: var(--r-xl);
}
.empty .ico { font-size: 34px; margin-bottom: 10px; }

/* ── 버튼 ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 20px;
  border: 0; border-radius: var(--r);
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
  cursor: pointer;
  transition: background .12s, transform .1s;
}
.btn:hover { background: var(--blue-600); }
.btn:active { transform: scale(.985); }
.btn[disabled] { background: var(--line); color: var(--t4); cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.lg { height: 56px; font-size: 17px; border-radius: var(--r-lg); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn.ghost { background: var(--bg); color: var(--t2); }
.btn.ghost:hover { background: var(--line); }
.btn.line { background: transparent; border: 1px solid var(--line-2); color: var(--t2); }
.btn.line:hover { background: var(--bg); }
.btn.danger { background: var(--red); }

/* 하단 고정 CTA */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 50;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(242,244,246,1) 55%, rgba(242,244,246,0));
}
.cta-bar .in { max-width: 560px; margin: 0 auto; }

/* ── 폼 ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-size: 14px; font-weight: 700; color: var(--t2);
  margin-bottom: 7px;
}
.field > label .req { color: var(--blue); margin-left: 2px; }
.field .hint { font-size: 13px; color: var(--t3); margin-top: 6px; }

input[type=text], input[type=tel], input[type=email], input[type=search],
input[type=url], input[type=password], input[type=number],
input[type=datetime-local], select, textarea {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 0 14px;
  font-size: 15px; font-weight: 500;
  color: var(--t1);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 120px; padding: 13px 14px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,100,255,.12);
}
input::placeholder, textarea::placeholder { color: var(--t4); }
input[type=file] { border: 0; padding: 0; height: auto; font-size: 14px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%238B95A1' stroke-width='2' stroke-linecap='round'><path d='M5 8l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
  cursor: pointer;
}

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-group label {
  flex: 1; min-width: 120px;
  display: flex; align-items: center; justify-content: center;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--t2);
  cursor: pointer;
  transition: all .12s;
}
.radio-group label:has(input:checked) {
  border-color: var(--blue); background: var(--blue-50); color: var(--blue);
}
.radio-group input { display: none; }

.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--t2); cursor: pointer;
  line-height: 1.5;
}
.check input[type=checkbox] {
  width: 20px; height: 20px; flex: none; margin: 1px 0 0;
  accent-color: var(--blue); cursor: pointer;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ── 상세 ────────────────────────────────────────────────────────── */
.detail-hero {
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}
.detail-hero .shot {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg) center/cover no-repeat;
}
.gallery-strip {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px; scrollbar-width: none;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip img {
  width: 72px; height: 72px; flex: none;
  border-radius: var(--r-sm); object-fit: cover;
  cursor: pointer; opacity: .55;
  transition: opacity .12s;
}
.gallery-strip img.on, .gallery-strip img:hover { opacity: 1; }

.kv { display: flex; flex-direction: column; gap: 0; }
.kv > div {
  display: flex; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.kv > div:last-child { border-bottom: 0; }
.kv dt, .kv .k { width: 92px; flex: none; color: var(--t3); font-weight: 600; margin: 0; }
.kv dd, .kv .v { margin: 0; color: var(--t1); font-weight: 500; flex: 1; }

.story {
  font-size: 16px; line-height: 1.75; color: var(--t1);
  white-space: pre-wrap; word-break: break-word;
}

.vote-box {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: var(--sh-sm);
  text-align: center;
}
.vote-box .count {
  font-size: 44px; font-weight: 800; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.vote-box .count small { font-size: 20px; font-weight: 700; color: var(--t3); }
.vote-box .sub { color: var(--t3); font-size: 14px; margin: 6px 0 18px; }

/* ── 배지 ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px;
  border-radius: 6px;
  font-size: 12px; font-weight: 700;
}
.badge.blue  { background: var(--blue-50); color: var(--blue); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.gray  { background: var(--bg); color: var(--t3); }
.badge.orange{ background: var(--orange-bg); color: #8A5A00; }
.badge.red   { background: var(--red-bg); color: #B3202C; }

/* ── 결과 발표 ───────────────────────────────────────────────────── */
.award {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-sm);
  margin-bottom: 10px;
}
.award .medal {
  width: 52px; height: 52px; flex: none;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--bg);
}
.award.r1 .medal { background: linear-gradient(135deg,#FFE9A8,#F6C445); }
.award.r2 .medal { background: linear-gradient(135deg,#EDF1F5,#C8D2DC); }
.award.r3 .medal { background: linear-gradient(135deg,#F5DCC4,#D9A273); }
.award .who { flex: 1; min-width: 0; }
.award .prize { font-size: 13px; font-weight: 700; color: var(--blue); }
.award .t { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; margin: 2px 0; }
.award .amt { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── 테이블(관리자/심사) ─────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
table.tbl th, table.tbl td { padding: 11px 12px; text-align: left; white-space: nowrap; }
table.tbl thead th {
  background: var(--bg); color: var(--t2); font-weight: 700; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
table.tbl tbody tr { border-bottom: 1px solid var(--line); }
table.tbl tbody tr:last-child { border-bottom: 0; }
table.tbl tbody tr:hover { background: #FBFCFD; }
table.tbl td.r, table.tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .w { white-space: normal; min-width: 220px; }

/* ── 토스트 ──────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 88px;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(25,31,40,.94);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--r);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--sh-lg);
  animation: toastIn .22s cubic-bezier(.2,.8,.2,1);
  max-width: calc(100vw - 40px);
}
.toast.err { background: rgba(240,68,82,.96); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ── 스켈레톤 ────────────────────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, #EDF0F3 25%, #F5F7F9 50%, #EDF0F3 75%);
  background-size: 400% 100%;
  animation: shine 1.3s ease-in-out infinite;
  border-radius: var(--r);
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skel-entry { height: 120px; margin-bottom: 10px; }

/* ── 로그인 화면 ─────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 20px;
}
.login-box {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 32px 26px;
  box-shadow: var(--sh);
}
.login-box h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; margin: 0 0 6px; }
.login-box .d { color: var(--t3); font-size: 14px; margin: 0 0 24px; }

/* ── 유틸 ────────────────────────────────────────────────────────── */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.right { margin-left: auto; }
.hr { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.mt0{margin-top:0}.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}
.mt24{margin-top:24px}.mb0{margin-bottom:0}.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}
.hide { display: none !important; }

@media (max-width: 480px) {
  .wrap { padding: 16px 16px 110px; }
  .hero .big { font-size: 28px; }
  .stats { gap: 8px; }
  .stat { padding: 13px 11px; }
  .stat .v { font-size: 20px; }
  .card { padding: 18px; border-radius: var(--r-lg); }
}

/* ── 관리자·심사 화면 호환 클래스 ────────────────────────────────── */
.scroll-x { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
table.data th, table.data td { padding: 11px 12px; text-align: left; white-space: nowrap; }
table.data thead th {
  background: var(--bg); color: var(--t2); font-weight: 700; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
table.data tbody tr { border-bottom: 1px solid var(--line); }
table.data tbody tr:last-child { border-bottom: 0; }
table.data tbody tr:hover { background: #FBFCFD; }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; }

.badge.open   { background: var(--green-bg); color: var(--green); }
.badge.closed { background: var(--bg); color: var(--t3); }

.score-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.score-row > label { min-width: 120px; font-size: 14px; font-weight: 700; color: var(--t2); }
.score-row input[type="number"] { width: 90px; }

.name { font-size: 16px; font-weight: 700; letter-spacing: -0.025em; }
.desc { font-size: 14px; color: var(--t2); margin: 4px 0 10px; }

/* 관리자 화면은 폭이 넓어야 보기 편하다 */
body.wide .wrap { max-width: 1340px; }

/* 접수 폼에서 고른 파일 목록 ------------------------------------------- */
.filelist {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.filelist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--t2);
  background: var(--white);
  border-top: 1px solid var(--line);
  word-break: break-all;
}
.filelist li:first-child { border-top: 0; }
.filelist li span { flex: none; color: var(--t3); font-size: 12px; }
.filelist li.over { background: var(--red-bg); color: var(--red); }
.filelist li.over span { color: var(--red); }

/* 첨부 파일 링크 (관리자 · 심사위원) ----------------------------------- */
.attach { margin: 10px 0 2px; }
.attach-h {
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  margin-bottom: 6px;
}
.attach a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 13px;
  color: var(--t1);
  text-decoration: none;
  word-break: break-all;
}
.attach a:last-child { margin-bottom: 0; }
.attach a:hover { border-color: var(--blue); background: var(--blue-50); }
.attach b {
  flex: none;
  min-width: 34px;
  padding: 2px 0;
  border-radius: 4px;
  background: var(--bg-2, #F2F4F6);
  color: var(--t2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  text-align: center;
}
.attach span { flex: 1 1 auto; }
.attach em {
  flex: none;
  font-style: normal;
  font-size: 12px;
  color: var(--t3);
}
tr.filerow > td { background: #FAFBFC; }

/* ── 문의 ─────────────────────────────────────────────────────────────── */
.faq {
  border-bottom: 1px solid var(--line);
}
.faq:last-child { border-bottom: 0; }
.faq > summary {
  cursor: pointer;
  padding: 13px 28px 13px 2px;
  font-weight: 600;
  color: var(--t1);
  list-style: none;
  position: relative;
}
.faq > summary::-webkit-details-marker { display: none; }
/* 접힘/펼침 표시. 글자 하나라 아이콘 파일을 늘리지 않는다. */
.faq > summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--t3);
}
.faq[open] > summary::after { content: "−"; }
.faq > summary:hover { color: var(--blue); }
.faq-a {
  padding: 0 2px 14px;
  color: var(--t2);
  font-size: 14px;
  line-height: 1.65;
}

.inqhead { display: flex; gap: 6px; align-items: center; }
.inqbody {
  color: var(--t2);
  font-size: 14px;
  line-height: 1.65;
  white-space: normal;
}
.answer {
  margin-top: 14px;
  padding: 14px;
  background: var(--blue-50);
  border-radius: var(--r);
}
.answer .k {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.answer .v {
  font-size: 14px;
  line-height: 1.65;
  color: var(--t1);
}
.answer.waiting {
  background: var(--bg);
  color: var(--t3);
  font-size: 13px;
  text-align: center;
}

/* ── 관리자 : 문의 ────────────────────────────────────────────────────── */
/* 탭 옆 미답변 건수. 로그인하자마자 눈에 들어와야 답변이 밀리지 않는다. */
.site-nav .dot {
  display: inline-block;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px;
  text-align: center;
  vertical-align: middle;
}

.inqitem {
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 10px;
  background: var(--surface);
}
.inqitem > summary {
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
}
.inqitem > summary::-webkit-details-marker { display: none; }
.inqitem > summary b {
  font-weight: 600;
  color: var(--t1);
}
.inqitem[open] > summary {
  border-bottom: 1px solid var(--line);
}
.inqdetail { padding: 14px; }
.inqdetail .who {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.inqdetail .who span {
  font-size: 12px;
  color: var(--t2);
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 3px 8px;
}
.inqdetail .inqbody {
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--r);
  margin-bottom: 14px;
}
/* 삭제는 되돌릴 수 없으니 저장 버튼과 색으로 구분하되 먼저 눈에 띄진 않게 한다. */
.btn.ghost.danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--line-2);
}
.btn.ghost.danger:hover { border-color: var(--red); }

/* ── 좁은 화면 헤더 ───────────────────────────────────────────────────
 * 한 줄에 제목과 메뉴를 같이 두면, 메뉴 4개가 폭을 먼저 차지하고
 * 제목만 「충북지역 상권…」으로 잘린다. 대회 이름이 잘려 보이는 건
 * 첫 화면에서 가장 나쁜 쪽이라 두 줄로 나눈다.
 *   윗줄 : 제목 (전체 폭을 쓰므로 길이에 관계없이 다 보인다)
 *   아랫줄 : 메뉴 (아주 좁은 기기에서는 좌우로 밀어 본다)
 * 햄버거 버튼으로 숨기지 않는다. 주 이용자가 소상공인·중장년이라
 * 접힌 메뉴는 못 찾고 지나칠 수 있다.
 */
@media (max-width: 640px) {
  .site-header .inner {
    height: auto;
    padding: 9px 16px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .brand { min-height: 30px; }
  .brand h1 {
    font-size: 17px;
    /* 폭을 다 쓰므로 말줄임이 필요 없다. 아주 긴 이름은 두 줄까지 허용. */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
    word-break: keep-all;
  }

  .site-nav {
    gap: 2px;
    margin: 0 -16px;
    padding: 5px 16px 7px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a {
    flex: none;
    padding: 6px 10px;
    font-size: 13.5px;
    white-space: nowrap;
  }
}
