/* ============================================================
   밍글데이 운영진 가이드 — 공통 CSS (common.css)
   모든 페이지에서 <link rel="stylesheet" href="common.css"> 로 불러오세요
   페이지별 accent 색상은 각 파일의 :root 에서 --accent / --accentl 로 덮어쓰세요
============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS ── */
:root {
  --p: #7C3AED; --pl: #EDE9FE; --p2: #A78BFA;
  --bg: #F8F7FF; --c: #fff; --t: #1E1B2E;
  --s: #6B7280; --b: #E5E7EB; --r: 14px;
  --accent: #7C3AED; --accentl: #EDE9FE;
}

body {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--t);
  font-size: 13px; line-height: 1.6;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 2px solid var(--b);
  display: flex; align-items: center;
  padding: 0 24px; gap: 4px;
  box-shadow: 0 2px 12px rgba(124,58,237,.08);
  flex-wrap: wrap;
}
.nav-logo {
  font-size: 14px; font-weight: 800; color: var(--p);
  margin-right: 16px; white-space: nowrap;
  padding: 14px 0; display: flex; align-items: center; gap: 6px;
}
.nav-logo .dot { color: #FF6584; }
.nav-tabs { display: flex; overflow-x: auto; }
.nav-tab {
  padding: 14px 13px; font-size: 12px; font-weight: 600; color: var(--s);
  white-space: nowrap; border: none; border-bottom: 3px solid transparent;
  background: none; transition: all .2s; text-decoration: none;
  display: flex; align-items: center; gap: 5px; cursor: pointer;
}
.nav-tab:hover { color: var(--p); background: var(--pl); }
.nav-tab.active { color: var(--p); border-bottom: 3px solid var(--p); }
.nav-tab.award { color: #D97706; }
.nav-tab.award:hover { background: #FFFBEB; color: #B45309; }

/* ── AWARD BANNER ── */
.award-banner {
  background: linear-gradient(90deg, #FEF3C7 0%, #FDE68A 50%, #FEF3C7 100%);
  border-bottom: 2px solid #FCD34D;
  padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.award-banner-left { display: flex; align-items: center; gap: 10px; }
.award-banner-icon { font-size: 20px; }
.award-banner-text { font-size: 12.5px; font-weight: 700; color: #92400E; }
.award-banner-sub { font-size: 11px; color: #B45309; margin-top: 1px; }
.award-banner-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #D97706; color: #fff; border-radius: 8px;
  padding: 7px 14px; font-size: 12px; font-weight: 700;
  text-decoration: none; transition: all .2s; white-space: nowrap;
}
.award-banner-btn:hover { background: #B45309; }

/* ── HERO ── */
.hero { padding: 36px 32px 32px; color: #fff; }
.hero-inner { max-width: 960px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px; padding: 4px 13px;
  font-size: 11.5px; font-weight: 700; margin-bottom: 12px;
}
.hero h1 { font-size: 24px; font-weight: 900; margin-bottom: 7px; letter-spacing: -.5px; }
.hero p { font-size: 13px; opacity: .9; line-height: 1.7; margin-bottom: 14px; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-meta-item {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 600;
}

/* ── LAYOUT ── */
.main { max-width: 960px; margin: 0 auto; padding: 28px 18px 60px; }
.section { margin-bottom: 32px; }

/* ── SECTION TITLE ── */
.sec-title {
  font-size: 15px; font-weight: 800; color: var(--t);
  margin-bottom: 13px; display: flex; align-items: center; gap: 8px;
}
.sec-title::before {
  content: ""; display: inline-block;
  width: 4px; height: 18px; background: var(--accent); border-radius: 4px;
}

/* ── OVERVIEW GRID ── */
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── TABLE ── */
.tbl-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--b); }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 12.5px; }
th {
  background: var(--accentl); color: var(--accent); font-weight: 700;
  padding: 10px 13px; text-align: left; border-bottom: 2px solid var(--b); white-space: nowrap;
}
td { padding: 10px 13px; border-bottom: 1px solid var(--b); vertical-align: middle; line-height: 1.6; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAFA; }

/* ── PREP GRID ── */
.prep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prep-card { background: var(--c); border: 1px solid var(--b); border-radius: var(--r); padding: 18px 20px; }
.prep-card-title {
  font-size: 13px; font-weight: 800; color: var(--accent);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.prep-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.prep-list li {
  font-size: 12.5px; line-height: 1.6; padding: 8px 11px;
  background: var(--bg); border-radius: 8px;
  border-left: 3px solid var(--p2);
  display: flex; align-items: flex-start; gap: 8px;
}
.prep-list li small { display: block; color: var(--s); font-size: 11.5px; margin-top: 2px; }
.prep-list li input[type=checkbox] { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }

/* ── ROLE GRID ── */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.role-card {
  background: var(--c); border: 1px solid var(--b);
  border-radius: var(--r); padding: 16px 18px;
  border-top: 4px solid var(--accent);
}
.role-title { font-size: 12.5px; font-weight: 800; color: var(--accent); margin-bottom: 5px; }
.role-desc { font-size: 12px; color: var(--s); line-height: 1.6; }
.role-who { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--b); font-size: 11.5px; font-weight: 700; }

/* ── STEPS ── */
.steps { display: flex; flex-direction: column; gap: 16px; }
.step-card { background: var(--c); border: 1px solid var(--b); border-radius: var(--r); overflow: hidden; }
.step-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--b);
  background: var(--accentl);
}
.step-num {
  min-width: 34px; height: 34px; background: var(--accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.step-header-text h3 { font-size: 13.5px; font-weight: 800; color: var(--accent); }
.step-header-text p { font-size: 11.5px; color: var(--s); margin-top: 2px; }
.step-body { padding: 16px 20px; }
.step-body > p { font-size: 12.5px; color: var(--s); line-height: 1.7; margin-bottom: 10px; }

/* ── SCRIPT ── */
.script-wrap { margin-top: 10px; }
.script-label { font-size: 11px; font-weight: 700; color: var(--s); margin-bottom: 6px; }
.script-box {
  background: #1E1E2E; color: #CDD6F4;
  border-radius: 10px; padding: 14px 18px;
  font-size: 12.5px; line-height: 2;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  white-space: pre-wrap;
}
.script-box .hl  { color: #A6E3A1; font-weight: 700; }
.script-box .em  { color: #FAB387; }
.script-box .note { color: #89DCEB; font-size: 11.5px; }
.script-box .warn { color: #F38BA8; font-weight: 700; }

/* ── FLOW ── */
.flow-list { display: flex; flex-direction: column; gap: 6px; }
.flow-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg); border-radius: 9px; padding: 9px 13px;
  font-size: 12.5px; line-height: 1.6;
}
.flow-num {
  min-width: 22px; height: 22px; background: var(--accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0; margin-top: 1px;
}
.flow-sub { font-size: 11.5px; color: var(--s); margin-top: 2px; }

/* ── ALERT ── */
.alert {
  border-radius: var(--r); padding: 12px 16px;
  font-size: 12.5px; line-height: 1.7; margin-bottom: 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.alert-y  { background: #FFFBEB; border-left: 4px solid #F59E0B; }
.alert-r  { background: #FEF2F2; border-left: 4px solid #EF4444; }
.alert-g  { background: #F0FDF4; border-left: 4px solid #16A34A; }
.alert-b  { background: #EFF6FF; border-left: 4px solid #3B82F6; }
.alert-p  { background: var(--pl);     border-left: 4px solid var(--p); }
.alert-ac { background: var(--accentl); border-left: 4px solid var(--accent); }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── EMERGENCY ── */
.em-list { display: flex; flex-direction: column; gap: 8px; }
.em-item {
  background: var(--c); border: 1px solid var(--b);
  border-radius: 10px; padding: 11px 15px;
  display: flex; gap: 12px; align-items: flex-start;
}
.em-sit { min-width: 200px; font-size: 12px; font-weight: 700; color: #DC2626; flex-shrink: 0; }
.em-act { font-size: 12px; color: var(--t); line-height: 1.6; }

/* ── BADGE ── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-p  { background: var(--pl);      color: var(--p); }
.badge-b  { background: #EFF6FF;        color: #2563EB; }
.badge-g  { background: #ECFDF5;        color: #059669; }
.badge-y  { background: #FFFBEB;        color: #D97706; }
.badge-r  { background: #FEF2F2;        color: #DC2626; }
.badge-ac { background: var(--accentl); color: var(--accent); }

/* ── SHEET CARD (구글 시트 연동 카드 — 공통) ── */
.sheet-card {
  background: var(--c);
  border: 1px solid var(--b);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30,27,46,.06);
}
.sheet-card-head {
  background: linear-gradient(135deg, var(--accentl) 0%, #fff 100%);
  border-bottom: 1px solid var(--b);
  padding: 20px 22px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; flex-wrap: wrap;
}
.sheet-card-title-wrap { display: flex; gap: 13px; align-items: flex-start; }
.sheet-card-icon {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(30,27,46,.13);
}
.sheet-card-title {
  font-size: 16px; font-weight: 900; color: var(--accent);
  margin-bottom: 4px; letter-spacing: -.2px;
}
.sheet-card-desc { font-size: 12.5px; color: var(--s); line-height: 1.7; }
.sheet-btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: #fff; border-radius: 10px;
  padding: 10px 16px; font-size: 12.5px; font-weight: 800;
  text-decoration: none; white-space: nowrap; transition: all .2s;
  box-shadow: 0 8px 16px rgba(30,27,46,.13);
}
.sheet-btn-main:hover { filter: brightness(.92); transform: translateY(-1px); }
.sheet-card-body { padding: 18px 22px 20px; }
.sheet-feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.sheet-feature {
  background: var(--bg); border: 1px solid var(--b);
  border-radius: 12px; padding: 13px 14px;
}
.sheet-feature-title {
  font-size: 12.5px; font-weight: 800; color: var(--accent);
  margin-bottom: 5px; display: flex; align-items: center; gap: 6px;
}
.sheet-feature-desc { font-size: 12px; color: var(--s); line-height: 1.6; }
.sheet-guide-list { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.sheet-guide-list li {
  background: #F8FAFC; border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 8px 11px;
  font-size: 12.5px; line-height: 1.6; color: var(--t);
}
.sheet-guide-list strong { color: var(--accent); }

/* ── MINI NOTE / WARNING ── */
.mini-note {
  margin-top: 12px; padding: 10px 13px; border-radius: 10px;
  background: #F0FDF4; border-left: 4px solid #16A34A;
  font-size: 12px; color: #166534; line-height: 1.6;
}
.mini-warning {
  margin-top: 10px; padding: 10px 13px; border-radius: 10px;
  background: #FEF2F2; border-left: 4px solid #EF4444;
  font-size: 12px; color: #991B1B; line-height: 1.6;
}

/* ── RESULT POLICY (최종 인원 처리 기준) ── */
.result-policy {
  margin-top: 14px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  border-radius: 12px;
  padding: 13px 15px;
}
.result-policy-title {
  font-size: 12.5px; font-weight: 900; color: #92400E;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.result-policy-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.result-policy-list li {
  font-size: 12.5px; color: #78350F; line-height: 1.6;
  padding-left: 2px;
}
.result-policy-list strong { color: #B45309; }

/* ── FOOTER ── */
footer {
  background: var(--t); color: rgba(255,255,255,.55);
  text-align: center; padding: 22px 16px;
  font-size: 11.5px; line-height: 1.8;
}
footer strong { color: rgba(255,255,255,.85); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .hero { padding: 22px 14px; }
  .hero h1 { font-size: 19px; }
  .main { padding: 16px 12px 50px; }
  .overview-grid { grid-template-columns: 1fr; }
  .prep-grid { grid-template-columns: 1fr; }
  .em-sit { min-width: 120px; }
  nav { padding: 0 10px; }
  .award-banner { padding: 10px 14px; }
  .sheet-card-head { padding: 16px; }
  .sheet-card-body { padding: 16px; }
  .sheet-btn-main { width: 100%; }
}
