:root {
  --ink: #102f32; --teal: #07685d; --teal-dark: #062c32; --lime: #d8fb52;
  --paper: #fff; --canvas: #f4f7f4; --line: #d2dfd9; --muted: #526b65;
  color-scheme: light; color: var(--ink); background: var(--canvas);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a, button, input, select, summary { -webkit-tap-highlight-color: rgba(17,128,102,.16); }
:focus-visible { outline: 3px solid #e79523; outline-offset: 3px; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
h1 { font-size: clamp(29px, 3.1vw, 46px); letter-spacing: -.07em; font-weight: 850; line-height: 1.22; overflow-wrap: anywhere; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.045em; }
h3 { font-size: 17px; }
small, .hint, .muted { color: var(--muted); }
small { display: block; font-size: 13px; font-weight: 500; }
.hint, .muted { font-size: 14px; line-height: 1.55; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.shell { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0,1fr); }
.rail { align-self: start; position: sticky; top: 0; min-height: 100vh; display: flex; flex-direction: column; padding: 30px 19px 21px; background: linear-gradient(170deg,#103a3e,#04252b 55%); color: white; border-right: 1px solid #24484a; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; padding: 4px 8px 26px; color: #ecfff7; }
.brand img { display: block; width: 145px; height: auto; }
.brand span { font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.brand:hover { text-decoration: none; }
nav { display: grid; gap: 5px; padding-top: 18px; border-top: 1px solid #355759; }
nav a { color: #dbeae4; padding: 12px 15px; border-radius: 6px; font-size: 15px; font-weight: 680; }
nav a:hover { background: #1c4447; text-decoration: none; }
nav a[aria-current=page] { background: var(--lime); color: #13332d; }
.account { margin-top: auto; padding: 24px 8px 0; display: grid; gap: 3px; }
.account strong { overflow-wrap: anywhere; }
.account span { color: #b1cdc5; font-size: 13px; }
.logout { background: transparent; color: #d4e5df; border: 0; padding: 8px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.main { padding: 24px clamp(20px,4vw,70px) 64px; width: 100%; max-width: 1620px; margin: 0 auto; }
.tenant { display: flex; align-items: center; gap: 9px; padding: 0 0 17px; margin: 0 0 28px; border-bottom: 1px solid var(--line); color: #41675a; font-size: 13px; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 100%; background: #19ad88; }
.back, .text-link { font-size: 14px; font-weight: 750; }
.back { display: inline-block; margin: 0 0 13px; }
.heading, .section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }
.section-head { margin-bottom: 16px; }
.eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border: 1px solid #b5c9c0; border-radius: 6px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 760; line-height: 1.35; text-align: center; }
.btn:hover { background: #eaf3ed; text-decoration: none; }
.main-btn { background: var(--teal); color: white; border-color: var(--teal); }
.main-btn:hover { background: #07544d; }
.slim { min-height: 37px; padding: 8px 11px; }
.panel, .empty, .board-card { border: 1px solid var(--line); background: var(--paper); border-radius: 11px; }
.panel, .empty { padding: clamp(16px,2vw,28px); margin: 0 0 18px; min-width: 0; }
.panel > h2 { margin-bottom: 16px; }
.panel .muted + .btn, .panel .muted + .text-link { display: inline-flex; margin-top: 12px; }
.empty { padding-block: 46px; text-align: center; }
.empty p { margin: 9px 0 20px; color: var(--muted); }
.metrics { display: flex; flex-wrap: wrap; background: white; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 19px; }
.metrics > div { flex: 1; min-width: 130px; padding: 18px clamp(12px,2.4vw,28px); }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics span { display: block; color: var(--muted); font-size: 14px; font-weight: 650; }
.metrics strong { display: block; margin-top: 2px; font-size: clamp(24px,3vw,38px); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metrics strong small { display: inline; margin-left: 4px; font-size: 16px; }
.search { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.search input { min-width: 0; max-width: 330px; }
.search button, .search a { flex: none; white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,280px),1fr)); gap: 17px; }
.board-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); }
.board-card:hover { border-color: #69a38b; text-decoration: none; box-shadow: 0 3px 13px #183b3010; }
.cover, .hero-banner { background: #e0ebe5; }
.cover { aspect-ratio: 2; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-card section { flex: 1; display: flex; flex-direction: column; padding: 16px 18px 18px; }
.board-card h2 { margin: 8px 0 14px; overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; width: fit-content; font-size: 12px; font-weight: 750; padding: 3px 9px; color: #1a634b; background: #e1f3e6; border-radius: 5px; }
.facts { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.facts b { margin-left: auto; color: var(--ink); }
.split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.hero-banner { width: 100%; border-radius: 6px; display: block; aspect-ratio: 2; object-fit: contain; }
.detail-list { margin: 12px 0; }
.detail-list > div, .row-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 14px; }
.detail-list dd { font-weight: 700; text-align: right; }
.row-link { font-size: 15px; }
.row-link span { font-size: 13px; }
.prizes { padding: 0; list-style: none; }
.prizes li, .pick, .ad-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prizes img, .mini, .thumb { width: 64px; height: 56px; object-fit: cover; border: 1px solid var(--line); background: var(--canvas); border-radius: 5px; }
.prizes strong { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.prizes b, .row-end { margin-left: auto; white-space: nowrap; font-size: 14px; }
.form { display: grid; gap: 15px; }
.form > .panel { margin: 0; }
.form > .btn { justify-self: start; }
.form > h2 { margin: 0; }
label { display: grid; gap: 6px; min-width: 0; font-size: 14px; font-weight: 720; }
input:not([type=checkbox]), select, output { width: 100%; padding: 10px 12px; min-height: 42px; border: 1px solid #b8cdc2; border-radius: 5px; background: white; color: var(--ink); font-size: 15px; }
input[type=file] { font-size: 13px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--teal); }
output { background: #eaf2eb; }
.fields, .grade-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 12px; }
.grade-fields { grid-template-columns: minmax(64px,.6fr) minmax(110px,2fr) minmax(70px,.7fr) auto; align-items: end; }
.prize-editor { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: min(200px,100%); }
.inline-form + .hint { margin-top: 10px; }
.narrow { max-width: 640px; }
summary { font-size: 16px; font-weight: 760; }
details[open] > summary { margin-bottom: 15px; }
.panel > details { margin-top: 16px; }
.maintenance { margin: 17px 0 8px; }
.pick { display: flex; font-weight: normal; }
.pick input { flex: 0 0 20px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
td, th { padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); background: var(--canvas); }
.break { overflow-wrap: anywhere; }
.enroll { padding: 21px; background: #eefbcf; border: 1px solid #bbd48a; border-radius: 10px; margin-bottom: 18px; }
.enroll code { display: block; font: bold 24px ui-monospace,monospace; color: #20483d; margin: 12px 0; overflow-wrap: anywhere; }
.notice { margin: 10px 0 20px; padding: 12px 16px; border: 1px solid #b2d3c0; background: #e2f4e7; border-radius: 6px; color: #184739; }
.notice.danger { color: #7c2a24; border-color: #e3b1a6; background: #fff1eb; }
.ad-layout { display: grid; grid-template-columns: minmax(190px,.72fr) minmax(300px,1.4fr); gap: 17px; align-items: start; }
.ad-preview, .preview-mini { display: grid; grid-template-rows: repeat(3,minmax(0,1fr)); aspect-ratio: 9/16; gap: 2px; padding: 7px; border-radius: 10px; background: var(--teal-dark); }
.ad-preview { max-width: 236px; margin: 0 auto; }
.ad-preview > div { position: relative; overflow: hidden; display: grid; place-items: center; color: #c2ddd0; background: #254b4a; font-size: 12px; }
.ad-preview div:nth-child(2), .preview-mini i:nth-child(2) { background: #37635d; }
.ad-preview img, .preview-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-preview img { position: absolute; inset: 0; }
.ad-preview img[hidden] { display: none; }
.preview-mini { flex: 0 0 35px; width: 35px; border-radius: 4px; padding: 3px; }
.preview-mini i { background: #5a8575; }
fieldset { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 14px 16px; min-width: 0; }
legend { font-weight: 750; padding: 0 5px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(ellipse at 80% 0,#1c514b,transparent 55%),var(--teal-dark); }
.auth { width: min(100%,430px); }
.auth-logo { display: block; width: 150px; margin: 0 auto 25px; }
.auth-card { padding: clamp(24px,4vw,42px); border-radius: 12px; background: white; }
.auth-card h1 { font-size: 30px; margin-bottom: 24px; }
.auth-card .main-btn { width: 100%; }
.auth-card .text-link { margin-top: 22px; display: inline-flex; }
@media(max-width:800px) {
  .shell { display: block; }
  .rail { position: static; min-height: auto; padding: 11px 16px 7px; display: grid; grid-template-columns: 1fr auto; }
  .brand { flex-direction: row; align-items: center; padding: 0; gap: 9px; }
  .brand img { width: 83px; }
  .brand span { font-size: 14px; }
  .account { grid-column: 2; grid-row: 1; padding: 0; display: flex; align-items: center; gap: 8px; margin: 0; }
  .account span, .account strong { display: none; }
  nav { grid-column: 1/-1; display: flex; gap: 2px; overflow-x: auto; padding: 7px 0 0; border: 0; }
  nav a { flex: 0 0 auto; padding: 7px 9px; font-size: 13px; }
  .main { padding: 17px 15px 45px; }
  .tenant { padding-bottom: 10px; margin-bottom: 18px; }
}
@media(max-width:570px) {
  .split, .ad-layout { grid-template-columns: 1fr; gap: 0; }
  .metrics { flex-wrap: nowrap; }
  .metrics > div { min-width: 0; }
  .metrics span { font-size: 12px; }
  .grade-fields { grid-template-columns: 1fr 1fr; }
  .grade-fields label:nth-child(2) { grid-column: span 1; }
  .ad-preview { max-width: 145px; }
  .heading .actions { width: 100%; }
}

.layout-symbol { display: grid; flex: 0 0 28px; height: 42px; gap: 2px; padding: 3px; border-radius: 4px; background: #204f49; grid-template-rows: repeat(3,1fr); }
.layout-symbol i { border-radius: 1px; background: #9cdbb4; }
.layout-symbol.topTwo, .ad-preview.topTwo { grid-template-rows: 2fr 1fr; }
.layout-symbol.bottomTwo, .ad-preview.bottomTwo { grid-template-rows: 1fr 2fr; }
.layout-symbol.full, .ad-preview.full { grid-template-rows: 1fr; }
.layout-symbol.topTwo i:last-child, .layout-symbol.bottomTwo i:last-child, .layout-symbol.full i:nth-child(n+2) { display: none; }
.group-preview [hidden], [data-group-form] fieldset[hidden], [data-material-form] fieldset[hidden] { display: none; }
.ad-row small, .table-scroll td small { display: block; }
.slide-editor { display: grid; grid-template-columns: minmax(100px,1fr) minmax(100px,1fr) 92px auto; gap: 9px; padding: 12px 0; align-items: end; border-bottom: 1px solid var(--line); }
.row-tools { display: flex; gap: 4px; justify-content: flex-start; }
.row-tools .btn { min-width: 34px; padding: 5px 8px; }
.row-tools .btn:disabled, [data-add-entry]:disabled, [data-add-slide]:disabled { opacity: .45; cursor: default; }
.entry { display: grid; grid-template-columns: minmax(80px,1fr) auto; align-items: center; gap: 8px; margin-bottom: 8px; }
.add-entry { justify-self: start; }
.material-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(200px,100%),1fr)); gap: 16px; }
.material-card { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; align-self: start; }
.material-card > img, .material-card > video { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; background: #163735; }
.material-card > div { padding: 12px; }
.material-card h3 { margin: 0 0 6px; overflow-wrap: anywhere; }
.material-card summary { font-size: 13px; margin: 8px 0; }
.slide-list { display: grid; gap: 5px; padding: 0; list-style: none; }
.slide-list li { display: flex; gap: 8px; align-items: center; }
.slide-list img { width: 48px; height: 30px; object-fit: contain; }
@media(max-width:700px) {
  .slide-editor { grid-template-columns: 1fr 1fr; }
  .entry { grid-template-columns: 1fr; }
}
