@font-face {
  font-family: Pretendard;
  src: url("/chat-content.woff2") format("woff2");
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  color-scheme: light;
  --bg: #f9f9f9;
  --surface: #f6f7f8;
  --hover: #f0f2f4;
  --line: #e9ebef;
  --text: #20232a;
  --muted: #68707c;
  --accent: #303f4d;
  --own: #dfeaf3;
  --bubble: #fff;
  --room: #f3f5f7;
  --danger: #b43138;
  --shadow: 0 20px 80px #1a253017;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181a1e;
  --surface: #16191d;
  --hover: #272c33;
  --line: #30353c;
  --text: #eceef1;
  --muted: #a6aeb9;
  --accent: #dce6ef;
  --own: #354b60;
  --bubble: #292e36;
  --room: #20242b;
  --danger: #ff9fa4;
  --shadow: 0 20px 80px #0005;
}
html,
body {
  height: 100%;
  margin: 0;
}
body,
input,
button,
textarea {
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}
body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
textarea {
  font-size: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #628db0;
  outline-offset: 3px;
}
input,
textarea {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.primary {
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  padding: 13px 22px;
  font-weight: 650;
  min-height: 46px;
}
.primary:hover {
  opacity: 0.85;
}
.wide {
  width: 100%;
  margin-top: 18px;
}
.text-button {
  padding: 9px 6px;
  color: var(--muted);
  font-size: 12px;
}
.text-button:hover {
  color: var(--text);
}
.danger {
  color: var(--danger);
}
.icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  font-size: 25px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon:hover {
  background: var(--hover);
  color: var(--text);
}
#gate {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
#gate > .entry-emblem {
  width: 200px;
  height: 160px;
  background: url("/entry-mark-light.webp?v=entry-fast-1") center/contain
    no-repeat;
}
#gate h1 {
  font-size: 25px;
  letter-spacing: -1px;
  font-weight: 550;
}
#gate #authenticate {
  width: 248px;
  min-height: 54px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
#status {
  font-size: 13px;
  color: var(--muted);
  min-height: 40px;
  white-space: pre-line;
  text-align: center;
}
#theme-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  font-size: 18px;
}
#app {
  display: grid;
  grid-template-columns: 76px 330px minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  max-width: 1800px;
  margin: auto;
}
.rail {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 10px 18px;
  gap: 16px;
}
.brand {
  margin-bottom: 30px;
  display: flex;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.rail-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 54px;
  padding: 12px 0;
  border-radius: 16px;
  color: var(--muted);
}
.rail-tab span {
  font-size: 11px;
  font-weight: 550;
}
.rail-tab svg {
  width: 24px;
  height: 24px;
}
.rail-tab.selected {
  color: var(--text);
  background: var(--hover);
}
.rail-tab i:empty {
  display: none;
}
.rail-tab i {
  position: absolute;
  right: 3px;
  top: 5px;
  min-width: 17px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 10px;
  font-style: normal;
}
.rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 25px 24px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.3px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.list-header h1 {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 650;
}
.search {
  margin: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 13px;
  padding: 0 12px;
  color: var(--muted);
}
.search svg {
  width: 17px;
}
.search input {
  width: 100%;
  border: 0;
  background: none;
  padding: 12px 0;
  font-size: 12px;
  outline-offset: 8px;
}
#connection {
  font-size: 10px;
  color: var(--muted);
  padding: 13px 25px 8px;
  min-height: 35px;
}
.online::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #54856f;
  margin-right: 6px;
}
.list-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
}
.list-row {
  width: 100%;
  display: flex;
  text-align: left;
  align-items: center;
  gap: 12px;
  padding: 16px 13px;
  border-radius: 14px;
}
.list-row:hover,
.list-row.active {
  background: var(--hover);
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background: #e3e7eb;
  color: #5b6572;
  font-size: 18px;
  font-weight: 550;
  flex-shrink: 0;
}
[data-theme="dark"] .avatar {
  background: #343c46;
  color: #c5d0da;
}
.row-body {
  flex: 1;
  min-width: 0;
}
.row-title {
  display: flex;
  align-items: center;
  gap: 5px;
}
.row-body strong {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-preview {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.member-count {
  font-size: 11px;
  color: var(--muted);
}
.row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.row-side time {
  font-size: 9px;
  color: var(--muted);
}
.badge {
  font-size: 10px;
  background: var(--text);
  color: var(--bg);
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  text-align: center;
  padding: 0 5px;
}
.list-footer {
  border-top: 1px solid var(--line);
  padding: 18px 10px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: -0.2px;
}
.small-lock {
  padding-right: 5px;
}
.empty-list {
  text-align: center;
  padding: 70px 15px;
  color: var(--muted);
}
.empty-list h3 {
  font-size: 15px;
  font-weight: 550;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-list p {
  font-size: 12px;
}
.empty-list .text-button {
  margin-top: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.my-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 13px 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.my-profile > div {
  flex: 1;
}
.my-profile .muted {
  font-size: 12px;
  margin-top: 3px;
}
.section-label {
  font-size: 11px;
  color: var(--muted);
  padding: 0 13px 8px;
}
.conversation {
  background: var(--room);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.welcome {
  margin: auto;
  text-align: center;
  padding: 30px;
}
.welcome img {
  width: 115px;
  height: 110px;
  object-fit: contain;
  opacity: 1;
  margin-bottom: 20px;
}
.welcome h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.welcome p {
  color: var(--muted);
  font-size: 13px;
}
.welcome > span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 60px;
  letter-spacing: 0.5px;
}
.conversation-header {
  background: var(--bg);
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.conversation-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 15px;
  font-size: 16px;
}
.conversation-name {
  flex: 1;
  min-width: 0;
}
.conversation-name h2 {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.conversation-name p {
  font-size: 10px;
  margin-top: 3px;
}
.back {
  display: none;
}
.message-search {
  padding: 12px 30px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.message-search input {
  width: 100%;
}
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 36px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.encryption-notice {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 28px;
}
.day-divider {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin: 20px 0 26px;
}
.message-row {
  display: flex;
  align-items: flex-end;
  margin: 0 0 15px;
}
.message-row.own {
  justify-content: flex-end;
}
.message-column {
  max-width: min(80%, 540px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.own .message-column {
  align-items: flex-end;
}
.sender-name {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 5px 3px;
}
.bubble {
  background: var(--bubble);
  padding: 11px 15px;
  border-radius: 5px 17px 17px 17px;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1px #00000003;
  min-width: 40px;
}
.own .bubble {
  background: var(--own);
  border-radius: 17px 5px 17px 17px;
}
.message-text {
  white-space: pre-wrap;
}
.bubble.removed {
  font-style: italic;
  color: var(--muted);
  font-size: 12px;
}
.message-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.unread-number {
  color: #657e94;
}
.message-actions {
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.15s;
}
.message-row:hover .message-actions,
.message-actions:focus-within {
  opacity: 1;
}
.message-actions .text-button {
  padding: 3px 2px;
  font-size: 10px;
}
.reply-quote {
  padding: 0 0 8px;
  border-bottom: 1px solid #8090a333;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.file-download {
  text-align: left;
  display: block;
  font-weight: 550;
  overflow-wrap: anywhere;
  padding: 2px 0;
  max-width: 100%;
}
.file-size {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0 0;
}
.composer {
  margin: 0;
  padding: 18px 30px 10px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.compose-row {
  display: flex;
  gap: 13px;
  align-items: flex-end;
}
.attach {
  font-size: 26px;
  width: 36px;
  height: 42px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--muted);
}
#message-input {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  border: 0;
  padding: 11px 0;
  background: none;
  line-height: 1.6;
  font-size: 14px;
  border-radius: 0;
}
#send {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  margin-bottom: 4px;
  flex-shrink: 0;
}
#send svg {
  width: 20px;
  height: 20px;
}
.composer-note {
  text-align: right;
  font-size: 9px;
  color: var(--muted);
  padding-top: 8px;
}
#reply-preview {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  align-items: center;
}
.chat-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 100px 0;
}
.security-notice,
.invite-members {
  max-width: 500px;
  margin: 30px auto;
  background: var(--bg);
  padding: 22px;
  border-radius: 18px;
  font-size: 13px;
}
.invite-members p {
  margin: 16px 0 6px;
}
.pending {
  opacity: 0.65;
}
.pending small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
dialog {
  max-height: 85dvh;
  overflow: auto;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 25px;
  width: 400px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #10182060;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.dialog-head h2 {
  font-size: 19px;
  font-weight: 600;
}
.dialog-head .close {
  font-size: 24px;
  margin: -8px -8px -8px 0;
}
dialog > .muted {
  font-size: 12px;
  line-height: 1.8;
  margin: 12px 0;
}
dialog > .avatar {
  margin-bottom: 14px;
}
dialog > .text-button {
  display: block;
  margin: 6px 0;
  width: 100%;
  text-align: left;
  padding: 11px 3px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
}
.field > span {
  font-size: 12px;
  color: var(--muted);
}
.field input {
  width: 100%;
  height: 46px;
}
.small-title {
  font-size: 12px;
  font-weight: 600;
  margin: 22px 0 7px;
}
.safety-number {
  display: block;
  font-size: 11px;
  color: var(--muted);
  word-break: break-word;
  line-height: 2;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  letter-spacing: 0.5px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.check-row input {
  accent-color: #546c82;
  width: 18px;
  height: 18px;
}
.check-row .avatar {
  width: 35px;
  height: 35px;
  font-size: 14px;
  border-radius: 13px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: var(--text);
  color: var(--bg);
  padding: 13px 20px;
  max-width: calc(100vw - 40px);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 20;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
[data-theme="dark"] .brand img,
[data-theme="dark"] .welcome img {
  filter: none;
}
[data-theme="dark"] #gate > .entry-emblem {
  background-image: url("/entry-mark-dark.webp?v=entry-fast-1");
  filter: none;
}
@media (min-width: 1400px) {
  #app {
    grid-template-columns: 84px 360px minmax(0, 1fr);
  }
  .messages {
    padding: 30px 60px;
  }
  .conversation-header {
    padding: 22px 40px;
  }
}
@media (max-width: 850px) {
  #app {
    grid-template-columns: 64px 285px minmax(0, 1fr);
  }
  .rail {
    padding-inline: 5px;
  }
  .list-header {
    padding: 25px 20px 20px;
  }
  .messages {
    padding: 24px 18px;
  }
  .conversation-header {
    padding: 16px;
  }
  .composer {
    padding: 12px 16px 10px;
  }
  .conversation-header > .avatar {
    display: none;
  }
  .message-column {
    max-width: 90%;
  }
  .row-preview {
    max-width: 160px;
  }
  .row-side time {
    font-size: 8px;
  }
}
@media (max-width: 650px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 72px;
    padding-bottom: env(safe-area-inset-bottom);
    height: 100dvh;
  }
  .rail {
    grid-row: 2;
    flex-direction: row;
    justify-content: space-evenly;
    padding: 4px 20px;
    border-right: 0;
    border-top: 1px solid var(--line);
    gap: 0;
    background: var(--bg);
  }
  .rail .brand {
    display: none;
  }
  .rail-tab {
    width: 80px;
    padding: 8px 0;
    border-radius: 14px;
    gap: 2px;
  }
  .rail-tab span {
    font-size: 10px;
  }
  .rail-bottom {
    margin: 0;
    display: flex;
    flex-direction: row;
    gap: 15px;
  }
  .rail-bottom #lock {
    display: none;
  }
  .list-pane {
    grid-row: 1;
    border: 0;
  }
  .list-header {
    padding: 25px 24px 22px;
  }
  .list-header h1 {
    font-size: 28px;
  }
  .list-footer {
    display: none;
  }
  .search {
    margin: 0 22px;
  }
  .list-content {
    padding: 0 12px;
  }
  .list-row {
    padding: 16px 12px;
  }
  .row-preview {
    max-width: 230px;
  }
  .row-side time {
    font-size: 10px;
  }
  .conversation {
    display: none;
  }
  #app.show-chat {
    display: block;
  }
  #app.show-chat .rail,
  #app.show-chat .list-pane {
    display: none;
  }
  #app.show-chat .conversation {
    display: flex;
    height: 100%;
  }
  .conversation-header {
    padding: 12px 14px 12px 6px;
    gap: 8px;
  }
  .conversation-header > .avatar {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 13px;
  }
  .conversation-header .icon {
    width: 34px;
    height: 38px;
  }
  .back {
    display: inline-grid;
    font-size: 34px;
  }
  .conversation-name h2 {
    font-size: 15px;
  }
  .conversation-name p {
    font-size: 9px;
  }
  .messages {
    padding: 20px 16px;
  }
  .bubble {
    font-size: 14px;
    padding: 10px 14px;
  }
  .message-column {
    max-width: 85%;
  }
  .composer {
    padding: 9px 14px 10px;
  }
  .composer-note {
    display: none;
  }
  .compose-row {
    gap: 8px;
  }
  .attach {
    width: 27px;
  }
  .message-actions {
    opacity: 0.7;
  }
  .message-actions .text-button {
    padding: 3px 2px;
    font-size: 9px;
  }
  .encryption-notice {
    font-size: 9px;
  }
  .message-search {
    padding: 10px 16px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 2px;
  }
  .my-profile {
    padding: 22px 12px 26px;
  }
  .rail-tab.selected {
    background: none;
  }
  .rail-tab.selected svg {
    stroke-width: 2.3;
  }
  #theme-toggle {
    bottom: 20px;
    right: 20px;
  }
  #toast {
    bottom: 90px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep the entry mark and controls consistent with ID and AI. */
#gate > .entry-emblem {
  width: 156px;
  height: 156px;
  background-size: 126px 126px;
  filter: none;
}
#gate #authenticate {
  width: min(196px, calc(100vw - 48px));
  font-size: 16px;
  font-weight: 500;
}
.image-preview {
  display: block;
  max-width: min(320px, 100%);
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 8px;
}
.image-preview:not([src]) {
  display: none;
}

#gate {
  gap: 0;
}
#gate > .entry-emblem {
  margin: 0 auto 22px;
}
#gate #authenticate {
  height: 54px;
  min-height: 54px;
  padding: 14px 24px;
}
#gate #status {
  margin: 20px 0 0;
  min-height: 44px;
  font-size: 12px;
  line-height: 1.9;
}

/* Original material variants: preserve their pixels, highlights and alpha. */
:root {
  --talk-emblem: url("/entry-mark-light.webp?v=entry-fast-1?v=original-material-2");
}
:root[data-theme="dark"] {
  --talk-emblem: url("/talk-emblem.png?v=original-material-2");
}
#gate > .entry-emblem {
  background-image: var(--talk-emblem);
  filter: none;
}
.brand img,
.welcome img {
  filter: none;
  opacity: 1;
}
.search-progress {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 0;
}
.search-progress:empty {
  display: none;
}
.load-older {
  display: block;
  margin: 0 auto 18px;
}

#gate,
#gate button,
#gate #status {
  font-family:
    "Private Entry",
    -apple-system,
    sans-serif;
}
/* Settings is a full destination alongside Friends and Chats. */
#app.settings-view {
  grid-template-columns: 76px minmax(0, 1fr);
}
.settings-view .conversation {
  display: none;
}
.settings-view .list-pane {
  border-right: 0;
}
.settings-view .list-header {
  width: min(760px, 100%);
  margin: 0 auto;
  padding-bottom: 10px;
}
.settings-view .list-content {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 10px 25px 40px;
}
.settings-page {
  background: var(--bg);
  padding: 20px 0;
}
.settings-page h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 22px;
}
.settings-page > .avatar {
  width: 64px;
  height: 64px;
  font-size: 25px;
  border-radius: 24px;
  margin-bottom: 12px;
}
.settings-page > .text-button {
  display: block;
  text-align: left;
  width: 100%;
  padding: 17px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.settings-page .field {
  max-width: 440px;
}
.settings-page .primary {
  max-width: 440px;
  margin-bottom: 24px;
}
.settings-page > .muted {
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
}
.settings-page + .list-footer {
  display: none;
}
.call-panel {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 340px;
  max-width: calc(100vw - 32px);
  z-index: 15;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}
.call-panel .avatar {
  width: 64px;
  height: 64px;
  font-size: 26px;
  border-radius: 24px;
  margin-bottom: 15px;
}
.call-panel h2 {
  font-size: 19px;
  font-weight: 600;
}
.call-status {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 20px;
}
.call-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.call-action {
  border-radius: 18px;
  padding: 13px 20px;
  min-height: 48px;
  font-size: 13px;
  background: var(--surface);
}
.call-action.accept {
  background: #32694e;
  color: #fff;
}
.call-action.end {
  background: #ad343c;
  color: #fff;
}
.call-action.muted {
  background: var(--text);
  color: var(--bg);
}
.call-private {
  font-size: 10px;
  color: var(--muted);
  margin-top: 20px;
}
.call-phone svg {
  width: 21px;
  height: 21px;
}
.call-panel audio {
  display: none;
}
.call-sound {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  margin-top: 14px;
}
.call-indicator {
  color: #54856f;
  font-size: 10px;
  margin-top: 8px;
}
@media (max-width: 650px) {
  #app.settings-view {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 72px;
  }
  .settings-view .list-header {
    padding: 25px 24px 10px;
  }
  .settings-view .list-content {
    padding: 10px 24px 30px;
  }
  .settings-page {
    padding-top: 12px;
  }
  .call-panel {
    right: 16px;
    bottom: 88px;
    width: calc(100vw - 32px);
  }
  .rail-bottom:has(#lock:only-child) {
    display: none;
  }
}
.call-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.call-heading h2 {
  font-size: 18px;
}
.call-heading .icon {
  font-size: 23px;
}
.call-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0 22px;
}
.peer-tile {
  background: var(--surface);
  position: relative;
  min-height: 160px;
  aspect-ratio: 16/10;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.peer-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.peer-tile .avatar {
  margin: 0;
}
.peer-tile .avatar.video-hidden {
  display: none;
}
.peer-name {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 7px;
  background: #1119;
  color: white;
}
.peer-microphone {
  position: absolute;
  right: 10px;
  top: 9px;
  background: #1119;
  color: white;
  font-size: 10px;
  border-radius: 6px;
  padding: 3px 6px;
}
.peer-microphone:empty {
  display: none;
}
.conference-panel {
  width: min(960px, calc(100vw - 48px));
  max-width: none;
  max-height: 90dvh;
  overflow-y: auto;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
}
.conference-panel .call-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.conference-panel .call-actions {
  position: sticky;
  bottom: -28px;
  background: var(--bg);
  padding: 14px 0;
  z-index: 2;
}
.call-panel:fullscreen {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border: 0;
  border-radius: 0;
  transform: none;
  left: 0;
  top: 0;
}
.call-panel:fullscreen .call-grid {
  height: calc(100vh - 180px);
}
.call-panel:fullscreen .peer-tile {
  aspect-ratio: auto;
  height: 100%;
}
@media (max-width: 650px) {
  .conference-panel {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 18px;
  }
  .conference-panel .call-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .conference-panel .peer-tile {
    min-height: 120px;
    aspect-ratio: 3/4;
    border-radius: 13px;
  }
  .call-actions {
    gap: 8px;
    flex-wrap: wrap;
  }
  .call-action {
    padding: 12px 14px;
  }
  .call-heading .call-status {
    font-size: 11px;
  }
  .call-heading h2 {
    font-size: 16px;
  }
  .call-heading .icon {
    width: 32px;
  }
  .conference-panel .call-private {
    font-size: 9px;
    margin-top: 8px;
  }
}

[hidden] {
  display: none !important;
}
#session-check {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
  font:
    13px/1.8 "Private Entry",
    sans-serif;
}
#session-check button {
  font: inherit;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
/* Attachment review, local preparation and encrypted upload. */
dialog.attachment-dialog {
  width: min(720px, calc(100vw - 24px));
  max-width: 720px;
}
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  max-height: 42vh;
  overflow: auto;
  padding: 8px 0;
}
.attachment-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  position: relative;
}
.attachment-item img,
.attachment-item video {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.08);
}
.attachment-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 8px;
}
.attachment-size {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin: 6px 0;
}
.attachment-file-icon {
  height: 80px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--muted);
}
.attachment-controls {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.attachment-controls select,
.attachment-controls textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}
.attachment-file-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.attachment-controls .muted {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.attachment-controls progress {
  width: 100%;
  accent-color: var(--text);
  height: 8px;
}
.attachment-status {
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}
.attachment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.attachment-actions > label {
  margin-right: auto;
  cursor: pointer;
}
.attachment-sent {
  opacity: 0.55;
}
.attachment-drag {
  outline: 3px dashed var(--muted);
  outline-offset: -8px;
}
.video-preview {
  width: min(360px, 100%);
  max-height: 400px;
  border-radius: 12px;
  background: #111;
}
.image-preview {
  cursor: zoom-in;
}
.media-full {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  margin: auto;
}
.attachment-caption {
  display: block;
  margin: 8px 0;
  white-space: pre-wrap;
}
@media (max-width: 600px) {
  .attachment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attachment-item img,
  .attachment-item video {
    height: 120px;
  }
  .attachment-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg);
    padding: 8px 0;
  }
}
/* Generated pearl/obsidian assets use their own material; no inversion or tint. */
.call-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.call-action:hover {
  background: rgba(128, 128, 128, 0.1);
}
.call-action:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 2px;
}
.call-art {
  width: 44px;
  height: 44px;
  display: block;
  pointer-events: none;
}
.call-art img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.call-art-audio img {
  width: 36px;
  height: 36px;
  margin: 4px;
}
.call-art .call-art-white {
  display: none;
}
[data-theme="dark"] .call-art .call-art-black {
  display: none;
}
[data-theme="dark"] .call-art .call-art-white {
  display: block;
}
.call-destination {
  gap: 6px;
}
