:root {
  --blue-900: #06368f;
  --blue-800: #074bbb;
  --blue-700: #075be8;
  --blue-600: #0866ff;
  --blue-500: #1283ff;
  --blue-100: #eaf3ff;
  --cyan-500: #16c7ff;
  --violet-600: #7c3cff;
  --navy: #071936;
  --text: #101828;
  --muted: #667085;
  --line: #d9e5f7;
  --paper: #ffffff;
  --soft: #f4f8ff;
  --danger: #e11d48;
  --shadow: 0 22px 70px rgba(8, 65, 164, .14);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(8, 102, 255, .13) 0, rgba(255, 255, 255, 0) 420px),
    var(--soft);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  letter-spacing: 0;
}

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

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

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 34px rgba(22, 71, 143, .12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  box-shadow: 0 12px 28px rgba(8, 102, 255, .28);
  font-weight: 1000;
}

.brand strong,
.brand em {
  display: block;
}

.brand strong {
  color: var(--blue-900);
  font-size: 18px;
  font-weight: 1000;
}

.brand em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions a,
.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #254060;
  background: transparent;
  font-size: 14px;
  font-weight: 900;
}

.header-actions a {
  display: inline-flex;
  align-items: center;
}

.header-actions a:hover,
.ghost-button:hover {
  border-color: var(--line);
  background: var(--blue-100);
  color: var(--blue-800);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 26px;
  align-items: stretch;
  margin-top: 24px;
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(6, 54, 143, .96), rgba(8, 102, 255, .98) 54%, rgba(22, 199, 255, .9)),
    linear-gradient(45deg, rgba(255, 255, 255, .14), transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--blue-500);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1.6px;
}

.hero .eyebrow {
  color: #d9ecff;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  font-weight: 1000;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 700;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  font-weight: 1000;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  box-shadow: 0 14px 30px rgba(8, 102, 255, .28);
}

.hero .primary-button {
  color: var(--blue-800);
  background: #fff;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, .36);
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 236px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(18px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-header span {
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1.4px;
  color: #dff0ff;
}

.panel-header strong {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.stat-card {
  min-height: 112px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue-900);
}

.stat-card span,
.stat-card strong {
  display: block;
}

.stat-card span {
  color: #47627f;
  font-size: 13px;
  font-weight: 900;
}

.stat-card strong {
  margin-top: 10px;
  font-size: 44px;
  line-height: 1;
  font-weight: 1000;
}

.section-block,
.schedule-board {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 50px rgba(8, 65, 164, .08);
}

.section-block {
  padding: 24px;
}

.section-heading,
.board-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.board-top h2 {
  margin: 0;
  color: var(--navy);
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: -.6px;
}

.section-heading > p,
.board-top > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.today-card,
.list-row,
.event-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.today-card {
  display: grid;
  gap: 10px;
  min-height: 158px;
  padding: 18px;
  overflow: hidden;
}

.today-card::before,
.list-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--tier-color);
}

.today-card h3,
.event-card strong,
.list-main strong {
  margin: 0;
  color: var(--navy);
  font-weight: 1000;
}

.today-card h3 {
  font-size: 21px;
}

.today-meta,
.event-meta,
.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #52677f;
  font-size: 12px;
  font-weight: 900;
}

.pill,
.tier-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 1000;
}

.tier-pill {
  color: #fff;
  background: var(--tier-color);
}

.color-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--tier-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tier-color), transparent 78%);
  flex: 0 0 auto;
}

.today-card p,
.event-card p,
.list-row p {
  margin: 0;
  color: #4f6278;
  font-size: 14px;
  line-height: 1.48;
  font-weight: 700;
}

.schedule-board {
  padding: 18px;
}

.board-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.board-controls button,
.search-field {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.board-controls button {
  min-width: 58px;
  color: #31506f;
  font-size: 13px;
  font-weight: 1000;
}

.board-controls button:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
  background: var(--blue-100);
}

.search-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 246px;
  padding: 0 12px;
}

.search-field span {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 1000;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.tier-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tier-filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #39516d;
  background: #fff;
  font-size: 13px;
  font-weight: 1000;
}

.tier-filters button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot, var(--blue-500));
}

.tier-filters button.active {
  border-color: var(--blue-600);
  color: var(--blue-800);
  background: var(--blue-100);
}

.calendar-shell {
  margin-top: 16px;
  overflow-x: auto;
}

.weekday-row,
.calendar-grid {
  min-width: 980px;
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
}

.weekday-row {
  gap: 8px;
  margin-bottom: 8px;
}

.weekday-row span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-900);
  background: var(--blue-100);
  font-size: 13px;
  font-weight: 1000;
}

.calendar-grid {
  gap: 8px;
}

.day-card {
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.day-card.is-today {
  border-color: var(--blue-500);
  box-shadow: inset 0 0 0 1px rgba(8, 102, 255, .32), 0 12px 30px rgba(8, 102, 255, .12);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 10px;
}

.day-head strong {
  color: var(--navy);
  font-size: 22px;
  font-weight: 1000;
}

.day-head span {
  color: #71839a;
  font-size: 12px;
  font-weight: 900;
}

.today-badge {
  color: #fff !important;
  background: var(--blue-600);
  padding: 5px 8px;
  border-radius: 999px;
}

.day-events {
  display: grid;
  gap: 7px;
}

.event-card {
  display: block;
  padding: 10px;
  border-color: color-mix(in srgb, var(--tier-color), white 70%);
  box-shadow: inset 3px 0 0 var(--tier-color);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: var(--tier-color);
  box-shadow: inset 3px 0 0 var(--tier-color), 0 10px 20px rgba(8, 65, 164, .13);
}

.event-card strong {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.3;
}

.event-card p {
  margin-top: 5px;
  font-size: 12px;
}

.event-flash-red {
  background: linear-gradient(135deg, #ffffff 0, #fff4f4 48%, #ffecec 100%);
  animation: flashRedGlow 1.1s ease-in-out infinite;
}

.event-flash-red .color-badge,
.tier-flash-red .color-badge {
  animation: flashRedDot 1.1s ease-in-out infinite;
}

@keyframes flashRedGlow {
  0%, 100% { box-shadow: inset 3px 0 0 var(--tier-color), 0 0 0 rgba(255, 16, 16, 0); }
  50% { box-shadow: inset 3px 0 0 var(--tier-color), 0 0 20px rgba(255, 16, 16, .52); }
}

@keyframes flashRedDot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(255, 16, 16, .16); }
  50% { transform: scale(1.12); box-shadow: 0 0 16px 5px rgba(255, 16, 16, .58); }
}

.empty-day {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed #dce7f5;
  border-radius: 8px;
  color: #98a8bd;
  font-size: 13px;
  font-weight: 900;
}

.schedule-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.list-row {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 86px;
  padding: 14px 16px 14px 20px;
  overflow: hidden;
}

.list-date {
  color: var(--blue-800);
  font-size: 18px;
  font-weight: 1000;
}

.list-main {
  min-width: 0;
}

.list-main strong {
  display: block;
  font-size: 17px;
}

.list-main p {
  margin-top: 5px;
}

.list-action {
  min-width: 84px;
  min-height: 36px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 1000;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 4px;
  color: #52677f;
  font-size: 13px;
  font-weight: 800;
}

.site-footer strong {
  color: var(--blue-800);
}

.seo-section {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(8, 65, 164, .06);
}

.seo-section h2 {
  margin: 0;
  color: var(--navy);
  font-size: 26px;
  font-weight: 1000;
}

.seo-section > p:not(.eyebrow) {
  max-width: 920px;
  margin: 12px 0 0;
  color: #4f6278;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 800;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.seo-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.seo-grid h3 {
  margin: 0;
  color: var(--blue-900);
  font-size: 16px;
  font-weight: 1000;
}

.seo-grid p {
  margin: 8px 0 0;
  color: #61758c;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 25, 54, .62);
  backdrop-filter: blur(8px);
}

.admin-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: min(820px, calc(100vh - 44px));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .28);
}

.admin-close {
  position: sticky;
  top: 12px;
  z-index: 2;
  float: right;
  margin: 12px 12px 0 0;
  min-width: 58px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #2e4057;
  font-size: 13px;
  font-weight: 1000;
}

.admin-login,
.admin-workspace {
  padding: 30px;
}

.admin-login {
  display: grid;
  gap: 12px;
  max-width: 430px;
}

.admin-login h2 {
  margin: 0;
  color: var(--navy);
  font-size: 30px;
}

.admin-login p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-login input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  outline: 0;
  font-weight: 800;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #405978;
  background: #fff;
  font-weight: 1000;
}

.admin-tabs button.active {
  border-color: var(--blue-600);
  color: #fff;
  background: var(--blue-600);
}

.admin-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  margin-top: 18px;
}

.admin-form,
.admin-list,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.admin-form,
.admin-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-list {
  overflow: hidden;
}

.admin-form h2,
.admin-card h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 20px;
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row label {
  color: #405978;
  font-size: 13px;
  font-weight: 1000;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: 0;
  font-weight: 800;
}

.form-row input,
.form-row select {
  height: 40px;
  padding: 0 11px;
}

.form-row textarea {
  min-height: 82px;
  resize: vertical;
  padding: 10px 11px;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.form-actions button,
.mini-button,
.danger-button {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 1000;
}

.form-actions button,
.mini-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-800);
}

.form-actions .save-button {
  flex: 1;
  border-color: var(--blue-600);
  color: #fff;
  background: var(--blue-600);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

.admin-table th {
  color: #405978;
  background: var(--blue-100);
  font-weight: 1000;
}

.admin-table td {
  color: #273a52;
  font-weight: 800;
}

.admin-actions {
  display: flex;
  gap: 6px;
}

.danger-button {
  border: 1px solid rgba(225, 29, 72, .24);
  color: var(--danger);
  background: #fff1f4;
}

.backup-box {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: #22344d;
  background: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.notice {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.tier-flash-red { --tier-color: #ff1010; }
.tier-red { --tier-color: #d90000; }
.tier-black { --tier-color: #050505; }
.tier-purple { --tier-color: #6f1dff; }
.tier-sky { --tier-color: #16c7ff; }

.empty-state {
  min-height: 130px;
  display: grid;
  place-items: center;
  border: 1px dashed #d5e2f3;
  border-radius: 8px;
  color: #7a8ca2;
  background: #fbfdff;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 960px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .site-header,
  .section-heading,
  .board-top,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .board-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .today-grid {
    grid-template-columns: 1fr;
  }

  .search-field {
    min-width: min(100%, 280px);
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .seo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 34px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .section-block,
  .schedule-board,
  .hero {
    padding: 18px;
  }

  .admin-login,
  .admin-workspace {
    padding: 22px;
  }
}
