:root {
  --ink: #11131a;
  --ink-soft: #161a22;
  --surface: #1b202a;
  --surface-raised: #222834;
  --surface-hover: #282f3d;
  --pearl: #f5f3ec;
  --pearl-soft: #dedbd3;
  --muted: #9ca4ad;
  --muted-strong: #b8bec4;
  --line: #333a47;
  --line-strong: #495261;
  --amber: #f6b95b;
  --amber-strong: #ffca76;
  --violet: #756ce8;
  --cyan: #70c4cc;
  --coral: #ef7c70;
  --danger: #ef8178;
  --success: #77d6b0;
  --shadow: 0 28px 80px rgb(0 0 0 / 0.32);
  --header-height: 68px;
  --mobile-nav-height: 70px;
  font-family:
    "Noto Sans JP",
    "Yu Gothic UI",
    "Hiragino Kaku Gothic ProN",
    "Meiryo",
    system-ui,
    sans-serif;
  color: var(--pearl);
  background: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ink);
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background:
    linear-gradient(120deg, rgb(117 108 232 / 0.045), transparent 42%),
    linear-gradient(300deg, rgb(112 196 204 / 0.035), transparent 36%),
    var(--ink);
}

button,
input,
textarea {
  max-width: 100%;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

textarea {
  resize: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

a {
  color: var(--pearl-soft);
}

.hidden {
  display: none !important;
}

.desktop-only {
  display: inline-grid;
}

.signal-kicker,
.eyebrow {
  margin: 0;
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-primary {
  color: #17130d;
  background: var(--amber);
  box-shadow: 0 10px 28px rgb(246 185 91 / 0.18);
}

.button-primary:hover {
  background: var(--amber-strong);
  box-shadow: 0 12px 34px rgb(246 185 91 / 0.25);
}

.button-secondary {
  color: var(--pearl);
  border-color: var(--line-strong);
  background: var(--surface);
}

.button-quiet {
  min-height: 40px;
  color: var(--pearl-soft);
  border-color: var(--line);
  background: transparent;
}

.button-google {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #1f1f1f;
  border-color: #747775;
  background: #fff;
}

.google-mark {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--pearl);
  background: rgb(27 32 42 / 0.88);
  font-size: 1.25rem;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.text-button,
.auth-mode-switch {
  padding: 8px;
  border: 0;
  color: var(--pearl-soft);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.boot-screen {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  background: var(--ink);
}

.boot-screen img {
  width: min(190px, 42vw);
  filter: invert(1) brightness(1.6);
}

.signal-loader {
  display: flex;
  gap: 7px;
}

.signal-loader i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  animation: signal-pulse 1.25s ease-in-out infinite;
}

.signal-loader i:nth-child(2) {
  animation-delay: 140ms;
  background: var(--violet);
}

.signal-loader i:nth-child(3) {
  animation-delay: 280ms;
  background: var(--cyan);
}

@keyframes signal-pulse {
  0%,
  70%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* Authentication */
.auth-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.65fr);
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 76px);
  isolation: isolate;
  background:
    linear-gradient(90deg, rgb(17 19 26 / 0.34), rgb(17 19 26 / 0.72)),
    linear-gradient(0deg, var(--ink) 0, transparent 34%),
    url("../materials/lp_hero_threads.jpg") center / cover no-repeat;
}

.auth-visual::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(110deg, transparent 52%, rgb(117 108 232 / 0.12) 52.1%, transparent 52.7%),
    linear-gradient(110deg, transparent 68%, rgb(246 185 91 / 0.16) 68.1%, transparent 68.5%);
  mix-blend-mode: screen;
}

.auth-logo {
  width: clamp(140px, 14vw, 220px);
  filter: invert(1) brightness(1.7);
}

.auth-copy {
  max-width: 780px;
  margin: auto 0;
  padding: 8vh 0;
}

.auth-copy h1 {
  margin: 18px 0 24px;
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  font-weight: 650;
  line-height: 1.03;
  letter-spacing: 0;
}

.auth-copy h1 span {
  display: block;
  white-space: nowrap;
}

.auth-copy > p:last-child {
  max-width: 38em;
  margin: 0;
  color: var(--pearl-soft);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.95;
}

.auth-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.auth-trust span {
  padding: 8px 12px;
  border: 1px solid rgb(245 243 236 / 0.24);
  border-radius: 999px;
  color: var(--pearl-soft);
  background: rgb(17 19 26 / 0.36);
  font-size: 0.76rem;
  backdrop-filter: blur(10px);
}

.signal-field {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.signal-line {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  opacity: 0.74;
}

.signal-line::after {
  position: absolute;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  transform: translate(50%, -2px);
  background: currentcolor;
  box-shadow: 0 0 20px currentcolor;
}

.line-a {
  top: 23%;
  left: 38%;
  width: 42%;
  color: var(--amber);
  background: linear-gradient(90deg, transparent, currentcolor);
  transform: rotate(-12deg);
  animation: signal-scan 5.6s ease-in-out infinite;
}

.line-b {
  top: 54%;
  left: 58%;
  width: 31%;
  color: var(--violet);
  background: linear-gradient(90deg, transparent, currentcolor);
  transform: rotate(9deg);
  animation: signal-scan 6.8s 900ms ease-in-out infinite;
}

.line-c {
  top: 72%;
  left: 24%;
  width: 24%;
  color: var(--cyan);
  background: linear-gradient(90deg, transparent, currentcolor);
  transform: rotate(-5deg);
  animation: signal-scan 7.2s 1.8s ease-in-out infinite;
}

@keyframes signal-scan {
  0%,
  100% {
    opacity: 0.18;
    transform-origin: left center;
  }
  45% {
    opacity: 0.9;
  }
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 40px clamp(28px, 4vw, 72px);
  border-left: 1px solid var(--line);
  background: rgb(17 19 26 / 0.97);
}

.auth-panel-inner {
  width: min(100%, 420px);
}

.auth-panel h2 {
  margin: 12px 0;
  font-size: clamp(1.75rem, 2.5vw, 2.45rem);
  line-height: 1.25;
}

.auth-lead {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.8;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line);
}

.auth-form {
  display: grid;
  gap: 15px;
}

.field-hint {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.auth-form label,
.onboarding-form label,
.profile-edit-body label,
.compose-body > label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-form input,
.onboarding-form input,
.onboarding-form textarea,
.profile-edit-body input,
.profile-edit-body textarea,
.compose-body input,
.compose-body textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--pearl);
  background: var(--surface);
  caret-color: var(--amber);
}

.auth-form input:focus,
.onboarding-form input:focus,
.onboarding-form textarea:focus,
.profile-edit-body input:focus,
.profile-edit-body textarea:focus,
.compose-body input:focus,
.compose-body textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgb(246 185 91 / 0.1);
}

.auth-mode-switch {
  display: block;
  margin: 18px auto 0;
}

.legal-note {
  margin: 26px 0 0;
  color: #7d858e;
  font-size: 0.68rem;
  line-height: 1.8;
  text-align: center;
}

.auth-inline-status,
.inline-message,
.composer-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--amber);
  color: var(--pearl-soft);
  background: rgb(246 185 91 / 0.08);
  font-size: 0.8rem;
  line-height: 1.6;
}

.auth-inline-status.error,
.inline-message.error,
.composer-status.error {
  border-color: var(--danger);
  background: rgb(239 129 120 / 0.08);
}

/* Onboarding */
.onboarding-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(420px, 1.3fr);
  background: var(--ink);
}

.onboarding-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 6vw, 88px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgb(117 108 232 / 0.12), transparent 44%),
    linear-gradient(20deg, rgb(246 185 91 / 0.08), transparent 36%),
    var(--ink-soft);
}

.onboarding-brand img {
  width: min(210px, 62%);
  filter: invert(1) brightness(1.6);
}

.onboarding-brand p {
  max-width: 28em;
  margin: 0;
  color: var(--pearl-soft);
  font-size: 1.05rem;
  line-height: 1.9;
}

.onboarding-form {
  align-self: center;
  width: min(100% - 48px, 620px);
  margin: 0 auto;
  padding: 64px 0;
}

.onboarding-form h1 {
  margin: 14px 0 8px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.15;
}

.onboarding-form > p:not(.signal-kicker):not(.auth-inline-status) {
  margin: 0 0 32px;
  color: var(--muted);
}

.onboarding-form label {
  margin-bottom: 18px;
}

.onboarding-form fieldset,
.profile-edit-body fieldset {
  margin: 26px 0;
  padding: 0;
  border: 0;
}

.onboarding-form legend,
.profile-edit-body legend {
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

legend small,
label small {
  color: var(--muted);
  font-weight: 500;
}

.topic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.topic-option {
  position: relative;
}

.topic-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.topic-option span {
  display: block;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--pearl-soft);
  background: var(--surface);
  font-size: 0.78rem;
}

.topic-option input:checked + span {
  border-color: var(--amber);
  color: #17130d;
  background: var(--amber);
}

/* Main app */
.app-shell {
  width: min(100%, 1500px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 236px minmax(0, 720px) minmax(260px, 320px);
  justify-content: center;
}

.desktop-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 24px;
  border-right: 1px solid var(--line);
}

.sidebar-logo {
  width: 142px;
  margin: 0 10px 42px;
  filter: invert(1) brightness(1.6);
}

.desktop-sidebar nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  position: relative;
  display: grid;
  min-height: 48px;
  padding: 0 14px;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted-strong);
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  color: var(--pearl);
  background: var(--surface);
}

.nav-item.active {
  color: var(--pearl);
  border-color: var(--line);
  background: var(--surface);
}

.nav-item.active::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: -1px;
  width: 2px;
  content: "";
  background: var(--amber);
}

.nav-symbol {
  color: var(--amber);
  font-size: 1.25rem;
  text-align: center;
}

.nav-badge,
.mobile-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 10px;
  color: #17130d;
  background: var(--amber);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 900;
}

.signal-create-button {
  display: flex;
  width: 100%;
  margin-top: 26px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #17130d;
  background: var(--amber);
}

.signal-create-button span {
  font-size: 1.1rem;
}

.sidebar-foot {
  margin-top: auto;
}

.icon-text-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  align-items: center;
  gap: 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.mobile-header,
.mobile-bottom-nav,
.mobile-compose-fab {
  display: none;
}

.app-main {
  min-width: 0;
  min-height: 100vh;
  border-right: 1px solid var(--line);
}

.app-view {
  display: none;
  min-height: 100vh;
  padding-bottom: 100px;
}

.app-view.active {
  display: block;
}

.view-search {
  position: sticky;
  z-index: 18;
  top: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgb(17 19 26 / 0.94);
  backdrop-filter: blur(16px);
}

.view-search input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  color: var(--pearl);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.view-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.view-search input:focus {
  border-color: rgb(246 185 91 / 0.7);
  background: var(--ink-soft);
  box-shadow: 0 0 0 3px rgb(246 185 91 / 0.08);
}

.view-search input::-webkit-search-cancel-button {
  cursor: pointer;
  filter: invert(1) opacity(0.68);
}

.view-search.loading::after {
  position: absolute;
  top: 50%;
  right: 34px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--amber);
  animation: search-pulse 800ms ease-in-out infinite alternate;
}

@keyframes search-pulse {
  from { opacity: 0.25; transform: scale(0.78); }
  to { opacity: 1; transform: scale(1); }
}

.list-search-empty {
  min-height: 260px;
  display: grid;
  padding: 48px 24px;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.own-signal-strip {
  margin: 16px 20px 12px;
  padding: 12px 14px;
  border-left: 2px solid var(--violet);
  color: var(--pearl-soft);
  background: rgb(117 108 232 / 0.08);
  font-size: 0.78rem;
}

.own-signal-strip button {
  width: 100%;
  display: flex;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.friend-avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgb(246 185 91 / 0.5);
  border-radius: 50%;
  color: #17130d;
  background: var(--amber);
  font-size: 0.72rem;
  font-weight: 900;
}

.friend-unread {
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  color: #17130d;
  background: var(--amber-strong);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 900;
}

.feed-list,
.conversation-list {
  border-top: 0;
}

.feed-more {
  width: calc(100% - 40px);
  min-height: 42px;
  margin: 18px 20px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 0.76rem;
  font-weight: 800;
}

.feed-more:hover,
.feed-more:focus-visible {
  color: var(--amber);
  border-color: rgb(246 185 91 / 0.48);
}

.talk-card {
  position: relative;
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 22px 20px 20px 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--pearl);
  background: transparent;
  text-align: left;
  transition: background-color 140ms ease;
}

.talk-card::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 2px;
  content: "";
  background: var(--signal-color, var(--cyan));
  opacity: 0.8;
}

.talk-card:hover {
  background: var(--surface);
}

.talk-card-top,
.talk-card-foot {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.talk-card-top span,
.talk-card-foot span {
  color: var(--muted);
  font-size: 0.7rem;
}

.talk-card-top .match-strength {
  color: var(--signal-color, var(--cyan));
  font-weight: 800;
}

.talk-card p {
  margin: 0;
  color: var(--pearl);
  font-size: clamp(0.96rem, 1.8vw, 1.06rem);
  font-weight: 650;
  line-height: 1.7;
}

.talk-topics {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.talk-topics span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.conversation-item {
  width: 100%;
  min-height: 84px;
  display: grid;
  padding: 14px 18px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--pearl);
  background: transparent;
  text-align: left;
}

.conversation-item:hover {
  background: var(--surface);
}

.conversation-item.ended {
  opacity: 0.56;
  filter: saturate(0.45);
}

.conversation-item.ended:hover {
  opacity: 0.74;
}

.conversation-item-avatar,
.conversation-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--amber);
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 900;
}

.conversation-item.mutual .conversation-item-avatar {
  color: #17130d;
  border-color: var(--amber);
  background: var(--amber);
}

.conversation-item-copy {
  min-width: 0;
}

.conversation-item-copy strong,
.conversation-item-copy p {
  display: block;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item-copy strong {
  font-size: 0.92rem;
}

.conversation-item-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.conversation-item-meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.67rem;
}

.conversation-state {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 16px rgb(246 185 91 / 0.5);
}

.empty-state {
  min-height: 360px;
  display: grid;
  padding: 56px 30px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state h2 {
  margin: 14px 0 6px;
  font-size: 1.15rem;
}

.empty-state p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.empty-signal {
  color: var(--amber);
  font-size: 2.4rem;
}

/* Profile */
.profile-identity {
  display: grid;
  margin: 28px 20px 18px;
  padding: 22px;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-avatar-large {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 50%;
  color: #17130d;
  background: var(--amber);
  font-size: 1.35rem;
  font-weight: 900;
}

.profile-identity h2 {
  margin: 0;
  font-size: 1.25rem;
}

.profile-identity p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.private-match-profile {
  margin: 0 20px 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row h2 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.private-label {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.67rem;
}

.private-match-profile > p {
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.match-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-topic {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--pearl-soft);
  font-size: 0.73rem;
}

.match-topic[data-strength="strong"] {
  border-color: rgb(246 185 91 / 0.6);
  color: var(--amber);
}

.match-topic[data-strength="growing"] {
  border-color: rgb(112 196 204 / 0.45);
  color: var(--cyan);
}

.settings-list {
  border-top: 1px solid var(--line);
}

.settings-list button,
.menu-dialog-panel > button,
.menu-dialog-panel > a {
  display: flex;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--pearl-soft);
  background: transparent;
  text-align: left;
  text-decoration: none;
}

.settings-list button:hover,
.menu-dialog-panel > button:hover,
.menu-dialog-panel > a:hover {
  background: var(--surface);
}

.plus-settings-row > span:first-child {
  display: grid;
  gap: 3px;
}

.plus-settings-row strong {
  color: var(--amber);
  font-size: 0.86rem;
}

.plus-settings-row small {
  color: var(--muted);
  font-size: 0.69rem;
}

.danger-row {
  color: var(--danger) !important;
}

.danger-confirm {
  color: #211110;
  background: var(--danger);
  box-shadow: 0 10px 28px rgb(239 129 120 / 0.18);
}

.context-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  padding: 34px 24px;
}

.context-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.context-panel + .context-panel {
  margin-top: 14px;
}

.context-panel h2 {
  margin: 9px 0 22px;
  font-size: 1.35rem;
  line-height: 1.4;
}

.pulse-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 14px;
}

.pulse-list > div {
  display: flex;
  min-height: 42px;
  padding: 8px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.pulse-list dt {
  color: var(--pearl-soft);
  font-size: 0.78rem;
}

.pulse-list dd {
  margin: 0;
  color: var(--amber);
  font-size: 1.2rem;
  font-weight: 800;
}

.context-panel.soft {
  background:
    linear-gradient(140deg, rgb(117 108 232 / 0.12), transparent 62%),
    var(--surface);
}

.context-panel.soft > p:last-child {
  margin: 12px 0 0;
  color: var(--muted-strong);
  font-size: 0.8rem;
  line-height: 1.8;
}

.context-ad-slot {
  border-color: rgb(246 185 91 / 0.34);
  background:
    linear-gradient(145deg, rgb(246 185 91 / 0.13), transparent 64%),
    var(--surface);
}

.context-ad-slot small,
.feed-ad-slot small {
  color: var(--muted);
  font-size: 0.62rem;
}

.context-ad-slot strong {
  display: block;
  margin-top: 14px;
  color: var(--pearl);
  font-size: 1rem;
}

.context-ad-slot p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.7;
}

.context-ad-slot button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgb(246 185 91 / 0.5);
  border-radius: 6px;
  color: var(--amber);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
}

.context-ad-slot[data-ad-provider="adsense"] {
  min-height: 250px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
}

.adsbygoogle {
  display: block;
  width: 100%;
  min-height: 100px;
}

.context-ad-slot .adsbygoogle {
  min-height: 250px;
}

.feed-ad-slot {
  display: none;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgb(246 185 91 / 0.08), transparent 72%);
}

.feed-ad-slot-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.feed-ad-slot strong {
  color: var(--pearl-soft);
  font-size: 0.82rem;
}

.feed-ad-slot button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--amber);
  background: transparent;
  font-size: 0.69rem;
  font-weight: 800;
}

.feed-ad-slot[data-ad-provider="adsense"] {
  min-height: 100px;
  padding: 0;
  background: var(--surface);
}

/* Dialogs */
dialog {
  color: var(--pearl);
}

dialog::backdrop {
  background: rgb(5 7 11 / 0.76);
  backdrop-filter: blur(6px);
}

.sheet-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(86vh, 820px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink-soft);
  box-shadow: var(--shadow);
}

.sheet-shell {
  display: flex;
  min-height: 420px;
  max-height: inherit;
  flex-direction: column;
}

.plus-dialog-body {
  min-height: 0;
  padding: 30px;
  overflow-y: auto;
}

.plus-lead {
  margin: 0 0 24px;
  color: var(--muted-strong);
  line-height: 1.8;
}

.plan-comparison {
  border-top: 1px solid var(--line);
}

.plan-comparison > div {
  min-height: 58px;
  display: grid;
  padding: 10px 4px;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 0.76rem;
}

.plan-comparison > .featured {
  color: var(--pearl);
  background: linear-gradient(90deg, rgb(246 185 91 / 0.11), transparent 74%);
}

.plan-comparison strong {
  font-size: 0.79rem;
}

.plan-comparison .featured > span:first-child {
  color: var(--amber);
  font-weight: 900;
}

.plus-price {
  display: flex;
  margin: 30px 0 8px;
  align-items: baseline;
  gap: 5px;
}

.plus-price strong {
  color: var(--pearl);
  font-size: 2rem;
}

.plus-price span,
.plus-current-plan {
  color: var(--muted);
  font-size: 0.75rem;
}

.plus-current-plan {
  margin: 0 0 18px;
}

.plus-dialog-body > .button {
  width: 100%;
  margin-top: 10px;
}

.payment-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.67rem;
}

.payment-note summary {
  cursor: pointer;
}

.payment-note p {
  line-height: 1.7;
}

.sheet-header {
  min-height: 74px;
  display: grid;
  padding: 12px 14px;
  grid-template-columns: 44px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.sheet-header h2 {
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-leading-action {
  width: 44px;
  height: 44px;
}

.sheet-leading-action .icon-button {
  width: 44px;
  height: 44px;
}

.send-compact {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #17130d;
  background: var(--amber);
  font-size: 0.8rem;
  font-weight: 900;
}

.compose-body,
.signal-detail-body {
  overflow-y: auto;
  padding: 24px;
}

.compose-body > textarea {
  min-height: 240px;
  padding: 0;
  border: 0;
  color: var(--pearl);
  background: transparent;
  font-size: 1.2rem;
  line-height: 1.8;
}

.compose-body > textarea:focus {
  box-shadow: none;
}

.compose-body > textarea::placeholder {
  color: #6f7780;
}

.compose-meta {
  display: flex;
  margin-top: 16px;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.signal-detail-text {
  margin: 0;
  color: var(--pearl);
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.8;
}

.signal-detail-meta {
  display: flex;
  margin: 18px 0 28px;
  flex-wrap: wrap;
  gap: 7px;
}

.signal-detail-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.7rem;
}

.reply-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.reply-field textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--pearl);
  background: var(--surface);
  line-height: 1.7;
}

.signal-detail-body > .button {
  width: 100%;
}

.own-signal-list {
  min-height: 0;
  overflow-y: auto;
}

.own-signal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.own-signal-row {
  width: 100%;
  min-height: 88px;
  display: grid;
  padding: 16px 20px;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  border: 0;
  color: var(--pearl);
  background: transparent;
  text-align: left;
}

.own-signal-row:hover,
.own-signal-row:focus-visible {
  background: rgb(255 255 255 / 0.035);
}

.own-signal-row-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.own-signal-row-copy small {
  color: var(--violet);
  font-size: 0.7rem;
}

.own-signal-row-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.own-signal-row-arrow {
  color: var(--muted-strong);
  font-size: 1.2rem;
  text-align: right;
}

.own-signal-delete {
  min-width: 58px;
  margin: 14px 14px 14px 0;
  padding: 0 10px;
  align-self: stretch;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 6px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
}

.own-signal-delete:hover,
.own-signal-delete:focus-visible {
  border-color: rgb(255 128 108 / 0.6);
  color: #ff9d8e;
  background: rgb(255 103 83 / 0.08);
}

.own-signal-delete:disabled {
  opacity: 0.55;
}

.own-signal-status {
  margin: 12px 20px 18px;
}

.menu-dialog {
  width: min(420px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink-soft);
  box-shadow: var(--shadow);
}

.menu-dialog-panel header {
  display: flex;
  min-height: 62px;
  padding: 10px 14px 10px 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.friends-list {
  min-width: 0;
}

.friend-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.friend-open {
  min-width: 0;
  min-height: 70px;
  display: grid;
  padding: 10px 8px 10px 16px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  color: var(--pearl);
  background: transparent;
  text-align: left;
}

.friend-open:hover {
  background: var(--surface);
}

.friend-copy {
  min-width: 0;
}

.friend-copy strong,
.friend-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-copy strong {
  font-size: 0.88rem;
}

.friend-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.friend-meta {
  display: grid;
  min-width: 42px;
  justify-items: end;
  gap: 7px;
  color: var(--muted);
  font-size: 0.65rem;
}

.friend-meta .friend-unread {
  border-width: 0;
}

.friend-remove {
  width: 42px;
  min-height: 42px;
  margin-right: 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 1rem;
  font-weight: 800;
}

.friend-remove:hover {
  color: var(--pearl);
  background: var(--surface);
}

.confirm-dialog {
  width: min(460px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink-soft);
  box-shadow: var(--shadow);
}

.confirm-panel {
  padding: 26px;
}

.confirm-panel h2 {
  margin: 8px 0 10px;
}

.confirm-panel > p:not(.signal-kicker) {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.8;
  white-space: pre-line;
}

.confirm-actions {
  display: grid;
  margin-top: 24px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-edit-body {
  display: grid;
  gap: 18px;
}

/* Conversation */
.conversation-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgb(117 108 232 / 0.045), transparent 42%),
    var(--ink);
  box-shadow: 0 0 100px rgb(0 0 0 / 0.42);
  overscroll-behavior: contain;
}

.conversation-header {
  min-height: 70px;
  display: grid;
  padding: 10px 14px;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgb(17 19 26 / 0.94);
  backdrop-filter: blur(16px);
}

.conversation-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.conversation-person > div {
  min-width: 0;
}

.conversation-person strong,
.conversation-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-person strong {
  font-size: 0.9rem;
}

.conversation-person small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
}

.conversation-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 24px clamp(16px, 4vw, 34px);
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.message-row {
  display: flex;
  margin: 9px 0;
  align-items: flex-end;
}

.message-row.mine {
  justify-content: flex-end;
}

.message-bubble-wrap {
  max-width: min(78%, 520px);
}

.message-bubble {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--pearl);
  background: var(--surface);
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-row.mine .message-bubble {
  border-color: rgb(117 108 232 / 0.48);
  background: #2d2a49;
}

.message-row.signal-origin .message-bubble {
  border-color: rgb(246 185 91 / 0.36);
  background: rgb(246 185 91 / 0.075);
}

.message-meta {
  display: block;
  min-height: 15px;
  margin-top: 4px;
  color: #747c86;
  font-size: 0.62rem;
  text-align: right;
}

.conversation-connect {
  display: flex;
  justify-content: center;
  padding: 6px 14px 10px;
}

.conversation-connect button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgb(246 185 91 / 0.5);
  border-radius: 999px;
  color: var(--amber);
  background: rgb(246 185 91 / 0.06);
  font-size: 0.75rem;
  font-weight: 800;
}

.conversation-connect button.selected {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.connection-banner {
  display: flex;
  margin: 0 16px 8px;
  padding: 12px 14px;
  border: 1px solid rgb(246 185 91 / 0.4);
  border-radius: 8px;
  background:
    linear-gradient(95deg, rgb(246 185 91 / 0.1), transparent 70%),
    var(--surface);
}

.connection-banner strong {
  color: var(--amber);
  font-size: 0.8rem;
}

.connection-banner p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.conversation-composer {
  position: relative;
  display: grid;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: end;
  gap: 9px;
  border-top: 1px solid var(--line);
  background: rgb(17 19 26 / 0.96);
}

.conversation-composer textarea {
  width: 100%;
  min-height: 42px;
  max-height: 132px;
  padding: 10px 13px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--pearl);
  background: var(--surface);
  line-height: 1.45;
}

.conversation-composer textarea:focus {
  border-color: var(--amber);
}

.conversation-composer > button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #17130d;
  background: var(--amber);
  font-weight: 900;
}

.conversation-composer .composer-status {
  grid-column: 1 / -1;
  margin-top: 0;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 720px);
  }

  .context-rail {
    display: none;
  }
}

@media (max-width: 900px) {
  .auth-view {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .auth-visual {
    padding: 36px;
  }

  .auth-copy h1 {
    font-size: clamp(2rem, 4.2vw, 2.5rem);
  }

  .app-shell {
    grid-template-columns: 194px minmax(0, 1fr);
  }

  .desktop-sidebar {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 58px;
  }

  body {
    background: var(--ink);
  }

  .desktop-only,
  .desktop-sidebar,
  .context-rail {
    display: none !important;
  }

  .feed-ad-slot {
    display: flex;
  }

  .auth-view {
    display: block;
    min-height: 100dvh;
  }

  .auth-visual {
    min-height: min(56vh, 520px);
    padding: 24px 20px 28px;
    background:
      linear-gradient(0deg, var(--ink) 0, rgb(17 19 26 / 0.2) 68%),
      linear-gradient(90deg, rgb(17 19 26 / 0.28), rgb(17 19 26 / 0.6)),
      url("../materials/lp_hero_threads.jpg") center / cover no-repeat;
  }

  .auth-logo {
    width: 124px;
  }

  .auth-copy {
    margin-top: auto;
    padding: 52px 0 22px;
  }

  .auth-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(1.85rem, 8.6vw, 2.45rem);
    line-height: 1.1;
  }

  .auth-copy > p:last-child {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  .auth-trust {
    gap: 6px;
  }

  .auth-trust span {
    padding: 6px 9px;
    font-size: 0.65rem;
  }

  .auth-panel {
    min-height: auto;
    padding: 38px 20px calc(40px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .auth-panel h2 {
    font-size: 1.7rem;
  }

  .onboarding-view {
    display: block;
  }

  .onboarding-brand {
    min-height: 220px;
    padding: 28px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .onboarding-brand img {
    width: 130px;
  }

  .onboarding-brand p {
    max-width: 24em;
    margin-top: 48px;
    font-size: 0.88rem;
  }

  .onboarding-form {
    width: auto;
    margin: 0 20px;
    padding: 38px 0 calc(40px + env(safe-area-inset-bottom));
  }

  .onboarding-form h1 {
    font-size: 2.15rem;
  }

  .app-shell {
    width: 100%;
    display: block;
  }

  .mobile-header {
    position: sticky;
    z-index: 30;
    top: 0;
    height: var(--header-height);
    display: flex;
    padding: 7px 14px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgb(17 19 26 / 0.92);
    backdrop-filter: blur(16px);
  }

  .mobile-header img {
    width: 112px;
    filter: invert(1) brightness(1.6);
  }

  .mobile-header .icon-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .app-main {
    border-right: 0;
  }

  .app-view {
    min-height: calc(100dvh - var(--header-height));
    padding-bottom: calc(var(--mobile-nav-height) + 38px + env(safe-area-inset-bottom));
  }

  .view-search {
    top: var(--header-height);
    padding: 10px 14px;
  }

  .view-search.loading::after {
    right: 28px;
  }

  .own-signal-strip {
    margin-top: 12px;
    margin-right: 14px;
    margin-left: 14px;
  }

  .talk-card {
    padding: 19px 16px 18px 20px;
  }

  .talk-card::before {
    top: 18px;
    bottom: 18px;
  }

  .talk-card p {
    font-size: 0.94rem;
    line-height: 1.65;
  }

  .conversation-item {
    padding: 12px 14px;
  }

  .profile-identity {
    margin: 16px 14px 14px;
    padding: 18px;
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .profile-avatar-large {
    width: 50px;
    height: 50px;
  }

  .private-match-profile {
    margin-right: 14px;
    margin-left: 14px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    display: grid;
    padding: 7px 20px env(safe-area-inset-bottom);
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgb(17 19 26 / 0.96);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav button {
    position: relative;
    display: grid;
    padding: 3px;
    place-items: center;
    gap: 2px;
    border: 0;
    color: var(--muted);
    background: transparent;
  }

  .mobile-bottom-nav button > span {
    font-size: 1.18rem;
  }

  .mobile-bottom-nav small {
    font-size: 0.59rem;
  }

  .mobile-bottom-nav button.active {
    color: var(--amber);
  }

  .mobile-badge {
    position: absolute;
    top: 0;
    left: calc(50% + 8px);
    min-width: 17px;
    height: 17px;
    font-size: 0.58rem;
  }

  .mobile-compose-fab {
    position: fixed;
    z-index: 65;
    right: 16px;
    bottom: calc(var(--mobile-nav-height) + 14px + env(safe-area-inset-bottom));
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #17130d;
    background: var(--amber);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.42);
    font-size: 1.55rem;
  }

  .sheet-dialog {
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .sheet-shell {
    min-height: 100%;
    max-height: 100%;
  }

  .plus-dialog-body {
    padding: 24px 18px calc(28px + env(safe-area-inset-bottom));
  }

  .sheet-header {
    padding-top: calc(10px + env(safe-area-inset-top));
  }

  .compose-body,
  .signal-detail-body {
    padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
  }

  .compose-body > textarea {
    min-height: 48vh;
    font-size: 1.05rem;
  }

  .conversation-overlay {
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  .conversation-header {
    padding-top: calc(9px + env(safe-area-inset-top));
  }

  .conversation-messages {
    padding: 18px 14px;
  }

  .message-bubble-wrap {
    max-width: 84%;
  }

  .message-bubble {
    font-size: 0.88rem;
  }

  input,
  textarea,
  select {
    min-width: 0;
    font-size: 16px;
  }

  .app-shell,
  .app-main,
  .app-view,
  .conversation-overlay,
  .sheet-shell,
  .compose-body,
  .signal-detail-body {
    min-width: 0;
    max-width: 100%;
  }

  .menu-dialog {
    width: calc(100% - 24px);
    margin: auto 12px calc(12px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .auth-copy h1 {
    font-size: clamp(1.8rem, 8.8vw, 1.95rem);
  }

  .auth-trust span {
    font-size: 0.61rem;
  }

  .profile-identity {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .profile-identity .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
