* { box-sizing: border-box; }
body { margin: 0; display: flex; height: 100vh; font-family: -apple-system, "Segoe UI", system-ui, sans-serif; color: #37352f; font-size: 16px; }
#sidebar { width: 260px; background: #f7f7f5; border-right: 1px solid #e9e9e7; padding: 14px 8px; overflow-y: auto; display: flex; flex-direction: column; }
.brand { font-weight: 700; padding: 6px 10px 12px; }
.label { font-size: 12px; color: #91918e; padding: 14px 10px 4px; }
#sidebar ul { list-style: none; margin: 0; padding: 0; }
#sidebar li { padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; }
#sidebar li:hover { background: #ebebea; }
#sidebar li.active { background: #e3e2e0; font-weight: 600; }
.done { color: #2a9d8f; }
.toggle { font-size: 13px; color: #6b6b6b; cursor: pointer; }
#page { flex: 1; overflow-y: auto; padding: 24px 96px 60px; }
.topbar { display: flex; justify-content: space-between; font-size: 13px; color: #91918e; }
.page-title { font-size: 34px; font-weight: 700; border: none; outline: none; width: 100%; margin: 28px 0 8px; }
h2 { font-size: 22px; margin: 18px 0 6px; }
.guide-box { background: #f1f1ef; border-radius: 4px; padding: 10px 14px; margin: 10px 0; color: #555; font-size: 15px; }
body.no-guide .guide-box, body.no-guide .tpl-hint { display: none; }
textarea, input.field, select { width: 100%; font: inherit; border: 1px solid #e9e9e7; border-radius: 4px; padding: 8px 10px; margin: 4px 0; }
textarea { min-height: 90px; }
.blank { border: none; border-bottom: 1px solid #c7c7c5; font: inherit; padding: 2px 4px; width: 200px; outline: none; }
button { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 4px; border: 1px solid #2383e2; background: #2383e2; color: #fff; cursor: pointer; margin: 4px 4px 0 0; }
button.ghost { background: transparent; color: #37352f; border-color: #e9e9e7; }
.tabs button { background: transparent; color: #37352f; border-color: #e9e9e7; } .tabs button.on { background: #e3e2e0; }
.row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f1ef; }
.row .text { flex: 1; }
.tag { font-size: 13px; padding: 2px 8px; border-radius: 3px; border: none; cursor: pointer; background: #f1f1ef; color: #37352f; }
.tag.on.fact { background: #dbeddb; } .tag.on.claim { background: #fadec9; } .tag.on.unsure { background: #e7e5f6; }
.lens { border: 1px solid #e9e9e7; border-radius: 6px; padding: 12px; margin: 10px 0; }
.nav { margin-top: 30px; display: flex; justify-content: space-between; }

.del { background: none; border: none; padding: 0 2px; margin: 0; font-size: 13px; opacity: 0; color: #91918e; }
#sidebar li:hover .del { opacity: 1; }
.del:hover { color: #e03e3e; }

.map { margin-top: 12px; }
.root { border: 2px solid #2383e2; border-radius: 8px; padding: 12px 16px; font-weight: 600; text-align: center; }
.branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; position: relative; }
.branch { border: 1px solid #e9e9e7; border-top: 3px solid #86bbd8; border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.branch ul { padding-left: 18px; margin: 6px 0; }
.sub { margin-top: 8px; color: #6b6b6b; }
.pick { font-weight: 700; color: #2383e2; }

.fold { cursor: pointer; user-select: none; border-radius: 4px; }
.fold:hover { background: #ebebea; color: #37352f; }
.arrow { display: inline-block; width: 12px; }

/* ---- 갤러리 / Frame ---- */
.nav-item { padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.nav-item:hover { background: #ebebea; } .nav-item.active { background: #e3e2e0; font-weight: 600; }
.page-h { font-size: 34px; margin: 28px 0 20px; }
#gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gcard { position: relative; border: 1px solid #e9e9e7; border-radius: 8px; padding: 14px; cursor: pointer; background: #fff; min-height: 150px; display: flex; flex-direction: column; gap: 6px; }
.gcard:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.gcard:hover .del { opacity: 1; }
.gcard .del { position: absolute; top: 8px; right: 8px; }
.gtitle { font-weight: 700; font-size: 17px; padding-right: 24px; }
.gproblem { font-size: 14px; color: #555; flex: 1; }
.gstatus { font-size: 13px; }
.gcard.new { align-items: center; justify-content: center; color: #91918e; border-style: dashed; }
.muted { color: #91918e; } .small { font-size: 12px; }
.dots { display: flex; gap: 4px; }
.dot { width: 100%; height: 5px; border-radius: 3px; background: #e9e9e7; }
.dot.done { background: #2a9d8f; } .dot.now { background: #2383e2; }
#sidebar li.frame { font-weight: 500; } #sidebar li.locked { color: #b4b4b0; }
#sidebar li.open-frame { background: #ebebea; }
#sidebar li.sub { padding-left: 26px; }
#framebar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 13px; }
.fchip { padding: 2px 8px; border-radius: 3px; background: #f1f1ef; color: #91918e; }
.fchip.now { background: #d3e5ef; color: #183347; font-weight: 600; } .fchip.done { background: #dbeddb; color: #1c3829; }
.sep { color: #c7c7c5; }

.brand { cursor: pointer; border-radius: 4px; }
.brand:hover { background: #ebebea; }

#sidebar li.frame { justify-content: flex-start; gap: 6px; }
#sidebar li.frame .small { margin-left: auto; }
