#container_title {
  display: none !important;
}

body.harootalk-body #contents_wrap > section.sub,
body.harootalk-body .contents_wrap > section.sub {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.harootalk-page {
  --ht-ink: #171717;
  --ht-muted: #737373;
  --ht-line: #e5e5e5;
  --ht-surface: #fff;
  --ht-canvas: #f5f5f5;
  --ht-accent: #262626;
  --ht-accent-strong: #0a0a0a;
  --ht-accent-soft: #eeeeee;
  --ht-accent-rgb: 38, 38, 38;
  --ht-other-bubble: #fff;
  --ht-mine-bubble: #fff;
  --ht-bubble-ink: #171717;
  --ht-mine-ink: #171717;
  --ht-font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  box-sizing: border-box;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 24px 56px;
  color: var(--ht-ink);
  font-family: var(--ht-font);
}

.harootalk-page[data-palette="slate"] {
  --ht-canvas: #f1f4f7;
  --ht-accent: #334155;
  --ht-accent-strong: #1e293b;
  --ht-accent-soft: #e9eef3;
  --ht-accent-rgb: 51, 65, 85;
}

.harootalk-page[data-palette="violet"] {
  --ht-canvas: #f4f2fa;
  --ht-accent: #6855d9;
  --ht-accent-strong: #5140b8;
  --ht-accent-soft: #ece8ff;
  --ht-accent-rgb: 104, 85, 217;
}

.harootalk-page[data-palette="warm"] {
  --ht-canvas: #f8f3ed;
  --ht-accent: #8a4b2f;
  --ht-accent-strong: #6f3924;
  --ht-accent-soft: #f3e7dd;
  --ht-accent-rgb: 138, 75, 47;
}

.harootalk-page[data-palette="white"] {
  --ht-ink: #171717;
  --ht-muted: #737373;
  --ht-line: #e5e5e5;
  --ht-surface: #fff;
  --ht-canvas: #fff;
  --ht-accent: #262626;
  --ht-accent-strong: #0a0a0a;
  --ht-accent-soft: #f5f5f5;
  --ht-accent-rgb: 38, 38, 38;
  --ht-other-bubble: #fff;
  --ht-mine-bubble: #fff;
  --ht-bubble-ink: #171717;
  --ht-mine-ink: #171717;
}

.harootalk-page *,
.harootalk-page *::before,
.harootalk-page *::after {
  box-sizing: border-box;
}

.harootalk-page button,
.harootalk-page textarea {
  font: inherit;
}

.harootalk-chat {
  display: grid;
  min-height: 680px;
  height: min(76vh, 860px);
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--ht-line);
  border-radius: 24px;
  background: var(--ht-surface);
  box-shadow: 0 20px 60px rgba(23, 23, 23, .08);
}

.harootalk-chat-head {
  position: relative;
  z-index: 20; /* 플로팅 공지(z5)보다 위 — 설정 패널이 공지에 가려지지 않게 */
  display: flex;
  min-height: 60px;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--ht-line);
  background: var(--ht-surface);
}

.harootalk-chat-title {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
}

.harootalk-chat-title > strong {
  font-size: 15px;
  letter-spacing: -.02em;
}

.harootalk-chat-title span {
  color: var(--ht-muted);
  font-size: 11px;
}

.harootalk-chat-title b {
  color: var(--ht-ink);
  font-weight: 800;
}

.harootalk-header-presence {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.harootalk-header-presence > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.harootalk-header-presence > span {
  margin: 0 2px;
}

.harootalk-header-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.harootalk-identity,
.harootalk-connection {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.harootalk-identity {
  color: var(--ht-muted);
  cursor: pointer;
}

.harootalk-identity:disabled {
  cursor: default;
  opacity: .7;
}

.harootalk-identity img {
  width: 28px;
  height: 28px;
  border: 1px solid var(--ht-line);
  border-radius: 50%;
  object-fit: cover;
}

.harootalk-identity span {
  font-size: 11px;
}

.harootalk-identity strong {
  color: var(--ht-ink);
  font-size: 12px;
}

.harootalk-connection {
  color: var(--ht-muted);
  font-size: 11px;
  font-weight: 700;
}

.harootalk-connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
}

.harootalk-connection[data-status="online"] .harootalk-connection-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .1);
}

.harootalk-connection[data-status="retry"] .harootalk-connection-dot {
  animation: harootalk-pulse 1s infinite;
}

.harootalk-header-divider {
  width: 1px;
  height: 16px;
  background: var(--ht-line);
}

.harootalk-settings {
  position: relative;
}

.harootalk-settings-toggle {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #737373;
  cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}

.harootalk-settings-toggle:hover,
.harootalk-settings-toggle[aria-expanded="true"] {
  background: transparent;
  color: #404040;
  transform: rotate(20deg) scale(1.08);
}

.harootalk-settings-toggle:focus-visible,
.harootalk-tool-button:focus-visible,
.harootalk-send-button:focus-visible,
.harootalk-identity:focus-visible,
.harootalk-message-avatar:focus-visible {
  outline: 3px solid rgba(var(--ht-accent-rgb), .18);
  outline-offset: 2px;
}

.harootalk-settings-toggle svg,
.harootalk-tool-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.harootalk-settings-toggle svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: none;
}

.harootalk-settings-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  right: 0;
  width: min(300px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid var(--ht-line);
  border-radius: 18px;
  background: var(--ht-surface);
  box-shadow: 0 18px 50px rgba(23, 23, 23, .16);
}

.harootalk-settings-panel[hidden] {
  display: none;
}

.harootalk-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.harootalk-settings-head strong {
  font-size: 15px;
}

.harootalk-settings-head button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ht-canvas);
  color: var(--ht-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.harootalk-settings-panel fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.harootalk-settings-panel legend {
  margin-bottom: 9px;
  color: var(--ht-muted);
  font-size: 11px;
  font-weight: 800;
}

.harootalk-settings-panel label {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ht-ink);
  font-size: 12px;
  cursor: pointer;
}

.harootalk-settings-panel label:has(input:checked) {
  border-color: rgba(var(--ht-accent-rgb), .22);
  background: var(--ht-accent-soft);
  font-weight: 800;
}

.harootalk-settings-panel input {
  accent-color: var(--ht-accent);
}

.harootalk-palette-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.harootalk-admin-settings {
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--ht-line) !important;
}

.harootalk-danger-action {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 11px;
  background: #fafafa;
  color: #525252;
  text-align: left;
  cursor: pointer;
}

.harootalk-danger-action strong {
  color: #b42318;
  font-size: 12px;
}

.harootalk-danger-action span {
  color: var(--ht-muted);
  font-size: 10px;
  line-height: 1.45;
}

.harootalk-danger-action:hover,
.harootalk-danger-action:focus-visible {
  border-color: rgba(180, 35, 24, .35);
  background: #fff7f6;
  outline: 0;
}

.harootalk-danger-action:disabled {
  cursor: wait;
  opacity: .55;
}

.harootalk-palette-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 50%;
  background: #262626;
  box-shadow: inset 7px 0 #eeeeee;
}

.harootalk-palette-swatch.is-slate {
  background: #334155;
  box-shadow: inset 7px 0 #e9eef3;
}

.harootalk-palette-swatch.is-violet {
  background: #6855d9;
  box-shadow: inset 7px 0 #ece8ff;
}

.harootalk-palette-swatch.is-warm {
  background: #8a4b2f;
  box-shadow: inset 7px 0 #f3e7dd;
}

.harootalk-palette-swatch.is-white {
  background: #fff;
  box-shadow: inset 7px 0 #f5f5f5;
}

.harootalk-messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px clamp(18px, 5vw, 64px);
  background:
    radial-gradient(circle at 50% 0, rgba(var(--ht-accent-rgb), .045), transparent 35%),
    var(--ht-canvas);
  scroll-behavior: smooth;
}

.harootalk-message {
  display: flex;
  max-width: min(78%, 740px);
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
}

.harootalk-message.is-mine {
  margin-left: auto;
  flex-direction: row-reverse;
}

.harootalk-message.is-system {
  display: flex;
  width: 100%;
  max-width: none;
  justify-content: center;
  margin: 8px 0 18px;
}

.harootalk-system-message {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(var(--ht-accent-rgb), .07);
  color: var(--ht-muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.harootalk-message-avatar {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 50%;
  background: var(--ht-surface);
}

button.harootalk-message-avatar {
  cursor: pointer;
}

button.harootalk-message-avatar[data-kick-actor-id]:hover,
button.harootalk-message-avatar[data-kick-actor-id]:focus-visible {
  border-color: rgba(180, 35, 24, .5);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .1);
  outline: 0;
}

.harootalk-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.harootalk-message-body {
  display: flex;
  min-width: 0;
  max-width: calc(100% - 47px);
  align-items: flex-start;
  flex-direction: column;
}

.harootalk-message.is-mine .harootalk-message-body {
  align-items: flex-end;
}

.harootalk-message-bubble {
  position: relative;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 5px 15px 15px 15px;
  background: var(--ht-other-bubble);
  color: var(--ht-bubble-ink);
  box-shadow: 0 2px 8px rgba(23, 23, 23, .05);
}

.harootalk-message-bubble::before {
  position: absolute;
  top: 8px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-left: 1px solid rgba(0, 0, 0, .07);
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  background: inherit;
  content: "";
  transform: rotate(45deg);
}

.harootalk-message.is-mine .harootalk-message-bubble {
  border-color: transparent;
  border-radius: 15px 5px 15px 15px;
  background: var(--ht-mine-bubble);
  color: var(--ht-mine-ink);
}

.harootalk-message.is-mine .harootalk-message-bubble::before {
  right: -4px;
  left: auto;
  border: 0;
}

.harootalk-message.is-deleted .harootalk-message-bubble {
  border-color: var(--ht-line);
  background: var(--ht-accent-soft);
  color: var(--ht-muted);
  box-shadow: none;
}

.harootalk-message-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.harootalk-message-head {
  display: flex;
  min-height: 16px;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding: 0 2px;
}

.harootalk-message.is-mine .harootalk-message-head {
  justify-content: flex-end;
}

.harootalk-message-head time,
.harootalk-message-delete {
  color: #98a0ad;
  font-size: 10px;
}

.harootalk-message-delete {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.harootalk-message-bubble.has-image {
  overflow: hidden;
  padding: 3px;
  background: var(--ht-other-bubble);
}

.harootalk-message.is-mine .harootalk-message-bubble.has-image {
  background: var(--ht-mine-bubble);
}

.harootalk-message-image-link {
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

.harootalk-message-image {
  display: block;
  width: auto;
  max-width: min(360px, 54vw);
  max-height: 440px;
  object-fit: contain;
  background: var(--ht-canvas);
}

.harootalk-message-bubble.has-editor-media {
  min-width: 64px;
  padding: 8px;
}

.harootalk-message-editor-media {
  display: block;
  width: auto;
  object-fit: contain;
}

.harootalk-message-editor-media.is-emoji {
  max-width: 72px;
  max-height: 72px;
}

.harootalk-message-editor-media.is-sticker {
  max-width: min(220px, 48vw);
  max-height: 240px;
}

.harootalk-composer {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--ht-line);
  background: var(--ht-surface);
}

.harootalk-editor-media-panel {
  position: absolute;
  z-index: 12;
  right: 16px;
  bottom: calc(100% - 1px);
  left: 16px;
  display: grid;
  max-height: min(360px, 52vh);
  grid-template-rows: auto auto minmax(100px, 1fr);
  overflow: hidden;
  border: 1px solid var(--ht-line);
  border-radius: 18px 18px 8px 8px;
  background: var(--ht-surface);
  box-shadow: 0 -18px 45px rgba(23, 23, 23, .14);
}

.harootalk-editor-media-panel[hidden] {
  display: none;
}

.harootalk-editor-media-head {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px 14px;
}

.harootalk-editor-media-head strong {
  font-size: 13px;
}

.harootalk-editor-media-head button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ht-muted);
  font-size: 20px;
  cursor: pointer;
}

.harootalk-editor-media-folders {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 12px 10px;
  scrollbar-width: thin;
}

.harootalk-editor-media-folder {
  min-height: 31px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--ht-line);
  border-radius: 999px;
  background: var(--ht-surface);
  color: var(--ht-muted);
  font-size: 11px;
  cursor: pointer;
}

.harootalk-editor-media-folder.is-active {
  border-color: var(--ht-accent);
  background: var(--ht-accent-soft);
  color: var(--ht-accent);
  font-weight: 800;
}

.harootalk-editor-media-items {
  display: grid;
  min-height: 100px;
  overflow-y: auto;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  grid-auto-rows: 72px;
  gap: 8px;
  align-content: start;
  padding: 2px 12px 14px;
}

.harootalk-editor-media-item {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--ht-line);
  border-radius: 12px;
  background: var(--ht-canvas);
  cursor: pointer;
}

.harootalk-editor-media-item:hover {
  border-color: var(--ht-accent);
  background: var(--ht-accent-soft);
}

.harootalk-editor-media-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.harootalk-editor-media-item.is-sticker img {
  object-fit: contain;
}

.harootalk-editor-media-status {
  grid-row: 3;
  align-self: center;
  margin: 0;
  padding: 24px;
  color: var(--ht-muted);
  font-size: 12px;
  text-align: center;
}

.harootalk-editor-media-status[hidden] {
  display: none;
}

.harootalk-composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.harootalk-composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.harootalk-tool-button,
.harootalk-page .rb-emoji-toggle {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ht-line);
  border-radius: 50%;
  background: var(--ht-surface);
  color: var(--ht-muted);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.harootalk-tool-button:hover,
.harootalk-page .rb-emoji-toggle:hover {
  border-color: var(--ht-accent);
  background: var(--ht-accent-soft);
  color: var(--ht-accent);
}

.harootalk-tool-button.is-active {
  border-color: var(--ht-accent);
  background: var(--ht-accent-soft);
  color: var(--ht-accent);
}

.harootalk-tool-button:disabled,
.harootalk-page .rb-emoji-toggle:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.harootalk-composer textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  max-height: 140px;
  padding: 9px 12px;
  resize: none;
  border: 1px solid var(--ht-line);
  border-radius: 15px;
  outline: 0;
  background: var(--ht-canvas);
  color: var(--ht-ink);
  line-height: 1.55;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.harootalk-composer textarea:focus {
  border-color: var(--ht-accent);
  box-shadow: 0 0 0 3px rgba(var(--ht-accent-rgb), .1);
}

.harootalk-composer textarea:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.harootalk-send-button {
  min-width: 72px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  background: #737373;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.harootalk-send-button:hover {
  background: #525252;
}

.harootalk-send-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.harootalk-attachment-preview {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--ht-line);
  border-radius: 14px;
  background: var(--ht-canvas);
}

.harootalk-attachment-preview[hidden] {
  display: none;
}

.harootalk-attachment-preview img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 10px;
  object-fit: cover;
}

.harootalk-attachment-preview > div {
  min-width: 0;
  flex: 1;
}

.harootalk-attachment-preview strong,
.harootalk-attachment-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harootalk-attachment-preview strong {
  font-size: 12px;
}

.harootalk-attachment-preview span {
  margin-top: 3px;
  color: var(--ht-muted);
  font-size: 10px;
}

.harootalk-attachment-preview button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ht-surface);
  color: var(--ht-muted);
  font-size: 18px;
  cursor: pointer;
}

.harootalk-empty,
.harootalk-loading {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--ht-muted);
  text-align: center;
}

.harootalk-empty-avatar {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border: 1px solid var(--ht-line);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 15px 35px rgba(var(--ht-accent-rgb), .13);
}

.harootalk-empty strong {
  color: var(--ht-ink);
  font-size: 17px;
}

.harootalk-empty p {
  margin: 7px 0 0;
  font-size: 13px;
}

.harootalk-empty.is-error strong {
  color: #c4374a;
}

.harootalk-load-more {
  display: block;
  margin: 0 auto 22px;
  padding: 8px 13px;
  border: 1px solid var(--ht-line);
  border-radius: 999px;
  background: var(--ht-surface);
  color: var(--ht-muted);
  font-size: 11px;
  cursor: pointer;
}

.harootalk-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border: 1px solid #f4d58d;
  border-radius: 18px;
  background: #fff8e7;
}

.harootalk-notice code {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(23, 32, 51, .08);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes harootalk-pulse {
  50% { opacity: .45; }
}

html[data-harootalk-layout="mobile"] .harootalk-page {
  margin-top: -12px;
  padding: 0 10px calc(90px + env(safe-area-inset-bottom));
}

html[data-harootalk-layout="mobile"] .harootalk-chat {
  min-height: 0;
  height: calc(
    var(--ht-viewport-height, 100dvh) -
    var(--ht-app-top, 0px) -
    90px -
    env(safe-area-inset-bottom)
  );
  max-height: none;
  border-radius: 20px;
}

@media (max-width: 700px) {
  .harootalk-chat-head {
    min-height: 56px;
    padding: 9px 12px;
  }

  .harootalk-header-status {
    gap: 7px;
  }

  .harootalk-identity > span,
  .harootalk-connection span:last-child {
    display: none;
  }

  .harootalk-identity {
    max-width: 126px;
  }

  .harootalk-identity strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .harootalk-messages {
    padding: 20px 12px;
  }

  .harootalk-message {
    max-width: 94%;
    gap: 7px;
  }

  .harootalk-message-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .harootalk-message-body {
    max-width: calc(100% - 41px);
  }

  .harootalk-composer {
    padding: 10px 10px 11px;
  }

  .harootalk-editor-media-panel {
    right: 8px;
    left: 8px;
    max-height: min(330px, 48vh);
  }

  .harootalk-editor-media-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 64px;
    gap: 6px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .harootalk-composer-row {
    gap: 6px;
    margin-top: 8px;
  }

  .harootalk-composer-tools {
    gap: 6px;
  }

  .harootalk-tool-button,
  .harootalk-page .rb-emoji-toggle {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .harootalk-composer textarea {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .harootalk-send-button {
    min-width: 58px;
    height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .harootalk-header-presence {
    display: none;
  }

  .harootalk-identity {
    max-width: 100px;
  }

  .harootalk-message {
    max-width: 97%;
  }

  .harootalk-message-image {
    max-width: 58vw;
  }
}

html[data-theme="dark"] .harootalk-page {
  --ht-ink: #eef1f8;
  --ht-muted: #a7afbe;
  --ht-line: #303748;
  --ht-surface: #1c2230;
  --ht-canvas: #151a25;
}

html[data-theme="dark"] .harootalk-chat-head,
html[data-theme="dark"] .harootalk-settings-panel {
  background: var(--ht-surface);
}

html[data-theme="dark"] .harootalk-settings-panel label:has(input:checked) {
  background: rgba(var(--ht-accent-rgb), .2);
}

html[data-theme="dark"] .harootalk-danger-action {
  border-color: var(--ht-line);
  background: var(--ht-canvas);
}

html[data-theme="dark"] .harootalk-page[data-palette="white"] {
  --ht-ink: #171717;
  --ht-muted: #737373;
  --ht-line: #e5e5e5;
  --ht-surface: #fff;
  --ht-canvas: #fff;
  --ht-accent: #262626;
  --ht-accent-strong: #0a0a0a;
  --ht-accent-soft: #f5f5f5;
  --ht-accent-rgb: 38, 38, 38;
  --ht-other-bubble: #fff;
  --ht-mine-bubble: #fff;
  --ht-bubble-ink: #171717;
  --ht-mine-ink: #171717;
}

/* ===== 고도화: 답장·신고·공지·접속자·신고큐 ===== */
.harootalk-header-presence {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.harootalk-message-action {
  background: none;
  border: 0;
  padding: 0 2px;
  font-size: 11px;
  color: #8a8a8a;
  cursor: pointer;
}
.harootalk-message-action:hover { color: var(--ht-accent, #262626); text-decoration: underline; }
.harootalk-message-quote {
  display: block;
  margin: 0 0 6px;
  padding: 6px 8px;
  border-left: 3px solid var(--ht-accent, #262626);
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.harootalk-message-quote strong { display: block; font-size: 11px; opacity: 0.75; }
.harootalk-message-quote span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  opacity: 0.85;
}
.harootalk-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 12px;
}
.harootalk-reply-cancel {
  background: none;
  border: 0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #8a8a8a;
}
.harootalk-pinned-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 250, 230, 0.97);
  font-size: 13px;
  color: #222;
}
.harootalk-pinned-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.harootalk-pinned-unpin {
  background: none;
  border: 0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #8a8a8a;
}
.harootalk-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px;
}
.harootalk-overlay-panel {
  width: 100%;
  max-width: 420px;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #222;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.harootalk-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.harootalk-overlay-close {
  background: none;
  border: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #8a8a8a;
}
.harootalk-overlay-body { overflow-y: auto; padding: 8px 0; }
.harootalk-overlay-status { padding: 16px; text-align: center; color: #777; font-size: 13px; }
.harootalk-overlay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}
.harootalk-overlay-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.harootalk-overlay-info { flex: 1; min-width: 0; }
.harootalk-overlay-info strong { display: block; font-size: 13px; }
.harootalk-overlay-info span { display: block; font-size: 11px; color: #8a8a8a; }
.harootalk-overlay-action {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}
.harootalk-overlay-action:disabled { opacity: 0.5; cursor: default; }
.harootalk-report-row {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.harootalk-report-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}
.harootalk-report-head span { font-size: 11px; color: #b3261e; }
.harootalk-report-content {
  margin: 4px 0;
  font-size: 13px;
  color: #444;
  word-break: break-all;
}
.harootalk-report-meta { display: block; font-size: 11px; color: #8a8a8a; margin-bottom: 6px; }
.harootalk-report-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.harootalk-admin-settings .harootalk-admin-action {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.harootalk-admin-settings .harootalk-admin-action strong { display: block; font-size: 13px; }
.harootalk-admin-settings .harootalk-admin-action span { display: block; font-size: 11px; color: #8a8a8a; }

/* ===== 채팅 본문 래퍼 + 플로팅 공지 스택 (카카오톡 스타일) ===== */
.harootalk-chat-body {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.harootalk-chat-body .harootalk-messages {
  flex: 1;
  min-height: 0;
  padding-top: var(--ht-float-offset, 76px);
}
.harootalk-float {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.harootalk-float > * { pointer-events: auto; }

/* ===== 이용 규칙 아코디언 (플로팅 카드) ===== */
.harootalk-rules {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  color: #222;
  font-size: 13px;
  overflow: hidden;
}
.harootalk-rules summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.harootalk-rules summary::-webkit-details-marker { display: none; }
.harootalk-rules summary strong { font-size: 13px; }
.harootalk-rules-icon { font-size: 13px; }
.harootalk-rules-hint {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #8a8a8a;
}
.harootalk-rules-arrow {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #8a8a8a;
  border-bottom: 1.5px solid #8a8a8a;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.harootalk-rules[open] .harootalk-rules-arrow { transform: rotate(-135deg); }
.harootalk-rules ul {
  margin: 0;
  padding: 0 14px 12px 32px;
  max-height: 180px;
  overflow-y: auto;
}
.harootalk-rules li {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #555;
  word-break: keep-all;
}
[data-palette="slate"] .harootalk-rules li,
[data-palette="violet"] .harootalk-rules li { color: #777; }
