:root {
  --bg: #f6f5f1; --card: #fff; --ink: #1d2a3a; --muted: #7a8291; --line: #e4e2dc;
  --accent: #1d2a3a; --gold: #b08a3e; --ok: #2f8f5b; --warn: #d9822b; --bad: #c4453c;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14181f; --card: #1d232c; --ink: #e8eaee; --muted: #8e96a3; --line: #2c3440; --accent: #d9b56a; --gold: #d9b56a; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px; line-height: 1.55; }
a { color: inherit; }
main { max-width: 960px; margin: 0 auto; padding: 16px 16px 64px; }
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { margin: 0 0 12px; }
section { margin: 28px 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 600; }
.danger { color: var(--bad); } .ok-text { color: var(--ok); }
.pre { white-space: pre-line; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--ink); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; padding: 0 16px; min-height: 52px; }
@media (prefers-color-scheme: dark) { .top { background: #0d1015; } }
.brand { font-weight: 800; letter-spacing: .12em; text-decoration: none; color: var(--gold); flex: none; }
.top nav { display: flex; gap: 4px; }
.top nav a { text-decoration: none; padding: 6px 10px; border-radius: 8px; opacity: .75; white-space: nowrap; }
.top nav a.on { opacity: 1; background: rgba(255,255,255,.12); }

/* building blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.flash { background: #e9f4ee; color: #1f5e3b; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
@media (prefers-color-scheme: dark) { .flash { background: #1e3328; color: #9ad3b2; } }
.btn { display: inline-block; border: 0; background: var(--accent); color: var(--bg); padding: 9px 16px;
  border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.kakao { background: #fee500; color: #191919; width: 100%; padding: 14px; font-size: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--line); color: var(--ink); text-decoration: none; white-space: nowrap; }
.tag.k-IR { background: #dfe9f7; color: #24508f; } .tag.k-DD { background: #f6e7d3; color: #8a5317; }
.tag.k-ADVISORY { background: #e3f1e7; color: #2b6b42; } .tag.k-MEETING { background: #ece6f5; color: #5a3f8c; }
.badge { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--line); }
.badge.warn { background: var(--warn); color: #fff; }
.resp { font-size: 12px; padding: 1px 8px; border-radius: 99px; }
.r-yes { background: #dff0e5; color: #23683f; } .r-no { background: #f5e0de; color: #8f2e27; } .r-maybe { background: #f3ecd9; color: #7a5d17; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.inline { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }

/* lists */
/* 필터로 숨긴 줄·카드 (display:flex가 hidden 속성을 덮어쓰지 않게) */
.list-item[hidden], .mcard[hidden] { display: none; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > p { padding: 12px 16px; margin: 0; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); text-decoration: none; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: rgba(127,127,127,.06); }
.list-item .grow, .grow { flex: 1; min-width: 0; }
.list-item form { margin: 0; }
.date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 92px; }

/* login */
.center-card { max-width: 380px; margin: 12vh auto 0; text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 36px 24px; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: .2em; color: var(--gold); margin-bottom: 4px; }

/* dashboard */
.hello { font-size: 20px; }
.todo { margin-bottom: 10px; border-left: 4px solid var(--warn); }
.rsvp { display: flex; gap: 8px; margin-top: 12px; }
.rsvp button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.rsvp button.sel[value=yes] { background: var(--ok); border-color: var(--ok); color: #fff; }
.rsvp button.sel[value=no] { background: var(--bad); border-color: var(--bad); color: #fff; }
.rsvp button.sel[value=maybe] { background: var(--warn); border-color: var(--warn); color: #fff; }
.pipeline { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pcol { min-width: 120px; flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.pcol-h { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pcard { display: block; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--bg); margin-top: 4px; text-decoration: none; }

/* deals board */
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.bcol { min-width: 170px; flex: 1; background: rgba(127,127,127,.06); border-radius: 12px; padding: 10px; }
.bcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; text-decoration: none; }
.head { margin: 8px 0 16px; }
.head h1 { margin: 6px 0; }
.big { font-size: 18px; font-weight: 600; }
.summary { white-space: pre-line; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stage { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: var(--ink); color: var(--bg); }
.stage.s-invested { background: var(--ok); color: #fff; } .stage.s-pursuing { background: #2f6fb0; color: #fff; } .stage.s-dropped { background: var(--muted); color: #fff; }
.steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0; }
.step { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--line); color: var(--muted); }
.step.done { background: rgba(47,143,91,.15); color: var(--ok); }
.step.cur { background: var(--ink); color: var(--bg); font-weight: 700; }

/* event */
.tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.tally div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.tally b { display: block; font-size: 22px; } .tally span { font-size: 12px; color: var(--muted); }

/* forms */
.form { display: grid; gap: 10px; }
.form.two { grid-template-columns: 1fr 1fr; }
.form.two .row-end, .form.two .check { grid-column: 1 / -1; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; width: 100%; }
input[type=checkbox] { width: auto; }
.inline input, .inline select { width: auto; flex: 1; min-width: 120px; }
input.num { width: 80px; text-align: right; }
.admin-box { margin-top: 12px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px 14px; }
.admin-box summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.admin-box[open] summary { margin-bottom: 12px; }
dialog { border: 0; border-radius: 16px; padding: 20px; width: min(480px, 92vw); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }

/* members */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mcard { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; }
.mcard img, .profile img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.profile { display: flex; gap: 16px; align-items: center; }
.profile img { width: 64px; height: 64px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.big { width: 64px; height: 64px; font-size: 24px; }
.fund-dot { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; text-align: center; font-size: 11px;
  border-radius: 6px; background: var(--gold); color: #fff; margin: 2px 2px 0 0; padding: 0 4px; }
.fund-no { font-weight: 800; font-size: 18px; color: var(--gold); min-width: 44px; }
.mrow { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.mrow summary { padding: 10px 14px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mrow.inactive { opacity: .6; }
.mbody { padding: 4px 14px 14px; display: grid; gap: 14px; }
.invite { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.funds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.funds-grid label { display: flex; align-items: center; gap: 6px; color: var(--ink); }

.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.info { display: grid; grid-template-columns: 80px 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
.info dt { color: var(--muted); } .info dd { margin: 0; }
.tight { margin: 4px 0 10px; padding-left: 18px; } .tight li { margin: 2px 0; }

/* admin */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.st { font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--line); white-space: nowrap; }
.st-sent { background: #dff0e5; color: #23683f; } .st-failed { background: #f5e0de; color: #8f2e27; } .st-pending, .st-sending { background: #f3ecd9; color: #7a5d17; }

@media (max-width: 600px) {
  .form.two { grid-template-columns: 1fr; }
  .date { min-width: 0; }
  .list-item { flex-wrap: wrap; }
}
/* 지난 일정 목록: 제목은 최소 폭을 지켜 두 줄까지만, 넘치면 … (좁은 화면에서는 집계가 다음 줄로) */
.pastlist .pl-title { flex: 1 1 9em; min-width: 9em; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.4; }
.pastlist .pl-stat { margin-left: auto; text-align: right; }

/* funds */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 20px; }
.kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpis span { display: block; font-size: 12px; color: var(--muted); }
.kpis b { display: block; font-size: 18px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpis b.sm { font-size: 13px; font-weight: 600; }
.kpis em { font-style: normal; font-size: 12px; color: var(--gold); }
.fund-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; }
.fcard:hover { border-color: var(--gold); }
.fnum { font-size: 20px; font-weight: 700; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.fmeta { margin-top: 8px; line-height: 1.6; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.bar i { display: block; height: 100%; background: var(--gold); }
.phase { font-size: 12px; padding: 1px 8px; border-radius: 99px; }
.p-on { background: #dff0e5; color: #23683f; } .p-done { background: var(--line); color: var(--muted); }
.gold { color: var(--gold); }
@media (max-width: 600px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* login */
.login-wrap { max-width: 400px; margin: 4vh auto 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 20px 24px; }
.login-wrap .logo { text-align: center; }
.center { text-align: center; }
.form.left { text-align: left; margin-top: 16px; }
.btn.wide { width: 100%; padding: 14px; font-size: 17px; }
.err { background: #f5e0de; color: #8f2e27; border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.note { background: #f3ecd9; color: #7a5d17; border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg); border-radius: 12px;
  padding: 4px; margin: 16px 0 18px; }
.modes button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 4px; border-radius: 9px; cursor: pointer; }
.modes button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pane .form { margin-bottom: 12px; }
.who { text-align: center; font-size: 18px; margin: 4px 0 2px; }
.name-input { text-align: center; font-size: 18px; padding: 12px; }
.dots { display: flex; justify-content: center; gap: 16px; margin: 18px 0 20px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
.dots i.on { background: var(--ink); border-color: var(--ink); }
.bigpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; }
.bigpad button { height: 72px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 32px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; user-select: none; }
.bigpad button.fn { font-size: 18px; font-weight: 600; color: var(--muted); }
.bigpad button:active { background: var(--line); transform: scale(.97); }
@media (max-width: 420px) { .login-wrap { margin-top: 0; border: 0; border-radius: 0; padding: 20px 16px; }
  .bigpad button { height: 76px; } }
.top .me-link.on { opacity: 1; text-decoration: underline; }
.top .me-link { margin-left: auto; text-decoration: none; font-size: 13px; opacity: .85; white-space: nowrap; }
.top .logout { margin: 0; flex: none; }
.top .logout button { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px;
  padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; opacity: .8; white-space: nowrap; }
/* 휴대폰: 1줄 = 로고·내 정보·로그아웃, 2줄 = 메뉴(옆으로 밀기) */
@media (max-width: 700px) {
  .top { padding-top: 8px; column-gap: 10px; }
  .top nav { order: 3; width: 100%; overflow-x: auto; padding: 6px 0 8px; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
}
.ver { text-align: center; font-size: 11px; color: var(--muted); padding: 24px 0 12px; }

/* calendar */
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 12px 0 24px; }
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cal-head b { font-size: 17px; }
.cal-nav { text-decoration: none; font-size: 22px; line-height: 1; padding: 0 8px; color: var(--muted); }
.cal-today { white-space: nowrap; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-wd { font-size: 12px; text-align: center; padding: 4px 0; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 84px; padding: 3px 0 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: visible; min-width: 0; }
.cal-day.out { background: rgba(127,127,127,.05); }
.cal-day.out .dn { opacity: .4; }
.cal-day .dn { display: inline-block; font-size: 12px; font-weight: 600; margin: 0 4px 2px; min-width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; }
.cal-day.today { background: rgba(176,138,62,.08); }
.cal-day.today .dn { background: var(--gold); color: #fff; }
.sun { color: #c4453c; } .sat { color: #3b6bb3; }
.cal-day.today .dn.sun, .cal-day.today .dn.sat { color: #fff; }
.ci { display: block; font-size: 11px; line-height: 1.5; margin: 1px 2px; padding: 0 4px; border-radius: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.ci.k-IR { background: #dfe9f7; color: #24508f; } .ci.k-DD { background: #f6e7d3; color: #8a5317; }
.ci.k-ADVISORY { background: #e3f1e7; color: #2b6b42; } .ci.k-MEETING { background: #ece6f5; color: #5a3f8c; }
.ci.poll { background: #fbe7c8; color: #7a4a00; margin-left: 0; margin-right: 0; border-radius: 0; }
.ci.poll.start { margin-left: 2px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.ci.poll.end { margin-right: 2px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; font-weight: 700; }
.ci.poll.done { background: var(--line); color: var(--muted); }
.cal-legend { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -6px; }
.lg.k-IR { background: #dfe9f7; } .lg.k-DD { background: #f6e7d3; } .lg.k-ADVISORY { background: #e3f1e7; }
.lg.k-MEETING { background: #ece6f5; } .lg.poll { background: #fbe7c8; }
@media (max-width: 600px) {
  .cal { padding: 8px 4px; margin-left: -8px; margin-right: -8px; }
  .cal-day { min-height: 64px; }
  .ci { font-size: 10px; padding: 0 2px; margin: 1px; }
}
.tag.k-POLL { background: #fbe7c8; color: #7a4a00; }
.poll-todo { display: block; text-decoration: none; }

/* polls */
.pcard2 { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; text-decoration: none; }
.pcard2.closed { opacity: .75; }
.pcard2:hover { border-color: var(--gold); }
.tbar { display: flex; height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.tbar i { display: block; height: 100%; }
.t-yes { color: #23683f; } .t-conditional { color: #4c7a2a; } .t-no { color: #8f2e27; } .t-delegate { color: #5a3f8c; }
.tbar .t-yes { background: #2f8f5b; } .tbar .t-conditional { background: #8dbb5a; } .tbar .t-no { background: #c4453c; } .tbar .t-delegate { background: #8a6cc0; }
.tlegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 600; }
.t-bg-yes { background: #dff0e5; color: #23683f; } .t-bg-conditional { background: #eaf3dc; color: #4c7a2a; }
.t-bg-no { background: #f5e0de; color: #8f2e27; } .t-bg-delegate { background: #ece6f5; color: #5a3f8c; }
.choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0 12px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; text-align: center; padding: 14px 4px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 15px; }
.choice input:checked + span { color: #fff; }
.c-yes input:checked + span { background: #2f8f5b; border-color: #2f8f5b; }
.c-conditional input:checked + span { background: #6f9c3e; border-color: #6f9c3e; }
.c-no input:checked + span { background: #c4453c; border-color: #c4453c; }
.c-delegate input:checked + span { background: #8a6cc0; border-color: #8a6cc0; }
.c-undecided input:checked + span { background: var(--muted); border-color: var(--muted); }
.extra { margin-bottom: 8px; display: grid; gap: 8px; }
.extra[hidden] { display: none; }
@media (max-width: 600px) { .choices { grid-template-columns: 1fr 1fr; } .choices .c-undecided { grid-column: 1 / -1; } }
.voters { margin-top: 12px; display: grid; gap: 10px; }
.vgroup { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.vrow { padding: 4px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.vgroup .vrow:first-of-type { border-top: 0; }
.poll-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.poll-form legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 13px; color: var(--ink); }
.chip input { width: auto; }
/* 숫자판 비밀번호 입력 */
.pin-entry { margin-top: 12px; }
.pe-step { text-align: center; }
.pe-label { text-align: center; font-size: 18px; font-weight: 700; margin-top: 4px; }
.pe-show { text-align: center; font-size: 20px; letter-spacing: .3em; font-variant-numeric: tabular-nums; min-height: 1.4em; color: var(--muted); margin-top: -10px; }
.pe-msg { text-align: center; color: var(--bad); font-size: 14px; min-height: 1.2em; margin-bottom: 6px; }
.pe-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pe-tools .pe-peek { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); }
.pe-tools .pe-peek input { width: auto; }
.pe-box { max-width: 380px; margin: 0 auto; }

/* 투표 만들기 폼 */
.pform { display: grid; gap: 14px; margin-top: 8px; }
.pf-sec { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.pf-title { font-weight: 700; font-size: 15px; }
.pf-label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pf-label em { color: var(--bad); font-style: normal; }
.pf-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.pf-help { font-size: 12px; color: var(--muted); margin: 0; }
.pf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-row2 > div { display: grid; gap: 4px; }
.pform [hidden] { display: none !important; }
.tiles { display: grid; gap: 8px; }
.tiles.t1 { grid-template-columns: 1fr; }
.tiles.t2 { grid-template-columns: 1fr 1fr; }
.tiles.t5 { grid-template-columns: repeat(5, 1fr); }
.tiles.tfund { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.tile { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile > span { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  min-height: 56px; height: 100%; padding: 10px 8px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.35; transition: background .1s, border-color .1s; }
.tile.sm > span { min-height: 44px; padding: 8px 4px; font-weight: 600; }
.tile > span b { font-size: 15px; }
.tile > span small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.tile input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tile input:checked + span small { color: inherit; opacity: .75; }
.tile input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (max-width: 600px) {
  .pf-row2 { grid-template-columns: 1fr; }
  .tiles.t5 { grid-template-columns: repeat(3, 1fr); }
}
/* 투표 버튼: 금액 찬성 2개면 6개 버튼 */
.choices.n6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .choices.n6 .c-undecided { grid-column: auto; } }
/* 기권, 결과 */
.t-abstain { color: #6b7280; } .tbar .t-abstain { background: #9aa1ab; } .t-bg-abstain { background: #eceef1; color: #4b5563; }
.c-abstain input:checked + span { background: #6b7280; border-color: #6b7280; }
.choices { grid-template-columns: repeat(3, 1fr); }
.choices.n7 .c-undecided { grid-column: 1 / -1; }
@media (max-width: 600px) { .choices { grid-template-columns: 1fr 1fr; } .choices .c-undecided { grid-column: auto; }
  .choices.n7 .c-undecided { grid-column: 1 / -1; } }
.closed-polls > summary { list-style: none; text-align: center; margin-bottom: 10px; cursor: pointer; }
.closed-polls > summary::-webkit-details-marker { display: none; }
.closed-polls[open] > summary { background: var(--line); }
.closed-item { align-items: center; }
.rline { line-height: 1.6; }
.rate { margin-right: 6px; }
.rate.pass, .rbig.pass { color: #23683f; } .rate.fail, .rbig.fail { color: #8f2e27; }
.result-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.rbig { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.note { background: #f3ecd9; color: #7a5d17; border-radius: 8px; padding: 8px 10px; }

.tbar .t-pending { background: #c9b8e6; }
.vhead { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.voters { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; }
.voters > details, .voters + p { grid-column: 1 / -1; }

.tiles.t4 { grid-template-columns: repeat(4, 1fr); }
.pf-preview { font-weight: 700; color: var(--gold); margin-left: 6px; font-size: 14px; }
.pf-title .req { color: var(--bad); font-style: normal; }
.pf-custom-date, .pf-custom-time { font-size: 16px; padding: 10px; }
@media (max-width: 600px) { .tiles.t4 { grid-template-columns: repeat(2, 1fr); } }

/* 포트폴리오·투자 내역 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl.inv td.r, .tbl.inv th.r { text-align: right; }
.tbl.inv .nw { white-space: nowrap; }
.tbl.inv th { font-size: 12px; color: var(--muted); font-weight: 600; }
.tbl.inv tr.inv-admin td { border-bottom: 1px solid var(--line); padding: 0 4px 6px; }
.tbl.inv tr.inv-admin summary { color: var(--muted); }
.up { color: #1a8a4a; } .down { color: #c0392b; }
.warn-text { color: #b26a00; }
.filters { margin: 4px 0 12px; gap: 6px; }
.chip { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: inherit; text-decoration: none; background: var(--card); }
.chip.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.pf-list { display: flex; flex-direction: column; gap: 8px; }
details.pf { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
details.pf > summary { list-style: none; cursor: pointer; padding: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; }
details.pf > summary::-webkit-details-marker { display: none; }
.pf-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pf-nums { display: flex; gap: 14px; font-size: 14px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.pf-nums em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.pf-body { padding: 0 12px 12px; }
.inv-form { margin-top: 8px; }
@media (max-width: 640px) {
  .pf-nums { gap: 10px; font-size: 13px; width: 100%; justify-content: space-between; }
}
.kpis b i { font-style: normal; }
.pf-body .tbl.inv { min-width: 560px; }

/* 일정·IR */
.tag.k-EVENT, .ci.k-EVENT { background: #fde2ea; color: #9b2c55; } .lg.k-EVENT { background: #fde2ea; }
.r-online { background: #dfe9f7; color: #24508f; } .r-meal { background: #fbe7c8; color: #7a4a00; } .r-none { background: var(--line); color: var(--muted); }
.rsvp.n4 button { padding: 10px 4px; font-size: 14px; }
.rsvp button.sel[value=online] { background: #3a6fb7; border-color: #3a6fb7; color: #fff; }
.rsvp.meal { margin-top: 8px; align-items: center; }
.rsvp.meal .rsvp-lb { flex: 0 0 auto; font-size: 13px; color: var(--muted); margin-right: 2px; }
.rsvp.meal button { padding: 7px 4px; font-size: 13px; }
.rsvp.meal button.sel[name=meal][value=yes] { background: var(--gold); border-color: var(--gold); color: #fff; }
.rsvp.meal button.sel[name=meal][value=no] { background: var(--muted); border-color: var(--muted); color: #fff; }
.rsvp.meal button.sel[name=meal][value=maybe] { background: var(--warn); border-color: var(--warn); color: #fff; }
.att-sum { margin-top: 10px; font-size: 14px; }
.att-sum > summary { cursor: pointer; list-style: none; padding: 8px 10px; border-radius: 8px; background: rgba(127,127,127,.07); font-variant-numeric: tabular-nums; }
.att-sum > summary::-webkit-details-marker { display: none; }
.att-sum .att-more { float: right; font-size: 12px; color: var(--gold); }
.att-sum[open] .att-more { visibility: hidden; }
.att-list { padding: 8px 4px 0; display: grid; gap: 6px; line-height: 1.6; }
.att-list .resp { margin-right: 6px; }
.meal-dot { font-size: 11px; margin-left: 1px; }
.month-h { font-weight: 700; margin: 18px 0 8px; color: var(--muted); font-size: 14px; }
.evcard { margin-bottom: 10px; }
.ev-top { display: flex; gap: 12px; align-items: flex-start; }
.ev-pick { margin-top: 6px; width: 18px; height: 18px; }
.ev-date { flex: 0 0 auto; min-width: 56px; text-align: center; border-right: 1px solid var(--line); padding-right: 10px; }
.ev-date b { display: block; font-size: 20px; line-height: 1.1; }
.ev-date span { font-size: 12px; color: var(--muted); }
.ev-date.big b { font-size: 26px; }
.big-title { font-size: 18px; }
.ircard { margin-bottom: 14px; }
.ir-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.ir-co { border-top: 1px dashed var(--line); padding: 10px 0 6px; }
.ir-co.card { border: 1px solid var(--line); padding: 12px; margin-bottom: 10px; }
.ir-co-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ir-no { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; }
.ir-intro { white-space: pre-line; margin: 8px 0; line-height: 1.6; }
.ir-docs { display: flex; flex-wrap: wrap; gap: 6px; }
.docchip { font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--bg); }
.sub-h { font-size: 13px; font-weight: 700; color: var(--muted); margin: 10px 0 4px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; margin: 8px 0; font-size: 14px; }
.facts dt { font-size: 11px; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.form.two .span2 { grid-column: 1 / -1; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks { display: grid; gap: 6px; margin-top: 6px; }
.evform .pf-label input, .evform .pf-label select, .evform .pf-label textarea { margin-top: 4px; }
.datechips { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.dc-month { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; margin-top: 6px; }
.dchip input:disabled + span { opacity: .45; text-decoration: line-through; }
.addco { margin-top: 6px; }
.addco input { flex: 1; min-width: 160px; }
.danger-btn { color: var(--bad); border-color: var(--bad); }
a.cal-day { color: inherit; text-decoration: none; display: block; cursor: pointer; }
a.cal-day:hover { background: rgba(176,138,62,.06); }
.cal-day.picked { outline: 2px solid var(--gold); outline-offset: -2px; }
.daypanel { scroll-margin-top: 70px; margin-top: 12px; }
.day-ev { padding: 10px 0; border-top: 1px solid var(--line); }
.day-ev:first-of-type { border-top: 0; }
@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
  .rsvp.n4 button { font-size: 13px; }
  .ev-date { min-width: 46px; padding-right: 8px; }
}
.evform .pf-label { display: block; }

/* 응답 줄: 회의 / 식사 구분 */
.rsvp-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rsvp-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.rsvp-row + .rsvp-row { border-top: 1px dashed var(--line); background: rgba(176,138,62,.06); }
.rsvp-row .rsvp-lb { flex: 0 0 96px; font-size: 13px; font-weight: 700; }
.rsvp-row.meal .rsvp-lb { color: #7a4a00; }
.rsvp-row .rsvp { flex: 1; margin-top: 0; }
.rsvp-row.meal .rsvp button { padding: 8px 4px; font-size: 14px; }
.rsvp-row.meal .rsvp button.sel[value=yes] { background: var(--gold); border-color: var(--gold); color: #fff; }
.rsvp-row.meal .rsvp button.sel[value=no] { background: var(--muted); border-color: var(--muted); color: #fff; }
.irtime { display: inline-flex; gap: 6px; }
.irtime select { width: auto; }
/* 접힌 일정 줄 */
details.evrow { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
details.evrow > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
details.evrow > summary::-webkit-details-marker { display: none; }
details.evrow > summary::after { content: "참석 입력 ▾"; margin-left: auto; font-size: 12px; color: var(--gold); white-space: nowrap; }
details.evrow[open] > summary::after { content: "접기 ▴"; }
details.evrow[open] > summary { border-bottom: 1px solid var(--line); }
.evrow-body { padding: 4px 12px 12px; }
.evrow .ev-when { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 92px; }
.evrow .ev-ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.next-label { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .02em; margin-bottom: 6px; }
@media (max-width: 640px) {
  .rsvp-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .rsvp-row .rsvp-lb { flex: none; }
  .evrow .ev-when { min-width: 78px; font-size: 14px; }
  details.evrow > summary::after { content: "▾"; }
  details.evrow[open] > summary::after { content: "▴"; }
}

/* 일정 통합·딜·멤버 필터 */
details.evrow.near { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.co-link { font-weight: 700; }
.yearbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 14px; }
.yearbar button.chip { font: inherit; font-size: 13px; cursor: pointer; }
.yr-range { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.yr-range.on { border-color: var(--gold); }
.yr-range select { width: auto; padding: 3px 6px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.dgroup h2 { display: flex; align-items: center; gap: 8px; }
.dgroup h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--line); }
.g-ir h2::before { background: #24508f; } .g-dd h2::before { background: #8a5317; } .g-vote h2::before { background: var(--warn); }
.g-invested h2::before { background: var(--ok); } .g-dropped h2::before { background: var(--muted); }
.drow { gap: 10px; }
.d-date { flex: 0 0 auto; min-width: 84px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.d-date em { display: block; font-style: normal; font-size: 11px; }
.mfilter { display: grid; gap: 8px; margin-bottom: 14px; }
.mf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mf-lb { font-size: 13px; font-weight: 700; min-width: 64px; }
.chipchk { position: relative; cursor: pointer; }
.chipchk input { position: absolute; opacity: 0; pointer-events: none; }
.chipchk span { display: inline-block; padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: var(--bg); }
.chipchk input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chipchk input:focus-visible + span { outline: 2px solid var(--gold); }
.mcard[hidden] { display: none; }
.ctbl .cin { width: 74px; padding: 4px 6px; }
.ctbl tr.lp td { background: rgba(127,127,127,.05); }
.ctbl tfoot th { border-top: 2px solid var(--line); vertical-align: top; }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
.ctbl th.r, .ctbl td.r { text-align: right; }

/* 돌아가기 버튼 (오른쪽 위) */
.backbar { display: flex; justify-content: flex-end; margin: -4px 0 8px; }
.backbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.backbtn .bk-arrow { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg);
  align-items: center; justify-content: center; font-size: 16px; }
.backbtn small { font-weight: 500; font-size: 13px; color: var(--muted); }
.backbtn:hover, .backbtn:active { background: var(--ink); color: var(--bg); }
.backbtn:hover small, .backbtn:active small { color: inherit; opacity: .8; }
/* 달력 이전·다음 달 버튼 크게 */
.cal-head .cal-nav { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 44px;
  border: 1.5px solid var(--line); border-radius: 12px; font-size: 26px; line-height: 1; text-decoration: none; color: var(--ink); background: var(--card); }
.cal-head .cal-nav:active { background: var(--ink); color: var(--bg); }
.cal-head b { flex: 1; text-align: center; font-size: 18px; }
.atbl th { white-space: nowrap; user-select: none; }
.atbl th.sorted-up::after { content: " ▲"; font-size: 10px; } .atbl th.sorted-down::after { content: " ▼"; font-size: 10px; }
.atbl td.r, .atbl th.r { text-align: right; }
.ratebar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--line); vertical-align: middle; overflow: hidden; }
.ratebar i { display: block; height: 100%; background: var(--ok); }
@media (max-width: 640px) { .ratebar { display: none; } }
details.pastbox > summary.pastsum { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); margin: 8px 0; }
details.pastbox > summary.pastsum::-webkit-details-marker { display: none; }
.pastsum .ps-title { font-size: 17px; font-weight: 700; }
.pastsum .ps-count { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; }
.pastsum .ps-count::after { content: "▾"; }
details.pastbox[open] .ps-count::after { content: "▴"; }
.past-resp { margin-top: 10px; }
.rtbl select { width: auto; padding: 4px 6px; }
.rsel.r-yes { background: #dff0e5; } .rsel.r-online { background: #dfe9f7; } .rsel.r-no { background: #f5e0de; }
.guest-note { border-left: 4px solid var(--gold); margin-bottom: 12px; }
.admin-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 20px; }
.atile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); color: inherit; text-decoration: none; min-height: 140px; }
.atile:hover { border-color: var(--ink); }
.atile b { font-size: 18px; } .at-ic { font-size: 26px; }
@media (max-width: 640px) { .admin-tiles { grid-template-columns: 1fr; } }
.pmatrix th, .pmatrix td { text-align: center; vertical-align: middle; }
.pmatrix td:first-child, .pmatrix th:first-child { text-align: left; }
.pmatrix input[type=checkbox] { width: 22px; height: 22px; }
.pmatrix .pdesc { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.pmatrix .fixed { color: var(--ok); font-weight: 700; }
.role-sel { width: auto; padding: 4px 6px; }
.att-sum-plain { padding: 8px 10px; border-radius: 8px; background: rgba(127,127,127,.07); font-variant-numeric: tabular-nums; }
.vresult { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--line); }
.vresult.ok { background: #dff0e5; color: #23683f; } .vresult.bad { background: #f5e0de; color: #8f2e27; }
.pf-hint { font-weight: 400; color: var(--gold); font-size: 12px; }
details.memo { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; background: var(--bg); }
details.memo > summary { cursor: pointer; }
.memo-body { white-space: pre-wrap; line-height: 1.7; margin-top: 8px; font-size: 15px; }
.card.memo-body { margin-top: 0; }
#materials .list + .sub-h { margin-top: 14px; }
.matbox { margin: 8px 0 18px; }
#materials > summary.matsum { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 10px 16px; border: 1.5px solid var(--gold); border-radius: 14px; background: var(--card); }
#materials > summary.matsum::-webkit-details-marker { display: none; }
.matsum .ps-title { font-size: 17px; font-weight: 700; }
.matsum .ps-count { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--gold); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.matsum .ps-count::after { content: "▾"; }
#materials[open] .matsum .ps-count::after { content: "▴"; }
.matlist { padding: 10px 2px 0; }
/* 로그인 숫자판: 화면 안에 들어오게, 메시지 자리 고정 */
.pin-msg { min-height: 2.6em; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 14px; line-height: 1.3; color: var(--muted); margin: 0 0 2px; padding: 0 4px; }
.pin-msg.bad { color: var(--bad); font-weight: 600; }
[data-pane="pin"] .dots { margin: 4px 0 14px; }
.pin-who { margin: 2px 0 4px; }
.pin-who .who { font-size: 16px; color: var(--muted); }
.pin-who .who b { color: var(--ink); }
.pin-hint { margin: 4px 0 0; }
@media (max-width: 420px) {
  .login-wrap { padding: 12px 14px 16px; }
  .login-wrap .logo { margin: 2px 0 0; }
  .modes { margin: 10px 0 8px; }
  .modes button { padding: 8px 4px; }
  .bigpad { gap: 8px; margin-bottom: 10px; }
  .bigpad button { height: min(68px, 9dvh); font-size: 28px; }
}
#vote .matbox { margin: 14px 0 0; }
.newbox { border: 1.5px solid var(--gold); border-radius: 16px; padding: 12px; margin: 10px 0 18px; background: var(--card); }
.tiles.t3 { grid-template-columns: repeat(3, 1fr); }
.aud { display: grid; gap: 8px; }
.aud [hidden] { display: none !important; }
.aud-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.aud-p { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; font-size: 14px; }
.aud-p input { width: 18px; height: 18px; }
.aud-p small { color: var(--muted); font-size: 11px; }
.aud-p:has(input:checked) { border-color: var(--ink); background: var(--card); font-weight: 600; }
.aud-target { font-size: 13px; }
.othbtn { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); background: var(--card); white-space: nowrap; }
.othbtn.on { background: var(--ink); color: var(--bg); }
input[type=date], input[type=time], input[type=datetime-local] { min-height: 44px; cursor: pointer; }
.kakao-out { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 50; background: #fee500; color: #191919; padding: 8px 10px 8px 14px; border-radius: 12px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.kakao-out[hidden] { display: none; }
.kakao-out .small { flex: 1; }
.ko-x { border: 0; background: none; font-size: 18px; padding: 4px 6px; color: #191919; }
.kakao-out .btn { background: #191919; color: #fee500; white-space: nowrap; }
.kakao-out .link { color: #191919; }
.fest { font-weight: 700; color: var(--ink); white-space: nowrap; } .fest.up { color: #1a8a4a; } .fest.down { color: #c0392b; }

/* 투표: 의견 입력 */
.opbox { margin-top: 10px; }
.opbox textarea { width: 100%; }
.vop { font-size: 13px; color: var(--ink); background: var(--bg); border-radius: 8px;
  padding: 6px 10px; margin: 4px 0 2px; white-space: pre-wrap; }

/* 발송 내역: 채널 구분 */
.chb { font-size: 12px; padding: 1px 8px; border-radius: 6px; white-space: nowrap; font-weight: 600; }
.chb-kakao { background: #fee500; color: #191919; }
.chb-email { background: #dde8f7; color: #1f4f8f; }
.chtab { margin-left: 10px; color: var(--muted); text-decoration: none; }
.chtab.on { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--accent); }

/* 활동 기록 */
.logfilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.logfilter select { width: auto; }
.loglist { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 8px; }
.logrow { display: grid; grid-template-columns: 92px 70px 66px 1fr auto; gap: 8px; align-items: start;
  padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.logrow.fail { background: rgba(200, 60, 50, .07); }
.logrow.fail .la b { color: #b3342b; }
.logrow .lt { color: var(--muted); font-size: 13px; }
.logrow .ld { white-space: pre-wrap; word-break: break-word; }
.lcat { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--line); white-space: nowrap; }
.lcat.c-login { background: #e3ecf8; color: #1f4f8f; } .lcat.c-event { background: #e6f2e9; color: #23683f; }
.lcat.c-poll { background: #f3ecd9; color: #7a5d17; } .lcat.c-deal { background: #efe5f5; color: #6a3f87; }
.lcat.c-member { background: #f5e3de; color: #8f3e27; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; }
@media (max-width: 640px) {
  .logrow { grid-template-columns: 1fr auto; }
  .logrow .lt { grid-column: 1; } .logrow .lc { grid-column: 2; justify-self: end; }
  .logrow .lw { grid-column: 1 / -1; } .logrow .la { grid-column: 1 / -1; } .logrow .ldev { grid-column: 1 / -1; }
}


/* 단톡방에서 가져온 자료 */
.warn-tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #fbefd9; color: #9a5b00; white-space: nowrap; }
.warn-note { background: #fbefd9; color: #7a4800; padding: 8px 12px; border-radius: 8px; }
.op-who { font-weight: 600; min-width: 4.5em; }
.inline-upload { display: inline; }
.inline-upload label { cursor: pointer; color: var(--accent, #2c4f8f); }

/* 딜 화면 자료 필터·펼침 */
.docs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.docs-head h2 { margin: 0; }
.doc-filter, .doc-sort { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-sort { margin-left: auto; }
.doc-sort .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg, #fff); }
.doc-sort .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-filter .chip, .doc-sort .chip { font: inherit; font-size: 13px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.doc-filter .chip .n { color: #888; font-size: 12px; margin-left: 2px; }
.doc-filter .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.doc-filter .chip[aria-pressed="true"] .n { color: rgba(255,255,255,.75); }
.doc-toggle { font: inherit; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
.doc-toggle:hover { text-decoration: underline; }
.doc-toggle[aria-expanded="true"] { font-weight: 600; }
.doc-toggle:focus-visible, .doc-filter .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-body { padding: 4px 12px 12px; border-left: 3px solid var(--line); margin: 0 0 8px 12px; }
.doc-body .memo-body { margin-top: 4px; }
.doc-list .list-item .grow { min-width: 0; overflow-wrap: anywhere; }
.doc-list .inline-upload label { white-space: nowrap; }
.cal-grid { touch-action: pan-y; }

/* 일정 화면: 제목 오른쪽 끝 「구글 캘린더에 추가」 */
.ev-titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ev-titlerow h1 { min-width: 0; overflow-wrap: anywhere; }
.gcal-btn { flex: none; white-space: nowrap; font-size: 13px; padding: 7px 10px; margin-top: 2px; }
.calpick { position: relative; flex: none; }
.calpick > summary { list-style: none; cursor: pointer; }
.calpick > summary::-webkit-details-marker { display: none; }
.calmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(290px, 86vw); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; display: grid; gap: 2px; }
.calmenu a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 15px; }
.calmenu a small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.calmenu a:hover, .calmenu a:active { background: var(--bg); }
.calmenu a.best { font-weight: 700; }

/* 마감된 투표 정렬·필터 */
.pfilter { display: grid; gap: 8px; margin-bottom: 10px; }
.pf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pf-row > .small { min-width: 30px; }
.pf-row select { padding: 5px 8px; font-size: 13px; width: auto; }
.chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; }
.chip.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.tag.ok { background: var(--ok); color: #fff; }
.closed-item[hidden] { display: none; }

/* 달력 투표 막대: 제목을 구간 폭 전체에 가운데 정렬로 겹쳐 표시 */
.ci.poll { position: relative; overflow: visible; }
.ci.poll .pl { position: absolute; left: 0; top: 0; z-index: 2; box-sizing: border-box; padding: 0 4px;
  width: calc(var(--n) * 100% + var(--n) * 3px); text-align: center; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci.gap { background: transparent; visibility: hidden; }

/* 관리 → 에이전트 검토 */
.agtabs { display: flex; gap: 6px; margin: 10px 0 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.agtabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.agtabs a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--gold); }
.agsum { display: grid; gap: 10px; margin-bottom: 12px; }
.agsum .chip { text-decoration: none; }
.aggroup { margin: 18px 0; }
.aggroup-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 2px solid var(--gold); margin-bottom: 8px; }
.aggroup-h b { font-size: 16px; }
.agall { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.apc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.apc.has-dup { border-color: var(--warn); background: linear-gradient(0deg, rgba(217,130,43,.05), rgba(217,130,43,.05)), var(--card); }
.apc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.apc-sel input { width: 20px; height: 20px; }
.apc-kind { width: auto; font-weight: 700; padding: 4px 8px; }
.apc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 8px; }
.apc-fields label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.apc-fields .w2 { grid-column: 1 / -1; }
.apc-fields [hidden] { display: none !important; }
.apc-sim { list-style: none; margin: 8px 0 0; padding: 8px 10px; background: rgba(217,130,43,.1); border-radius: 8px; font-size: 13px; display: grid; gap: 3px; }
.apc-sim li.info { color: var(--muted); }
.apc-src { margin-top: 6px; } .apc-src div { white-space: pre-line; background: var(--bg); border-radius: 8px; padding: 8px; margin-top: 4px; }
.apc-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.tag.warnt { background: var(--warn); color: #fff; }
.agbar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 12px;
  box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
.roomrow.off { opacity: .6; }
.roombtns { display: flex; gap: 6px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .apc-fields { grid-template-columns: 1fr; } }
.apc-sim li { display: block; }
.apc-sum { margin: 6px 0 2px 28px; line-height: 1.5; }
.apc-quote { white-space: pre-line; border-left: 3px solid var(--gold); padding-left: 10px; }
.apc-edit { margin: 6px 0 0 28px; } .apc-edit > summary { cursor: pointer; color: var(--muted); }
.apc-edit[open] > summary { margin-bottom: 4px; }
.apc-sim, .apc-src { margin-left: 28px; }
.tag.ak-deal { background: #e3f1e7; color: #2b6b42; } .tag.ak-event { background: #dfe9f7; color: #24508f; }
.tag.ak-doc { background: #f6e7d3; color: #8a5317; } .tag.ak-opinion { background: #ece6f5; color: #5a3f8c; }
.apc-kl { font-weight: 700; }
.act-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.act-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.act-detail { margin: 10px 0 16px; overflow-x: auto; }
.act-detail h2 { font-size: 16px; margin: 0 0 8px; }
.act-tbl td { vertical-align: top; }
.dchip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 12px; background: var(--line); font-size: 13px; color: inherit; text-decoration: none; white-space: nowrap; }
.dchip small { opacity: .65; }
.pend-act { margin-bottom: 10px; align-items: center; gap: 8px; }

/* 파일 올리기 진행 표시 (base.html) */
.upl-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.35); }
.upl-overlay[hidden] { display: none; }
.upl-card { width: min(360px, 100%); background: var(--card); color: var(--ink); border-radius: 12px; padding: 18px 18px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.upl-title { font-weight: 600; margin-bottom: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.upl-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s; }
.upl-bar.wait span { background: linear-gradient(90deg, var(--accent) 0 40%, transparent 40% 100%); background-size: 250% 100%; animation: upl-wait 1.1s linear infinite; }
@keyframes upl-wait { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.upl-msg { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* IR자료 요약 (IR 자료 바로 아래) */
.sum-row { padding: 2px 16px 10px 34px; border-top: 0; }
.sum-row .sum-arrow { color: var(--muted, #888); }
.sum-row .doc-toggle { font-weight: 600; }
.summ-opt[hidden], [data-ir-only][hidden] { display: none !important; }
.apc-summ { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
/* 투자 내역 추가: 두 칸씩, 메모는 한 줄 전체 */
.inv-form .inv-memo { grid-column: 1 / -1; }
.inv-form .inv-memo textarea { width: 100%; }
.inv-form label > select + input { margin-top: 6px; }

/* 에이전트 처리 내역: 등록 / 무시 */
.tag.skip-tag { background: #eceae5; color: #6b6b6b; }
.tag.ok-tag { background: #e3f1e6; color: #2f7a43; }
.agnow { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 14px; }
.agnow-f { display: flex; gap: 8px; align-items: center; }
.agnow-f select { width: auto; }
/* 종합소득세 공제 계산 */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tax-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 12px 0; }
.tax-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.tax-form input { width: 12em; }
.tbl td.r, .tbl th.r { text-align: right; white-space: nowrap; }
.tax-fund { margin-bottom: 10px; }
.tax-fund .tbl { margin-top: 8px; }
.tbl tr.muted td { color: var(--muted); }
.tax-warn { background: #fff3cd; border: 1px solid #f0c36d; color: #7a4b00; font-weight: 700; border-radius: 10px; padding: 10px 14px; margin: 6px 0 12px; }
.tax-none { padding: 10px 14px; }
.apc-alt { margin: 8px 0 0 28px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.apc-alt .btn.on { background: var(--ok, #2e7d4f); color: #fff; border-color: transparent; }
.apc-alt-note { flex-basis: 100%; }

/* 원본 파일 미등록 자료 「지금 받기」 */
.fetch-link { color: var(--ink); text-decoration: none; text-align: left; }
.fetch-link::after { content: " ⬇︎"; color: var(--muted); font-size: 12px; }
.fetch-dlg h3 { margin: 0 0 12px; font-size: 16px; word-break: break-all; }
.fetch-dlg .fetch-msg { margin: 12px 0 4px; color: var(--muted); min-height: 1em; }
.fetch-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 16px; }
.fetch-steps li { color: var(--muted); opacity: .55; }
.fetch-steps li.on, .fetch-steps li.now, .fetch-steps li.bad { color: var(--ink); opacity: 1; }
.fetch-steps li.now .fs-txt { font-weight: 600; }
.fetch-steps .fs-ico { display: inline-block; width: 1.6em; }
.fetch-steps .fs-note { color: var(--muted); font-size: 13px; }

/* 멤버 관리 (2026-10-18) */
.mgr-actions { justify-content: flex-start; margin: 4px 0 8px; }
.mrow-link.inactive, .del-item.inactive { opacity: .6; }
.mrow-link .tag, .del-item .tag { margin-left: 4px; }
.del-item { cursor: pointer; gap: 10px; }
.del-item input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.del-confirm { position: sticky; bottom: 0; margin-top: 12px; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; }
/* 출자 관리: 이름을 누르면 그 사람 입력 칸 */
.ctbl .cname { color: var(--ink); font-weight: 600; text-decoration: none; text-align: left; white-space: nowrap; }
.ctbl .cname::after { content: " ✏️"; font-size: 11px; }
.ctbl tr.cedit > td { background: var(--card); padding: 12px; }
.ctbl tr.open > td { background: var(--line); }
.cedit-grid { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.cedit-grid label { display: flex; flex-direction: column; font-size: 13px; width: 110px; }
.cedit-grid input { width: 100%; }
.ctbl tr.cedit > td > form { position: sticky; left: 0; max-width: calc(100vw - 48px); }
.cedit-grid label { width: 96px; }
.steps-list { padding-left: 20px; margin: 8px 0 12px; } .steps-list li { margin: 6px 0; }

/* 권한 관리: 멤버별 권한 표 (2026-10-18) */
.ptbl th, .ptbl td { padding: 6px 4px; text-align: center; }
.ptbl .pname { position: sticky; left: 0; background: var(--bg); z-index: 1; text-align: left; padding-left: 8px; white-space: nowrap; min-width: 64px; }
.ptbl .pchanged { display: block; font-size: 11px; }
.ptbl .pchanged[hidden] { display: none; }
.ptbl thead .pname { z-index: 2; }
.ptbl th.pv { vertical-align: bottom; }
.ptbl th.pv span { display: inline-block; width: 48px; word-break: keep-all; line-height: 1.25; font-weight: 500; font-size: 12px; }
.ptbl th.pgroup { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.ptbl .gstart { border-left: 2px solid var(--line); }
.ptbl td.pc { min-width: 26px; }
.ptbl .role-sel { font-size: 13px; padding: 4px; }
.pm { font-size: 15px; line-height: 1; }
.pm.role { color: var(--accent); }
.pm.indiv { color: #c07a12; }
.pm.admin { color: var(--muted); }
.pm.none { color: var(--muted); opacity: .5; }
.perm-legend .pm { margin-left: 8px; }
.pm-ir { display: inline-flex; gap: 3px; align-items: center; cursor: pointer; }
.pm-ir input { width: 15px; height: 15px; margin: 0; }
.pchanged { color: #c07a12; font-weight: 500; }
.ptbl tbody tr:hover td { background: var(--card); }
.ptabs { display: flex; gap: 6px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.ptab { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ptab.on { color: var(--ink); border-bottom-color: var(--accent); }
.pmatrix tr.pgrow th { text-align: left; background: var(--line); font-size: 13px; padding: 6px 10px; }
.pmatrix tr.pcount-row td { border-top: 2px solid var(--line); text-align: center; }
.pmatrix tr.pcount-row td:first-child { text-align: left; }
.nb-inline .pf-label { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.t-bg-undecided { background: #eceef1; color: #6b7280; }
.my-op { background: var(--bg); border-radius: 8px; padding: 6px 10px; margin: 4px 0 10px; white-space: pre-line; }

/* 큰 글자(휴대폰 글자 크기 150% 등)에서 한글 낱말 중간에서 줄이 바뀌지 않게 — 띄어쓰기에서만 줄바꿈 */
.choice span, .ps-title { word-break: keep-all; overflow-wrap: break-word; }
.kw { white-space: nowrap; }   /* 이 묶음은 한 줄로 */
/* 좁은 화면·큰 글자: 목록의 제목 칸(.grow)이 최소 폭을 지키고, 남는 칸(크기·날짜·받기·삭제 등)은 다음 줄로 (10/24) */
@media (max-width: 600px) {
  .list-item .grow { flex: 1 1 9em; min-width: 9em; word-break: keep-all; overflow-wrap: break-word; }
}
/* 지문 로그인 (10/27) */
.pk-box { margin: 4px 0 18px; }
.pk-btn { font-size: 17px; padding: 14px; }
.pk-note.bad { color: #c0392b; }
#pk-msg.bad { color: #c0392b; }
/* 운영진 멤버별 투표 수정 (2026-10-30) */
#ballot-edit .bedit { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
#ballot-edit .bedit.be-changed { background: #fff8e6; }
#ballot-edit .be-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
#ballot-edit .be-name { min-width: 5em; }
#ballot-edit select { width: auto; padding: 4px 6px; }
#ballot-edit textarea { min-height: 36px; }
#ballot-edit .be-save { position: sticky; bottom: 0; background: var(--card); padding: 8px 0; }
@media (prefers-color-scheme: dark) { #ballot-edit .bedit.be-changed { background: rgba(212,169,90,.15); } }

/* 멤버 활동 내역: 로그인한 사람 강조 (11/02) */
.dchip.me { background: var(--gold); color: #fff; font-weight: 700; }
tr.me-row > td { background: rgba(217, 181, 106, .16); }
tr.me-row > td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.act-me-note { margin: 4px 0 8px; }
