:root {
  --content-max: 660px;
  --elevated-shadow: 0 18px 54px rgba(36, 39, 45, .12);
}

html {
  background: var(--bg);
}

body {
  min-height: 100dvh;
}

button {
  color: inherit;
}

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

.webos-mode {
  position: fixed;
  z-index: 50;
  right: max(.75rem, env(safe-area-inset-right));
  bottom: max(.65rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .38rem .62rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 0 5px 22px rgba(20, 24, 32, .08);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 680;
  letter-spacing: .02em;
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.webos-mode-dot {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #46a87a;
  box-shadow: 0 0 0 3px color-mix(in srgb, #46a87a 16%, transparent);
}

.app-shell {
  grid-template-columns: 202px minmax(0, var(--content-max)) minmax(210px, 270px);
  gap: clamp(1rem, 2.1vw, 1.65rem);
}

.sidebar .brand img,
.mobile-brand img {
  border-radius: 25%;
  box-shadow: 0 5px 18px rgba(31, 39, 58, .12);
}

.brand {
  letter-spacing: -.045em;
}

.nav-list {
  gap: .1rem;
}

.nav-link,
.mobile-nav-button {
  border: 0;
  background: transparent;
  text-align: left;
}

.nav-link {
  width: 100%;
}

.nav-link .nav-icon {
  display: inline-grid;
  place-items: center;
}

.nav-link .nav-icon svg,
.topbar-action svg,
.mobile-nav-button svg,
.post-action svg,
.suggestion-button svg,
.media-picker svg,
.empty-illustration svg,
.notification-icon svg,
.setting-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-create {
  width: calc(100% - 1.1rem);
  border: 0;
}

.button-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.sidebar-account {
  width: 100%;
  border: 1px solid transparent;
  border-radius: .8rem;
  background: transparent;
  text-align: left;
}

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

.main-column {
  min-width: 0;
  padding-top: .8rem;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 68px;
  margin: 0 -.2rem;
  padding: .55rem .2rem .65rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.topbar-title-wrap {
  min-width: 0;
}

.topbar-title-wrap h1 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.topbar-title-wrap p {
  overflow: hidden;
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-brand {
  display: none;
  flex: 0 0 auto;
}

.topbar-action,
.language-button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
}

.topbar-action:hover,
.language-button:hover {
  border-color: var(--line);
  background: var(--surface);
}

.language-button {
  min-width: 42px;
  min-height: 38px;
  padding: .35rem .55rem;
  border-radius: .7rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 780;
}

.route-view {
  min-height: 50vh;
}

.view-intro {
  margin: 0 0 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.view-intro strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--text);
  font-family: var(--font-editorial);
  font-size: 1.18rem;
}

.view-intro p {
  margin: 0;
}

.composer-prompt {
  margin-bottom: .85rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(36, 39, 45, .025);
}

.composer-prompt:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--text);
}

.composer-plus {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1.25rem;
}

.feed-tabs {
  position: sticky;
  z-index: 10;
  top: 68px;
  margin: 0 0 .8rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
}

.feed-tab {
  flex: 1;
  padding: .72rem 1rem;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.feed-tab:hover {
  color: var(--text);
}

.feed-tab.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.feed {
  display: grid;
  gap: .8rem;
}

.feed > .post-card {
  border-top: 0;
}

.post-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(36, 39, 45, .035);
  animation: card-in .28s ease both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.post-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: start;
}

.post-avatar-button,
.post-author-name,
.post-time {
  border: 0;
  background: transparent;
}

.post-avatar-button {
  min-height: 0;
  padding: 0;
}

.post-author-line {
  display: flex;
  align-items: baseline;
  gap: .4rem;
}

.post-author-name {
  overflow: hidden;
  min-height: 0;
  padding: 0;
  color: var(--text);
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-author-name:hover {
  color: var(--accent-strong);
}

.post-username,
.post-meta {
  color: var(--muted);
  font-size: .8rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .12rem;
}

.post-time {
  color: inherit;
  font-size: inherit;
}

.post-time:hover {
  color: var(--accent-strong);
}

.post-menu-button {
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
}

.post-menu-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.post-menu-popover svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-content {
  margin-left: 3.4rem;
}

.post-body {
  margin-top: .72rem;
  overflow-wrap: anywhere;
  line-height: 1.58;
}

.post-body p {
  margin: 0 0 .72rem;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body blockquote {
  margin: .8rem 0;
  padding: .7rem .85rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 .55rem .55rem 0;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-editorial);
}

.post-body ul {
  margin: .65rem 0;
  padding-left: 1.25rem;
}

.hashtag {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 650;
}

.media-grid {
  margin-top: .85rem;
  border: 1px solid var(--line);
}

.media-grid.count-3 {
  min-height: 290px;
}

.media-button {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface-2);
}

.media-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.media-button:hover img {
  transform: scale(1.018);
}

.video-wrap {
  margin-top: .85rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
}

.video-wrap video {
  width: 100%;
  max-height: 430px;
}

.file-card {
  margin-top: .85rem;
  border-color: var(--line);
  background: var(--surface-2);
  text-decoration: none;
}

.file-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-card small {
  color: var(--muted);
}

.post-actions {
  justify-content: flex-start;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
}

.post-action {
  min-width: 40px;
  min-height: 38px;
  padding: .35rem .55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.post-action:hover {
  background: var(--surface-2);
  color: var(--text);
}

.post-action.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.post-action.danger-active {
  background: var(--danger-soft);
  color: var(--danger);
}

.post-action span {
  font-size: .78rem;
  font-weight: 650;
}

.post-action.share-action {
  margin-left: auto;
}

.reaction-picker {
  position: relative;
}

.reaction-popover {
  position: absolute;
  z-index: 12;
  left: 0;
  bottom: calc(100% + .4rem);
  display: none;
  gap: .3rem;
  padding: .4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(20, 25, 35, .18);
}

.reaction-picker:hover .reaction-popover,
.reaction-picker:focus-within .reaction-popover {
  display: flex;
}

.reaction-choice {
  min-width: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.08rem;
}

.reaction-choice:hover,
.reaction-choice.active {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.post-reason {
  display: inline-flex;
  margin-top: .6rem;
  padding: .25rem .48rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: .7rem;
  font-weight: 650;
}

.right-rail {
  gap: .85rem;
}

.rail-card {
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.rail-card .rail-title {
  color: var(--text);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.rail-user {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: .55rem;
}

.rail-user-copy {
  min-width: 0;
}

.suggestion-button {
  min-width: 34px;
  min-height: 34px;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--accent-strong);
}

.suggestion-button:hover,
.suggestion-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.rail-tag {
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.search-panel {
  display: grid;
  gap: .8rem;
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  left: .9rem;
  top: 50%;
  width: 1.2rem;
  height: 1.2rem;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}

.search-box input {
  width: 100%;
  padding: .85rem 1rem .85rem 2.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box input:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: var(--shadow-focus);
}

.search-summary {
  color: var(--muted);
  font-size: .86rem;
}

.user-result-list,
.notification-list,
.settings-stack {
  display: grid;
  gap: .7rem;
}

.user-result,
.notification-card,
.settings-card {
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.user-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
}

.user-result-copy {
  min-width: 0;
}

.user-result-copy button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 780;
}

.user-result-copy p,
.user-result-copy small {
  margin: .18rem 0 0;
  color: var(--muted);
}

.follow-button {
  padding: .45rem .75rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: .78rem;
  font-weight: 750;
}

.follow-button.following {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 1rem 0 .65rem;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: 1.2rem;
}

.section-heading span {
  color: var(--muted);
  font-size: .8rem;
}

.notification-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: .75rem;
}

.notification-card.unread {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 44%, var(--surface));
}

.notification-card.unread::after {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.notification-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.notification-copy p {
  margin: 0;
}

.notification-copy time {
  display: block;
  margin-top: .25rem;
  color: var(--muted);
  font-size: .76rem;
}

.notification-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .75rem;
}

.text-button {
  min-height: 36px;
  padding: .4rem .65rem;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: var(--accent-strong);
  font-size: .82rem;
  font-weight: 700;
}

.text-button:hover {
  background: var(--accent-soft);
}

.profile-hero {
  overflow: hidden;
  margin-bottom: .85rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--surface);
}

.profile-cover {
  width: 100%;
  height: clamp(150px, 28vw, 220px);
  object-fit: cover;
  background: var(--surface-2);
}

.profile-content {
  padding: 0 1rem 1.1rem;
}

.profile-avatar-row {
  margin-top: -48px;
  padding: 0;
}

.profile-avatar {
  width: 96px;
  height: 96px;
}

.profile-name-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .7rem;
}

.profile-name-row h2 {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: 1.65rem;
}

.profile-name-row p {
  margin: .12rem 0 0;
  color: var(--muted);
}

.profile-bio {
  max-width: 44rem;
  margin: .85rem 0;
}

.profile-stats,
.profile-interests {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.profile-stat {
  color: var(--muted);
}

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

.interest-chip {
  padding: .32rem .58rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 650;
}

.settings-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: .8rem;
}

.setting-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: .85rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.setting-body h2 {
  margin: 0;
  font-size: 1rem;
}

.setting-body > p {
  margin: .25rem 0 .8rem;
  color: var(--muted);
  font-size: .84rem;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.choice-button {
  min-height: 38px;
  padding: .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--surface);
  color: var(--text);
}

.choice-button:hover {
  border-color: var(--accent);
}

.choice-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
}

.danger-zone .setting-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.danger-button {
  min-height: 40px;
  padding: .45rem .75rem;
  border: 1px solid var(--danger);
  border-radius: .65rem;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
}

.danger-button:hover {
  background: var(--danger-soft);
}

.empty-state {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.empty-illustration {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.empty-illustration svg {
  width: 1.8rem;
  height: 1.8rem;
}

.app-dialog {
  width: min(620px, calc(100% - 1.5rem));
  max-height: min(780px, calc(100dvh - 1.5rem));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--elevated-shadow);
}

.app-dialog::backdrop,
.media-lightbox::backdrop {
  background: rgba(14, 17, 23, .58);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  display: flex;
  max-height: min(780px, calc(100dvh - 1.5rem));
  flex-direction: column;
  margin: 0;
}

.dialog-header {
  display: flex;
  align-items: start;
  gap: 1rem;
  padding: 1rem 1rem .8rem;
  border-bottom: 1px solid var(--line);
}

.dialog-header > div {
  min-width: 0;
  flex: 1;
}

.dialog-header h2 {
  margin: .08rem 0 0;
  font-family: var(--font-editorial);
  font-size: 1.35rem;
}

.dialog-kicker {
  color: var(--accent-strong);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dialog-close {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
}

.dialog-close:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

.composer-author {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .9rem 1rem 0;
}

.composer-author span:last-child {
  min-width: 0;
}

.composer-author strong,
.composer-author small {
  display: block;
}

.composer-author small {
  color: var(--muted);
}

#composer-text {
  width: calc(100% - 2rem);
  min-height: 150px;
  margin: .7rem 1rem 0;
  padding: .85rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--bg);
  color: var(--text);
}

#composer-text::placeholder,
#comment-text::placeholder {
  color: var(--muted);
}

#composer-text:focus,
#comment-text:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: var(--shadow-focus);
}

.composer-preview {
  position: relative;
  margin: .7rem 1rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--surface-2);
}

.composer-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.composer-preview button {
  position: absolute;
  top: .55rem;
  right: .55rem;
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 30, .72);
  color: white;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
}

.media-picker {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .45rem .65rem;
  border-radius: .65rem;
  color: var(--accent-strong);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.media-picker:hover {
  background: var(--accent-soft);
}

.media-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.draft-status {
  color: var(--success);
  font-size: .76rem;
}

.character-counter {
  margin-left: auto;
  color: var(--muted);
  font-size: .76rem;
}

.character-counter.warning {
  color: var(--danger);
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
  padding: .8rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.comments-dialog {
  width: min(650px, calc(100% - 1.5rem));
}

.comments-list {
  display: grid;
  gap: .8rem;
  max-height: 52vh;
  padding: 1rem;
  overflow: auto;
}

.comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: .65rem;
}

.comment-bubble {
  padding: .68rem .78rem;
  border-radius: .2rem .9rem .9rem .9rem;
  background: var(--surface-2);
}

.comment-bubble header {
  display: flex;
  align-items: baseline;
  gap: .4rem;
}

.comment-bubble strong {
  font-size: .86rem;
}

.comment-bubble time {
  color: var(--muted);
  font-size: .7rem;
}

.comment-bubble p {
  margin: .25rem 0 0;
  white-space: pre-wrap;
}

.comment-composer {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: end;
  padding: .85rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

#comment-text {
  width: 100%;
  min-height: 44px;
  max-height: 140px;
  padding: .65rem .75rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--bg);
  color: var(--text);
}

.media-lightbox {
  max-width: min(1050px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #101216;
  color: white;
}

.media-lightbox .lightbox-close {
  right: .75rem;
  top: .75rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(0,0,0,.56);
  color: white;
  font-size: 1.5rem;
}

.lightbox-figure {
  margin: 0;
}

.lightbox-figure img {
  width: auto;
  max-width: min(1050px, calc(100vw - 2rem));
  max-height: calc(100dvh - 5rem);
  margin: auto;
  object-fit: contain;
}

.lightbox-figure figcaption {
  padding: .7rem 1rem;
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  text-align: center;
}

.toast-region {
  position: fixed;
  z-index: 120;
  right: 1rem;
  bottom: 3.2rem;
  display: grid;
  width: min(330px, calc(100% - 2rem));
  gap: .5rem;
  pointer-events: none;
}

.toast {
  padding: .72rem .85rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--text);
  box-shadow: 0 12px 40px rgba(20, 25, 35, .24);
  color: var(--bg);
  font-size: .82rem;
  font-weight: 650;
  animation: toast-in .22s ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, var(--content-max));
    justify-content: center;
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    width: min(100%, 700px);
    padding: 0 .75rem;
  }

  .sidebar {
    display: none;
  }

  .main-column {
    padding-bottom: 6rem;
  }

  .topbar {
    top: 0;
    min-height: 62px;
  }

  .mobile-brand {
    display: flex;
  }

  .topbar-title-wrap h1 {
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: -.015em;
  }

  .topbar-title-wrap p {
    font-size: .68rem;
  }

  .mobile-nav {
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(66px + env(safe-area-inset-bottom));
    padding: .35rem max(.35rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(.35rem, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 -8px 28px rgba(18, 23, 30, .08);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-button {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    align-content: center;
    gap: .12rem;
    border-radius: .58rem;
    color: var(--muted);
    font-size: .62rem;
  }

  .mobile-nav-button.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }

  .mobile-nav-button.create-mobile {
    color: white;
  }

  .mobile-nav-button.create-mobile .mobile-create-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 5px 15px color-mix(in srgb, var(--accent) 30%, transparent);
    font-size: 1.35rem;
  }

  .mobile-nav-button.create-mobile span:last-child {
    color: var(--muted);
  }

  .webos-mode {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .feed-tabs {
    top: 62px;
  }
}

@media (max-width: 540px) {
  .app-shell {
    padding: 0 .5rem;
  }

  .topbar-action {
    min-width: 38px;
    min-height: 38px;
  }

  .language-button {
    min-width: 36px;
    padding-inline: .35rem;
  }

  .post-card {
    padding: .82rem;
  }

  .post-content {
    margin-left: 0;
  }

  .post-body {
    margin-top: .8rem;
  }

  .media-grid.count-3 {
    min-height: 235px;
  }

  .post-action {
    min-width: 36px;
    padding-inline: .42rem;
  }

  .post-action.share-action {
    margin-left: 0;
  }

  .user-result {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .user-result .follow-button {
    grid-column: 2;
    justify-self: start;
  }

  .settings-card {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: .8rem;
  }

  .setting-icon {
    width: 38px;
    height: 38px;
  }

  .profile-name-row {
    flex-direction: column;
  }

  .comment-composer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .comment-composer .avatar {
    display: none;
  }

  .composer-tools {
    flex-wrap: wrap;
  }

  .draft-status {
    order: 3;
    width: 100%;
  }
}

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