:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #6b7280;
  --muted-2: #94a3b8;
  --accent: #f59e0b;
  --accent-strong: #f3b11c;
  --green: #00a63e;
  --red: #e7000b;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
}
body.page-ref-shell { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.hide { display: none !important; }
.container-ref { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.ref-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
}
.ref-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
}
.ref-btn-primary { background: var(--accent); color: #fff; }
.ref-btn-secondary { background: #f3f4f6; color: var(--text); }
.ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.ref-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.ref-header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 66px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.ref-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; }
.ref-brand img { width: 38px; height: 38px; }
.ref-nav { display: flex; justify-content: center; gap: 32px; }
.ref-nav a { color: #475569; font-size: 14px; font-weight: 500; }
.ref-nav a.is-active { color: var(--accent); }
.ref-header-actions { display: flex; align-items: center; gap: 12px; }
.ref-login-chip {
  min-width: 86px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}
.ref-user-btn {
  width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #64748b;
}
.ref-user-btn svg { width: 20px; height: 20px; }
.ref-page-main { padding: 24px 0 40px; }
.ref-footer { margin-top: 48px; }
.ref-footer .container { width: min(1280px, calc(100% - 32px)); margin: 0 auto; text-align: center; display: grid; gap: 10px; justify-items: center; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 8px);
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
  z-index: 120;
}
.ref-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.ref-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.48); }
.ref-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 24px));
  margin: 24px auto;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(15,23,42,.18);
}
.ref-modal-head,
.ref-modal-foot { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ref-modal-head { border-bottom: 1px solid var(--border); }
.ref-modal-body { padding: 24px; }
.ref-modal-close {
  width: 36px; height: 36px; border: 0; background: #f3f4f6; border-radius: 10px; color: #64748b; font-size: 24px;
}
.ref-field { display: grid; gap: 8px; margin-bottom: 16px; }
.ref-field label { font-size: 14px; font-weight: 600; color: #475569; }
.ref-field input, .ref-field select, .ref-field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 12px 14px;
}
.ref-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 38%, #f1f5f9 55%);
  background-size: 200% 100%;
  animation: ref-shimmer 1.4s linear infinite;
}
@keyframes ref-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 980px) {
  .ref-header-inner { grid-template-columns: auto auto; }
  .ref-nav { display: none; }
}