/* ===== 부천북고앱 앱 스타일 — 편집·캠퍼스 (Option C) · 느티나무 세이지 초록 =====
   색을 바꾸실 때는 아래 --brand 네 줄만 고치면 앱 전체가 바뀝니다.
   빨강은 「지우기·실패」 같은 경고에만 씁니다.
   기본은 따뜻한 종이 배경 · 얇은 테두리 · 떠 있는 알약 탭 — 어두운 OLED/네온 아님. */
:root {
  --brand: #3A6B52; --brand-dark: #2C5440; --brand-soft: #E8EEE9; --brand-ink: #2A5740;
  --red: #C9302C; --red-soft: #FBE9E8; --red-ink: #B02623;
  --amber: #9A6A12; --amber-soft: #FFF4DE; --blue: #3D5F9A; --blue-soft: #E8EEF6;
  --bg: #F7F5F2; --card: #FFFEFC; --card-2: #F0EEE9; --line: #E4E0D9;
  --ink: #1C1B19; --ink-soft: #5C5954; --ink-faint: #8A8680;
  --radius: 20px; --radius-sm: 14px;
  --shadow: 0 1px 0 rgba(28,27,25,.04);
  --tab-h: 56px; --tab-inset: 14px; --tab-bottom: 10px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --dock-bg: rgba(255, 254, 252, 0.78);
  --dock-shadow: 0 2px 16px rgba(28,27,25,.06), 0 1px 0 rgba(255,255,255,.55) inset;
}
/* buk5.1: 늘 밝은 화면 — 폰이 어두운 모드여도 따르지 않습니다 */
:root { color-scheme: light only; }
html { color-scheme: light only; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 브라우저가 알아서 하는 「당겨서 새로고침」은 끕니다 — 적던 게 날아갈 수 있어서. 앱이 만든 것(더 길게 당김)을 씁니다 */
html, body { overscroll-behavior-y: contain; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
html, body, button, input, select, textarea {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'tnum';
}
body { letter-spacing: -.012em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { font-size: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--brand-ink); }
h2, h3 { letter-spacing: -.032em; }
.sec-title b, .intro-hero h2 { letter-spacing: -.038em; }

/* ---- 불러오는 중 ---- */
#boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); z-index: 50; }
#boot img { width: 84px; height: 84px; border-radius: 20px; }
#boot .msg { color: var(--ink-soft); font-size: 14px; text-align: center; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 로그인 ---- */
#login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; text-align: center; }
#login > img { width: 124px; height: 124px; border-radius: 28px; box-shadow: var(--shadow); }
#login .sub { color: var(--ink-soft); margin: 16px 0 6px; font-size: 15.5px; font-weight: 600; }
#login .note { margin-top: 18px; color: var(--ink-faint); font-size: 13px; }
.loginbox { width: 100%; max-width: 340px; margin: 16px auto 0; text-align: left; }
.loginbox .field { margin-top: 10px; }
.loginbox input { font-size: 16px; }   /* 폰에서 저절로 확대되는 것 막기 */
.pwrow { position: relative; }
.pwrow input { padding-right: 44px; }
.pweye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 17px; padding: 6px 8px; opacity: .55; }
.pweye.on { opacity: 1; }
.lg_msg { color: var(--red-ink); font-size: 13.5px; margin-top: 8px; min-height: 18px; text-align: center; }
.lg_or { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 340px; margin: 20px auto 14px; color: var(--ink-faint); font-size: 12.5px; }
.lg_or::before, .lg_or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-google { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 20px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); }
.btn-google img { width: 20px; height: 20px; }

/* ---- 앱 껍데기 ---- */
#app { display: none; min-height: 100dvh; padding-bottom: calc(var(--tab-h) + var(--safe-b) + var(--tab-bottom) + 18px); }
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--ink);
  -webkit-backdrop-filter: saturate(1.15) blur(16px); backdrop-filter: saturate(1.15) blur(16px);
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
header.top .brand { border: 0; background: transparent; padding: 0; margin: 0; display: flex; align-items: center; appearance: none; -webkit-appearance: none; }
header.top .brand img { height: 30px; width: auto; display: block; }
header.top .brand:focus { outline: 0; }
header.top .brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 8px; }
header.top .brand:active { opacity: .55; }
header.top .who { font-size: 13px; background: var(--card); color: var(--ink-soft); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
header.top .who.on { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); }
header.top .topnav { display: none; flex: 1; margin: 0 18px; gap: 2px; overflow-x: auto; }
header.top .topnav button { border: 0; background: transparent; color: var(--ink-soft); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 9px; white-space: nowrap; position: relative; }
header.top .topnav button:hover { background: var(--card-2); }
header.top .topnav button.on { background: var(--brand-soft); color: var(--brand-ink); }
.badge { background: var(--red); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; display: flex; align-items: center; justify-content: center; font-weight: 800; }
header.top .topnav button .badge { position: absolute; top: 0; right: 0; }
main { padding: 16px 16px 0; max-width: 720px; margin: 0 auto; }

/* ---- 아래 탭 — 떠 있는 알약 독 (Apple Music식) ---- */
nav.tabs {
  position: fixed; left: var(--tab-inset); right: var(--tab-inset);
  bottom: calc(var(--tab-bottom) + var(--safe-b)); z-index: 20;
  background: var(--dock-bg);
  -webkit-backdrop-filter: saturate(1.2) blur(22px); backdrop-filter: saturate(1.2) blur(22px);
  border: 1px solid var(--line); border-radius: 28px;
  display: flex; align-items: stretch; gap: 0;
  padding: 3px 4px; box-shadow: var(--dock-shadow);
}
nav.tabs button {
  flex: 1; height: var(--tab-h); border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--ink-faint); font-size: 11.5px; font-weight: 700;
  position: relative; border-radius: 22px; letter-spacing: -.01em;
}
nav.tabs button .ico { line-height: 0; color: var(--ink-faint); }
nav.tabs button.on { color: var(--brand-ink); background: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
nav.tabs button.on .ico { color: var(--brand); }
nav.tabs button .badge { position: absolute; top: 4px; left: calc(50% + 10px); }
.ic { width: 24px; height: 24px; display: block; }

@media (min-width: 900px) {
  header.top .topnav { display: flex; }
  nav.tabs { display: none; }
  #app { padding-bottom: 28px; }
  main { max-width: 1040px; padding: 22px 24px 0; }
  #toast { bottom: 28px !important; }
  .sheet { left: 50%; right: auto; width: min(720px, 94vw); transform: translate(-50%, 100%); }
  .sheet.on { transform: translate(-50%, 0); }
}

/* ---- 공통 ---- */
.view { display: none; } .view.on { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row > h3, .row > .t, .row > b { min-width: 0; }
.muted { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.faint { color: var(--ink-faint); font-size: 13px; }
.red-ink, .late { color: var(--red-ink); }
.empty { text-align: center; color: var(--ink-faint); padding: 34px 0; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; }
.sec-title b { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.pill { display: inline-block; white-space: nowrap; flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--card-2); color: var(--ink-soft); vertical-align: 1px; }
.pill.green { background: var(--brand-soft); color: var(--brand-ink); }
.pill.red { background: var(--red-soft); color: var(--red-ink); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.gray { background: var(--card-2); color: var(--ink-faint); }

/* ---- 버튼 ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:active { background: var(--brand-dark); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 13.5px; border-radius: 10px; }
.btn.danger { color: var(--red-ink); }
.btn.block { display: flex; width: 100%; padding: 15px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { white-space: nowrap; }
.btn-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

/* ---- 입력 ---- */
.field, label.field { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 700; margin: 12px 0 5px; }
input[type=text], input[type=tel], input[type=password], input[type=email], input[type=number], input[type=date], input[type=month], input[type=search], select, textarea {
  width: 100%; background: var(--card-2); border: 1px solid transparent; border-radius: 12px; padding: 11px 12px; font-size: 16px; outline: none; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); background: var(--card); }
input[readonly] { color: var(--ink-soft); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 10px 0; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.chip.clickable { cursor: pointer; } .chip.clickable:active { background: var(--card-2); }
.seg { display: flex; background: var(--card-2); border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 4px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* 공개 범위 고르기 줄 — 칸 이름은 한 줄로, 고르는 칸은 나머지 폭 */
#ec_share .row > span { white-space: nowrap; }
#ec_share .row > select { width: auto; flex: 1 1 auto; min-width: 0; max-width: 64%; }

/* ---- 목록 한 줄 ---- */
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.item .t { font-weight: 700; font-size: 16px; letter-spacing: -.022em; }
.item .m { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.item .d { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.item.clickable { cursor: pointer; }
.item.clickable:active { background: var(--card-2); }
.item.cface { display: flex; gap: 12px; align-items: center; }   /* 명부 — 얼굴(이니셜) + 글 */
.face { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; background: var(--card-2); }
.face.ph { color: #fff; font-weight: 800; letter-spacing: -.5px; }
.face img { width: 100%; height: 100%; object-fit: cover; }

/* ---- ㄱ ㄴ ㄷ 첫소리 줄 — 수천 명일 때 자음 하나씩 끊어 봅니다 ---- */
.chorow { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chorow::-webkit-scrollbar { display: none; }
.chobtn { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 42px; border: 0; background: var(--card-2); color: var(--ink-soft);
  border-radius: 11px; padding: 7px 8px 5px; font-size: 15px; font-weight: 700; line-height: 1.1; }
.chobtn i { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--ink-faint); }
.chobtn.on { background: var(--brand); color: #fff; }
.chobtn.on i { color: #fff; opacity: .8; }
.chobtn:disabled { opacity: .32; }
.chobtn:first-child { min-width: 52px; }

/* ---- 조직도 ---- */
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.ocard .oh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ocard .oh b { font-size: 16px; color: var(--brand-ink); }
.ocard .oact { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.ocard .ocount { font-size: 12.5px; font-weight: 600; }
.seat { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); min-height: 48px; }
.seat.clickable { cursor: pointer; } .seat.clickable:active { background: var(--card-2); }
.seat .st { flex: 0 0 88px; font-weight: 700; font-size: 14.5px; color: var(--ink-soft); }
.seat .sp { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.seat .sp b { font-size: 15.5px; }
.seat .sp.empty { color: var(--ink-faint); font-size: 14px; }

/* ---- 조직도 나무 (KNK식) ---- */
:root { --otree-line: #9AA0A6; }
.otree { margin-bottom: 8px; overflow-x: clip; }
.otree-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.otree-bar-title { font-weight: 800; font-size: 15.5px; }

/* 기수·모임: 카드 나무 (필요 시만 가로). 스크롤바는 숨김 */
.otree-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 4px 16px 10px;
  scrollbar-width: none;
}
.otree-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.otree-scroll .otree-inner {
  grid-column: 2;
  width: max-content;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px 8px;
}

/* 총동문회 MAIN: KNK식 나무 — 뿌리 + 연결선 + 가로 랩 카드 */
.otree-main { overflow: visible; width: 100%; }
.otree-knk {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  padding: 16px 0 8px;
  overflow: visible;
}
.otree-knk-rootwrap {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 0;
  overflow: visible;
}
.otree-knk-tier {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 12px 14px;
  width: 100%;
  position: relative;
  padding-top: 18px;
  box-sizing: border-box;
}
/* 가로 바 (첫 줄 자식 카드 위) */
.otree-knk-tier::before {
  content: '';
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 2px;
  background: var(--otree-line);
  pointer-events: none;
}
.otree-knk-col {
  position: relative;
  flex: 1 1 180px;
  max-width: 280px;
  min-width: min(170px, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}
.otree-knk-col.wide {
  flex: 1 1 260px;
  max-width: 420px;
}
/* 회장 직속 사무국 — 뿌리 바로 아래 단독 단 */
.otree-knk-tier.otree-office-direct-tier {
  justify-content: center;
}
.otree-knk-tier.otree-office-direct-tier .otree-knk-col {
  flex: 0 1 300px;
  max-width: 340px;
}
.otree-main .otree-card.otree-office-direct {
  border: 2px solid var(--red);
}
.otree-main .otree-card.otree-office-direct .oh b::after {
  content: ' · 회장 직속';
  font-weight: 600;
  font-size: 12px;
  color: var(--red-ink);
  letter-spacing: -.02em;
}
.otree-knk-col::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  width: 2px;
  height: 18px;
  background: var(--otree-line);
  transform: translateX(-50%);
  pointer-events: none;
}
.otree-main .otree-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
}
.otree-main .otree-card .oh {
  margin: 0;
  padding: 10px 12px 8px;
  background: var(--card-2);
  border-bottom: 1px solid var(--line);
}
.otree-main .otree-card .oh b { font-size: 14.5px; }
.otree-main .otree-seats { padding: 2px 10px 8px; }
.otree-main .otree-seats .seat {
  min-height: 0;
  padding: 7px 2px;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.otree-main .otree-seats .seat .st {
  flex: 0 0 auto;
  min-width: 52px;
  max-width: 40%;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.otree-main .otree-seats .seat .sp {
  flex: 1 1 auto;
  gap: 6px 10px;
  align-items: baseline;
}
.otree-main .otree-seats .seat .sp b { font-size: 14.5px; font-weight: 700; }
.otree-main .otree-seats .seat .sp.empty {
  color: var(--ink-faint);
  font-size: 13px;
  background: var(--card-2);
  border-radius: 8px;
  padding: 4px 8px;
}
.otree-main a.otel {
  color: var(--blue);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}
.otree-main a.otel:hover { text-decoration: underline; }

.otree-knk-class {
  width: 100%;
  box-sizing: border-box;
}
.otree-knk-class-label {
  text-align: center;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 2px 0 10px;
  letter-spacing: -.02em;
}
.otree-knk-classgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.otree-knk-sparse {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.otree-main .otree-card.otree-class {
  padding: 0;
}
.otree-main .otree-card.otree-class .oh { padding: 8px 10px 6px; }
.otree-main .otree-card.otree-class .oh b { font-size: 13.5px; }
.otree-main .otree-card.otree-class .otree-seats { padding: 2px 8px 6px; }
.otree-main .otree-card.otree-class .seat {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 5px 0;
}
.otree-main .otree-card.otree-class .seat .st { flex: none; font-size: 12px; max-width: none; }
.otree-main .otree-stem {
  height: 16px;
  margin: 2px auto;
}

/* 데스크톱: 조직도가 main 폭을 더 쓰도록 */
@media (min-width: 900px) {
  main:has(.otree-main) { max-width: 1280px; }
  .otree-knk-col { flex: 1 1 200px; max-width: 300px; }
  .otree-knk-col.wide { flex: 1 1 300px; max-width: 460px; }
  .otree-knk-classgrid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
@media (max-width: 700px) {
  .otree-knk-tier::before { left: 10%; right: 10%; }
  .otree-knk-col { flex: 1 1 146px; max-width: none; min-width: min(146px, calc(50% - 8px)); }
  .otree-knk-col.wide { flex: 1 1 100%; max-width: 100%; }
  .otree-knk-classgrid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
}

.otree-stem { width: 2px; height: 18px; background: var(--otree-line); flex: 0 0 auto; align-self: center; }
.otree-row { display: flex; gap: 14px; align-items: flex-start; justify-content: center; position: relative; padding-top: 16px; width: max-content; }
.otree-row-one { padding-top: 0; }
.otree-row-one::before, .otree-row-one > .otree-col::before, .otree-row-one > .otree-col::after { display: none !important; }
.otree-row::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 0; }
.otree-col { display: flex; flex-direction: column; align-items: center; position: relative; padding-top: 0; min-width: 0; }
.otree-col::before { content: ''; position: absolute; top: -16px; left: 50%; width: 2px; height: 16px; background: var(--otree-line); transform: translateX(-50%); }
.otree-col::after { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 2px; background: var(--otree-line); }
.otree-col:first-child::after { left: 50%; }
.otree-col:last-child::after { right: 50%; }
.otree-col:only-child::after { display: none; }
.otree-card { width: 240px; max-width: 78vw; padding: 10px 12px; flex: 0 0 auto; }
.otree-card.otree-wide { width: auto; min-width: 240px; max-width: min(920px, 92vw); }
.otree-card.otree-side { width: 200px; }
.otree-card.otree-class { width: 120px; padding: 8px 10px; }
.otree-card.otree-class .seat { flex-direction: column; align-items: flex-start; gap: 4px; min-height: 0; padding: 6px 0; }
.otree-card.otree-class .seat .st { flex: none; font-size: 12.5px; }
.otree-seats-row { display: flex; flex-wrap: wrap; gap: 0 12px; }
.otree-seats-row .seat { flex: 1 1 200px; min-width: 160px; }
.otree-top { display: flex; align-items: flex-start; justify-content: center; gap: 16px; margin-bottom: 4px; width: max-content; }
.otree-flank { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: center; max-width: 440px; }
.otree-center { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.otree-root { background: var(--card); border: 2px solid var(--red); border-radius: var(--radius-sm); padding: 12px 16px; min-width: 168px; max-width: 280px; text-align: center; box-shadow: var(--shadow); }
.otree-root.seat { display: block; border-top: 2px solid var(--red); min-height: 0; align-items: stretch; gap: 0; flex-direction: column; }
.otree-root-acts { margin-top: 8px; }
.otree-root-acts .oact { margin-left: 0; justify-content: center; }
.otree-root.clickable { cursor: pointer; }
.otree-root.clickable:active { background: var(--card-2); }
.otree-root-title { color: var(--red-ink); font-weight: 800; font-size: 14px; margin-bottom: 6px; letter-spacing: -.02em; }
.otree-root-name { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: left; }
.otree-root-name b { font-size: 16px; }
.otree-root-empty { color: var(--ink-faint); font-size: 14px; padding: 4px 0; }
.otree-root a.otel { color: var(--blue); font-size: 13.5px; font-variant-numeric: tabular-nums; text-decoration: none; display: inline-block; margin-top: 4px; }
.otree-root a.otel:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .otree-top { flex-direction: column; align-items: center; }
  .otree-flank { max-width: none; justify-content: center; }
}
@media (min-width: 900px) {
  .otree-scroll { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
}

/* ---- 직책 이력 · 목록 한 줄(작은) ---- */
.hrow { padding: 8px 2px; border-top: 1px solid var(--line); font-size: 14.5px; }
.hrow:first-child { border-top: 0; }
.hrow b { font-variant-numeric: tabular-nums; margin-right: 4px; }
.hrow.clickable { cursor: pointer; } .hrow.clickable:active { background: var(--card-2); }
.hrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hrow-main { flex: 1; min-width: 0; }
.hrow-acts { display: flex; flex-shrink: 0; gap: 4px; margin-top: 2px; }
.hrow-acts .btn { padding: 4px 8px; font-size: 12.5px; }

/* ---- 회원 관리 — 명부 카드 후보 ---- */
.cand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-top: 6px; background: var(--card-2); border-radius: 10px; font-size: 14px; flex-wrap: wrap; }

/* ---- 안내 띠 ---- */
.banner { background: var(--amber-soft); color: var(--amber); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.banner.red { background: var(--red-soft); color: var(--red-ink); }
.banner.green { background: var(--brand-soft); color: var(--brand-ink); }
.pmemo { margin-top: 10px; padding: 10px 12px; background: var(--card-2); border-radius: 10px; font-size: 14px; white-space: pre-wrap; }

/* ---- 홈 · 소개 ---- */
.intro-hero { text-align: center; }
.intro-hero h2 { margin: 12px 0 4px; font-size: 22px; font-weight: 800; }
.intro-hero h2.no-photo { margin-top: 2px; }
.intro-photo { width: 100%; max-height: 280px; object-fit: cover; border-radius: 18px; display: block; }

/* ---- 설치 안내 ---- */
.inst-steps { margin: 14px 0; padding-left: 22px; }
.inst-steps li { margin-bottom: 12px; font-size: 15px; line-height: 1.55; }
.inst-steps li b { color: var(--brand-ink); }

/* ---- 더보기 ---- */
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-btn { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 6px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); color: var(--ink); }
.more-btn .ico { color: var(--ink-soft); line-height: 0; }
.more-btn .ic { width: 27px; height: 27px; }
.more-btn .badge { position: absolute; top: 8px; right: 10px; }

/* ---- 알림 한 줄 ---- */
#toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + var(--tab-bottom) + 20px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 20px; font-size: 14px; line-height: 1.45; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; width: max-content; max-width: min(90vw, 480px); text-align: center; }
#toast.show { opacity: 1; }

/* ---- 아래에서 올라오는 창 ---- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: none; }
.sheet-bg.on { display: block; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow: auto; background: var(--bg); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line); padding: 14px 16px calc(24px + var(--safe-b)); z-index: 45; transform: translateY(100%); transition: transform .22s; touch-action: pan-y; box-shadow: 0 -8px 32px rgba(28,27,25,.08); }
.sheet.on { transform: translateY(0); }
/* 창 맨 위 손잡이 — 보이는 막대는 작지만, 잡히는 범위는 창 폭 전체 · 위아래 56px */
.sheet .grab { position: relative; width: 56px; height: 6px; background: var(--line); border-radius: 4px; margin: 2px auto 14px; cursor: grab; touch-action: none; }
.sheet .grab::before { content: ''; position: absolute; left: 50%; top: -22px; width: 100vw; max-width: 900px; height: 56px; transform: translateX(-50%); }

/* ---- 당겨서 새로고침 표시 ---- */
#ptr { position: fixed; left: 50%; top: 0; transform: translate(-50%, -46px); z-index: 30; background: var(--card); color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); white-space: nowrap; pointer-events: none; opacity: 0; }
#ptr.go { color: var(--brand-ink); background: var(--brand-soft); border-color: transparent; }
#ptr.spin { transform: translate(-50%, 14px) !important; opacity: 1 !important; }

a[href^="tel:"] { font-variant-numeric: tabular-nums; }

/* 조직도 인쇄 팁 (화면만) */
.org-print-tip { margin: -4px 0 12px; font-size: 12.5px; }

@media print {
  @page { size: A3 landscape; margin: 8mm; }

  /* 앱 껍데기·편집·알림 숨김 */
  #boot, #login, #gate,
  header.top, nav.tabs, .sheet, .sheet-bg, #toast, #ptr,
  .noprint, .org-print-tip, .oact, .otree-root-acts,
  .seg, .sec-title, .banner,
  #og_tab { display: none !important; }

  html, body {
    background: #ffffff !important;
    color: #16181A !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* 인쇄용 밝은 색 (어두운 화면이어도 벽보용 잉크 절약·가독) */
  body.printing-org {
    --brand: #3A6B52; --brand-dark: #2C5440; --brand-soft: #E8EEE9; --brand-ink: #2A5740;
    --red: #C9302C; --red-soft: #FBE9E8; --red-ink: #B02623;
    --bg: #ffffff; --card: #FFFFFF; --card-2: #F0EEE9; --line: #D8D4CC;
    --ink: #1C1B19; --ink-soft: #44413C; --ink-faint: #6E6A64;
    --otree-line: #8A8680;
    --shadow: none;
  }

  #app { display: block !important; min-height: 0 !important; padding: 0 !important; }
  main { max-width: none !important; padding: 0 !important; margin: 0 !important; width: 100% !important; }
  body.printing-org main:has(.otree-main) { max-width: none !important; }
  .view { display: none !important; padding: 0 !important; }
  .view.on { display: block !important; }
  /* 대상 조직도만 */
  body.printing-org .otree:not(.print-target) { display: none !important; }
  body.printing-org .otree.print-target { display: block !important; margin: 0 auto !important; overflow: visible !important; text-align: center; }
  body.printing-org .otree.print-target .otree-bar { text-align: center; }
  body.printing-org .otree.print-target .otree-scroll {
    display: flex !important; justify-content: center !important; align-items: flex-start !important;
  }
  body.printing-org .otree-bar { margin-bottom: 8px; }
  body.printing-org .otree-bar-title { font-size: 18px; color: #16181A; }

  .card, .item, .ocard, .otree-card, .otree-root {
    box-shadow: none !important;
    break-inside: avoid;
    background: #fff !important;
    border-color: #C8CDC6 !important;
    color: #16181A !important;
  }
  .otree-root { border-color: #C9302C !important; }
  .otree-root-title, .ocard .oh b, .otree-main .otree-card .oh b { color: #2A5740 !important; }
  .faint, .muted, .ocount, .seat .st { color: #55595E !important; }
  a.otel { color: #2457C5 !important; text-decoration: none; }

  /* 가로형 나무 — 폰 break 무시, 넓게 */
  .otree-scroll {
    display: block !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .otree-scroll .otree-inner {
    width: max-content !important;
    max-width: none !important;
  }
  .otree-knk {
    width: 100% !important;
    overflow: visible !important;
    padding: 8px 0 !important;
  }
  .otree-knk-tier {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px 14px !important;
  }
  .otree-knk-col {
    flex: 1 1 170px !important;
    max-width: 260px !important;
    min-width: 150px !important;
  }
  .otree-knk-col.wide {
    flex: 1 1 240px !important;
    max-width: 400px !important;
  }
  .otree-knk-classgrid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
  }
  .otree-top { flex-direction: row !important; }
  .otree-main .otree-card, .otree-card { max-width: none !important; }

  /* 기수 탭 등 부가 UI */
  #og_cls, #og_people, #og_org > .row { display: none !important; }
}

/* ---- 선택 칸 + 칸마다 공개 범위 (가입 · 내 카드) ---- */
.optbox { margin-top: 8px; }
.optrow { padding: 10px 0; border-top: 1px solid var(--line); }
.optrow:first-child { border-top: 0; }
.optrow .row { margin-bottom: 6px; }
.optrow .row > b { font-size: 14.5px; white-space: nowrap; }
.optrow select.lvl { width: auto; flex: 0 1 auto; min-width: 0; max-width: 62%; padding: 7px 10px; font-size: 14px; }
.xbtn { border: 0; background: transparent; color: inherit; font-weight: 800; padding: 0 0 0 4px; font-size: 13px; cursor: pointer; }

/* ---- 일정 달력 ---- */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head .lbl { flex: 1; text-align: center; font-weight: 800; font-size: 17px; }
.cal-head > button:not(.btn) { width: 40px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 18px; color: var(--ink); }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
.calgrid .cw { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-faint); padding: 2px 0 6px; }
.calgrid .cw.sun, .cd.sun .n { color: #C0504D; } .calgrid .cw.sat, .cd.sat .n { color: #4A6FA5; }
.cd { border: 0; background: transparent; border-radius: 10px; min-height: 46px; padding: 4px 0 3px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink); }
.cd.empty { min-height: 0; }
.cd .n { font-size: 14.5px; font-weight: 600; width: 26px; height: 26px; line-height: 26px; border-radius: 50%; text-align: center; }
.cd.today .n { background: var(--brand); color: #fff !important; }
.cd.sel { background: var(--brand-soft); }
.cd .dots { display: flex; gap: 2px; height: 6px; }
.cd .dots b { width: 6px; height: 6px; border-radius: 50%; display: block; }
.item.ev { display: flex; gap: 12px; align-items: center; }
.evdate { flex: 0 0 44px; text-align: center; border-left: 4px solid var(--brand); padding-left: 6px; }
.evdate b { display: block; font-size: 20px; line-height: 1.1; }
.evdate span { font-size: 12px; color: var(--ink-faint); }

/* ---- 모임 ---- */
.clubcard .t { font-size: 17px; }

/* ===== buk4 — 탭 안 칸 나누기 · 돌아가기 ===== */
#subnav { margin: 0 0 12px; }
#subnav .subseg { margin-bottom: 0; }
#subnav .subseg button { position: relative; }
#subnav .subseg .badge { position: absolute; top: 3px; right: 8px; }
.backlink { border: 0; background: transparent; color: var(--brand-ink); font-weight: 700; font-size: 14.5px; padding: 4px 2px; cursor: pointer; }
header.top .who .badge { cursor: pointer; }

/* ===== buk4 — 이야기 카드 (잡지형) ===== */
.story-chips { margin-bottom: 14px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.story-chips::-webkit-scrollbar { display: none; }
.story-chips .chip { flex: 0 0 auto; }
.sgrid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .sgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .sgrid { grid-template-columns: repeat(3, 1fr); } }
.hm-sgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .hm-sgrid { grid-template-columns: repeat(4, 1fr); } }
.scard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.scard.clickable { cursor: pointer; } .scard.clickable:active { transform: scale(.99); }
.scard-img { aspect-ratio: 16 / 10; background: var(--card-2); overflow: hidden; }
.scard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard-img.none { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand-soft), var(--card-2)); }
.scard-img.none span { color: var(--brand-ink); font-weight: 800; font-size: 15px; letter-spacing: -.02em; opacity: .75; }
.scard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; }
.scard-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.scard-t { font-weight: 800; font-size: 16.5px; letter-spacing: -.03em; line-height: 1.35; }
.scard-x { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }
.hm-sgrid .scard-body { padding: 10px 11px 12px; }
.hm-sgrid .scard-t { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== buk4 — 이야기 한 편 ===== */
.post { max-width: 680px; margin: 0 auto; }
.post-cover img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 14px; }
.post-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.post-t { font-size: 25px; font-weight: 800; letter-spacing: -.045em; line-height: 1.3; margin: 10px 0 6px; }
.post-by { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }
.post-body { white-space: pre-wrap; word-break: break-word; font-size: 16.5px; line-height: 1.8; letter-spacing: -.01em; }
.post-body a, .cmt-b a { word-break: break-all; }
.post-photo { width: 100%; border-radius: var(--radius-sm); display: block; margin: 14px 0 0; }
.post-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.post-acts .liked { color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.bookbox { background: var(--brand-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; margin: 4px 0 16px; font-size: 14.5px; line-height: 1.7; }
.bookbox .bk-t { font-weight: 800; font-size: 16px; color: var(--brand-ink); }
.bookbox .relay { margin-top: 6px; padding-top: 6px; border-top: 1px dashed color-mix(in srgb, var(--brand) 30%, transparent); }
.cmt { padding: 10px 0; border-top: 1px solid var(--line); }
.cmt:first-child { border-top: 0; }
.cmt-b { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; margin-top: 2px; }
.cmt .xbtn { color: var(--ink-faint); font-weight: 600; font-size: 12.5px; }
.cmt-new { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.cmt-new textarea { flex: 1; }
.pe-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-th { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--card-2); }
.pe-th img { width: 100%; height: 100%; object-fit: cover; }
.pe-th button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-weight: 800; line-height: 24px; padding: 0; }
.cta-join { margin-top: 18px; text-align: center; background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }

/* ===== buk4 — 홈 (잡지형) ===== */
.hm-hero { padding: 12px 12px 16px; }
.hm-notice { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 8px 8px 12px; margin: -2px 0 18px; box-shadow: var(--shadow); }
.hm-notice.clickable { cursor: pointer; }
.hm-notice-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 14.5px; }
.hm-sec { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.hm-sec h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.04em; }
.hm-book { display: flex; gap: 14px; align-items: center; }
.hm-book img, .hm-book-ph { width: 78px; height: 104px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.hm-book-t { font-weight: 800; font-size: 16.5px; letter-spacing: -.03em; margin-bottom: 2px; }
.hm-book.clickable { cursor: pointer; }
.hm-more { margin-top: 20px; padding: 6px 16px; }
.hm-more details { border-top: 1px solid var(--line); padding: 10px 0; }
.hm-more details:first-child { border-top: 0; }
.hm-more summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.hm-more-b { white-space: pre-wrap; font-size: 14.5px; line-height: 1.65; margin-top: 8px; }

/* ===== buk4 — 나 ===== */
.me-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow); }
.me-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 14px 16px; text-align: left; color: var(--ink); font-size: 15.5px; font-weight: 700; }
.me-row:first-child { border-top: 0; }
.me-row:active { background: var(--card-2); }
.me-ic { width: 26px; text-align: center; font-size: 18px; }
.me-l { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-l .faint { font-weight: 500; font-size: 12.5px; }
.me-arrow { color: var(--ink-faint); font-size: 18px; }
.me-h { font-weight: 800; font-size: 13px; color: var(--ink-faint); margin: 18px 4px 8px; letter-spacing: .02em; }
.me-due { border-top: 1px solid var(--line); padding: 8px 0; }
.me-due summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; font-size: 14.5px; }

/* ===== buk4 — 홈 재학생 이야기 ===== */
.hm-student { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--card)); }
.hm-student.clickable { cursor: pointer; }
.hm-student img, .hm-student-ph { width: 92px; height: 92px; object-fit: cover; border-radius: 14px; flex: 0 0 auto; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.hm-student-t { font-weight: 800; font-size: 16.5px; letter-spacing: -.03em; line-height: 1.35; margin-bottom: 3px; }
.hm-student-x { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== buk4 — 이야기 A4 쪽 보기 (440×622 설계 크기 · 화면 폭에 맞춰 줄임) ===== */
.post-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.pager-host { margin: 0 -12px; }
.pager-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.pager-track::-webkit-scrollbar { display: none; }
.pager-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; justify-content: center; padding: 8px 0 14px; }
.a4-wrap { position: relative; overflow: hidden; border-radius: 3px; box-shadow: 0 1px 2px rgba(40,35,25,.08), 0 8px 26px rgba(40,35,25,.13); background: #FFFEFC; }
.pager-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 2px 0 4px; }
.pager-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 24px; line-height: 1; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-ind { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-soft); min-width: 56px; text-align: center; font-size: 14.5px; }
.a4-measure { position: absolute; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }

/* 쪽 한 장 — 어두운 화면에서도 종이는 흰색 */
.a4 { width: 440px; height: 622px; box-sizing: border-box; padding: 40px 36px 0; position: relative; overflow: hidden; background: #FFFEFC; color: #1C1B19;
  transform-origin: 0 0; font-size: 13.5px; line-height: 1.72; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; text-align: left; }
.a4 a { color: #2A5740; word-break: break-all; }
.a4-body { height: 530px; overflow: hidden; }
.a4-foot { position: absolute; left: 36px; right: 36px; bottom: 16px; display: flex; justify-content: space-between; font-size: 9.5px; color: #8A8680; letter-spacing: .02em; border-top: 1px solid #ECE8E1; padding-top: 7px; }
.a4 .b-p { margin: 0 0 .55em; }
.a4 .b-p.gap { margin-top: .9em; }
.a4 .b-p.cont, .a4 .b-a.cont { margin-top: 0; }
.a4 .b-photo { margin: .9em 0; text-align: center; }
.a4 .b-photo img { display: inline-block; object-fit: cover; border-radius: 2px; }
.a4 .b-photo figcaption { font-size: 11px; color: #6E6A64; margin-top: 5px; line-height: 1.5; }
.a4 .b-nophoto { background: #F0EEE9; color: #8A8680; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.a4 .b-q { margin: 1.1em 0 .35em; font-weight: 800; color: #2A5740; line-height: 1.55; }
.a4 .b-q b { color: #3A6B52; margin-right: 2px; }
.a4 .b-a { margin: 0 0 .5em; padding-left: 18px; color: #2E2C29; }
.a4 .b-a b { color: #8A8680; font-weight: 800; margin-left: -18px; display: inline-block; width: 18px; }
.a4 .b-quote { margin: 1.2em 4px; padding: 10px 0 10px 16px; border-left: 3px solid #3A6B52; font-size: 18px; line-height: 1.5; font-weight: 700; letter-spacing: -.035em; color: #2A5740; }
.a4 .b-quote cite { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; color: #6E6A64; margin-top: 6px; letter-spacing: 0; }
.a4 .b-end { text-align: center; color: #9DB5A6; font-size: 16px; margin-top: 1em; }
.a4-info { background: #E8EEE9; border-radius: 6px; padding: 10px 13px; margin: 0 0 1.1em; font-size: 12.5px; line-height: 1.65; }
.a4-info span { color: #6E6A64; margin-right: 4px; }
.a4-info .i-t { font-weight: 800; font-size: 14px; color: #2A5740; }
.a4-info .i-relay { margin-top: 5px; padding-top: 5px; border-top: 1px dashed #B8CABE; }
/* 1쪽 표지 */
.a4-cover { padding: 0; }
.a4-cover .c-img { height: 360px; overflow: hidden; background: #F0EEE9; }
.a4-cover .c-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a4-cover .c-img.none { display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #E8EEE9, #F0EEE9 70%); }
.a4-cover .c-img.none span { font-size: 30px; font-weight: 800; color: #3A6B52; opacity: .55; letter-spacing: -.04em; }
.a4-cover .c-txt { padding: 24px 36px 0; }
.a4-cover .c-cat { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #3A6B52; border-bottom: 2px solid #3A6B52; padding-bottom: 2px; }
.a4-cover .c-t { font-size: 26px; line-height: 1.3; font-weight: 800; letter-spacing: -.05em; margin: 12px 0 12px; color: #1C1B19;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.a4-cover .c-by { font-size: 13px; font-weight: 700; color: #44413C; }
.a4-cover .c-date { font-size: 12px; color: #8A8680; margin-top: 2px; }

/* 글쓰기 — 블록 */
.pe-extra { background: var(--card-2); border-radius: var(--radius-sm); padding: 2px 12px 12px; margin-top: 10px; }
.blk { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px 10px; margin-bottom: 8px; background: var(--card); }
.blk-h { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.blk-t { font-size: 12px; font-weight: 800; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }
.blk-h .xbtn { min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font-weight: 700; }
.blk-h .xbtn:disabled { opacity: .35; }
.blk-img { width: 100%; max-height: 180px; object-fit: contain; background: var(--card-2); border-radius: 8px; display: block; }
.blk-qa { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 6px; }
.blk-qa:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.blk-qa .qa-q { color: var(--brand); font-size: 17px; width: 18px; }
.blk-qa .qa-a { color: var(--ink-faint); font-size: 17px; width: 18px; padding-top: 8px; }
.blk-qa .xbtn { border: 0; background: transparent; color: var(--ink-faint); }
.blk-break { text-align: center; color: var(--ink-faint); font-size: 13px; border-top: 2px dashed var(--line); padding-top: 6px; }
.blk-break { margin-top: 2px; }
.blk-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* A4 인쇄 / PDF — 한 장에 한 쪽 (인쇄할 때만 @page A4 세로 · 여백 0 을 붙입니다) */
#printPages { display: none; }
@media print {
  body.printing-story > *:not(#printPages) { display: none !important; }
  body.printing-story #printPages { display: block !important; }
  body.printing-story { background: #fff !important; }
  #printPages .pp { width: 210mm; height: 297mm; overflow: hidden; position: relative; break-after: page; page-break-after: always; background: #FFFEFC; }
  #printPages .pp:last-child { break-after: auto; page-break-after: auto; }
  #printPages .a4 { position: absolute; left: 0; top: 0; }
}

/* ===================== buk5 ===================== */
/* buk6: 오른쪽 위 단추 — 쪽지 = 회색 선 봉투 · 임원 대화방 = 세이지 원 + 말풍선 하나 · 사무국 대화방 = 차분한 벽돌색 원 + 말풍선 둘
   배지(안 읽은 수)는 모두 원의 오른쪽 위, 흰 테두리. PC 는 옆에 작은 글씨(사무국 · 임원 · 쪽지), 폰은 그림만(길게 누르면 이름) */
header.top .hicons { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: 0 0 auto; }
header.top .hbtn { border: 0; background: transparent; padding: 0; margin: 0; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink-soft);
  position: relative; border-radius: 999px; font: inherit; -webkit-touch-callout: none; user-select: none; }
header.top .hbtn[hidden] { display: none !important; }
.hb-ic { position: relative; width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex: 0 0 34px; }
.hb-ic svg { display: block; }
.hb-ic.mail { background: var(--card); border: 1px solid var(--line); color: #6B6862; }
.hb-ic.officer { background: #3A6B52; color: #fff; }
.hb-ic.staff { background: #A64B3C; color: #fff; }
.hb-ic.search { background: var(--card); border: 1px solid var(--line); color: #6B6862; }
.hb-ic .badge { position: absolute; top: -5px; right: -6px; background: var(--brand); color: #fff; border: 2px solid #fff;
  min-width: 18px; height: 18px; border-radius: 9px; font-size: 10px; padding: 0 4px; }
.hb-ic.officer .badge { background: #24503A; }
.hb-l { display: none; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
header.top .hbtn.on .hb-ic { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px color-mix(in srgb, var(--brand) 40%, transparent); }
header.top .hbtn:active .hb-ic { opacity: .75; }
/* buk7 폰 헤더 (≤420px): 로고 · 사무국 · 임원 · 쪽지 (각각 따로) · 동그란 이름 첫 글자 — 반반 말풍선 · 방 고르기 없앰
   찾기 돋보기는 PC 만 (폰은 홈 맨 위 찾기 칸). 이름 칩은 421px 이상에서 그대로 */
header.top .searchbtn { display: none; }
header.top .who-av { display: none; position: relative; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 999px; padding: 0; margin: 0;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); background: var(--brand-soft); color: var(--brand-ink);
  font: inherit; font-weight: 800; font-size: 15px; line-height: 1; align-items: center; justify-content: center; cursor: pointer; -webkit-touch-callout: none; user-select: none; }
header.top .who-av .badge { position: absolute; top: -5px; right: -6px; border: 2px solid #fff; min-width: 18px; height: 18px; border-radius: 9px; font-size: 10px; padding: 0 4px; }
header.top .who-av.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px color-mix(in srgb, var(--brand) 40%, transparent); }
header.top .who-av:active { opacity: .75; }
@media (max-width: 420px) {
  header.top { gap: 8px; }
  header.top .hicons { gap: 8px; }
  header.top .who { display: none; }
  header.top .who-av { display: flex; }
  header.top .brand { flex: 0 1 auto; min-width: 0; }
  header.top .brand img { max-width: 100%; }
}
/* 아주 좁은 폰(<350px) 또는 배지가 「99+」일 때 — 로고를 줄여 단추와 안 부딪치게 */
@media (max-width: 349px) {
  header.top { padding-left: 12px; padding-right: 12px; gap: 6px; }
  header.top .brand img { height: 22px; }
  header.top .hicons { gap: 6px; }
}
@media (max-width: 420px) {
  header.top.tight .brand img { height: 22px; }
  header.top.tight .hicons { gap: 10px; }
}
@media (max-width: 899px) { header.top .who { max-width: 40vw; } }
@media (min-width: 900px) {
  header.top .hicons { margin-left: 0; gap: 2px; }
  header.top .hbtn { padding: 3px 9px 3px 3px; }
  header.top .hbtn:hover { background: var(--card-2); }
  header.top .hbtn.on { background: var(--brand-soft); }
  header.top .hbtn.on .hb-ic { box-shadow: none; }
  .hb-l { display: inline; }
  header.top .searchbtn { display: flex; }
}
.room-pick { display: flex; align-items: center; gap: 12px; width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-top: 8px; cursor: pointer; font: inherit; color: var(--ink); position: relative; }
.room-pick .badge { position: static; background: var(--brand); }
.room-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.room-dot.officer { background: #3A6B52; } .room-dot.staff { background: #A64B3C; }
.chat-title { align-items: baseline; }
.of-date.of-note { font-size: 20px; display: flex; align-items: center; justify-content: center; }
.rsvp-line { color: var(--brand-ink); font-weight: 600; }
.toggle-row b { color: var(--ink); }
/* PC 에서는 숨기는 폰 전용 (홈 큰 단추로 들어온 화면의 ‹ 홈) */
@media (min-width: 900px) { .phone-only { display: none !important; } #subnav:has(> .phone-only:only-child) { display: none; } }

/* 홈 맨 위 큰 단추 — 회계 · 장학회 · 임원 (폰) */
.hm-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 0 0 14px; }
.hm-qbtn { position: relative; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm); padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); font-size: 16px; box-shadow: var(--shadow); }
.hm-qbtn:active { transform: scale(.98); background: var(--card-2); }
.hm-qbtn .hm-qi { font-size: 28px; line-height: 1.1; }
.hm-qbtn .faint { font-size: 11.5px; text-align: center; }
.hm-qbtn .badge { position: absolute; top: 8px; right: 10px; }
@media (min-width: 900px) { .hm-quick { display: none; } }

/* 사진 올리는 동안 아래 진행 띠 */
.upbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + var(--tab-bottom) + 22px); z-index: 60;
  width: min(420px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.upbar[hidden] { display: none; }
.upbar-t { font-size: 13px; margin-bottom: 6px; color: var(--ink-soft); }
.upbar-track { height: 6px; background: var(--card-2); border-radius: 3px; overflow: hidden; }
.upbar-track i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
@media (min-width: 900px) { .upbar { bottom: 28px; } }

/* 회계 요약 (통장 하나) */
.fin-hero { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; border-radius: var(--radius); padding: 18px 18px 16px; margin-bottom: 12px; }
.fin-hero .faint, .fin-hero .muted { color: rgba(255,255,255,.78); }
.fin-bal { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 4px; }
.fin-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.fin-kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.fin-hero .fin-kpis > div { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: #fff; }
.fin-kpis b { display: block; font-size: 18px; }
.fin-bank { background: var(--card); border: 1px dashed color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.fin-hero .fin-bank { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.4); color: #fff; margin-bottom: 0; }

/* 모임 */
.club-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .club-grid { grid-template-columns: 1fr 1fr; } }
.clubcard { display: block; }
.seg.scroll-seg { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.seg.scroll-seg button { flex: 0 0 auto; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (min-width: 620px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
.photo-grid .ph { border: 0; padding: 0; background: var(--card-2); aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 임원 대화방 (카톡처럼) */
.chat { display: flex; flex-direction: column; background: color-mix(in srgb, var(--brand-soft) 45%, var(--bg)); border: 1px solid var(--line); border-radius: var(--radius);
  height: calc(100dvh - 230px - var(--tab-h) - var(--safe-b)); min-height: 360px; overflow: hidden; }
@media (min-width: 900px) { .chat { height: calc(100dvh - 210px); } }
.chat-pin { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.chat-pin[hidden] { display: none; }
.chat-pin-t { flex: 1; min-width: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 10px 6px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.chat-more { text-align: center; font-size: 12px; margin: 4px 0 8px; }
.chat-day { text-align: center; margin: 12px 0 8px; }
.chat-day span { font-size: 12px; background: rgba(0,0,0,.08); color: var(--ink-soft); padding: 3px 10px; border-radius: 999px; }
.chat-msg { margin: 8px 0 0; display: flex; flex-direction: column; align-items: flex-start; }
.chat-msg.cont { margin-top: 3px; }
.chat-msg.me { align-items: flex-end; }
.chat-name { font-size: 12px; color: var(--ink-soft); margin: 0 0 3px 4px; }
.chat-row { display: flex; align-items: flex-end; gap: 5px; max-width: 82%; }
.chat-msg.me .chat-row { flex-direction: row-reverse; }
.chat-b { background: var(--card); border-radius: 16px 16px 16px 4px; padding: 8px 11px; font-size: 15px; line-height: 1.45; word-break: break-word; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.04); min-width: 0; }
.chat-msg.me .chat-b { background: #F5E26B; color: #1C1B19; border-radius: 16px 16px 4px 16px; }
.chat-t { white-space: pre-wrap; }
.chat-img { display: block; max-width: 240px; width: 100%; height: auto; border-radius: 10px; margin: 2px 0; background: var(--card-2); }
.chat-q { font-size: 12.5px; color: var(--ink-soft); border-left: 3px solid var(--brand); padding: 2px 8px; margin-bottom: 6px; white-space: pre-wrap; overflow: hidden; max-height: 3.2em; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }
.chat-msg.me .chat-meta { align-items: flex-start; }
.chat-unread { color: #C9A100; font-weight: 800; }
.chat-msg.flash .chat-b { outline: 2px solid var(--brand); }
.chat-reply { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--card-2); font-size: 13px; border-top: 1px solid var(--line); }
.chat-reply[hidden] { display: none; }
.chat-reply > div { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-comp { display: flex; align-items: flex-end; gap: 6px; padding: 8px; background: var(--card); border-top: 1px solid var(--line); margin: 0; }
.chat-comp textarea { flex: 1; min-height: 38px; max-height: 120px; resize: none; font-size: 16px; padding: 8px 10px; border-radius: 18px; }
.chat-ph { border: 0; background: var(--card-2); border-radius: 50%; width: 38px; height: 38px; font-size: 18px; flex: 0 0 38px; cursor: pointer; }
.sheet:not(.on) { box-shadow: none; }   /* buk5: 닫힌 시트 그림자가 화면 아래로 비치지 않게 */

/* ===================== buk5.1 ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seg-n { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; align-items: center; justify-content: center; margin-left: 2px; }
/* 쪽지함 카드 */
.msg-list { display: flex; flex-direction: column; gap: 8px; }
.msg-card { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer; box-shadow: var(--shadow); color: var(--ink); font: inherit; }
.msg-card:active { background: var(--card-2); }
.msg-card .msg-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: transparent; }
.msg-card.unread { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 40%, var(--card)); }
.msg-card.unread .msg-dot { background: var(--brand); }
.msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.msg-who { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-card.unread .msg-who { font-weight: 800; }
.msg-cls { font-size: 12.5px; color: var(--ink-soft); flex: 0 0 auto; }
.msg-date { margin-left: auto; font-size: 12.5px; color: var(--ink-faint); flex: 0 0 auto; }
.msg-prev { font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-st { font-size: 12px; color: var(--ink-faint); }
.msg-st.read { color: var(--brand-ink); }
.msg-empty { text-align: center; padding: 34px 16px 28px; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.msg-empty svg { color: var(--brand); opacity: .8; }
.msg-empty-t { font-size: 17px; font-weight: 800; color: var(--ink); margin: 6px 0 4px; }
/* 내보내기 단추 · A4 인쇄 화면 */
.exp-btns { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.exp-row { display: flex; justify-content: flex-end; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
#printA4 { display: none; }
@media print {
  body.printing-a4 > *:not(#printA4) { display: none !important; }
  body.printing-a4 #printA4 { display: block !important; }
  body.printing-a4 { background: #fff !important; }
}
#printA4 { color: #111; font-size: 11pt; line-height: 1.45; }
#printA4 .a4-head { border-bottom: 2px solid #3A6B52; padding-bottom: 6px; margin-bottom: 10px; position: relative; }
#printA4 .a4-org { color: #3A6B52; font-weight: 700; font-size: 10pt; }
#printA4 h1 { font-size: 17pt; margin: 2px 0; }
#printA4 .a4-sub { color: #444; font-size: 10pt; }
#printA4 .a4-date { position: absolute; right: 0; top: 0; font-size: 9pt; color: #666; }
#printA4 h2 { font-size: 12.5pt; margin: 14px 0 6px; }
#printA4 .a4-tbl { width: 100%; border-collapse: collapse; font-size: 9.5pt; page-break-inside: auto; }
#printA4 .a4-tbl th, #printA4 .a4-tbl td { border: 1px solid #bbb; padding: 3px 5px; text-align: left; vertical-align: top; }
#printA4 .a4-tbl th { background: #EEF2EF; }
#printA4 .a4-tbl tr { page-break-inside: avoid; }
#printA4 .a4-tbl .n { text-align: right; white-space: nowrap; }
#printA4 .a4-kv { width: 60%; border-collapse: collapse; margin-bottom: 8px; }
#printA4 .a4-kv td { padding: 3px 6px; border-bottom: 1px solid #ddd; }
#printA4 .a4-kv td.n { text-align: right; font-weight: 700; }
/* 내 정보 — 내 회비 현황 · 내가 가입한 모임 */
.due-line { padding: 10px 0; border-bottom: 1px solid var(--line); }
.due-line:last-of-type { border-bottom: 0; }
.due-acct { margin-top: 4px; font-size: 13.5px; }
.me-clubs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.me-club { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; }
.me-club-n { font-weight: 700; flex: 1; min-width: 0; }
.me-club .btn.sm { padding: 4px 9px; font-size: 12.5px; }

/* buk5.1: 모임 탭 4개 — 꽉 찬 너비, 긴 모임 이름은 말줄임 */
.seg.club-tabs { display: flex; }
.seg.club-tabs button { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 9px 6px; }
.pos-row { gap: 8px; }
.pos-acts { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.pos-acts .btn.sm { padding: 5px 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* 장학회 임원 */
.jh-offs { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.jh-off { display: inline-flex; align-items: center; gap: 4px; margin: 0 12px 6px 0; }
/* 경조사 */
.jk-card { gap: 10px; }
.jk-ic { font-size: 22px; line-height: 1; width: 36px; height: 36px; border-radius: 12px; background: var(--brand-soft); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.jk-dl { margin-top: 10px; display: grid; gap: 8px; }
.jk-dl > div { display: grid; grid-template-columns: 64px 1fr; align-items: baseline; gap: 8px; }
.jk-dl > div > span { color: var(--ink-faint); font-size: 13px; }
.jk-acts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.jk-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 12px; }
.jk-bn { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 8px 8px 8px 10px; cursor: pointer; }
.jk-bn .jk-ic { flex: none; width: 30px; height: 30px; font-size: 18px; }
.jk-bt { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jk-x { flex: none; border: 0; background: transparent; color: var(--ink-faint); font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 10px; }
.jk-x:active { background: var(--card-2); }
.hm-quick.one { grid-template-columns: 1fr; }
/* 임원 홈 · 일정 · 자료실 · 투표 */
.of-pin { display: flex; gap: 10px; align-items: flex-start; }
.of-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.of-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; text-align: left; }
.of-stat b { font-size: 20px; letter-spacing: -.03em; }
a.of-stat { color: var(--ink); text-decoration: none; cursor: pointer; }
.of-date { width: 44px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; background: var(--brand-soft); color: var(--brand-ink); border-radius: 12px; padding: 4px 0; margin-right: 10px; }
.of-date b { font-size: 18px; line-height: 1.1; } .of-date span { font-size: 11px; }
.rsvp-cnt { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; }
.rsvp-cnt > div { background: var(--card-2); border-radius: 12px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; }
.rsvp-cnt b { font-size: 18px; }
.of-file { gap: 10px; }
.of-file a.t { color: var(--ink); text-decoration: none; word-break: break-all; }
.of-fic { font-size: 24px; flex: 0 0 auto; }
.chat-poll { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.chat-poll .btn { align-self: flex-start; }
.poll-opts { display: grid; gap: 8px; margin: 12px 0 8px; }
.poll-opt { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; overflow: hidden; background: var(--card); cursor: pointer; }
.poll-opt .poll-bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); background: var(--brand-soft); z-index: 0; transition: width .3s; }
.poll-opt > * { position: relative; z-index: 1; }
.poll-t { flex: 1; min-width: 0; }
.poll-who { flex-basis: 100%; font-size: 12px; color: var(--ink-soft); }
@media (max-width: 340px) { .grid2 { grid-template-columns: 1fr; } }
.item.rowi { display: flex; align-items: center; gap: 10px; }
.item.rowi .of-date { margin-right: 0; }
.cal-head .cal-add { width: auto; white-space: nowrap; flex: 0 0 auto; }

/* ===================== buk7 ===================== */
/* 홈 맨 위 찾기 칸 (폰 · PC 모두) */
.hm-search { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink-faint);
  border-radius: 999px; padding: 11px 16px; margin: 0 0 12px; font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.hm-search svg { color: var(--brand); flex: 0 0 auto; }
.hm-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-search:active { background: var(--card-2); }
/* 통합 찾기 화면 */
.srch-bar { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; }
.srch-bar:focus-within { border-color: var(--brand); }
.srch-ic { color: var(--brand); line-height: 0; }
.srch-bar input { border: 0; background: transparent; padding: 9px 4px; flex: 1; min-width: 0; font-size: 16px; }
.srch-bar input:focus { background: transparent; }
.srch-hint { margin: 18px 4px; line-height: 1.7; }
.srch-sec { margin-top: 16px; }
.srch-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 6px; }
.srch-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 6px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.srch-row:active { background: var(--card-2); }
.srch-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.srch-sub { flex-basis: 100%; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srch-av { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.srch-more { margin: 2px 4px 0; font-size: 12.5px; }
/* 알림 설정 — 종류별 켜고 끄기 (스위치) */
.push-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); margin: 0; cursor: pointer; }
.push-row input.sw { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; flex: 0 0 44px; border-radius: 999px; background: #D9D5CE; position: relative; cursor: pointer; transition: background .15s; margin: 0; border: 0; padding: 0; }
.push-row input.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.push-row input.sw:checked { background: var(--brand); }
.push-row input.sw:checked::after { transform: translateX(18px); }
.push-row input.sw:disabled { opacity: .45; cursor: default; }
/* 기수 대표 가입 승인 */
.rep-item .btn-row { justify-content: flex-start; }
