:root {
  --ink: #14233a;
  --ink-soft: #4d5b70;
  --navy: #0e2240;
  --navy-2: #17335c;
  --accent: #0a747c;
  --accent-bright: #4fd1c5;
  --line: #d9dfe6;
  --paper: #ffffff;
  --tint: #f2f5f7;
  --danger: #b3261e;
  --ok-bg: #e4f4f1;
  --err-bg: #fbeae9;
  --radius: 6px;
  --num: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
/* 화면 폭에 맞춰 글자를 키운다. 1400px에서 약 18px, 2000px 이상에서 약 21px */
html { -webkit-text-size-adjust: 100%; font-size: clamp(16.5px, 0.5vw + 11px, 21px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.7 var(--num);
  word-break: keep-all;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; padding-bottom: 72px; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
h3 small { font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--navy-2); }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
code { background: rgba(0, 0, 0, 0.06); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

.wrap { width: calc(100% - clamp(32px, 3vw, 64px)); margin-inline: auto; }
.narrow { width: min(78rem, 100% - clamp(32px, 3vw, 64px)); }
.stack { display: flex; flex-direction: column; gap: 32px; padding-top: 32px; }
.stack > section > h2 { margin-bottom: 14px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: #fff; padding: 8px 12px; }

/* 머리글 */
.site-header { background: var(--paper); position: relative; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); text-decoration: none; font-size: 1.25rem; white-space: nowrap; }
/* 받은 로고 이미지의 흰 배경이 머리글에 겹쳐 보이지 않게 multiply 로 합친다. */
.brand-logo { height: 3.6rem; width: auto; display: block; mix-blend-mode: multiply; padding: 6px 0; box-sizing: content-box; }
@media (max-width: 420px) { .brand-logo { height: 2.8rem; } }

/* 네모 타일 메뉴 */
.tile-blue { --tile: #2f66e0; }
.tile-teal { --tile: #0f8577; }
.tile-orange { --tile: #b85f0c; }
.tile-coral { --tile: #d3422f; }
.tile-purple { --tile: #6546c2; }
.tile-green { --tile: #4a7a10; }
.tile-navy { --tile: #17335c; }
.tile-magenta { --tile: #b0307a; }
.tile-bar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tile-bar a { background: var(--tile); color: #fff; text-align: center; text-decoration: none; font-weight: 600; padding: 15px 6px; white-space: nowrap; box-shadow: inset 0 -4px 0 transparent; }
.tile-bar a:hover { color: #fff; filter: brightness(0.88); }
.tile-bar a[aria-current] { box-shadow: inset 0 -4px 0 #fff; font-weight: 700; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile-big { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 15.5rem; padding: 1.6rem 1.8rem; background: var(--tile); color: #fff; text-decoration: none; overflow: hidden; }
.tile-big:hover { color: #fff; filter: brightness(0.9); }
.tile-big strong { font-size: 1.6rem; line-height: 1.3; letter-spacing: -0.015em; }
.tile-desc { font-size: 1.02rem; line-height: 1.55; position: relative; z-index: 1; }
.tile-arrow { position: absolute; left: 1.8rem; bottom: 1.6rem; width: 2.9rem; height: 2.9rem; border: 1.5px solid rgba(255, 255, 255, 0.7); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; line-height: 1; transition: background 0.15s, color 0.15s; }
.tile-big:hover .tile-arrow { background: #fff; color: var(--tile); }
.tile-icon { position: absolute; right: 1rem; bottom: 0.5rem; width: 6.5rem; height: 6.5rem; }
.tile-icon svg { width: 100%; height: 100%; display: block; }
.icon-base { fill: rgba(255, 255, 255, 0.2); }
.icon-line { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mobile-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.nav-mobile-panel .mobile-tiles a { background: var(--tile); color: #fff; font-weight: 600; font-size: 0.92rem; text-align: center; padding: 14px 6px; border-radius: 3px; word-break: keep-all; }
.nav-mobile-panel .mobile-tiles a[aria-current] { box-shadow: inset 0 -4px 0 #fff; }
.nav-user { display: flex; align-items: center; gap: 14px; font-size: 1rem; white-space: nowrap; }
.nav-user a:not(.btn) { color: var(--ink-soft); text-decoration: none; }
.nav-user a:not(.btn):hover { color: var(--accent); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); cursor: pointer; }
.linklike:hover { color: var(--accent); }
.nav-mobile { display: none; margin-left: auto; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: 0 10px 28px rgba(14, 34, 64, 0.16); }
.nav-mobile-panel a, .nav-mobile-panel .linklike { display: block; width: 100%; text-align: left; padding: 10px; color: var(--ink); text-decoration: none; border-radius: 4px; }

/* 버튼 */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: var(--radius); padding: 10px 20px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: #075f66; border-color: #075f66; color: #fff; }
.btn-small { padding: 5px 12px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--navy); border-color: #aeb8c4; }
.btn-outline:hover { background: var(--tint); color: var(--navy); border-color: var(--navy-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: #dfa6a2; }
.btn-danger:hover { background: var(--err-bg); color: var(--danger); border-color: var(--danger); }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: #dff5f2; border-color: #dff5f2; color: var(--navy); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.more { font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* 첫 화면 */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero-inner { position: relative; padding: 48px 0 118px; width: calc(100% - clamp(32px, 12vw, 240px)); }
.eyebrow { color: var(--accent-bright); font-weight: 600; font-size: 0.95rem; margin-bottom: 14px; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.hero-lead { margin-top: 18px; max-width: 50em; color: #ccd7e4; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.spwm { position: absolute; left: 0; right: 0; bottom: 8px; width: 100%; height: 96px; }
.spwm path { fill: none; vector-effect: non-scaling-stroke; }
.spwm-pulse { stroke: #35527d; stroke-width: 1.25; }
.spwm-sine { stroke: var(--accent-bright); stroke-width: 2.5; }

.home-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 56px; padding-top: 52px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.band { background: var(--tint); margin-top: 56px; padding: 44px 0; }
.band .section-head { margin-bottom: 4px; }
.band-lead { color: var(--ink-soft); margin-bottom: 18px; }
.stats { display: flex; flex-wrap: wrap; gap: 44px; margin: 30px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--ink-soft); font-size: 0.92rem; }
.stats dd { margin: 0; font-size: 2rem; font-weight: 700; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }

/* 목록 */
.event-list > li { display: flex; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.event-list > li:last-child { border-bottom: 1px solid var(--line); }
.date-tile { flex: none; width: 4.2rem; height: 5.1rem; background: var(--navy); color: #fff; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.78rem; line-height: 1.3; }
.date-tile strong { font-size: 1.6rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kind { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.meta { color: var(--ink-soft); font-size: 0.93rem; }
.meta a { color: inherit; }
.prose { white-space: pre-line; }
.notice-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.notice-list li:last-child { border-bottom: 1px solid var(--line); }
.notice-list a { color: var(--ink); text-decoration: none; }
.notice-list a:hover { color: var(--accent); text-decoration: underline; }
.notice-list time { color: var(--ink-soft); font-size: 0.86rem; flex: none; font-variant-numeric: tabular-nums; }
.pin { color: var(--danger); font-size: 0.82rem; font-weight: 700; }
.paper-row { padding: 15px 0; border-top: 1px solid var(--line); }
.paper-row:last-child { border-bottom: 1px solid var(--line); }
.paper-row .tags { margin-top: 8px; }
.paper-title { font-weight: 600; color: var(--navy); text-decoration: none; }
.paper-title:hover { color: var(--accent); text-decoration: underline; }
.company-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 10px; }
.company-mini a { display: flex; flex-direction: column; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.company-mini a:hover { border-color: var(--accent); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 600; background: var(--tint); color: var(--navy-2); padding: 1px 8px; border-radius: 4px; }
.empty { color: var(--ink-soft); background: var(--tint); padding: 22px; border-radius: var(--radius); }
.band .empty { background: #fff; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { display: block; font-size: 0.84rem; padding: 2px 10px; border: 1px solid #b8d6d7; color: var(--accent); border-radius: 999px; text-decoration: none; background: #fff; }
.tags a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.tags-large { gap: 8px; }
.tags-large a { font-size: 0.98rem; padding: 6px 15px; }

/* 하위 페이지 */
.page-head { background: var(--tint); padding: 38px 0 30px; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--ink-soft); margin-top: 8px; white-space: pre-line; max-width: 46em; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: 16px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.person-top, .company-top { display: flex; gap: 14px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-empty { display: flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-size: 1.4rem; font-weight: 600; }
.logo { width: 76px; height: 48px; object-fit: contain; flex: none; }
.fold summary { cursor: pointer; font-size: 0.93rem; font-weight: 600; color: var(--navy-2); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow: auto hidden; scrollbar-width: none; }
.tabs a { padding: 8px 0; text-decoration: none; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.search { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; flex: 1; }
.search label { font-size: 0.86rem; font-weight: 600; display: flex; flex-direction: column; gap: 3px; flex: 1 1 150px; max-width: 280px; }
.search input, .search select, .search .btn, .toolbar > .btn { height: 46px; padding-block: 0; line-height: 44px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; }
.pager a { padding: 3px 12px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.pager a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.article header { display: flex; flex-direction: column; gap: 8px; }
.article h1 { font-size: 1.7rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.signature { margin-top: 14px; text-align: right; font-weight: 600; }
.info { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.info div { display: flex; gap: 14px; }
.info dt { flex: none; width: 112px; color: var(--ink-soft); }
.info dd { margin: 0; }
.legal section h2 { font-size: 1.12rem; margin-bottom: 8px; }
.legal p + p { margin-top: 8px; }
.center-block { padding: 80px 0; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }

/* 일정표 */
.cal-head { display: flex; align-items: center; justify-content: center; gap: 20px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); margin-top: -16px; }
.cal-week { text-align: center; font-size: 0.85rem; font-weight: 600; padding: 6px; background: var(--tint); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.cal-cell.is-out { background: #fafbfc; }
.cal-cell.is-out .cal-day { color: #98a2af; }
.cal-day { font-size: 0.86rem; font-variant-numeric: tabular-nums; align-self: flex-start; }
.is-today .cal-day { background: var(--accent); color: #fff; border-radius: 4px; padding: 0 6px; font-weight: 700; }
.cal-event { background: var(--navy-2); color: #fff; font-size: 0.76rem; line-height: 1.35; padding: 2px 5px; border-radius: 3px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* 폼 */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label, fieldset { font-weight: 600; font-size: 0.95rem; display: flex; flex-direction: column; gap: 4px; }
.form em { color: var(--danger); font-style: normal; font-size: 0.78rem; font-weight: 600; }
.form small, .help { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #a8b3c0; border-radius: var(--radius); padding: 9px 12px; width: 100%; }
input:disabled { background: var(--tint); color: var(--ink-soft); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex: none; margin: 4px 0 0; accent-color: var(--accent); }
input[type="file"] { padding: 7px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0; }
legend { padding: 0 6px; }
.form label.check { flex-direction: row; gap: 9px; font-weight: 400; align-items: flex-start; }
.form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.trap { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
.consent { background: var(--tint); padding: 14px 16px; border-radius: var(--radius); font-size: 0.93rem; display: flex; flex-direction: column; gap: 6px; }
.consent ul { list-style: disc; padding-left: 18px; }
.auth { width: min(40rem, 100% - 32px); padding-top: 44px; display: flex; flex-direction: column; gap: 14px; }
.auth-foot { text-align: center; font-size: 0.93rem; }
.qr { align-self: center; border: 1px solid var(--line); border-radius: var(--radius); }
.secret-key { font-family: Consolas, monospace; font-size: 0.92rem; background: var(--tint); padding: 8px 10px; border-radius: 4px; word-break: break-all; }
.current-image { display: flex; gap: 12px; align-items: center; }
.current-image img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; }

.flash { padding: 10px 14px; border-radius: var(--radius); font-size: 0.95rem; }
.wrap > .flash { margin-top: 14px; }
.flash-ok { background: var(--ok-bg); color: #0b5d55; }
.flash-error { background: var(--err-bg); color: #8d1f18; }

/* 운영 화면 */
.admin-nav { display: flex; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); overflow: auto hidden; scrollbar-width: none; font-size: 0.93rem; }
.admin-nav a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; font-weight: 500; }
.admin-nav a[aria-current] { color: var(--accent); font-weight: 700; }
.admin h1 { font-size: 1.5rem; }
.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; }
.tile:hover { border-color: var(--accent); }
.tile span { color: var(--ink-soft); font-size: 0.92rem; }
.tile strong { font-size: 2rem; line-height: 1.25; color: var(--navy); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th { text-align: left; font-size: 0.84rem; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-select { display: flex; gap: 4px; }
.inline-select select { padding: 3px 6px; width: auto; font-size: 0.88rem; }

/* 바닥글 */
.site-footer { background: var(--navy); color: #c6d2e0; padding: 32px 0; font-size: 0.92rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #c6d2e0; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 16px; }
.site-footer .strong { font-weight: 700; color: #fff; }

@media (max-width: 1020px) {
  .tile-bar, .nav-user { display: none; }
  .nav-mobile { display: block; }
  .site-header { border-bottom: 1px solid var(--line); }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  h1 { font-size: 1.6rem; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 38px; padding-top: 38px; }
  .hero-inner { padding: 36px 0 92px; }
  .hero h1 br { display: none; }
  .spwm { height: 72px; }
  .tile-big { min-height: 208px; padding: 18px 16px; }
  .tile-big strong { font-size: 1.14rem; }
  .tile-desc { font-size: 0.84rem; }
  .tile-arrow { left: 16px; bottom: 16px; width: 38px; height: 38px; font-size: 1.05rem; }
  .tile-icon { width: 72px; height: 72px; right: 8px; bottom: 6px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .calendar { display: none; }
  .cal-head { justify-content: space-between; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .search label { max-width: none; flex-basis: 100%; }
  .toolbar > .btn { width: 100%; }
  .notice-list li { flex-direction: column; gap: 2px; }
  .info div { flex-direction: column; gap: 0; }
  .stats { gap: 28px; }
}

.preview-banner { margin: 0; background: #fff4d6; color: #6b4a00; text-align: center; font-size: 0.92rem; font-weight: 600; padding: 8px 16px; }
