/* Shared visual language for the installed community, including both themes. */
html[data-theme="light"] body.v30-social-shell.v38-one-ui {
  --bg: #f5f6f8;
  --panel: #fff;
  --panel2: #f0f2f5;
  --line: #e0e3e9;
  --ink: #222631;
  --muted: #626876;
  --v38-field: #f5f6f8;
  --v38-raised: #fff;
}

html[data-theme="dark"] body.v30-social-shell.v38-one-ui {
  --bg: #14161b;
  --panel: #1d2027;
  --panel2: #272b34;
  --line: #323641;
  --ink: #e9ecf2;
  --muted: #a6adbc;
  --v38-field: #181b21;
  --v38-raised: #242831;
}

.v30-social-shell {
  --v290-max: 1440px;
  --v290-gap: clamp(16px, 2vw, 28px);
  --v290-inset: clamp(14px, 2.2vw, 32px);
  --v61-header-height: 64px;
  --social-radius: 14px;
  --v200-radius: 14px;
  --v200-control-radius: 10px;
  --v200-pad: clamp(16px, 1.6vw, 22px);
  --social-shadow: 0 1px 2px rgb(15 23 42 / .025);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.v30-social-shell .v61-header {
  box-shadow: none;
}

.v30-social-shell .main :where(h1) {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.035em;
}

.v30-social-shell :is(.primary-btn, .secondary-btn) {
  border-radius: var(--v200-control-radius);
  font-weight: 650;
  box-shadow: none;
}

.v30-social-shell :is(.primary-btn, .secondary-btn, .icon-btn, .v61-trigger, .v61-nav-list > a) {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.v30-social-shell .main :where(input, textarea, select) {
  caret-color: var(--v61-strong);
}

.v30-social-shell .main :where(input, textarea)::placeholder { color: var(--muted); opacity: .9; }
.v30-social-shell .main :where(.form-grid, .search-form) :where(input, select, textarea):focus-visible {
  outline: 2px solid var(--v61-strong);
  outline-offset: 2px;
}

.v30-social-shell .main :where(.flash) {
  border-color: var(--line);
  border-inline-start: 3px solid var(--v61-strong);
}

.v30-social-shell .v61-header .brand .v290-brand-mark {
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 750;
}

.v30-social-shell:not(.v113-admin) .v61-header .brand .v30-brand-name {
  font-size: 1.25rem;
  font-weight: 750;
}

.v30-social-shell:not(.v113-admin) .v61-header .v61-search-trigger {
  justify-self: stretch;
  min-block-size: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--v38-field);
}

.v30-social-shell .v61-search-trigger kbd { border: 0; }
.v30-social-shell .v61-header .head-actions { gap: 4px; }
.v30-social-shell .v61-header .head-actions > .icon-btn { border-radius: 10px; background: transparent; }
.v30-social-shell .v61-header .head-actions > .icon-btn:hover { background: var(--panel2); }
.v30-social-shell .v61-header .v312-new-topic { border-color: var(--line); background: transparent; }
.v30-social-shell .v61-header .v312-new-topic:hover { background: var(--panel2); }
.v30-social-shell:not(.v113-admin) .v61-header .v352-signin {
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
}

.v30-social-shell .app-layout > .v280-rail {
  padding: 0;
  min-block-size: 0;
  border: 0;
  background: transparent;
  gap: 4px;
}

.v30-social-shell .v280-rail :is(.v61-nav-list > a, .v110-rail-menu, .v61-rail-theme) {
  min-block-size: 46px;
  border-radius: 11px;
  padding-inline: 12px;
}

.v30-social-shell .v280-rail .v61-nav-list > a { font-size: .91rem; font-weight: 550; }
.v30-social-shell .v280-rail .v61-nav-list > a[aria-current] { background: var(--v61-tint); font-weight: 650; }
.v30-social-shell .v280-rail .v110-rail-menu { margin-block-start: 4px; border: 0; font-weight: 550; }
.v30-social-shell .v280-rail .v110-rail-menu[aria-current] { background: var(--v61-tint); color: var(--v61-strong); }
.v30-social-shell .v280-rail .v61-rail-theme { margin-block-start: 18px; color: var(--muted); font-weight: 450; }
.v30-social-shell .v280-rail :is(a, button) > .v312-icon { inline-size: 20px; block-size: 20px; }

.v30-social-shell .main .social-feed {
  display: grid;
  grid-template-columns: minmax(0, 690px);
  justify-content: center;
  gap: var(--v290-gap);
  max-inline-size: 1050px;
}

.social-feed-column,
.social-feed-aside { min-inline-size: 0; }

.social-feed-guest { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.social-feed-guest > .social-feed-heading { grid-column: 1; grid-row: 1; align-self: center; }
.social-feed-guest > .v280-feed-toolbar { grid-column: 2; grid-row: 1; }
.social-feed-guest > :not(.social-feed-heading, .v280-feed-toolbar) { grid-column: 1 / -1; }

.v30-social-shell .main .social-feed-heading { border: 0; margin: 0 0 14px; padding: 0; }
.v30-social-shell .main .social-feed-heading h1 { font-size: clamp(1.5rem, 2.3vw, 1.9rem); font-weight: 700; }

.v30-social-shell .main .social-composer {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--social-radius);
  background: var(--panel);
  box-shadow: var(--social-shadow);
}

.social-composer > summary { min-block-size: 68px; padding: 10px 14px; gap: 12px; }
.social-composer > summary:hover { background: transparent; }
.social-compose-label {
  flex: 1 1 auto;
  min-inline-size: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--v38-field);
  color: var(--muted);
  font-weight: 450;
}
.social-composer > summary:hover .social-compose-label { color: var(--ink); background: var(--panel2); }
.social-compose-media { display: grid; place-items: center; color: var(--v61-strong); }
.social-composer .v100-composer { overflow-wrap: anywhere; }

.v30-social-shell .main .social-feed .v110-story-strip {
  margin: 0 0 12px;
  border-radius: var(--social-radius);
  box-shadow: var(--social-shadow);
}
.v30-social-shell .social-feed .v110-story-strip-empty { display: none; }

.social-aside-links > a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
  min-block-size: 44px;
  padding: 4px 6px;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.social-aside-links > a:hover { background: var(--panel2); }
.social-avatar,
.social-link-icon {
  display: grid;
  flex: 0 0 33px;
  place-items: center;
  inline-size: 33px;
  block-size: 33px;
  border-radius: 50%;
  background: var(--v61-tint);
  color: var(--v61-strong);
}
.social-avatar {
  flex-basis: 38px;
  inline-size: 38px;
  block-size: 38px;
  font-weight: 750;
}
.social-link-icon svg { inline-size: 17px; block-size: 17px; }

.social-feed-aside { display: none; align-content: start; gap: 12px; }
.social-feed-aside > .panel {
  min-inline-size: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--social-radius);
  background: var(--panel);
  box-shadow: var(--social-shadow);
}
.social-aside-card h2 { margin: 2px 5px 7px; font-size: .92rem; line-height: 1.35; font-weight: 650; }
.social-aside-heading { display: flex; align-items: start; justify-content: space-between; gap: 6px; }
.social-aside-heading > a { padding: 2px 5px; font-size: .82rem; color: var(--v61-strong); }
.social-aside-links { display: grid; }
.social-aside-links > a { font-size: .86rem; }
.v30-social-shell .social-feed .v280-feed-toolbar {
  margin: 0 0 12px;
  padding: 3px 5px;
  gap: 3px 8px;
  border: 0;
  border-block-end: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.v30-social-shell .social-feed .v280-feed-tabs { gap: 2px; overflow: visible; }
.v30-social-shell .social-feed .v280-feed-tabs > a { min-block-size: 44px; font-size: .86rem; }
.v30-social-shell .social-feed .v280-feed-tools .v61-trigger { min-block-size: 44px; }
.v30-social-shell .social-feed .v280-feed-more > .v61-trigger { min-inline-size: 44px; }
.v30-social-shell .social-feed .v280-feed-tools .v61-trigger:focus-visible,
.social-composer summary:focus-visible { outline-offset: -2px; }

.v30-social-shell .main .social-feed .v280-feed-list > .panel {
  border-radius: var(--social-radius);
  box-shadow: var(--social-shadow);
}
.v30-social-shell .social-feed .v280-feed-topic-title a { color: var(--ink); }
.v30-social-shell .social-feed .v280-feed-topic-title a:hover { color: var(--v61-strong); }
.v30-social-shell .social-feed .v280-feed-byline .v280-feed-avatar,
.v30-social-shell .social-feed .v280-feed-social .v280-feed-avatar { border-radius: 50%; }
.v30-social-shell .social-feed :is(.v280-feed-card-actions, .v280-feed-social .v100-post-actions) {
  border-block-start: 1px solid var(--line);
  margin-block-start: 12px;
  padding-block-start: 8px;
}

.social-feed-empty { display: grid; justify-items: center; gap: 8px; text-align: center; }
.v30-social-shell .main .social-feed .v280-feed-list > .social-feed-empty { padding: clamp(24px, 6vw, 55px) 14px; }
.social-feed-empty h2 { margin: 3px 0 0; font-size: 1.12rem; }
.social-feed-empty p { margin: 0; color: var(--muted); }
.social-feed-empty > a { margin-block-start: 4px; }

.v30-social-shell .bottom-nav.v120-main-dock {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--panel);
  box-shadow: none;
}
.v30-social-shell .v120-main-dock .v61-dock-icon { border-radius: 10px; }
.v30-social-shell .v120-main-dock small { white-space: nowrap; }

@media (min-width: 1100px) {
  .v30-social-shell:not(.v113-admin) { --v61-rail-size: 200px; }
  .v30-social-shell:not(.v113-admin) .v61-header .head {
    grid-template-columns: var(--v61-rail-size) minmax(160px, 1fr) auto;
  }
  .v30-social-shell[data-route="thread"]:not(.v113-admin) .v61-header .head {
    grid-template-columns: minmax(112px, 165px) minmax(160px, 1fr) auto;
  }
  .v30-social-shell:not(.v113-admin) .v61-header .v61-search-trigger { max-inline-size: 450px; }
  .v30-social-shell .main .social-feed:has(.social-feed-aside > *) {
    grid-template-columns: minmax(0, 680px) minmax(220px, 268px);
  }
  .social-feed-aside:has(> *) { display: grid; }
}

@media (max-width: 760px) {
  .v30-social-shell { --v61-header-height: 58px; --v290-inset: 12px; }
  .v30-social-shell:not(.v113-admin) .v61-header .v61-search-trigger {
    justify-self: end;
    padding-inline: 0;
    background: transparent;
  }
  .v30-social-shell:not(.v113-admin) .v61-header .brand .v30-brand-name { font-size: 1.12rem; }
  .v30-social-shell .v61-header .head-actions { gap: 1px; }
  .v30-social-shell:not(.v113-admin) .v61-header .v312-header-messages { display: none; }
  .v30-social-shell:not(.v113-admin) .v61-header .v312-new-topic { display: none; }
  .v30-social-shell:not(.v113-admin) .v61-header .v312-new-topic > span { display: none; }
  .v30-social-shell .v120-main-dock small { font-size: clamp(.64rem, 2.7vw, .72rem); }
  .v30-social-shell .social-feed .v280-feed-tabs > a { padding-inline: .36rem; }
  .v30-social-shell .social-feed .v280-feed-tools { margin-inline-start: auto; flex-basis: auto; }
  .social-composer > summary { padding-inline: 9px; gap: 8px; }
  .social-compose-label { padding-inline: 10px; }
}

@media (max-width: 430px) {
  .v30-social-shell .social-feed .v280-feed-filter > .v61-trigger { padding-inline: .3rem; }
  .v30-social-shell .social-feed .v280-feed-tools .v280-feed-filter > .v61-trigger > span { display: none; }
  .v30-social-shell .social-feed .v280-feed-tools { gap: 1px; }
}

@media (min-width: 1261px) {
  .v30-social-shell[data-route="thread"]:not(.v113-admin, [data-v160-reader]) .app-layout {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

.v30-social-shell .bottom-nav.v120-main-dock.v352-guest-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.v30-social-shell .social-feed .v280-feed-toolbar:has(> .v280-feed-tools:only-child) {
  padding: 0;
  border: 0;
  background: transparent;
}

.v30-social-shell .social-feed .v280-feed-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

@media (min-width: 761px) {
  .v30-social-shell[data-route="thread"][data-v160-reader]:not(.v113-admin) .v61-header .v312-menu-button {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v30-social-shell :is(.primary-btn, .secondary-btn, .icon-btn, .v61-trigger, .v61-nav-list > a) { transition: none; }
}
