:root {
  color-scheme: dark;
  --bg: #08090a;
  --surface: #121315;
  --surface-2: #18191c;
  --surface-3: #202125;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f7f7f8;
  --text-2: #b7b8bf;
  --text-3: #898b94;
  --red: #e0222c;
  --red-dark: #bd111b;
  --red-soft: rgba(224, 34, 44, 0.13);
  --green: #4dcc78;
  --orange: #f3a338;
  --danger: #ff5b64;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  --radius: 20px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(224, 34, 44, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.eyebrow.red {
  color: #ff737a;
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.7);
}

.subtle {
  margin: 0.4rem 0 0;
  color: var(--text-2);
  font-size: 0.93rem;
}

.brand-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(224, 34, 44, 0.25);
}

.brand-logo-large {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 1.35rem;
}

.brand-logo-small {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
}

/* Login */
.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(25rem, 0.78fr);
  min-height: 100vh;
}

.login-brand,
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(3rem, 7vw, 7.5rem);
}

.login-brand {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(224, 34, 44, 0.08), rgba(224, 34, 44, 0) 54%),
    #0c0d0f;
  border-right: 1px solid var(--line);
}

.login-brand::after {
  position: absolute;
  right: -11rem;
  bottom: -12rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(224, 34, 44, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgba(224, 34, 44, 0.025),
    0 0 0 10rem rgba(224, 34, 44, 0.018);
  content: "";
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.8rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
}

.login-intro {
  position: relative;
  z-index: 1;
  margin-top: 3.5rem;
  color: var(--text-2);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.login-intro p {
  margin: 0.35rem 0;
}

.trust-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  color: var(--text-3);
  font-size: 0.88rem;
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-row i {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0.25rem var(--red-soft);
}

.login-panel {
  background: var(--bg);
}

.login-card {
  width: min(100%, 29rem);
  margin-inline: auto;
}

.login-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.mobile-brand {
  display: none;
}

#login-form {
  display: grid;
  margin-top: 2.5rem;
}

#login-form label {
  margin-bottom: 0.55rem;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 700;
}

#login-form input,
.search-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  outline: 0;
  background: var(--surface);
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

#login-form input {
  height: 3.55rem;
  padding: 0 1rem;
  border-radius: 0.9rem;
  font-size: 1rem;
}

#login-form input:not(:first-of-type) {
  margin-top: 0;
}

#login-form input:focus,
.search-field input:focus {
  border-color: rgba(224, 34, 44, 0.7);
  background: #151619;
  box-shadow: 0 0 0 0.25rem rgba(224, 34, 44, 0.1);
}

#login-form > label:not(:first-child) {
  margin-top: 1.2rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 4.3rem !important;
}

.text-button {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  min-width: 3.25rem;
  min-height: 2.5rem;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.85rem;
}

.form-error {
  margin-top: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 91, 100, 0.25);
  border-radius: 0.75rem;
  background: rgba(255, 91, 100, 0.08);
  color: #ff8e94;
  font-size: 0.9rem;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.65rem;
  margin-top: 1.5rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 0.9rem;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: background 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  background: #ee2d37;
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.legal-note {
  margin: 1.2rem 0 0;
  color: var(--text-3);
  font-size: 0.78rem;
  line-height: 1.7;
}

.legal-note a {
  color: var(--text-2);
  text-underline-offset: 0.2rem;
}

/* Workspace */
.workspace {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.75rem;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 10, 0.86);
  backdrop-filter: blur(22px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 0.75rem;
  text-decoration: none;
}

.topbar-brand span {
  display: grid;
  line-height: 1.15;
}

.topbar-brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.topbar-brand small {
  margin-top: 0.25rem;
  color: var(--text-3);
  font-size: 0.68rem;
}

.desktop-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.desktop-nav .nav-button {
  min-width: 6rem;
  min-height: 2.4rem;
  border-radius: 0.65rem;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--text);
}

.desktop-nav .nav-button.is-active {
  background: var(--surface-3);
}

.nav-button.is-active svg {
  color: #ff4e57;
}

.topbar-user {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.75rem;
  color: var(--text-2);
  font-size: 0.88rem;
}

.mini-avatar,
.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, #e32832, #8c0a11);
  color: #fff;
  font-weight: 900;
}

.mini-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
}

.workspace-main {
  width: min(100%, 70rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) 5rem;
}

.page-view {
  animation: page-in 220ms ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(0.3rem); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.icon-button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}

.icon-button {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.icon-button:hover,
.back-button:hover {
  border-color: rgba(224, 34, 44, 0.45);
  color: #fff;
}

.icon-button.is-loading svg {
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.membership-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5.5rem;
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 0.24rem solid var(--green);
  border-radius: 1rem;
  background: linear-gradient(100deg, rgba(77, 204, 120, 0.08), transparent 55%), var(--surface);
}

.membership-banner.is-warning {
  border-left-color: var(--orange);
  background: linear-gradient(100deg, rgba(243, 163, 56, 0.08), transparent 55%), var(--surface);
}

.membership-banner.is-locked {
  border-left-color: var(--danger);
  background: linear-gradient(100deg, rgba(255, 91, 100, 0.08), transparent 55%), var(--surface);
}

.membership-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
}

.membership-banner.is-active .membership-icon { color: var(--green); }
.membership-banner.is-warning .membership-icon { color: var(--orange); }
.membership-banner.is-locked .membership-icon { color: var(--danger); }

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

.membership-copy strong {
  display: block;
  font-size: 1rem;
}

.membership-copy span {
  display: block;
  margin-top: 0.18rem;
  color: var(--text-3);
  font-size: 0.82rem;
}

.search-field {
  position: relative;
  margin-top: 1rem;
}

.search-field svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 1.1rem;
  color: var(--text-3);
  transform: translateY(-50%);
}

.search-field input {
  height: 3.6rem;
  padding: 0 1rem 0 3.2rem;
  border-radius: 1rem;
  font-size: 1rem;
}

.message-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.message-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  min-height: 10.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.message-card:hover,
.message-card:focus-visible {
  border-color: rgba(224, 34, 44, 0.42);
  background: var(--surface-2);
  transform: translateY(-0.12rem);
}

.message-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 0.85rem;
  background: var(--red-soft);
  color: #ff6970;
  font-size: 0.88rem;
  font-weight: 900;
}

.message-card.is-public .message-mark {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-2);
}

.message-content {
  min-width: 0;
}

.message-topline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.unread-dot {
  flex: 0 0 auto;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #ff434d;
  box-shadow: 0 0 0 0.25rem rgba(224, 34, 44, 0.12);
}

.message-topline h2 {
  overflow: hidden;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-preview {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.6rem 0 0;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--text-3);
  font-size: 0.76rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 99rem;
  background: rgba(255, 255, 255, 0.06);
}

.meta-pill.pin {
  color: #ff747b;
}

.meta-pill svg {
  width: 0.8rem;
  height: 0.8rem;
}

.status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
  margin-top: 1rem;
  padding: 2rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  text-align: center;
}

.status-panel h2 {
  margin: 1rem 0 0;
  color: var(--text);
  font-size: 1.2rem;
}

.status-panel p {
  max-width: 28rem;
  margin: 0.45rem 0 0;
  font-size: 1rem;
}

.status-panel button {
  min-height: 2.75rem;
  margin-top: 1rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
}

.loader {
  width: 2rem;
  height: 2rem;
  border: 0.18rem solid var(--line-strong);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

/* Detail */
.back-button {
  gap: 0.45rem;
  min-height: 2.8rem;
  padding: 0 1rem;
  border-radius: 0.8rem;
}

.detail-card {
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: clamp(1.2rem, 3vw, 2rem);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail-card h1 {
  max-width: 46rem;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  margin: 1.4rem 0 0;
  color: var(--text-3);
  font-size: 0.88rem;
}

.detail-body {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  color: #e9e9eb;
  font-size: 1.08rem;
  line-height: 1.95;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.locked-detail {
  display: grid;
  min-height: 26rem;
  place-items: center;
  text-align: center;
}

.locked-detail > div {
  max-width: 28rem;
}

.lock-mark {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.2rem;
  place-items: center;
  border-radius: 1.3rem;
  background: rgba(255, 91, 100, 0.1);
  color: var(--danger);
}

.lock-mark svg {
  width: 2rem;
  height: 2rem;
}

.locked-detail h1 {
  font-size: 1.8rem;
}

.locked-detail p {
  margin: 0.8rem 0 0;
  color: var(--text-2);
  font-size: 1rem;
}

/* Profile */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 1rem;
  margin-top: 2rem;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.identity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  gap: 1rem;
  min-height: 15rem;
  padding: 1.5rem;
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 1.15rem;
  font-size: 1.45rem;
}

.identity-copy {
  align-self: center;
  min-width: 0;
}

.identity-copy h2 {
  overflow: hidden;
  margin: 0;
  font-size: 1.35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-copy p {
  overflow: hidden;
  margin: 0.25rem 0 0;
  color: var(--text-3);
  font-size: 0.83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0.3rem 0.65rem;
  border-radius: 99rem;
  background: rgba(77, 204, 120, 0.1);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-badge.is-warning {
  background: rgba(243, 163, 56, 0.1);
  color: var(--orange);
}

.status-badge.is-locked {
  background: rgba(255, 91, 100, 0.1);
  color: var(--danger);
}

.permission-card {
  padding: 1.7rem;
  background:
    radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.13), transparent 10rem),
    linear-gradient(135deg, #ca151e, #75060c);
}

.permission-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.permission-heading h2 {
  margin: 0;
  font-size: 1.8rem;
}

.permission-heading > svg {
  width: 2.2rem;
  height: 2.2rem;
  color: rgba(255, 255, 255, 0.7);
}

.permission-dates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.8rem 0 0;
}

.permission-dates div {
  min-width: 0;
}

.permission-dates dt {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
}

.permission-dates dd {
  overflow: hidden;
  margin: 0.35rem 0 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-card > p {
  margin: 1.6rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
}

.account-actions {
  grid-column: 1 / -1;
  overflow: hidden;
}

.account-actions a,
.logout-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 4rem;
  padding: 0 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-decoration: none;
}

.account-actions a:hover,
.logout-button:hover {
  background: var(--surface-2);
}

.logout-button {
  justify-content: flex-start;
  gap: 0.7rem;
  border-bottom: 0;
  color: #ff6e75;
  cursor: pointer;
}

.mobile-nav {
  display: none;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 1.25rem;
  bottom: 1.25rem;
  max-width: min(90vw, 26rem);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.85rem;
  background: #25262a;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.9rem;
  animation: toast-in 160ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .login-view {
    display: block;
    min-height: 100svh;
  }

  .login-brand {
    display: none;
  }

  .login-panel {
    justify-content: flex-start;
    min-height: 100svh;
    padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: clamp(3rem, 10vh, 6rem);
  }

  .mobile-brand div {
    display: grid;
    line-height: 1.2;
  }

  .mobile-brand strong {
    font-size: 1.05rem;
  }

  .mobile-brand span {
    margin-top: 0.2rem;
    color: var(--text-3);
    font-size: 0.72rem;
  }

  .login-card {
    margin: 0 auto;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 4.2rem;
    padding: max(0.6rem, env(safe-area-inset-top)) 1rem 0.6rem;
  }

  .desktop-nav,
  .topbar-user #topbar-name {
    display: none;
  }

  .topbar-user {
    grid-column: 2;
  }

  .topbar-brand small {
    display: none;
  }

  .workspace-main {
    padding: 2rem 1rem calc(6.3rem + env(safe-area-inset-bottom));
  }

  .message-list {
    grid-template-columns: 1fr;
  }

  .message-card {
    min-height: 0;
    padding: 1rem;
    border-radius: 1rem;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .identity-card {
    min-height: 0;
  }

  .account-actions {
    grid-column: auto;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-height: calc(4.6rem + env(safe-area-inset-bottom));
    padding: 0.45rem 0.5rem env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(15, 16, 18, 0.94);
    backdrop-filter: blur(22px);
  }

  .mobile-nav .nav-button {
    flex-direction: column;
    gap: 0.15rem;
    min-height: 3.7rem;
    border-radius: 0.8rem;
    font-size: 0.73rem;
  }

  .mobile-nav .nav-button svg {
    width: 1.45rem;
    height: 1.45rem;
  }

  .mobile-nav .nav-button.is-active {
    background: var(--red-soft);
  }

  .detail-card {
    margin-top: 1rem;
    padding: 1.4rem;
  }

  .detail-body {
    font-size: 1.05rem;
    line-height: 1.85;
  }

  .permission-dates {
    grid-template-columns: repeat(2, 1fr);
  }

  .toast {
    right: 1rem;
    bottom: calc(5.6rem + env(safe-area-inset-bottom));
    left: 1rem;
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .page-heading h1 {
    font-size: 2.4rem;
  }

  .membership-banner {
    align-items: flex-start;
  }

  .message-mark {
    width: 2.6rem;
    height: 2.6rem;
  }

  .permission-dates {
    grid-template-columns: 1fr 1fr;
  }
}

@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;
  }
}

@media (forced-colors: active) {
  .unread-dot,
  .trust-row i {
    border: 1px solid CanvasText;
  }
}
