/* DOHWA PortLab - 흰 배경 기반 깔끔한 스타일 */
:root {
  --bg: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-2: #f0f1f3;
  --soft: #f9fafb;
  --brand: #00936b;
  --brand-ink: #007a59;
  --brand-soft: #e8f5f0;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --radius: 12px;
  --top: 60px;
  --side: 236px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Pretendard", "맑은 고딕", "Malgun Gothic", system-ui, -apple-system, sans-serif;
  font-size: 14.5px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.4px; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.2px; }
h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0; }

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1100; height: var(--top); background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 20px;
}
.tb-left { display: flex; align-items: center; gap: 8px; }
.mark { width: 32px; height: 32px; display: block; border-radius: 8px; }
.mark-link:hover { text-decoration: none; }
.tb-title { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.tb-title:hover { text-decoration: none; }
.brand { font-size: 17px; font-weight: 500; letter-spacing: -0.2px; color: var(--ink); }
.brand b { font-weight: 800; color: var(--brand); letter-spacing: 0.2px; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.menu-btn { display: none; }

/* ---------- 본문 + 위쪽 메뉴 (PortLab 아래 가운데) ---------- */
.shell { min-height: calc(100vh - var(--top) - 48px); }
.ico { width: 18px; height: 18px; flex: none; }
.ico-sm { width: 15px; height: 15px; flex: none; }
.topnav { position: sticky; top: var(--top); z-index: 1090; background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); }
.tn-in { display: flex; justify-content: center; gap: 4px; height: 48px; align-items: stretch; }
.tn-in::-webkit-scrollbar { display: none; }
.tn { display: flex; align-items: center; gap: 4px; padding: 0 16px; color: var(--ink-2); font-weight: 600; font-size: 14.5px;
  white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tn:hover { color: var(--ink); text-decoration: none; }
.tn.on { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tn svg { color: var(--faint); }
/* 설계도구 펼침 메뉴 (토스 홈페이지처럼 화면 폭 전체로 스르륵) */
.tn-drop { position: static; display: flex; }
.mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: #fff;
  box-shadow: 0 18px 30px -18px rgba(17,24,39,.18); border-bottom: 1px solid var(--line);
  clip-path: inset(0 0 100% 0); visibility: hidden; pointer-events: none;
  transition: clip-path .32s cubic-bezier(.22,.8,.3,1), visibility 0s linear .32s; transition-delay: .08s, .4s; }
.tn-drop:hover .mega, .tn-drop:focus-within .mega { clip-path: inset(0 0 -40px 0); visibility: visible; pointer-events: auto;
  transition: clip-path .38s cubic-bezier(.22,.8,.3,1), visibility 0s; transition-delay: .06s, 0s; }
.mega-in { display: flex; justify-content: center; gap: 56px; max-width: 1180px; margin: 0 auto; padding: 30px 40px 40px; }
.mg { display: flex; flex-direction: column; min-width: 140px;
  opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
.tn-drop:hover .mg, .tn-drop:focus-within .mg { opacity: 1; transform: none; transition: opacity .35s ease .12s, transform .35s ease .12s; }
.tn-drop:hover .mg:nth-child(2), .tn-drop:focus-within .mg:nth-child(2) { transition-delay: .17s; }
.tn-drop:hover .mg:nth-child(3), .tn-drop:focus-within .mg:nth-child(3) { transition-delay: .22s; }
.tn-drop:hover .mg:nth-child(4), .tn-drop:focus-within .mg:nth-child(4) { transition-delay: .27s; }
.mg-h { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.mi { padding: 9px 0; color: var(--ink); font-size: 15.5px; font-weight: 600; white-space: nowrap; transition: color .15s; }
a.mi:hover { color: var(--brand); text-decoration: none; }
.mi.on { color: var(--brand-ink); }
.mi.off { color: var(--faint); font-weight: 500; }
.mi.off small { font-size: 10.5px; border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; margin-left: 4px; }

.umenu { position: relative; }
.ubtn { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 6px 4px 4px; border-radius: 99px;
  cursor: pointer; font-family: inherit; color: var(--ink-2); }
.ubtn:hover { background: var(--soft); }
.uname { font-weight: 600; font-size: 13.5px; }
.udrop { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(17,24,39,.12); padding: 8px; z-index: 60; }
.umenu.open .udrop { display: block; }
.uhead { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; line-height: 1.35; }
.uhead small { color: var(--muted); font-size: 12px; }
.udrop a, .udrop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--ink-2);
  font-size: 14px; font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit; }
.udrop a:hover, .udrop button:hover { background: var(--soft); text-decoration: none; }
.udrop form { margin: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }

.main { min-width: 0; padding: 32px 40px 72px; max-width: 1180px; margin: 0 auto; }
.page-head { margin-bottom: 24px; }

@media (max-width: 900px) {
  .tn-in { justify-content: flex-start; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
  .tn { padding: 0 12px; font-size: 14px; }
  .mega { display: none !important; }
  .uname { display: none; }
  .topbar { padding: 0 12px; }
  .brand { font-size: 15.5px; }
  .main { padding: 24px 16px 56px; }
}

.group { margin-bottom: 28px; scroll-margin-top: 120px; }
.group-h { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); margin: 0 0 12px; }
.group-h .ico-sm { color: var(--faint); width: 17px; height: 17px; }
.group-h .cnt { font-size: 12px; color: var(--faint); font-weight: 500; }

/* ---------- 카드 (구조계산서 목록) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; background: #fff;
  display: flex; flex-direction: column; gap: 6px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,147,107,.08); text-decoration: none; }
.card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.card-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-right: 4px; }
.card-ico svg { width: 18px; height: 18px; }
.card-name { font-weight: 700; font-size: 16px; letter-spacing: -0.2px; }
.card-desc { color: var(--muted); font-size: 13.5px; flex: 1; }
.card-go { display: flex; align-items: center; gap: 4px; color: var(--brand-ink); font-weight: 600; font-size: 13px; margin-top: 6px; }
.card.disabled { background: var(--soft); cursor: default; }
.card.disabled .card-ico { background: var(--line-2); color: var(--faint); }
.card.disabled .card-name { color: var(--muted); }
.card.disabled .card-desc { color: var(--faint); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--soft);
  color: var(--muted); border: 1px solid var(--line); font-weight: 600; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }

/* ---------- 패널 / 그리드 ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 860px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- 폼 ---------- */
label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
label small { color: var(--faint); font-weight: 500; margin-left: 4px; }
input[type=text], input[type=password], input[type=number], select, input[type=file] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; height: 40px;
  font-size: 14.5px; background: #fff; color: var(--ink); font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input[type=file] { height: auto; padding: 7px 10px; }
input:hover, select:hover { border-color: #d1d5db; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,147,107,.12); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); font-weight: 400; margin: 4px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff;
  border: 1px solid var(--brand); padding: 0 18px; height: 40px; border-radius: 8px; font-size: 14.5px; cursor: pointer;
  font-weight: 600; font-family: inherit; transition: background .15s; }
.btn:hover { background: var(--brand-ink); text-decoration: none; }
.btn:disabled { background: #d1d5db; border-color: #d1d5db; cursor: default; }
.btn.light { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.light:hover { background: var(--soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.ok { background: var(--brand); }
.btn.bad { background: #fff; color: var(--bad); border-color: #fecaca; }
.btn.bad:hover { background: var(--bad-soft); }
.btn.block { width: 100%; }

/* ---------- 알림 ---------- */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: #a7f3d0; }
.alert.err { background: var(--bad-soft); color: var(--bad); border-color: #fecaca; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.alert.info { background: var(--soft); color: var(--ink-2); border-color: var(--line); }

/* ---------- 로그인 화면 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: #fff; }
.auth { width: 100%; max-width: 360px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.mark-lg { width: 56px; height: 56px; border-radius: 14px; display: block; margin: 0 auto 14px; }
.auth-brand .brand { font-size: 23px; }
.auth-form .field { margin-bottom: 14px; }
.auth-form .btn { margin-top: 6px; height: 44px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-h { text-align: center; margin-bottom: 6px; }
.auth-p { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 18px; }

/* ---------- 표 ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.tbl th, table.tbl td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: center; }
table.tbl th { background: var(--soft); font-weight: 600; color: var(--ink-2); border-top: 1px solid var(--line); font-size: 12.5px; }
table.tbl td.l { text-align: left; }
table.tbl tr.avg td { background: var(--brand-soft); font-weight: 700; color: var(--brand-ink); }
table.tbl input.cell { width: 64px; height: 30px; padding: 2px 6px; text-align: center; font-size: 13.5px; border: 1px solid transparent;
  border-radius: 6px; background: transparent; }
table.tbl input.cell:hover { border-color: var(--line); }
table.tbl input.cell:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(0,147,107,.12); }
table.tbl input.cell.edited { background: var(--warn-soft); }
table.tbl input.cell.manual { background: var(--soft); }

.badge { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; font-weight: 600; }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.active { background: var(--ok-soft); color: var(--ok); }
.badge.disabled { background: var(--soft); color: var(--muted); }
.badge.admin { background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- 결과 숫자 ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr; } }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.kpi .t { font-weight: 700; margin-bottom: 10px; color: var(--ink-2); }
.kpi .nums { display: flex; gap: 28px; flex-wrap: wrap; }
.kpi .n { font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.6px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .nums > div:first-child .n { color: var(--brand); }
.kpi .n small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.kpi .l { font-size: 12.5px; color: var(--muted); }
.kpi .formula { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }

/* ---------- 기타 ---------- */
.progress { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .3s; }
.hint { font-size: 12.5px; color: var(--muted); }
details summary { cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
details summary:hover { color: var(--brand-ink); }
.hidden { display: none !important; }
.mono { font-family: Consolas, "D2Coding", monospace; }

/* ---------- 홈 (1페이지 인트로 + 2페이지 대시보드) ---------- */
.main:has(.home) { padding: 0; max-width: none; }
.hp1 { position: fixed; inset: var(--top) 0 0 0; z-index: 1095; background: var(--bg); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .65s ease; }
.hp1.out { opacity: 0; pointer-events: none; }
.intro { position: relative; height: 140px; width: 100%; display: grid; place-items: center; }
.intro-mark { position: absolute; width: 104px; height: 104px; border-radius: 26px;
  animation: plMarkIn .6s cubic-bezier(.2,.7,.2,1) both, plMarkOut .6s cubic-bezier(.65,0,.35,1) 1.05s forwards; }
.intro-word { font-size: 60px; font-weight: 500; letter-spacing: -1.2px; color: var(--ink); opacity: 0;
  animation: plWordIn .8s cubic-bezier(.2,.7,.2,1) 1.35s forwards; }
.intro-word b { font-weight: 800; color: var(--brand); letter-spacing: -.5px; }
.intro-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; letter-spacing: .3px; opacity: 0;
  animation: plFade .7s ease 2.0s forwards; }
@keyframes plMarkIn { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes plMarkOut { to { opacity: 0; transform: translateX(-180px) scale(.92); } }
@keyframes plWordIn { from { opacity: 0; transform: translateX(70px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes plFade { to { opacity: 1; } }
.hp1.static .intro-mark { display: none; }
.hp1.static .intro-word, .hp1.static .intro-sub { animation: none; opacity: 1; }

.hp2 { padding: 40px 40px 64px; max-width: 1180px; margin: 0 auto; }
.hello { font-size: 26px; font-weight: 700; letter-spacing: -.6px; margin: 0 0 4px; }
.today { color: var(--muted); margin: 0; }
.hrow { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.sec-s { font-weight: 500; color: var(--faint); margin-left: 6px; font-size: 12px; }
/* 날씨 (시간별 · 누르면 주간) */
.wx { width: 300px; max-width: 100%; border-radius: 14px; padding: 8px 0 4px; color: var(--ink); overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.wx-top { padding: 4px 14px 6px; }
.wx-msg { font-size: 12px; color: var(--muted); margin-left: 6px; }
.wx-strip { overflow-x: auto; scrollbar-width: none; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-x; padding: 0 4px; }
.wx-strip.drag { cursor: grabbing; }
.wx-strip::-webkit-scrollbar { display: none; }
.wx-strip svg { pointer-events: none; }
.wx-cols { display: flex; }
.wx-col { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: none; padding: 3px 0 4px; border-radius: 10px; }
.wx-col.now { background: var(--brand-soft); }
.wx-col.now .wx-h { color: var(--brand-ink); }
.wx-h { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.wx-tp { font-size: 13px; font-weight: 700; color: var(--ink); }
.wx-pop { font-size: 10px; color: var(--faint); }
.wx-pop.hi { color: #2563eb; font-weight: 600; }
.wx-foot { display: flex; justify-content: space-between; align-items: center; padding: 3px 6px 0 14px; margin-top: 2px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); }
.wx-foot b { font-weight: 700; margin-left: 4px; color: var(--ink-2); }
.wx-foot button { display: flex; align-items: center; gap: 1px; background: none; border: 0; color: var(--brand-ink); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 7px; }
.wx-foot button:hover { background: var(--soft); }
.wk-dlg { max-width: 460px; }
.wk-body { max-height: 70vh; overflow-y: auto; padding: 4px 16px 12px; }
.wk-row { display: grid; grid-template-columns: 74px 60px 60px 1fr; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.wk-d { display: flex; flex-direction: column; line-height: 1.2; }
.wk-d b { font-size: 14px; } .wk-d small { color: var(--faint); font-size: 11.5px; }
.wk-row.sun .wk-d b { color: #e11d48; } .wk-row.sat .wk-d b { color: #2563eb; }
.wk-ic { display: flex; align-items: center; gap: 2px; }
.wk-ic small { font-size: 11.5px; color: var(--faint); font-weight: 600; } .wk-ic small.hi { color: #2563eb; }
.wk-t { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 6px; font-size: 14px; }
.wk-t i { font-style: normal; color: #3b82f6; text-align: right; font-weight: 600; } .wk-t b { color: #ef4444; }
.wk-bar { position: relative; height: 5px; background: var(--soft); border-radius: 9px; }
.wk-bar em { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, #60a5fa, #f87171); }
.wk-note { margin: 10px 0 0; font-size: 11.5px; color: var(--faint); }
/* 오늘의 메뉴 */
.menu-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.mn-empty { padding: 28px 16px; text-align: center; color: var(--faint); font-size: 13.5px; }
.mn-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
.mn-tabs button { background: none; border: 0; padding: 9px 0 7px; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 14px;
  color: var(--muted); border-bottom: 2px solid transparent; display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.mn-tabs button small { font-weight: 500; font-size: 11px; color: var(--faint); }
.mn-tabs button.on { color: var(--brand-ink); border-bottom-color: var(--brand); }
.mn-jump { display: flex; gap: 6px; padding: 10px 12px; align-items: center; flex-wrap: wrap; }
.mn-jump button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; font-family: inherit; }
.mn-jump button.on { background: var(--brand-soft); border-color: #b7e3d3; color: var(--brand-ink); }
.mn-all { margin-left: auto; font-size: 12.5px; }
.mn-note { margin: 0 12px 8px; font-size: 12px; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 5px 10px; }
.mn-img { max-height: 520px; overflow-y: auto; border-top: 1px solid var(--line-2); }
.mn-img img { width: 100%; max-width: 440px; display: block; margin: 0 auto; }
.dash { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } .hp2 { padding: 32px 16px 48px; } .intro-word { font-size: 40px; } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--d, 0s), transform .6s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.sec-h { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 10px; }
.list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.list > a, .list > .li, .list > details > summary { display: flex; align-items: center; gap: 12px; padding: 13px 16px; color: var(--ink); }
.list > * + * { border-top: 1px solid var(--line); }
.list > a:hover, .list > details > summary:hover { background: var(--soft); text-decoration: none; }
.list .t { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .t .d { font-weight: 500; color: var(--muted); }
.list .s { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.list .empty { color: var(--faint); font-size: 13.5px; justify-content: center; padding: 22px 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.nt summary { cursor: pointer; list-style: none; }
.nt summary::-webkit-details-marker { display: none; }
.nt .nb { padding: 0 16px 14px 16px; color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; }
.ntag { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; font-weight: 600; flex: none; background: var(--soft); color: var(--muted); }
.ntag.k-공지 { background: #eef2ff; color: #4338ca; }
.ntag.k-업데이트 { background: var(--brand-soft); color: var(--brand-ink); }
.ntag.k-예정 { background: var(--warn-soft); color: var(--warn); }
textarea.ta { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; resize: vertical; }
textarea.ta:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,147,107,.12); }

/* 비밀번호 보기 버튼 */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0;
  color: var(--faint); cursor: pointer; padding: 5px; border-radius: 6px; display: grid; place-items: center; }
.pw-eye:hover { color: var(--brand-ink); background: var(--soft); }

/* ---------- 테스트 서버 표시 (내 PC 시험용) ---------- */
.tb-right { display: flex; justify-content: flex-end; align-items: center; }
.test-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; font-size: 12.5px; font-weight: 700; letter-spacing: .2px;
}
.test-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f97316; }
body.is-test .topbar { border-bottom: 3px solid #f97316; }
body.is-test .auth-wrap { border-top: 4px solid #f97316; }

/* ---------- 버전 표시 ---------- */
.app-ver { font-size: 11.5px; color: var(--muted, #8a94a6); letter-spacing: .2px; padding: 8px 10px 2px; }
.ver-corner { position: fixed; right: 18px; bottom: 12px; font-size: 12px; color: var(--muted, #8a94a6);
  background: rgba(255,255,255,.85); padding: 3px 8px; border-radius: 6px; pointer-events: none; z-index: 5; }
@media (max-width: 900px) { .ver-corner { right: 10px; bottom: 8px; font-size: 11px; } }

.login-opts { display: flex; gap: 16px; flex-wrap: wrap; margin: 2px 0 14px; font-size: 13px; color: var(--ink-2); }
.login-opts label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; }
.login-opts input { width: auto; margin: 0; }

/* 좁은 화면: 테스트 서버 표시는 점만 */
.test-pill { white-space: nowrap; }
@media (max-width: 900px) { .test-pill { font-size: 0; padding: 6px; gap: 0; } }

/* 오늘의 메뉴: 관리자 끌어다 놓기 */
.mn-up { float: right; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; font-family: inherit; }
.mn-up:hover { border-color: var(--brand); color: var(--brand-ink); }
.menu-card { position: relative; transition: border-color .2s, box-shadow .2s; }
.menu-card.can-drop.over { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.menu-card.can-drop.over::after { content: "놓으면 이번 주 메뉴로 바뀌어요"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(232,245,240,.92); color: var(--brand-ink); font-weight: 700; font-size: 15px; z-index: 3; }
.menu-card.busy::after { content: "메뉴표 읽는 중…"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.88); color: var(--ink-2); font-weight: 600; z-index: 3; }
.mn-dropzone { cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; border: 2px dashed #cfe9df; margin: 12px;
  border-radius: 12px; padding: 34px 16px; transition: background .2s, border-color .2s; }
.mn-dropzone:hover { background: var(--brand-soft); border-color: var(--brand); }
.mn-dropzone b { color: var(--ink-2); font-size: 14.5px; }
.mn-dropzone span { font-size: 12.5px; }
.mn-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: #111827; color: #fff;
  padding: 10px 18px; border-radius: 99px; font-size: 14px; z-index: 1300; transition: opacity .3s, transform .3s; }
.mn-toast.in { opacity: 1; transform: translate(-50%, 0); }

/* 오늘의 메뉴 (글자로 정리) */
.mn-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; }
.mn-seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 2px; }
.mn-seg button { border: 0; background: none; padding: 4px 14px; border-radius: 99px; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.mn-seg button.on { background: #fff; color: var(--brand-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.mn-mains { display: grid; gap: 10px; padding: 8px 12px 4px; }
.mn-mains.c2 { grid-template-columns: 1fr 1fr; }
.mn-main { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: linear-gradient(170deg, #fbfefd, #f6faf8); }
.mn-cat { font-size: 12px; font-weight: 700; color: var(--brand-ink); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mn-theme { font-size: 11px; font-weight: 600; color: #2563eb; background: #eff6ff; border-radius: 99px; padding: 1px 8px; }
.mn-dish { font-size: 16.5px; font-weight: 700; letter-spacing: -.3px; margin: 3px 0 4px; line-height: 1.35; }
.mn-side { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.mn-subs { padding: 6px 12px 12px; display: flex; flex-direction: column; }
.mn-sub { display: flex; gap: 10px; font-size: 12.5px; padding: 6px 2px; border-top: 1px dashed var(--line-2); }
.mn-sub:first-child { border-top: 0; }
.mn-sub b { flex: none; min-width: 104px; color: var(--ink-2); font-weight: 600; }
.mn-sub span { color: var(--muted); }
@media (max-width: 600px) { .mn-mains.c2 { grid-template-columns: 1fr; } }
/* 메뉴표 확인 화면 */
.mn-modal { display: none; position: fixed; inset: 0; z-index: 1250; background: rgba(17,24,39,.35); align-items: center; justify-content: center; padding: 16px; }
.mn-modal.open { display: flex; }
.mn-dlg { background: #fff; border-radius: 16px; width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,.2); overflow: hidden; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.rv-head b { display: block; font-size: 16px; }
.rv-head span { font-size: 12.5px; color: var(--muted); }
.rv-body { overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.rv-meal { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: start; }
.rv-meal input { height: 34px; font-size: 13px; font-weight: 600; }
.rv-meal textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-family: inherit; font-size: 13px; line-height: 1.5; resize: vertical; }
.rv-meal textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,147,107,.12); }
.rv-del { border: 0; background: none; color: var(--faint); cursor: pointer; font-family: inherit; font-size: 12px; padding: 8px 4px; }
.rv-del:hover { color: var(--bad); }
.rv-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.rv-foot .hint { margin-right: auto; }
@media (max-width: 600px) { .rv-meal { grid-template-columns: 1fr; } }

/* 홈 검색 */
.hs { position: relative; margin: -12px 0 26px; }
.hs input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 44px 0 46px; font: inherit; font-size: 15px; background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: border-color .15s, box-shadow .15s; }
.hs input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0,147,107,.12); }
.hs-ic { position: absolute; left: 16px; top: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.hs-k { position: absolute; right: 14px; top: 13px; font: 600 12px/20px inherit; color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; background: var(--soft); }
.hs input:focus ~ .hs-k { display: none; }
.hs-pop { display: none; position: absolute; left: 0; right: 0; top: 54px; z-index: 1080; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,23,42,.14); max-height: min(520px, 70vh); overflow-y: auto; padding: 6px; }
.hs-pop.open { display: block; }
.hs-g p { margin: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.hs-g p small { font-weight: 500; color: var(--faint); }
.hs-it { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; padding: 8px 10px; cursor: pointer; font-family: inherit; }
.hs-it b { font-size: 14px; font-weight: 600; color: var(--ink); }
.hs-it span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-it.on, .hs-it:hover { background: var(--soft); }
.hs-it mark { background: rgba(0,147,107,.16); color: inherit; border-radius: 3px; padding: 0 1px; }
.hs-none { padding: 18px 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
.hs-doc { white-space: pre-wrap; font-size: 13.5px; line-height: 1.7; display: block; }
