/*
  애플과학 스타일
  - 배경은 흰색, 칸은 약한 베이지, 칸 안의 항목은 흰색
  - 글자와 주요 버튼은 딥 네이비, 포인트는 블루 하나
  - 아이콘은 단색 라인 (Lucide)
  - 모바일 우선. 본문 16px 이상, 누르는 곳은 48px 이상
*/
:root {
  --ink: #1E293B;
  --navy: #0F172A;
  --sub: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --bg: #FFFFFF;
  --box: #FBFAF7;
  --box-line: #ECEAE5;
  --accent: #2563EB;
  --accent-soft: #EFF6FF;
  --ok-bg: #ECFDF5; --ok-ink: #047857;
  --warn-bg: #FFFBEB; --warn-ink: #92400E;
  --bad-bg: #FEF2F2; --bad-ink: #B91C1C;
}

@font-face { font-family: 'Pretendard'; font-weight: 400; font-display: swap; src: url('/fonts/Pretendard-Regular.subset.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 600; font-display: swap; src: url('/fonts/Pretendard-SemiBold.subset.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 700; font-display: swap; src: url('/fonts/Pretendard-Bold.subset.woff2') format('woff2'); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', 'Noto Sans KR', 'Segoe UI', sans-serif;
  padding-bottom: 88px;
}
a { color: var(--accent); }
h1 { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 12px 0 18px; color: var(--navy); }
h2 { font-size: 19px; font-weight: 700; margin: 0 0 14px; color: var(--navy); }
h3 { font-size: 17px; font-weight: 700; margin: 0 0 4px; color: var(--navy); }
main { display: block; max-width: 720px; margin: 0 auto; padding: 8px 16px 24px; }
main.narrow { max-width: 480px; }
main.wide { max-width: 1100px; }
section { display: block; }
p { margin: 8px 0; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.sub { color: var(--sub); font-size: 15px; font-weight: 400; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }

/* 아이콘: 단색 라인 */
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* 머리글 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 6px 8px 6px 16px; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--navy); text-decoration: none; margin-right: auto; }
.brand img { border-radius: 8px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--sub); cursor: pointer; }
.icon-btn:hover { background: var(--box); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* 하단 메뉴 */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom a { flex: 1; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--sub); text-decoration: none; font-size: 13px; font-weight: 500; }
.bottom a.on { color: var(--navy); font-weight: 700; }

/* 문의 버튼 */
.fab { position: fixed; right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 19; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: var(--navy); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(15, 23, 42, .25); }
.fab .ic { width: 18px; height: 18px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px 18px; border: 1px solid transparent; border-radius: 10px; background: var(--navy); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.small { width: auto; min-height: 40px; padding: 6px 14px; font-size: 15px; white-space: nowrap; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn.soft { background: #fff; color: var(--navy); border-color: var(--box-line); }
.btn.light { background: #fff; color: var(--navy); }
.btn.outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn.danger { background: #fff; color: var(--bad-ink); border-color: #FECACA; }
main > .btn, main > form { margin-bottom: 12px; }
.top form { margin: 0; }

/* 큰 칸(약한 베이지)과 그 안의 항목(흰색). 칸 밖의 항목은 베이지 */
.panel { display: block; background: var(--box); border: 1px solid var(--box-line); border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.item { display: block; background: var(--box); border: 1px solid var(--box-line); border-radius: 10px; padding: 14px; margin: 0 0 10px; }
.panel .item { background: #fff; }
.panel > .item:last-child { margin-bottom: 0; }
.item.marked { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.item.done { opacity: .55; }
.item.link { display: flex; align-items: center; gap: 10px; min-height: 56px; color: var(--ink); text-decoration: none; }
.item.link .ic { color: var(--sub); width: 18px; height: 18px; }
.item > form:last-child:not(.form), .panel > form:last-child:not(.form) { margin-top: 10px; }
summary { font-weight: 600; cursor: pointer; }
details .form { margin-top: 14px; }
.empty { text-align: center; color: var(--sub); padding: 18px 8px; margin: 0; }
.back { display: inline-block; padding: 6px 0 10px; text-decoration: none; color: var(--sub); }
.notice-line { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }

.line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.item.line { padding: 12px 14px; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #E2E8F0; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; vertical-align: 1px; }
.tag.PRESENT { background: var(--ok-bg); color: var(--ok-ink); }
.tag.LATE, .tag.EXCUSED { background: var(--warn-bg); color: var(--warn-ink); }
.tag.ABSENT { background: var(--bad-bg); color: var(--bad-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stars { color: var(--navy); letter-spacing: 1px; }
.late { color: var(--bad-ink); font-weight: 600; }
.head { display: flex; align-items: baseline; justify-content: space-between; }
.head a { font-size: 15px; color: var(--sub); text-decoration: none; }

/* 입력 */
.form { display: flex; flex-direction: column; gap: 14px; }
label { display: block; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]), select, textarea { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 44px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
/* 휴대폰의 날짜·시간 입력칸이 칸 밖으로 넘어가지 않게 기본 모양을 끈다 */
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; text-align: left; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
.field-title { display: block; font-weight: 600; }
/* 알림: 안 읽은 줄은 밝고 진하게, 읽은 줄은 흐리게 */
.notif-menu { position: fixed; top: 60px; right: 8px; width: min(400px, calc(100vw - 16px)); max-height: min(70vh, 480px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); overflow: hidden; }
.notif-menu[hidden] { display: none; }
.notif-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); color: var(--navy); font-size: 17px; }
.notif-menu-head a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; color: var(--accent); font-size: 15px; font-weight: 600; text-decoration: none; }
.notif-menu .notif-list { overflow-y: auto; }
.notif-menu .empty { margin: 0; padding: 24px 14px; }
.notif-list { display: flex; flex-direction: column; border: 1px solid var(--box-line); border-radius: 12px; overflow: hidden; }
.notif-menu .notif-list { border: 0; border-radius: 0; }
.notif-row { display: flex; align-items: center; gap: 8px; flex: none; min-height: 48px; padding: 6px 12px; background: var(--box); color: var(--sub); font-size: 16px; text-decoration: none; }
.notif-row + .notif-row { border-top: 1px solid var(--box-line); }
.notif-row[hidden] { display: none; }
.notif-row.unread { background: #fff; color: var(--navy); font-weight: 700; }
.notif-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notif-date { flex: none; color: var(--sub); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.notif-kind { flex: none; padding: 2px 7px; border-radius: 6px; background: #E2E8F0; color: #475569; font-size: 12px; font-weight: 600; }
.notif-row.unread .notif-kind { background: #DBEAFE; color: #1D4ED8; }
.notif-row.unread[data-kind="과제"] .notif-kind { background: #FEF3C7; color: #92400E; }
.notif-row.unread[data-kind="성적"] .notif-kind { background: #DCFCE7; color: #166534; }
.notif-row.unread[data-kind="확인"] .notif-kind { background: #FEE2E2; color: #991B1B; }
.notif-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.notif-tabs button { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--box-line); border-radius: 999px; background: #fff; color: var(--sub); font: inherit; font-weight: 600; cursor: pointer; }
.notif-tabs button.on { border-color: var(--navy); background: var(--navy); color: #fff; }

/* 접속할 때 한 번 나오는 로고 화면 */
#splash { display: none; }
html.splash #splash {
  display: flex; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #0F172A, #1E293B 62%, #27364D);
  animation: splash-out .35s ease 1.1s forwards;
}
html.splash #splash img { width: min(48vw, 220px); height: auto; border-radius: 22%; animation: splash-in .45s ease-out both; }
@keyframes splash-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* 시간표 가로 배열 */
.timetable-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.timetable-cell { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 8px 6px; border: 1px solid var(--box-line); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-weight: 600; line-height: 1.3; word-break: keep-all; text-align: center; cursor: pointer; }
.notice-entry { margin-bottom: 8px; }
.notice-entry:last-child { margin-bottom: 0; }
.notice-entry .row-item .block { white-space: nowrap; }
.notice-entry .row-item .grow { min-width: 0; }

.qr-body { padding: 0; }
.qr-page { max-width: 520px; text-align: center; }
.qr-page .back { display: block; text-align: left; }
.lead-dark { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.qr-box { width: min(78vw, 400px); margin: 0 auto 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-count { font-size: 18px; }
.qr-count strong { font-size: 28px; }
.qr-names { justify-content: center; }
.attend-result { text-align: center; }
.attend-status { font-size: 24px; padding: 6px 28px; }
.fine { margin: 18px 0 0; text-align: center; font-size: 13px; }
.fine a { color: var(--sub); }
.push-prompt { display: flex; align-items: center; gap: 10px; }
[hidden] { display: none !important; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 8px; font-weight: 500; }
.score-row input { margin-top: 0 !important; text-align: center; }
.big-score { font-size: 22px; color: var(--navy); }
input:disabled { background: var(--box); color: var(--sub); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.row > label, .form > label, .form > div { min-width: 0; }
.panel, .item, .form { min-width: 0; max-width: 100%; }
/* 시간표와 공지의 같은 크기 줄 */
.row-list { display: flex; flex-direction: column; gap: 8px; }
.row-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 8px 14px; border: 1px solid var(--box-line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.row-item .ic { width: 18px; height: 18px; color: var(--sub); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.edit { margin-top: 10px; }
details.edit summary { color: var(--sub); font-weight: 500; }
details.edit form { margin-top: 10px; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 500; min-height: 44px; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--navy); }

/* 라디오를 큰 버튼처럼 */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.choice.three { grid-template-columns: repeat(3, 1fr); }
.choice.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font-weight: 600; cursor: pointer; }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 탭 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; position: sticky; top: 57px; z-index: 10; background: #fff; }
.tabs { overflow-x: auto; }
.tabs a { flex: 1 0 auto; padding: 0 10px; min-height: 46px; display: flex; align-items: center; justify-content: center; color: var(--sub); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--navy); }

/* 엑셀처럼: 맨 윗줄이 필터 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }
.sheet { width: 100%; border-collapse: collapse; white-space: nowrap; }
.sheet th { position: sticky; top: 0; background: var(--box); padding: 6px; border-bottom: 1px solid var(--line-strong); text-align: left; font-weight: 600; }
.sheet th input:not([type=checkbox]), .sheet th select { min-height: 38px; margin: 0; padding: 6px 8px; min-width: 92px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-weight: 600; background: #fff; }
.sheet td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sheet tbody tr:last-child td { border-bottom: 0; }
.sheet td a { font-weight: 600; color: var(--navy); }
.sheet .tick { width: 44px; text-align: center; padding-left: 8px; padding-right: 8px; }
.sheet .tick input { width: 20px; height: 20px; accent-color: var(--navy); vertical-align: middle; }

/* 홈 */
main.home { max-width: 1240px; padding-top: 0; }
.moon { position: absolute; top: 20px; right: 22px; width: 46px; height: 46px; border-radius: 50%; box-shadow: inset -13px 5px 0 0 #F4E7C8; filter: drop-shadow(0 0 10px rgba(244, 231, 200, .55)); transform: rotate(-12deg); pointer-events: none; }
.hero {
  position: relative;
  margin: 0 -16px 16px; padding: 40px 24px 28px; color: #fff; overflow: hidden;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.75), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 46% 18%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 63% 44%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.5px 1.5px at 78% 14%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 90% 62%, rgba(255,255,255,.6), transparent),
    linear-gradient(150deg, #0F172A 0%, #1E293B 62%, #27364D 100%);
}
.eyebrow { margin: 0 56px 12px 0; color: #E7D9BE; font-size: 15px; font-weight: 600; word-break: keep-all; }
.hero h1 { font-size: 31px; line-height: 1.3; margin: 0 0 14px; color: #fff; word-break: keep-all; }
.lead { margin: 0 0 22px; color: #CBD5E1; word-break: keep-all; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 26px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; overflow: hidden; }
.hero-stats div { display: flex; flex-direction: column; padding: 14px; background: #1E293B; }
.hero-stats strong { font-size: 21px; line-height: 1.3; color: #fff; }
.hero-stats span { font-size: 14px; color: #CBD5E1; word-break: keep-all; }
.band { padding: 18px 2px 20px; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.why-grid article { padding: 16px 14px; background: var(--box); border: 1px solid var(--box-line); border-radius: 12px; }
.why-grid .ic { width: 24px; height: 24px; color: var(--navy); margin-bottom: 10px; }
.why-grid h3 { word-break: keep-all; }
.why-grid p { margin: 4px 0 0; font-size: 15px; color: #475569; word-break: keep-all; }
.cta { margin: 0 -16px -24px; padding: 28px 24px; background: var(--navy); color: #fff; }
.cta h2 { color: #fff; word-break: keep-all; }
.location .btn { margin-top: 6px; }
.two-col, .auto-grid { display: block; }
.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 10px 4px; border: 1px solid var(--box-line); border-radius: 12px; background: var(--box); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: center; word-break: keep-all; line-height: 1.25; text-decoration: none; cursor: pointer; }
.tile .ic { color: var(--sub); width: 24px; height: 24px; }
.count { position: absolute; top: 8px; right: 8px; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 14px; line-height: 22px; text-align: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid3 .btn { padding: 8px 4px; }
.map { display: block; width: 100%; height: 240px; border: 1px solid var(--line); border-radius: 10px; margin: 12px 0; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border-radius: 10px; background: var(--box); color: var(--ink); font-weight: 600; text-decoration: none; }
.menu .ic { color: var(--sub); }

/* 수강후기: 3칸 */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.review-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 10px; border: 1px solid var(--box-line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.45; text-align: left; cursor: pointer; }
.review-cell .stars { font-size: 13px; letter-spacing: 0; }
.review-cell strong { font-size: 16px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-cell .hl { font-size: 14px; color: #475569; word-break: keep-all; }
.clamp { display: none; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clamp.always { display: -webkit-box; }

/* 숫자 요약 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.stat strong { font-size: 24px; line-height: 1.25; color: var(--navy); }
.stat span { font-size: 14px; color: var(--sub); text-align: center; word-break: keep-all; }

/* 과제 */
.task { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task > div { flex: 1; min-width: 0; }
.task form { flex: none; margin: 0 !important; }

/* 강의실 배치도: 6칸 2줄, 가운데 복도 */
.floor { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: 70px 70px; row-gap: 36px; column-gap: 4px; padding: 10px 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; }
.room { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.2; text-align: center; }
.room strong { font-size: 14px; letter-spacing: -.3px; }
.room span { font-size: 12px; letter-spacing: -.5px; word-break: keep-all; }
.room.free { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); cursor: pointer; }
.room.free.picked { background: var(--accent); color: #fff; }
.room.used { background: #475569; color: #fff; border-color: #475569; }
.room.fixture { background: var(--box); color: var(--sub); border-color: var(--line); }

/* 알림 메시지 */
.flash { margin: 10px 16px 0; padding: 12px 14px; border-radius: 10px; font-weight: 600; overflow-wrap: anywhere; }
main .flash { margin: 0 0 12px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.bad { background: var(--bad-bg); color: var(--bad-ink); }

/* 팝업 */
dialog { width: min(560px, 94vw); max-height: 90vh; border: 0; border-radius: 14px; padding: 18px; overflow: auto; color: var(--ink); }
dialog::backdrop { background: rgba(15, 23, 42, .5); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 8px 0; }
.dialog-head h2 { margin: 0; }
dialog .form { margin-top: 14px; }
dialog.image img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; border-radius: 8px; }

/* 배너 팝업: 모두 한 번에 보여 주고 각각 X로 닫기 */
dialog.banners { width: min(480px, 94vw); padding: 0; background: #fff; }
.banner-list { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 0; }
.banner-card { position: relative; border-radius: 10px; overflow: hidden; background: var(--box); }
.banner-card img { display: block; width: 100%; height: auto; }
.banner-x { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .7); color: #fff; cursor: pointer; }
.banner-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; background: #fff; border-top: 1px solid var(--line); }

/* 배너 관리 */
.banner-row { display: flex; align-items: center; gap: 12px; }
.banner-row img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; background: #fff; flex: none; }
.banner-actions { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: flex-end; }
.banner-actions strong { margin-right: auto; }
.banner-actions form { margin: 0 !important; }

.danger-zone { margin-top: 28px; text-align: right; }

/* PC: 하단 메뉴를 왼쪽 사이드바로 */
@media (min-width: 960px) {
  body { padding: 0 0 0 200px; }
  .bottom { top: 0; right: auto; width: 200px; flex-direction: column; border-top: 0; border-right: 1px solid var(--line); padding: 72px 10px 16px; gap: 2px; z-index: 15; }
  .bottom a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 10px; font-size: 15px; }
  .bottom a.on { background: var(--box); }
  .top { position: fixed; left: 0; right: 0; }
  main { max-width: 1040px; padding: 76px 32px 32px; }
  main.narrow { max-width: 520px; }
  main.wide { max-width: 1240px; }
  .flash { margin: 76px auto -64px; max-width: 900px; position: relative; z-index: 5; }
  main .flash { margin: 0 0 12px; }
  .fab { bottom: 24px; right: 24px; }
  .tabs { top: 57px; }

  /* 양옆이 비지 않도록 PC에서는 여러 칸으로 나눈다 */
  main.home { padding: 57px 32px 0; }
  .hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 48px; margin: 0 -32px 24px; padding: 72px 56px; }
  .hero h1 { font-size: 42px; }
  .moon { top: 26px; right: 56px; width: 64px; height: 64px; box-shadow: inset -18px 7px 0 0 #F4E7C8; }
  .two-col:has(#schedule) { align-items: stretch; }
  #schedule { display: flex; flex-direction: column; }
  #schedule .timetable-row { flex: 1; }
  .two-col:has(#schedule) .panel { margin-bottom: 16px; }
  .hero-actions { display: flex; }
  .hero-actions .btn { width: auto; min-width: 150px; }
  .hero-stats { margin-top: 0; }
  .hero-stats div { padding: 22px; }
  .hero-stats strong { font-size: 28px; }
  .why-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .why-grid article { padding: 22px 20px; }
  .two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
  .auto-grid .item { margin: 0; }
  .review-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .review-cell { padding: 18px 16px; }
  .clamp { display: -webkit-box; }
  .location { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 28px; align-items: center; }
  .location .map { height: 300px; margin: 0; }
  .location .btn { width: auto; }
  .cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 8px -32px 0; padding: 40px 56px; }
  .cta h2 { margin: 0; font-size: 24px; }
  .cta .grid2 { margin: 0; min-width: 420px; }
  .shortcuts.home-tiles { grid-template-columns: repeat(4, 1fr); }
  dialog.banners { width: min(1160px, 92vw); }
  .banner-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
