/* 공유 기록 모달 (modal-shared.html / modals/shared.js) */

/* 사용자/기념일/메뉴/본문 네 블록 모두 캐릭터 상세의 "관계"란과 같은 컨텐츠
   카드(.panel-card, character.css)를 쓴다 — 이 레포에 공용
   "컨텐츠 블록" 클래스가 따로 없어서, 같은 표면을 다시 선언하는 대신 그 컴포넌트를
   그대로 재사용한다. 그래서 사이드바 구분선 대신 카드 사이 간격으로 나눈다. */
/* 창 본문의 기본 패딩(14px)은 지우고 여백은 .shared-record가 직접 준다 — 그
   패딩이 남아 있으면 좁은 창 drawer/backdrop이 본문 영역을 다 못 덮어 가장자리에
   안 덮인 띠가 그대로 보인다(아래 inset:-10px가 .shared-record 패딩과 짝). */
.window-content:has(> .shared-record) { padding: 0; }
/* 바깥 여백 14px / 열 간격 5px 은 캐릭터·사용자 프로필 상세와 같은 값이다
   (.window-content 의 padding 14px, .profile-detail-layout 의 gap 5px — profile.css).
   창 본문 패딩을 0 으로 지운 대신 여기서 같은 값을 다시 준다. */
.shared-record { height: 100%; overflow: hidden; padding: 14px; box-sizing: border-box; }
.shared-layout { position: relative; display: flex; height: 100%; gap: 5px; }
.shared-content { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; gap: 8px; }
/* 프로필 카드의 아바타/이름 여백이 20cqi·10cqi라 컨테이너 쿼리 조상이 필요하다
   (사용자/캐릭터 모달은 .profile-sidebar가 그 역할). 여긴 사이드바가 맡는다.
   폭은 .profile-detail-layout의 grid-template-columns:minmax(280px,320px)
   (profile.css)와 맞춘다 — 예전엔 236px로 더 좁아서 같은 cqi 기준 아바타/이름이
   사용자·캐릭터 프로필 카드보다 눈에 띄게 작게 보였다. */
.shared-side {
  width: 320px; flex: 0 0 320px; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  container-type: inline-size;
}
/* 사람 칸(사용자+캐릭터)을 감싼 자리 — 수정 모드에서 이 안만 다시 그리려고 둔
   래퍼라 레이아웃에는 없어야 한다. display:contents 로 두 칸이 .shared-side 의
   세로 간격(gap)을 그대로 받는다(요청: 두 칸 사이에도 다른 칸과 같은 여백). */
[data-people-host] { display: contents; }

.shared-main { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 10px; }

/* 네이티브 스크롤바는 폭을 차지하고(사이드바 카드 폭을 밀어냄) 모서리 곡선을
   가로질러 사이드바 밖으로 삐져나와 보인다 — 창 본문·다이어리 캘린더 등과 같이
   숨기고 UI.bindWindowOverlayScrollbar 오버레이만 쓴다(shared.js).
   .shared-side 는 예외로 그 오버레이도 안 붙인다 — 캐릭터/사용자 프로필의
   .profile-sidebar(profile.css)와 같이 막대 없이 스크롤만 되게(요청). */
.shared-side,
.shared-main,
.shared-movie-results,
.shared-chat-log { scrollbar-width: none; }
.shared-side::-webkit-scrollbar,
.shared-main::-webkit-scrollbar,
.shared-movie-results::-webkit-scrollbar,
.shared-chat-log::-webkit-scrollbar { display: none; }

/* 콘텐츠 영역 첫 줄은 항상 헤더(☰ + "메뉴 / 상세 제목") — 환경설정 앱의
   .settings-panel-header와 같은 자리·형식(shared.js setHeader). ☰는 넓은
   창에서는 사이드바를 접고(is-nav-collapsed), 좁은 창에서는 overlay drawer를
   연다(is-nav-small) — 두 모드 전환은 UI.bindNavDrawer가 담당한다. */
.shared-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
}
/* 백업 고르기(요청) — 로그 위 [전체 선택] 체크칸과 컨텐츠 안에 떠 있는 [백업][취소]. */
.shared-backup-all { display: flex; align-items: center; gap: 6px; padding: 2px 4px 6px; cursor: pointer; }
.shared-backup-all .shared-backup-bar-text { margin-left: auto; color: var(--system-c-area-b-base-desc-font-color); }
.shared-backup-float {
  position: absolute; right: 16px; bottom: 12px; z-index: 3;
  display: flex; flex-direction: row; gap: 6px;
  padding: 6px; border-radius: 10px;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)) !important;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
}
/* 떠 있는 버튼의 기준점 — 채팅 화면 자체. */
.shared-chat, .shared-chat-thread-detail { position: relative; }
/* 최소: 보내기 버튼도 투명하게(요청). */
.window.is-chat-mode-min .comment-compose-footer .primary-button {
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
  color: var(--system-c-area-b-base-font-color) !important;
}
/* 채팅 뷰어 모드(요청) — 최소/기본/최대. */
/* 최소: 입력줄의 아바타도 이름으로 바꾼다(요청). */
.window.is-chat-mode-min .comment-compose-body .avatar-circle {
  width: auto; max-width: 8em; height: 36px; min-width: 0; flex: 0 1 auto;
  background: none !important; border-radius: 0; display: inline-flex; align-items: center;
  color: var(--system-c-area-b-base-desc-font-color) !important;
}
.window.is-chat-mode-min .comment-compose-body .avatar-circle > svg { display: none; }
/* 이름이 길면 말줄임(요청) — 예전엔 nowrap 만 있어 입력칸을 밀어냈다. */
.window.is-chat-mode-min .comment-compose-body .avatar-circle::after {
  content: attr(data-speaker-name);
  display: block; min-width: 0; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 최소: 사진은 접어 둔다(요청) — 접힌 게 기본. */
.shared-chat-msg-photos > summary { cursor: pointer; font-size: 11px; opacity: .7; list-style: none; }
.shared-chat-msg-photos > summary::-webkit-details-marker { display: none; }
/* 채팅 판과 입력줄은 한 판으로 붙고 선 하나로만 나뉜다(요청, 댓글과 다른 꼴).
   입력줄이 있는 화면만 — 백업 보기처럼 푸터가 없으면 아래 테두리를 그대로 둔다. */
.shared-content:has(> .shared-chat-footer) > .shared-main {
  border-bottom: 0 !important; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
/* 채팅 화면에서는 판과 입력줄 사이 여백을 없애 한 덩어리로 만든다(요청). */
.shared-content:has(> .shared-chat-footer) { gap: 0; }
.shared-chat-footer .comment-compose {
  margin: 0; border-radius: 0 0 14px 14px;
  border-top: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)) !important;
}
/* "<발신자> 입력중…"(요청) — 입력줄 바로 위 한 줄. 채팅 판의 바닥을 이어받아
   판과 입력줄 사이가 벌어져 보이지 않게 같은 바탕·좌우 테두리를 쓴다. */
.shared-chat-typing {
  box-sizing: border-box;
  display: flex; align-items: center; gap: 4px;
  padding: 3px 12px 5px;
  font-size: 12px; opacity: .75;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha));
  border-left: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
  border-right: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
}
.shared-chat-typing[hidden] { display: none; }
.shared-chat-typing-name { font-weight: 700; }
/* 점 셋이 차례로 통통 튄다(요청). */
.shared-chat-typing-dots { display: inline-flex; align-items: flex-end; gap: 3px; margin-left: 2px; }
.shared-chat-typing-dots i {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor;
  animation: shared-chat-typing-bounce 1.1s infinite ease-in-out;
}
.shared-chat-typing-dots i:nth-child(2) { animation-delay: .15s; }
.shared-chat-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes shared-chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .shared-chat-typing-dots i { animation: none; }
}
/* 최대 모드에선 무대 판이 그 몫을 하니 본문 판의 아래를 다시 닫고, 안쪽 여백도 없앤다(요청). */
.window.is-chat-mode-max .shared-main:has(.shared-chat-stage) {
  border-bottom-width: 1px !important; border-radius: 14px; padding: 0; overflow: hidden;
}
/* 무대 판은 본문 판의 테두리를 그대로 쓴다 — 제 테두리는 지운다. */
.window.is-chat-mode-max .shared-chat-stage { border: 0; border-radius: 0; }
.window.is-chat-mode-max .shared-chat, .window.is-chat-mode-max .shared-chat-thread-detail { gap: 0; }
.window.is-chat-mode-max .shared-chat-stage-side > .post-footer .comment-compose {
  margin: 0; border-radius: 0; background: transparent !important;
  border: 0 !important;
  border-top: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)) !important;
}
/* 보기 방식 버튼 — 모니터 그림 + 지금 모드 이름(요청). 누르면 최소→기본→최대로 돈다. */
.shared-chat-mode { display: inline-flex; align-items: center; gap: 4px; }
.shared-chat-mode-icon { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* 키퍼링 — d20 투명 버튼(요청). */
/* 채움 방식 그림(d20)은 선 대신 면으로 그린다. */
.shared-chat-mode-icon.is-solid { fill: var(--system-c-area-b-base-font-color); stroke: none; }
[data-trpg-keeper] .shared-chat-mode-icon { width: 18px; height: 18px; }
/* 최소: 아바타 없이 글만(요청). */
.is-chat-mode-min .shared-chat-msg { grid-template-columns: minmax(0, 1fr); }
.is-chat-mode-min .shared-chat-msg > .avatar-circle { display: none; }
.is-chat-mode-min .shared-chat-msg-head { gap: 4px; }
/* 줄 머리의 이름도 길면 말줄임(요청). */
.is-chat-mode-min .shared-chat-msg-name {
  max-width: 10em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 최대: 왼쪽 무대(배경·흉상·대사창) + 오른쪽 채팅, 가운데를 끌어 비율을 바꾼다. */
/* 영역 B 판 하나 안에 배경 | 채팅 | 입력란이 붙어 선다(요청) — 사이에 테두리도 여백도 없다. */
.shared-chat-stage {
  display: grid; grid-template-columns: var(--chat-stage-width, 55%) 6px minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1fr); flex: 1 1 auto; min-height: 0; gap: 0;
  overflow: hidden; border-radius: 10px;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)) !important;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
}
/* 오른쪽 칸 — 위는 채팅, 아래는 입력줄. */
.shared-chat-stage-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* 안쪽 여백은 다른 뷰어(.shared-main 의 10px)와 같게 — 줄 시작선이 모드마다 달라 보였다(요청). */
.shared-chat-stage-side > .shared-chat-log { flex: 1 1 auto; min-height: 0; padding: 10px; }
/* 선이 칸을 가로지르게 — 여백은 입력줄 안쪽으로 옮긴다. */
.shared-chat-stage-side > .post-footer { flex: 0 0 auto; padding: 0; }
.shared-chat-stage-side > .post-footer .comment-compose { padding: 8px 10px; }
.shared-chat-stage-view {
  position: relative; overflow: hidden; min-height: 0;
  background-size: cover; background-position: center;
  border: 0; border-radius: 0;
}
.shared-chat-stage-bust { position: absolute; max-width: none; pointer-events: none; }
/* 전신 감싸개(요청) — 채팅이 왼쪽 정렬이라 전신은 무대 왼쪽 70% 를 차지한다. 그 칸 밖으로 넘치는
   부분은 양 가장자리에서만 살짝(칸 너비의 6%) 사라져 칼같이 끊기지 않는다. 자리(확대/이동)는
   applyBustPlacement 가 img 에 준다. */
/* 전신 칸은 판 폭을 다 쓴다(요청) — 팝업 미리보기도 같다. 폭을 넘치는 부분만 잘린다. */
.shared-chat-stage-bust-wrap {
  position: absolute; top: 0; bottom: 0; left: 0; width: 100%; overflow: hidden; pointer-events: none;
  /* 띠 너비는 무대가 가장 좁을 때의 6% 로 고정한다(요청) — 판 폭에 비례하면 넓힐수록 띠도 커졌다.
     px 값은 JS(syncBustFade)가 무대 높이에서 셈해 넣고, 없으면 예전처럼 6%. */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--bust-fade, 6%), #000 calc(100% - var(--bust-fade, 6%)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--bust-fade, 6%), #000 calc(100% - var(--bust-fade, 6%)), transparent 100%);
}
/* 페어(공유 기록) 창은 사이드바 + 본문 + (최대 보기의) 무대가 한 줄에 들어가야 한다 —
   창 공통 최소(360px)로는 무대와 채팅이 겹쳐 눌린다(요청). 화면이 좁으면 화면을 따른다. */
/* 창의 data-root 는 그 기록의 메뉴 키(shared-<id>)라 앞부분으로 잡는다 — TRPG 핸드아웃 창(root="shared")도 같이. */
.window[data-root^="shared"] { min-width: min(520px, calc(100vw - 8px)); min-height: min(420px, calc(100vh - 8px)); }
/* 팝업 미리보기는 높이를 정하고(JS) 너비는 비율에서 나온다 — 세로로 긴 무대에서도
   팝업이 창을 넘지 않게(요청). 너비가 팝업보다 넓어지면 거기서 멈춘다. */
.shared-stage-dialog .shared-chat-stage-preview {
  max-width: 100%; margin-inline: auto;
}
/* 무대 설정 대화상자의 미리보기 — 실제 무대와 같은 칸(16:9), 시험 대사창, 끌어 옮기기. */
.shared-stage-dialog { width: min(92%, 560px); max-width: 560px; } /* .confirm-dialog 의 320px 상한을 넘겨 미리보기가 볼 만하게 */
.shared-chat-stage-preview {
  position: relative; aspect-ratio: 16 / 9; margin-top: 12px; border-radius: 10px; overflow: hidden;
  background: #2a2a2e center / cover no-repeat; cursor: grab; touch-action: none; user-select: none;
}
.shared-chat-stage-preview:active { cursor: grabbing; }
.shared-chat-stage-preview .shared-chat-stage-box { pointer-events: none; }
/* 이름 칸 고정 격자 — 전신 이미지 팝업의 슬라이더 줄과 같은 규칙(요청). */
.shared-stage-zoom { display: grid; grid-template-columns: 4.5em 1fr; align-items: center; gap: 10px; margin-top: 10px; }
.shared-stage-zoom > span { min-width: 0; white-space: nowrap; }
.shared-stage-zoom input { width: 100%; min-width: 0; }
/* 미리보기 대사창도 실제 무대와 같이 왼쪽 정렬(요청) — 팝업의 가운데 정렬을 물려받아 있었다. */
.shared-chat-stage-preview .shared-chat-stage-box { text-align: left; }
/* 전신이 없으면 아바타를 원형 그대로 세운다. */
.shared-chat-stage-bust.is-avatar { left: 50%; bottom: 28%; width: 40%; height: auto; transform: translateX(-50%); border-radius: 50%; }
/* 들어오면서 전신·표정을 다 받는 동안(요청) — 다 받고 나면 사라진다. */
.shared-chat-stage-loading {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(0, 0, 0, .35); color: #fff !important; font-size: 13px;
}
/* 공용 로딩원 상자는 부모 높이를 다 쓰게 되어 있어(.loading-block height:100%),
   여기서는 그것이 판을 통째로 밀어 글씨가 바닥에 붙었다 — 제 크기만 쓰게 한다(요청). */
.shared-chat-stage-loading .loading-block { height: auto; min-height: 0; padding: 0; }
/* 대사란은 네 줄로 고정이다(요청) — 대사 길이에 따라 높이가 오르내리지 않는다. */
.shared-chat-stage-box {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px;
  background: rgba(0, 0, 0, .55); color: #fff !important;
}
.shared-chat-stage-box[hidden] { display: none !important; }
.shared-chat-stage-name { font-weight: 600; color: #fff !important; }
/* 대사 칸은 늘 네 줄(6em) — 짧아도 줄지 않고, 길면 제 안에서 굴린다(요청).
   치는 동안에는 typeOut 이 끝으로 따라 내린다. */
.shared-chat-stage-text {
  display: block; white-space: pre-wrap; color: #fff !important;
  line-height: 1.5; height: 6em; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
}
.shared-chat-stage-text::-webkit-scrollbar { display: none; }
.shared-chat-stage-splitter {
  cursor: col-resize; background: transparent;
  border-left: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
}
.shared-chat-stage.is-stacked .shared-chat-stage-splitter {
  border-left: 0;
  border-top: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
}
/* 좁은 창(요청) — 무대가 위, 채팅과 입력줄이 남은 아래를 쓴다. */
.shared-chat-stage.is-stacked {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--chat-stage-height, 42%) 6px minmax(0, 1fr);
}
.shared-chat-stage.is-stacked .shared-chat-stage-splitter { cursor: row-resize; }

/* TRPG 시나리오 편집기(요청) — 왼쪽 원본(읽기 전용), 오른쪽 수정 뷰어. */
.trpg-scenario { display: grid; grid-template-columns: var(--trpg-src-width, 50%) 10px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); flex: 1 1 auto; min-height: 0; }
.trpg-scenario-pane {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0;
  padding: 8px; border-radius: 10px;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)) !important;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
}
.trpg-scenario.is-collapsed { grid-template-columns: 0 6px minmax(0, 1fr); }
.trpg-scenario.is-collapsed .trpg-scenario-src { display: none; }
.trpg-scenario-src { overflow: auto; min-height: 0; flex: 1 1 auto; }
.trpg-scenario-splitter { cursor: col-resize; background: transparent; }
.trpg-scenario-tools > strong { font-weight: 600; }
/* 두 판의 머리줄 높이를 맞춘다(요청) — 본문 라벨과 찾기/바꾸기 줄이 같은 선에서 시작한다. */
.trpg-scenario-tools { display: flex; align-items: center; gap: 4px; min-height: 44px; flex: 0 0 auto; }
.trpg-scenario-tools .auth-input { padding: 2px 6px; }
.trpg-scenario-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.trpg-scenario-find { width: 90px; }
.trpg-scenario-lines { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
/* 채팅 줄 모양으로 보여 주는 수정 뷰어(요청) — ▶ 는 줄 왼쪽에 붙는다. */
/* 맵이 걸린 줄은 [▶][맵][본문] 세 칸이 된다(요청). */
.trpg-line.is-chat { grid-template-columns: auto auto minmax(0, 1fr); align-items: start; }
.trpg-line.is-chat:not(:has(.trpg-line-map)) { grid-template-columns: auto minmax(0, 1fr); }
.trpg-line-chat { min-width: 0; }
.trpg-line-chat .shared-chat-msg { margin: 0; }
.trpg-scenario-input { width: 100%; flex: 1 1 auto; min-height: 120px; resize: none; }
.trpg-line { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 6px; padding: 2px 0; margin-left: calc(var(--trpg-depth, 0) * 14px); }
/* 분기(설명)와 선택지 — 챕터처럼 접었다 편다(요청). */
.trpg-line.is-branch .trpg-line-tag,
.trpg-line.is-choice .trpg-line-tag { font-size: 11px; padding: 0 4px; border-radius: 4px; background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)); }
.trpg-line.is-branch { font-weight: 600; }
.trpg-line-fold { width: 18px; padding: 0; }
/* 이미 채팅으로 내보낸 줄은 흐리게(요청). */
.trpg-line.is-sent { opacity: .45; }
.trpg-line.is-chapter { grid-template-columns: minmax(0, 1fr); border-top: 1px solid; margin-top: 6px; padding-top: 6px; }
.trpg-line-chapter { font-weight: 600; }
.trpg-line-text { min-width: 0; white-space: pre-wrap; outline: none; }
.trpg-line-text:focus { background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)); }
.shared-trpg-msg { display: flex; gap: 6px; padding: 2px 0; }
/* 창 바깥(바탕화면)에 뜨는 칸(요청) — 창 오른쪽에 붙어 따라다닌다. 자리·높이·층은 JS 가 맞춘다. */
.trpg-party { position: fixed; width: 240px; overflow-y: auto; scrollbar-width: none; }
.trpg-party::-webkit-scrollbar { display: none; }
.trpg-party > .panel-card { box-shadow: 0 6px 14px -2px rgb(0 0 0 / .2); }
/* 현재값은 눌러서 고친다(GM·소유자) — 버튼이지만 글씨 그대로 보인다. */
.trpg-party-bar-input { width: 3.4em; padding: 0 2px; font-size: 11px; text-align: right;
  color: #000; background: #fff; border: 1px solid rgba(0, 0, 0, .25); border-radius: 4px; }
button.trpg-party-bar-num { padding: 0; font-size: 11px; cursor: pointer; }
/* 시트 버튼은 누를 수 있다는 표(요청) — 머리줄은 잡아 옮긴다. */
.trpg-party-sheet { cursor: pointer; }
.trpg-party > .panel-card > .panel-card-head { cursor: move; user-select: none; }
button.trpg-party-bar-num:hover { text-decoration: underline; }
.trpg-party-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.trpg-party-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.trpg-party-row > .avatar-circle { width: 34px; height: 34px; }
.trpg-party-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.trpg-party-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trpg-party-nosheet { font-size: 11px; color: var(--system-c-area-b-base-desc-font-color); }
/* 바 한 줄 — 이름 · 막대 · 현재값/최대값. */
.trpg-party-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 5px; font-size: 11px; }
.trpg-party-bar-label { white-space: nowrap; color: var(--system-c-area-b-base-desc-font-color); }
.trpg-party-bar-track { height: 5px; border-radius: 3px; overflow: hidden;
  background: rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)); }
.trpg-party-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--focus-color); }
.trpg-party-bar.is-hp .trpg-party-bar-fill { background: #e05a5a; }
.trpg-party-bar.is-mp .trpg-party-bar-fill { background: #4f86e8; }
.trpg-party-bar.is-san .trpg-party-bar-fill { background: #8a63d2; }
.trpg-party-bar-num { white-space: nowrap; font-variant-numeric: tabular-nums; opacity: .85; }
.trpg-party-sheet .shared-chat-mode-icon { width: 18px; height: 18px; }
/* TRPG 키퍼링 창(요청) — 시나리오명 / 참여 캐릭터 / NPC / 시나리오. */
.window[data-root^="shared"] .window-content:has(> .shared-trpg-keeper) { overflow: hidden; }
.shared-trpg-keeper { display: flex; flex-direction: column; gap: 10px; padding: 12px; height: 100%; box-sizing: border-box; min-height: 0; }
.shared-trpg-section { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
/* 참여 캐릭터·NPC 는 머리줄을 눌러 접는다(요청). */
.shared-trpg-section .panel-card-head { cursor: pointer; }
.shared-trpg-section.is-collapsed .shared-trpg-members,
.shared-trpg-section.is-collapsed > div:not(.panel-card-head) { display: none; }
.shared-trpg-section.is-scenario { flex: 1 1 auto; min-height: 0; }
.shared-trpg-section.is-scenario > div:last-child { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.shared-trpg-members { display: flex; flex-direction: column; gap: 4px; max-height: 30vh; overflow-y: auto; }
.shared-trpg-member { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
/* 맵 칸(요청) — 미리 올려 둔 무대 배경들. 누르면 그 맵으로 바로 전환한다. */
.shared-trpg-maps { display: flex; flex-direction: column; gap: 6px; }
/* 입력줄에 붙는 굴림 칩(요청) — "/" 자동완성에서 고르면 글자 대신 이 칩이 붙는다. */
/* TRPG 입력줄은 칩이 글 사이에 껴야 해서 textarea 가 아니라 편집 가능한 판이다(요청). */
.shared-chat-compose { white-space: pre-wrap; word-break: break-word; cursor: text; }
.shared-chat-compose:empty::before,
.shared-chat-compose:has(> br:only-child)::before {
  content: attr(data-placeholder); opacity: .6; pointer-events: none;
}
/* 누르면 바로 걷힌다(요청) — 비어 있는 동안 계속 떠 있어 무엇을 치는지 가렸다.
   펼침 표시(.is-compose-expanded, bindComposeGrow 가 포커스에 맞춰 붙인다)도 같이 보는 것은
   창이 배경에 있을 때 :focus 가 안 잡히는 경우까지 덮기 위해서다. */
.shared-chat-compose:focus::before,
.shared-chat-compose:focus:has(> br:only-child)::before,
.is-compose-expanded .shared-chat-compose::before,
.is-compose-expanded .shared-chat-compose:has(> br:only-child)::before { content: none; }
.shared-chat-macro {
  /* 글줄과 같은 baseline 에 놓는다(요청) — vertical-align:middle 은 칩이 글자 줄보다 높아
     가운데가 x-height 기준으로 잡혀, 입력란에서 칩만 두 픽셀쯤 내려앉아 보였다.
     inline-flex 면 칩의 baseline 을 첫 칸(아이콘 svg)이 정해 아이콘 칩만 다시 어긋나므로
     inline-block 으로 두고 아이콘은 제 vertical-align 으로 맞춘다. */
  display: inline-block; margin: 0 2px; vertical-align: baseline;
  user-select: none;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap;
  /* 칩은 포커스색 바탕에 포커스 글씨색(요청) — 글 사이에서 한눈에 띄게. */
  background: var(--focus-color) !important;
  border: 1px solid var(--focus-color) !important;
  color: var(--focus-font-color) !important;
}
.shared-chat-macro svg { width: 14px; height: 14px; vertical-align: -0.2em; margin-right: 4px; }
/* 아직 치는 중인 칩("/r ", "/표정 " 으로 연다) — 점선으로 열려 있음을 알린다. */
.shared-chat-macro.is-open { display: inline-block; min-width: 14px; border-style: dashed !important; }
/* 굴릴 수 없는 글(기능치도 주사위식도 아님)이나 없는 표정은 빨갛게 — 이런 칩은
   굴리지 않고 글 그대로 나간다(요청). 색은 수치 하락 칩(.is-down)과 같은 빨강. */
.shared-chat-macro.is-invalid { color: #e0483a !important; border-color: #e0483a !important; }
/* "/" 자동완성 목록 — 아이콘 + 이름·기능치. */
/* 목록은 판 너비를 다 쓴다(요청) — 버튼이라 내용만큼만 넓어 오른쪽이 비어 보였다.
   표정이 많으면 max-height 안에서 굴린다(요청, .post-editor-popover 가 overflow-y:auto). */
.shared-macro-menu { min-width: 180px; max-height: 260px; }
.shared-macro-menu .post-editor-popover-item,
.shared-speaker-picker .post-editor-popover-item { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; }
.shared-macro-menu svg { width: 16px; height: 16px; }
/* 매크로 줄(요청) — 이름은 굵게, 설명은 보통 글씨로 오른쪽에. */
.shared-macro-menu .shared-macro-name { font-weight: 700; flex: 0 0 auto; }
.shared-macro-menu .shared-macro-desc { margin-left: auto; opacity: .75; font-size: .92em; }
/* 핸드아웃(요청) — GM 이 나눠 준 쪽지 카드. */
.shared-trpg-handouts { display: flex; flex-direction: column; gap: 10px; }
.shared-trpg-handout {
  padding: 10px; border-radius: 12px;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)) !important;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)) !important;
}
.shared-trpg-handout-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.shared-trpg-handout-to { margin-left: auto; font-size: 11px; color: var(--system-c-area-b-base-desc-font-color); }
.shared-trpg-handout-image { width: 100%; border-radius: 8px; margin-bottom: 6px; }
/* 시트에서 굴리는 아이콘 버튼(요청) — 누르면 그 기능으로 굴린다. */
.character-sheet-check { padding: 0; cursor: pointer; line-height: 0; }
.character-sheet-check:hover svg { color: var(--focus-color); }
.shared-trpg-map {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  padding: 4px; border-radius: 10px; cursor: pointer;
}
.shared-trpg-map:hover { background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)); }
.shared-trpg-map.is-current { outline: 1px solid var(--focus-color); }
.shared-trpg-map-thumb {
  width: 64px; aspect-ratio: 16 / 9; border-radius: 6px;
  background-size: cover; background-position: center;
  background-color: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha));
}
.shared-trpg-map-memo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared-trpg-map-now { font-size: 11px; color: var(--focus-color); }
/* 맵이 걸린 시나리오 줄 — 내보내면 무대도 같이 바뀐다는 표시. */
.trpg-line-map { font-size: 11px; color: var(--system-c-area-b-base-desc-font-color); white-space: nowrap; }
/* 키퍼링 목록의 아바타는 작게 — 컨테이너 단위(10cqi)로 커지던 자리(요청). */
.shared-trpg-member .avatar-circle { width: 28px; height: 28px; flex: 0 0 auto; }
.shared-trpg-member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 시트가 있으면 focus 색 문어, 없으면 설명 색(요청). */
.shared-trpg-sheet svg { width: 16px; height: 16px; color: var(--system-c-area-b-base-desc-font-color); }
.shared-trpg-sheet.is-written svg { color: var(--focus-color); }
/* 상단 줄 우측의 화면별 버튼 자리([관리]) — 컨텐츠 카드 밖이라 본문을 밀지도,
   본문과 함께 스크롤되지도 않는다(요청). */
.shared-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.shared-nav-backdrop { display: none; }
.shared-nav-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 4px; cursor: pointer; }
.shared-nav-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* breadcrumb 자체가 목록으로 돌아가는 버튼이다 — 환경설정 앱과 같은
   .panel-header-breadcrumb을 그대로 재사용한다(homepage.css). */

/* 넓은 창: ☰로 사이드바 자체를 접어 본문에 공간을 더 준다(환경설정 앱과 동일). */
.shared-layout.is-nav-collapsed .shared-side { display: none; }

/* 좁은 창(모바일 등): 사이드바는 overlay drawer가 된다. 클래스 토글(is-nav-small /
   is-nav-drawer-open)은 UI.bindNavDrawer가, 위치·전환은 여기가 담당한다
   — 환경설정 앱의 .settings-shell.is-nav-small 규칙과 같은 구조.
   inset의 -14px는 .shared-record의 padding과 짝이다(콘텐츠 영역 전체를 덮도록). */

.shared-layout.is-nav-small .shared-side {
  position: absolute;
  inset: -14px auto -14px -14px;
  height: auto;
  z-index: 5;
  /* 접힌 폭도 320px — 위 .shared-side 와 같은 값이다. breakpoint 를 900 으로
     올린 뒤로는 drawer 가 좁은 창 전용이 아니라 표준 크기 창의 기본 모드라,
     260px 로 두면 프로필 카드의 cqi 여백이 같이 줄어 아바타/이름이 사용자·캐릭터
     프로필 카드보다 작아진다(그 값을 320 으로 정한 이유가 그것이다).
     정말 좁은 창은 max-width 가 계속 막는다. */
  width: 320px;
  max-width: 80%;
  /* 좌우 여백 없이 — 안의 칸(프로필/관계/사람/기념일/메뉴)이 서랍 폭을 그대로
     쓴다(요청). 위아래만 띄운다. */
  padding: 0 0 14px;
  border-radius: 0 10px 10px 0;
  /* 접힌 메뉴 판은 영역 B(요청) — 창 바탕 위에 얹힌 판이라 영역 A 면 바탕과 구분이
     안 된다. 판 위의 카드들은 영역 C 로 간다(system-c.css 의 영역 C 셀 블록). */
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha));
  transform: translateX(-100%);
  transition: transform .18s ease;
}
/* 가로만 잘라낸다 — overflow:hidden 으로 묶으면 세로 스크롤까지 죽어 서랍이 길 때
   아래쪽 메뉴에 닿을 수 없었다(요청). 세로는 .shared-side 의 overflow-y:auto 그대로. */
.shared-layout.is-nav-small .shared-side { overflow-x: hidden; }
/* 서랍 안의 칸은 전부 서랍 폭을 꽉 채운다(요청) — 서랍 모서리에 맞물리므로
   제 라운딩과 좌우 테두리는 두지 않는다. 칸 사이 간격은 .shared-side 의 gap 몫. */
.shared-layout.is-nav-small .shared-side .profile-info,
.shared-layout.is-nav-small .shared-side .panel-card {
  border-radius: 0;
  border-left-width: 0;
  border-right-width: 0;
}
/* 하위 메뉴 칸(홈/정보/타임라인/갤러리 등)만은 안쪽 내용도 좌우 여백 없이 폭을 다
   쓴다(요청) — hover/활성 표시가 서랍 끝까지 닿는다. 위아래 여백은 그대로. */
/* 메뉴 칸은 좌우 안쪽 여백을 두지 않는다(요청) — 활성 표시(왼쪽 Focus 줄)가 칸 벽에
   붙어야 한다. 창 폭과 무관하게 같다(예전엔 좁은 창에서만 그랬다). */
.shared-side .shared-nav {
  padding-left: 0;
  padding-right: 0;
}
/* 머리줄("메뉴")과 무리 이름만은 다른 칸의 머리줄과 같은 x 에서 시작한다(요청) —
   .panel-card 의 안쪽 여백 10px + .panel-card-head 의 5px = 15px. */
.shared-side .shared-nav > :is(.panel-card-head, .shared-nav-group) {
  padding-left: 15px;
  padding-right: 10px;
}
/* 서랍을 펼친 동안에는 본문이 스크롤되지 않는다(요청) — 서랍 위에서 굴린 바퀴가
   뒤 본문으로 새어 본문만 움직였다. 서랍 자체는 제 안에서 스크롤한다. */
.shared-layout.is-nav-small.is-nav-drawer-open .shared-main,
.shared-layout.is-nav-small.is-nav-drawer-open .shared-content { overflow: hidden; }
.shared-layout.is-nav-small .shared-side { overscroll-behavior: contain; }
/* 그림자는 펼쳤을 때만 — 접힌 서랍은 화면 밖에 있는데도 그림자만 본문 위로 새어 나왔다(요청). */
.shared-layout.is-nav-small.is-nav-drawer-open .shared-side { transform: translateX(0); box-shadow: 4px 0 18px rgba(0, 0, 0, .25); }
.shared-layout.is-nav-small.is-nav-drawer-open .shared-nav-backdrop {
  display: block;
  position: absolute;
  inset: -14px;
  z-index: 4;
  margin: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, .32);
  cursor: pointer;
}
/* 떠 있는 [+] 는 창에 바로 붙어(.fab-dock, z-index 700) 서랍 막(4)·서랍(5)보다 위라,
   서랍을 펼친 동안에도 그대로 눌렸다(요청) — 팝업이 떠 있을 때와 같이 감춘다. */
.window:has(.shared-layout.is-nav-small.is-nav-drawer-open) .fab-dock { display: none; }

/* 배경/아이콘/이름 카드 — 구조와 스타일은 profile.css의 .profile-* 가 전부
   담당하고, 여기서는 아바타 자리에 들어가는 메뉴 아이콘 크기만 맞춘다
   (프로필은 사진이라 background-size:cover, 여기는 SVG/이미지 아이콘). */
.shared-record-card { flex: 0 0 auto; }
.shared-record-card .profile-avatar-img svg { width: 55%; height: 55%; }
.shared-record-card .profile-avatar-img img { width: 100%; height: 100%; object-fit: cover; }

.shared-mini-btn {
  font-size: 11px; padding: 1px 6px; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)); background: transparent; color: inherit;
}

/* 소속 사용자 행 — 관계란의 .avatar-chip 그대로. 그쪽 아바타
   폭이 10cqi인데 이 칩은 사이드바와 후기 작성자 헤더 두 곳에 나오므로,
   .character-relation-search-row와 같은 방식으로 고정 폭만 덮어쓴다. */
.shared-member { grid-template-columns: 28px minmax(0, 1fr); }
.shared-member .avatar-circle { width: 28px; }
.shared-member.is-profile-ref { cursor: pointer; }

/* 이 모달의 폼 다이얼로그(기념일 추가·수정 / 새 공유 후기 / 정보 수정) — 로그인·
   프로필과 같은 떠오르는 라벨 밑줄 입력(.auth-field/.auth-input/.auth-label,
   user.css)을 쓴다(요청). .confirm-dialog 가 가운데 정렬이라 글자만 되돌린다. */
/* 영화 검색 결과가 포스터 + 3줄짜리 항목이라 320px 로는 좁다 — .confirm-dialog 의
   max-width:320px 를 클래스 하나로 이긴다(아이콘 피커와 같은 방식). */
.confirm-dialog.shared-review-create {
  width: min(460px, calc(100% - 24px));
  max-width: 460px;
}

.shared-form-field { text-align: left; }
/* 밑줄 select(UI.underlineSelectHTML)는 칸 폭을 꽉 채운다 — 아래 제목 칸과 같은 줄 폭. */
.shared-form-field .custom-select-wrap { width: 100%; }
/* .auth-field 의 padding-top(16px)만으로는 칸끼리 붙어 보였다(요청). 연달아
   놓인 칸 사이에만 준다 — 첫 칸은 .confirm-dialog-message 의 아래 여백을 쓴다. */
.shared-form-field + .shared-form-field { margin-top: 8px; }
/* 켜고 끄는 칸(후기 메뉴의 영화 정보 연동 등, 요청) — 왼쪽에 이름·설명, 오른쪽 끝에 스위치.
   예전엔 사이드바용 작은 체크박스(.shared-nav-manage-check)를 그대로 써서 폼에서 혼자 작았다. */
.shared-form-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.shared-form-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shared-form-toggle-text span { font-size: 12px; color: var(--system-c-area-b-base-desc-font-color); }
.shared-form-toggle-row .settings-toggle { flex: none; }
/* 후기 썸네일 칸(요청) — 링크 입력 | [이미지 업로드] | 작은 미리보기를 한 줄에. */
.shared-review-thumb-field { display: flex; align-items: flex-end; gap: 8px; }
.shared-review-thumb-field > .shared-form-field { flex: 1 1 auto; min-width: 0; }
.shared-review-thumb-field > .small-btn { flex: none; margin-bottom: 2px; }
.shared-review-thumb-preview { flex: none; width: 36px; height: 48px; object-fit: cover; border-radius: 4px; }
.shared-review-thumb-field + .shared-form-field { margin-top: 8px; }
/* 마지막 입력칸과 버튼줄이 붙어 보였다(요청) — 이 다이얼로그들에만 준다. */
.shared-form-dialog .confirm-dialog-actions { margin-top: 18px; gap: 12px; }

/* type=date 는 값이 없어도 :placeholder-shown 이 아니라, 위 라벨 규칙만으로는
   라벨이 늘 떠 있고 "연도-월-일"도 그대로 보인다. 값이 있는지는 JS가
   .is-filled 로 알려주고(bindDateFields), 비었고 포커스도 아니면 값 자리와
   떠오른 라벨을 함께 감춰 다른 칸과 같은 모양으로 둔다(요청).
   .auth-input:not(:placeholder-shown) + .auth-label(0,3,1)을 되받아야 해서
   .shared-form-field 로 한 단계 더 좁힌다. 달력 아이콘은 남긴다 — 날짜 칸임을
   알리는 유일한 표시가 된다. */
/* .auth-input 의 오른쪽 20px 패딩은 로그인 폼의 지우기(×)/비밀번호 보기 버튼
   자리다 — 날짜 칸엔 그 버튼이 없어서 달력 아이콘만 안쪽으로 밀려 있었다. */
.shared-form-field .auth-input[type="date"] { padding-right: 0; }

.shared-form-field .auth-input[type="date"]:not(:focus):not(.is-filled)::-webkit-datetime-edit {
  color: transparent;
}
.shared-form-field .auth-input[type="date"]:not(:focus):not(.is-filled) + .auth-label {
  top: 20px;
  font-size: 12px;
  color: var(--system-c-area-b-base-desc-font-color);
}
.shared-anniv-list { display: flex; flex-direction: column; gap: 4px; }
/* 바로 위 "사용자" 칸(.shared-member = .avatar-chip)과 같은 줄
   간격으로 맞춘다(요청) — padding 4px / gap 8px 도 그쪽 값이고, 아이콘도 그쪽
   아바타와 같은 28px 자리다. 날짜 줄은 크기를 따로 주지 않고 이름 줄과 같은
   12px 를 물려받아 @아이디 줄과 같은 높이가 된다. D-day 는 오른쪽 끝(요청). */
.shared-anniv { display: flex; align-items: center; gap: 8px; padding: 4px; font-size: 12px; }
.shared-anniv-label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shared-anniv-label small { color: var(--system-c-area-b-base-desc-font-color); }
/* 오른쪽 끝이라 폭을 잡아둘 필요가 없다 — 값 길이만큼만 쓰고 이름 칸이 남는다. */
.shared-anniv-dday { flex: 0 0 auto; font-weight: 700; font-size: 11px; white-space: nowrap; }

/* 아이콘 자리 — .avatar-circle 와 같은 28px 원형 판. 그쪽은
   사진이라 background-size:cover 지만 여기는 SVG/PNG 아이콘이라 안에 맞춘다
   (사이드바 카드 아이콘 .shared-record-card 와 같은 방식). */
.shared-anniv-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--system-c-area-b-base-font-color);
}
.shared-anniv-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shared-anniv-icon img { width: 22px; height: 22px; object-fit: contain; }
.shared-anniv-icon-btn { padding: 0; cursor: pointer; }

/* 항목 자체는 환경설정 앱 셸의 .side-nav-btn normal-button을 그대로 쓴다
   (구조/크기/활성 표시가 전부 공용). 다만 그 앱에서는 버튼들이 창 바탕에 바로
   놓여 상자가 맞지만, 여기서는 컨텐츠 카드(.panel-card) 안이라
   상자를 그대로 두면 카드 안에 카드가 늘어선다 — 위 사용자/기념일 칸의 행처럼
   테두리·배경을 벗기고 hover 와 활성만 남긴다(요청).
   활성 표시는 .side-nav-btn 이 이미 자리를 잡아둔 왼쪽 3px 막대를 쓴다. */
.shared-nav { display: flex; flex-direction: column; gap: 2px; }
/* 후기 메뉴는 편집 때문에 감싸개(div) 안에 있다 — 그냥 두면 블록 안이라 버튼이
   글자 폭까지만 늘어나 홈/페어(사이드바의 flex 항목이라 꽉 참)와 폭이 달랐다(요청).
   사이드바와 같은 세로 flex 를 줘서 같은 폭·같은 간격으로 맞춘다. */
[data-nav-menu-list] { display: flex; flex-direction: column; gap: 2px; }
/* "메뉴" 머리줄은 사용자/기념일 칸의 .panel-card-head 그대로 — 항목 위 한 줄. */
/* 머리줄 아래 간격을 다른 칸과 같은 8px 로 — 세로 flex 의 gap(2px)이 더해지므로 6px. */
.shared-nav > .panel-card-head { margin-bottom: 6px; }
/* 메뉴 한 줄 — 항목을 그대로 끌어 순서를 바꾼다(손잡이 없음). */
.shared-nav-row { display: flex; align-items: center; }
.shared-nav-row .shared-nav-item { flex: 1 1 auto; min-width: 0; }
/* 기념일 추가/수정 팝업 — 아이콘 버튼 + 이름·날짜 칸. */
.shared-anniv-dialog-row { display: flex; align-items: flex-start; gap: 10px; text-align: left; }
.shared-anniv-dialog-fields { flex: 1 1 auto; min-width: 0; }
/* 추가 줄(임시)은 기념일 편집 줄과 같은 뼈대를 쓴다 — 손잡이 자리는 비워 두어야
   이름칸이 위 줄들과 같은 x 에서 시작한다. */
/* 공용 커스텀 체크박스(.settings-checkbox)를 쓰되, 기본 모양은 사진 위에 겹쳐도
   보이게 만든 것이라(2px 테두리 + 그림자) 11px 글자 옆 좁은 줄에서는 혼자 크고
   무겁다(요청: 화면이 이상함). 이 줄에서만 글자 크기에 맞게 눌러 준다. */
.shared-nav-manage-check { font-size: 11px; gap: 5px; }
.shared-nav-manage-check .settings-checkbox-box {
  width: 13px;
  height: 13px;
  border-width: 1px;
  border-radius: 3px;
  box-shadow: none;
}
/* 체크 표시도 상자에 맞춰 줄인다 — 기본값(16px 상자 기준)이면 상자 밖으로 나가고,
   top 을 0 으로 두면 위로 치우쳐 보인다(요청). 11px 안쪽 기준으로 가운데에 둔다. */
.shared-nav-manage-check .settings-checkbox-box::after { left: 4px; top: 2px; width: 3px; height: 7px; border-width: 0 2px 2px 0; }
/* 숨겨진 <input> 은 position:absolute 에 1px 이라, 클릭으로 포커스가 갈 때 브라우저가
   그걸 보이게 하려고 조상(.shared-record)을 스크롤한다 — 창 본문이 통째로 튀었다(요청).
   라벨을 기준 상자로 삼고 입력을 그 왼쪽 위에 붙여, 이미 보이는 자리에 있게 한다. */
.shared-nav-manage-check { position: relative; }
.shared-nav-manage-check .settings-checkbox-input { left: 0; top: 0; margin: 0; }
.shared-nav-item.is-sub { padding-left: 30px; }
.shared-nav-item { justify-content: space-between; }
/* 항목 글자는 "메뉴" 머리줄과 같은 x 에서 시작한다(요청) — 왼쪽 3px 활성 테두리를 뺀 값이라
   12+3 = 머리줄의 15px 과 맞는다. */
.shared-side .shared-nav .shared-nav-item { padding-left: 12px; }
.shared-side .shared-nav .shared-nav-item.is-sub { padding-left: 27px; }

/* .normal-button(0,1,0 !important) 을 이기려고 클래스를 하나 더 얹는다. */
.shared-nav-item.normal-button {
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 6px;
  background: transparent !important;
  color: var(--system-c-area-b-base-font-color) !important;
}
/* hover 는 .normal-button:hover(0,2,0 !important) 라 한 단계 더 필요하다. */
.shared-nav-item.normal-button:hover,
.shared-nav-item.normal-button:focus-visible {
  background: rgba(var(--system-c-area-b-accent-rgb), var(--system-c-area-b-accent-alpha)) !important;
  color: var(--system-c-area-b-accent-font-color) !important;
}
/* 활성 — 강조 배경 없이 왼쪽 Focus 테두리 한 줄로만 표시한다(요청).
   그 줄이 각지게 보이도록 라운딩도 없앤다. */
.shared-nav-item.normal-button.is-active {
  border-left-color: var(--focus-color) !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--system-c-area-b-base-font-color) !important;
}
/* 눌러도 되는 곳이 아닌 항목(준비중)은 hover 강조를 주지 않는다. */
.shared-nav-item.normal-button.is-disabled:hover {
  background: transparent !important;
  color: var(--system-c-area-b-base-font-color) !important;
}
.shared-nav-divider { height: 1px; background: rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)); margin: 4px 0; }
.shared-nav-group { font-size: 11px; opacity: .6; padding: 6px 8px 2px 18px; }
/* 페어 메뉴의 타임라인/채팅/백업 — 아직 기능 없음, 눌러도 "준비중" 안내만. */
.shared-nav-item.is-disabled { opacity: .45; cursor: not-allowed; }

/* 캘린더 */
.shared-cal-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.shared-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.shared-cal-wd { text-align: center; font-size: 11px; opacity: .6; padding: 2px 0; }
.shared-cal-cell {
  min-height: 62px; border: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)) !important;
  border-radius: 5px; padding: 3px; display: flex; flex-direction: column; gap: 2px;
}
.shared-cal-cell.is-empty { border-color: transparent; }
/* 요일 색·오늘 테두리는 가계부 캘린더(.budget-calendar-*)와 같은 값·같은
   클래스 이름을 쓴다 — 이 레포에 캘린더 공용 CSS가 없어 규약만 맞춘다.
   is-empty 는 앞 줄에서 테두리를 지우므로 그 뒤에 와야 오늘/주말이 이긴다. */
.shared-cal-wd.is-sun,
.shared-cal-cell.is-sun .shared-cal-num { color: #e05252; }
.shared-cal-wd.is-sat,
.shared-cal-cell.is-sat .shared-cal-num { color: #4a7fd0; }
.shared-cal-cell.is-today {
  outline: 2px solid var(--focus-color);
  outline-offset: -2px;
}
.shared-cal-num { font-size: 11px; opacity: .7; }
.shared-cal-mark {
  font-size: 10px;
  background: color-mix(in srgb, var(--system-c-area-b-accent-color) calc(var(--system-c-area-b-accent-alpha) * 100%), rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)));
  color: var(--system-c-area-b-accent-font-color);
  border-radius: 4px; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 후기 */
/* 셀 자체는 .grid-cell(그림/영화후기/캐릭터 공용)을 쓰되, 여기서는 카드 옷을
   벗긴다 — 이 목록이 놓이는 본문 영역(.shared-main)이 이미 영역 B 카드라,
   테두리 있는 셀을 그대로 두면 카드 안에 카드가 늘어선 모양이 된다.
   캐릭터 이미지 그리드가 같은 이유로 쓰는 처리와 같다
   ([data-character-images-grid] > .character-image-cell, character.css). */
/* gap 은 다른 목록 그리드(.grid, homepage.css)와 같은 3px(요청). */
.shared-review-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px; }
/* 후기 셀은 영역 B(본문 카드) 위에 얹히는 컨텐츠라 영역 C 를 쓴다(요청) — 예전엔
   배경을 투명하게 두고 그림자로만 구분했다. */
.shared-review-grid > .grid-cell {
  border: 1px solid rgba(var(--system-c-area-c-base-border-rgb), var(--system-c-area-c-base-border-alpha)) !important;
  border-radius: 9px;
  padding: 7px;
  background: rgba(var(--system-c-area-c-base-rgb), var(--system-c-area-c-base-alpha)) !important;
  color: var(--system-c-area-c-base-font-color) !important;
  box-shadow: 0 0 5px -2px rgba(0, 0, 0, .14) !important;
}

/* hover 는 .grid-cell:hover 가 이미 그리는데, 위 규칙이 같은 특이도(0,2,0)로
   뒤에 와서 배경·그림자를 눌러 버린다 — 테두리만 빼고 그 값들을 그대로 다시 준다. */
.shared-review-grid > .grid-cell:hover {
  background-color: color-mix(in srgb, var(--system-c-area-c-accent-color) calc(var(--system-c-area-c-accent-alpha) * 100%), rgba(var(--system-c-area-c-base-rgb), var(--system-c-area-c-base-alpha))) !important;
  background-image: none !important;
  color: var(--system-c-area-c-accent-font-color) !important;
  box-shadow: inset 0 1px 0 1px rgb(0 0 0 / 10%),
    0 5px 14px rgba(var(--system-c-area-c-accent-border-rgb), .16) !important;
}
/* 내 후기 에디터의 [취소][저장] — 제목·공개범위가 없어 비어버린 머리줄 대신
   서식 툴바 오른쪽 끝에 붙인다(openReviewPostEditor). */

/* 후기 상세는 캐릭터 상세의 관계란(.panel-card)과 같은 영역 B
   카드 한 장이다(요청) — 작품 정보가 카드 머리, 후기들이 그 본문. 그 카드의 규칙은
   "카드는 하나, 안의 행은 자기 테두리를 갖지 않는다"라, 후기 박스의 테두리를 떼고
   영역 B 구분선으로만 나눈다(관계란·댓글 스레드와 같은 방식). 예전처럼 두면 카드
   안에 또 카드가 들어가 같은 내용을 셀로 두 번 그리는 모양이 된다. */
/* 영화 후기 메뉴의 상세 정보 블록(.movie-detail-info, homepage.css)과 같은 2단 —
   포스터 120px + 정보 열. 그쪽의 margin/padding/그림자 구분선 대신 이 카드가 쓰는
   영역 B 구분선을 그대로 둔다(카드 머리 역할이라 divider 가 이미 있다). */
.shared-review-detail-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: stretch;
  gap: 16px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)) !important;
}
/* 화면을 바꾸는 동안(응답 대기) — 내용을 비우지 않고 흐리게만 둔다. 크기가
   그대로라 흰 판이 늘었다 줄어들지 않는다(요청). 대기 중 조작은 막는다. */
.shared-main.is-view-loading {
  opacity: .45;
  pointer-events: none;
}
.shared-review-posts { display: flex; flex-direction: column; }
.shared-review-post {
  border: 0 !important;
  border-radius: 0;
  padding: 12px 4px;
}
/* 첫 후기는 위 머리의 구분선을 그대로 쓴다 — 두 줄이 겹치지 않게 두 번째부터만. */
.shared-review-post + .shared-review-post {
  border-top: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)) !important;
}
/* 별 하나 + 점수 토큰 — 카드 메타 줄·후기 헤더처럼 별 다섯 개 위젯이 들어갈 자리가
   없는 곳. 별은 Focus 색, 점수는 글자색. */
.shared-star { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; line-height: 1; }
.shared-star-glyph { color: var(--focus-color); }

/* 목록 카드의 "누가 몇 점" — 포스터 좌측 상단에 세로로 쌓는 태그(요청).
   제목 아래 줄로 두면 사람이 셋만 되어도 카드가 길어졌는데, 포스터 위 오버레이는
   몇 개가 쌓이든 카드 높이에 영향이 없다. 배지 껍데기는 썸네일 위 다른 배지
   (.post-thumb-image-badge, homepage.css)와 같은 값이다. */
.shared-review-card-people {
  position: absolute;
  /* 포스터 모서리에 더 붙인다(요청) — 6px 는 별점 칩이 그림 안쪽으로 들어와 보였다. */
  left: 2px;
  top: 2px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  pointer-events: none;
}
.shared-review-card-person {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 10px;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha));
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)) !important;
  color: var(--system-c-area-b-base-font-color);
}
/* 태그 안이라 아바타를 더 줄인다(요청) — 별점 글자 높이에 맞춘 크기. */
.shared-review-card-person .avatar-circle {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.shared-review-card-person .avatar-circle svg { width: 10px; height: 10px; }
.shared-review-card-person .shared-star { font-size: 11px; }
.shared-review-card-count { font-size: 12px; color: var(--system-c-area-b-base-desc-font-color); }

/* 후기 헤더의 이름 줄 — 이름 옆에 별점 토큰. */
/* 후기 헤더: 윗줄 "이름 @아이디", 아랫줄 별점(요청). 이름 줄은 폭이 모자라면
   아이디부터 줄어든다. */
/* 별점 — 댓글 포맷에는 없는 것이라 이름 줄 아래 자기 줄을 쓴다(요청). */
.shared-review-author-rating { display: block; margin-top: 2px; }
/* 사이드바 사용자/캐릭터 한 줄. 초대 중 칩은 반투명. */
.shared-member-row { display: flex; align-items: center; gap: 4px; }
/* 사용자 칩은 <div> 라 캐릭터 칩(<button>)의 hover 강조를 못 받는다 — 같은 값으로 맞춘다(요청). */
.shared-member-row .avatar-chip.shared-member:hover {
  background-color: color-mix(in srgb, var(--system-c-area-b-accent-color) calc(var(--system-c-area-b-accent-alpha) * 100%), rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha))) !important;
  color: var(--system-c-area-b-accent-font-color) !important;
  border-radius: 8px;
  cursor: pointer;
}
.shared-member-row .avatar-chip.shared-member:hover .avatar-chip-text > span {
  color: var(--system-c-area-b-accent-font-color) !important;
}
.shared-member-row .avatar-chip.shared-member:hover .avatar-chip-label {
  color: var(--system-c-area-b-accent-desc-font-color) !important;
}

/* 칸 접기(요청) — 머리줄을 누르면 접힌다(화살표 없음). 접히면 목록도 버튼도 감추고
   머리줄 오른쪽에 아바타 3개(+N)만 남겨, 접힌 칸이 한 줄로 보이게 한다. */
[data-side-section] > .panel-card-head {
  cursor: pointer;
}
[data-side-section].is-collapsed > .panel-card-head {
  margin-bottom: 0;
}
[data-side-section].is-collapsed .avatar-chip-list,
[data-side-section].is-collapsed .shared-anniv-list {
  display: none;
}
.shared-section-mini {
  display: none;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  flex: none;
}
[data-side-section].is-collapsed .shared-section-mini {
  display: flex;
}
/* 미니 줄의 아바타·아이콘은 원래 줄에서 복제해 온 것이라 크기만 줄인다. */
.shared-section-mini .avatar-circle,
.shared-section-mini .shared-anniv-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  flex: none;
}
.shared-section-more {
  font-size: 11px;
  color: var(--system-c-area-b-base-desc-font-color);
}
.shared-member-row > .avatar-chip { flex: 1; min-width: 0; }
.shared-invite-chip { opacity: .55; }
/* 상세 맨 아래 "그 자리 작성칸" — 다른 후기와 같은 줄 구조(헤더 / 본문)로 앉히되,
   이름 자리에 "내 후기" 라벨 + 별점 위젯, 본문 자리에 밑줄 입력. */
.shared-review-compose { border-top: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)) !important; }
.shared-review-compose header { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.shared-review-compose-label { font-size: 12px; color: var(--system-c-area-b-base-desc-font-color); }
/* 안 매긴 별점은 점수("0.0")를 감추고 빈 별만 남긴다 — 0점처럼 읽히지 않게. */
.shared-review-compose-rating.is-unrated .movie-star-rating-score { display: none; }
/* 그 자리 작성칸의 에디터 — 전체화면 에디터는 창 높이를 다 쓰지만(.post-editor-body
   flex:1) 여기서는 후기 목록 아래 한 칸이라 높이를 직접 정한다. 넘치면 그 안에서
   스크롤되고, 더 넓게 쓰려면 [크게 보기]가 전체화면 에디터로 넘긴다. */
/* 카드 안이라 판을 또 깔지는 않고, 구분선 굵기의 테두리로 "여기가 입력칸"만
   알린다(요청) — 영역 B 테두리를 쓰면 카드 테두리와 같은 무게라 상자가 겹쳐
   보인다. */
.shared-review-compose-editor {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)) !important;
  border-radius: 10px;
}
.shared-review-compose-editor .post-editor-body { gap: 6px; }
.shared-review-compose-editor .post-editor-content {
  min-height: 96px;
  max-height: 320px;
  padding: 6px 2px;
}
/* 이 칸은 카드 안이라 에디터가 자기 판을 또 그리지 않는다. */
.shared-review-compose-editor .post-editor-message:empty { display: none; }
.shared-review-compose-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* 내 후기 에디터 머리줄 — 제목·공개범위를 걷어냈으므로 [별점][취소][저장]만
   오른쪽에 모인다. 서식 툴바는 다른 에디터와 같이 그 아래 자기 줄을 쓴다. */
.shared-review-editor-head { justify-content: flex-end; }
.shared-review-editor-rating { display: inline-flex; align-items: center; }
.shared-review-post header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.shared-review-body { font-size: 13px; line-height: 1.6; }
.shared-review-body img { max-width: 100%; border-radius: 6px; }
.shared-review-ref { display: inline-block; margin-top: 6px; font-size: 12px; }
/* 영화 검색 결과 — 영화 후기 메뉴의 드롭다운(.movie-search-dropdown /
   .movie-search-result-*, homepage.css)과 같은 판·같은 항목을 쓴다(요청).
   다이얼로그를 늘리지 않고 검색칸 아래에 떠서 아래 내용을 덮는다 — 그래서
   결과 목록은 검색칸(.auth-field, position:relative) 안에 들어간다.
   판은 영역 B 표면 + 영역 B 테두리를 따른다(요청). */
.shared-movie-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: none;
  border-radius: 8px;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)) !important;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)) !important;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .22);
}
/* display:flex 가 네이티브 [hidden] 의 display:none 을 이겨서 명시적으로 꺼야 한다. */
.shared-movie-results[hidden] { display: none !important; }
.shared-movie-results::-webkit-scrollbar { display: none; }
/* 고른 항목 표시 — 전역 *{border-color: … !important} 를 되받아야 해서 !important. */
.shared-movie-result.is-selected {
  border: 1px solid var(--focus-color) !important;
}

/* 페어 — 셀 안의 두 프로필은 캐릭터 모달의 .avatar-chip
   (character.css)을 그대로 쓴다. 그쪽 아바타 폭이 10cqi라 컨테이너 쿼리
   조상이 필요한데 여기엔 없으므로, .character-relation-search-row와 같은
   방식으로 고정 폭만 덮어쓴다. */
/* 좁은 창에서 두 번째 캐릭터가 잘리지 않게 한다(요청) — min(240px, 100%) 이라
   컨테이너가 240 보다 좁으면 열도 같이 좁아져 셀이 밖으로 삐져나가지 않는다
   (minmax(240px,...) 는 좁을 때 그대로 넘쳐 잘렸다). 대신 아바타가 줄어든다. */
.shared-pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
/* 셀 우측 상단 — 표시 순서 번호(#001)와, 관리 모드에서만 [⇄] 좌우 바꾸기. 오른쪽
   캐릭터는 우측 하단에 있어 이 구석이 빈다. */
.shared-pair-cell { position: relative; }
/* 번호는 캐릭터 정보와 같은 선에 맞춘다(요청) — 기준이 칸의 패딩 상자라
   칸 안쪽 여백(10px)이 윗값, 거기에 프로필의 좌우 여백(4px)을 더한 값이 오른값이다.
   그래야 칸 테두리에서 재면 글과 똑같이 위 11px / 오른쪽 15px 가 된다. */
.shared-pair-corner { position: absolute; top: 10px; right: 14px; display: inline-flex; align-items: center; gap: 2px; }
.shared-pair-no { font-size: 11px; font-weight: 700; color: var(--system-c-area-b-base-desc-font-color); }
.shared-pair-swap { font-size: 13px; padding: 0 4px; line-height: 1.4; opacity: .55; }
.shared-pair-swap:hover { opacity: 1; }
/* [관리] 툴바 — 그리드 위 오른쪽. 관리 중엔 셀이 드래그 손잡이다. */
.shared-pair-grid.is-managing .shared-pair-cell { cursor: grab; touch-action: none; user-select: none; }
/* 집고 있는 칸은 아예 감춘다(요청) — 흐리게만 두면 원래 자리와 놓일 자리가
   같이 보여 어디로 가는지 헷갈렸다. 자리는 자리표가 대신 차지하고, 손에 든
   모습은 ghost 가 보여준다. 놓으면 placeholder.replaceWith(item) 으로 되돌아온다. */
.shared-pair-grid.is-managing .shared-pair-cell.is-drag-source { display: none; }
/* 놓일 자리는 강조 테마로 채운다(요청) — 점선 테두리만으로는 어느 칸으로 가는지
   잘 안 보였다. 배경은 목록 셀 hover(.grid-cell:hover, homepage.css)와 같은 방식으로
   강조색을 기본색 위에 미리 합성한다. 이 자리표는 .shared-pair-cell 이기도 해서
   system-c.css 의 영역 C 별칭이 걸려, 여기 쓰는 area-b-* 는 영역 C 값으로 풀린다. */
.shared-pair-grid .shared-review-drop-placeholder {
  margin: 0;
  border-style: solid;
  border-color: rgba(var(--system-c-area-b-accent-border-rgb), var(--system-c-area-b-accent-border-alpha));
  background-color: color-mix(in srgb, var(--system-c-area-b-accent-color) calc(var(--system-c-area-b-accent-alpha) * 100%), rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)));
}
/* 관리 중엔 칸 전체가 드래그 손잡이다 — 캐릭터 버튼의 hover(강조 배경·글자색,
   character.css)가 그대로 살아 있으면 누를 수 있는 것처럼 보인다(요청). 그쪽
   규칙이 !important 라 같은 무게로 되돌린다. */
.shared-pair-grid.is-managing button.avatar-chip { cursor: inherit; }
.shared-pair-grid.is-managing button.avatar-chip:hover {
  background-color: transparent !important;
  color: var(--system-c-area-b-base-font-color) !important;
}
.shared-pair-grid.is-managing button.avatar-chip:hover .avatar-chip-text > span {
  color: var(--system-c-area-b-base-font-color) !important;
}
.shared-pair-grid.is-managing button.avatar-chip:hover .avatar-chip-label {
  color: var(--system-c-area-b-base-desc-font-color) !important;
}
/* 셀 테두리는 없앤다(요청) — 페어란 자체가 이미 영역 B 카드 한 장 안이라
   테두리를 두면 카드 안 카드가 된다. 영화 후기 셀(.shared-review-grid > .grid-cell)과
   같이 그림자로만 띄운다. */
/* 가운데 × 없이 두 칸이 같은 줄에 나란히(요청). 셀은 [왼쪽 글] / [아바타] / [오른쪽 글]
   세 줄이고, 왼쪽 버튼은 1~2행, 오른쪽 버튼은 2~3행을 차지한다 — 버튼이 자기 컨텐츠
   만큼만 덮어야 hover 도 딱 그만큼 칠해진다(요청: 빈 위/아래 여백까지 칠해지지 않게).
   두 버튼이 subgrid 로 셀의 줄을 그대로 쓰므로 가운데 줄에 놓인 아바타는 저절로 같은
   높이가 된다(예전엔 버튼을 셀 높이만큼 늘리고 1fr 로 밀어 빈 칸이 남았다). */
/* 페어 셀도 영역 B 위에 얹히는 컨텐츠 — 영역 C(요청). */
.shared-pair-cell {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto;
  align-items: stretch; gap: 6px 0; padding: 10px;
  border: 1px solid rgba(var(--system-c-area-c-base-border-rgb), var(--system-c-area-c-base-border-alpha)) !important;
  border-radius: 9px;
  background: rgba(var(--system-c-area-c-base-rgb), var(--system-c-area-c-base-alpha));
  color: var(--system-c-area-c-base-font-color);
  box-shadow: 0 0 5px -2px rgba(0, 0, 0, .14);
}
.shared-pair-profile.is-start { grid-column: 1; grid-row: 1 / span 2; }
.shared-pair-profile.is-end { grid-column: 2; grid-row: 2 / span 2; }
.shared-pair-cell .avatar-chip { grid-template-rows: subgrid; }
/* subgrid 좌표는 그 버튼이 차지한 두 줄 기준이다 — 왼쪽은 (글, 아바타), 오른쪽은
   (아바타, 글) 순으로 셀의 가운데 줄이 양쪽 모두 아바타 자리가 된다. */
.shared-pair-profile.is-start .avatar-chip-text { grid-row: 1; align-self: end; }
.shared-pair-profile.is-start .avatar-circle { grid-row: 2; }
.shared-pair-profile.is-end .avatar-circle { grid-row: 1; }
.shared-pair-profile.is-end .avatar-chip-text { grid-row: 2; align-self: start; }
/* 글은 바깥쪽(좌/우) 정렬 그대로 두고 아바타만 가운데로 모은다. 위아래 여백은 0 이어야
   subgrid 줄이 셀 줄과 어긋나지 않는다 — 세로 간격은 셀의 row-gap 이 준다. 좌우 여백은
   글과 같은 4px 를 남겨(요청) 아바타가 버튼 벽에 붙지 않고 둘 사이도 조금 벌어진다. */
.shared-pair-cell .avatar-chip { padding: 0 4px; }
/* 위아래 여백은 버튼이 아니라 아바타 자신이 margin 으로 갖는다(요청: 아바타 아래도
   옆과 같은 여백) — 버튼에 padding 을 주면 subgrid 줄이 셀 줄과 어긋난다. 양쪽 다
   같은 값이라 가운데 줄 안에서 두 아바타의 자리도 그대로 맞는다. */
.shared-pair-cell .avatar-circle { margin-block: 4px; }
.shared-pair-profile.is-start .avatar-circle { justify-self: end; }
.shared-pair-profile.is-end .avatar-circle { justify-self: start; }
/* 아바타를 키우고 이름은 그 아래로(요청) — 관계 프로필의 가로 2열을 세로 쌓기로 바꾼다. */
/* subgrid 는 부모의 줄 간격을 물려받지 않고 자기 gap 을 쓴다 — .avatar-chip
   의 gap:8px(character.css)이 셀의 6px 과 달라 두 버튼의 아바타가 어긋났다. 같은 값으로 맞춘다. */
.shared-pair-cell .avatar-chip {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 6px;
}
.shared-pair-profile.is-start { justify-items: start; text-align: left; }
.shared-pair-profile.is-end { justify-items: end; text-align: right; }
/* 아바타는 72px 를 넘지 않되 칸이 좁아지면 같이 줄어든다 — 고정 72px 이면 좁은 창에서
   두 프로필의 최소 폭이 칸보다 커져 두 번째가 밖으로 밀려 잘린다. aspect-ratio:1 이라
   높이는 따라온다(character.css). */
.shared-pair-cell .avatar-circle { width: 100%; max-width: 72px; }
/* 이름 / 관계 라벨·설명 / 한 줄 소개 / 색 칩을 한 줄씩 쌓는다. 이름만 한 줄로 자르고
   (character.css 의 > span 규칙) 나머지는 접히게 둔다. */
.shared-pair-cell .avatar-chip-text {
  width: 100%; display: flex; flex-direction: column; gap: 3px;
}
.shared-pair-profile.is-start .avatar-chip-text { align-items: flex-start; }
.shared-pair-profile.is-end .avatar-chip-text { align-items: flex-end; }
.shared-pair-cell .avatar-chip-label { white-space: normal; }
.shared-pair-cell .character-color-groups { align-self: auto; gap: 2px; }
.shared-pair-profile.is-start .character-color-groups { justify-content: flex-start; }
.shared-pair-profile.is-end .character-color-groups { justify-content: flex-end; }
/* 설명·색이 없어도 자리는 지킨다(요청) — 한쪽만 줄이 짧으면 두 캐릭터의 줄 위치가
   어긋난다. line-height 를 고정해야 "값이 있을 때"와 높이가 정확히 같아진다
   (normal 이면 빈 칸이 3px 쯤 낮았다). 색 칩 줄은 칩 크기(14px)로 고정. */
.shared-pair-sub,
.shared-pair-message { line-height: 1.45; min-height: 1.45em; }
.shared-pair-colors { height: 14px; }

/* 채팅(페어 메뉴 전용) — OWNER는 단일 그룹채팅 로그, CHARACTER는 스레드 미리보기
   목록 + 상세(스레드도 같은 로그+작성창 레이아웃). 아바타는 사이드바 멤버 칩과
   같은 .avatar-circle 재사용. 메시지는 말풍선 없이 이름 옆에
   시간을 붙이는 디스코드식 레이아웃(요청). 수정/삭제는 인라인 버튼이 아니라
   롱프레스(모바일 롱터치) 툴바로만 연다(요청, .shared-msg-toolbar) — 노출
   여부(권한)는 여전히 서버가 내려준 is_mine/can_edit/can_delete가 정한다. */
.shared-chat { display: flex; flex-direction: column; height: 100%; gap: 8px; }
/* 작성창은 .comment-compose 를 그대로 쓰는데, 그쪽은 본문 폭에 맞추려고
   margin:0 auto 를 쓴다 — 여긴 부모가 flex 컬럼이라 가로 auto 마진이
   align-items:stretch 를 꺼버려서 바가 내용 폭만큼 쪼그라들었다(로그는 289px,
   바는 205px). 게시글 창에선 부모가 블록(.post-footer)이라 같은 규칙이 정상. */
.shared-chat > .comment-compose,
.shared-chat-thread-detail > .comment-compose { width: 100%; }
/* 줄 간격은 2px 였는데 답답해 보여 조금 넓혔다(요청). 같은 사람이 이어 보낸
   묶음(.is-grouped)은 음수 마진으로 그만큼 다시 좁혀 한 덩어리로 읽힌다. */
.shared-chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
/* 보낸 뒤 고친 메시지 표시 — 시간과 같은 톤으로 작게. */
.shared-chat-msg-edited { font-size: 10px; opacity: .5; }
/* 링크로 찾아온 줄 — 잠깐 강조했다가 사라진다(요청). */
@keyframes shared-chat-flash {
  0%, 55% { background-color: color-mix(in srgb, var(--focus-color) 30%, transparent); }
  100% { background-color: transparent; }
}
.shared-chat-msg.is-flash { animation: shared-chat-flash 2s ease-out; border-radius: 8px; }
.shared-chat-msg { display: flex; align-items: flex-start; gap: 10px; padding: 2px 4px; border-radius: 6px; }
/* 접힌 챕터의 줄 — display:flex 가 기본 [hidden] 규칙을 이기므로 여기서 다시 감춘다.
   (가져오기 화면 밖, 백업 상세에서도 접기가 먹어야 한다.) */
.shared-chat-msg[hidden] { display: none !important; }
/* 우클릭(모바일은 길게)으로 수정/삭제가 열리는 줄이라 hover 로 대상임을 알린다(요청).
   수정 중인 줄은 제외 — 입력칸 뒤로 강조색이 깔려 글이 읽기 나빴다. */
.shared-chat-msg:hover:not(:has(.inline-edit-input)) {
  background: color-mix(in srgb, var(--system-c-area-b-accent-color) calc(var(--system-c-area-b-accent-alpha) * 100%), rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha)));
}
/* 쓰거나 고치는 중인 줄 — 고른 줄 강조(.is-selected)·hover·손 모양을 다 끈다(요청).
   입력칸 뒤로 강조색이 깔리면 글이 안 읽히고, 끌 수 없는 줄에 손 모양이 뜨면 거짓말이다. */
/* .is-selected 규칙과 특이도가 같아 뒤에 오는 쪽에 밀렸다 — 한 단계 올려 확실히 이긴다. */
.shared-chat-msg:has(.inline-edit-input),
.shared-chat-msg.is-selected:has(.inline-edit-input) {
  background: transparent !important;
  box-shadow: none !important;
  cursor: default !important;
}
.shared-chat-msg .avatar-circle { width: 32px; flex: 0 0 32px; margin-top: 1px; }
/* 같은 사람이 1분 이내(요청)에 연달아 보낸 채팅은 두 번째부터 아바타/이름/
   시간을 숨긴다 — 아바타는 자리를 그대로 두어(visibility) 정렬이 안 흔들리게,
   이름+시간 줄은 차지하던 자리 자체를 없앤다(display:none). */
.shared-chat-msg.is-grouped { margin-top: -6px; }
/* 같은 사람이 이어 보낸 줄은 위아래를 조금 더 붙인다(요청) — 줄 사이 간격은 이미 0 이라
   남은 건 줄 자체의 세로 패딩(2px+2px)이다. 맞닿는 쪽만 절반으로 줄인다. */
.shared-chat-msg.is-grouped { padding-top: 1px; }
.shared-chat-msg:has(+ .shared-chat-msg.is-grouped) { padding-bottom: 1px; }
.shared-chat-msg.is-grouped .avatar-circle { visibility: hidden; }
.shared-chat-msg.is-grouped .shared-chat-msg-head { display: none; }
/* 이름 줄이 감춰지는 줄(묶인 줄·지문)이라도 좋아요/댓글 표기가 있으면 그 줄만 되살린다 —
   이름·시각은 그대로 감춘 채 표기만 오른쪽에 뜬다(요청). */
.shared-chat-msg.is-grouped .shared-chat-msg-head:has(.shared-chat-msg-engage),
.shared-chat-msg.is-narration .shared-chat-msg-head:has(.shared-chat-msg-engage) { display: flex; }
.shared-chat-msg.is-grouped .shared-chat-msg-head:has(.shared-chat-msg-engage) .shared-chat-msg-name,
.shared-chat-msg.is-grouped .shared-chat-msg-head:has(.shared-chat-msg-engage) .shared-chat-msg-time,
.shared-chat-msg.is-narration .shared-chat-msg-head:has(.shared-chat-msg-engage) .shared-chat-msg-name,
.shared-chat-msg.is-narration .shared-chat-msg-head:has(.shared-chat-msg-engage) .shared-chat-msg-time { display: none; }
.shared-chat-msg-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
/* 이름은 아바타와 윗줄을 맞춘다(요청) — 아바타 margin-top: 1px과 나란히. */
.shared-chat-msg-head { display: flex; align-items: baseline; gap: 6px; }
.shared-chat-msg-name { font-size: 13px; font-weight: 700; }
.shared-chat-msg-time { font-size: 11px; opacity: .5; }
.shared-chat-msg-content { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
/* 첨부 이미지(최대 4장, 요청) — 한 줄에 늘어놓고 2장 이상이면 작게. */
.shared-chat-msg-images { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.shared-chat-msg-image { display: block; max-width: 240px; max-height: 240px; border-radius: 8px; object-fit: cover; }
.shared-chat-msg-images:has(img + img) .shared-chat-msg-image { max-width: 150px; max-height: 150px; }
/* 인라인 수정(startInlineEdit) — 본문 div가 textarea+저장/취소로 바뀐다. */
.shared-chat-msg-content textarea { width: 100%; box-sizing: border-box; resize: none; font: inherit; }
/* 인라인 수정 입력은 공용 .inline-edit-input(homepage.css) — 첨부 버튼이 버튼 줄 맨 앞에 같이 선다. */
.shared-chat-msg .entry-reply-actions { display: flex; align-items: center; gap: 4px; }
/* 채팅 줄 메뉴(openMsgToolbar) — .post-editor-popover 틀 재사용, 항목은 세로(요청). */
.shared-msg-toolbar { display: flex; flex-direction: column; gap: 2px; }
.shared-msg-toolbar .post-editor-popover-item { text-align: left; white-space: nowrap; }
/* 첨부 버튼/미리보기(comment-compose 폼 공용, 요청) */
/* 첨부 버튼 — 이모지(📎) 대신 선 아이콘(요청). 색은 그 줄의 글자색을 따른다. */
.shared-chat-attach-btn { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; padding: 0; border-radius: 6px; cursor: pointer; line-height: 1; }
.shared-chat-attach-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
 /* 캐릭터 채팅 시작 다이얼로그의 첨부 버튼(폼이 아닌 확인창이라 footer 없이 따로 놓임) */
.shared-chat-attach-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* 작성칸 안의 미리보기는 앞 아바타(36px)+간격(8px)만큼 들여쓴다(요청) — 입력
   글자와 같은 선에서 시작한다. 인라인 수정창엔 아바타가 없어 해당 없음. */
.comment-compose-panel > .shared-chat-attach-preview { padding-left: 44px; }
/* 첨부가 없을 땐 자리도 차지하면 안 된다 — 위 display:flex 가 네이티브 [hidden]
   (display:none)을 이겨서, 빈 미리보기가 높이 0 인 채로 패널 gap(8px)+자기
   margin-top(6px)만큼 입력칸과 보내기 줄 사이를 벌리고 있었다(요청). */
.shared-chat-attach-preview[hidden] { display: none !important; }
.shared-chat-attach-item { display: inline-flex; align-items: center; }
.shared-chat-attach-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.shared-chat-attach-preview button { background: none; border: none; cursor: pointer; opacity: .6; font-size: 14px; padding: 0 4px; color: inherit; }

/* 채팅 입력창은 댓글 입력창(.comment-compose, homepage.css) 폼을 그대로 쓴다
   — 답글 대상 답장 바(.comment-compose-replybar)만 뺀 버전. 아바타 크기만 이
   화면 전용 .avatar-circle에 맞게 재정의한다. */
.comment-compose-body .avatar-circle { width: 36px; height: 36px; flex: 0 0 36px; }
/* 작성창 앞 "누구로 말할지" 아바타 — 정적 표시(chatAvatarHTML 그대로)거나
   클릭 가능한 버튼(.shared-chat-speaker-btn, 캐릭터가 둘 이상일 때만). */
.shared-chat-speaker-btn {
  flex: 0 0 auto; padding: 0; border: none; background: none; cursor: pointer;
  border-radius: 50%; line-height: 0;
}
.shared-chat-speaker-btn:hover .avatar-circle { filter: brightness(.9); }
.shared-speaker-picker { display: flex; flex-direction: column; min-width: 140px; max-height: 220px; overflow-y: auto; }
.shared-speaker-picker-item { display: flex; align-items: center; gap: 8px; text-align: left; }
.shared-speaker-picker-item .avatar-circle { width: 24px; flex: 0 0 24px; }

/* 사이드바 없이 한 화면만 보는 창(요청) — 목록·기념일·메뉴는 통째로 빼고 ☰ 도 없앤다. */
.shared-record.is-bare .shared-side,
.shared-record.is-bare .shared-nav-backdrop,
.shared-record.is-bare [data-nav-toggle] { display: none !important; }
.shared-chat-thread-list { display: flex; flex-direction: column; gap: 6px; }
/* 채팅/백업 줄도 영역 B(본문 판) 위에 얹히는 컨텐츠 셀이라 영역 C 를 쓴다(요청) —
   후기 셀(.shared-review-grid > .grid-cell)·페어 셀(.shared-pair-cell)과 같은 표기. */
.shared-chat-thread-item {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 8px; border-radius: 8px;
  border: 1px solid rgba(var(--system-c-area-c-base-border-rgb), var(--system-c-area-c-base-border-alpha)) !important;
  background: rgba(var(--system-c-area-c-base-rgb), var(--system-c-area-c-base-alpha));
  color: var(--system-c-area-c-base-font-color);
  box-shadow: 0 0 5px -2px rgba(0, 0, 0, .14);
  cursor: pointer; text-align: left;
}
.shared-chat-thread-item:hover {
  background: color-mix(in srgb, var(--system-c-area-c-accent-color) calc(var(--system-c-area-c-accent-alpha) * 100%), rgba(var(--system-c-area-c-base-rgb), var(--system-c-area-c-base-alpha))) !important;
  color: var(--system-c-area-c-accent-font-color);
}
.shared-chat-thread-item .avatar-circle { width: 32px; }
.shared-chat-thread-text { display: flex; flex-direction: column; min-width: 0; }
.shared-chat-thread-name { font-size: 13px; font-weight: 600; }
.shared-chat-thread-preview { font-size: 12px; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared-chat-thread-detail { display: flex; flex-direction: column; height: 100%; gap: 8px; }
/* 첫 채팅은 이제 로그 안의 일반 채팅 줄(.shared-chat-msg)이라 전용 규칙이 없다. */

/* ---- 후기 상세: 구분 · 관리 모드 · 후기의 댓글/좋아요 ---- */
/* [관리]는 머리의 우측 하단에 절대 위치 — 메타 정보 열의 아랫정렬(flex-end)을 밀지 않는다(요청). */
.shared-review-detail-head { position: relative; }

/* 구분 제목 — 구분이 하나라도 있을 때만 그린다. 그 아래 첫 후기는 윗 구분선 없음(요청). */
.shared-review-section-title {
  display: flex; align-items: center; gap: 6px;
  margin: 0; padding: 12px 4px 4px;
  font-size: 13px; font-weight: 700;
}
.shared-review-section-title .shared-mini-btn { margin-left: auto; }
.shared-review-section + .shared-review-section { border-top: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)); }
.shared-review-section-body > .shared-review-post:first-child { border-top: 0 !important; }
.shared-review-section-empty { margin: 0; padding: 8px 4px 12px; font-size: 12px; color: var(--system-c-area-b-base-desc-font-color); }
.shared-review-section-add { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 4px; }
/* 밑줄 입력 — "새 구분 입력 후 엔터" / 작성칸의 새 구분 이름. */
.shared-review-section-input {
  width: 100%; max-width: 280px; box-sizing: border-box;
  border: 0; border-bottom: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha));
  border-radius: 0; background: transparent; padding: 4px 2px; font-size: 13px; color: inherit; outline: none;
}
.shared-review-section-input:focus { border-bottom-color: var(--focus-color); }

/* 드래그(관리 모드) — 환경설정 바로가기 정렬과 같은 고스트 + 자리표시자. */
.shared-review-post > .comment > .shared-review-drag-handle { align-self: flex-start; margin-top: 12px; }
.shared-review-drag-handle { cursor: grab; padding: 0 6px 0 0; color: var(--system-c-area-b-base-desc-font-color); user-select: none; touch-action: none; }
/* 관리 전용 조각은 마크업에 늘 있고 여기서만 보였다 감췄다 한다 — 모드를 오갈 때
   다시 읽고 다시 그리지 않아 화면이 깜박이지 않는다(요청). */
.shared-review-detail:not(.is-managing) .shared-review-drag-handle,
.shared-review-detail:not(.is-managing) .shared-review-section-add,
.shared-review-detail:not(.is-managing) .shared-review-section-empty,
.shared-review-detail:not(.is-managing) [data-section-delete],
.shared-review-detail:not(.is-managing) .shared-review-section.is-empty:not(.is-flat),
.shared-review-detail.is-managing .shared-review-empty,
.shared-pair-grid:not(.is-managing) .shared-pair-swap { display: none; }
.is-managing [data-section-drag] { cursor: grab; touch-action: none; user-select: none; }
.shared-review-drop-placeholder {
  box-sizing: border-box; margin: 4px;
  border: 1px dashed rgba(var(--system-c-area-b-accent-border-rgb), var(--system-c-area-b-accent-border-alpha));
  border-radius: 8px;
}
.shared-review-drag-ghost {
  position: fixed; z-index: 1000; pointer-events: none; opacity: .85; box-sizing: border-box;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha));
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18); border-radius: 8px;
}
.is-drag-source { opacity: .35; }
.shared-review-section-body.is-drag-target, .shared-review-posts.is-drag-target { outline: 1px dashed rgba(var(--system-c-area-b-accent-border-rgb), var(--system-c-area-b-accent-border-alpha)); outline-offset: 2px; }
/* 후기 본체(article)만 물든다 — 아래 댓글 목록은 그대로. */
.shared-review-post > .comment.is-revealed { background: color-mix(in srgb, var(--focus-color) 12%, transparent); transition: background .6s ease; }

/* 좋아요 — 본문 아래 오른쪽. */
.shared-review-post-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.shared-review-like { font-size: 12px; padding: 2px 6px; }
/* 하트도 머리줄의 [댓글][수정][삭제](.entry-reply-toggle, padding 0)과 같은 x 에서
   끝나야 한다(요청) — 자기 오른쪽 여백 6px + 테두리 자리 2px 때문에 8px 짧았다. */
.shared-review-post-foot > .shared-review-like { padding-right: 0; border-right-width: 0; }
/* 눌린 하트는 focus 파랑 고정이 아니라 그 영역의 폰트색을 따른다(요청) — 목록 셀
   (.grid-cell-like.is-liked, homepage.css)과 같은 처리다. */
.shared-review-like.is-liked { color: var(--system-c-area-b-base-font-color); }

/* 후기의 댓글 — 기존 댓글 스레드 마크업(.comment-thread/.comment/.entry-*)을 그대로 쓰되
   후기 아래에 왼쪽 선으로 들여 붙인다. 에디터 없이 평문 한 줄 입력. */
/* 후기의 댓글은 들여쓰지 않는다(요청) — 다른 후기와 같은 폭·같은 줄에 놓인다. */
.shared-review-comments { margin-top: 8px; }
/* 좌우 모두 0 이어야 후기와 같은 폭이 된다 — 예전엔 왼쪽만 0 으로 두어 기본값
   (.comment-thread padding:14px 10px, homepage.css)의 오른쪽 10px 가 남았고,
   그래서 [댓글 수정 삭제]가 [답글 수정 삭제]보다 10px 안쪽에 섰다.
   margin-left 는 지울 수 없는 강조 앞선 자리(border-left:2px transparent !important)를
   내용 밖으로 밀어내, 왼쪽도 후기와 정확히 같은 x 에서 시작하게 한다. */
.shared-review-comments .comment-thread, .shared-review-comments .comment { padding-inline: 0; border-left: 0; }
.shared-review-comments[hidden] { display: none; }
/* 발치 왼쪽의 [댓글 N ▾] 접기/펴기 — 오른쪽의 [댓글 쓰기][♡]와 갈라 둔다. */
/* [댓글 N ▸] — 후기 덩어리(.comment)의 형제라 후기 폭의 왼쪽 끝에서 시작한다.
   프로필 사진과 같은 x 에 맞추는 게 요점이라 왼쪽 안쪽 여백을 0 으로 둔다
   (기본 padding 2px 6px 이면 6px 안쪽으로 들어간다). */
.shared-review-comment-toggle { font-size: 12px; padding: 2px 6px 2px 0; color: var(--system-c-area-b-base-desc-font-color); }
/* [댓글 N ▸] 와 좋아요는 후기 덩어리 아래 한 줄에 놓는다(요청) — 토글은 왼쪽,
   좋아요는 오른쪽 끝. margin-left 2px 는 .comment 가 강조 앞선 자리로 비워 둔
   border-left 폭으로, 이 줄에는 그 테두리가 없어 그만큼 밀어야 아바타와 x 가 맞는다. */
.shared-review-post > .shared-review-post-foot { margin-left: 2px; }
.shared-review-post-foot > .shared-review-comment-toggle { margin-right: auto; }
.shared-review-comments .comment-thread { margin-left: -2px; }
.shared-review-comments .comments { display: flex; flex-direction: column; }
.shared-review-comment-edit { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }

/* 하단 작성 푸터 — 게시글 상세의 댓글 푸터(.comment-compose)를 스크롤 영역(.shared-main)
   아래 형제로 둔다. 새 후기 모드에서만 별점·구분 줄(meta)이 보인다. 구분은 커스텀
   select 라 .custom-select-wrap 이 이 클래스를 물려받는다(광역 입력 테마 대신 버튼 판). */
/* 작성칸은 본문(후기 목록)과 같은 폭을 쓴다(요청) — .comment-compose 의 기본값은
   max-width:720px + 가운데 정렬이라(homepage.css, 본문 단이 좁은 게시글 창 기준)
   여기선 본문보다 안쪽으로 들어와 보였다. 좌우 여백은 후기 카드(.shared-main)의
   안쪽 여백과 같은 10px 로 푸터가 직접 갖는다. */
/* 푸터는 바깥 여백을 갖지 않는다(요청) — 작성칸이 후기 카드와 같은 폭으로
   창 아래를 꽉 채운다. 푼 건 .comment-compose 의 max-width(720px)와 가운데 정렬뿐,
   안쪽 여백은 다른 댓글창과 같이 그대로 둔다(요청). */
.shared-review-footer { flex: 0 0 auto; padding: 0; }
/* 채팅 입력 푸터 — 후기 푸터와 같은 자리(.shared-main 밖 형제)·같은 규격.
   예전엔 입력칸이 스크롤되는 컨텐츠 영역 안에 있었다(요청). */
.shared-chat-footer { flex: 0 0 auto; padding: 0; }
.shared-chat-footer .comment-compose { max-width: none; margin-inline: 0; }
.shared-chat-footer .comment-compose:not(.is-compose-expanded) { display: flex; align-items: center; gap: 8px; }
.shared-chat-footer .comment-compose:not(.is-compose-expanded) .comment-compose-panel { flex: 1 1 auto; min-width: 0; }
.shared-chat-footer .comment-compose:not(.is-compose-expanded) .comment-compose-footer { flex: 0 0 auto; padding-top: 0; }
.shared-review-footer .comment-compose { max-width: none; margin-inline: 0; }
.shared-review-compose-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.shared-review-compose-meta[hidden], [data-review-compose-expand][hidden] { display: none; }
/* 버튼(라벨)이 absolute 라 wrap 이 내용 폭을 못 잡는다(homepage.css 주석) — 폭을 준다. */
.custom-select-wrap.shared-review-section-select { width: 130px; font-size: 12px; }
.shared-review-post-foot { gap: 6px; }
/* hidden 속성이 위 display:flex 에 눌리지 않게. */
.shared-review-section-input[hidden] { display: none; }

/* ---- 좁은 폭(모바일·좁은 창) — 후기 상세 ---- */
/* 본문 영역을 컨테이너로 삼아 폭으로 판단한다(창 모드에서 창을 좁혀도 같은 규칙). */
.shared-main { container-type: inline-size; }
@container (max-width: 480px) {
  /* 작품 정보 머리: 포스터 옆 2단이 눌리므로 세로로 쌓고, [관리]는 절대 위치 대신
     그리드 마지막 칸 오른쪽에 — 메타 마지막 줄을 덮지 않는다. */
  .shared-review-detail-head { grid-template-columns: 1fr; }
  /* 정보 열은 homepage.css 가 grid-column:2 로 박아 둔다 — 한 열이면 그 자리표시를 풀어야 아래로 내려온다. */
  .shared-review-detail-head .movie-detail-info-fields { grid-column: auto; grid-row: auto; }
  .shared-review-detail-head .movie-detail-poster { width: 120px; }
}
/* 후기 머리(작성자 칩 + 시각/버튼)와 댓글 머리(이름 + 시각 + 답글/수정/삭제)는 폭이
   모자라면 다음 줄로 접는다 — 예전엔 버튼이 오른쪽으로 삐져나갔다. */
.shared-review-post header, .shared-review-post .entry-head { flex-wrap: wrap; row-gap: 4px; }
.shared-review-post .entry-meta { margin-left: auto; }

/* 채팅 백업 — 선택 모드의 줄 강조(후기 인용 강조와 같은 강조 톤), 요약 푸터, 백업 목록 줄. */
.shared-chat-log.is-selecting .shared-chat-msg, .shared-chat-thread-list.is-selecting .shared-chat-thread-item { cursor: pointer; }
.shared-chat-log.is-selecting .shared-chat-msg { border-radius: 8px; }
.shared-chat-msg.is-selected, .shared-chat-thread-item.is-selected {
  background: rgba(var(--system-c-area-b-accent-rgb), var(--system-c-area-b-accent-alpha)) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--system-c-area-b-accent-border-rgb), var(--system-c-area-b-accent-border-alpha));
}
.shared-backup-bar { display: flex; align-items: center; gap: 6px; }
/* 요약 문구는 버튼 바로 왼쪽에 붙인다(요청) — 예전엔 flex:1 로 늘어나 줄 왼쪽 끝에 떨어져 있었다. */
.shared-backup-bar-text { flex: 0 1 auto; min-width: 0; margin-left: auto; text-align: right; font-size: 12px; color: var(--system-c-area-b-base-desc-font-color); }
.shared-backup-item { grid-template-columns: minmax(0, 1fr) auto; }
/* 백업 한 줄의 오른쪽 — 참여자 아바타를 가로로 늘어놓는다(요청, 종류 태그 대신).
   겹쳐 놓았다가 겹치지 않게 바꿨다(요청) — 빈 아바타가 옆 아바타에 가려 보였다. */
.shared-backup-faces { display: flex; align-items: center; flex: 0 0 auto; gap: 4px; }
.shared-backup-face { display: inline-flex; }
.shared-backup-face .avatar-circle { width: 22px; height: 22px; flex: 0 0 22px; }
/* 접힌 나머지 인원 — 아바타와 같은 동그라미 자리(요청). 이름은 title 로 보여 준다. */
.shared-backup-more {
  width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; cursor: help;
  background-color: color-mix(in srgb, currentColor 14%, transparent);
}
/* 아바타가 없는 참여자도 같은 동그라미 자리를 차지한다(요청) — 바탕이 없으면 글리프만
   떠서 옆 아바타보다 좁아 보인다. 테마 배경 변수는 유리 톤(알파 0)일 수 있어 안 보이므로,
   판정 칩과 같이 제 글자색을 옅게 깔아 어느 테마에서도 원이 보이게 한다. */
.shared-backup-face .avatar-circle-empty {
  background-color: color-mix(in srgb, currentColor 14%, transparent) !important;
}

/* 백업 > 가져오기(요청) — 미리보기 판 하나가 전부다. 할 일은 판 위에 떠 있는 둥근 버튼:
   문서(붙여넣기)·인물(발신자 연결)·✕(취소)·＋(등록). 빈 판은 눌러서·끌어다 놓아서 파일을 받는다. */
.shared-import { position: relative; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }
.shared-import-log { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.shared-import-log .shared-chat-log { flex: 1 1 auto; height: auto; min-height: 0; overflow: auto; }
.shared-import.is-empty { cursor: pointer; }
.shared-import.is-dropping { outline: 2px dashed var(--focus-color); outline-offset: -6px; }
.shared-import-guide {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  margin: 0; pointer-events: none; text-align: center;
}
/* 문서·인물 버튼 — 판 오른쪽 위에 세로로. */
.shared-import-tools { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
/* 색·테두리는 일반 버튼(.normal-button) 테마 그대로 쓰고(요청), 여기서는 동그란 모양만 준다. */
.shared-import-tool {
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .25);
}
.shared-import-tool svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.shared-import-tool[hidden] { display: none !important; }
/* 취소(✕)·등록(＋) — 다른 화면의 [+] 와 같은 자리. 등록만 강조색 동그라미다. */
.shared-import-fab { position: absolute; right: 12px; bottom: 12px; z-index: 2; flex-direction: row; align-items: center; }
.shared-import-tool.is-fab { width: 40px; height: 40px; }
.shared-import-fab .fab-button { width: 40px; height: 40px; }
.shared-import-fab .fab-button svg { width: 18px; height: 18px; }
/* 붙여넣기 팝업 안의 글칸. */
.shared-import-dialog .shared-import-text { min-height: 180px; }
.shared-import-dialog .custom-select-wrap { width: 100%; }
/* 붙여넣기 칸은 팝업 높이를 다 쓴다 — 크기 손잡이는 없앤다(요청). */
.shared-import-text { width: 100%; resize: none; box-sizing: border-box; font: inherit; }
/* 챕터 머리줄(요청, 가져오기 미리보기·백업 상세 공용) — 제 챕터가 지나갈 때까지 위에 붙어 따라온다. 아래 줄이 비쳐
   보이면 안 되므로 판은 불투명한 일반 버튼 색을 쓴다. */
/* 챕터 한 칸 — 목록 안에서는 그냥 차례대로 흘러간다(따라다니는 건 스크롤 밖의
   .shared-chat-chapter-bar 가 맡는다). */
.shared-chat-chapter-group { display: flex; flex-direction: column; gap: inherit; }
.shared-chat-chapter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 2px;
  padding: 4px 0;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  /* 연필이 앞, 제목이 그 뒤, 아래는 줄 전체를 가로지르는 밑줄로 가른다(요청). */
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(var(--system-c-area-b-base-divider-rgb), var(--system-c-area-b-base-divider-alpha)) !important;
  background: transparent !important;
}
/* 스크롤 밖의 "지금 챕터" 줄 — 목록 위에 얹혀 스크롤에 따라 이름만 바뀐다(요청).
   스크롤 영역 밖이라 투명해도 아래 글과 겹치지 않는다. */
.shared-chat-chapter-bar { flex: 0 0 auto; margin: 0 0 2px; }
.shared-chat-chapter:first-child { margin-top: 0; }
.shared-chat-chapter.is-collapsed { opacity: .7; }
.shared-chat-chapter-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared-chat-chapter-edit { flex: 0 0 auto; display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border-radius: 6px; }
.shared-chat-chapter-edit svg { width: 14px; height: 14px; }
.shared-chat-chapter-input { width: 100%; height: 22px; padding: 0 6px; font: inherit; box-sizing: border-box; }
/* 자리 옮기기로 끄는 줄이라 글자가 끌려 잡히면 안 된다(요청) — 수정 중인 입력칸만 고른다. */
.shared-import-log .shared-chat-msg { user-select: none; }
.shared-import-log .shared-chat-msg .inline-edit-input { user-select: text; }
/* 나레이션 줄 — 이름줄도 아바타 자리도 없이 가운데 정렬(요청).
   좌우 여백은 아바타 자리(32px)+간격(10px) 만큼 — 대사 줄의 본문 시작선과 맞는다(요청). */
.shared-chat-msg.is-narration { padding-inline: 46px; }
/* 지문과 대사가 맞닿는 자리만 벌린다(요청) — 지문끼리 이어질 때는 그대로 붙어 있다. */
.shared-chat-msg.is-narration + .shared-chat-msg:not(.is-narration),
.shared-chat-msg:not(.is-narration) + .shared-chat-msg.is-narration { margin-top: 8px; }
/* 줄 왼쪽의 제 아바타만 지운다 — 본문 안(수치 변동 덩어리)의 아바타까지 지우면 안 된다. */
.shared-chat-msg.is-narration > .avatar-circle { display: none; }
.shared-chat-msg.is-narration .shared-chat-msg-head { display: none; }
/* 나레이션(지문)은 가운데로, 대사와 구분되게 굵게(요청). */
.shared-chat-msg.is-narration .shared-chat-msg-content { text-align: center; font-weight: 700; }
/* 이름줄이 없는 줄(나레이션·묶인 줄)은 아바타 자리(32px)만큼 키가 남아 글이 위로
   붙어 보였다(요청: 선택 강조 안에서 글이 가운데가 아님) — 세로 가운데로 맞춘다. */
.shared-chat-msg.is-narration, .shared-chat-msg.is-grouped { align-items: center; }
/* ccfolia 수치 변동 칩(요청) — 오르면 파랑, 내리면 빨강. 판정 칩과 같은 모양이라
   .shared-chat-tag 를 그대로 쓰고 색만 더한다. */
.shared-chat-tag.is-up { color: #2b97ff; }
.shared-chat-tag.is-down { color: #e0483a; }
/* 표정 칩 — 그 줄을 말할 때의 얼굴(무대가 이 표시를 보고 그림을 바꾼다). */
/* 표정 칩은 채팅 로그에 안 보인다(요청) — 값만 줄에 남아 무대가 그 얼굴로 선다.
   지우지 않고 감추는 것은, 나중에 다시 재생할 때 그 얼굴을 그대로 쓰기 위해서다. */
.shared-chat-tag.is-face { display: none; }
/* 표정 칩만 보낸 줄은 로그에서 통째로 빠진다(요청) — 얼굴을 바꾸는 지시일 뿐이라
   말풍선이 필요 없다. 무대는 이 줄을 읽어 얼굴만 갈아 끼운다. */
.shared-chat-msg.is-face-only { display: none; }
/* 읽은 데까지(요청) — 안 읽은 첫 줄 위에 가운데 정렬 안내 한 줄. */
.shared-chat-readline { display: flex; align-items: center; justify-content: center; margin: 10px 0; }
.shared-chat-readline > span {
  padding: 0 10px; font-size: 11px; line-height: 1.6;
  color: var(--system-c-area-b-base-desc-font-color);
}
/* 버전 표시는 글자도 없는 자리 표시일 뿐이다 — 무대만 data-ver 를 읽는다(요청). */
.shared-chat-ver { display: none; }
/* 수정창의 말한 캐릭터(요청) — 이름은 위, 아바타는 오른쪽. 눌러서 바꾼다. */
.inline-edit-speaker-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.inline-edit-row { display: flex; align-items: flex-start; gap: 8px; }
/* 세로 flex — 줄바꿈 공백이 빈 줄 상자를 만들어 입력칸 위아래에 큰 여백이 생겼다(요청). */
.inline-edit-row > .inline-edit-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.inline-edit-row > .shared-chat-speaker-btn { flex: 0 0 auto; }
/* 입력줄 아래 버전·표정 고르개(요청) — 보내기 버튼과 같은 줄, 왼쪽에 선다. */
.chat-compose-marks { margin-right: auto; }
.chat-compose-marks[hidden] { display: none; }
/* 최소 모드에서는 고르개도 접어 둔다 — 글만 보이는 모드다(요청). */
.window.is-chat-mode-min .chat-compose-marks { display: none; }
/* 수정창의 버전·표정 고르기(요청) — 저장/취소 버튼과 같은 줄, 왼쪽에 선다. */
.inline-edit-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inline-edit-marks[hidden] { display: none; }
/* 그 줄만 폭을 다 쓴다 — 버튼은 오른쪽 끝, 고르기는 왼쪽 끝. */
.entry-reply-actions:has(> .inline-edit-marks) { align-self: stretch; justify-content: flex-end; }
.entry-reply-actions > .inline-edit-marks { margin-right: auto; }
/* 본문 안의 태그(roll20 판정결과 등) — 작은 칩, 마우스를 올리면 기준치·굴림이 뜬다.
   테두리는 없고(요청) 판은 제 글자색을 옅게 깔아 결과 색을 그대로 따른다.
   굵기는 대성공/대실패만 — 나레이션 줄의 굵은 글씨를 물려받지 않게 400 으로 되돌린다(요청). */
.shared-chat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  font-weight: 400;
  border: 0;
  color: var(--system-c-area-b-base-desc-font-color);
  background: color-mix(in srgb, currentColor 14%, transparent);
}
/* 굴림 칩 앞의 기능 아이콘(요청) — 글자와 같은 크기로 세우고, 판정 결과 색을 같이 입는다.
   창 테마가 body * 로 모든 요소에 색을 박아 두므로(homepage.css) 칩 안에서는 물려받게 되돌린다. */
.shared-chat-tag > .character-sheet-icon,
.shared-chat-tag > .character-sheet-icon * { color: inherit; }
.shared-chat-tag > .character-sheet-icon { width: 1em; height: 1em; flex: 0 0 auto; opacity: .75; }
/* 판정 결과별 색(요청). 뜻을 담은 색이라 테마와 무관한 고정값이다.
   성공은 초록(보통) → 청록(어려운) → 파랑(극단적) 으로 깊어지고 실패는 회색.
   1/100 인 대성공/대실패는 색만으로는 안 띄어서 판을 꽉 채워 질감을 달리한다. */
.shared-chat-tag.is-success { color: #2e9e5b; }
.shared-chat-tag.is-hard { color: #0f9b8e; }
.shared-chat-tag.is-extreme { color: #2b7fff; }
.shared-chat-tag.is-fail { color: #8a8a8a; }
.shared-chat-tag.is-critical,
.shared-chat-tag.is-fumble {
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
}
.shared-chat-tag.is-critical { background: #6d4aff; }
.shared-chat-tag.is-fumble { background: #e0483a; }
/* 판 안의 flex 가 hidden 을 이기지 않게. */
.shared-import [hidden] { display: none !important; }

/* 채팅 줄 좋아요/댓글 — 본문 아래 작은 요약("♥ 2 · 댓글 3"), 누르면 그 아래 댓글 판. */
/* 이름·시각 옆 오른쪽 끝에 붙는다(요청). */
.shared-chat-msg-engage { display: inline-flex; gap: 8px; margin-left: auto; padding: 0; font-size: 11px; color: var(--system-c-area-b-base-desc-font-color); cursor: pointer; }
.shared-chat-msg-engage .is-liked { color: var(--focus-color); }
/* 줄 상세에서는 그 줄이 이미 "고른 대상" 이라 hover 로 알릴 일이 없다(요청). */
.shared-chat-line-detail .shared-chat-msg:hover { background: transparent !important; }
/* 줄 상세 화면(메시지 전문 + 댓글) — 그 아래 후기와 같은 .comments 목록. 입력은 채팅 푸터.
   가르는 선은 뺐다(요청) — 여백만으로 나눈다. */
.shared-chat-line-comments { margin-top: 10px; padding-top: 8px; font-size: 12px; }
.shared-chat-comment-replyto { font-size: 11px; color: var(--system-c-area-b-base-desc-font-color); white-space: nowrap; margin-right: auto; }

/* 화면 제목 우클릭 [캐릭터 버전 지정] — 캐릭터 한 줄(아바타 · 이름 · 버전 선택). */
.shared-version-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.shared-version-row .avatar-circle { width: 34px; height: 34px; flex: 0 0 auto; }
.shared-version-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

/* 홈 꾸미기(요청) — 관계 스탠딩과 같은 캔버스(공용 stage-canvas.js, 클래스는 character.css 의 .character-stage*).
   위젯: 달력(.shared-cal 재사용)·D-day·(페어) 캐릭터 프로필. 기준 폭(data-stage-zoom-base)만큼 zoom 으로 키운다. */
.shared-home-stage-wrap { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.shared-home-widget { box-sizing: border-box; border-radius: 12px; padding: 10px 12px;
  background: rgba(var(--system-c-area-b-base-rgb), var(--system-c-area-b-base-alpha));
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
  color: var(--system-c-area-b-base-font-color); }
.shared-home-widget.is-calendar { width: 360px; }
.shared-home-widget.is-calendar .shared-cal-cell { cursor: pointer; }
.shared-home-widget.is-calendar .shared-cal-mark.is-review { color: #c98a1e; }
.shared-home-widget.is-calendar .shared-cal-mark.is-session { color: #4a7fd0; }
.shared-home-widget.is-calendar .shared-cal-mark.is-schedule { color: var(--mark-color, var(--system-c-area-b-accent-color)); }
.shared-home-widget.is-dday { width: 200px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.shared-home-widget.is-dday strong { font-size: 13px; }
.shared-home-widget.is-dday .shared-home-dday-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.shared-home-widget.is-dday .shared-home-dday-date { font-size: 11px; opacity: .7; }
/* 그날 목록 팝업 */
.shared-home-day-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.shared-home-day-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; text-align: left; cursor: pointer;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)); }
.shared-home-day-row .settings-pill { flex: 0 0 auto; }
.shared-home-day-row.is-static { cursor: default; }
/* 일정 추가 줄(요청) — 라벨을 따로 두지 않고 다른 폼과 같은 플로팅 라벨 칸 + 동그란 색칩.
   [추가]는 아래 버튼 줄(닫기 옆)로 내렸다 — 한 줄에 넷을 욱여넣어 버튼 글자가 세로로 쪼개졌다. */
.shared-home-field { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.shared-home-field > .auth-field { flex: 1 1 auto; min-width: 0; }
.shared-home-color {
  flex: 0 0 auto; width: 34px; height: 34px; padding: 2px; cursor: pointer;
  border-radius: 50%; background: none;
  border: 1px solid rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha));
}
.shared-home-color::-webkit-color-swatch-wrapper { padding: 0; }
.shared-home-color::-webkit-color-swatch { border: none; border-radius: 50%; }

/* 가져오기 표정 설정 팝업(요청) — 아이콘 + 이름칸 + 쓴 횟수 한 줄씩. */
.shared-import-faces { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }
.shared-import-face { display: flex; align-items: center; gap: 8px; }
.shared-import-face > img { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; }
.shared-import-face > .auth-field { flex: 1 1 auto; min-width: 0; }
.shared-import-face > .grid-cell-meta { flex: 0 0 auto; }
/* 기존 버전을 고르면 아이콘마다 "그 버전의 어느 표정에 연결할지" 고르개가 붙는다(요청). */
/* 표정 목록이 든 팝업은 조금 넓게(요청: 고르개 옆 썸네일) — 기본 320px 로는 줄이 넘친다. */
.confirm-dialog.shared-import-dialog:has(.shared-import-faces) { width: min(440px, 92vw); max-width: min(440px, 92vw); }
.shared-import-face > .shared-import-face-link { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
/* 커스텀 셀렉터로 바뀌면 select 는 .custom-select-wrap 안으로 들어간다 — 둘 다 같은 폭. */
.shared-import-face > .shared-import-face-link > select,
.shared-import-face > .shared-import-face-link > .custom-select-wrap { width: 6.5em; flex: 0 0 auto; }
.shared-import-face-thumb { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; }

/* 정주행 버튼(요청) — 무대 오른쪽 위 구석. 읽는 중에는 포커스 컬러로 켜 둔다. */
.shared-chat-stage-binge {
  position: absolute; right: 8px; top: 8px; z-index: 3;
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .35); color: #fff;
}
.shared-chat-stage-binge.is-on { background: var(--focus-color); }

/* 줄과 함께 보내는 무대 배경(요청) — 지정해 둔 동안은 포커스 색으로 켜 둔다. */
.shared-chat-attach-btn.is-on { color: var(--focus-color); }

/* 스탠딩 설정 미리보기의 초기화 단추(요청) — 정주행 단추와 같은 자리·같은 모양. */
.shared-chat-stage-preview { position: relative; }
.shared-stage-reset-btn {
  position: absolute; right: 8px; top: 8px; z-index: 3;
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .35); color: #fff;
}
/* 크기·위치를 한꺼번에 적용할 캐릭터 고르기(요청) — 줄은 사이드바 "소속 캐릭터"와 같은 칩,
   고른 표시는 카드 고르기와 같은 체크 표시(.grid-cell-select)를 그대로 쓴다. */
.shared-stage-apply { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; }
/* 사이드바 칩과 같은 고정 폭 — .avatar-chip 의 아바타는 10cqi 라 컨테이너가 없는
   팝업 안에서는 풍선처럼 커진다(.shared-member 가 쓰는 것과 같은 덮어쓰기). */
.shared-stage-apply-row { position: relative; width: 100%; padding-right: 28px; grid-template-columns: 28px minmax(0, 1fr); text-align: left; }
.shared-stage-apply-row .avatar-circle { width: 28px; }
.shared-stage-apply-row > .grid-cell-select { top: 50%; right: 6px; transform: translateY(-50%); }
.shared-stage-apply-row[aria-pressed="true"] { outline: 2px solid var(--focus-color); outline-offset: -2px; border-radius: 8px; }
.shared-stage-apply-row[aria-pressed="true"] > .grid-cell-select { background: var(--focus-color); border-color: var(--focus-color); }
/* 고른 줄에는 체크 표시를 그린다(요청) — 칸만 칠하면 켜졌는지 헷갈린다. */
.shared-stage-apply-row[aria-pressed="true"] > .grid-cell-select::after {
  content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* 채팅 줄을 그 자리에서 고칠 때(요청) — 줄 사이에 끼어드는 판이라 위아래를 바짝 붙인다.
   공용 답글 폼의 넉넉한 여백(min-height 50px·바깥 여백)은 여기선 빈 자리로만 보인다. */
.shared-chat-msg .entry-reply-input-wrap { gap: 4px; }
.shared-chat-msg .entry-reply-input-wrap textarea { min-height: 0; margin: 0; }
.shared-chat-msg .entry-reply-actions { margin-bottom: 0; }

/* 백업 한 건의 댓글(요청) — 포스트처럼 본문 아래에 구분선 한 줄을 긋고 댓글이 이어진다.
   입력은 채팅과 같은 아래 푸터(renderLineComments)가 맡는다. */
.shared-backup-comments { margin-top: 18px; }
.shared-backup-comments-line { height: 1px; margin-bottom: 12px;
  background: rgba(var(--system-c-area-b-base-border-rgb), var(--system-c-area-b-base-border-alpha)); }

/* 긴 로그(가져온 대화·백업)는 줄이 수백 개다 — 화면 밖 줄은 배치·그리기를 건너뛴다(요청:
   스크롤·무대 비율 조절이 버벅였다). contain-intrinsic-size 의 auto 는 한 번 그린 실제
   높이를 기억해 스크롤 자리가 튀지 않게 한다. */
.shared-chat-log > [data-chat-msg],
.shared-chat-log > [data-thread-msg] {
  content-visibility: auto;
  contain-intrinsic-size: auto 40px;
  /* 로그는 세로 flex 라 줄이 줄어들 수 있다 — 건너뛴 줄은 내용이 없어 여백만 남게 찌부러지고,
     굴려 내려갈 때마다 전체 높이가 요동쳐 스크롤바가 튀었다(요청). 줄은 줄어들지 않는다. */
  flex-shrink: 0;
}
