:root {
  --bg: #f7f7f5; --panel: #fff; --ink: #1f2328; --sub: #6b7280; --line: #e5e7eb; --line2: #d1d5db;
  --accent: #2563eb; --accent-bg: #eff6ff; --red: #dc2626; --red-bg: #fef2f2; --amber: #b45309; --amber-bg: #fffbeb; --green: #15803d; --green-bg: #f0fdf4;
  --side: #fbfbfa;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line2); background: #fff; border-radius: 6px; padding: 5px 12px; }
button:hover { background: #f3f4f6; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: #1d4ed8; }
button.danger { color: var(--red); border-color: #fecaca; }
button.ghost { border-color: transparent; background: transparent; }
button:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=date], input[type=search], select, textarea {
  border: 1px solid var(--line2); border-radius: 6px; padding: 5px 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--accent); }

#app { display: flex; min-height: 100vh; }
#side { width: 220px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 16px 10px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
#side .brand { font-size: 15px; padding: 4px 10px 16px; }
#side nav a { display: block; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: #374151; }
#side nav a:hover { background: #efefed; }
#side nav a.on { background: #e8e8e5; font-weight: 600; }
#side nav a.soon { color: #9ca3af; }
#side .me { margin-top: auto; padding: 10px; font-size: 13px; color: var(--sub); border-top: 1px solid var(--line); }
#side .me b { color: var(--ink); }
#side .me button { margin-top: 6px; font-size: 12px; padding: 3px 8px; }
#side .rule { font-size: 11.5px; color: var(--red); padding: 8px 10px 0; }
#main { flex: 1; min-width: 0; padding: 24px 32px 80px; }
body.bare #side { display: none; }

h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 24px 0 8px; color: #374151; }
.muted { color: var(--sub); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }

/* 로그인 */
.login { max-width: 340px; margin: 12vh auto; }
.login h1 { text-align: center; }
.login label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--sub); }
.login input { width: 100%; padding: 8px 10px; }
.login button { width: 100%; margin-top: 16px; padding: 9px; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 1.2em; }

/* 탭 · 필터 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs a { padding: 6px 12px; text-decoration: none; color: var(--sub); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.filters { margin-bottom: 12px; }
.filters input[type=search] { width: 200px; }

/* 표 */
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.list th { text-align: left; font-weight: 500; color: var(--sub); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafafa; cursor: pointer; user-select: none; white-space: nowrap; }
table.list td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click:hover td { background: #f9fafb; cursor: pointer; }
table.list .title { font-weight: 500; }
.newrow input { width: 100%; border-style: dashed; }

/* 상태·마감 표시 */
.st { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.st-예정 { background: #f3f4f6; color: #4b5563; }
.st-진행 { background: var(--accent-bg); color: var(--accent); }
.st-보류 { background: var(--amber-bg); color: var(--amber); }
.st-완료 { background: var(--green-bg); color: var(--green); }
.due-over { color: var(--red); font-weight: 600; }
.due-today { color: var(--amber); font-weight: 600; }
.cat { font-size: 12px; color: var(--sub); }
.cnt { font-size: 12px; color: var(--sub); white-space: nowrap; }

/* 칸반 */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.col { background: #f0f0ee; border-radius: 10px; padding: 8px; min-height: 120px; }
.col h3 { font-size: 13px; margin: 2px 4px 8px; display: flex; gap: 6px; align-items: center; }
.col h3 .n { color: var(--sub); font-weight: 400; }
.col.over { outline: 2px dashed var(--accent); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; cursor: grab; }
.kcard:hover { border-color: var(--line2); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 500; margin-bottom: 4px; word-break: break-all; }
.kcard .m { font-size: 12px; color: var(--sub); display: flex; gap: 8px; flex-wrap: wrap; }
.drop-mark { height: 3px; background: var(--accent); border-radius: 2px; margin: -2px 0 4px; }

/* 업무 상세 */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; max-width: 1200px; }
.detail .titlebox { width: 100%; font-size: 24px; font-weight: 700; border: 0; padding: 4px 0; background: transparent; outline: none; }
.detail .titlebox:focus { outline: none; border: 0; }
.savestate { font-size: 12px; color: var(--sub); min-width: 70px; text-align: right; }
.savestate.bad { color: var(--red); }
.props { display: grid; grid-template-columns: 70px 1fr; gap: 8px 10px; align-items: center; margin: 8px 0 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.props label { color: var(--sub); font-size: 13px; }
.props select, .props input { width: 100%; max-width: 260px; }
.editor-wrap { min-height: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 0; }
.editor-wrap .bn-container { font-family: inherit; }
.editor-wrap .bn-editor { padding-inline: 44px 20px; }
.conflict { background: var(--red-bg); border: 1px solid #fecaca; color: #7f1d1d; padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; }
.readonly-note { background: var(--amber-bg); border: 1px solid #fde68a; color: #78350f; padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.side-panel h2 { margin-top: 0; }
.side-panel section { margin-bottom: 22px; }
.drop { border: 2px dashed var(--line2); border-radius: 8px; padding: 10px; text-align: center; color: var(--sub); font-size: 13px; }
body.dragfile .drop { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.files div { display: flex; gap: 6px; align-items: center; padding: 4px 0; font-size: 13px; border-bottom: 1px solid #f3f4f6; }
.files a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comments .c { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.comments .c .who { font-size: 12px; color: var(--sub); display: flex; gap: 6px; }
.comments .c .b { white-space: pre-wrap; word-break: break-word; }
.comments textarea { width: 100%; min-height: 64px; resize: vertical; margin-top: 8px; }
.history { font-size: 12px; color: var(--sub); }
.history div { padding: 3px 0; }
.x { border: 0; background: transparent; color: #9ca3af; padding: 0 4px; }
.x:hover { color: var(--red); background: transparent; }

/* 홈 */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; max-width: 1200px; }
.tlist .item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; text-decoration: none; }
.tlist .item:hover { border-color: var(--line2); }
.tlist .item .t { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--sub); font-size: 13px; padding: 8px 2px; }
.cmt-item { display: block; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; text-decoration: none; font-size: 13px; }
.cmt-item .who { color: var(--sub); font-size: 12px; }

/* 관리자 — 가입 신청 · 개인 권한 */
.signup-box { margin-bottom: 16px; border-color: #fde68a; background: var(--amber-bg); }
.signup-row { padding: 8px 0; border-bottom: 1px solid #fde68a; }
.signup-row:last-of-type { border-bottom: 0; }
.perm-panel { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; background: #fafaf8; padding: 10px; border-radius: 8px; }
.perm-item { display: flex; gap: 8px; align-items: center; }

/* 관리자 */
.temp-pw { background: var(--green-bg); border: 1px solid #bbf7d0; padding: 10px 12px; border-radius: 8px; margin: 10px 0; }
.temp-pw code { font-size: 16px; font-weight: 700; letter-spacing: .5px; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: 90vw; }
#toast.on { opacity: 1; }
#toast.bad { background: var(--red); }

/* 사이드바 페이지 트리 */
#side { overflow-y: auto; }
#side nav { flex: none; }
.tree-head { display: flex; align-items: center; margin: 18px 0 2px; padding: 0 4px 0 10px; }
.tree-head a { flex: 1; font-size: 12px; font-weight: 600; color: var(--sub); text-decoration: none; padding: 4px 0; }
.tree-head a.on, .tree-head a:hover { color: var(--ink); }
.ghost.add { padding: 0 6px; color: var(--sub); font-size: 15px; line-height: 22px; border-radius: 4px; }
.ghost.add:hover { background: #e5e5e2; color: var(--ink); }
#tree { flex: none; }
.trow { display: flex; align-items: center; border-radius: 6px; min-height: 28px; }
.trow:hover { background: #efefed; }
.trow.on { background: #e8e8e5; }
.trow.on .nm { font-weight: 600; }
.trow a { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; text-decoration: none; color: #374151; padding: 3px 0; }
.trow .ic { flex: none; width: 18px; text-align: center; }
.trow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .tog { width: 20px; padding: 0; font-size: 11px; color: #9ca3af; border-radius: 4px; flex: none; }
.trow .tog:hover { background: #e0e0dd; color: var(--ink); }
.trow .tog.leaf { visibility: hidden; }
.trow:hover .tog.leaf { visibility: visible; }
.trow .add { visibility: hidden; flex: none; }
.trow:hover .add { visibility: visible; }
.trow.dragging { opacity: .4; }
.trow.d-in { background: var(--accent-bg); outline: 2px solid #93c5fd; }
.trow.d-before { box-shadow: inset 0 2px 0 var(--accent); }
.trow.d-after { box-shadow: inset 0 -2px 0 var(--accent); }
.tempty { font-size: 12px; color: #9ca3af; padding: 3px 0; }
.trash-link { display: block; padding: 7px 10px; margin-top: 10px; border-radius: 6px; text-decoration: none; color: var(--sub); font-size: 13px; }
.trash-link:hover, .trash-link.on { background: #efefed; color: var(--ink); }
#install-link { margin-top: 2px; }
#install-link[hidden] { display: none; }
#install-dlg { box-sizing: border-box; border: 1px solid #e5e5e3; border-radius: 12px; padding: 18px 20px; max-width: min(440px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
#install-dlg::backdrop { background: rgba(0,0,0,.3); }
#install-dlg h2 { margin: 0 0 10px; font-size: 18px; }
#install-dlg ol { padding-left: 20px; line-height: 1.8; }

/* 페이지 한 장 — 노션처럼 테두리 없이 가운데 */
.page-top { position: sticky; top: 0; z-index: 5; background: var(--bg); margin: -24px -32px 0; padding: 10px 32px; flex-wrap: nowrap; }
.crumbs { display: flex; gap: 4px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 13px; color: var(--sub); }
.crumbs a { text-decoration: none; padding: 2px 4px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.crumbs a:hover { background: #ececea; color: var(--ink); }
.crumbs .sep { color: #c4c4c4; }
#crumb-me { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.page { max-width: 860px; margin: 0 auto; padding: 36px 0 120px; }
.pg-icon-row { position: relative; min-height: 30px; }
.pg-icon { border: 0; background: transparent; font-size: 56px; line-height: 1.1; padding: 0 4px; border-radius: 8px; }
.pg-icon:hover:not(:disabled) { background: #ececea; }
.pg-icon.empty-ic { font-size: 13px; color: #9ca3af; padding: 4px 8px; opacity: 0; transition: opacity .15s; }
.page:hover .pg-icon.empty-ic, .pg-icon.empty-ic:focus { opacity: 1; }
.pg-icon:disabled { cursor: default; }
.emoji-pop { position: absolute; z-index: 20; top: 100%; left: 0; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px; display: flex; flex-wrap: wrap; gap: 2px; }
.emoji-pop[hidden] { display: none; }
.emoji-pop button { font-size: 20px; padding: 4px 6px; }
.emoji-pop button.small { font-size: 12px; width: 100%; margin-top: 4px; }
.pg-title { display: block; width: 100%; border: 0; outline: 0; resize: none; overflow: hidden; background: transparent; font-size: 38px; font-weight: 700; line-height: 1.2; padding: 6px 0 4px; margin: 0; }
.pg-title:focus { outline: 0; border: 0; }
.pg-title::placeholder { color: #d1d5db; }
.pg-meta { margin: 4px 0 18px; }
.pg-editor { min-height: 50vh; margin: 0 -54px; }
.pg-editor .bn-container { font-family: inherit; }
.pg-editor .bn-editor { background: transparent; padding-inline: 54px; font-size: 16px; }
.kids-h { margin: 28px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.kid { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; text-decoration: none; }
.kid:hover { background: #efefed; }
.kid .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-decoration-color: #d1d5db; text-underline-offset: 3px; }
.kid.big { font-size: 15px; padding: 8px; }
button.ghost.danger { border-color: transparent; }
.page-top button { white-space: nowrap; flex: none; }

/* 저장된 보기 */
.tabs { align-items: center; flex-wrap: wrap; }
.tab-sep { width: 1px; height: 18px; background: var(--line2); margin: 0 6px; }
.tabs .spacer { flex: 1; }
#sv-new { font-size: 13px; }
.sv-panel, .sv-bar { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.sv-bar { background: #fafaf8; }

/* 달력 */
.cal-head { margin-bottom: 8px; }
.cal-title { font-size: 16px; min-width: 110px; text-align: center; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 12px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-w { font-size: 12px; color: var(--sub); text-align: center; padding: 6px 0; border-bottom: 1px solid var(--line); background: #fafafa; }
.cal-w.sun { color: var(--red); } .cal-w.sat { color: var(--accent); }
.cal-d { min-height: 104px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; padding: 4px; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.other { background: #fbfbfa; }
.cal-d.other .cal-n span { color: #c4c4c4; }
.cal-d.over { background: var(--accent-bg); outline: 2px dashed #93c5fd; outline-offset: -2px; }
.cal-n { display: flex; align-items: center; font-size: 12px; color: var(--sub); margin-bottom: 2px; }
.cal-n span { flex: 1; padding-left: 2px; }
.cal-d.today .cal-n span { flex: none; color: #fff; background: var(--red); border-radius: 10px; padding: 0 6px; margin-right: auto; }
.cal-n .add { visibility: hidden; margin-left: auto; }
.cal-d:hover .cal-n .add { visibility: visible; }
.cchip { font-size: 12px; padding: 2px 6px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; background: #f3f4f6; border-left: 3px solid #9ca3af; }
.cchip:hover { filter: brightness(.96); }
.cchip.dragging { opacity: .4; }
.st-b-진행 { background: var(--accent-bg); border-left-color: var(--accent); }
.st-b-보류 { background: var(--amber-bg); border-left-color: #f59e0b; }
.st-b-완료 { background: var(--green-bg); border-left-color: #22c55e; color: var(--sub); text-decoration: line-through; }
.cal-more { display: block; font-size: 11.5px; color: var(--sub); padding: 0 4px; text-decoration: none; }
.cal-input { width: 100%; font-size: 12px; padding: 2px 4px !important; margin-top: 2px; }
.cal-side { background: #f0f0ee; border-radius: 10px; padding: 8px; max-height: 70vh; overflow-y: auto; }

/* 갤러리 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; min-height: 200px; }
.gcard:hover { border-color: var(--line2); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.gcover { height: 120px; background: #f3f4f2; overflow: hidden; }
.gcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcover.none { padding: 10px 12px; font-size: 12px; color: var(--sub); line-height: 1.5; }
.gcover.none span { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.gbody { padding: 10px 12px; }
.gt { font-weight: 600; margin-bottom: 6px; word-break: break-all; }
.gm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--sub); }
.gnew { justify-content: center; padding: 12px; border-style: dashed; }
.gnew input { width: 100%; }

/* 통합 검색 */
.search-btn { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--sub); padding: 7px 10px; border-radius: 6px; margin-bottom: 4px; }
.search-btn:hover { background: #efefed; color: var(--ink); }
.search-btn .kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--line2); border-radius: 4px; padding: 0 5px; color: #9ca3af; }
#search { position: fixed; inset: 0; z-index: 60; background: rgba(15,15,15,.35); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
#search[hidden] { display: none; }
.s-box { width: 640px; max-width: calc(100vw - 24px); background: #fff; border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.25); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
#s-q { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; padding: 14px 16px !important; font-size: 16px; outline: none !important; }
#s-list { overflow-y: auto; padding: 6px; }
.s-h { font-size: 12px; color: var(--sub); padding: 6px 10px; }
.s-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.s-item.on { background: #f1f1ef; }
.s-ic { width: 20px; text-align: center; flex: none; }
.s-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-x { font-size: 12.5px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-k { font-size: 11px; color: #9ca3af; flex: none; }
.s-item mark { background: #fef08a; color: inherit; border-radius: 2px; }
.s-foot { padding: 6px 12px; border-top: 1px solid var(--line); }

/* 설문 */
a.btn { display: inline-block; border: 1px solid var(--line2); background: #fff; border-radius: 6px; padding: 5px 12px; text-decoration: none; white-space: nowrap; }
a.btn:hover { background: #f3f4f6; }
a.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.form-row { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; flex-wrap: wrap; }
.f-main { flex: 1; min-width: 200px; }
.f-title { font-weight: 600; text-decoration: none; }
.form-edit, .form-fill { max-width: 720px; }
.form-edit .pg-title { font-size: 28px; }
.f-desc { width: 100%; min-height: 60px; resize: vertical; border: 0 !important; background: transparent; padding: 4px 0 !important; color: var(--sub); }
.f-opts { gap: 16px; margin: 8px 0 16px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.q-opts { width: 100%; min-height: 80px; resize: vertical; }
.f-desc-view { color: var(--sub); white-space: pre-wrap; margin-top: -8px; }
.anon-note { background: var(--green-bg); border: 1px solid #bbf7d0; color: #14532d; padding: 8px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.q-fill { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.q-l { font-weight: 600; margin-bottom: 8px; }
.req { color: var(--red); }
.q-fill textarea { width: 100%; }
.opt { display: block; padding: 4px 0; }
.stars { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.stars input { display: none; }
.stars span { font-size: 30px; color: #d1d5db; cursor: pointer; }
.stars label:hover span, .stars label:hover ~ label span, .stars input:checked + span, .stars label:has(input:checked) ~ label span { color: #f59e0b; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bar-row { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 4px; }
.bar-l { width: 110px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { flex: 1; height: 10px; background: #f1f1ef; border-radius: 5px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bar-n { width: 28px; text-align: right; color: var(--sub); }
.txt-ans { font-size: 13px; padding: 4px 0; border-bottom: 1px solid #f3f4f6; }
.table-scroll { overflow-x: auto; }

/* 폰 상단줄 — 넓은 화면에선 숨김 */
#topbar { display: none; }
#scrim { display: none; }

@media (max-width: 900px) {
  #topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; height: 48px; padding: 0 8px; padding-top: env(safe-area-inset-top); background: var(--side); border-bottom: 1px solid var(--line); }
  #topbar #menu-btn { font-size: 20px; padding: 4px 10px; }
  #top-title { font-weight: 600; }
  #topbar #top-search { font-size: 18px; padding: 4px 10px; }
  .search-btn .kbd { display: none; }
  #search { padding-top: 8px; }
  .s-box { max-height: 85vh; }
  body.bare #topbar { display: none; }
  #side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: 280px; max-width: 85vw; height: 100%; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  body.side-open #side { transform: none; visibility: visible; box-shadow: 4px 0 20px rgba(0,0,0,.12); }
  .page-top .lbl { display: none; }
  body.side-open #scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.25); }
  .trow { min-height: 36px; }
  .trow .add, .trow .tog.leaf { visibility: visible; }
  .trow .tog.leaf { opacity: .35; }
  #main { padding: 16px; }
  .page-top { margin: -16px -16px 0; padding: 8px 16px; top: 48px; }
  .page { padding-top: 20px; }
  .pg-title { font-size: 28px; }
  .pg-editor { margin: 0 -16px; }
  .pg-editor .bn-editor { padding-inline: 16px; }
  .pg-icon.empty-ic { opacity: 1; }
  .detail, .home-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(4, 240px); overflow-x: auto; }
  .cal-wrap { grid-template-columns: 1fr; }
  .cal-d { min-height: 64px; padding: 2px; }
  .cchip { font-size: 10.5px; padding: 1px 3px; border-left-width: 2px; }
  .cal-n .add { visibility: visible; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
