@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --ink: #15183c;
  --ink-2: #262b62;
  --blue: #4664e6;
  --blue-dark: #3232c8;
  --purple: #7742cc;
  --blue-soft: #e9edfd;
  --muted: #5b6370;
  --line: #e3e6eb;
  --soft: #f3f5f8;
  --bg: #ffffff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;          /* 한글 단어 중간 줄바꿈 방지 */
  overflow-wrap: break-word;
}
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* 상단 바 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 20px;
  background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand .dot { width: 28px; height: 28px; border-radius: 8px; background: var(--purple); display: grid; place-items: center; font-size: 13px; }
.topbar nav { display: flex; gap: 4px; margin-left: 12px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a {
  text-decoration: none; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-2); font-size: 14px; white-space: nowrap;
}
.topbar nav a:hover { background: var(--ink-2); color: #fff; }
.topbar nav a[aria-current="page"] { background: var(--ink-2); color: #fff; font-weight: 600; }
.topbar .spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.topbar .btn { background: transparent; color: #fff; border-color: #3a404d; }
.topbar .btn:hover { border-color: #fff; }
.topbar .app-b { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 18px; } /* 앱(PWA)으로 열었을 때만 guard.js가 넣는 뒤로 · 새로고침 */

/* 허브 */
.hero { background: var(--blue-dark); color: #fff; padding: 56px 20px 72px; }
.hero .wrap, .tiles { max-width: 1120px; margin: 0 auto; }
.hero small { color: #d6dcff; font-weight: 700; letter-spacing: .08em; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 8px 0 10px; line-height: 1.2; }
.hero p { color: #e1e5ff; margin: 0; }
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px;
  padding: 0 20px; margin-top: -40px; margin-bottom: 60px;
}
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 26px 24px; min-height: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; box-shadow: 0 6px 24px rgba(20, 23, 31, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(20, 23, 31, .12); }
.tile .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--ink); }
.tile.live .ico { background: var(--blue); color: #fff; }
.tile h2 { margin: 6px 0 0; font-size: 20px; }
.tile p { margin: 0; color: var(--muted); font-size: 14px; }
.tile .tag {
  position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--muted);
}
.tile.live .tag { background: var(--blue-soft); color: var(--blue-dark); }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 0 20px 40px; }

/* 준비중 */
.wip { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 40px 20px; text-align: center; }
.wip .ico { width: 84px; height: 84px; border-radius: 22px; background: var(--soft); display: grid; place-items: center; margin: 0 auto 20px; }
.wip h1 { font-size: 28px; margin: 0 0 8px; }
.wip p { color: var(--muted); margin: 0 0 26px; }
.wip .typing::after { content: ""; animation: dots 1.4s steps(5) infinite; }
@keyframes dots { 0% { content: ""; } 20% { content: "."; } 40% { content: ".."; } 60% { content: "..."; } 80% { content: "...."; } 100% { content: "....."; } }
@media (prefers-reduced-motion: reduce) { .wip .typing::after { animation: none; content: "....."; } html { scroll-behavior: auto; } }

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.topbar + .login { min-height: calc(100vh - 60px); }
.login form {
  width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 34px 30px;
}
.login h1 { font-size: 22px; margin: 14px 0 4px; }
.login p { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.login label { font-size: 13px; font-weight: 600; }
.login input {
  width: 100%; margin: 6px 0 14px; padding: 13px 14px; font-size: 18px; letter-spacing: .3em;
  border: 1px solid var(--line); border-radius: 10px;
}
.login .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.login .err { color: #c62828; font-size: 13px; margin: -6px 0 12px; }

/* 매뉴얼 뷰어 */
.viewer { display: grid; grid-template-columns: 300px 1fr; max-width: 1500px; margin: 0 auto; }
.toc {
  position: sticky; top: 124px; height: calc(100vh - 124px); overflow-y: auto;
  padding: 20px 16px 40px; border-right: 1px solid var(--line);
}
.toc h3 { font-size: 13px; margin: 18px 0 6px; display: flex; align-items: center; gap: 8px; }
.toc h3 a { text-decoration: none; }
.toc h3 .code { width: 22px; height: 22px; border-radius: 6px; background: var(--blue-dark); color: #fff; display: grid; place-items: center; font-size: 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a {
  display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none;
  font-size: 13.5px; color: var(--muted);
}
.toc li a:hover { background: var(--soft); color: var(--ink); }
.toc li a.on { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.toc li a .lb { display: block; font-size: 11px; font-weight: 700; color: #6b7280; }
.toc li a.on .lb { color: var(--blue-dark); }
.toc .empty { color: var(--muted); font-size: 13px; padding: 6px 10px; }
.slides { padding: 24px 28px 80px; display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.slide { margin: 0; scroll-margin-top: 140px; }
.slide.flash .frame { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--blue); } 100% { box-shadow: 0 0 0 4px transparent; } }
.slide header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.slide header .no { font-size: 12px; font-weight: 700; color: var(--blue-dark); }
.slide header h2 { font-size: 16px; margin: 0; }
.slide header .sec-print { margin-left: auto; font-size: 12px; padding: 4px 10px; }
.frame { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); aspect-ratio: 16 / 9; }
.frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.frame .hot { position: absolute; display: block; border-radius: 12px; }
.frame .hot:hover { outline: 3px solid var(--blue); background: rgba(70, 100, 230, .08); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 매뉴얼 상단 검색 */
.msearch { position: sticky; top: 60px; z-index: 15; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; }
.msearch-in { position: relative; max-width: 1500px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.msearch input {
  flex: 1; min-width: 0; padding: 11px 14px 11px 42px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235b6370' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
}
.msearch input:focus { background-color: #fff; border-color: var(--blue); }
.msearch .cnt { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.msearch select { display: none; }
.results {
  position: absolute; top: calc(100% + 6px); left: 0; width: min(760px, 100%); max-height: min(60vh, 520px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(20, 23, 31, .16); padding: 6px;
}
.results a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; }
.results a:hover, .results a.sel { background: var(--blue-soft); }
.results .rn { font-size: 12px; font-weight: 700; color: var(--blue-dark); }
.results .rt { font-size: 14px; font-weight: 700; }
.results .rs { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.results mark { background: #ffe27a; color: inherit; border-radius: 3px; padding: 0 1px; }
.results .none { margin: 0; padding: 14px 12px; font-size: 14px; color: var(--muted); }
.zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.frame img, .lbx img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
/* 슬라이드 크게 보기(워터마크 덮음) */
.lbx { position: fixed; inset: 0; z-index: 100; background: rgba(12, 14, 34, .94); overflow: auto; padding: 56px 16px 24px; }
.lbx[hidden] { display: none; }
.lbx-x { position: fixed; top: 10px; right: 12px; z-index: 2; background: #fff; }
.lbx-in { position: relative; width: min(100%, 1700px); margin: 0 auto; }
.lbx-in img { display: block; width: 100%; height: auto; border-radius: 8px; }
.lbx-in .lbx-wm { position: absolute; inset: 0; height: 100%; opacity: .75; }
@media (max-width: 900px) { .lbx { padding: 52px 0 16px; } .lbx-in { width: 180%; } }
.frame img.wm { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media print { .frame img.wm { display: block; } }
.btn:disabled { opacity: .7; cursor: progress; }
.foot a { color: var(--muted); }

@media (max-width: 640px) {
  .topbar nav.hub-nav { display: none; }
  .brand { font-size: 15px; }
  .hero { padding: 36px 16px 60px; }
  .tiles { padding: 0 16px; gap: 14px; }
  .tile { min-height: 0; padding: 22px 20px; }
}

@media (max-width: 900px) {
  .viewer { grid-template-columns: 1fr; }
  .toc { display: none; }
  .msearch { padding: 8px 12px; }
  .msearch-in { gap: 8px; }
  .msearch input { font-size: 16px; padding: 10px 10px 10px 38px; background-position: 11px center; }
  .msearch .cnt { display: none; }
  .msearch select { display: block; flex: 0 0 34%; min-width: 0; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; background: #fff; }
  .slide { scroll-margin-top: 130px; }
  .slides { padding: 16px 16px 60px; gap: 24px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .hide-sm { display: none; }
}

@media print {
  /* A4 세로 · 한 쪽에 슬라이드 2장 (190×107mm 두 장 + 간격 = 222mm < 쓸 수 있는 277mm, 세 장은 안 들어가 자동으로 넘어감) */
  @page { size: A4 portrait; margin: 10mm; }
  .topbar, .toc, .msearch, .sec-print, .no-print { display: none !important; }
  .viewer { display: block; }
  .slides { padding: 0; gap: 0; display: block; }
  .slide { break-inside: avoid; page-break-inside: avoid; margin: 0 0 12mm; }
  .slide header { display: none; }
  .frame { border: 0; border-radius: 0; }
  body[data-print-sec] .slide:not([data-sec-print]) { display: none; }
}

/* ───── camtool.app 테마 (연핑크 · 연보라). 위 규칙을 덮어씀 — 색은 :root 변수에서 관리 ───── */
:root {
  --ink: #2a2140; --ink-2: #5b4b7a;
  --blue: #b8477f;        /* 주 강조(흰 글씨 대비 4.9:1) */
  --blue-dark: #9c3769;
  --purple: #8a63d2;
  --blue-soft: #fde8f1;
  --pink: #f48fb8; --lav: #e7dcff;
  --muted: #6b5f78; --line: #ecdfe9; --soft: #faf5fa; --bg: #fffdfe;
  --radius: 18px;
}
.topbar { height: 56px; padding: 0 16px; gap: 10px; background: rgba(255, 253, 254, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink); border-bottom: 1px solid var(--line); }
.brand { font-size: 17px; letter-spacing: -.01em; }
.brand .dot { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #f7a8c9, #f48fb8 55%, #d9a4ee); color: #fff; }
.topbar .ig { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--blue-dark); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.topbar .ig:hover { border-color: var(--blue); }
nav.menu { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--line); min-height: 53px; }
nav.menu::-webkit-scrollbar { display: none; }
nav.menu a { flex: none; text-decoration: none; padding: 8px 13px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--soft); white-space: nowrap; }
nav.menu a:hover { background: var(--blue-soft); color: var(--blue-dark); }
nav.menu a[aria-current="page"] { background: var(--blue); color: #fff; }
.hero { background: linear-gradient(135deg, #ffe1ee 0%, #f6dcf5 48%, #e6dcff 100%); color: var(--ink); padding: 40px 20px 60px; }
.hero small { color: var(--blue-dark); }
.hero p { color: var(--ink-2); }
.hero .back a, .back a { color: var(--ink-2) !important; border-color: rgba(42, 33, 64, .25) !important; background: rgba(255, 255, 255, .55); }
.btn { border-radius: 12px; min-height: 40px; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.tile { box-shadow: 0 6px 24px rgba(0, 0, 0, .05); border-radius: 20px; min-height: 170px; }
.tile:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .1); }
.tile .ico { background: linear-gradient(135deg, #ffe1ee, #e9dcff); color: var(--blue-dark); }
.tile .tag { background: var(--blue-soft); color: var(--blue-dark); }
.foot { padding: 28px 20px 44px; border-top: 1px solid var(--line); margin-top: 28px; line-height: 1.8; }
.foot b { color: var(--ink-2); }
.note { max-width: 1120px; margin: 0 auto 18px; padding: 12px 16px; border-radius: 14px; background: var(--blue-soft); color: var(--blue-dark); font-size: 13.5px; font-weight: 600; }
/* 공용 본문 틀(새 페이지) */
.page { max-width: 1120px; margin: 0 auto; padding: 18px 16px 30px; display: grid; gap: 16px; }
.box { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 16px; }
.box h2 { font-size: 19px; margin: 0 0 10px; }
.box h3 { font-size: 14.5px; margin: 14px 0 6px; }
.box p, .box li { font-size: 14px; }
.box ul, .box ol { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; }
.fgrid label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 0; }
.fgrid select, .fgrid input { font: inherit; font-size: 15px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 44px; width: 100%; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 14px; min-height: 40px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.warn { color: #b42318; font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .topbar .ig span { display: none; } .topbar .ig { padding: 0 11px; } .hero { padding: 28px 16px 44px; } }
@media print { nav.menu, .foot .np { display: none !important; } }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: #fff; flex: none; }
.lang button { font: inherit; font-size: 13px; font-weight: 700; min-height: 40px; padding: 0 11px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--blue); color: #fff; }
[hidden] { display: none !important; }
.back { display: none !important; }
.page > *, .sim > * { min-width: 0; }
.topbar .btn { background: #fff; color: var(--ink); border-color: var(--line); }
.topbar .btn:hover { border-color: var(--blue); }
.topbar nav a { color: var(--ink-2); }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-dark); }

/* 휴대폰 하단 메뉴(앱처럼 엄지로 누르는 자리). 넓은 화면에서는 숨기고 위 가로 메뉴를 씀 */
.tabbar, .allmenu { display: none; }
@media (max-width: 760px) {
  nav.menu { display: none; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 253, 254, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; cursor: pointer; border-radius: 12px; }
  .tabbar [aria-current="page"], .tabbar button[aria-expanded="true"] { color: var(--blue-dark); background: var(--blue-soft); }
  .allmenu:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(42, 33, 64, .35); }
  .allmenu > div { position: absolute; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); background: #fff; border-radius: 22px 22px 0 0; padding: 16px 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 70vh; overflow-y: auto; }
  .allmenu b { grid-column: 1 / -1; font-size: 15px; }
  .allmenu a { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border-radius: 14px; background: var(--soft); text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink); }
  .allmenu a[aria-current="page"] { background: var(--blue); color: #fff; }
  .foot { padding-bottom: 20px; }
}
@media print { .tabbar, .allmenu { display: none !important; } }
/* 쉬운 화면: 계산기에서 전문 항목(.pro)을 접어 둠 */
.easy .pro { display: none !important; }
.modesw { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: #fff; }
.modesw button { font: inherit; font-size: 14px; font-weight: 700; min-height: 44px; padding: 0 16px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.modesw button[aria-pressed="true"] { background: var(--blue); color: #fff; }

/* ───── 예쁘고 귀엽게(사용자 지정 2026-11-28): 둥근 제목 글꼴, 파스텔 5색, 말랑한 모서리 · 눌림 ───── */
:root { --radius: 22px; --line: #f3e3ee; --mint: #d9f5e8; --butter: #fff1c9; --sky: #dcefff; --peach: #ffe3d6; --cute: "Jua", "Pretendard", "Malgun Gothic", system-ui, sans-serif; }
h1, .brand, .tile h2, .box h2, .panel h2, .card > h2, .decks b, #cards h2, .cn h3, .allmenu b, .grp, .vd, .hero small { font-family: var(--cute); font-weight: 400; letter-spacing: 0; }
.hero h1 { font-size: clamp(32px, 7vw, 46px); }
.box h2, .panel h2 { font-size: 20px; }
.brand { font-size: 20px; }
.brand .dot { border-radius: 12px; transform: rotate(-6deg); box-shadow: 0 3px 0 rgba(184, 71, 127, .18); }
.hero { border-radius: 0 0 30px 30px; background:
  radial-gradient(circle at 90% 22%, rgba(255, 255, 255, .75) 0 34px, transparent 35px),
  radial-gradient(circle at 97% 78%, rgba(255, 255, 255, .5) 0 58px, transparent 59px),
  radial-gradient(circle at 78% 92%, rgba(255, 255, 255, .45) 0 18px, transparent 19px),
  linear-gradient(135deg, #ffe1ee 0%, #f6dcf5 48%, #e6dcff 100%); }
.box, .panel, .card, .tile, .cn { border-radius: var(--radius); border-color: var(--line); }
.btn, .chips button, .seg button, .tog, .camtabs button, .fgrid select, .fgrid input, .rw select, .rw input { border-radius: 99px; }
.fgrid select, .fgrid input, .rw select, .rw input { padding-left: 14px; }
.btn, .chips button, .tile, .decks button, .tabbar a, .tabbar button, .looks button, nav.menu a, .allmenu a, .shoot { transition: transform .12s ease, background-color .12s ease, border-color .12s ease; }
.btn:active, .chips button:active, .tile:active, .decks button:active, .looks button:active, .allmenu a:active { transform: scale(.96); }
.tabbar a:active, .tabbar button:active { transform: scale(.9); }
.chips button[aria-pressed="true"], .btn.primary { box-shadow: 0 3px 0 rgba(156, 55, 105, .28); }
/* 메뉴 타일 · 주제 버튼 아이콘: 파스텔 5색을 돌아가며 */
.tile .ico, .decks .ic { border-radius: 18px; }
.tile:nth-child(5n+1) .ico, .decks button:nth-child(5n+1) .ic { background: #ffe1ee; color: #b8477f; }
.tile:nth-child(5n+2) .ico, .decks button:nth-child(5n+2) .ic { background: #e9dcff; color: #6f4cc0; }
.tile:nth-child(5n+3) .ico, .decks button:nth-child(5n+3) .ic { background: var(--mint); color: #1f7a55; }
.tile:nth-child(5n+4) .ico, .decks button:nth-child(5n+4) .ic { background: var(--butter); color: #8a5a00; }
.tile:nth-child(5n+5) .ico, .decks button:nth-child(5n+5) .ic { background: var(--sky); color: #1f5f96; }
.tile .tag { font-family: var(--cute); font-weight: 400; font-size: 12.5px; }
.tabbar { border-radius: 22px 22px 0 0; box-shadow: 0 -4px 16px rgba(0, 0, 0, .05); }
.tabbar [aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
.note { border-radius: 18px; }
.foot { border-top: 0; }
@media (prefers-reduced-motion: reduce) { .btn, .chips button, .tile, .decks button, .tabbar a, .tabbar button, .looks button, nav.menu a, .allmenu a, .shoot { transition: none; } }

/* ═════ 뉴트럴 + 앰버 테마(사용자 지정 2026-11-28 — 그 전의 연핑크를 대체) ═════
   밝은 화면: 배경 #F6F7F9 · 히어로 #FFFBEB · 포인트 #D97706 · 글자 #111827
   어두운 화면(휴대폰 다크 모드, '시네마 다크'): 배경 #111317 · 카드 #1B1E25 · 포인트 #F59E0B · 글자 #F3F4F6
   흰 글씨가 올라가는 버튼은 대비를 위해 한 단계 진한 앰버(#B45309)를 씀. 한글 글꼴은 원주체(사용자 지정). */
@font-face { font-family: "Wonju"; src: url("/assets/fonts/wonju-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Wonju"; src: url("/assets/fonts/wonju-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --ink: #111827; --ink-2: #374151; --muted: #6b7280; --line: #e5e7eb; --soft: #f3f4f6; --bg: #f6f7f9; --card: #ffffff;
  --blue: #b45309; --blue-dark: #92400e; --blue-soft: #fef3c7; --amber: #d97706; --purple: #d97706; --hero: #fffbeb; --on: #ffffff;
  --cute: "Wonju", "Pretendard", "Malgun Gothic", system-ui, sans-serif;
}
body { background: var(--bg); color: var(--ink); font-family: "Wonju", "Pretendard", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif; }
button, input, select, textarea { font-family: inherit; }
h1, .brand, .tile h2, .box h2, .panel h2, .card > h2, .decks b, #cards h2, .cn h3, .allmenu b, .grp, .vd, .hero small, .tile .tag { font-family: var(--cute); font-weight: 700; }
.topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--ink); border-bottom-color: var(--line); }
.brand .dot { background: linear-gradient(135deg, #fbbf24, var(--amber)); box-shadow: 0 3px 0 rgba(146, 64, 14, .22); }
.topbar .ig, .lang, nav.menu { background: var(--card); }
.topbar .ig { color: var(--blue-dark); }
nav.menu { background: var(--bg); }
nav.menu a { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
nav.menu a[aria-current="page"], .lang button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on); }
.hero { color: var(--ink); background:
  radial-gradient(circle at 90% 22%, rgba(255, 255, 255, .8) 0 34px, transparent 35px),
  radial-gradient(circle at 97% 78%, rgba(255, 255, 255, .55) 0 58px, transparent 59px),
  radial-gradient(circle at 78% 92%, rgba(255, 255, 255, .5) 0 18px, transparent 19px),
  linear-gradient(135deg, var(--hero) 0%, #fef3c7 62%, #fde9b8 100%); }
.hero small { color: var(--blue-dark); letter-spacing: .06em; }
.hero p { color: var(--ink-2); }
.box, .panel, .card, .tile, .cn, .decks button, .cards a, #pvrest { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn, .chips button, .fgrid select, .fgrid input, .rw select, .rw input, .rw button, textarea, .seg button, .tog, .camtabs button, .row select, .grid2 select, .lxg select, .sim input[type=number] { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.primary, .chips button[aria-pressed="true"], .seg button[aria-pressed="true"], .tog[aria-pressed="true"], .modesw button[aria-pressed="true"], .allmenu a[aria-current="page"], .steps li::before { background: var(--blue); border-color: var(--blue); color: var(--on); }
.chips button[aria-pressed="true"], .btn.primary { box-shadow: 0 3px 0 rgba(146, 64, 14, .3); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.tile { box-shadow: 0 6px 20px rgba(17, 24, 39, .05); }
.tile .tag, .note, .src a, .org a { background: var(--blue-soft); color: var(--blue-dark); }
.tile:nth-child(5n+1) .ico, .decks button:nth-child(5n+1) .ic { background: #fef3c7; color: #b45309; }
.tile:nth-child(5n+2) .ico, .decks button:nth-child(5n+2) .ic { background: #e5e7eb; color: #1f2937; }
.tile:nth-child(5n+3) .ico, .decks button:nth-child(5n+3) .ic { background: #ffedd5; color: #c2410c; }
.tile:nth-child(5n+4) .ico, .decks button:nth-child(5n+4) .ic { background: #fde68a; color: #92400e; }
.tile:nth-child(5n+5) .ico, .decks button:nth-child(5n+5) .ic { background: #f3f4f6; color: #374151; }
.tabbar { background: color-mix(in srgb, var(--card) 96%, transparent); border-top-color: var(--line); }
.tabbar [aria-current="page"], .tabbar button[aria-expanded="true"] { color: var(--blue-dark); background: var(--blue-soft); }
.allmenu > div, .modesw, #view header button, #view footer button { background: var(--card); color: var(--ink); }
.allmenu a { background: var(--soft); color: var(--ink); }
#view { background: var(--bg); }
#view footer button.pri { background: var(--blue); border-color: var(--blue); color: var(--on); }
.looks button { background: var(--soft); color: var(--ink-2); }
.looks button[aria-pressed="true"] { background: var(--card); }
.foot { color: var(--muted); }
.foot b { color: var(--ink-2); }
.foot a { color: var(--blue-dark); }
a { color: inherit; }
:focus-visible { outline-color: var(--amber); }

/* 다크 모드: 휴대폰 · 컴퓨터가 어두운 화면으로 설정돼 있으면 자동 적용. 점검을 마친 페이지만(html[data-dark], lang.js가 붙임) */
@media (prefers-color-scheme: dark) {
  html[data-dark] {
    --ink: #f3f4f6; --ink-2: #d1d5db; --muted: #9ca3af; --line: #2a2e37; --soft: #232730; --bg: #111317; --card: #1b1e25;
    --blue: #f59e0b; --blue-dark: #fbbf24; --blue-soft: #3a2a0a; --amber: #f59e0b; --hero: #1b1e25; --on: #111317;
    color-scheme: dark;
  }
  html[data-dark] .hero { background:
    radial-gradient(circle at 90% 22%, rgba(245, 158, 11, .12) 0 34px, transparent 35px),
    radial-gradient(circle at 97% 78%, rgba(245, 158, 11, .08) 0 58px, transparent 59px),
    linear-gradient(135deg, #1b1e25 0%, #22252d 100%); }
  html[data-dark] .btn.primary:hover { background: var(--blue-dark); }
  html[data-dark] .tile, html[data-dark] #cards .cd { box-shadow: none; }
  html[data-dark] .chips button[aria-pressed="true"], html[data-dark] .btn.primary { box-shadow: 0 3px 0 rgba(0, 0, 0, .45); }
  html[data-dark] .res div, html[data-dark] .pw div { background: var(--soft); }
  html[data-dark] .vd.lv3 { background: #12301f; color: #6ee7a8; } html[data-dark] .vd.lv2 { background: #2a2440; color: #c4b5fd; }
  html[data-dark] .vd.lv1 { background: #3a2a0a; color: #fcd34d; } html[data-dark] .vd.lv0 { background: #3b1414; color: #fca5a5; }
  html[data-dark] .vd.lvn { background: var(--soft); color: var(--muted); }
  html[data-dark] .lst li.w, html[data-dark] .rw p.lv0, html[data-dark] .warn { color: #fca5a5; }
  html[data-dark] .rw p.lv3 { color: #6ee7a8; } html[data-dark] .rw p.lv1 { color: #fcd34d; }
  html[data-dark] .tile:nth-child(n) .ico, html[data-dark] .decks button:nth-child(n) .ic { background: #2a2e37; color: var(--blue-dark); }
  html[data-dark] .car { background: #0d0f12; }
  html[data-dark] .allmenu:not([hidden]) { background: rgba(0, 0, 0, .6); }
}

/* ───── 휴대폰에서 쓰기 편하게(2026-11-28) ───── */
input[type=range] { accent-color: var(--amber); }
input[type=checkbox], input[type=radio] { accent-color: var(--amber); }
@media (max-width: 760px) {
  /* 16px보다 작은 입력 글자는 아이폰이 누를 때 화면을 확대해 버림 */
  input, select, textarea { font-size: 16px !important; }
  input[type=range] { min-height: 40px; }
  /* 손가락으로 누르기 쉬운 크기(44px) */
  .seg button, .tog, .camtabs button, .btn, .chips button, .row select, .grid2 select, .lxg select, .tbl select, .sim input[type=number] { min-height: 44px !important; }
  .seg, .camtabs { gap: 6px; }
  /* 도구가 첫 화면에 바로 보이게 소개 영역을 줄임 */
  .hero { padding: 18px 16px 26px; border-radius: 0 0 24px 24px; }
  .hero h1 { font-size: 27px; margin: 4px 0 6px; }
  .hero p { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero small { font-size: 11.5px; }
  .tiles { margin-top: -14px; gap: 12px; padding: 0 16px; }
  .tile { min-height: 0; padding: 18px; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
  .tile .ico { flex: none; }
  .tile h2 { margin: 0; flex: 1 1 0; min-width: 0; font-size: 18px; }
  .tile p { flex: 1 1 100%; }
  .page, .sim { padding-left: 14px; padding-right: 14px; }
}
