:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #24302f;
  background: #d7c8b9;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  margin: 0;
  min-height: 100%;
  width: 100%;
}
button,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
textarea:focus-visible,
.carousel:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}
::selection {
  background: #a8c9bc;
  color: #183b32;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.page-shell {
  --page-bg: #d7c8b9;
  min-height: 100dvh;
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background-color 480ms cubic-bezier(0.2, 0.82, 0.24, 1);
}
.site-head {
  height: 74px;
  flex: none;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
/* The bar is a stacking context below the cards (100+); while one of its menus is open it sits above all of them. */
.site-head.menu-open {
  z-index: 500;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 730;
  letter-spacing: -0.035em;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #29423b;
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: center;
  transform: rotate(-9deg);
}
.brand-mark i {
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
}
.brand-mark i:nth-child(2) {
  transform: translateY(-3px);
}
.head-note {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #3d4e4a;
}
.main-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  position: relative;
}
.carousel {
  position: relative;
  width: 100%;
  height: min(670px, calc(100dvh - 185px));
  min-height: 420px;
  touch-action: pan-y;
  outline-offset: -8px;
}
.card-deck {
  position: relative;
  width: 100%;
  height: 100%;
  --drag-x: 0px;
}
.card-slot {
  --slot: 0;
  --side-offset: min(27vw, 330px);
  --scale: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(376px, calc(100vw - 108px));
  height: min(558px, calc(100dvh - 213px));
  min-height: 380px;
  transform: translate(-50%, -50%) translateX(calc(var(--slot) * var(--side-offset) + var(--drag-x)))
    scale(var(--scale));
  z-index: calc(5 - var(--slot) * var(--slot));
  cursor: pointer;
  transition:
    transform 370ms cubic-bezier(0.2, 0.82, 0.24, 1),
    opacity 260ms ease;
  will-change: transform;
}
.card-slot:not(.is-active) {
  --scale: 0.89;
  opacity: 0.86;
}
.card-slot.is-active {
  z-index: 10;
  opacity: 1;
}
.card-shell {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f1f2f0;
  box-shadow:
    0 22px 55px rgba(44, 51, 47, 0.19),
    0 4px 11px rgba(44, 51, 47, 0.09);
  transition:
    transform 170ms cubic-bezier(0.2, 0.82, 0.24, 1),
    box-shadow 170ms ease;
}
.card-slot.is-active.is-hovered:not(.is-chat) .card-shell {
  transform: scale(1.025);
  box-shadow:
    0 28px 65px rgba(44, 51, 47, 0.22),
    0 5px 14px rgba(44, 51, 47, 0.1);
}
.card-slot:not(.is-active) .card-shell {
  box-shadow: 0 16px 36px rgba(44, 51, 47, 0.13);
}
.chat-head {
  height: 64px;
  flex: none;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: #f8f9f7;
  border-bottom: 1px solid #e1e6e2;
}
.chat-head strong {
  font-size: 17px;
  font-weight: 650;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--avatar-bg);
  color: var(--avatar-ink);
  font-weight: 720;
  letter-spacing: -0.04em;
  user-select: none;
}
.head-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 17px;
}
.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #29453d;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex: none;
}
.icon-button:hover {
  background: #e8eeea;
}
.icon-button:active {
  transform: scale(0.96);
}
svg {
  width: 23px;
  height: 23px;
}
.back-button {
  margin-left: -8px;
}
.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 44px 22px 24px;
  overscroll-behavior: contain;
  scrollbar-color: #b7c4bb transparent;
  scrollbar-width: thin;
}
.message-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
}
.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 18px;
  flex: none;
}
.voice-stack {
  max-width: calc(100% - 47px);
}
.voice-bubble {
  min-width: 175px;
  max-width: 100%;
  background: #fff;
  border-radius: 4px 15px 15px 15px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px 7px 4px 3px;
  box-shadow: 0 1px 3px rgba(29, 48, 39, 0.08);
}
.voice-bubble:before {
  content: "";
  position: absolute;
  top: 8px;
  left: -6px;
  border-top: 7px solid #fff;
  border-left: 7px solid transparent;
}
.play-button {
  border: 0;
  background: transparent;
  color: #2d5149;
  min-width: 116px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 9px;
  border-radius: 10px;
}
.play-button svg {
  width: 20px;
  height: 20px;
}
.play-button:hover {
  background: #f0f5f1;
}
.play-button:active {
  transform: scale(0.97);
}
.sound-bars svg {
  width: 38px;
  color: #6c9688;
}
.play-button[data-playing="true"] {
  background: #e3efe8;
}
.play-button[data-playing="true"] .sound-bars svg {
  color: #3a7667;
}
.transcript-toggle {
  border: 0;
  background: transparent;
  min-width: 58px;
  min-height: 44px;
  color: #3a7667;
  font-size: 12px;
  white-space: nowrap;
  padding: 0 4px;
}
.transcript-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.transcript {
  margin: 7px 0 0;
  padding: 11px 13px;
  border-radius: 3px 12px 12px 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
  max-width: 245px;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 3px rgba(29, 48, 39, 0.06);
}
.transcript[hidden] {
  display: none;
}
.outgoing {
  justify-content: flex-end;
}
.text-bubble {
  background: #dce8df;
  border-radius: 15px 4px 15px 15px;
  padding: 10px 14px;
  margin: 0;
  max-width: 78%;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.message-row.incoming .incoming-text {
  background: #fff;
  border-radius: 4px 15px 15px 15px;
  max-width: calc(100% - 47px);
}
.composer {
  flex: none;
  min-height: 72px;
  background: #f8f9f7;
  border-top: 1px solid #e1e6e2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
}
.composer textarea {
  min-height: 44px;
  max-height: 104px;
  resize: none;
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid #d9e2da;
  border-radius: 12px;
  background: #fff;
  color: #24302f;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
}
.composer textarea::placeholder {
  color: #65736d;
}
.composer textarea:focus {
  border-color: #5b8c78;
  box-shadow: 0 0 0 3px rgba(91, 140, 120, 0.13);
}
.send-button {
  display: none;
  background: #dce8df;
}
.send-button:disabled {
  opacity: 0.43;
}
.avatar-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  padding: 2px 16px 16px;
  position: relative;
  z-index: 11;
}
.avatar-choice {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  min-width: 60px;
  padding: 6px;
  color: #263831;
  font-size: 12px;
}
.avatar-choice-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 20px;
  box-shadow: 0 3px 8px rgba(35, 50, 44, 0.11);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}
.avatar-choice:hover .avatar-choice-mark {
  transform: translateY(-2px);
}
.avatar-choice.selected .avatar-choice-mark {
  outline: 2px solid #294b40;
  outline-offset: 3px;
}
.avatar-name {
  font-weight: 570;
}
.preview-note {
  min-height: 32px;
  text-align: center;
  padding: 0 14px 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #43534d;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  padding: 11px 16px;
  border-radius: 12px;
  background: #273d36;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 26px rgba(22, 40, 31, 0.2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  z-index: 200;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.page-shell[data-phase="chat"] .card-slot:not(.is-chat),
.page-shell[data-phase="expanding"] .card-slot:not(.is-chat) {
  opacity: 0;
  pointer-events: none;
}
.page-shell[data-phase="chat"] .card-slot.is-chat,
.page-shell[data-phase="expanding"] .card-slot.is-chat {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(440px, calc(100vw - 22px));
  height: min(760px, calc(100dvh - 22px));
  min-height: 0;
  transform: translate(-50%, -50%) scale(1);
  z-index: 100;
  cursor: default;
}
.card-slot.is-chat .chat-head {
  display: flex;
}
.card-slot.is-chat .chat-body {
  padding-top: 24px;
}
.card-slot.is-chat .send-button {
  display: grid;
}
.page-shell[data-phase="chat"] .avatar-nav,
.page-shell[data-phase="expanding"] .avatar-nav {
  position: fixed;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  background: rgba(248, 249, 247, 0.98);
  border-radius: 17px;
  padding: 3px 10px;
  box-shadow: 0 4px 16px rgba(32, 50, 38, 0.12);
}
.page-shell[data-phase="chat"] .avatar-choice-mark,
.page-shell[data-phase="expanding"] .avatar-choice-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 16px;
}
.page-shell[data-phase="chat"] .avatar-name,
.page-shell[data-phase="expanding"] .avatar-name {
  display: none;
}
.page-shell[data-phase="chat"] .preview-note,
.page-shell[data-phase="expanding"] .preview-note {
  visibility: hidden;
}
.carousel.is-dragging .card-slot {
  transition: none;
}
@media (max-width: 600px) {
  .site-head {
    height: 62px;
    padding: 0 19px;
  }
  .head-note {
    font-size: 11px;
  }
  .brand {
    font-size: 16px;
  }
  .carousel {
    height: calc(100dvh - 166px);
    min-height: 390px;
  }
  .card-slot {
    --side-offset: calc(100vw - 86px);
    width: min(360px, calc(100vw - 96px));
    height: calc(100dvh - 200px);
    min-height: 375px;
  }
  .card-slot:not(.is-active) {
    --scale: 0.94;
  }
  .chat-body {
    padding: 34px 13px 18px;
  }
  .composer {
    padding-inline: 9px;
  }
  .avatar-nav {
    padding-bottom: 9px;
  }
  .preview-note {
    font-size: 10px;
    padding-bottom: 5px;
  }
  .page-shell[data-phase="chat"] .card-slot.is-chat,
  .page-shell[data-phase="expanding"] .card-slot.is-chat {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .page-shell[data-phase="chat"] .card-shell,
  .page-shell[data-phase="expanding"] .card-shell {
    border-radius: 0;
  }
  .page-shell[data-phase="chat"] .site-head,
  .page-shell[data-phase="expanding"] .site-head {
    visibility: hidden;
  }
  .page-shell[data-phase="chat"] .avatar-nav,
  .page-shell[data-phase="expanding"] .avatar-nav {
    bottom: max(6px, env(safe-area-inset-bottom));
  }
  .page-shell[data-phase="chat"] .composer,
  .page-shell[data-phase="expanding"] .composer {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 360px) {
  .card-slot {
    --side-offset: calc(100vw - 73px);
    width: calc(100vw - 64px);
  }
  .head-note {
    display: none;
  }
  .voice-bubble {
    min-width: 0;
  }
  .play-button {
    min-width: 92px;
    gap: 6px;
  }
  .chat-body {
    padding-inline: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .card-slot.is-active.is-hovered .card-shell {
    transform: none;
  }
  .page-shell {
    transition: none;
  }
}

/* Fifteen positions travel around one visual orbit. The nearest five keep the
   same .382-card-width center spacing; the other ten recede behind them. */
.carousel {
  height: min(630px, calc(100dvh - 235px));
  min-height: 350px;
}
.card-slot {
  --orbit-x: 0px;
  --orbit-y: 0px;
  --orbit-scale: 1;
  --orbit-opacity: 1;
  --wash: 0%;
  transform: translate(-50%, -50%) translateX(calc(var(--orbit-x) + var(--drag-x))) translateY(var(--orbit-y))
    scale(var(--orbit-scale));
  opacity: var(--orbit-opacity);
  transition:
    transform 270ms cubic-bezier(0.77, 0, 0.175, 1),
    opacity 220ms ease;
}
.card-slot:not(.is-active) {
  --scale: 1;
  opacity: var(--orbit-opacity);
}
.card-slot.orbit-wrap,
.carousel.is-dragging .card-slot {
  transition: none;
}
.card-shell {
  background: color-mix(in srgb, #f1f2f0 87%, var(--card-color) 13%);
}
.card-slot:not(.is-active) .card-shell {
  background: color-mix(in srgb, #f1f2f0 95%, var(--card-color) 5%);
}
.friend-notice {
  margin: 0 0 24px;
  text-align: center;
  color: #6a7772;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.card-slot:not(.is-chat) .chat-body {
  padding-top: 18px;
}
.reserve-state {
  min-height: 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #6b7972;
  font-size: 14px;
}
.card-slot:not(.is-active) .reserve-state {
  visibility: hidden;
}
.reserve-state p {
  margin: 0;
}
.reserve-symbol {
  width: 54px;
  height: 54px;
  border: 2px solid #aebcb3;
  border-radius: 50%;
  display: block;
  position: relative;
}
.reserve-symbol:after {
  content: "";
  position: absolute;
  left: 22px;
  top: 22px;
  width: 7px;
  height: 7px;
  background: #aebcb3;
  border-radius: 50%;
}
.composer[hidden] {
  display: none;
}
.avatar-nav {
  position: relative;
  display: block;
  width: min(510px, 100%);
  height: 130px;
  padding: 0;
  flex: none;
  perspective: 600px;
}
.avatar-choice {
  position: absolute;
  left: 50%;
  top: 0;
  width: 60px;
  height: 60px;
  min-width: 60px;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translate(-50%, 0) translateX(var(--avatar-x)) translateY(var(--avatar-y));
  opacity: var(--avatar-opacity);
  transition:
    transform 270ms cubic-bezier(0.77, 0, 0.175, 1),
    opacity 220ms ease;
}
.avatar-choice-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 22px;
  transform: scale(var(--avatar-scale));
  background: color-mix(in srgb, var(--avatar-bg), white var(--wash));
  box-shadow: 0 7px 17px rgba(35, 50, 44, 0.16);
  transition: transform 180ms ease;
}
.avatar-choice:hover .avatar-choice-mark {
  transform: scale(calc(var(--avatar-scale) * 1.055));
}
.avatar-choice.selected .avatar-choice-mark {
  outline: 2px solid #294b40;
  outline-offset: 3px;
}
.avatar-name {
  display: none;
}
.reserve-dot {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.7;
}
.page-shell[data-phase="chat"] .avatar-nav,
.page-shell[data-phase="expanding"] .avatar-nav {
  height: 60px;
  width: min(440px, calc(100vw - 24px));
  padding: 0;
}
.page-shell[data-phase="chat"] .avatar-choice,
.page-shell[data-phase="expanding"] .avatar-choice {
  transform: translate(-50%, 0) translateX(var(--avatar-chat-x));
  height: 52px;
  width: 52px;
  min-width: 52px;
}
.page-shell[data-phase="chat"] .avatar-choice-mark,
.page-shell[data-phase="expanding"] .avatar-choice-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 18px;
}
@media (max-width: 600px) {
  .carousel {
    height: calc(100dvh - 218px);
    min-height: 370px;
  }
  .card-slot {
    height: calc(100dvh - 250px);
    min-height: 340px;
  }
  .avatar-nav {
    height: 110px;
  }
  .avatar-choice {
    top: 0;
  }
  .avatar-choice-mark {
    width: 54px;
    height: 54px;
  }
  .friend-notice {
    font-size: 11px;
  }
  .page-shell[data-phase="chat"] .avatar-nav,
  .page-shell[data-phase="expanding"] .avatar-nav {
    height: 58px;
  }
}
@media (max-width: 360px) {
  .friend-notice {
    font-size: 10px;
    letter-spacing: -0.02em;
  }
}
.carousel:focus-visible {
  outline: 0;
}
.carousel:focus-visible .card-slot.is-active .card-shell {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .card-slot:not(.is-active) {
    visibility: hidden;
    pointer-events: none;
  }
  .page-shell {
    height: 100dvh;
    min-height: 0;
  }
  .main-area {
    justify-content: flex-start;
  }
  .carousel {
    flex: 1;
    min-height: 0;
    height: auto;
  }
  .card-slot {
    height: calc(100% - 24px);
    min-height: 0;
  }
  .card-slot.is-active.is-hovered:not(.is-chat) .card-shell {
    transform: none;
  }
}
/* Safari's square tap overlay is not our focus indicator. Preserve keyboard focus. */
.avatar-choice {
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.avatar-choice:active .avatar-choice-mark {
  filter: brightness(0.93);
}

/* The browse orbit has no place in an opened conversation. */
.page-shell[data-phase="chat"] .avatar-nav,
.page-shell[data-phase="expanding"] .avatar-nav,
.page-shell[data-phase="collapsing"] .avatar-nav {
  display: none;
}
/* Expanding owns the fade; settled chat removes inactive layers from paint. */
.page-shell[data-phase="chat"] .card-slot:not(.is-chat) {
  display: none;
}
.chat-head {
  position: relative;
}
.chat-head strong {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 112px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
@media (max-width: 600px) {
  html.chat-open,
  html.chat-open body,
  html.chat-open #app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #f1f2f0;
  }
  .page-shell[data-phase="chat"],
  .page-shell[data-phase="expanding"] {
    background: color-mix(in srgb, #f1f2f0 87%, var(--page-bg) 13%);
    min-height: 100dvh;
  }
  .page-shell[data-phase="chat"] .site-head,
  .page-shell[data-phase="expanding"] .site-head,
  .page-shell[data-phase="chat"] .preview-note,
  .page-shell[data-phase="expanding"] .preview-note {
    display: none;
  }
  .page-shell[data-phase="chat"] .card-slot.is-chat,
  .page-shell[data-phase="expanding"] .card-slot.is-chat {
    width: var(--chat-width, 100vw);
    height: var(--chat-height, 100dvh);
    max-width: none;
    left: var(--chat-left, 50%);
    top: var(--chat-top, 50%);
    border-radius: 0;
    box-shadow: none;
    transform: translate(-50%, -50%) scale(1);
  }
  .page-shell[data-phase="chat"] .card-slot.is-chat .card-shell,
  .page-shell[data-phase="expanding"] .card-slot.is-chat .card-shell {
    border-radius: 0;
    box-shadow: none;
  }
  .page-shell[data-phase="chat"] .composer,
  .page-shell[data-phase="expanding"] .composer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

/* Explicit local-2 test mode; the default fifteen-slot visual prototype is untouched. */
.local-page {
  min-height: 100dvh;
  background: #c7d1d3;
  display: flex;
  flex-direction: column;
}
.local-top {
  height: 74px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(18px, 4vw, 64px);
}
.local-brand {
  font-size: 18px;
  font-weight: 730;
  letter-spacing: -0.035em;
}
.local-mode-label {
  font-size: 12px;
  color: #405c61;
}
.local-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px 24px;
}
.local-card {
  width: min(440px, 100%);
  height: auto;
  flex: 1;
  max-height: 760px;
  min-height: 280px;
  background: #f1f2f0;
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(44, 51, 47, 0.19);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.local-chat-head {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #f8f9f7;
  border-bottom: 1px solid #e1e6e2;
}
.local-name {
  font-size: 17px;
  font-weight: 650;
}
.local-version {
  position: absolute;
  right: 16px;
  font-size: 11px;
  color: #53645e;
}
.local-access {
  flex: none;
  min-height: 35px;
  padding: 9px 18px;
  text-align: center;
  font-size: 12px;
  color: #435d56;
  background: #f8f9f7;
}
.local-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 18px;
  overscroll-behavior: contain;
  scroll-padding-bottom: 20px;
}
.local-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 15px;
}
.local-message.is-player {
  justify-content: flex-end;
}
.local-message > p {
  max-width: 78%;
  margin: 0;
  padding: 11px 14px;
  background: #dce8df;
  border-radius: 15px 4px 15px 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.local-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #c7d1d3;
  color: #405c61;
  font-weight: 700;
}
.local-message.is-player .local-avatar {
  background: #dce8df;
  color: #294b40;
}
.local-voice {
  max-width: 85%;
  padding: 5px 7px;
  background: #fff;
  border-radius: 4px 15px 15px 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(29, 48, 39, 0.08);
}
.local-footer-label {
  flex-basis: 100%;
  padding: 2px 10px 0;
  font-size: 11px;
  color: #53645e;
}
.local-voice button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 0 10px;
  color: #2d5149;
}
.local-voice button:hover:not(:disabled) {
  background: #f0f5f1;
}
.local-voice button:disabled {
  color: #6a7772;
}
.local-voice p {
  flex-basis: 100%;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.local-voice p[hidden] {
  display: none;
}
.local-operation {
  min-height: 34px;
  flex: none;
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  color: #405c61;
  background: #f1f2f0;
}
.local-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  background: #f8f9f7;
  border-top: 1px solid #e1e6e2;
}
.local-composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 108px;
  resize: none;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d9e2da;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.4;
  color: #24302f;
}
.local-composer button,
.local-reconnect,
.local-lookup {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 15px;
  background: #294b40;
  color: #fff;
}
.local-composer button:disabled {
  opacity: 0.46;
}
.local-help {
  max-width: 440px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: #405c61;
}
.local-error {
  max-width: 440px;
  margin: 0;
  color: #7e3e38;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.local-error[hidden],
.local-lookup[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .local-top {
    height: 56px;
  }
  .local-mode-label {
    max-width: 145px;
    text-align: right;
    line-height: 1.3;
  }
  .local-main {
    padding: 0;
    gap: 0;
  }
  .local-card {
    width: 100%;
    height: auto;
    flex: 1;
    max-height: none;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .local-help,
  .local-reconnect,
  .local-lookup,
  .local-error {
    position: relative;
    z-index: 1;
  }
  .local-help {
    padding: 7px 12px;
  }
  .local-reconnect,
  .local-lookup {
    margin: 4px;
  }
  .local-page {
    background: #f1f2f0;
  }
}

/* Standalone invite form: not mounted by either the preview or local-2 entry. */
.invite-form {
  width: min(440px, 100%);
  padding: 24px;
  background: #f1f2f0;
  color: #24302f;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(44, 51, 47, 0.12);
}
.invite-form [hidden] {
  display: none;
}
.invite-form h2 {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.3;
}
.invite-form-demo {
  margin: 0 0 12px;
  color: #405c61;
  font-size: 12px;
  line-height: 1.5;
}
.invite-form-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.invite-form-fields label {
  font-size: 14px;
  font-weight: 620;
}
.invite-form-fields input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #bacac1;
  border-radius: 12px;
  background: #fff;
  color: #24302f;
  font-size: 16px;
  line-height: 1.4;
}
.invite-form-fields input:focus-visible,
.invite-form button:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}
.invite-form-fields input[readonly] {
  background: #e8eeea;
  color: #42554d;
}
.invite-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.invite-form-actions button {
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  background: #294b40;
  color: #fff;
}
.invite-form-actions .invite-form-cancel {
  background: #e1e9e3;
  color: #294b40;
}
.invite-form-actions button:disabled {
  opacity: 0.5;
}
.invite-form-status {
  min-height: 21px;
  margin: 14px 0 0;
  color: #405c61;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .invite-form {
    border-radius: 0;
    box-shadow: none;
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }
}

/* Separate admin-only shell; never mounted in a player route. */
.invite-admin-page {
  width: min(460px, 100%);
  padding: 24px;
  border-radius: 18px;
  background: #f1f2f0;
  color: #24302f;
  box-shadow: 0 12px 32px rgba(44, 51, 47, 0.12);
}
.invite-admin-page [hidden] {
  display: none;
}
.invite-admin-page h1 {
  font-size: 22px;
  margin: 0 0 20px;
}
.invite-admin-demo {
  font-size: 12px;
  color: #405c61;
  margin: 0 0 12px;
}
.invite-admin-login,
.invite-admin-issue {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.invite-admin-page label {
  font-size: 14px;
  font-weight: 620;
}
.invite-admin-page input {
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #bacac1;
  border-radius: 12px;
  background: #fff;
  color: #24302f;
  font-size: 16px;
}
.invite-admin-page button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  background: #294b40;
  color: #fff;
  align-self: flex-start;
}
.invite-admin-page button:disabled {
  opacity: 0.5;
}
.invite-admin-page button:focus-visible,
.invite-admin-page input:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}
.invite-admin-issue p,
.invite-admin-status {
  font-size: 13px;
  line-height: 1.5;
  color: #405c61;
  margin: 0;
}
.invite-admin-result {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #bacac1;
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-wrap: anywhere;
}
.invite-admin-result span {
  font-size: 12px;
  color: #405c61;
}
.invite-admin-code {
  font-size: 18px;
  letter-spacing: 0.04em;
}
.invite-admin-logout {
  margin-top: 16px;
}
.invite-admin-status {
  min-height: 20px;
  margin-top: 14px;
}
@media (max-width: 600px) {
  .invite-admin-page {
    border-radius: 0;
    box-shadow: none;
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }
}

.account-admin-page {
  width: min(620px, 100%);
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.account-admin-page form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}
.account-admin-page h2 {
  font-size: 18px;
  margin: 24px 0 12px;
}
.account-admin-page h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.account-admin-page p {
  font-size: 14px;
  line-height: 1.6;
  color: #405c61;
  margin: 10px 0;
}
.account-admin-page input:not([type="checkbox"]),
.account-admin-page select {
  width: 100%;
  min-width: 0;
}
.account-admin-page select {
  min-height: 48px;
  padding: 10px;
  border: 1px solid #bacac1;
  border-radius: 12px;
  background: #fff;
  color: #24302f;
  font-size: 14px;
}
.account-admin-page input[type="checkbox"] {
  min-height: 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0 9px 0 0;
  accent-color: #294b40;
  vertical-align: middle;
  flex-shrink: 0;
}
.account-admin-page fieldset {
  border: 1px solid #bacac1;
  border-radius: 12px;
  padding: 12px;
  margin: 4px 0;
  min-width: 0;
}
.account-admin-page fieldset label,
.admin-member label {
  display: flex;
  align-items: center;
  min-height: 44px;
  line-height: 1.5;
}
.account-admin-page legend {
  font-size: 14px;
  padding: 0 4px;
}
.account-admin-page button {
  line-height: 1.5;
  padding: 10px 15px;
  text-align: left;
}
.admin-nav,
.admin-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.admin-nav {
  padding-bottom: 18px;
  border-bottom: 1px solid #bacac1;
}
.admin-nav button,
.admin-links button,
.account-admin-page .admin-back,
.account-admin-page .admin-secondary {
  background: #e1e9e3;
  color: #294b40;
}
.admin-nav button[aria-current="page"] {
  background: #294b40;
  color: #fff;
}
.account-admin-page button:hover:not(:disabled) {
  filter: brightness(0.94);
}
.account-admin-page .admin-identity:empty {
  display: none;
}
.admin-member {
  border-top: 1px solid #bacac1;
  margin-top: 20px;
  padding-top: 20px;
}
.admin-member button {
  display: block;
  margin-top: 10px;
}
.account-admin-page .invite-admin-status {
  margin-top: 20px;
  min-height: 24px;
}
.account-admin-page ::selection {
  background: #c7dfd4;
  color: #173c30;
}
.account-admin-page input {
  caret-color: #294b40;
}
.account-admin-page select:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}

/* local-3 keeps the invite form outside the private chat surface until trusted install. */
.local-invite-mount[hidden],
.local-card[hidden] {
  display: none;
}
.local-invite-mount {
  width: min(440px, 100%);
}
.local-admin-root {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #c7d1d3;
}
@media (max-width: 600px) {
  .local-invite-mount {
    width: 100%;
  }
  .local-admin-root {
    padding: 0;
    align-items: start;
  }
}

/* Provider-live additions: keep to the existing palette and bubble language. */
.invite-entry {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.invite-dialog {
  border: none;
  border-radius: 18px;
  padding: 20px;
  width: min(320px, calc(100vw - 32px));
}
.invite-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}
.invite-dialog form {
  display: grid;
  gap: 12px;
}
.invite-dialog input {
  min-width: 0;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #c9c9c9;
}
.invite-state {
  margin: 0;
  color: #35433e;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.invite-state:empty {
  display: none;
}
.invite-actions {
  flex-wrap: wrap;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.invite-actions button {
  min-height: 44px;
  font: inherit;
  border-radius: 999px;
  padding: 6px 16px;
  border: 1px solid #bdbdbd;
  background: #fff;
}
.invite-actions button[type="submit"] {
  background: #222;
  color: #fff;
  border-color: #222;
}
.invite-actions button:disabled {
  opacity: 0.55;
  cursor: default;
}
.voice-seconds {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.72;
}
.message-row.not-sent,
.message-row.delivery-unconfirmed {
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.message-send-state {
  max-width: 100%;
  color: #615044;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.site-head:has(.invite-entry) .head-note {
  margin-left: auto;
  margin-right: 12px;
}

/* Function-first administration: explicit scopes, compact closed rows, no implied grants. */
.account-admin-page[data-surface="members"] {
  width: min(900px, 100%);
}
.account-admin-page details > summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 620;
}
.account-admin-page summary:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}
.account-admin-page .admin-member {
  margin-top: 8px;
  padding-top: 0;
}
.account-admin-page .admin-member > summary {
  font-size: 16px;
}
.account-admin-page .permission-help {
  margin: 0 0 12px 29px;
  font-size: 13px;
  max-width: 70ch;
}
.account-admin-page .admin-confirm {
  margin: 16px 0;
  color: #863d2e;
  border-top: 1px solid #c5b4ac;
}
.account-admin-page .admin-confirm > button {
  background: #863d2e;
  color: #fff;
}
.account-admin-page .admin-new-member {
  margin: 20px 0;
  border-bottom: 1px solid #bacac1;
}
.account-admin-page .admin-invite-record {
  border-bottom: 1px solid #bacac1;
  padding: 20px 0;
}
.account-admin-page .admin-invite-record h3 {
  margin: 0;
}
.account-admin-page #admin-invite-records > button {
  margin-top: 16px;
}
.account-admin-page h4 {
  font-size: 15px;
  margin: 24px 0 8px;
}
.account-admin-page {
  scrollbar-color: #718c7f #e1e9e3;
}

/* Character operations retain the account shell, with editable drafts separate from publication. */
.account-admin-page[data-surface="characters"] {
  width: min(1080px, 100%);
}
.account-admin-page .character-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  column-gap: 28px;
}
.account-admin-page .character-directory-row,
.account-admin-page .character-deletion-row {
  padding: 20px 0;
  border-bottom: 1px solid #bacac1;
}
.account-admin-page .admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.account-admin-page .character-profile-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 620;
  margin: 10px 0;
  align-items: stretch;
}
.account-admin-page .character-profile-form .admin-check,
.account-admin-page .admin-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  min-height: 44px;
}
.account-admin-page textarea {
  width: 100%;
  min-width: 0;
  min-height: 110px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #bacac1;
  border-radius: 12px;
  background: #fff;
  color: #24302f;
  font-size: 16px;
  line-height: 1.6;
  caret-color: #294b40;
}
.account-admin-page textarea:disabled,
.account-admin-page input:disabled {
  background: #e7ece8;
  color: #53675c;
}
.account-admin-page .admin-json,
.account-admin-page pre {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.account-admin-page .character-flow {
  border-top: 1px solid #bacac1;
  margin-top: 24px;
  padding-top: 12px;
}
.account-admin-page .character-flow > details {
  padding: 8px 0;
  border-bottom: 1px solid #bacac1;
}
.account-admin-page .character-flow > details > summary {
  font-size: 16px;
}
.account-admin-page .character-flow label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0;
}
.account-admin-page .character-flow label.admin-check {
  flex-direction: row;
}
.account-admin-page .character-flow button {
  margin: 8px 8px 8px 0;
}
.account-admin-page .profile-diff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.account-admin-page .profile-diff pre {
  background: #e7ede8;
  padding: 12px;
  border-radius: 8px;
}
.account-admin-page audio {
  width: min(420px, 100%);
  margin: 10px 0;
}

.provider-start-error {
  width: min(480px, calc(100% - 40px));
  margin: 20vh auto 40px;
  color: #24302f;
  overflow-wrap: anywhere;
}
.provider-start-error h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 16px;
}
.provider-start-error p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 24px;
}
.provider-start-error button {
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: #294b40;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.provider-start-error button:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}
.provider-start-error button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.account-admin-page .admin-password-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
.account-admin-page .admin-password-field input {
  flex: 1;
  min-width: 0;
  width: 0;
}
.account-admin-page .admin-password-field button {
  flex-shrink: 0;
  align-self: stretch;
  white-space: nowrap;
}

/* One-time recovery code sheet and entry. */
.recovery-dialog form,
.recovery-manage-dialog form {
  display: grid;
  gap: 12px;
}
.recovery-notice {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.recovery-code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f1ee;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  word-break: break-all;
  user-select: all;
}
.provider-start-error button.recovery-have {
  margin-left: 12px;
  background: transparent;
  color: #294b40;
  border: 1px solid #294b40;
}
.invite-have-code {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
}

/* ⋯ menu in the chat header (co-creation entry). Same palette as the cards; items are read when it opens. */
.chat-more {
  margin-left: auto;
  margin-right: -8px;
}
.chat-menu {
  position: absolute;
  right: 10px;
  top: calc(100% - 6px);
  z-index: 30;
  min-width: 236px;
  max-width: calc(100% - 20px);
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 14px 38px rgba(32, 48, 42, 0.2),
    0 2px 6px rgba(32, 48, 42, 0.08);
  animation: chat-menu-in 160ms cubic-bezier(0.2, 0.82, 0.24, 1);
  transform-origin: top right;
}
@keyframes chat-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
}
.chat-menu-item {
  width: 100%;
  min-height: 52px;
  border: 0;
  background: transparent;
  text-align: left;
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 11px;
  color: #24302f;
}
.chat-menu-item:hover:not(:disabled),
.chat-menu-item:focus-visible {
  background: #eef3ef;
}
.chat-menu-title {
  font-size: 15px;
  font-weight: 650;
}
.chat-menu-sub {
  font-size: 12.5px;
  color: #5d6e67;
}
.chat-menu-item:disabled {
  opacity: 0.58;
}

/* 共创 sheet: a full-height deck of inspiration cards in the character's own colour. */
html.cc-open,
html.cc-open body {
  overflow: hidden;
}
.cc-sheet {
  --cc-color: #d7c8b9;
  --cc-ink: #29423b;
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: radial-gradient(120% 60% at 50% -10%, rgba(255, 255, 255, 0.55), transparent 60%), var(--cc-color);
  color: #24302f;
  animation: cc-sheet-in 280ms cubic-bezier(0.2, 0.82, 0.24, 1);
}
@keyframes cc-sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
.cc-head {
  flex: none;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: max(10px, env(safe-area-inset-top)) 14px 6px;
}
.cc-close {
  font-size: 26px;
  line-height: 1;
  color: var(--cc-ink);
}
.cc-heading {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
}
.cc-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-progress {
  font-size: 12.5px;
  color: var(--cc-ink);
  opacity: 0.8;
}
.cc-shuffle {
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--cc-ink) 55%, transparent);
  background: rgba(255, 255, 255, 0.4);
  color: var(--cc-ink);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13.5px;
}
.cc-shuffle:disabled {
  opacity: 0.5;
}
.cc-deck {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: safe center;
  gap: 14px;
  padding: 18px max(22px, calc(50vw - 160px)) 18px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 22px;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.cc-deck::-webkit-scrollbar {
  display: none;
}
.cc-card {
  flex: 0 0 min(320px, calc(100vw - 56px));
  scroll-snap-align: center;
  background: #fff;
  border-radius: 24px;
  padding: 6px;
  box-shadow:
    0 18px 40px rgba(44, 51, 47, 0.14),
    0 3px 8px rgba(44, 51, 47, 0.08);
  transform: rotate(var(--tilt, -0.8deg));
  transition:
    transform 260ms cubic-bezier(0.2, 0.82, 0.24, 1),
    box-shadow 260ms ease;
  animation: cc-card-in 420ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}
.cc-card:nth-child(even) {
  --tilt: 0.9deg;
}
.cc-card:nth-child(3n) {
  --tilt: -0.3deg;
}
.cc-card:nth-child(1) {
  animation-delay: 30ms;
}
.cc-card:nth-child(2) {
  animation-delay: 90ms;
}
.cc-card:nth-child(3) {
  animation-delay: 150ms;
}
.cc-card:nth-child(n + 4) {
  animation-delay: 210ms;
}
@keyframes cc-card-in {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(var(--tilt, 0deg)) scale(0.97);
  }
}
.cc-card.is-open {
  transform: rotate(0deg);
}
.cc-card.is-written {
  box-shadow:
    0 0 0 2px #8bb5a3,
    0 18px 40px rgba(44, 51, 47, 0.14);
}
.cc-face {
  position: relative;
  width: 100%;
  min-height: 176px;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  color: inherit;
}
.cc-card.is-open .cc-face {
  min-height: 0;
  padding-bottom: 6px;
}
.cc-prompt {
  font-size: 21px;
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: -0.015em;
  padding-right: 44px;
  overflow-wrap: anywhere;
}
.cc-cta {
  align-self: flex-start;
  font-size: 13.5px;
  font-weight: 650;
  color: #24584e;
  background: #e6efe9;
  border-radius: 999px;
  padding: 7px 14px;
}
.cc-card.is-open .cc-cta {
  display: none;
}
.cc-badge {
  position: absolute;
  top: 16px;
  right: 14px;
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: #1f5b4a;
  background: #d5e8de;
  border-radius: 999px;
  padding: 3px 10px;
}
.cc-card.is-written .cc-badge {
  display: block;
  animation: cc-stamp 360ms cubic-bezier(0.3, 1.6, 0.5, 1);
}
.cc-card.is-written .cc-cta {
  background: #d5e8de;
}
@keyframes cc-stamp {
  from {
    transform: scale(0.4) rotate(-12deg);
    opacity: 0;
  }
}
.cc-editor {
  padding: 4px 12px 14px;
  display: grid;
  gap: 10px;
}
.cc-editor[hidden] {
  display: none;
}
.cc-area {
  width: 100%;
  resize: none;
  border: 1px solid #d5ddd8;
  border-radius: 14px;
  background: #f8f9f7;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.55;
  color: #24302f;
}
.cc-area:focus {
  background: #fff;
  border-color: #8bb5a3;
}
.cc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: #6a7a73;
}
.cc-link {
  border: 0;
  background: transparent;
  color: #24584e;
  font-size: 12.5px;
  font-weight: 650;
  padding: 6px 4px;
  min-height: 32px;
}
.cc-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.cc-skip,
.cc-done {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14.5px;
}
.cc-skip {
  border: 1px solid #c9d3cd;
  background: #fff;
  color: #51635b;
}
.cc-done {
  border: 0;
  background: #29423b;
  color: #fff;
  font-weight: 650;
}
/* The dialogue card reuses the real chat bubbles. */
.cc-bubble-row {
  margin-bottom: 4px;
}
.cc-bubble {
  min-width: 0;
  flex: 1;
  max-width: 100%;
}
.cc-bubble-out .cc-area {
  background: #dce8df;
  border-color: transparent;
  border-radius: 16px 4px 16px 16px;
}
.cc-bubble-in .cc-area {
  background: #f1f4f2;
  border-radius: 4px 16px 16px 16px;
}
.cc-bubble-out {
  margin-left: 28px;
}
.cc-hint {
  margin: 0;
  font-size: 12.5px;
  color: #8a5a3c;
}
.cc-dots {
  flex: none;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 2px 0 8px;
}
.cc-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cc-ink);
  opacity: 0.25;
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}
.cc-dots i.on {
  opacity: 0.8;
  transform: scale(1.35);
}
.cc-foot {
  flex: none;
  display: grid;
  gap: 8px;
  padding: 8px 22px max(18px, env(safe-area-inset-bottom));
}
.cc-notice {
  margin: 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.5;
  color: #6a3f2a;
}
.cc-send {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #29423b;
  color: #fff;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(41, 66, 59, 0.28);
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}
.cc-send:active:not(:disabled) {
  transform: scale(0.98);
}
.cc-send:disabled {
  opacity: 0.45;
  box-shadow: none;
}
.cc-thanks {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: color-mix(in srgb, var(--cc-color) 92%, #fff);
  animation: cc-thanks-in 320ms ease both;
}
.cc-thanks[hidden] {
  display: none;
}
.cc-thanks-title {
  font-size: 21px;
  font-weight: 750;
  color: var(--cc-ink);
}
.cc-thanks-sub {
  margin: 0;
  font-size: 14px;
  color: #51635b;
}
.cc-note-art {
  width: 92px;
  height: 110px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(44, 51, 47, 0.16);
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 0 16px;
  transform: rotate(-4deg);
  animation: cc-flutter 1.4s ease-in-out infinite alternate;
}
.cc-note-art i {
  height: 5px;
  border-radius: 3px;
  background: #b7d0c4;
}
.cc-note-art i:nth-child(2) {
  width: 70%;
}
.cc-note-art i:nth-child(3) {
  width: 45%;
}
@keyframes cc-flutter {
  to {
    transform: translateY(-8px) rotate(3deg);
  }
}
@keyframes cc-thanks-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cc-sheet,
  .cc-card,
  .cc-card.is-written .cc-badge,
  .cc-note-art,
  .cc-thanks,
  .chat-menu {
    animation: none;
  }
  .cc-card {
    transition: none;
  }
}

/* 共创收件箱 (administrators): a list on the left, the chosen submission on the right; one column on a phone. */
.account-admin-page[data-surface="cocreation"] {
  width: min(1040px, 100%);
}
.cocreation-badge {
  display: inline-block;
  min-width: 22px;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #b4542f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  vertical-align: middle;
  text-decoration: none;
  white-space: nowrap;
}
a.cocreation-badge:hover,
a.cocreation-badge:focus-visible {
  background: #8f3f21;
  text-decoration: underline;
}
/* Inbox: list and detail are two separate scroll regions beside each other; the page itself does not scroll. */
#admin-cocreation {
  display: grid;
  gap: 10px 22px;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.3fr);
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}
#admin-cocreation > h2,
#admin-cocreation > p,
#admin-cocreation > .cc-toolbar {
  grid-column: 1 / -1;
  margin: 0;
}
#admin-cocreation > .cc-detail {
  grid-column: 2;
  grid-row: 4 / span 4;
  min-height: 0;
  overflow: auto;
  align-content: start;
}
#admin-cocreation > .cc-bulk,
#admin-cocreation > .cc-empty,
#admin-cocreation > .cc-more {
  grid-column: 1;
}
#admin-cocreation > .cc-list {
  grid-column: 1;
  min-height: 0;
  overflow: auto;
}
.cc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: end;
}
.cc-toolbar label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.cc-toolbar .cc-star-filter {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.cc-bulk {
  display: flex;
  gap: 8px;
}
.cc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cc-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #bacac1;
  border-radius: 14px;
  background: #fff;
}
.cc-row.is-active {
  border-color: #294b40;
  box-shadow: 0 0 0 2px rgba(41, 75, 64, 0.2);
}
.account-admin-page .cc-row-open {
  display: grid;
  gap: 5px;
  justify-items: start;
  align-self: stretch;
  width: 100%;
  min-height: 44px;
  padding: 2px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #24302f;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.account-admin-page .cc-row-open:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 3px;
}
.cc-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  font-size: 13px;
  color: #405c61;
}
.cc-row-head strong {
  color: #24302f;
  font-size: 15px;
}
.cc-first {
  font-size: 14px;
  color: #24302f;
  overflow-wrap: anywhere;
}
.cc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cc-chip {
  font-size: 12px;
  padding: 1px 9px;
  border-radius: 999px;
  background: #e6eee9;
  color: #294b40;
}
.cc-chip-new {
  background: #f4dccf;
  color: #8a3f1e;
}
.cc-chip-archived {
  background: #e4e4e0;
  color: #5b5b55;
}
.cc-chip-star {
  background: #f6ecc6;
  color: #7a5b00;
}
.cc-chip-adopted {
  background: #d5e8de;
  color: #1f5b4a;
}
.cc-detail {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #bacac1;
  border-radius: 16px;
  background: #fbfcfa;
}
.cc-detail[hidden] {
  display: none;
}
.cc-detail-actions,
.cc-answer-actions,
.cc-adopt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cc-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #294b40;
}
.cc-answer {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #f1f4f2;
}
.cc-answer .cc-card-prompt {
  margin: 0;
  font-size: 12.5px;
  color: #5d6e67;
}
.cc-answer-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #24302f;
  white-space: pre-wrap;
}
.cc-chat .message-row {
  margin-bottom: 8px;
}
.cc-adopt {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #8bb5a3;
  border-radius: 12px;
  background: #fff;
  margin: 0 !important;
}
.cc-adopt textarea,
.cc-note {
  width: 100%;
  border: 1px solid #bacac1;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 15px;
}
.cc-example {
  display: grid;
  gap: 8px;
}
.cc-example[hidden],
.cc-adopt textarea[hidden] {
  display: none;
}
.cc-adopt-error {
  margin: 0;
  color: #8f2d1c !important;
  font-weight: 600;
}
.cc-adopt-error[hidden] {
  display: none;
}
.cc-adopt-help {
  margin: 0 !important;
  font-size: 13px !important;
}
.cc-note-box {
  display: grid;
  gap: 8px;
}

/* Account sheets (注册 / 登录 / 忘记密码 / 绑定邮箱 / 我的昵称 / 修改密码) and the signed-out first page. */
.acct-sheet {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: #f6f4ef;
  color: #24302f;
  overflow-y: auto;
  animation: cc-sheet-in 240ms cubic-bezier(0.2, 0.82, 0.24, 1);
}
.acct-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 8px;
  width: min(420px, 100%);
}
.acct-title {
  font-size: 20px;
}
.acct-close {
  min-width: 44px;
  min-height: 44px;
  font-size: 24px;
}
.acct-body,
.acct-status {
  width: min(420px, 100%);
  margin: 0 auto;
}
.acct-form {
  display: grid;
  gap: 14px;
}
.acct-intro {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.acct-field {
  display: grid;
  gap: 6px;
}
.acct-label {
  font-size: 14px;
}
.acct-hint {
  font-size: 12px;
  opacity: 0.7;
}
.acct-input {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #b9c4bf;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}
.acct-input:focus-visible {
  outline: 3px solid #24584e;
  outline-offset: 2px;
}
.acct-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
}
.acct-primary {
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: #294b40;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.acct-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}
.acct-link {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #294b40;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.acct-link:disabled {
  opacity: 0.55;
  text-decoration: none;
  cursor: default;
}
.acct-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.acct-notice {
  padding: 10px 12px;
  border-radius: 12px;
  background: #ece8dd;
  font-size: 14px;
  line-height: 1.6;
}
.acct-notice p {
  margin: 4px 0 0;
}
.acct-status {
  min-height: 24px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #7a2f2f;
}
.acct-done,
.acct-closed {
  margin: 24px 0;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}
.signed-out-page .signed-out-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.signed-out-page .signed-out-secondary {
  background: transparent;
  color: #294b40;
  border: 1px solid #294b40;
}
.signed-out-page .signed-out-notice {
  min-height: 24px;
  margin: 0 0 8px;
  font-size: 14px;
  color: #7a2f2f;
}
.signed-out-page .signed-out-more {
  display: flex;
  justify-content: center;
}
.signed-out-page .signed-out-recovery {
  margin: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #5a6b66;
  font-size: 13px;
  text-decoration: underline;
}

/*
 * Admin console shell (desktop browsers, 1280–1920 px; below 1024 px only a notice is shown).
 * Layout and information architecture follow common admin templates, and the design tokens (neutral greys, 4–8 px
 * radii, 14 px base type, soft shadows) are borrowed in spirit from the MIT-licensed Tabler (https://tabler.io) and
 * shadcn-admin (https://github.com/satnaing/shadcn-admin). No code or assets were copied; this is our own CSS.
 * The page never scrolls: the top bar and status bar are fixed rows and each region (content, list, detail, table,
 * sidebar) scrolls on its own. A scroll container never sits inside another one.
 */
html:has(.admin-shell),
body:has(.admin-shell) {
  height: 100%;
  overflow: hidden;
}
.local-admin-root:has(.admin-shell) {
  display: block;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  background: #f4f6f5;
}
.account-admin-page.admin-shell {
  --ad-bg: #f4f6f5;
  --ad-surface: #fff;
  --ad-border: #dde3df;
  --ad-text: #1f2a26;
  --ad-muted: #5b6b64;
  --ad-primary: #294b40;
  --ad-primary-soft: #e3ece7;
  --ad-danger: #a33a2a;
  --ad-radius: 6px;
  --ad-nav-width: 232px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-width: none;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background: var(--ad-bg);
  color: var(--ad-text);
  font-size: 14px;
}
.admin-shell[data-nav="collapsed"] {
  --ad-nav-width: 56px;
}
.admin-narrow-notice {
  display: none;
}
@media (max-width: 1023px) {
  .admin-shell > :not(.admin-narrow-notice) {
    display: none !important;
  }
  .account-admin-page.admin-shell .admin-narrow-notice {
    display: grid;
    place-items: center;
    height: 100dvh;
    padding: 32px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
  }
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: var(--ad-surface);
  border-bottom: 1px solid var(--ad-border);
}
.admin-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.admin-shell .admin-brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.admin-env {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ad-primary-soft);
  color: var(--ad-primary);
  font-size: 12px;
}
.admin-env:empty {
  display: none;
}
.admin-account {
  position: relative;
}
.account-admin-page.admin-shell .admin-account-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--ad-border);
  background: var(--ad-surface);
  color: var(--ad-text);
  border-radius: var(--ad-radius);
}
.admin-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 220px;
  padding: 6px;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 42, 38, 0.14);
}
.account-admin-page.admin-shell .admin-menu .admin-identity {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ad-border);
  color: var(--ad-muted);
  font-size: 12px;
}
.account-admin-page.admin-shell .admin-menu-item {
  display: block;
  width: 100%;
  min-height: 34px;
  margin: 2px 0 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ad-text);
  text-align: left;
  text-decoration: none;
  font-size: 14px;
}
.account-admin-page.admin-shell .admin-menu-item:hover,
.account-admin-page.admin-shell .admin-menu-item:focus-visible {
  background: var(--ad-primary-soft);
  filter: none;
}
.admin-frame {
  display: grid;
  grid-template-columns: var(--ad-nav-width) minmax(0, 1fr);
  min-height: 0;
}
.admin-shell[data-surface="login"] .admin-frame {
  grid-template-columns: minmax(0, 1fr);
}
.admin-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 8px;
  background: var(--ad-surface);
  border-right: 1px solid var(--ad-border);
}
.account-admin-page.admin-shell .admin-nav {
  display: flex;
  margin: 0;
  border-bottom: 0;
  flex-wrap: nowrap;
}
.admin-sidebar[hidden] {
  display: none;
}
.admin-nav-title {
  margin: 14px 10px 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ad-muted);
}
.account-admin-page.admin-shell .admin-nav-title {
  font-size: 12px;
  margin: 14px 10px 4px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--ad-radius);
  color: var(--ad-text);
  text-decoration: none;
}
.admin-nav-item[hidden] {
  display: none;
}
.admin-nav-item:hover {
  background: var(--ad-bg);
}
.admin-nav-item[aria-current="page"] {
  background: var(--ad-primary-soft);
  color: var(--ad-primary);
  font-weight: 650;
}
.admin-nav-item:focus-visible,
.account-admin-page.admin-shell button:focus-visible {
  outline: 2px solid var(--ad-primary);
  outline-offset: 2px;
}
.admin-icon {
  flex: none;
  width: 18px;
  height: 18px;
}
.account-admin-page.admin-shell .admin-nav-collapse {
  min-height: 34px;
  margin: 8px 0 0;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ad-muted);
  align-self: stretch;
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-shell[data-nav="collapsed"] .admin-nav-title,
.admin-shell[data-nav="collapsed"] .admin-nav-item span,
.admin-shell[data-nav="collapsed"] .admin-nav-collapse-text {
  display: none;
}
.admin-shell[data-nav="collapsed"] .admin-nav-item,
.admin-shell[data-nav="collapsed"] .admin-nav-collapse {
  justify-content: center;
  padding: 0;
}
.admin-shell[data-nav="collapsed"] .admin-nav-collapse span[aria-hidden] {
  transform: rotate(180deg);
}
.admin-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 20px 28px 32px;
  outline: none;
}
.admin-content > * {
  flex: none;
}
.admin-shell[data-surface="preview"] .admin-content,
.admin-shell[data-surface="cocreation"] .admin-content {
  overflow: hidden;
}
.admin-shell[data-surface="preview"] .admin-content > section[data-panel]:not([hidden]),
.admin-shell[data-surface="cocreation"] .admin-content > section[data-panel]:not([hidden]) {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.admin-shell[data-surface="cocreation"] #admin-cocreation,
.admin-shell[data-surface="preview"] #admin-preview {
  flex: 1 1 0;
  min-height: 0;
}
.account-admin-page.admin-shell .admin-content h2 {
  margin: 0 0 12px;
  font-size: 20px;
}
.account-admin-page.admin-shell .admin-content p {
  color: var(--ad-muted);
}
.admin-content > section[data-panel] {
  width: 100%;
  max-width: 1280px;
}
.admin-content > section[data-panel="members"],
.admin-content > section[data-panel="invites"],
.admin-content > section[data-panel="account"] {
  max-width: 960px;
}
.admin-shell[data-surface="login"] .admin-content {
  align-items: center;
  padding-top: 12vh;
}
.admin-shell[data-surface="login"] .admin-content > section[data-panel]:not([hidden]) {
  max-width: 420px;
  padding: 24px 28px;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(31, 42, 38, 0.06);
}
.admin-statusbar,
.account-admin-page.admin-shell .invite-admin-status {
  min-height: 30px;
  margin: 0;
  padding: 6px 20px;
  border-top: 1px solid var(--ad-border);
  background: var(--ad-surface);
  color: var(--ad-muted);
  font-size: 13px;
}
/* Controls: denser than the mobile-first originals. */
.account-admin-page.admin-shell input:not([type="checkbox"]),
.account-admin-page.admin-shell select {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: var(--ad-radius);
  border-color: #c6d0ca;
  font-size: 14px;
}
.account-admin-page.admin-shell textarea {
  font-size: 14px;
  border-radius: var(--ad-radius);
  min-height: 90px;
}
.account-admin-page.admin-shell button {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--ad-radius);
  font-size: 14px;
}
.account-admin-page.admin-shell form {
  max-width: 560px;
  margin: 14px 0;
}
.account-admin-page.admin-shell .character-profile-form {
  max-width: 760px;
}
.account-admin-page.admin-shell fieldset {
  border-radius: var(--ad-radius);
}
.account-admin-page.admin-shell .admin-danger {
  background: var(--ad-danger);
  color: #fff;
}
.admin-shell .admin-hint,
.admin-shell .admin-empty {
  color: var(--ad-muted);
}
.admin-shell .admin-empty {
  padding: 24px 12px;
  text-align: center;
}
/* Result banner for one-time codes stays visible while the page scrolls. */
.account-admin-page.admin-shell .invite-admin-result {
  position: sticky;
  top: -20px;
  z-index: 5;
  margin: 0 0 14px;
  max-width: 960px;
}
/* Sticky toolbars and in-page section index (inside the single content scroll region). */
.admin-bar,
.account-admin-page.admin-shell .admin-content .admin-toolbar {
  position: sticky;
  top: -20px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 14px;
  margin: 0 -28px 12px;
  padding: 10px 28px;
  background: var(--ad-bg);
  border-bottom: 1px solid var(--ad-border);
}
.admin-bar-title {
  align-self: center;
  font-size: 16px;
}
.admin-bar-spacer {
  flex: 1;
}
.admin-filter {
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ad-muted);
}
.account-admin-page.admin-shell .admin-filter input,
.account-admin-page.admin-shell .admin-filter select {
  width: 200px;
}
.admin-section-index {
  position: sticky;
  top: 48px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 -28px 12px;
  padding: 8px 28px;
  background: var(--ad-bg);
  border-bottom: 1px solid var(--ad-border);
}
.admin-section-index[hidden] {
  display: none;
}
/* Data table: the wrapper is the one scroll region, the header row stays put. */
.admin-table-region {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
}
.admin-table-wrap {
  min-height: 0;
  overflow: auto;
}
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.admin-table[hidden] {
  display: none;
}
.admin-table caption {
  position: absolute;
  left: -9999px;
}
.admin-table th,
.admin-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--ad-border);
  white-space: nowrap;
}
.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef2ef;
  color: var(--ad-muted);
  font-weight: 600;
}
.admin-table .is-end {
  text-align: right;
}
.admin-table .admin-select-col {
  width: 36px;
}
.account-admin-page.admin-shell .admin-table .admin-sort {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}
.admin-table th[aria-sort="ascending"] .admin-sort::after {
  content: " ↑";
}
.admin-table th[aria-sort="descending"] .admin-sort::after {
  content: " ↓";
}
.admin-table tbody tr:hover {
  background: #f7faf8;
}
.admin-bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--ad-primary-soft);
  border-bottom: 1px solid var(--ad-border);
}
.admin-bulk-bar[hidden] {
  display: none;
}
.admin-bulk-count {
  margin-right: auto;
  font-weight: 600;
}
.admin-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e8ecea;
  color: #3d4d46;
  font-size: 12px;
  line-height: 1.6;
}
.admin-badge[data-tone="ok"] {
  background: #d9eee2;
  color: #1c5a40;
}
.admin-badge[data-tone="warn"] {
  background: #f6ebcf;
  color: #7a5a10;
}
.admin-badge[data-tone="danger"] {
  background: #f6dcd6;
  color: #8a2f20;
}
.admin-badge[data-tone="info"] {
  background: #dce8f4;
  color: #1f4f7a;
}
.admin-kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 18px;
  margin: 0;
}
.admin-kv dt {
  color: var(--ad-muted);
}
.admin-kv dd {
  margin: 0;
}
/* Split pane: list | detail, each its own scroll region. */
.admin-fill {
  height: 100%;
  min-height: 0;
}
.admin-split {
  display: grid;
  grid-template-columns: var(--split-list-width, 320px) 8px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.admin-split-list,
.admin-split-detail {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.admin-split-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}
.admin-split-detail {
  padding-left: 12px;
}
.admin-split-divider {
  cursor: col-resize;
  border-radius: 4px;
  background: transparent;
  touch-action: none;
}
.admin-split-divider:hover,
.admin-split-divider:focus-visible {
  background: var(--ad-border);
  outline: none;
}
.account-admin-page.admin-shell .admin-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ad-border);
  background: var(--ad-surface);
  color: var(--ad-text);
  text-align: left;
}
.account-admin-page.admin-shell .admin-pick[aria-current="true"] {
  border-color: var(--ad-primary);
  box-shadow: 0 0 0 1px var(--ad-primary);
}
.admin-pick-meta {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--ad-muted);
}
/* Drawer, dialog, toast. */
.admin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(31, 42, 38, 0.32);
}
.admin-backdrop[hidden],
.admin-drawer[hidden] {
  display: none;
}
.admin-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  display: flex;
  flex-direction: column;
  width: min(520px, 90vw);
  background: var(--ad-surface);
  box-shadow: -8px 0 24px rgba(31, 42, 38, 0.18);
}
.admin-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ad-border);
}
.admin-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.admin-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 52;
  width: min(440px, 90vw);
  padding: 20px 24px;
  transform: translate(-50%, -50%);
  background: var(--ad-surface);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(31, 42, 38, 0.28);
}
.admin-dialog h3 {
  margin: 0 0 8px;
}
.admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.admin-toasts {
  position: fixed;
  right: 20px;
  bottom: 44px;
  z-index: 60;
  display: grid;
  gap: 8px;
}
.admin-toast {
  padding: 10px 16px;
  border-radius: var(--ad-radius);
  background: #1f2a26;
  color: #fff;
  box-shadow: 0 6px 20px rgba(31, 42, 38, 0.25);
}
.admin-toast[data-tone="ok"] {
  background: #1c5a40;
}
.admin-toast[data-tone="danger"] {
  background: var(--ad-danger);
}
/* Permission editor. */
.permission-matrix {
  display: grid;
  gap: 4px 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 880px;
}
.permission-matrix > legend,
.permission-matrix > .permission-presets,
.permission-matrix > .permission-note {
  grid-column: 1 / -1;
}
.permission-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.permission-group h4 {
  margin: 10px 0 4px;
  font-size: 13px;
  color: var(--ad-muted);
}
.account-admin-page.admin-shell .permission-matrix label.permission-item {
  min-height: 30px;
}
.account-admin-page.admin-shell .permission-matrix .permission-help {
  margin: 0 0 6px 29px;
  font-size: 12px;
}
.account-admin-page.admin-shell .permission-note {
  min-height: 20px;
  margin: 6px 0 0;
  color: #7a5a10;
}
.account-admin-page.admin-shell .admin-members-wide,
.account-admin-page.admin-shell .admin-member .permission-matrix {
  max-width: none;
}
/* Characters and the inbox: wide content, sticky bars sit inside the one content scroll region. */
.account-admin-page.admin-shell .character-directory {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.account-admin-page.admin-shell .character-directory-row {
  padding: 12px 14px;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
}
.account-admin-page.admin-shell .character-flow,
.account-admin-page.admin-shell .preview-panel {
  max-width: 920px;
}
.account-admin-page.admin-shell .preview-card {
  margin: 10px 0;
  padding: 10px 14px;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
}
.account-admin-page.admin-shell .admin-toolbar:empty {
  display: none;
}

/* 预演测试 workbench (Part 13b). Reuses the admin table, toolbar, badge and drawer; only layout lives here. */
.account-admin-page.admin-shell .pw {
  display: grid;
  gap: 14px;
  max-width: none;
}
.pw .admin-bar {
  position: static;
  margin: 0;
  padding: 8px 12px;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
}
.pw .admin-bar .admin-filter input,
.pw .admin-bar .admin-filter select {
  width: auto;
  min-width: 120px;
}
.pw-zone {
  align-self: center;
  margin: 0;
}
.pw-compose {
  display: grid;
  gap: 8px;
}
.pw-compose-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.pw-compose-row input[type="text"],
.pw-compose-row textarea {
  flex: 1;
  min-width: 0;
}
.pw-compose-col {
  display: grid;
  gap: 6px;
  align-content: start;
  width: 260px;
}
.pw-estimate {
  margin: 0;
}
.pw-run {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  margin-bottom: 10px;
}
.pw-run > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.pw-run-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.pw-run-body {
  padding: 0 10px 10px;
}
.pw .admin-table td {
  white-space: normal;
  vertical-align: top;
}
.pw .admin-table tbody tr[tabindex] {
  cursor: pointer;
}
.pw-bubbles {
  display: grid;
  gap: 4px;
}
.pw-bubble {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.pw-fail {
  color: var(--ad-danger);
}
.pw-section {
  margin-bottom: 18px;
}
.pw-section h4,
.pw-section h5 {
  margin: 0 0 6px;
}
.pw-pre {
  margin: 0;
  padding: 8px 10px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f4f7f5;
  border: 1px solid var(--ad-border);
  border-radius: 6px;
  font-size: 12px;
}
.pw-raw {
  border-color: var(--ad-danger);
}
.pw-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pw-diff-row {
  padding: 4px 0;
  border-bottom: 1px dashed var(--ad-border);
}
.pw-del {
  background: #fde4e1;
  color: #8a2a20;
  text-decoration: line-through;
}
.pw-add {
  background: #def3e3;
  color: #1d5c32;
}
.pw-coverage {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.pw-eval {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
}
.pw-eval-list,
.pw-eval-form {
  display: grid;
  gap: 8px;
  align-content: start;
}
.pw-eval textarea {
  width: 100%;
  min-height: 260px;
}
.pw-settlement {
  margin: 6px 0;
}
.admin-drawer.admin-drawer-wide {
  width: min(1180px, 94vw);
}

/* Top bar account entries (登录 / 注册 / nickname) next to 邀请码, and the one-line next step when the trial is used up. */
.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}
.head-account {
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.head-account:hover,
.head-account:focus-visible {
  border-color: currentColor;
}
.head-account[aria-haspopup]::after {
  content: " ▾";
}
.head-hint {
  font-size: 12px;
  color: #615044;
  margin-right: 12px;
}
.site-head:has(.head-hint) .head-note {
  margin-right: 8px;
}
.site-head:has(.head-hint) .head-hint {
  margin-right: 12px;
}
@media (max-width: 600px) {
  .site-head:has(.head-actions) {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
    row-gap: 2px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .head-hint {
    order: 5;
    flex-basis: 100%;
    margin: 0;
    text-align: right;
  }
  .head-actions {
    gap: 4px;
  }
}

/* Part 15: player only. Desktop chrome/orbit and every admin selector stay unchanged. */
.page-shell .mobile-account {
  display: none;
}
@media (min-width: 601px) {
  .page-shell .carousel {
    height: min(840px, calc(100dvh - 220px));
  }
  .page-shell .card-slot {
    height: min(794px, calc(100dvh - 240px));
    min-height: 380px;
  }
  .page-shell .card-slot.is-chat {
    width: min(376px, calc(100vw - 108px));
    height: min(794px, calc(100dvh - 22px));
  }
}
@media (max-width: 600px) {
  /* Track the visible viewport (including Safari's keyboard pan), not the layout viewport. */
  .page-shell,
  .page-shell[data-phase] {
    position: fixed;
    width: var(--chat-width, 100vw);
    height: var(--chat-height, 100dvh);
    min-height: 0;
    left: calc(var(--chat-left, 50vw) - var(--chat-width, 100vw) / 2);
    top: calc(var(--chat-top, 50dvh) - var(--chat-height, 100dvh) / 2);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--page-bg);
  }
  .page-shell[data-phase] .site-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 44px auto;
    column-gap: 4px;
    row-gap: 0;
    flex-wrap: nowrap;
    height: auto;
    min-height: 68px;
    padding: 0 16px 6px;
    visibility: visible;
    align-items: center;
  }
  .page-shell .brand {
    grid-column: 1;
    grid-row: 1 / 3;
    gap: 6px;
    font-size: 15px;
    white-space: nowrap;
  }
  .page-shell .brand-mark {
    width: 24px;
    height: 24px;
    flex: none;
  }
  .page-shell .head-actions {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    gap: 0;
    min-width: 0;
  }
  .page-shell .desktop-account {
    display: none;
  }
  .page-shell .mobile-account {
    display: block;
  }
  .page-shell .head-account,
  .page-shell .site-head > .invite-entry {
    min-height: 44px;
    min-width: 44px;
    padding: 4px 8px;
    font-size: 13px;
    white-space: nowrap;
  }
  .page-shell .head-account {
    max-width: 96px;
  }
  .page-shell .site-head > .invite-entry {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
  }
  .page-shell .site-head .head-note {
    display: block;
    grid-column: 2 / 4;
    grid-row: 2;
    margin: 0;
    font-size: 12px;
    letter-spacing: 0;
    line-height: 18px;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .page-shell .site-head .head-hint {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 4px -16px 0;
    padding: 4px 16px;
    text-align: center;
    line-height: 18px;
    background: rgba(255, 255, 255, 0.22);
  }
  .page-shell .main-area {
    min-height: 0;
    flex: 1;
  }
  .page-shell .carousel {
    flex: 1;
    min-height: 0;
    height: auto;
  }
  .page-shell[data-phase] .card-slot,
  .page-shell[data-phase] .card-slot.is-chat {
    position: absolute;
    width: calc(100% - 32px);
    height: 100%;
    min-height: 0;
    left: 50%;
    top: 50%;
  }
  .page-shell[data-phase] .card-slot.is-chat .card-shell {
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(44, 51, 47, 0.16);
  }
  .page-shell .chat-head {
    height: 44px;
    gap: 8px;
    padding: 0 8px;
  }
  .page-shell .chat-head strong {
    font-size: 15px;
    line-height: 20px;
  }
  .page-shell .chat-head .back-button {
    margin-left: 0;
  }
  .page-shell .chat-body {
    min-height: 0;
    overflow-y: auto;
    padding: 16px 12px;
  }
  .page-shell .card-slot.is-chat .chat-body {
    padding-top: 12px;
  }
  .page-shell .friend-notice {
    white-space: normal;
    overflow-wrap: anywhere;
    margin-bottom: 16px;
  }
  .page-shell[data-phase] .composer {
    min-height: 60px;
    padding: 8px;
  }
  .page-shell .play-button,
  .page-shell .transcript-toggle {
    min-height: 44px;
    min-width: 44px;
  }
  .page-shell[data-phase] .avatar-nav {
    display: block;
    position: relative;
    width: 100%;
    height: 68px;
    flex: none;
    margin-top: 8px;
    padding: 0;
    left: auto;
    bottom: auto;
    transform: none;
    background: transparent;
    box-shadow: none;
  }
  .page-shell[data-phase="chat"] .avatar-nav,
  .page-shell[data-phase="expanding"] .avatar-nav,
  .page-shell[data-phase="collapsing"] .avatar-nav {
    display: none;
  }
  .page-shell[data-phase] .avatar-choice {
    width: 48px;
    height: 48px;
    min-width: 48px;
    transform: translate(-50%, 0) translateX(var(--avatar-x)) translateY(calc(var(--avatar-y) * 0.3));
  }
  .page-shell[data-phase] .avatar-choice-mark {
    /* 54 px → 45.9 px: circles shrink 15%; hit targets remain 48 px. */
    width: 45.9px;
    height: 45.9px;
    border-radius: 50%;
    font-size: 18px;
  }
  .page-shell[data-phase="chat"] .preview-note,
  .page-shell[data-phase="expanding"] .preview-note {
    display: none;
  }
  .page-shell[data-phase="browse"] .preview-note,
  .page-shell[data-phase="hover"] .preview-note {
    display: block;
    visibility: visible;
    padding: 0 16px 4px;
    margin: 0;
    font-size: 10px;
    line-height: 14px;
  }
}

/* Part 17: consent line, erase sheets, grace hint, Turnstile box and the legal pages. */
.acct-legal {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #3b4a45;
}
.acct-legal a,
.legal-link,
.signed-out-legal a {
  color: #294b40;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.acct-expired,
.signed-out-expired,
.signed-out-erased {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ece8dd;
  font-size: 14px;
  line-height: 1.6;
}
.acct-warning {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4e4e1;
  color: #5c2420;
}
.acct-danger {
  background: #8a2f27;
}
.signed-out-legal {
  margin: 12px 0 0;
  font-size: 12px;
  text-align: center;
}
/* Part 17f: the check is centred on both axes (desktop and phone), not parked at the bottom. The wrapper covers the
   viewport only to centre its child and lets every tap through except on the widget itself. */
.human-check {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  pointer-events: none;
  z-index: 400;
}
.human-check > * {
  pointer-events: auto;
}
.legal-doc {
  box-sizing: border-box;
  max-width: 720px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
  background: #f6f4ef;
  color: #24302f;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.85;
}
.legal-doc h1 {
  font-size: 24px;
  margin: 0 0 4px;
}
.legal-doc h2 {
  font-size: 17px;
  margin: 28px 0 6px;
}
.legal-doc p,
.legal-doc li {
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.legal-doc ul {
  padding-left: 20px;
}
.legal-doc .legal-meta {
  font-size: 13px;
  color: #5a6762;
}
.legal-doc .legal-todo {
  background: #fff1c2;
  border-radius: 4px;
  padding: 0 3px;
}
.legal-doc .legal-draft {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff1c2;
  font-size: 13px;
}
.legal-doc nav {
  margin-top: 32px;
  font-size: 13px;
}
.legal-doc nav a {
  color: #294b40;
}
body.legal-page {
  margin: 0;
  background: #f6f4ef;
}
.acct-bonus {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e3efe6;
  font-size: 14px;
  line-height: 1.6;
}

/* Part 19: the one-time chat-review banner (CHAT_REVIEW_ENABLED) and the 18+ tick of the signup sheet. */
.review-banner {
  display: none;
  flex: none;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 8px 8px 18px;
  background: #f2efe4;
  border-bottom: 1px solid #e1ddd0;
  color: #5a4c3f;
  font-size: 12px;
  line-height: 1.6;
}
.card-slot.is-chat .review-banner {
  display: flex;
}
.review-banner-text {
  flex: 1;
  margin: 0;
}
.review-banner-text a {
  color: #294b40;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.review-banner-close {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 20px;
  line-height: 1;
}
.review-banner-close:hover {
  background: rgba(0, 0, 0, 0.06);
}
.acct-adult {
  margin: 2px 0;
}

/* Part 19: 测试对话 (the owner's anonymous transcript review). */
.review-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  font-size: 13px;
  color: var(--ad-muted);
}
.review-state {
  align-self: center;
  font-size: 12px;
  color: var(--ad-muted);
}
.review-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.review-line {
  display: grid;
  grid-template-columns: 9.5em 6.5em 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ad-surface, #fff);
  border: 1px solid var(--ad-border);
  line-height: 1.6;
}
.review-line.is-player {
  background: var(--ad-bg);
}
.review-line.is-failed {
  border-color: #c98f86;
  color: #8a3b30;
}
.review-time,
.review-speaker {
  font-size: 12px;
  color: var(--ad-muted);
  white-space: nowrap;
}
.review-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-changed {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--ad-border);
  color: var(--ad-muted);
  white-space: nowrap;
}
