/* TRNB — M3.2 "Warm Clubhouse + Archive" theme.
   Warm ivory surfaces, coral primary (logo identity), sage calendar accent,
   fantasy decoration kept under ~10% (d20 empty state, dice in schedule). */
:root {
  --bg: #F7F5F1;
  --surface: #FFFEFC;
  --text: #292724;
  --muted: #77716A;
  --line: #E7E1D9;
  --accent: #F05A3C;
  --accent-hover: #DC4930;
  --accent-soft: #FFF1E8;
  --accent-deep: #C13B22;   /* readable coral for links/small text */
  --sage: #7C9070;
  --sage-soft: #F1F4EC;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(41, 39, 36, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.container { max-width: 940px; margin: 0 auto; padding: 0 16px; }
.container.wide { max-width: 1100px; } /* editor pages: room for the full toolbar */

/* header / footer */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 54px; }
.brand { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: .5px; }
.brand-logo { display: block; height: 36px; width: 36px; border-radius: 9px; }
/* M3.5 Part C: primary navigation is a first-class affordance */
.site-nav { display: flex; gap: 10px; }
.site-nav a {
  color: var(--text); padding: 7px 14px; border-radius: 8px;
  font-weight: 600; font-size: 15.5px;
  position: relative;
}
.site-nav a:hover { color: var(--accent-hover); text-decoration: none; background: var(--accent-soft); }
.site-nav a.active { color: var(--accent-hover); background: var(--accent-soft); font-weight: 700; }
.site-nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 2.5px; background: var(--accent); border-radius: 2px 2px 0 0;
}
.nav-badge { vertical-align: 2px; }
.site-footer {
  margin-top: 40px; padding: 20px 0; color: var(--muted);
  border-top: 1px solid var(--line); font-size: 13px;
}

/* header personal area */
.header-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-user .user-name { font-weight: 600; color: var(--text); }
/* M3.5 Part D: message entry is a global action — icon + label pill */
.msg-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 13.5px;
}
.msg-btn:hover { color: var(--accent-hover); border-color: #F2C9B5;
  background: var(--accent-soft); text-decoration: none; }
.msg-btn.active { color: var(--accent-hover); background: var(--accent-soft); border-color: #F2C9B5; }
.msg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.badge-count, .nav-badge {
  display: inline-block; min-width: 17px; padding: 0 4px;
  font-size: 10.5px; font-weight: 700; line-height: 15px; text-align: center;
  color: #fff; background: var(--accent); border-radius: 999px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex: none;
}
.avatar-lg { width: 56px; height: 56px; font-size: 24px; }
.avatar-md { width: 36px; height: 36px; font-size: 15px; }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.user-menu { position: relative; }
.user-menu summary {
  list-style: none; display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px; user-select: none;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--bg); }
.user-menu[open] summary { background: var(--accent-soft); }
.user-menu .caret { color: var(--muted); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(41, 39, 36, .12);
  min-width: 170px; padding: 6px; z-index: 30;
  display: flex; flex-direction: column; gap: 1px;
}
.user-dropdown a, .user-dropdown button {
  display: flex; align-items: center; gap: 6px;
  text-align: left; padding: 8px 12px; border-radius: 8px;
  color: var(--text); background: none; border: none;
  font: inherit; cursor: pointer;
}
.user-dropdown a:hover, .user-dropdown button:hover {
  background: var(--bg); text-decoration: none;
}
.pending-chip { font-size: 12.5px; color: #B4402A; background: var(--accent-soft);
  border: 1px solid #F2C9B5; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.inline-form { display: inline; }
.btn-link { background: none; border: none; color: var(--accent-deep); cursor: pointer;
  font: inherit; padding: 0; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: #B3261E; }

/* buttons */
.btn-primary { background: var(--accent); color: #fff; border: none;
  padding: 8px 16px; border-radius: 8px; font: inherit; font-weight: 600;
  cursor: pointer; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text);
  border: 1px solid var(--line); padding: 8px 16px; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-hover); }
.btn-right { margin-left: auto; }

/* page head */
.page-head { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  color: var(--muted); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 999px; background: var(--surface);
}

/* M3.8 §26/§27: archive accent — English micro-labels carry a quiet serif
   (system ui-serif/Georgia, no runtime font dependency); Korean text keeps
   the sans stack for readability. */
.badge, .archive-label {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
}

/* category chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip {
  display: inline-block; font-size: 12.5px; padding: 2px 10px;
  border-radius: 999px; background: var(--surface); color: var(--muted);
  border: 1px solid var(--line);
}
.chip:hover { text-decoration: none; color: var(--text); }
.chip.active { background: var(--accent-soft); color: var(--accent-hover); border-color: #F2C9B5; }
.chip-warn { color: var(--accent-hover); border-color: #F2C9B5; background: var(--accent-soft); }

/* board: list + subtle card */
.post-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.post-item { padding: 12px 18px 11px; border-bottom: 1px solid var(--line); }
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: #FBF8F3; }
.post-item-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0; font-size: 15px; font-weight: 400; line-height: 1.5;
}
.post-item-link { color: var(--text); font-weight: 600; }
.post-item-link:hover { color: var(--accent-hover); }
.post-item.is-notice .post-item-link { font-weight: 700; }
.cat-chip {
  font-size: 11.5px; padding: 1px 8px; border-radius: 999px; flex: none;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.cat-chip:hover { text-decoration: none; color: var(--text); }
.cat-chip.is-muted { color: #A79F93; }
.post-item-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
  color: var(--muted); font-size: 12.5px;
}
.pi-dot { opacity: .55; }
.pi-stats { margin-left: auto; display: flex; gap: 12px; }
.pi-stat { display: inline-flex; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums; }
.notice-tag {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 700; color: #B4402A;
  background: var(--accent-soft); border: 1px solid #F2C9B5;
  border-radius: 6px; padding: 1px 7px;
}
.file-ind { color: var(--muted); flex: none; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state .d20 { color: #C9BFB0; margin-bottom: 8px; }
.empty-state p { margin: 0; }

/* data tables (member management) */
.table-wrap { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.list thead th { background: var(--bg); color: var(--muted); font-weight: 600; font-size: 12.5px; }
table.list tbody tr:last-child td { border-bottom: none; }
table.list tbody tr:hover { background: #FBF8F3; }
.c-date { color: var(--muted); white-space: nowrap; }
.c-num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* pager */
.pager { display: flex; justify-content: center; gap: 4px; margin: 18px 0; flex-wrap: wrap; }
.pg {
  min-width: 32px; text-align: center; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); background: var(--surface); font-size: 13.5px;
}
.pg:hover { text-decoration: none; border-color: var(--accent); }
.pg.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-edge { color: var(--muted); font-weight: 700; }
.pg-edge:hover { color: var(--accent-hover); }

/* post */
.post {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-top: 24px;
  box-shadow: var(--shadow);
}
.post-title { font-size: 25px; margin: 8px 0 10px; line-height: 1.35; letter-spacing: -.01em; }
.post-meta { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-meta .dot { opacity: .5; }
.badge-archive { color: #9A6B4F; border-color: #EAD9C9; background: #FBF5EE; }
.event-box {
  border-left: 4px solid var(--sage); background: var(--sage-soft);
  border-radius: 8px; padding: 10px 14px; margin: 4px 0 8px;
  font-weight: 600; font-size: 14px;
}
.event-date { margin-right: 8px; }

/* schedule acknowledgement (M3.2) */
.schedule-ack { margin: 6px 0 4px; }
.ack-form { display: flex; align-items: center; gap: 10px; }
.ack-hint { font-size: 12.5px; }
.ack-done {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--sage); font-weight: 600; font-size: 14px;
}

/* legacy content */
.legacy-content {
  margin-top: 18px; overflow-wrap: break-word; word-break: break-word;
}
.legacy-content img { max-width: 100%; height: auto; border-radius: 6px; }
.legacy-content table { border-collapse: collapse; }
.legacy-content td, .legacy-content th { border: 1px solid var(--line); padding: 4px 8px; }
.legacy-content pre { background: var(--bg); padding: 10px; border-radius: 8px; overflow-x: auto; }
.legacy-content blockquote {
  margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--line);
  color: var(--muted);
}
.legacy-missing-media {
  border: 1px dashed var(--line); background: var(--bg); color: var(--muted);
  border-radius: 8px; padding: 14px; text-align: center; font-size: 13px;
  margin: 10px 0;
}
.legacy-embed-link { color: var(--muted); font-size: 13px; }

/* attachments */
.attachments { margin-top: 22px; }
.attachments h2 { font-size: 15px; margin: 0 0 8px; }
.attachments ul { list-style: none; margin: 0; padding: 0; }
.attachments li {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 6px; background: var(--bg); font-size: 14px;
}

/* comments */
.comments { margin-top: 26px; }
.comments h2 { font-size: 15px; margin: 0 0 10px; }
.comment {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px;
}
.comment-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.comment-meta .author { font-weight: 600; }
.comment-body { font-size: 14.5px; overflow-wrap: break-word; word-break: break-word; }
.depth-1 { margin-left: 24px; }
.depth-2 { margin-left: 48px; }
.depth-3 { margin-left: 72px; }

/* error page */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 56px; margin: 0 0 8px; color: var(--muted); }

/* forms */
.form-error { color: #B3261E; background: #FCEEEA; border: 1px solid #F2C9B5;
  border-radius: 8px; padding: 8px 14px; }
.post-form, .auth-card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.auth-card { max-width: 520px; margin: 40px auto; box-shadow: var(--shadow); }
.auth-card h1 { margin-top: 0; font-size: 20px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff; color: var(--text); }
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 130px; }
/* compact meta row: category/notice fixed, title takes the rest; on narrow
   screens flex-wrap drops title to its own full-width line (B-1) */
.form-line { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.form-line .field { margin-bottom: 0; }
.form-line .field-category { flex: 0 1 160px; }
.form-line .field-notice { flex: 0 1 110px; }
.form-line .field-title { flex: 1 1 240px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  border: 0; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.notice-box { background: var(--accent-soft); border-radius: 8px; padding: 12px 16px;
  margin: 12px 0; }
.notice-box.warn { background: var(--accent-soft); }
.account-links { list-style: none; padding: 0; }

/* profile (내 정보) */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 2px 0 0; }
.profile-list { margin: 14px 0 18px; padding: 0; }
.profile-list > div {
  display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line);
}
.profile-list dt { width: 70px; flex: none; color: var(--muted); font-size: 13.5px; }
.profile-list dd { margin: 0; }
.pw-change, .withdraw-zone { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.pw-change summary, .withdraw-zone summary { cursor: pointer; color: var(--accent-deep); font-weight: 600; }
.pw-change form, .withdraw-zone form { margin-top: 12px; }

/* upload widget */
.upload-drop { border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 14px; text-align: center; margin: 10px 0; background: var(--bg); }
.upload-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.upload-drop .muted { margin: 0 0 8px; }
.file-label { cursor: pointer; }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; text-align: left; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.file-preview { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }

/* post actions */
.post-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.comment-actions { display: flex; gap: 10px; margin-top: 6px; font-size: 13px; }
.inline-edit summary { list-style: none; cursor: pointer; color: var(--accent-deep); }
.inline-edit form { margin-top: 6px; }
.inline-edit textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; padding: 8px; }
.comment.deleted { opacity: .6; }
.comment-form { margin-top: 14px; }
.comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; padding: 10px; }
.comment-form .btn-primary { margin-top: 8px; }

/* attachments gallery */
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; }
.attachment-image { margin: 0; }
.attachment-image img { width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--line); display: block; }
.attachment-image figcaption { font-size: 12px; margin-top: 4px; }
.attachment-file { grid-column: 1 / -1; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); }

/* lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(20, 16, 12, .88);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  cursor: zoom-out; }
.lightbox-overlay img { max-width: 96vw; max-height: 96vh; width: auto; height: auto;
  border-radius: 4px; }

/* schedule: next-play card + play slot list (M3.3) */
.next-event {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 18px; margin: 4px 0 14px;
  box-shadow: var(--shadow);
}
.next-event.is-empty { padding: 16px 18px; text-align: center; }
.next-event.unacked { border-color: #F2C9B5; }
.ne-head { display: flex; align-items: center; gap: 10px; }
.ne-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.ne-warn { font-size: 12.5px; font-weight: 600; color: var(--accent-hover); }
.ne-body { display: flex; align-items: center; gap: 12px; margin-top: 5px; }
.ne-dice { color: var(--accent); flex: none; display: inline-flex; }
.ne-title { display: block; font-weight: 700; font-size: 21px; color: var(--text); line-height: 1.35; }
.ne-title:hover { color: var(--accent-hover); }
.ne-when { color: var(--muted); font-size: 14px; }
.ne-ack { margin-left: auto; flex: none; }
.cal-nav { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.cal-title { font-size: 20px; font-weight: 700; }

/* M3.8 §22: previous-month archive section — one visual step below the
   current month, still fully readable. */
.month-prev-head {
  margin: 22px 2px 10px; font-size: 14.5px; font-weight: 600;
  color: var(--muted); letter-spacing: .2px;
}
.month-prev .slot-day { color: var(--muted); }
.month-prev .slot-wd { color: var(--muted); opacity: .85; }
.month-prev .slot-title { color: var(--ink-soft, #5b5148); }
.month-prev .slot-today-tag { display: none; }

/* play slot list: wide vertical rows, date column + content.
   M3.4 Part D: schedule-specific larger type scale — fewer items per screen,
   so readability beats density. Past rows keep the same font sizes and are
   muted by color only (§42). */
.schedule-head h1 { font-size: 27px; font-weight: 700; }
.slot-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.slot-row {
  display: flex; gap: 18px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); min-height: 76px;
  align-items: center;
}
.slot-row:last-child { border-bottom: none; }
.slot-row:hover { background: #FBF8F3; }
.slot-date {
  flex: none; width: 84px; display: flex; flex-direction: column;
  align-items: flex-start; gap: 2px; line-height: 1.2;
}
.slot-day { font-size: 20px; font-weight: 700; letter-spacing: .01em;
  font-variant-numeric: tabular-nums; }
.slot-wd { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.slot-today-tag { font-size: 11px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 999px; padding: 1px 8px; }
.slot-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.slot-event { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.slot-title { font-weight: 600; font-size: 18px; color: var(--text); flex: 1;
  min-width: 200px; line-height: 1.4; }
.slot-title:hover { color: var(--accent-hover); }
.slot-meta { display: inline-flex; align-items: center; gap: 12px; }
.slot-time { color: var(--muted); font-size: 14.5px; font-weight: 500;
  font-variant-numeric: tabular-nums; }
.chip-special { font-size: 12px; padding: 1px 9px; color: #9A6B4F;
  border-color: #EAD9C9; background: #FBF5EE; }
.ack-flag { font-size: 13px; font-weight: 700; white-space: nowrap; }
.ack-flag.unacked { color: var(--accent-hover); }
.ack-flag.done { color: var(--sage); }
.slot-empty { margin: 0; color: #A79F93; font-size: 15.5px; }
.slot-add { font-size: 14px; font-weight: 600; align-self: flex-start; }
.slot-row.past { background: #FBFAF6; }
.slot-row.past .slot-day { color: #BDB4A5; }
.slot-row.past .slot-title { color: #8D857A; }
.slot-row.past .slot-time { color: #B3AA9C; }
.slot-row.today { box-shadow: inset 4px 0 0 var(--accent); background: var(--accent-soft); }
.slot-row.today .slot-day { color: var(--accent-hover); font-size: 21px; }

/* same-date warning (M3.3 §28) */
.dup-warn { background: var(--accent-soft); border: 1px solid #F2C9B5;
  border-radius: var(--radius); padding: 12px 16px; margin: 0 0 4px; }
.dup-warn p { margin: 0 0 6px; }
.dup-list { margin: 6px 0; padding-left: 18px; }
.ack-counts { display: flex; align-items: center; gap: 4px; margin: 4px 0; }
.avatar-xs { width: 20px; height: 20px; font-size: 10px; background: var(--sage);
  border: 1.5px solid var(--surface); }
.avatar-more { background: #C9BFB0; }
.ack-count-text { margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.event-full .event-time { font-weight: 600; }

/* messages (쪽지함) */
.msg-list { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.msg-row { display: flex; gap: 10px; align-items: center; padding: 11px 16px;
  border-bottom: 1px solid var(--line); color: var(--text); }
.msg-row:last-child { border-bottom: none; }
.msg-row:hover { background: #FBF8F3; text-decoration: none; }
.msg-dot { width: 7px; flex: none; color: var(--accent); font-size: 11px; }
.msg-row.unread { background: var(--accent-soft); }
.msg-row.unread .msg-subject, .msg-row.unread .msg-from { font-weight: 700; }
.msg-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline;
  overflow: hidden; }
.msg-from { flex: none; max-width: 110px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.msg-row.unread .msg-from { color: var(--text); }
.msg-subject { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-state { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.msg-state.unread { color: var(--accent-hover); font-weight: 600; }
.msg-date { flex: none; font-size: 12.5px; }
.msg-body { white-space: pre-wrap; }
.mini-select { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 12.5px; }
.actions { white-space: nowrap; }
.actions .inline-form, .actions .chip { margin-right: 4px; }
.chip.danger { color: #B3261E; border-color: #F2C9B5; }
.center { text-align: center; padding: 20px; }

/* role colors only inside internal management screens */
.role-ADMIN { color: #B3261E; font-weight: 700; }
.role-ELDER { color: #9A6B4F; font-weight: 600; }
.role-MEMBER { color: var(--accent-deep); }
.role-PENDING { color: var(--muted); }

/* M3.1 editor era: user content media + YouTube click-to-load player */
.legacy-content img, .comment-body img {
  max-width: 100%; height: auto; border-radius: 8px;
}
.yt-player {
  position: relative; width: 100%; max-width: 720px;
  aspect-ratio: 16 / 9; margin: 10px 0;
  background: #000 center / cover no-repeat; border-radius: 10px; overflow: hidden;
}
.yt-player .yt-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; cursor: pointer; background: transparent;
}
.yt-player .yt-play img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0;
}
.yt-player .yt-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 44px; border-radius: 12px; background: rgba(20,20,20,.82);
}
.yt-player .yt-play-btn::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  transform: translate(-42%, -50%);
  border-style: solid; border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}
.yt-player .yt-play:hover .yt-play-btn { background: var(--accent); }
.yt-player .yt-link {
  position: absolute; right: 8px; bottom: 8px;
  font-size: 12px; color: #fff; background: rgba(0,0,0,.6);
  padding: 2px 8px; border-radius: 6px;
}
.yt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* comment general-file attachments (M3.1): name/size/download only */
.comment-files { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.comment-files .attachment-file { font-size: 13px; }

/* ===== M3.1: board search ===== */
.board-search { margin-top: 16px; }
.search-bar { width: 100%; }
.search-simple {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  max-width: 560px; margin: 0 auto;
}
.search-input {
  flex: 1; padding: 9px 14px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: var(--surface); color: var(--text);
}
.btn-search {
  background: var(--accent); color: #fff; border: none;
  padding: 9px 20px; border-radius: 8px; font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.btn-search:hover { background: var(--accent-hover); }
.btn-detail-toggle {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 13px;
  cursor: pointer; white-space: nowrap;
}
.btn-detail-toggle:hover { color: var(--text); border-color: var(--accent); }

.detail-search {
  display: none;
  width: 100%; padding: 4px 0;
}
.detail-search.open {
  display: block;
}
.detail-search label {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 12px 16px 0 0; font-size: 13px; color: var(--muted);
}
.detail-search select, .detail-search input[type=date] {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 13px; background: var(--surface); color: var(--text);
}
.detail-search .btn-search { padding: 6px 16px; font-size: 13px; margin-top: 12px; }

/* ===== responsive ===== */
@media (max-width: 768px) {
  .header-inner { gap: 8px; }
  .site-nav a { padding: 6px 9px; }
  .header-user { gap: 8px; }
}
@media (max-width: 640px) {
  /* two-row header: brand + personal area on top, nav below full width */
  .header-inner { flex-wrap: wrap; height: auto; padding: 8px 0 0; row-gap: 2px; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; }
  .header-user { order: 2; margin-left: auto; }
  .site-nav a.active::after { left: 9px; right: 9px; }
  .user-name, .user-menu .caret { display: none; }
  .msg-btn .msg-label { display: none; } /* ✉ [3] (§27) */
  .search-simple { flex-wrap: wrap; } /* 검색 버튼이 390px에서 밀리지 않게 */
  /* heading row: title + CTA on one line, badge wraps below */
  .page-head { flex-wrap: wrap; row-gap: 4px; }
  .page-head h1 { font-size: 20px; white-space: nowrap; }
  .btn-right { margin-left: auto; white-space: nowrap; }
  .pi-stats .pi-stat[aria-label^="조회"] { display: none; }
  .msg-main { flex-direction: column; gap: 1px; align-items: flex-start; }
  .msg-from { max-width: 100%; }
  .msg-date { display: none; }
  /* play slots: vertical stack (M3.3 §57); M3.4 §44 mobile type scale */
  .slot-row { flex-direction: column; gap: 4px; padding: 13px 14px 12px; min-height: 0; }
  .slot-date { flex-direction: row; align-items: baseline; gap: 6px; width: auto; }
  .slot-day { font-size: 18px; }
  .slot-title { min-width: 0; flex-basis: 100%; font-size: 17px; }
  .slot-time { font-size: 14px; }
  .slot-row.past { padding: 12px 14px 11px; }
  .post { padding: 16px; }
  .post-item { padding: 11px 14px 10px; }
  .depth-3 { margin-left: 48px; }
  .depth-2 { margin-left: 32px; }
  .depth-1 { margin-left: 16px; }
  .ne-ack { margin-left: 0; }
  .ne-body { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  .pending-chip { display: none; } /* 승인 대기 상태는 내 정보에서 확인 가능 */
}

/* M3.5 Part B: YouTube toolbar icon matches Toast UI toolbar metrics */
.yt-toolbar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: none; border-radius: 4px;
  background: transparent; color: #555; cursor: pointer; padding: 0;
}
.yt-toolbar-btn:hover, .yt-toolbar-btn:focus-visible {
  color: var(--accent); background: var(--accent-soft); outline: none;
}

/* M3.4 Part A: RSVP zone */
.rsvp-zone { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.rsvp-box, .rsvp-summary {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
}
/* M3.5 Part A: the RSVP box is the primary action area */
.rsvp-box.rsvp-cta {
  border: 1.5px solid #F2C9B5; background: var(--accent-soft);
  padding: 20px 22px;
}
.rsvp-box h2, .rsvp-summary h2 { font-size: 15px; margin: 0 0 10px; }
.rsvp-cta h2 { font-size: 18px; font-weight: 700; color: var(--accent-hover); margin-bottom: 4px; }
.my-rsvp { margin: 2px 0 10px; font-size: 14px; }
.my-rsvp strong { font-size: 15px; }
.rsvp-choices { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.rsvp-choice { cursor: pointer; }
.rsvp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rsvp-choice span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 8px 26px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted);
  font-weight: 700; font-size: 16px;
}
.rsvp-choice:hover span { border-color: var(--accent); color: var(--accent-hover); }
.rsvp-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rsvp-choice input:checked + span {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.rsvp-choice.ten input:checked + span { background: var(--sage); border-color: var(--sage); }
.rsvp-choice.dec input:checked + span { background: #8D857A; border-color: #8D857A; }
.rsvp-comment-field { margin: 4px 0 0; }
.rsvp-form .editor-holder { margin: 4px 0 4px; }
.rsvp-hint { font-size: 12.5px; }
/* M3.5 Part B: participation stats */
.rsvp-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.rsvp-stat {
  flex: 1; min-width: 96px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; background: var(--bg);
  display: flex; flex-direction: column; gap: 1px;
}
.rsvp-stat .n { font-size: 24px; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums; }
.rsvp-stat .l { font-size: 14px; font-weight: 600; color: var(--muted); }
.rsvp-stat.att { background: var(--accent-soft); border-color: #F2C9B5; }
.rsvp-stat.att .n, .rsvp-stat.att .l { color: var(--accent-hover); }
.rsvp-stat.ten { background: var(--sage-soft); border-color: #DCE3D4; }
.rsvp-stat.ten .n, .rsvp-stat.ten .l { color: var(--sage); }
.rsvp-stat.dec .n, .rsvp-stat.dec .l { color: var(--muted); }
.rsvp-names { margin: 6px 0 0; font-size: 12.5px; color: var(--muted);
  line-height: 1.5; overflow-wrap: anywhere; text-align: left; }
.rsvp-names .sep { margin: 0 4px; opacity: .5; }
.rsvp-names .rsvp-more { color: var(--text); font-weight: 600; white-space: nowrap; }
.ack-line { display: flex; align-items: center; gap: 4px; margin: 12px 0 0; }
.ack-secondary { margin-top: 8px; }
/* M3.5 Part C: response badge */
.rsvp-badge {
  display: inline-block; flex: none; font-size: 13.5px; font-weight: 700;
  padding: 2px 12px; border-radius: 999px; white-space: nowrap;
}
.comment.has-rsvp.rsvp-ATTENDING { border-left: 3px solid var(--accent); }
.comment.has-rsvp.rsvp-TENTATIVE { border-left: 3px solid var(--sage); }
.comment.has-rsvp.rsvp-DECLINED { border-left: 3px solid #B9B0A2; }
.rsvp-ATTENDING { color: var(--accent-hover); background: var(--accent-soft); border: 1px solid #F2C9B5; }
.rsvp-TENTATIVE { color: var(--sage); background: var(--sage-soft); border: 1px solid #DCE3D4; }
.rsvp-DECLINED { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
/* M3.5 Part D: small neutral tombstone for removed schedule responses */
.comment-removed {
  font-size: 13px; color: #A79F93; padding: 4px 12px; margin-bottom: 6px;
  border-left: 3px solid var(--line);
}
.comment-removed.depth-1 { margin-left: 24px; }
.comment-removed.depth-2 { margin-left: 48px; }
.comment-removed.depth-3 { margin-left: 72px; }

/* M3.4 Part C: time selector */
.time-select { display: flex; align-items: center; gap: 4px; }
.time-select select {
  padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff; color: var(--text); font-size: 16px;
}
.time-select .tsep { color: var(--muted); font-weight: 700; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* M3.4 Part E: member management (approval-centred, compact list) */
.approve-zone {
  background: var(--surface); border: 1px solid #F2C9B5;
  border-radius: var(--radius); padding: 16px 20px; margin: 4px 0 16px;
  box-shadow: var(--shadow);
}
.approve-zone.is-empty { border-color: var(--line); padding: 14px 20px; text-align: center; }
.approve-zone.is-empty p { margin: 0; }
.approve-zone h2 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.count-pill { display: inline-block; min-width: 20px; text-align: center;
  font-size: 11.5px; line-height: 17px; color: #fff; background: var(--accent);
  border-radius: 999px; padding: 0 6px; }
.approve-row { display: flex; align-items: center; gap: 14px;
  padding: 10px 0; border-top: 1px solid var(--line); }
.approve-row:first-of-type { border-top: none; }
.approve-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.approve-name { font-weight: 700; font-size: 15.5px; }
.approve-mail { font-size: 12.5px; }
.approve-meta { font-size: 12.5px; color: var(--muted); }
.verify-warn { color: var(--accent-hover); }
.legacy-match { color: var(--sage); font-weight: 600; }
.legacy-warn { margin: 4px 0 0; font-size: 12.5px; color: var(--accent-hover); }
.member-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.mtab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.mtab span { font-size: 12px; color: var(--muted); }
.mtab:hover { text-decoration: none; color: var(--text); }
.mtab.active { background: var(--accent-soft); color: var(--accent-hover); border-color: #F2C9B5; }
.member-search { display: flex; gap: 8px; max-width: 420px; margin: 0 0 14px; }
.member-search input { flex: 1; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: var(--surface); }
.member-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.member-row { display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: none; }
.member-row:hover { background: #FBF8F3; }
.member-info { flex: 1; min-width: 0; }
.member-name-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-name { font-weight: 600; font-size: 15.5px; }
.role-badge { display: inline-block; font-size: 12px; font-weight: 700;
  padding: 1px 10px; border-radius: 999px; white-space: nowrap; }
.roleb-ADMIN { color: #fff; background: var(--accent-hover); }
.roleb-ELDER { color: #9A6B4F; background: #FBF5EE; border: 1px solid #EAD9C9; }
.roleb-MEMBER { color: var(--sage); background: var(--sage-soft); border: 1px solid #DCE3D4; }
.roleb-PENDING { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
.member-sub { font-size: 12.5px; }
.member-meta { font-size: 12.5px; }
/* M3.5 Part E: the manage panel expands IN FLOW inside the member row —
   no absolute positioning, no overlap, rows below push down naturally */
.member-manage { display: contents; flex: none; }
.member-manage summary {
  list-style: none; cursor: pointer; user-select: none;
  margin-left: auto; align-self: flex-start;
}
.member-manage summary::-webkit-details-marker { display: none; }
.member-manage[open] .manage-panel {
  flex-basis: 100%; order: 9;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  margin-top: 4px;
}
.manage-current { margin: 0; font-size: 13px; }
.manage-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 3px 0; }
.manage-noright { margin: 0; font-size: 12.5px; }
.manage-danger { align-self: flex-start; }
@media (max-width: 640px) {
  .member-row { flex-wrap: wrap; }
  .member-manage { margin-left: auto; }
  .member-manage[open] .manage-panel { width: 100%; }
}

/* M5 image UX: upload cards, status colors, lightbox chrome */
.upload-drop .hint { margin-top: 6px; font-size: 12.5px; }
/* file inputs: visually hidden but keyboard-focusable (Tab → Enter opens the
   picker); the wrapping chip shows the focus ring via :focus-within */
.file-input-hidden { position: absolute; width: 1px; height: 1px;
  opacity: 0; overflow: hidden; }
.file-label:focus-within { outline: 2px solid var(--accent);
  outline-offset: 2px; }
.file-list li.up-card {
  gap: 10px; padding: 8px; border: 1px solid var(--line);
  border-radius: 8px; margin-top: 8px; background: #fff;
}
.up-thumb { width: 56px; height: 42px; object-fit: cover;
  border-radius: 6px; flex: none; background: var(--accent-soft); }
.up-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-width: 0; }
.up-meta .file-name { flex: 1 1 auto; overflow-wrap: anywhere; }
.up-status { font-size: 12.5px; color: var(--muted); }
.up-status.is-busy { color: var(--accent-deep); }
.up-status.is-ok { color: #2E7D32; }
.up-status.is-fail { color: #B3261E; font-weight: 600; }
.up-actions { display: inline-flex; gap: 8px; margin-left: auto; }

.lightbox-overlay { display: flex; align-items: center; justify-content: center; }
.lightbox-overlay img { max-width: 92vw; max-height: 88vh; width: auto;
  height: auto; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(20, 16, 12, .55); color: #fff;
  border: none; border-radius: 999px; width: 44px; height: 44px;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.lb-close { top: 14px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-index { position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%); color: #fff; background: rgba(20,16,12,.55);
  border-radius: 999px; padding: 4px 14px; font-size: 13px; }
@media (max-width: 640px) {
  .file-list li.up-card { align-items: flex-start; }
  .up-actions { flex-direction: column; align-items: flex-end; }
}

.attach-manage { margin-top: 4px; }
.attach-strip { list-style: none; margin: 8px 0 0; padding: 8px; display: flex;
  gap: 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.attach-card { flex: none; width: 150px; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px; background: #fff; }
.attach-card img { width: 100%; height: 80px; object-fit: cover;
  border-radius: 6px; background: var(--accent-soft); }
.attach-card.is-inline { opacity: .75; }
.attach-card.is-removed { display: none; }
.attach-card .up-meta { margin-top: 6px; flex-direction: column;
  align-items: stretch; gap: 4px; }
.cover-image { margin: 12px 0; }
.cover-image img { width: 100%; height: auto; border-radius: 10px;
  display: block; border: 1px solid var(--line); }

/* message recipient picker (D-1) */
.rcpt-picker { margin: -6px 0 14px; }
.rcpt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rcpt-chip { display: inline-flex; align-items: center; gap: 6px; }
.rcpt-x { border: 0; background: transparent; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 2px; color: inherit; }
.rcpt-row { display: flex; align-items: center; gap: 10px; }
.rcpt-dialog { border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; width: 320px; max-width: 92vw; }
.rcpt-dialog::backdrop { background: rgba(0,0,0,.45); }
.rcpt-search { width: 100%; padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
  box-sizing: border-box; }
.rcpt-list { list-style: none; margin: 0; padding: 0;
  max-height: 46vh; overflow-y: auto; }
.rcpt-list li { border-bottom: 1px solid var(--line); }
.rcpt-list li:last-child { border-bottom: 0; }
.rcpt-opt { display: flex; align-items: center; gap: 8px;
  padding: 8px 4px; cursor: pointer; }
.rcpt-opt .muted { margin-left: auto; font-size: 12.5px; }
.rcpt-dialog-actions { display: flex; justify-content: flex-end;
  margin-top: 10px; }
.broadcast-form h2 { margin: 0 0 4px; font-size: 17px; }
.msg-count { font-size: 12px; }

/* next-month preview (Phase 1 Part D) */
.next-month-preview { margin-top: 22px; }
.preview-head { font-size: 15px; color: var(--muted); font-weight: 600;
  border-top: 1px dashed var(--line); padding-top: 16px; }
.next-month-preview .slot-row { opacity: .92; }

/* recent-comment anchors land below the sticky header */
.comment { scroll-margin-top: 72px; }

/* recent comments — ultra-compact auxiliary strip (Phase 3-A): a small
   "최근 댓글" label column on the left and up to three one-line rows on the
   right. Vertical space is compressed hard (thin rows, 1px dividers, no
   heading row) while horizontal gaps between the fields stay generous. */
.recent-comments { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 5px 16px;
  display: grid; grid-template-columns: auto 1fr; column-gap: 22px;
  align-items: center; margin: 8px 0 12px; }
.recent-comments h2 { margin: 0; font-size: 12px; color: var(--muted);
  font-weight: 600; white-space: nowrap; }
.recent-comments ul { list-style: none; margin: 0; padding: 0; min-width: 0; }
.recent-comments li { border-bottom: 1px solid var(--line); }
.recent-comments li:last-child { border-bottom: 0; }
.recent-comments a.rc-row { display: flex; align-items: center; min-height: 34px;
  column-gap: 14px; padding: 4px 0; color: inherit; text-decoration: none;
  min-width: 0; line-height: 1.35; font-size: 13px; }
.recent-comments a.rc-row:hover { background: var(--accent-soft); }
.rc-author { font-weight: 600; font-size: 12.5px; flex: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 14em; }
.rc-post { color: var(--muted); font-size: 12px; flex: 0 2 auto; min-width: 6em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-excerpt { font-size: 12.5px; flex: 2 1 auto; min-width: 8em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-time { margin-left: auto; color: var(--muted); font-size: 12px;
  flex: none; white-space: nowrap; }
@media (max-width: 640px) {
  .recent-comments { grid-template-columns: auto 1fr; column-gap: 10px;
    padding: 3px 10px; }
  .recent-comments h2 { font-size: 11.5px; }
  .recent-comments a.rc-row { display: grid; min-height: 0; white-space: normal;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    column-gap: 8px; padding: 2px 0; line-height: 1.3; font-size: 12px; }
  .rc-author { max-width: 7.5em; grid-column: 1; grid-row: 1; }
  .rc-post { grid-column: 2; grid-row: 1; min-width: 0; font-size: 11.5px;
    white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
  /* keep the row at 2 lines: meta (author · post · time) on line 1,
     excerpt on line 2 */
  .rc-time { grid-column: 3; grid-row: 1; margin-left: auto; font-size: 11.5px; }
  .rc-excerpt { grid-column: 1 / -1; grid-row: 2; min-width: 0; font-size: 12px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* /me self-service email change (Phase 2 Part C) */
.email-change { display: inline-block; vertical-align: middle; }
.email-change summary { list-style: none; }
.email-change summary::-webkit-details-marker { display: none; }
.email-change-form { margin-top: 8px; max-width: 360px; }
.email-change-form .field { margin-bottom: 8px; }
.email-change-form .field input { padding: 6px 10px; }

/* PHASE 3-B: custom avatar images */
img.avatar { border-radius: 999px; object-fit: cover; flex: none;
  background: var(--accent); display: inline-block; vertical-align: middle; }
.avatar-actions { display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap; margin: 4px 0 8px; }

/* Identity boxes keep the same footprint with or without a custom image. */
.rc-author { display: inline-flex; align-items: center; gap: 5px; }
.rc-author .avatar { vertical-align: middle; font-size: 10px; }
.ack-person { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; }
.rsvp-names .avatar { vertical-align: middle; }
.approve-row > .avatar { margin-right: 10px; }


/* PHASE 3-C: surface-scoped avatar layout */
.avatar-profile-xl { width: 70px; height: 70px; font-size: 30px; }
.avatar-post-list { width: 52px; height: 52px; font-size: 22px; }
.avatar-post-detail { width: 64px; height: 64px; font-size: 28px; }
.avatar-comment { width: 40px; height: 40px; font-size: 18px; }

.profile-heading { min-width: 0; }
.profile-heading .avatar-actions { margin: 10px 0 0; }

.post-item {
  display: grid; grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 12px; align-items: center;
}
.post-item > .avatar-post-list { grid-column: 1; grid-row: 1 / span 2; }
.post-item-title, .post-item-meta { grid-column: 2; min-width: 0; }
.post-item-link { min-width: 0; overflow-wrap: anywhere; }

.post-heading {
  display: grid; grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 14px; align-items: center; margin: 8px 0 18px;
}
.post-heading > .avatar-post-detail { grid-column: 1; grid-row: 1; }
.post-heading-content { grid-column: 2; min-width: 0; }
.post-heading .post-title { min-width: 0; overflow-wrap: anywhere; margin: 0 0 8px; }
.post-heading .post-meta { min-width: 0; }

.comment {
  display: grid; grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px; align-items: start;
}
.comment > .avatar-comment { grid-column: 1; grid-row: 1; }
.comment-content { grid-column: 2; min-width: 0; }
.comment-meta { min-width: 0; flex-wrap: wrap; row-gap: 4px; }
.comment.deleted { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 640px) {
  .post-item { grid-template-columns: 52px minmax(0, 1fr); column-gap: 10px; }
  .post-heading { grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; }
  .comment { grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; }
}
