/*
 * 삼고 HUB — 화면 스타일.
 *
 * 구조 (Ctrl+F로 "---------- 제목 ----------"을 찾으면 이동)
 *   :root            색상·여백 토큰(변수). 색을 바꾸려면 여기만 고치면 전체 반영
 *   [data-theme=dark] 다크 모드일 때 덮어쓰는 색
 *   Topbar / Layout / Card / Side menu / Main / Right widgets
 *   Buttons / Drawer / Modal / 로그인·회원가입 페이지
 *   Responsive        화면이 좁을 때(@media max-width:860px) 규칙 — 모바일 전용
 *   모바일 하단 탭바
 *
 * 색을 바꾸고 싶다면: 아래 :root의 변수(--blue 등) 값만 바꾼다.
 * 모바일만 다르게 하고 싶다면: "Responsive" 섹션의 @media 블록 안에 쓴다.
 */
:root {
  /* 색상 토큰 — 화면 전체가 이 변수를 참조한다 */
  --blue: #2563eb;        /* 기본 포인트 색(버튼·링크) */
  --blue-dark: #1d4ed8;
  --blue-soft: #eef4ff;   /* 연한 파랑 배경 */
  --bg: #f3f5f9;          /* 페이지 배경 */
  --card: #ffffff;        /* 카드/패널 배경 */
  --text: #1a2233;        /* 기본 글자색 */
  --muted: #7a8296;       /* 보조 글자색(설명·메타) */
  --line: #e7ebf2;        /* 테두리·구분선 */
  --danger: #dc2626;      /* 경고·삭제 */
  --ok: #16a34a;          /* 성공·승인 */
  --accent: #f59e0b;      /* 강조(급식 등) */
  --shadow: 0 1px 3px rgba(20, 30, 60, 0.06), 0 8px 24px rgba(20, 30, 60, 0.04);
  --radius: 20px;
}
[data-theme="dark"] {
  --blue: #3b82f6;
  --blue-dark: #60a5fa;
  --blue-soft: #1e293b;
  --bg: #0f172a;
  --card: #1a2336;
  --text: #e5e9f0;
  --muted: #94a3b8;
  --line: #2b374d;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-text-size-adjust: 100%;
}
.hidden { display: none !important; }
button { cursor: pointer; font: inherit; color: inherit; }
input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.hamburger { display: none; border: 0; background: transparent; font-size: 22px; padding: 4px 6px; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
[data-theme="dark"] .brand-logo { background: #fff; padding: 3px; }
.brand-title { font-size: 19px; font-weight: 800; }
.brand-title span { color: var(--blue); }
.brand-year {
  font-size: 11px; background: var(--blue-soft); color: var(--blue);
  padding: 1px 7px; border-radius: 999px; vertical-align: middle; font-weight: 700;
}
.brand-sub { font-size: 11px; color: var(--muted); }

.topbar-search { flex: 1; max-width: 520px; margin: 0 auto; position: relative; display: flex; align-items: center; }
.topbar-search .search-ico {
  position: absolute; left: 16px; width: 17px; height: 17px; color: var(--muted); pointer-events: none;
}
.topbar-search input {
  width: 100%; padding: 10px 16px 10px 42px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg); color: var(--text);
}
.topbar-search input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); padding: 8px 12px; border-radius: 10px;
  font-size: 15px; display: flex; align-items: center; gap: 6px; color: var(--text);
}
.icon-btn:hover { background: var(--bg); border-color: var(--blue); }
#drawer-close { border: 0; background: transparent; font-size: 20px; }
.icon-label { font-size: 13px; }
.divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.link-btn { border: 0; background: transparent; padding: 8px 10px; font-size: 14px; font-weight: 600; }
.btn-primary {
  background: var(--blue); color: #fff; border: 0; padding: 9px 16px;
  border-radius: 10px; font-weight: 700; font-size: 14px;
}

/* ---------- Layout ---------- */
.layout {
  max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px;
  display: grid; grid-template-columns: 290px minmax(0, 1fr) 300px; gap: 20px;
  align-items: start;
}
.col-left, .col-right { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Card ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.card h3, .card h2 { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 13px; }
.chip {
  display: inline-block; background: var(--blue-soft); color: var(--blue);
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}

/* ---------- Side menu ---------- */
.login-card { text-align: center; }
.login-card p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.login-card .go { color: var(--blue); font-weight: 700; cursor: pointer; }
.menu-title { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
#side-menu, #drawer-menu { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: 11px; border: 0; background: transparent; width: 100%; text-align: left;
  font-size: 14.5px; font-weight: 600; color: var(--text);
}
.menu-item .mi-ico { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.menu-item .mi-ico svg { width: 20px; height: 20px; }
.menu-badge { background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.menu-item.active .mi-ico { color: var(--blue); }
.menu-item:hover { background: var(--bg); }
.menu-item.active { background: var(--blue-soft); color: var(--blue); }
.meal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.menu-item.sub { font-weight: 500; color: var(--muted); }
.menu-item.sub:hover { color: var(--blue); }
label.btn { cursor: pointer; }

/* ---------- Main ---------- */
.hero {
  border-radius: var(--radius); overflow: hidden; position: relative;
  min-height: 150px; margin-bottom: 18px; color: #fff;
  background: linear-gradient(90deg, rgba(10,25,60,.82) 0%, rgba(15,35,80,.55) 40%, rgba(20,45,100,.2) 70%, rgba(20,45,100,.05) 100%),
              url("/static/banner.jpg");
  background-size: cover; background-position: center 42%;
  display: flex; flex-direction: column; justify-content: center; padding: 22px 28px;
}
.hero h1 { text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.hero .hero-kicker, .hero p { text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.hero .hero-kicker { font-size: 12px; letter-spacing: 1px; opacity: .85; font-weight: 700; }
.hero h1 { margin: 4px 0 4px; font-size: 27px; font-weight: 800; }
.hero p { margin: 0; opacity: .9; font-size: 13.5px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.section-head .more { font-size: 13px; color: var(--blue); font-weight: 700; cursor: pointer; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* notice preview */
.notice-item {
  background: var(--blue-soft); border: 1px solid #dbe6ff; border-radius: 14px; padding: 16px 18px; cursor: pointer;
}
[data-theme="dark"] .notice-item { border-color: #2b374d; }
.notice-item:hover { outline: 1px solid var(--blue); }
.notice-item .ni-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--blue); font-weight: 700; margin-bottom: 6px; }
.notice-item .ni-top .date { color: var(--muted); font-weight: 500; }
.notice-item .ni-title { font-weight: 700; margin-bottom: 4px; }
.notice-item .ni-body { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* timetable */
.tt-row, .meal-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg); border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; font-size: 14px;
}
.tt-row .p { color: var(--muted); }
.tt-row .s { font-weight: 700; }
.tt-badge { display: inline-block; font-size: 11px; font-weight: 800; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 1px 8px; vertical-align: middle; margin-left: 4px; }
[data-theme="dark"] .tt-badge { color: #93c5fd; background: #1e293b; border-color: #334155; }

/* meal */
.meal-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 14px 16px; }
[data-theme="dark"] .meal-box { background: #2a2512; border-color: #4a3f16; }
.meal-box .mtype { color: var(--accent); font-weight: 800; margin-bottom: 8px; }
.meal-box .menu { white-space: pre-line; line-height: 1.8; font-size: 14px; }
.meal-box .kcal { margin-top: 10px; font-size: 13px; color: var(--muted); }
/* 석식: 보라색 */
.meal-box.dinner { background: #f5f3ff; border-color: #ddd6fe; }
.meal-box.dinner .mtype { color: #7c3aed; }
[data-theme="dark"] .meal-box.dinner { background: #241a3a; border-color: #4c3a7a; }
[data-theme="dark"] .meal-box.dinner .mtype { color: #c4b5fd; }
.day-nav { display: flex; gap: 6px; align-items: center; }
.day-nav button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 4px 9px; font-size: 13px; }

/* ---------- Right widgets ---------- */
.hot-empty { font-size: 13px; color: var(--muted); }
.event-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.event-row:last-child { border-bottom: 0; }
.event-row .dday { font-weight: 800; color: var(--danger); }
.event-row .dday.soon { color: var(--danger); }
.event-row .dday.far { color: var(--blue); }

/* 월별 캘린더 */
.cal-wrap { border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.cal-title { font-size: 20px; font-weight: 900; margin-bottom: 16px; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 10px; }
.cal-dow > div { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-dow .sun, .cal-num.sun { color: #e23b3b; }
.cal-dow .sat, .cal-num.sat { color: #2f6fed; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-cell {
  aspect-ratio: 1 / 1.35; border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px;
  background: var(--card); display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
.cal-cell.empty { border: 0; background: transparent; }
.cal-num { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.cal-today { font-size: 10px; font-weight: 700; color: var(--blue); }
.cal-ev { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.25; word-break: keep-all; }
.cal-ev-mine { color: var(--blue); font-weight: 800; }
.cal-cell.clickable { cursor: pointer; }
.cal-cell.clickable:hover { outline: 2px solid var(--blue); outline-offset: -2px; }
.cal-cell.has-mine { background: #e7f0ff; border-color: var(--blue); }
[data-theme="dark"] .cal-cell.has-mine { background: #1c2b47; border-color: var(--blue); }
.cal-mine-dot { color: var(--blue); font-size: 8px; margin-left: 3px; vertical-align: middle; }
.cal-cell.exam { background: #fef6d8; border-color: #f6d976; }
.cal-cell.holiday { background: #fdeaef; border-color: #f6c0cf; }
.cal-cell.today { background: var(--blue-soft); border: 2px solid var(--blue); }
[data-theme="dark"] .cal-cell.exam { background: #3a3414; border-color: #6b5e1e; }
[data-theme="dark"] .cal-cell.holiday { background: #3a1e26; border-color: #6b2e3c; }

/* 내 일정 D-day 리스트 */
.sched-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px;
}
.sched-item .sched-date { font-size: 12px; color: var(--muted); font-weight: 600; }
.sched-item.mine { background: var(--blue-soft); border-color: #cfe0ff; }
[data-theme="dark"] .sched-item.mine { border-color: #2b3a55; }
.sched-item .sched-name { font-size: 15px; font-weight: 700; margin-top: 2px; }

/* 투표 */
.poll-opt { text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.poll-opt:hover { border-color: var(--blue); background: var(--blue-soft); }
.poll-result { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 11px 14px; }
.poll-result.mine { border-color: var(--blue); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue-soft); z-index: 0; }
.poll-result.mine .poll-bar { background: #d7e5ff; }
[data-theme="dark"] .poll-result.mine .poll-bar { background: #26334d; }
.poll-row-text { position: relative; z-index: 1; display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; }
.sched-dday {
  flex-shrink: 0; background: var(--card); border: 1.5px solid var(--blue); color: var(--blue);
  font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 8px;
}
.sched-toggle {
  width: 100%; border: 0; background: var(--blue-soft); color: var(--blue);
  font-weight: 700; padding: 13px; border-radius: 12px; margin-top: 2px;
}
.sched-toggle:hover { filter: brightness(.97); }
@media (max-width: 860px) {
  .cal-cell { aspect-ratio: 1 / 1; padding: 4px 5px; border-radius: 8px; gap: 1px; }
  .cal-num { font-size: 12px; }
  .cal-ev { font-size: 9px; }
  .cal-days, .cal-dow { gap: 4px; }
}

.links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-tile {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; text-align: center;
  display: flex; flex-direction: column; gap: 6px; align-items: center; background: var(--card);
}
.link-tile:hover { border-color: var(--blue); }
.link-tile .lt-ico { display: flex; align-items: center; justify-content: center; color: var(--blue); height: 26px; }
.link-tile .lt-ico svg { width: 24px; height: 24px; }
.link-tile .lt-name { font-size: 12px; font-weight: 600; }

.full-btn {
  width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px;
  padding: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.full-btn.install { background: var(--blue-soft); color: var(--blue); border-color: transparent; }

/* ---------- Buttons / generic ---------- */
.btn { border: 0; border-radius: 11px; padding: 10px 16px; font-weight: 700; background: var(--blue); color: #fff; font-size: 14px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.outline { background: var(--card); color: var(--blue); border: 1px solid var(--blue); }
.btn.gray { background: var(--bg); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }

.list-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.list-item:hover { border-color: var(--blue); }
.list-item .li-title { font-weight: 700; margin-bottom: 4px; }
.li-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }

.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.pill { white-space: nowrap; border: 1px solid var(--line); background: var(--card); color: var(--muted); padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.search-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.search-bar input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.form-field input, .form-field select, .form-field textarea { padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); width: 100%; color: var(--text); }
textarea { resize: vertical; min-height: 110px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkbox input[type=checkbox] { width: 16px; height: 16px; flex: none; margin: 0; }
.checkbox span { white-space: nowrap; }
.comment { border-top: 1px solid var(--line); padding: 10px 0; }
.comment .c-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.result-box { background: var(--blue-soft); border-radius: 14px; padding: 16px; text-align: center; margin-top: 12px; }
.result-box .big { font-size: 32px; font-weight: 800; color: var(--blue); }
.grade-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grade-table th, .grade-table td { border: 1px solid var(--line); padding: 7px; text-align: center; }
.grade-table th { background: var(--blue-soft); color: var(--blue); }
.grade-table input { width: 100%; border: 0; text-align: center; padding: 4px; background: transparent; color: var(--text); }
.grade-table select { width: 100%; border: 0; padding: 4px; background: transparent; color: var(--text); font: inherit; text-align: center; }
.gpa-badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 6px 4px; text-align: center; cursor: pointer; transition: background .15s; }
.gpa-badge:hover { background: rgba(255,255,255,.22); }
.gpa-badge.off { opacity: .5; }
.gpa-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.gpa-row .gpa-subj { flex: 1; min-width: 120px; border: 0; background: transparent; font-size: 15px; font-weight: 600; color: var(--text); padding: 2px; }
.gpa-row .gpa-subj:focus { outline: none; }
.gpa-row-ctrl { display: flex; align-items: center; gap: 12px; }
.gpa-row-ctrl label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.gpa-row-ctrl select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--bg); color: var(--text); font: inherit; }
.gpa-del { border: 0; background: transparent; font-size: 16px; opacity: .6; cursor: pointer; padding: 4px; }
.gpa-del:hover { opacity: 1; }
#gpa-presets .pill { font-size: 12px; padding: 5px 10px; }
.admin-subtabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; }
.admin-subtab { white-space: nowrap; border: 1px solid var(--line); background: var(--card); padding: 8px 13px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.admin-subtab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.section-title { font-size: 18px; font-weight: 800; margin: 2px 0 14px; }

/* ---------- Drawer (mobile) ---------- */
.drawer-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 40; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 270px; max-width: 80%;
  background: var(--card); z-index: 41; padding: 16px; overflow-y: auto;
  padding-top: calc(16px + env(safe-area-inset-top));
  box-shadow: 4px 0 20px rgba(0,0,0,.15);
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer-search { position: relative; display: flex; align-items: center; margin-bottom: 14px; }
.drawer-search .search-ico { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.drawer-search input {
  width: 100%; padding: 11px 14px 11px 38px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); color: var(--text); font-size: 16px;
}
.drawer-search input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--card); width: 100%; max-width: 460px; border-radius: 18px; padding: 22px 20px; max-height: 90vh; overflow-y: auto; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-close { border: 0; background: var(--bg); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; }

/* (구) auth modal 잔여 - 다른 곳 미사용 */
.auth-tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tab { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; color: var(--muted); font-weight: 700; }
.auth-tab.active { background: var(--card); color: var(--blue); box-shadow: var(--shadow); }
.auth-msg { font-size: 13px; text-align: center; min-height: 18px; margin: 6px 0 0; }
.auth-msg.error { color: var(--danger); }
.auth-msg.ok { color: var(--ok); }
.auth-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }

/* ---------- 로그인/회원가입 페이지 ---------- */
body.auth-mode .layout { display: block; max-width: 1100px; }
body.auth-mode .col-left, body.auth-mode .col-right { display: none !important; }
.auth-back { border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; padding: 6px 2px; margin-bottom: 8px; }
.auth-back:hover { color: var(--blue); }
.auth-page { display: flex; justify-content: center; padding: 10px 0 40px; }
.auth-box { width: 100%; max-width: 620px; padding: 34px 36px; }
.auth-heading { margin: 0 0 14px; font-size: 24px; font-weight: 900; }
.auth-divider { height: 1px; background: var(--line); margin: 0 0 22px; }
.auth-form2 { display: flex; flex-direction: column; gap: 16px; }
.auth-form2 .field { display: flex; flex-direction: column; gap: 8px; }
.auth-form2 .field label { font-size: 13px; font-weight: 700; color: var(--text); }
.auth-form2 input, .auth-form2 select {
  width: 100%; padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); font-size: 15px;
}
.auth-form2 input:focus, .auth-form2 select:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 10px; border: 0; background: transparent; font-size: 17px; padding: 6px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); align-self: flex-start; width: auto; cursor: pointer; }
.remember input { width: 16px; height: 16px; flex: none; margin: 0; }
.remember span { white-space: nowrap; }
.auth-submit { margin-top: 4px; padding: 15px; border: 0; border-radius: 12px; background: var(--blue-dark); color: #fff; font-weight: 800; font-size: 15px; }
.auth-submit:hover { filter: brightness(1.05); }
.auth-switch { border: 0; background: transparent; color: var(--blue); font-weight: 700; font-size: 14px; padding: 6px; }
.verify-note { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.5; background: var(--blue-soft); padding: 10px 12px; border-radius: 10px; }
.verify-note2 { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.verify-drop {
  border: 2px dashed var(--line); border-radius: 16px; min-height: 180px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  padding: 16px; transition: border-color .15s, background .15s; background: var(--bg);
}
.verify-drop:hover { border-color: var(--blue); background: var(--blue-soft); }
.verify-drop.has-img { border-style: solid; cursor: default; padding: 12px; }
.verify-drop.has-img:hover { border-color: var(--line); background: var(--bg); }
.verify-placeholder { text-align: center; color: var(--muted); }
.verify-placeholder .vp-ico { font-size: 34px; }
.verify-placeholder .vp-text { font-weight: 700; margin-top: 8px; color: var(--text); }
.verify-placeholder .vp-sub { font-size: 12px; margin-top: 4px; }
.verify-img { max-width: 100%; max-height: 300px; border-radius: 10px; display: block; margin: 0 auto; }
.verify-cancel {
  margin-top: 10px; align-self: flex-start; width: auto; padding: 6px 12px;
  border: 1px solid var(--danger); background: transparent; color: var(--danger);
  font-weight: 700; font-size: 12.5px; border-radius: 8px;
}
.verify-cancel:hover { background: var(--danger); color: #fff; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.3); display: flex; align-items: center; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0,1fr) 300px; }
  .col-left { display: none; }
}
@media (max-width: 860px) {
  .hamburger { display: block; }
  .topbar-search { display: none; }
  .icon-label { display: none; }
  .layout { grid-template-columns: 1fr; padding: 16px 14px calc(76px + env(safe-area-inset-bottom)); }
  .col-right { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .brand-sub { display: none; }

  /* iOS 입력 자동확대(줌) 방지: 폰트 16px 이상 보장 */
  input, select, textarea,
  .form-field input, .form-field select, .form-field textarea,
  .auth-form2 input, .auth-form2 select, .search-bar input { font-size: 16px; }

  /* 터치 타깃 최소 높이 확보 */
  .btn { padding: 11px 16px; }
  .btn.sm { padding: 9px 13px; }
  .icon-btn { padding: 9px 12px; }
  .pill { padding: 9px 14px; }
  .menu-item { padding: 13px 12px; }

  /* 상단바 노치(상단 safe-area) 대응 */
  .topbar-inner { padding-top: calc(10px + env(safe-area-inset-top)); gap: 8px; }

  /* 상단바 우측이 좁은 화면에서 세로로 깨지지 않게 */
  .topbar-right { gap: 4px; }
  #auth-area { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
  .auth-username { display: none; }        /* 이름/역할 텍스트는 모바일에서 숨김 */
  .link-btn, .btn-primary { white-space: nowrap; padding: 8px 10px; }
  .topbar-right .divider { display: none; }

  /* toast가 하단 탭바에 가리지 않도록 위로 */
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (min-width: 861px) {
  .drawer, .drawer-back { display: none !important; }
}

/* ---------- 모바일 하단 탭바 ---------- */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    background: var(--card); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 16px rgba(20,30,60,.06);
  }
  .bottom-nav button {
    flex: 1; border: 0; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 2px 7px; font-size: 10.5px; font-weight: 600; min-height: 56px;
  }
  .bottom-nav button .bn-ico { width: 23px; height: 23px; display: flex; align-items: center; justify-content: center; }
  .bottom-nav button .bn-ico svg { width: 23px; height: 23px; }
  .bottom-nav button.active { color: var(--blue); }
}
