/* ══ 명찰메이커 · 앱 셸 UI — 뉴모피즘(Organic Shape) 테마 ══ */

:root {
  --bg: #e8ebf2;
  --panel: #f1f3f9;
  --ink: #22304e;
  --ink-2: #4b5a73;
  --ink-3: #8b93a8;
  --line: #dde2ec;
  --brand: #1d4ed8;
  --brand-soft: #e2e9fb;
  --ok: #0f9d58;
  --warn: #b45309;
  --danger: #dc2626;
  --side: #e8ebf2;
  --side-ink: #4a5568;
  --radius: 16px;
  /* 뉴모피즘 이중 그림자 — 좌상단 하이라이트 + 우하단 그늘 */
  --shadow: -6px -6px 14px rgba(255, 255, 255, .85), 7px 7px 16px rgba(163, 177, 198, .45);
  --shadow-sm: -3px -3px 8px rgba(255, 255, 255, .8), 4px 4px 9px rgba(163, 177, 198, .4);
  --shadow-in: inset 3px 3px 7px rgba(163, 177, 198, .38), inset -3px -3px 7px rgba(255, 255, 255, .9);
  --font: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: var(--font);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

/* ───────── 셸 ───────── */
/* 히어로 줄은 내용만큼, 작업 영역은 남는 만큼 (minmax(0,1fr) 이라야
   화면이 좁을 때 히어로가 찌그러지지 않는다) */
.app { display: grid; grid-template-rows: 56px auto minmax(0, 1fr) auto; height: 100%; }

/* ───────── 하단 푸터 ───────── */
.appfoot {
  border-top: 1px solid var(--line); background: var(--panel);
  padding: 9px 16px; text-align: center;
  font-size: 12px; color: var(--ink-2); line-height: 1.7;
}
.appfoot .line { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.appfoot .ver {
  font-weight: 800; color: var(--brand); background: var(--brand-soft);
  padding: 1px 7px; border-radius: 999px; font-size: 10.5px;
}
.appfoot a { color: var(--brand); text-decoration: none; font-weight: 700; }
.appfoot a:hover { text-decoration: underline; }
.appfoot .sep { color: var(--ink-3); }

@media print { .appfoot { display: none !important; } }

/* ───────── 히어로 (핵심 기능 4장 슬라이드) ───────── */
.hero {
  position: relative; overflow: hidden;
  padding: 18px 32px 20px;
  color: #eef2f8; background: #0e1420;
  border-bottom: 1px solid #1d2637;
}
/* 별가루 — 아주 옅은 점을 흩뿌린다 */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 26%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 27% 68%, rgba(255,255,255,.38), transparent),
    radial-gradient(1.6px 1.6px at 44% 18%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.2px 1.2px at 58% 78%, rgba(255,255,255,.30), transparent),
    radial-gradient(1.5px 1.5px at 73% 34%, rgba(255,255,255,.42), transparent),
    radial-gradient(1.2px 1.2px at 90% 62%, rgba(255,255,255,.32), transparent);
}

/* 넉 장을 같은 칸에 겹쳐 두고 흐릿하게 바꿔 낀다 */
.hero-stage { position: relative; z-index: 1; display: grid; }
.hero-slide {
  grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) 164px;
  align-items: center; gap: 18px;
  max-width: 940px; margin: 0 auto; width: 100%;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}
.hero-slide.on { opacity: 1; transform: none; pointer-events: auto; }

/* 장마다 다른 빛깔의 배경 — 켜진 장의 것만 보인다 */
.hero-slide::before {
  content: ''; position: absolute; inset: -18px -32px -20px; z-index: -1;
  opacity: 0; transition: opacity .5s ease;
}
.hero-slide.on::before { opacity: 1; }
.hero-slide[data-tone="a"]::before {
  background:
    radial-gradient(620px 260px at 8% 120%, rgba(16, 185, 129, .40), transparent 62%),
    radial-gradient(560px 300px at 88% 10%, rgba(249, 115, 22, .34), transparent 60%);
}
.hero-slide[data-tone="b"]::before {
  background:
    radial-gradient(600px 280px at 10% 110%, rgba(217, 70, 239, .34), transparent 62%),
    radial-gradient(560px 300px at 86% 6%, rgba(99, 102, 241, .40), transparent 62%);
}
.hero-slide[data-tone="c"]::before {
  background:
    radial-gradient(600px 280px at 6% 110%, rgba(14, 165, 233, .38), transparent 62%),
    radial-gradient(560px 300px at 90% 8%, rgba(45, 212, 191, .30), transparent 60%);
}
.hero-slide[data-tone="d"]::before {
  background:
    radial-gradient(600px 280px at 10% 120%, rgba(251, 191, 36, .32), transparent 62%),
    radial-gradient(560px 300px at 88% 6%, rgba(244, 63, 94, .30), transparent 60%);
}

.hero-inner { min-width: 0; }
.hero-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #34d399; }
.hero-slide[data-tone="b"] .hero-eyebrow { color: #f0abfc; }
.hero-slide[data-tone="c"] .hero-eyebrow { color: #7dd3fc; }
.hero-slide[data-tone="d"] .hero-eyebrow { color: #fcd34d; }

.hero-title {
  margin: 0 0 6px; font-size: 27px; font-weight: 900; letter-spacing: -.03em;
  display: flex; align-items: center; gap: 10px; color: #fff;
}
.hero-title .hero-ico { font-size: 24px; filter: drop-shadow(0 3px 10px rgba(0,0,0,.45)); }
.hero-sub { margin: 0 0 10px; font-size: 13px; color: #aebaca; max-width: 620px; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #dbe3ef;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
}

.hero-cta {
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; font-weight: 800; color: #0e1420;
  background: #eaf1fb; border: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.hero-cta:hover { background: #fff; transform: translateY(-1px); }

/* 오른쪽 그림 */
.hero-art { width: 164px; height: 164px; justify-self: end; }

/* 공전 — 바깥 궤도일수록 천천히 돈다 */
.hero-orbit, .hero-art.orbit { pointer-events: none; }
.hero-art .orb {
  transform-box: view-box; transform-origin: 130px 130px;
  animation: orbSpin linear infinite; will-change: transform;
}
.hero-art .orb.p1 { animation-duration: 14s; }
.hero-art .orb.p2 { animation-duration: 22s; animation-delay: -6s; }
.hero-art .orb.p3 { animation-duration: 33s; animation-delay: -14s; }
.hero-art .orb.p4 { animation-duration: 48s; animation-delay: -30s; }
.hero-art .orb.p5 { animation-duration: 68s; animation-delay: -12s; }
.hero-art .orb-sun {
  transform-box: view-box; transform-origin: 130px 130px;
  animation: orbPulse 4.5s ease-in-out infinite;
}
/* QR 훑는 선 · 도넛 채우기 */
.hero-art .qr-scan { animation: qrScan 2.8s ease-in-out infinite; }
.hero-art .dn { animation: dnDraw 1.1s ease-out both; }
.hero-art .dn.d2 { animation-delay: .12s; }
.hero-art .dn.d3 { animation-delay: .24s; }

@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: .92; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes qrScan {
  0%, 100% { transform: translateY(0); opacity: .25; }
  50% { transform: translateY(116px); opacity: .95; }
}
@keyframes dnDraw { from { stroke-dashoffset: 60; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }

/* 장 표시 점 */
.hero-dots {
  position: relative; z-index: 2; display: flex; gap: 7px;
  max-width: 940px; margin: 9px auto 0;
}
.hero-dot {
  padding: 6px 0 0; background: none; border: 0; cursor: pointer; line-height: 0;
}
.hero-dot span {
  display: block; width: 22px; height: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .22); transition: background .25s, width .25s;
}
.hero-dot:hover span { background: rgba(255, 255, 255, .45); }
.hero-dot.on span { width: 40px; background: #eaf1fb; }

/* 접기 단추 */
.hero-fold {
  position: absolute; right: 12px; top: 10px; z-index: 3;
  padding: 3px 9px; border-radius: 999px; cursor: pointer;
  font-size: 11px; font-weight: 700; color: #cbd5e1;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
}
.hero-fold:hover { background: rgba(255, 255, 255, .16); color: #fff; }

/* 접힌 상태 — 켜진 장의 제목 한 줄만 남긴다 */
.hero.folded { padding: 10px 32px; }
.hero.folded .hero-eyebrow, .hero.folded .hero-sub, .hero.folded .hero-chips,
.hero.folded .hero-cta, .hero.folded .hero-art, .hero.folded .hero-dots { display: none; }
.hero.folded .hero-slide { grid-template-columns: 1fr; }
.hero.folded .hero-title { font-size: 17px; margin: 0; }
.hero.folded .hero-title .hero-ico { font-size: 16px; }

/* 움직임을 줄여 달라는 설정이면 멈춘다 */
@media (prefers-reduced-motion: reduce) {
  .hero-art .orb, .hero-art .orb-sun, .hero-art .qr-scan, .hero-art .dn { animation: none; }
  .hero-slide { transition: none; }
}

@media print { .hero { display: none !important; } }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.02em; }
.brand .dot {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
}
.brand small { color: var(--ink-3); font-weight: 600; margin-left: 4px; }

/* 제목 아래 버전 표기 */
.brand-wrap { display: flex; flex-direction: column; justify-content: center; }
.ver-top { font-size: 10px; font-weight: 800; color: var(--danger); line-height: 1; margin: 2px 0 0 32px; letter-spacing: .02em; }

.topbar .spacer { flex: 1; }
.topbar .event-filter { display: flex; align-items: center; gap: 6px; }
.topbar .event-filter label { color: var(--ink-3); font-size: 12px; font-weight: 700; white-space: nowrap; flex: none; }

.badge-pill {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.badge-pill.warn { background: #fff4e5; color: var(--warn); }
.badge-pill.muted { background: #eef1f6; color: var(--ink-3); }

/* 잠긴 좌측 메뉴 — 클릭은 받되(안내 팝업) 흐리게 보인다 */
#nav button.locked { opacity: .45; cursor: not-allowed; }

/* 추천 프린터 카드 — 옅은 파랑 배경으로 눈에 띄게 */
.card.rec-printer {
  background: linear-gradient(180deg, #eef4ff 0%, #f6f9ff 100%);
  border: 1px solid #c9d9f5;
}
.card.rec-printer h3 { color: #1e3a8a; }
.card.rec-printer .hint { color: #4a5d80; }

/* 상단 우측 구글 로그인 자리 */
.login-slot { display: flex; align-items: center; }
.login-slot > div { line-height: 0; }
.login-slot iframe { color-scheme: light; }

.who { display: flex; align-items: center; gap: 8px; }
.who img { width: 28px; height: 28px; border-radius: 50%; }
.who .nm { font-weight: 700; font-size: 13px; }

/* ───────── 본문 ───────── */
/* 미리보기 너비는 --pv-w 로 조절한다(리사이저가 바꾼다) */
.body {
  display: grid;
  grid-template-columns: 208px minmax(360px, 1fr) clamp(260px, var(--pv-w, 400px), 900px);
  min-height: 0;
}
/* 미리보기가 필요 없는 화면(구독 안내)은 두 기둥만 쓴다 */
.body.no-preview { grid-template-columns: 208px minmax(360px, 1fr); }

.side { background: var(--side); padding: 12px 10px; overflow: auto; }
.side h6 {
  margin: 14px 8px 6px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: #5b657d;
}
.side button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; margin-bottom: 2px; border: 0; border-radius: 8px;
  background: transparent; color: var(--side-ink); cursor: pointer; font-weight: 600;
}
.side button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side button.on { background: var(--brand); color: #fff; }
.side button .ico { width: 18px; text-align: center; }
.side button .cnt { margin-left: auto; font-size: 11px; opacity: .8; }

.main { overflow: auto; padding: 18px; min-width: 0; }
.preview-col {
  position: relative;
  border-left: 1px solid var(--line); background: #eef1f6;
  overflow: auto; padding: 18px 18px 18px 22px; min-width: 0;
}

/* 미리보기 왼쪽 경계 손잡이 */
.pv-grip {
  position: sticky; top: 0; float: left; margin-left: -22px;
  width: 14px; height: calc(100vh - 140px); cursor: col-resize; z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.pv-grip::before {
  content: ''; width: 3px; height: 44px; border-radius: 999px;
  background: #c3cbd9; transition: background .15s, height .15s;
}
.pv-grip:hover::before, .pv-resizing .pv-grip::before { background: var(--brand); height: 64px; }
.pv-resizing { cursor: col-resize; user-select: none; }
.pv-resizing .preview-col, .pv-resizing .main { pointer-events: none; }
.pv-resizing .pv-grip { pointer-events: auto; }

/* ───────── 카드 · 폼 ───────── */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
}
.card > h3 {
  margin: 0 0 4px; font-size: 15px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}
.card > .hint { margin: 0 0 12px; color: var(--ink-3); font-size: 12px; }

.grid { display: grid; gap: 10px; }
.grid.c2 { grid-template-columns: 1fr 1fr; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

label.f { display: block; }
label.f > span {
  display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px;
}

input[type=text], input[type=number], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 84px; font-family: ui-monospace, 'D2Coding', Consolas, monospace; font-size: 12.5px; }
input[type=color] { width: 100%; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input[type=range] { width: 100%; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

.check { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ───────── 버튼 ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f7f9fc; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.danger { color: var(--danger); border-color: #f3c9c9; background: #fff; }
.btn.sm { padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── 구독 안내 — 짙은 남색 카드 ── */
.sub-page { max-width: 880px; margin: 0 auto; }
/* 대상 안내 — 요금 카드 위 설득 문단 */
.sub-fit {
  margin-bottom: 18px; border-radius: 14px; padding: 18px 22px;
  background: #10172a; color: #dbe3f0; border: 1px solid #232f47;
}
.sub-fit h4 { margin: 0 0 12px; font-size: 15px; color: #fff; }
.sub-fit ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sub-fit li { font-size: 13px; line-height: 1.75; color: #aeb8d4; }
.sub-fit li b { color: #fff; display: block; margin-bottom: 1px; }

.sub-tag {
  display: inline-block; margin-bottom: 12px; padding: 5px 14px; border-radius: 8px;
  background: #6d4df6; color: #fff; font-size: 13px; font-weight: 800;
}
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.sub-card {
  position: relative; border-radius: 16px; padding: 24px 24px 22px;
  background: #131a2b; color: #dbe3f0; border: 1px solid #232f47;
}
.sub-card.year { background: linear-gradient(150deg, #241a5e 0%, #1b1550 60%, #171040 100%); border-color: #3b2f8f; }
.sub-off {
  position: absolute; top: -12px; left: 22px; padding: 4px 12px; border-radius: 999px;
  background: #f5a623; color: #241a05; font-size: 12px; font-weight: 800;
}
.sub-kind { font-size: 13px; color: #9aa7c4; font-weight: 700; margin-bottom: 8px; }
.sub-price { font-size: 38px; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.sub-price small { font-size: 14px; font-weight: 700; color: #9aa7c4; }
.sub-term { color: #8ea0ff; font-weight: 800; font-size: 13px; margin: 2px 0 4px; }
.sub-note { font-size: 11.5px; color: #8b93b0; margin-bottom: 4px; }
.sub-feats { list-style: none; margin: 12px 0 16px; padding: 0; display: grid; gap: 7px; }
.sub-feats li { font-size: 13px; }
.sub-cta {
  text-align: center; padding: 12px; border-radius: 10px; font-weight: 800; font-size: 14px;
  background: #5b47f5; color: #fff;
}
.sub-cta.gold { background: linear-gradient(90deg, #ffb020, #ff8a00); color: #241a05; }

.sub-pay {
  margin-top: 18px; border-radius: 14px; padding: 18px 22px;
  background: #10172a; color: #dbe3f0; border: 1px solid #232f47;
}
.sub-pay h4 { margin: 0 0 12px; font-size: 14px; color: #fff; }
.sub-pay-grid { display: flex; flex-wrap: wrap; gap: 10px 34px; }
.sub-pay-grid span { display: block; font-size: 11.5px; color: #8b93b0; margin-bottom: 2px; }
.sub-pay-grid b { font-size: 15px; color: #fff; }
.sub-pay-note { margin: 14px 0 0; font-size: 12.5px; color: #aeb8d4; line-height: 1.7; }
.sub-pay-note b { color: #ffd166; }

/* ── 파일 선택 — 기본 회색 단추 대신 앱 버튼과 같은 결로 그린다 ── */
input[type="file"] {
  font-size: 12.5px; color: var(--ink-3);
  max-width: 100%;
}
input[type="file"]::file-selector-button {
  margin-right: 8px; padding: 3px 10px;
  border: 1px solid var(--brand); border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  transition: background .15s, color .15s;
}
input[type="file"]::file-selector-button:hover { background: var(--brand); color: #fff; }
input[type="file"]:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; border-radius: 8px; }

/* ───────── 프리셋 칩 ───────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer; color: var(--ink-2);
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 사용자 지정 크기 칩 — 적용 버튼과 삭제(×)가 한 칩 안에 붙는다 */
.chip.custom { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 0; overflow: hidden; }
.chip.custom > button {
  border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700;
  padding: 6px 4px 6px 10px; cursor: pointer; display: inline-flex; align-items: baseline; gap: 5px;
}
.chip.custom small { font-size: 10.5px; opacity: .65; font-weight: 600; }
.chip.custom .x { padding: 4px 6px; border-radius: 6px; color: var(--ink-3); font-size: 13px; }
.chip.custom .x:hover { background: #fdeaea; color: var(--danger); }
.chip.custom.on .x { color: rgba(255, 255, 255, .8); }
.chip.custom.on .x:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* ───────── 로고 위치 3×3 격자 ───────── */
.pos-grid {
  display: grid; grid-template-columns: repeat(3, 30px); grid-template-rows: repeat(3, 24px);
  gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.pos-grid .pos {
  border: 1px dashed var(--line); border-radius: 5px; background: #f7f9fc; cursor: pointer; padding: 0;
}
.pos-grid .pos:hover { border-color: var(--brand); }
.pos-grid .pos.on { background: var(--brand); border: 1px solid var(--brand); }

/* ───────── 참가자 대시보드 ───────── */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.dash-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff;
  display: flex; flex-direction: column; align-items: center;
}
.dash-item h4 {
  margin: 0 0 8px; font-size: 12.5px; color: var(--ink-2); letter-spacing: -.01em; align-self: flex-start;
}
.dash-chart { display: grid; place-items: center; margin-bottom: 10px; }
.dash-chart svg g:hover path, .dash-chart svg g:hover circle { filter: brightness(1.12); }

.legend { list-style: none; margin: 0; padding: 0; width: 100%; }
.legend li {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  padding: 3px 0; border-bottom: 1px solid #f4f6fa;
}
.legend li:last-child { border-bottom: 0; }
.legend .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend .lb {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-2); font-weight: 600;
}
.legend .vl { color: var(--ink); font-weight: 700; }
.legend .pc { color: var(--ink-3); width: 38px; text-align: right; }
.legend-empty { color: var(--ink-3); font-size: 12px; text-align: center; padding: 8px 0; }

/* ───────── 사용 현황 팝업 ───────── */
.usage-head {
  background: linear-gradient(100deg, #1d4ed8 0%, #6d5cf0 55%, #22b8cf 100%);
  border-bottom: 0;
}
.usage-head h2 { color: #fff; }
.usage-head .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; }
.usage-head .btn:hover { background: rgba(255, 255, 255, .28); }

.usage-id { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.usage-id .tag {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: #eef1f6; color: var(--ink-2);
}
.usage-id .mail { background: #eaf0ff; color: #1d4ed8; }
.usage-id .org { background: #ecfdf5; color: #047857; }
.usage-id .phone { background: #fff7ed; color: #b45309; }
.usage-id .role-admin { background: #f5f0ff; color: #6d28d9; }
.usage-id .role-member { background: #eef1f6; color: var(--ink-2); }
.usage-id .role-pending { background: #fef2f2; color: #b91c1c; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.stat-tile {
  --c: #1d4ed8; --c-soft: #eaf0ff;
  text-align: left; font: inherit; cursor: default;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
  background: linear-gradient(160deg, var(--c-soft) 0%, #fff 70%);
  border-left: 4px solid var(--c);
}
.stat-tile.clickable { cursor: pointer; transition: transform .1s, box-shadow .12s; }
.stat-tile.clickable:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 24, 40, .1); }
.stat-tile.on { background: var(--c); border-color: var(--c); }
.stat-tile.on .stat-label, .stat-tile.on .stat-value, .stat-tile.on .stat-sub { color: #fff; }
.stat-tile.on .stat-sub { opacity: .85; }

.stat-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.stat-ico { font-size: 15px; }
.stat-label { font-size: 12px; font-weight: 800; color: var(--c); letter-spacing: -.01em; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.tone-violet { --c: #6d28d9; --c-soft: #f3efff; }
.tone-blue { --c: #1d4ed8; --c-soft: #eaf0ff; }
.tone-green { --c: #047857; --c-soft: #e8faf1; }
.tone-amber { --c: #b45309; --c-soft: #fff5e6; }
.tone-rose { --c: #be123c; --c-soft: #ffeef2; }

.usage-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px;
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px;
}
.usage-meta div { display: flex; flex-direction: column; gap: 1px; }
.usage-meta b { font-size: 11px; color: var(--ink-3); font-weight: 700; }
.usage-meta span { font-size: 12.5px; font-weight: 700; color: var(--ink); }

.usage-h {
  font-size: 13.5px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px;
}

/* 표 안에서 눌러 여는 이름 */
.linkish {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 700;
  color: var(--brand); cursor: pointer; text-align: left;
}
.linkish:hover { text-decoration: underline; }

/* ───────── 밴드 설정 블록 ───────── */
.band-block {
  border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-bottom: 10px;
  background: #fbfcfe;
}
.band-block.on { background: #fff; border-color: #cfe0ff; }
.band-block:last-child { margin-bottom: 0; }

/* ───────── 표 ───────── */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; max-height: 460px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: #f7f9fc; text-align: left; font-size: 11.5px;
  color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line); z-index: 1;
}
tbody td { padding: 6px 10px; border-bottom: 1px solid #f0f2f7; vertical-align: middle; }
tbody tr:hover { background: #fafbff; }
/* 표 안의 입력칸 — 고칠 수 있다는 걸 알 수 있게 옅은 테두리를 남긴다 */
tbody td input[type=text] {
  padding: 4px 6px; background: transparent;
  border-color: transparent; border-bottom-color: #e8ecf3;
  border-radius: 6px; transition: border-color .12s, background .12s;
}
tbody tr:hover td input[type=text] { border-color: #dfe5ee; background: #fff; }
tbody td input[type=text]:hover { border-color: var(--brand); }
tbody td input[type=text]:focus { border-color: var(--brand); background: #fff; }

/* 아직 저장하지 않은 줄 */
tbody tr.dirty { background: #fffaf0; }
tbody tr.dirty td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
td.tight { width: 1%; white-space: nowrap; }
.src { font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: #eef1f6; color: var(--ink-3); }
.src.self { background: #e7f7ee; color: var(--ok); }
.src.import { background: #fff4e5; color: var(--warn); }

/* ───────── 미리보기 ───────── */
.preview-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.preview-head h4 { margin: 0; font-size: 13px; color: var(--ink-2); }
.stage {
  display: grid; place-items: center; padding: 18px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: auto;
}
.sheet-preview {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow);
  transform-origin: top left;
}
.zoomer { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ───────── QR 패널 ───────── */
.qr-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.qr-box img { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.link-box {
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all;
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}

/* ───────── 템플릿 히스토리 ───────── */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 10px; }
/* 적용·덮어쓰기·삭제가 한 줄에 들어가게 한다 */
.tpl .row { flex-wrap: nowrap; gap: 4px; }
.tpl .row .btn.sm { padding: 4px 6px; font-size: 11px; white-space: nowrap; flex: none; }
.tpl {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: #fff; cursor: pointer;
}
.tpl:hover { border-color: var(--brand); }
.tpl .thumb {
  height: 92px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 6px; background: #eef1f6; padding: 4px;
  margin-bottom: 6px;
}
.tpl .nm { font-size: 12px; font-weight: 700; }
.tpl .meta { font-size: 10.5px; color: var(--ink-3); display: flex; justify-content: space-between; }

/* ───────── 알림 · 게이트 ───────── */
/* 알림은 화면 위에 떠 있지만 그 자리의 클릭을 가로채지 않는다. */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; pointer-events: none; }
.toast-wrap .toast { pointer-events: auto; }
.toast {
  background: #101827; color: #fff; padding: 10px 14px; border-radius: 9px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 380px;
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* hidden 속성이 붙어 있으면 반드시 숨는다.
   author 규칙의 display 가 UA 의 [hidden]{display:none} 을 이기기 때문에,
   기본을 none 으로 두고 보일 때만 grid 로 바꾼다. */


/* ───────── 도움말 모달 ─────────
   [hidden] 을 확실히 존중하도록 기본은 none 으로 둔다. */
.modal { display: none; }
.modal:not([hidden]) {
  position: fixed; inset: 0; z-index: 70; display: flex;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(15, 23, 42, .45);
}
.modal-box {
  background: var(--panel); border-radius: 14px; box-shadow: 0 24px 70px rgba(15, 23, 42, .3);
  width: min(880px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.modal-head .btn { margin-left: auto; }
.modal-body { overflow: auto; padding: 18px 22px 26px; }

/* ───────── 도움말 ─────────
   왼쪽 목차 + 오른쪽 내용. 좁은 화면에서는 목차가 위로 올라가 가로로 넘어간다. */
.help-head {
  background: linear-gradient(100deg, #0f766e 0%, #1d4ed8 55%, #6d5cf0 100%);
  border-bottom: 0; gap: 10px;
}
.help-head h2 { color: #fff; white-space: nowrap; }
.help-head input[type=search] {
  flex: 1; min-width: 120px; max-width: 320px; margin-left: auto;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .16); color: #fff; outline: none;
}
.help-head input[type=search]::placeholder { color: rgba(255, 255, 255, .75); }
.help-head input[type=search]:focus { background: rgba(255, 255, 255, .26); box-shadow: none; }
.help-head .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; }
.help-head .btn:hover { background: rgba(255, 255, 255, .28); }

/* 내용만 스크롤되도록 높이를 잠근다(min-height:0 이 없으면 상자가 늘어나 스크롤이 안 걸린다) */
.help-body {
  display: grid; grid-template-columns: 208px 1fr; gap: 0; padding: 0;
  overflow: hidden; min-height: 0;
}
.help-nav, .help-content { min-height: 0; }

.help-nav {
  border-right: 1px solid var(--line); background: #f7f9fc;
  padding: 12px 10px; overflow: auto; display: flex; flex-direction: column; gap: 2px;
}
.help-nav a {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 8px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
  color: var(--ink-2); line-height: 1.35;
}
.help-nav a:hover { background: #eef2f8; color: var(--ink); }
.help-nav a.on { background: var(--brand); color: #fff; }
.help-nav a .ico { font-size: 14px; flex: none; }
.help-nav a.hide { display: none; }

.help-content { overflow: auto; padding: 18px 22px 26px; }
.help-empty { color: var(--ink-3); text-align: center; padding: 30px 0; }

.help-sec {
  --c: #1d4ed8; --c-soft: #eaf0ff;
  margin-bottom: 22px; padding-left: 14px; border-left: 3px solid var(--c-soft);
  scroll-margin-top: 8px;
}
.help-sec.hide { display: none; }
.help-sec.tone-violet { --c: #6d28d9; --c-soft: #ede9fe; }
.help-sec.tone-blue { --c: #1d4ed8; --c-soft: #dbe6ff; }
.help-sec.tone-green { --c: #047857; --c-soft: #ccf3e2; }
.help-sec.tone-amber { --c: #b45309; --c-soft: #ffe6c4; }
.help-sec.tone-rose { --c: #be123c; --c-soft: #ffdbe4; }

.help-h {
  display: flex; align-items: center; gap: 9px;
  font-size: 15.5px; color: var(--ink); border-bottom: 0; padding-bottom: 0; margin: 0 0 10px;
}
.help-num {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--c-soft); color: var(--c);
  padding: 4px 10px; border-radius: 999px; font-size: 13px; flex: none;
}
.help-num b { font-size: 12px; }

/* 본문 안의 작은 제목(예: 현장용 휴대 프린터) */
.help-sec h3:not(.help-h) {
  font-size: 13.5px; color: var(--c); border-bottom: 0; margin: 16px 0 6px; padding-bottom: 0;
}
.help-sec > p:first-of-type { margin-top: 0; }
.help-sec code { background: var(--c-soft); color: var(--c); }
.help-sec p.tip { background: var(--c-soft); border-left-color: var(--c); color: var(--ink-2); }

.help-hit { background: #fff3bf; border-radius: 3px; padding: 0 1px; }

.modal-body section { margin-bottom: 22px; scroll-margin-top: 8px; }
.modal-body h3 {
  margin: 0 0 8px; font-size: 15px; letter-spacing: -.01em;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.modal-body p, .modal-body li { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.modal-body p { margin: 0 0 8px; }
.modal-body ul, .modal-body ol { margin: 0 0 10px; padding-left: 20px; }
.modal-body li { margin-bottom: 3px; }
.modal-body b { color: var(--ink); }
.modal-body code {
  font-family: ui-monospace, 'D2Coding', Consolas, monospace; font-size: 12px;
  background: #f1f4f9; padding: 1px 5px; border-radius: 4px; color: var(--ink);
}
.modal-body p.tip {
  background: #f4f8ff; border-left: 3px solid var(--brand); color: #1e3a8a;
  padding: 9px 12px; border-radius: 0 8px 8px 0;
}
.modal-body p.warn {
  background: #fffaf0; border-left: 3px solid var(--warn); color: #7c4a03;
  padding: 9px 12px; border-radius: 0 8px 8px 0;
}

.notice {
  border: 1px solid #ffe1b0; background: #fffaf0; color: #7c4a03;
  padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 12px;
}
.notice.info { border-color: #cfe0ff; background: #f4f8ff; color: #1d4ed8; }
.notice.warn { border-color: #f7c98b; background: #fff7ec; color: #92400e; }
.notice.warn b { color: #7c2d12; }
.footer-note .bad { color: #b91c1c; }

/* 템플릿 묶음 제목 · 크기 표시 */
.tpl-group { margin: 12px 0 8px; font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.tpl .nm .tpl-size { color: var(--ink-3); font-weight: 600; margin-left: 4px; }

/* 도움말 안의 화면 도해 */
/* 좁은 화면에서는 한 줄로 — min() 이라야 칸이 화면보다 넓어지지 않는다 */
.help-figs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px; margin: 10px 0 14px;
}
.help-fig { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fbfcfe; }
.help-fig svg { display: block; width: 100%; height: auto; border-radius: 6px; }
.help-fig figcaption { margin-top: 7px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.help-fig figcaption b { color: var(--ink); }

/* 도움말 제품 사진 — 파일이 있을 때만 보인다 */
.help-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; margin: 10px 0 14px; }
.help-photos img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }

/* 긴 변수 이름이 좁은 화면을 밀어내지 않게 한다 */
.help-content code { overflow-wrap: anywhere; }

.empty { text-align: center; color: var(--ink-3); padding: 26px 10px; font-size: 13px; }

.footer-note { color: var(--ink-3); font-size: 11.5px; text-align: center; padding: 8px 0 20px; }

/* ───────── 좁은 화면 ─────────
   1180px 이하: 미리보기를 오른쪽 칸에서 본문 아래로 내린다.
   860px 이하: 사이드바를 가로 탭으로 바꾸고 한 줄 배치로 정리한다. */
@media (max-width: 1180px) {
  /* 좁은 화면에선 미리보기가 아래로 내려가 손잡이가 필요 없다 */
  .pv-grip { display: none; }
  .body { grid-template-columns: 176px 1fr; grid-template-rows: 1fr auto; }
  .side { grid-row: 1 / span 2; }
  .preview-col {
    grid-column: 2; border-left: 0; border-top: 1px solid var(--line);
    max-height: 46vh;
  }
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  /* 크기 프리셋 — 라벨을 칩 위로 올린다 */
  .size-row { flex-direction: column; align-items: stretch !important; gap: 4px !important; }
  .size-row .size-lab { min-width: 0 !important; padding-top: 0 !important; }
  /* 손가락으로 누르기 좋게 작은 단추를 조금 키운다 */
  .btn.sm { padding: 8px 11px; }
  .chip { padding: 7px 11px; }

  .hero { padding: 18px 16px 18px; }
  .hero-slide { grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; }
  .hero-title { font-size: 22px; }
  .hero-title .hero-ico { font-size: 20px; }
  .hero-sub { font-size: 12.5px; }
  .hero-art { width: 92px; height: 92px; opacity: .8; }
  .hero-chip { font-size: 11.5px; padding: 5px 10px; }
  .hero-chips { margin-bottom: 10px; }
  /* 좁은 화면 — 설명은 두 줄까지, 칩은 두 개까지만 */
  .hero-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-chip:nth-child(n+3) { display: none; }

  html, body { font-size: 13.5px; }
  .app { grid-template-rows: auto auto minmax(0, 1fr) auto; }

  /* 상단바는 두 줄로 접는다 */
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; height: auto; }
  .topbar .event-filter { order: 3; width: 100%; }
  .topbar .event-filter select { flex: 1; min-width: 0; }
  .topbar .spacer { display: none; }
  .brand small { display: none; }
  .who .nm { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 사이드바 → 가로로 넘기는 탭 */
  .body { display: flex; flex-direction: column; min-width: 0; }
  /* 내용이 화면보다 넓어도 칸이 늘어나지 않게 한다(가로 스크롤은 표 안에서만) */
  .body > *, .main > *, .card, .stage { min-width: 0; max-width: 100%; }
  .side {
    display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden;
    padding: 8px 10px; flex: none; -webkit-overflow-scrolling: touch;
  }
  .side button { width: auto; flex: none; white-space: nowrap; padding: 8px 12px; margin-bottom: 0; }
  .side button .cnt { margin-left: 6px; }

  .main { padding: 12px; flex: 1 1 auto; }
  .preview-col { max-height: none; padding: 12px; }

  .card { padding: 13px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .row { gap: 6px; }

  /* 표는 가로로 스크롤한다(칸이 뭉개지지 않게 최소 폭을 준다) */
  .table-wrap { max-height: 380px; }
  .table-wrap table { min-width: 640px; }

  /* 창(도움말·회원 관리·수정)은 화면을 거의 채운다 */
  .modal:not([hidden]) { padding: 10px; align-items: flex-start; }
  .modal-box { max-height: 92vh; }
  .modal-head { padding: 12px 14px; }
  .modal-head h2 { font-size: 15px; }
  .modal-body { padding: 14px 14px 20px; }

  /* 도움말: 목차를 위로 올려 가로로 넘긴다 */
  .help-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .help-head { flex-wrap: wrap; }
  .help-head h2 { font-size: 14.5px; }
  .help-head input[type=search] { order: 3; width: 100%; max-width: none; margin-left: 0; }
  .help-nav {
    flex-direction: row; overflow-x: auto; border-right: 0;
    border-bottom: 1px solid var(--line); padding: 8px 10px;
  }
  .help-nav a { white-space: nowrap; flex: none; }
  .help-nav a .t { display: none; }
  .help-nav a.on .t { display: inline; }
  .help-content { padding: 14px 14px 22px; }
  .help-sec { padding-left: 10px; margin-bottom: 18px; }

  .qr-box img { width: 180px; height: 180px; }
  .pos-grid { grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(3, 22px); }
  .appfoot { font-size: 11px; padding: 8px 12px; }
}

/* 아주 좁은 화면(작은 휴대폰) */
@media (max-width: 420px) {
  .topbar { gap: 6px; }
  .btn { padding: 8px 10px; }
  /* 좁아도 터치 대상은 유지한다 */
  .btn.sm { padding: 7px 9px; }
  .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   뉴모피즘(Organic Shape) 테마 오버라이드
   — 밝은 회백 바탕 위에 떠 있는 부드러운 카드, 오목한 입력창,
     알약 버튼, 파스텔 점 3개 악센트. 명찰 인쇄물에는 영향 없음.
   ══════════════════════════════════════════════════════════ */

/* ── 상단바: 바탕과 한 몸, 브랜드 점은 볼록한 원판 ── */
.topbar { background: var(--bg); border-bottom: none; }
.brand .dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.ver-top { margin-left: 38px; }
/* 참고 이미지의 파스텔 점 3개 악센트 */
.topbar::before {
  content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: #f43f7b;
  box-shadow: 13px 0 0 #fb923c, 26px 0 0 #34d399;
  margin-right: 26px;
}

/* ── 히어로: 다크 배너를 라운드 카드로 띄운다 ── */
.hero {
  margin: 4px 16px 12px; border-radius: 22px; border-bottom: none;
  box-shadow: 8px 8px 18px rgba(163, 177, 198, .5), -6px -6px 14px rgba(255, 255, 255, .8);
}

/* ── 좌측 메뉴: 밝은 뉴모피즘 ── */
.side h6 { color: var(--ink-3); }
.side button { border-radius: 12px; }
.side button:hover { background: #dfe4ee; color: var(--ink); }
.side button.on {
  background: var(--panel); color: var(--brand);
  box-shadow: var(--shadow-sm); font-weight: 800;
}

/* ── 미리보기 기둥: 경계선 대신 살짝 오목한 면 ── */
.preview-col {
  border-left: none; background: var(--bg);
  box-shadow: inset 6px 0 12px -8px rgba(163, 177, 198, .5);
}

/* ── 카드: 이중 그림자로 떠 있는 판 ── */
.card { border: none; padding: 18px; }
.card > h3 { color: #263a66; font-weight: 800; }

/* ── 입력창: 오목(pressed) ── */
input[type=text], input[type=number], input[type=password], input[type=date], select, textarea {
  border: none; border-radius: 12px; background: var(--bg);
  box-shadow: var(--shadow-in);
  padding: 9px 12px;
}
input:focus, select:focus, textarea:focus {
  border: none;
  box-shadow: var(--shadow-in), 0 0 0 2.5px var(--brand-soft);
}
input[type=color] { border: none; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-in); }
input[type=file] { border-radius: 12px; }

/* ── 버튼: 볼록 알약, 누르면 오목 ── */
.btn {
  border: none; border-radius: 12px; background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .12s ease, transform .12s ease;
}
.btn:hover { background: #f7f9fd; }
.btn:active { box-shadow: var(--shadow-in); transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 4px 4px 10px rgba(29, 78, 216, .35), -3px -3px 8px rgba(255, 255, 255, .7);
}
.btn.primary:active { box-shadow: inset 3px 3px 7px rgba(0, 0, 40, .3); transform: translateY(1px); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:active { box-shadow: var(--shadow-in); }
.btn.danger { background: var(--panel); }
.btn.sm { border-radius: 10px; }
.btn[disabled] { box-shadow: none; }

/* ── 알약 배지 · 모달 ── */
.badge-pill.muted { background: #e2e6ef; }
.modal-box { border: none; box-shadow: -8px -8px 18px rgba(255,255,255,.7), 12px 12px 28px rgba(120, 132, 155, .45); }

/* ── 추천 프린터 카드: 파랑 유지, 테두리 없이 ── */
.card.rec-printer { border: none; }

/* ── 푸터 ── */
.appfoot { background: var(--bg); border-top: 1px solid rgba(163, 177, 198, .25); }

/* 인쇄 시 그림자 제거(앱 셸은 어차피 숨지만 안전망) */
@media print { .card, .btn { box-shadow: none !important; } }

/* ── 도움말 화면 캡처 ── */
.help-shot { margin: 10px 0 16px; }
.help-shot img {
  display: block; width: 100%; height: auto;
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.help-shot.narrow img { max-width: 420px; }
.help-shot figcaption { margin-top: 7px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.help-sub { margin: 14px 0 4px; font-size: 13.5px; color: var(--ink); }
@media print { .help-shot { display: none !important; } }
