:root {
  --bg: #f4f1ea;
  --bg-accent: radial-gradient(circle at top left, rgba(211, 130, 44, 0.22), transparent 26%),
    radial-gradient(circle at bottom right, rgba(18, 85, 56, 0.18), transparent 24%), #f4f1ea;
  --surface: rgba(255, 252, 247, 0.92);
  --surface-strong: #fffdf9;
  --line: rgba(61, 44, 27, 0.12);
  --text: #1f1b18;
  --muted: #6d6256;
  --brand: #c96d1f;
  --brand-deep: #a3500d;
  --accent: #1c6b4a;
  --shadow: 0 18px 40px rgba(52, 36, 20, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  background: var(--bg-accent);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px;
}

.topbar,
.card,
.composer__panel {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  grid-template-columns: 260px minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 999px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand strong,
.hero h1,
.detail h2 {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

.brand span,
.meta,
.eyebrow,
.button--ghost,
.topic-list,
.post-card__footer,
.comment {
  color: var(--muted);
}

.brand__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.brand div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.brand span {
  font-size: 0.86rem;
}

.topbar__search input,
.composer input,
.composer select,
.composer textarea,
.detail__form input,
.detail__form textarea {
  width: 100%;
  border: 1px solid transparent;
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
}

.composer select,
.composer textarea,
.composer input,
.detail__form input,
.detail__form textarea {
  border-radius: 14px;
  border-color: var(--line);
}

.topbar__search input:focus,
.composer input:focus,
.composer select:focus,
.composer textarea:focus,
.detail__form input:focus,
.detail__form textarea:focus {
  border-color: rgba(201, 109, 31, 0.45);
}

.topbar__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar__mobile-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.button--icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 0.92rem;
}

.mobile-account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 16px;
  width: min(144px, calc(100vw - 24px));
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  backdrop-filter: blur(18px);
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 30;
}

.mobile-account-menu > * {
  width: 100%;
}

.mobile-account-menu__status {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.74rem;
  justify-content: center;
}

.mobile-account-menu__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mobile-account-menu__grid > * {
  width: 100%;
  justify-content: center;
}

.mobile-account-menu__logout {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.button:hover,
.tab:hover,
.category-pill:hover,
.post-card:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
}

.button--warm {
  box-shadow: 0 12px 24px rgba(201, 109, 31, 0.22);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.54);
}

.button--compact {
  padding: 10px 14px;
}

.button--with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button-badge {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(28, 107, 74, 0.1);
  color: var(--accent);
  font-size: 0.9rem;
  white-space: nowrap;
}

.auth-chip--button {
  border: 1px solid rgba(28, 107, 74, 0.14);
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar {
  height: fit-content;
  position: sticky;
  top: 112px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin: 0 0 12px;
}

.category-list,
.post-list,
.detail__comments,
.stats {
  display: grid;
  gap: 12px;
}

.category-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.category-list--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-list--compact .category-pill {
  padding: 9px 10px;
  font-size: 0.84rem;
  gap: 8px;
}

.category-list--compact .category-pill strong {
  font-size: 0.78rem;
}

.category-pill.is-active,
.tab.is-active {
  border-color: rgba(201, 109, 31, 0.22);
  background: rgba(201, 109, 31, 0.12);
  color: var(--brand-deep);
}

.sidebar__section {
  margin-top: 26px;
}

.stats > div {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.58);
}

.stats strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.95), rgba(245, 255, 248, 0.88));
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0;
  line-height: 1;
}

.hero__copy {
  max-width: 680px;
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 1rem;
}

.hero__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero__chips span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(28, 107, 74, 0.1);
  color: var(--accent);
}

.toolbar {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.toolbar__mobile-category {
  display: none;
  position: relative;
  margin-left: auto;
}

.toolbar__category-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.toolbar__category-toggle strong {
  color: var(--brand-deep);
  font-size: 0.88rem;
}

.mobile-category-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 18px;
  backdrop-filter: blur(18px);
  background: rgba(255, 252, 247, 0.97);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 15;
}

.mobile-category-menu .eyebrow {
  margin-bottom: 10px;
}

.tabs {
  display: flex;
  gap: 10px;
}

.tab {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
}

.post-list {
  margin-top: 18px;
}

.post-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.92);
  padding: 18px;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.post-card.is-active {
  border-color: rgba(201, 109, 31, 0.3);
  box-shadow: 0 12px 30px rgba(201, 109, 31, 0.12);
}

.post-card__top,
.post-card__footer,
.detail__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-card__tag,
.detail__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--accent);
  background: rgba(28, 107, 74, 0.1);
  padding: 8px 12px;
  border-radius: 999px;
}

.post-card h3,
.detail h2 {
  margin: 14px 0 10px;
  font-size: 1.25rem;
}

.post-card p,
.detail__body,
.empty {
  color: var(--muted);
  line-height: 1.7;
}

.post-card__footer {
  margin-top: 18px;
  font-size: 0.92rem;
}

.post-card__meta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail__content {
  min-height: 560px;
}

.detail__body {
  margin: 18px 0 24px;
  font-size: 1.04rem;
}

.detail__comments {
  margin-top: 18px;
}

.reaction-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.attachment-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.attachment-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.attachment-gallery__item img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: rgba(245, 241, 234, 0.9);
  display: block;
}

.reaction-bar__meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(201, 109, 31, 0.18);
  background: rgba(201, 109, 31, 0.08);
  color: var(--brand-deep);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.reaction-button strong {
  color: var(--brand-deep);
}

.reaction-button--small {
  padding: 8px 12px;
  font-size: 0.88rem;
}

.comment {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.62);
}

.comment--nested {
  margin-top: 12px;
  background: rgba(255, 251, 246, 0.9);
  border: 1px solid rgba(201, 109, 31, 0.12);
}

.comment__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.comment strong {
  color: var(--text);
}

.comment__body {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.comment__reply-to {
  margin: 0 0 8px;
  color: var(--brand-deep);
  font-size: 0.88rem;
}

.comment__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.comment__children {
  margin-top: 14px;
  padding-left: 18px;
  border-left: 2px solid rgba(201, 109, 31, 0.14);
}

.detail__form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail__form label {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.detail__form textarea {
  resize: vertical;
  min-height: 120px;
}

.detail__actions {
  display: flex;
  justify-content: flex-end;
}

.detail__actions--split {
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(28, 107, 74, 0.08);
  color: var(--accent);
}

.upload-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed rgba(201, 109, 31, 0.28);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 244, 0.74);
}

.upload-box--compact {
  margin-top: 4px;
}

.upload-box__head {
  display: grid;
  gap: 4px;
}

.upload-box__head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.upload-box__picker {
  width: fit-content;
  margin-top: 0;
  cursor: pointer;
}

.upload-box__picker input {
  display: none;
}

.upload-box__picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(201, 109, 31, 0.1);
  color: var(--brand-deep);
  border: 1px solid rgba(201, 109, 31, 0.18);
}

.upload-list {
  display: grid;
  gap: 10px;
}

.upload-list__empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.upload-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.upload-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(245, 241, 234, 0.9);
}

.upload-card__meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.upload-card__meta strong,
.upload-card__meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-card__meta span {
  color: var(--muted);
  font-size: 0.88rem;
}

.readonly-box {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(201, 109, 31, 0.1);
  border: 1px solid rgba(201, 109, 31, 0.16);
}

.readonly-box strong {
  color: var(--text);
}

.readonly-box span,
.hint {
  color: var(--muted);
}

.text-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-deep);
  cursor: pointer;
  font-weight: 700;
}

.composer {
  width: min(620px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  background: transparent;
}

.auth-dialog {
  width: min(520px, calc(100vw - 32px));
}

.auth-dialog[open] {
  position: fixed;
  right: 24px;
  bottom: 24px;
  margin: 0;
  z-index: 40;
}

.composer::backdrop {
  background: rgba(24, 17, 10, 0.34);
  backdrop-filter: blur(8px);
}

.composer__panel {
  border-radius: 28px;
  padding: 24px;
}

.composer__head,
.composer__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.composer__head h2 {
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.auth-dialog .composer__panel {
  padding: 28px 24px 24px;
}

.auth-dialog .composer__head {
  align-items: flex-start;
}

.auth-dialog .composer__actions {
  margin-top: 16px;
  flex-wrap: wrap;
}

.auth-dialog .hint {
  line-height: 1.6;
}

.composer form,
.composer label {
  display: grid;
  gap: 10px;
}

.composer label {
  margin-top: 16px;
  color: var(--muted);
}

.composer textarea {
  resize: vertical;
  min-height: 140px;
}

.empty {
  padding: 30px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
}

.empty--inline {
  padding: 18px;
}

.detail-dialog {
  width: min(1080px, calc(100vw - 36px));
  border: 0;
  padding: 0;
  background: transparent;
}

.detail-dialog::backdrop {
  background: rgba(24, 17, 10, 0.42);
  backdrop-filter: blur(10px);
}

.detail-dialog__panel {
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 28px;
  padding: 24px 28px 28px;
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-dialog__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: sticky;
  top: -24px;
  z-index: 5;
  margin: -24px -28px 16px;
  padding: 24px 28px 16px;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(18px);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.user-center {
  width: min(980px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  background: transparent;
}

.user-center::backdrop {
  background: rgba(24, 17, 10, 0.38);
  backdrop-filter: blur(10px);
}

.user-center__panel {
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 28px;
  padding: 24px 28px 28px;
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.user-center__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: sticky;
  top: -24px;
  z-index: 5;
  margin: -24px -28px 20px;
  padding: 24px 28px 16px;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.user-center__tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.user-center-tab {
  border: 1px solid rgba(201, 109, 31, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-center-tab strong {
  color: var(--brand-deep);
}

.user-center-tab.is-active {
  background: rgba(201, 109, 31, 0.12);
  border-color: rgba(201, 109, 31, 0.24);
  color: var(--brand-deep);
}

.user-center__content {
  min-height: 220px;
}

.user-center-list {
  display: grid;
  gap: 14px;
}

.user-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.9);
}

.user-card--compact {
  gap: 10px;
}

.user-card h3 {
  margin: 0;
  font-size: 1.04rem;
  color: var(--text);
}

.user-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.user-card__top,
.user-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.user-card__meta-line {
  color: var(--brand-deep);
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .sidebar {
    position: fixed;
    left: 20px;
    top: 96px;
    width: min(300px, calc(100vw - 40px));
    transform: translateX(-120%);
    transition: transform 180ms ease;
    z-index: 20;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }
}

@media (max-width: 920px) {
  .shell {
    padding: 16px;
  }

  .topbar {
    grid-template-columns: 1fr;
    border-radius: 28px;
  }

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

  .sidebar {
    display: none;
  }

  .toolbar {
    position: sticky;
    top: 94px;
    z-index: 9;
    padding: 12px 14px;
  }

  .toolbar__mobile-category {
    display: block;
  }

  .hero,
  .composer__head,
  .composer__actions,
  .post-card__top,
  .post-card__footer,
  .detail__meta,
  .detail-dialog__head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__chips {
    justify-content: flex-start;
  }

  .toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .post-card__meta-actions,
  .reaction-bar,
  .comment__actions,
  .reply-banner,
  .upload-card {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .detail-dialog {
    width: calc(100vw - 20px);
  }

  .user-center {
    width: calc(100vw - 20px);
  }

  .detail-dialog__panel {
    max-height: calc(100vh - 20px);
    padding: 20px;
  }

  .user-center__panel {
    max-height: calc(100vh - 20px);
    padding: 20px;
  }

  .detail-dialog__head {
    top: -20px;
    margin: -20px -20px 16px;
    padding: 20px 20px 16px;
  }

  .user-center__head {
    top: -20px;
    margin: -20px -20px 16px;
    padding: 20px 20px 16px;
  }
}

@media (max-width: 640px) {
  .topbar {
    position: sticky;
    top: 8px;
    overflow: visible;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .topbar__mobile-actions {
    display: flex;
  }

  .topbar__actions {
    display: none;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.88rem;
  }

  .brand div {
    min-width: 0;
  }

  .brand strong {
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand span {
    display: none;
  }

  .topbar__search {
    display: none;
    grid-column: 1 / -1;
  }

  .topbar__search.is-open {
    display: block;
  }

  .topbar__search input {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .mobile-account-menu {
    position: fixed;
    top: 124px;
    right: 12px;
    width: min(152px, calc(100vw - 24px));
    margin-top: 0;
    padding: 8px;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    z-index: 12;
  }

  .toolbar {
    top: 72px;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .tabs {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    padding: 8px 12px;
    font-size: 0.84rem;
    flex: 0 0 auto;
  }

  .toolbar__category-toggle {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .toolbar__category-toggle strong {
    font-size: 0.8rem;
  }

  .mobile-category-menu {
    width: min(250px, calc(100vw - 20px));
    padding: 10px;
  }

  .category-list--compact {
    gap: 6px;
  }

  .category-list--compact .category-pill {
    padding: 8px 9px;
    font-size: 0.8rem;
  }

  .mobile-account-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-account-menu .button,
  .mobile-account-menu .auth-chip {
    min-height: 28px;
    padding: 6px 4px;
    font-size: 0.74rem;
  }

  .mobile-account-menu__status {
    display: inline-flex;
  }

  .mobile-account-menu .button--with-badge {
    gap: 4px;
  }

  .mobile-account-menu .button-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.68rem;
  }

  .auth-dialog {
    width: 100vw;
    max-width: none;
    max-height: min(76dvh, 720px);
    height: auto;
    margin: 0;
  }

  .auth-dialog[open] {
    right: 0;
    bottom: 0;
    left: 0;
  }

  .auth-dialog .composer__panel {
    min-height: 0;
    padding:
      calc(18px + env(safe-area-inset-top))
      18px
      calc(24px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .auth-dialog .composer__head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin:
      calc(-18px - env(safe-area-inset-top))
      -18px
      12px;
    padding:
      calc(18px + env(safe-area-inset-top))
      18px
      16px;
    background: rgba(255, 252, 247, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .auth-dialog .auth-form {
    flex: 1;
    align-content: start;
  }

  .auth-dialog .composer__actions {
    margin-top: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .auth-dialog .composer__actions .button {
    width: 100%;
  }

  .auth-dialog .text-link {
    font-size: 0.96rem;
  }
}
