:root {
  --bg: #121212;
  --surface: #1e1e1e;
  --surface-strong: #272727;
  --text: #f3f3f3;
  --muted: #c0c0c0;
  --accent: #8c78ff;
  --accent-soft: #4f46e5;
  --border: #333;
  --concept-preview-aspect-ratio: 16 / 6;
  --crop-box-default-width: 56%;
  --full-concept-dialog-width: min(1320px, calc(100% - 2rem));
  --full-concept-image-max-height: min(88vh, 1500px);
  --edit-concept-dialog-width: min(1180px, calc(100% - 2rem));
  --taxonomy-subgroup-columns: 5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #262136 0%, var(--bg) 45%);
}

body.upload-modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.environment-strip {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  text-align: center;
  padding: 0.26rem 0.75rem;
  background: linear-gradient(180deg, #ffcc4d 0%, #f59e0b 100%);
  color: #171717;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.site-header {
  padding: 1.25rem 1.5rem 1.5rem;
}

.extensions-launcher {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 82;
  display: grid;
  gap: 0.45rem;
}

.admin-view-launcher {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 82;
  display: grid;
}

.admin-hub-launcher {
  position: fixed;
  right: 1rem;
  top: 3.95rem;
  z-index: 82;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#extensions-toggle {
  width: auto;
  margin: 0;
  padding: 0.62rem 0.9rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#admin-view-toggle.admin-view-launcher {
  width: auto;
  margin: 0;
  padding: 0.62rem 0.9rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#admin-hub-link.admin-hub-launcher {
  width: auto;
  margin: 0;
  padding: 0.62rem 0.9rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.extensions-panel {
  width: min(220px, calc(100vw - 2rem));
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.5rem;
  display: grid;
  gap: 0.45rem;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.42);
}

.extension-download-button {
  width: 100%;
  margin: 0;
  justify-content: flex-start;
  padding: 0.7rem 0.78rem;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.extension-download-button:hover,
.extension-download-button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  filter: none;
}

.site-header-top {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.header-user-stack {
  display: grid;
  justify-items: end;
  gap: 0.6rem;
  margin-left: auto;
}

.header-secondary-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.profile-banner-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.header-trade-toggle {
  width: auto;
  margin-top: 0;
  padding: 0.8rem 1rem;
  white-space: nowrap;
}

.trade-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.18);
}

.site-header h1 {
  text-align: center;
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.environment-badge {
  display: inline-flex;
  margin-left: 0.55rem;
  vertical-align: middle;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.34em;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.55);
}

.site-header p {
  text-align: center;
  margin: 0;
  color: var(--muted);
}

.site-preview-showcase {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.35rem auto 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.site-preview-showcase img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.admin-search {
  width: min(360px, 100%);
  min-width: 260px;
  max-width: 360px;
  display: grid;
  gap: 0.45rem;
}

.admin-search-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.admin-search-row input,
.admin-search-row button {
  margin-top: 0;
}

.admin-search-row button {
  width: auto;
  min-width: 5rem;
}

.user-search {
  width: min(420px, 100%);
  min-width: 280px;
  max-width: 420px;
  display: grid;
  gap: 0.45rem;
}

.user-search-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.user-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.user-search-row input,
.user-search-row button {
  margin-top: 0;
}

.user-search-row button {
  width: auto;
  min-width: 5rem;
}

.user-search-results {
  max-height: 260px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,18,18,0.95);
  padding: 0.4rem;
  display: grid;
  gap: 0.35rem;
}

.user-search-result {
  width: 100%;
  margin: 0;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  text-align: left;
}

.user-search-result img {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
}

.user-search-result-title {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.user-search-result-meta {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.user-search-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.5rem;
}

.user-search-empty-error {
  color: #ffb2b2;
}

.content {
  width: min(var(--content-max-width, 1240px), calc(100% - 2rem));
  margin: 0 auto 3rem;
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.trade-view-title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--muted);
  letter-spacing: 0.02em;
  grid-column: 1 / -1;
}

.top-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  grid-column: 1 / -1;
}

.content:not(.trade-only-view) .top-panels {
  grid-template-columns: minmax(0, 1fr);
}

.upload-panel,
.library-switch-panel,
.filter-panel,
.concept-list,
.trade-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
}

.library-switch-panel {
  grid-column: 1 / -1;
}

.filter-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.library-switch-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 1.75rem;
  row-gap: 0.75rem;
}

.trade-panel {
  grid-column: 1;
  align-self: start;
}

.private-chat-panel.trade-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.admin-hub-panel {
  grid-column: 1;
}

.concept-list {
  grid-column: 1 / -1;
}

.content.trade-only-view .top-panels {
  grid-template-columns: 1fr;
}

.content.suppress-filter-panel .filter-panel {
  display: none !important;
}

.content.trade-only-view .trade-panel {
  grid-column: 1;
}

.suggestions-hub-panel {
  width: 100%;
}

.suggestions-hub-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem;
}

.suggestions-hub-sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1rem;
  align-self: start;
}

.suggestions-hub-sidebar h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.suggestions-hub-nav {
  display: grid;
  gap: 0.55rem;
}

.suggestions-hub-nav-button {
  margin: 0;
  justify-content: flex-start;
  text-align: left;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.suggestions-hub-nav-button.active {
  background: linear-gradient(135deg, rgba(140, 120, 255, 0.55), rgba(79, 70, 229, 0.55));
  border-color: rgba(167, 139, 250, 0.7);
}

.suggestions-hub-main {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1rem;
  min-height: 320px;
}

.suggestions-hub-pane h3 {
  margin: 0 0 0.65rem;
}

.suggestions-hub-pane p {
  margin: 0;
  color: var(--muted);
}

.suggestions-hub-suggest-form {
  display: grid;
  gap: 0.7rem;
}

.suggestions-hub-suggest-form input[type="text"] {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.suggestions-hub-suggest-form input[type="file"] {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.suggestions-hub-suggest-form textarea {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
}

.suggestions-hub-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.suggestions-hub-actions button {
  width: auto;
  margin: 0;
}

.suggestions-image-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.suggestions-image-tools .secondary-button {
  width: auto;
  margin: 0;
}

.suggestions-image-name {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.suggestions-inline-image-preview {
  width: fit-content;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.suggestions-inline-image-preview-image {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.suggestions-feed-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.7rem;
  max-width: 100%;
  min-width: 0;
}

.suggestions-feed-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.suggestions-feed-item-consideration {
  border-color: rgba(251, 191, 36, 0.42);
  background:
    linear-gradient(180deg, rgba(251, 191, 36, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.suggestions-stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: rgb(253, 230, 138);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.suggestions-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.suggestions-feed-message {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.suggestions-feed-title {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestions-feed-description {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.45;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.suggestions-feed-image-button {
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.suggestions-feed-image-button:hover,
.suggestions-feed-image-button:focus-visible {
  transform: scale(1.04);
  border-color: rgba(140, 120, 255, 0.45);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.suggestions-feed-image-preview {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.suggestions-feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.suggestions-feed-admin-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.suggestions-feed-admin-actions .secondary-button {
  width: auto;
  margin: 0;
}

.suggestions-feed-votes {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.suggestions-feed-vote-button {
  width: auto;
  margin: 0;
  padding: 0.46rem 0.75rem;
  border-radius: 999px;
}

.suggestions-feed-vote-button.active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.7), rgba(16, 185, 129, 0.7));
  border: 1px solid rgba(110, 231, 183, 0.8);
}

.suggestions-roadmap-list {
  margin-top: 0.75rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 380px);
  gap: 0.7rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.45rem;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.65) rgba(255, 255, 255, 0.08);
}

.suggestions-roadmap-list::-webkit-scrollbar {
  height: 10px;
}

.suggestions-roadmap-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.suggestions-roadmap-list::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.78), rgba(129, 140, 248, 0.78));
  border-radius: 999px;
}

.suggestions-roadmap-item {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem 0.95rem 0.95rem;
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
  overflow: hidden;
}

.suggestions-roadmap-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.suggestions-roadmap-card-head-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.suggestions-roadmap-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0.32rem;
  background: rgba(255, 255, 255, 0.14);
}

.suggestions-roadmap-item-production {
  border-color: rgba(96, 165, 250, 0.45);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12);
}

.suggestions-roadmap-item-production::before {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.98), rgba(59, 130, 246, 0.82));
}

.suggestions-roadmap-item-testing {
  border-color: rgba(250, 204, 21, 0.45);
  background:
    linear-gradient(180deg, rgba(250, 204, 21, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.12);
}

.suggestions-roadmap-item-testing::before {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.98), rgba(234, 179, 8, 0.82));
}

.suggestions-roadmap-item-waiting {
  border-color: rgba(74, 222, 128, 0.45);
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.12);
}

.suggestions-roadmap-item-waiting::before {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.98), rgba(34, 197, 94, 0.82));
}

.suggestions-roadmap-stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.suggestions-roadmap-stage-badge::before {
  content: '';
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  flex: 0 0 auto;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.suggestions-roadmap-stage-badge.production {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.45);
  color: rgb(191, 219, 254);
}

.suggestions-roadmap-stage-badge.testing {
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: rgb(254, 240, 138);
}

.suggestions-roadmap-stage-badge.waiting {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: rgb(187, 247, 208);
}

.suggestions-roadmap-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
  flex: 0 0 auto;
}

.suggestions-roadmap-stage-button {
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  margin: 0;
  padding: 0;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.suggestions-roadmap-stage-button:hover,
.suggestions-roadmap-stage-button:focus-visible {
  transform: translateY(-1px);
}

.suggestions-roadmap-stage-button.testing {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.92), rgba(234, 179, 8, 0.92));
}

.suggestions-roadmap-stage-button.waiting {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.92), rgba(34, 197, 94, 0.92));
}

.suggestions-roadmap-stage-button.production {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.92), rgba(59, 130, 246, 0.92));
}

.suggestions-roadmap-stage-button.active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.suggestions-roadmap-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.suggestions-roadmap-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.suggestions-roadmap-mini-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.26rem;
  margin-left: 0;
  flex: 1 1 100%;
  min-width: 0;
}

.suggestions-roadmap-mini-button {
  width: auto;
  min-width: 2rem;
  margin: 0;
  padding: 0.2rem 0.45rem;
  min-height: 1.3rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 700;
}

.suggestions-roadmap-mini-button-edit {
  background: rgba(255, 255, 255, 0.08);
}

.suggestions-roadmap-mini-button-remove {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.45);
  color: rgb(254, 202, 202);
}

.suggestions-roadmap-mini-button-remove:hover,
.suggestions-roadmap-mini-button-remove:focus-visible {
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(248, 113, 113, 0.28);
}

.suggestions-roadmap-mini-button-archive {
  background: rgba(167, 139, 250, 0.2);
  border-color: rgba(167, 139, 250, 0.45);
  color: rgb(233, 213, 255);
}

.suggestions-roadmap-mini-button-archive:hover,
.suggestions-roadmap-mini-button-archive:focus-visible {
  border-color: rgba(167, 139, 250, 0.62);
  background: rgba(167, 139, 250, 0.28);
}

.upload-panel h2,
.filter-panel h2,
.concept-list h2 {
  margin-top: 0;
}

.section-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
}

label {
  display: block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.concept-item-focused {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.28);
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
}

input,
select,
textarea {
  margin-top: 0.55rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}

.button,
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: white;
  margin-top: 0.5rem;
  border: none;
  border-radius: 14px;
  padding: 0.95rem 1.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.secondary-button {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.secondary-button:hover {
  filter: brightness(1.1);
}

#year-in-review-link.secondary-button {
  background: #0ea5a8;
  border: 1px solid #14b8a6;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

#year-in-review-link.secondary-button:hover,
#year-in-review-link.secondary-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 22px rgba(20, 184, 166, 0.34);
  animation: yir-button-nudge 260ms ease-out 1;
}

@keyframes yir-button-nudge {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #year-in-review-link.secondary-button:hover,
  #year-in-review-link.secondary-button:focus-visible {
    animation: none;
  }
}

.hidden {
  display: none !important;
}

.auth-panel {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
  padding: 1.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.auth-panel.auth-panel-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-panel h2 {
  margin-top: 0;
}

.auth-actions {
  margin-top: 1rem;
}

.auth-error {
  margin-top: 0.75rem;
  color: #f87171;
  font-weight: 600;
}

.user-bar {
  margin: 0;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: auto;
  margin-left: 0;
}

.notification-toggle {
  width: auto;
  margin-top: 0;
  margin-right: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
}

.user-avatar.clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar.clickable:hover,
.user-avatar.clickable:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.35);
}

.user-profile-summary {
  margin-bottom: 1rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  padding: 1rem;
  display: grid;
  gap: 0.95rem;
}

.user-profile-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  min-height: 180px;
}

.user-profile-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.user-profile-banner-avatar {
  position: absolute;
  left: 5.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 208px;
  height: 208px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.82);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  background: rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.user-profile-banner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-banner-change-button {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: auto;
  margin: 0;
  padding: 0.42rem 0.7rem;
  border-radius: 10px;
  font-size: 0.74rem;
  background: rgba(220, 38, 38, 0.92);
  border-color: rgba(248, 113, 113, 0.8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.user-profile-banner-change-button:hover,
.user-profile-banner-change-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.user-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 2.75rem;
}

.user-profile-header h2 {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  margin: 0;
  max-width: min(70vw, 540px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-header #user-profile-back {
  grid-column: 3;
  justify-self: end;
}

.user-profile-summary-head {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.user-profile-avatar-stack {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.user-profile-summary-head img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.82);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.user-profile-name-chip {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.98rem;
  font-weight: 600;
}

.user-profile-identity-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.user-profile-summary-meta {
  display: grid;
  gap: 0.45rem;
}

.user-profile-summary-meta strong {
  font-size: 1.2rem;
}

.user-profile-summary-meta span {
  color: var(--muted);
  font-size: 0.86rem;
}

.user-profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.user-profile-stat {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.2rem;
}

.user-profile-stat-label {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-profile-stat-value {
  font-size: 1.28rem;
  font-weight: 700;
  color: #dbeafe;
}

.user-profile-badges-wrap {
  margin-top: 0.35rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.42);
  padding: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

.user-profile-badges-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.user-profile-badges-head h3 {
  margin: 0;
  font-size: 0.96rem;
}

.user-profile-badges-head span {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.user-profile-badges-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.profile-badge-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.44);
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.profile-badge-chip::before,
.profile-badge-chip::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.profile-badge-chip::after {
  content: attr(data-badge-tooltip);
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  min-width: 120px;
  max-width: 220px;
  padding: 0.36rem 0.52rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(2, 6, 23, 0.97);
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.28;
  white-space: normal;
  z-index: 8;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
}

.profile-badge-chip::before {
  content: '';
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(2, 6, 23, 0.97);
  z-index: 8;
}

.profile-badge-chip:hover::before,
.profile-badge-chip:hover::after,
.profile-badge-chip:focus-visible::before,
.profile-badge-chip:focus-visible::after {
  opacity: 1;
}

.profile-badge-chip-toggle {
  width: auto;
  margin: 0;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.profile-badge-chip-toggle:hover,
.profile-badge-chip-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(191, 219, 254, 0.7);
}

.profile-badge-chip--visible {
  border-color: rgba(134, 239, 172, 0.85);
  background: rgba(22, 163, 74, 0.34);
  color: #dcfce7;
}

.profile-badge-chip--locked {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.38);
  color: #94a3b8;
}

.profile-badge-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-badge-item {
  display: none;
}

.profile-badge-head,
.profile-badge-name,
.profile-badge-category,
.profile-badge-description,
.profile-badge-metric,
.profile-badge-visibility-toggle,
.profile-badge-item-locked,
.profile-badge-item.hidden-from-public {
  display: none;
}

button.profile-badge-chip {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

button.profile-badge-chip:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.72);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .profile-badge-chip::after {
    left: 0;
    right: 0;
    transform: none;
    max-width: min(220px, 88vw);
  }

  .profile-badge-chip::before {
    left: 18px;
    transform: none;
  }
}

.profile-badges-open-button {
  width: auto;
  margin-top: 0;
  padding: 0.35rem 0.62rem;
  border-radius: 8px;
  font-size: 0.74rem;
}

.profile-badges-modal-section {
  display: grid;
  gap: 0.55rem;
}

.profile-badges-modal-section h3 {
  margin: 0;
  font-size: 0.9rem;
}

.user-info {
  display: grid;
  gap: 0.15rem;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #ffb86c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.owner-badge {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.38);
  color: #9bd0ff;
}

.logout-button {
  width: auto;
  padding: 0.8rem 1.2rem;
}

.danger-button {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.danger-button:hover {
  filter: brightness(1.08);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.panel-header h2 {
  margin-bottom: 0;
}

#toggle-upload-button {
  width: auto;
  margin-top: 0;
}

.upload-panel {
  margin: 1rem 0 0;
}

.upload-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.upload-panel h3 {
  margin: 0;
}

#clear-upload-form {
  width: auto;
  margin: 0;
}

.library-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  order: 1;
  flex: 1 1 auto;
}

.library-button {
  width: auto;
  margin-top: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}

.library-button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border-color: transparent;
}

.admin-search-note {
  margin: 0.35rem 0 0;
  color: #93c5fd;
  font-size: 0.85rem;
}

.global-search {
  width: 100%;
  display: grid;
  gap: 0.45rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.global-search-label {
  margin: 0;
}

.global-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.global-search-row input,
.global-search-row button {
  margin-top: 0;
}

.global-search-row button {
  width: auto;
  min-width: 5rem;
}

.global-search-note {
  margin: 0.35rem 0 0;
  color: #93c5fd;
  font-size: 0.85rem;
}

.library-view-user-search {
  margin-left: 0;
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  order: 3;
  flex: 1 1 100%;
}

.library-view-user-search.hidden {
  display: none;
}

.library-view-user-search .global-search-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.library-view-user-search .global-search-row input {
  width: 16rem;
}

.library-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0;
  margin-left: auto;
  order: 2;
  flex: 0 0 auto;
}

.library-admin-tools-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem 0.9rem;
  order: 3;
}

.library-admin-tools-row .library-view-user-search {
  order: 1;
  grid-column: 1;
  width: 100%;
  min-width: 0;
  justify-self: start;
  align-self: start;
}

.library-view-actions button {
  width: auto;
  margin-top: 0;
  align-self: center;
}

.library-share-action {
  order: 2;
  grid-column: 2;
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  justify-self: end;
  align-self: start;
  flex: 0 0 auto;
  width: auto;
  max-width: min(100%, 34rem);
}

.library-share-action.hidden {
  display: none;
}

.library-share-action .link-check-message {
  margin: 0;
  text-align: right;
  max-width: min(100%, 38rem);
  word-break: break-word;
}

#generate-share-link-button {
  margin-top: 0;
  padding: 0.95rem 1.2rem;
  font-size: inherit;
  line-height: inherit;
}

@media (max-width: 900px) {
  .library-admin-tools-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .library-share-action {
    width: 100%;
    justify-self: stretch;
    justify-items: end;
  }

  .library-share-action .link-check-message {
    max-width: 100%;
  }
}

.library-share-action .link-check-message a {
  color: #8fd3ff;
  text-decoration: underline;
}

.library-share-page {
  min-height: 100vh;
}

.library-share-content {
  width: min(1180px, calc(100vw - 2rem));
  margin: 1rem auto 2rem;
}

#shared-library-filter-panel .filter-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

#shared-library-filter-panel .shared-filter-status-field {
  max-width: 22rem;
}

#shared-library-filter-panel .shared-filter-tags-field {
  width: 100%;
}

#filter-panel-toggle {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  border-color: transparent;
}

#filter-panel-toggle:hover,
#filter-panel-toggle:focus-visible {
  filter: brightness(1.06);
}

.upload-panel-card {
  display: grid;
  gap: 1rem;
}

.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(1200px 560px at 50% 10%, rgba(76, 29, 149, 0.22), transparent 62%),
    rgba(2, 6, 23, 0.82);
}

.upload-modal.hidden {
  display: none;
}

.upload-modal-card {
  width: min(1320px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(19, 26, 45, 0.98) 0%, rgba(10, 17, 33, 0.98) 100%);
  padding: 1rem;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.58);
  contain: layout paint;
}

.upload-modal-card .upload-panel {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(10, 15, 29, 0.88) 100%);
  border-color: rgba(148, 163, 184, 0.28);
}

.upload-modal-header {
  align-items: center;
}

#close-upload-modal {
  width: auto;
  margin-top: 0;
}

.filter-panel-body {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.filter-panel-body.hidden {
  display: none;
}

.terms-copy {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.terms-list {
  margin-bottom: 1rem;
  display: grid;
  gap: 0.45rem;
  color: #c7d2fe;
}

.terms-list p {
  margin: 0;
}

.nudge-notification-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.nudge-notification-box h3 {
  margin: 0 0 0.65rem;
}

.nudge-notification-list {
  display: grid;
  gap: 0.65rem;
}

.nudge-item {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.nudge-item p {
  margin: 0.25rem 0;
}

.nudge-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nudge-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.adopt-concept-button {
  width: auto;
  margin-top: 0;
  background: rgba(72, 187, 120, 0.2);
  border: 1px solid rgba(72, 187, 120, 0.48);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
}

.user-moderation-link {
  width: auto;
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.user-moderation-link:hover {
  transform: none;
  filter: none;
  color: #bfdbfe;
}

#ban-reason {
  margin-top: 0.55rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  width: 100%;
  resize: vertical;
}

#nudge-message,
#trade-request-note {
  margin-top: 0.55rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  width: 100%;
  resize: vertical;
}

.trade-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.trade-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.trade-panel-header h2 {
  margin: 0;
}

.notification-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-hub-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.admin-hub-filters label {
  margin-bottom: 0;
}

.admin-hub-filter-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-hub-filter-actions button {
  width: auto;
  margin-top: 0;
}

.admin-hub-status {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.admin-hub-activity-list {
  display: grid;
  gap: 0.65rem;
}

.admin-hub-activity-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.admin-hub-activity-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.admin-hub-activity-action {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid rgba(140, 120, 255, 0.45);
  color: #d8ceff;
  background: rgba(140, 120, 255, 0.2);
  padding: 0.2rem 0.55rem;
}

.admin-hub-activity-time {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-hub-activity-summary {
  margin: 0;
}

.admin-hub-activity-actor {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-preview-note {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.admin-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.admin-preview-grid .button {
  margin-top: 0;
}

#past-trades-toggle {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.trade-notification-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #dbeafe;
  display: grid;
  gap: 0.35rem;
}

.trade-notification-item {
  margin: 0;
  font-size: 0.92rem;
}

.notification-list {
  display: grid;
  gap: 0.65rem;
}

.notification-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 0.45rem;
}

.notification-item.warning {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.22);
}

.notification-item.read {
  opacity: 0.9;
}

.notification-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.notification-item-title {
  font-weight: 600;
}

.notification-item-time {
  font-size: 0.78rem;
  color: var(--muted);
}

.notification-item-message {
  margin: 0;
  color: #dbeafe;
}

.notification-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notification-item-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.notification-item-actions .notification-dismiss {
  border-color: rgba(244, 114, 182, 0.45);
  color: #f9a8d4;
}

.trade-columns h3 {
  margin-top: 0;
}

.trade-list {
  display: grid;
  gap: 0.65rem;
}

.tag-suggestions {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-taxonomy {
  margin-top: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(23, 30, 48, 0.38) 0%, rgba(17, 24, 39, 0.3) 100%);
  display: grid;
  gap: 0.8rem;
}

.tag-taxonomy-level {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag-taxonomy-main-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

#upload-tag-taxonomy-main,
#edit-tag-taxonomy-main,
#filter-tag-taxonomy-main,
#shared-filter-tag-taxonomy-main {
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.24) 0%, rgba(30, 64, 175, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.24);
}

#filter-tag-taxonomy-main,
#shared-filter-tag-taxonomy-main {
  flex: 1 1 auto;
  min-width: 0;
}

.taxonomy-layout-control {
  flex: 1 1 auto;
  margin-left: 0;
  white-space: nowrap;
  align-self: center;
}

.taxonomy-layout-control-card {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.24) 0%, rgba(30, 64, 175, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.22);
}

.taxonomy-layout-control select {
  min-width: 4.2rem;
}

#upload-tag-taxonomy-sub,
#edit-tag-taxonomy-sub,
#filter-tag-taxonomy-sub,
#shared-filter-tag-taxonomy-sub {
  display: none;
}

#upload-tag-taxonomy-mini,
#edit-tag-taxonomy-mini,
#filter-tag-taxonomy-mini,
#shared-filter-tag-taxonomy-mini {
  display: grid;
  grid-template-columns: repeat(var(--taxonomy-subgroup-columns, 5), minmax(0, 1fr));
  gap: 0.9rem;
}

#upload-tag-taxonomy-mini .tag-taxonomy-subgroup,
#edit-tag-taxonomy-mini .tag-taxonomy-subgroup {
  content-visibility: auto;
  contain-intrinsic-size: 245px;
}

@media (max-width: 1280px) {
  #upload-tag-taxonomy-mini,
  #edit-tag-taxonomy-mini,
  #filter-tag-taxonomy-mini,
  #shared-filter-tag-taxonomy-mini {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tag-taxonomy-main-row {
    flex-wrap: wrap;
  }

  .taxonomy-layout-control-card {
    margin-left: 0;
  }

  .taxonomy-layout-control {
    align-self: flex-start;
  }
}

@media (max-width: 1024px) {
  #upload-tag-taxonomy-mini,
  #edit-tag-taxonomy-mini,
  #filter-tag-taxonomy-mini,
  #shared-filter-tag-taxonomy-mini {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #upload-tag-taxonomy-mini,
  #edit-tag-taxonomy-mini,
  #filter-tag-taxonomy-mini,
  #shared-filter-tag-taxonomy-mini {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #upload-tag-taxonomy-mini,
  #edit-tag-taxonomy-mini,
  #filter-tag-taxonomy-mini,
  #shared-filter-tag-taxonomy-mini {
    grid-template-columns: 1fr;
  }
}

.tag-taxonomy-subgroup {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.84rem;
  background: rgba(17, 23, 35, 0.96);
  background-clip: padding-box;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  min-height: 15.2rem;
  min-width: 0;
  contain: layout paint style;
  isolation: isolate;
}

.tag-taxonomy-subgroup-title {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: #bfdbfe;
  font-weight: 750;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
  padding: 0.3rem 0.48rem 0.38rem;
  border-radius: 0.52rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.42);
  border-left: 2px solid rgba(56, 189, 248, 0.65);
  background: rgba(14, 197, 109, 0.34);
}

.tag-taxonomy-mini-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.42rem;
  min-width: 0;
  isolation: isolate;
}

.tag-taxonomy-search-empty {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.tag-taxonomy-chip {
  width: auto;
  margin-top: 0;
  padding: 0.38rem 0.66rem;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.42);
  background: rgba(30, 64, 175, 0.22);
  color: #dbeafe;
  font-size: 0.8rem;
  line-height: 1;
  transition: none;
  transform: none;
  filter: none;
  will-change: auto;
  backface-visibility: hidden;
}

.tag-taxonomy-chip.main {
  padding: 0.7rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.tag-taxonomy-chip:hover {
  transform: none;
  filter: none;
  border-color: rgba(167, 139, 250, 0.6);
  background: rgba(88, 28, 135, 0.28);
  box-shadow: none;
}

.tag-taxonomy-chip:focus-visible {
  transform: none;
  filter: none;
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(88, 28, 135, 0.32);
  box-shadow: none;
  outline: 1px solid rgba(167, 139, 250, 0.42);
  outline-offset: 1px;
}

.tag-taxonomy-chip:active {
  transform: none;
  filter: none;
  box-shadow: none;
}

.tag-taxonomy-chip.active {
  border-color: rgba(59, 130, 246, 0.78);
  background: rgba(59, 130, 246, 0.34);
}

.tag-taxonomy-chip.sub {
  border-color: rgba(186, 230, 253, 0.34);
  background: rgba(14, 116, 144, 0.18);
  color: #dbeafe;
  padding: 0.52rem 0.94rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.tag-taxonomy-chip.mini {
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(76, 29, 149, 0.18);
  color: #f3e8ff;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-width: 0;
  padding: 0.4rem 0.76rem;
  font-size: 0.76rem;
  line-height: 1.22;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-taxonomy-chip.mini:hover,
.tag-taxonomy-chip.mini:focus-visible,
.tag-taxonomy-chip.mini:active {
  transform: none;
  filter: none;
  box-shadow: none;
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(76, 29, 149, 0.18);
  color: #f3e8ff;
  outline: none;
}

.tag-taxonomy-chip.mini.selected {
  border-color: rgba(74, 222, 128, 0.7);
  background: rgba(34, 197, 94, 0.25);
  color: #dcfce7;
}

.selected-tag-bubbles {
  margin-top: 0.4rem;
  min-height: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.selected-tag-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: auto;
  margin-top: 0;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #dbeafe;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.selected-tag-bubble:hover {
  filter: brightness(1.08);
}

.tag-create-row {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.tag-create-row input,
.tag-create-row button {
  margin-top: 0;
}

.tag-create-row button {
  width: auto;
  min-width: 6.5rem;
}

.tag-suggestion-chip {
  width: auto;
  margin-top: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(140, 120, 255, 0.16);
  border: 1px solid rgba(140, 120, 255, 0.35);
  color: #e7e2ff;
  font-size: 0.82rem;
}

.tag-suggestions-visibility-row {
  margin-top: 0.55rem;
}

.tag-suggestions-visibility-row .concept-density-control {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 0.8rem;
}

.tag-suggestions-visibility-row .concept-density-control select {
  min-width: 4.8rem;
}

.content-safety-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.55rem 0 1rem;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  font-size: 0.85rem;
  color: var(--text);
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.trade-item {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(255,255,255,0.03);
}

.trade-item p {
  margin: 0;
  font-size: 0.9rem;
}

.trade-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.trade-status-pending {
  background: rgba(234, 179, 8, 0.2);
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.5);
}

.trade-status-accepted {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.5);
}

.trade-status-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.5);
}

.trade-status-unknown {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.5);
}

.trade-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.trade-preview-card {
  display: grid;
  gap: 0.3rem;
}

.trade-preview-image {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.trade-preview-image-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
}

.trade-preview-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.trade-preview-arrow {
  color: var(--muted);
  font-size: 1.15rem;
}

.trade-actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trade-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.trade-request-layout {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.trade-request-side {
  display: grid;
  gap: 0.55rem;
}

.trade-request-side h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trade-request-preview-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  min-height: 150px;
  padding: 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.trade-request-preview-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.trade-request-preview-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.trade-request-preview-empty {
  min-height: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.2);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.6rem;
}

.trade-request-arrows {
  font-size: 2.00rem;
  color: var(--muted);
  line-height: 1;
}

.edit-dialog.trade-request-dialog,
.edit-dialog.trade-dialog {
  height: min(1040px, calc(100% - 2rem));
  width: min(1040px, calc(100% - 2rem));
}

.trade-request-dialog .edit-form,
.trade-dialog .edit-form {
  max-width: none;
  width: 100%;
}

.trade-offer-search-wrap {
  margin-top: 0.9rem;
  position: relative;
}

.trade-offer-search-wrap label {
  margin-bottom: 0.4rem;
}

.trade-offer-search-wrap input {
  margin-top: 0;
}

.trade-offer-search-results {
  margin-top: 0.45rem;
  max-height: 260px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,18,18,0.95);
  padding: 0.4rem;
  display: grid;
  gap: 0.35rem;
}

.trade-offer-search-item {
  width: 100%;
  margin: 0;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  text-align: left;
}

.trade-offer-search-item img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
}

.trade-offer-search-item span {
  color: var(--text);
  font-size: 0.9rem;
}

.trade-offer-search-empty {
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes tradeArrowPulse {
  0% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 0.75; }
}

.trade-request-arrows-animated {
  animation: tradeArrowPulse 1.4s ease-in-out infinite;
}

.link-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.55rem;
}

.link-check-row input,
.link-check-row button {
  margin-top: 0;
}

.link-check-row button {
  width: auto;
  min-width: 8.5rem;
}

.link-check-message {
  display: block;
  min-height: 1.35rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.link-check-message.success {
  color: #82f2a4;
}

.link-check-message.error {
  color: #fca5a5;
}

.image-preview {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.45rem;
}

.image-preview span {
  color: var(--muted);
  font-size: 0.85rem;
}

.image-preview img {
  width: min(320px, 100%);
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}


.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(var(--concept-columns, 2), minmax(0, 1fr));
}

.concept-load-more-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 0.35rem 0 0.1rem;
}

.concept-load-more-button {
  width: auto;
  margin-top: 0;
  padding: 0.58rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
}

.concept-page-controls-wrap {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.15rem 0 0.25rem;
}

.concept-page-control-button {
  width: auto;
  margin-top: 0;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
}

.concept-page-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 233, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.collaboration-space-card {
  background: rgba(15, 20, 29, 0.92);
  border: 1px solid rgba(136, 168, 201, 0.24);
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
  box-shadow: 0 14px 38px rgba(3, 8, 16, 0.18);
}

#collaboration-spaces-grid {
  grid-template-columns: minmax(0, 1fr);
}

.collaboration-space-card.active {
  border-color: rgba(142, 195, 255, 0.62);
  box-shadow: 0 18px 44px rgba(12, 26, 48, 0.28);
}

.collaboration-space-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.collaboration-space-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.collaboration-space-card-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.52rem 0.9rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

.collaboration-space-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.collaboration-space-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.collaboration-space-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.collaboration-space-feed-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(11, 16, 24, 0.82);
  border: 1px solid rgba(136, 168, 201, 0.18);
}

.collaboration-space-invite-form {
  display: grid;
  gap: 0.55rem;
  min-width: min(320px, 100%);
}

.collaboration-space-invite-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.collaboration-space-invite-form input {
  width: 100%;
}

.collaboration-space-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(136, 168, 201, 0.18);
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  color: var(--text);
  font-size: 0.84rem;
}

.collaboration-space-member-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.14);
  flex: 0 0 auto;
}

.collaborative-invite-dialog {
  width: min(680px, calc(100% - 2rem));
  border: 1px solid rgba(136, 168, 201, 0.28);
  background:
    radial-gradient(circle at 8% -20%, rgba(142, 195, 255, 0.2), transparent 48%),
    linear-gradient(180deg, rgba(12, 16, 24, 0.98), rgba(8, 12, 19, 0.96));
}

.collaborative-invite-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.collaborative-invite-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.collaborative-invite-search-row input,
.collaborative-invite-search-row button {
  margin-top: 0;
}

.collaborative-invite-selected-list {
  margin-top: 0.55rem;
  min-height: 3rem;
  max-height: 180px;
  overflow: auto;
  border: 1px solid rgba(136, 168, 201, 0.2);
  border-radius: 12px;
  background: rgba(8, 12, 18, 0.82);
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.collaborative-invite-selected-list:empty::before {
  content: 'No users selected yet. Click results to add them.';
  color: var(--muted);
  font-size: 0.84rem;
}

.collaborative-invite-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(136, 168, 201, 0.28);
  border-radius: 999px;
  background: rgba(142, 195, 255, 0.12);
  color: var(--text);
  padding: 0.28rem 0.35rem 0.28rem 0.65rem;
  font-size: 0.84rem;
}

.collaborative-invite-chip button {
  width: auto;
  margin: 0;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.collaboration-space-empty-state {
  grid-column: 1 / -1;
}

.collaboration-space-create-form {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(136, 168, 201, 0.2);
  border-radius: 18px;
  background: rgba(12, 16, 24, 0.74);
}

.collaboration-space-create-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.collaboration-space-helper {
  margin: -0.25rem 0 0.1rem;
  color: rgba(216, 226, 239, 0.82);
  font-size: 0.92rem;
}

#collaboration-create-toggle-button {
  width: auto;
  margin-top: 0;
  padding: 0.38rem 0.78rem;
  border-radius: 10px;
  flex: 0 0 auto;
}

#collaboration-space-status {
  margin: 0.2rem 0 0.9rem;
  min-height: 1.35em;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(136, 168, 201, 0.16);
  background: rgba(9, 12, 18, 0.72);
  color: #d8e2ef;
}

#collaboration-space-status[data-tone="success"] {
  color: #9ef0c2;
  border-color: rgba(91, 210, 147, 0.35);
  background: rgba(15, 34, 24, 0.82);
}

#collaboration-space-status[data-tone="error"] {
  color: #ffb0b0;
  border-color: rgba(240, 107, 107, 0.38);
  background: rgba(40, 17, 20, 0.82);
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.view-header .trade-view-title {
  margin: 0;
}

.concept-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.concept-list-header h2 {
  margin: 0;
}

.concept-title-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.concepts-organized-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.concept-list-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.concept-density-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.concept-density-control select {
  margin-top: 0;
  width: auto;
  min-width: 5rem;
  padding: 0.45rem 0.6rem;
}

.concept-item {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}

.concept-item img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--concept-preview-aspect-ratio);
  object-fit: cover;
  border-radius: 14px;
}

.shared-concept-body {
  display: grid;
  gap: 0.7rem;
}

.shared-concept-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shared-concept-tag {
  cursor: default;
  margin-top: 0;
}

.shared-concept-empty-tags,
.shared-concept-meta-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.shared-concept-meta-line strong {
  color: #e5eefb;
}

.shared-concept-meta-line a {
  color: #bfe0ff;
  word-break: break-word;
}

.shared-concept-meta-line a:hover,
.shared-concept-meta-line a:focus-visible {
  color: #e0f2fe;
}

.library-share-page .concept-list-controls {
  justify-content: flex-end;
}

.library-share-page .concept-density-control {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .library-share-page .concept-list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .library-share-page .concept-list-controls {
    width: 100%;
    justify-content: space-between;
  }

  .library-share-page .concept-density-control {
    width: 100%;
    justify-content: space-between;
  }
}

.concept-item-restricted {
  grid-template-rows: auto auto;
  gap: 0.55rem;
}

.concept-preview-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.concept-image-button {
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  aspect-ratio: var(--concept-preview-aspect-ratio);
  background: transparent;
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

.concept-image-button:hover {
  transform: none;
  filter: none;
}

.concept-image-button img {
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease;
}

.concept-image-button.concept-image-button-blurred {
  position: relative;
}

.concept-image-button.concept-image-button-blurred img,
.concept-image-sensitive {
  filter: blur(10px) saturate(0.8) brightness(0.8);
}

.sensitive-preview-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75));
  color: #fff;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
}

.concept-image-button:hover img {
  transform: scale(1.02);
}

.concept-item header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.concept-title-group {
  display: grid;
  gap: 0.55rem;
}

.concept-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-pill {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-free {
  background: rgba(72, 187, 120, 0.18);
  color: #82f2a4;
}

.status-in-progress {
  background: rgba(249, 115, 22, 0.18);
  color: #ffb86c;
}

.status-complete {
  background: rgba(72, 187, 120, 0.18);
  color: #82f2a4;
}

.scope-pill {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.14);
}

.scope-pill-global {
  background: rgba(140, 120, 255, 0.16);
  color: #c3b8ff;
}

.scope-pill-private {
  background: rgba(255,255,255,0.08);
  color: #e7e7e7;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.concept-link {
  color: #c3b8ff;
  text-decoration: none;
  word-break: break-all;
}

.concept-link:hover {
  text-decoration: underline;
}

.concept-link-reveal-wrap {
  display: grid;
  gap: 0.45rem;
}

.concept-link-reveal-button {
  width: auto;
  justify-self: start;
  margin: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.25;
}

.concept-link-reveal-button-in-progress {
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #ffb86c;
}

.concept-link-reveal-button-in-progress:hover,
.concept-link-reveal-button-in-progress:focus-visible {
  background: rgba(249, 115, 22, 0.28);
}

.concept-link-reveal-button-complete {
  background: rgba(72, 187, 120, 0.18);
  border: 1px solid rgba(72, 187, 120, 0.4);
  color: #82f2a4;
}

.concept-link-reveal-button-complete:hover,
.concept-link-reveal-button-complete:focus-visible {
  background: rgba(72, 187, 120, 0.28);
}

.concept-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.concept-interest-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.concept-interest-control input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
}

.concept-interest-control span {
  color: var(--muted);
}

.edit-concept-button {
  width: auto;
  margin-top: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
}

.trade-concept-button {
  width: auto;
  margin-top: 0;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.45);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
}

.concept-trade-review-button {
  width: auto;
  margin-top: 0;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.45);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.nudge-concept-button {
  width: auto;
  margin-top: 0;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
}

.message-concept-button {
  width: auto;
  margin-top: 0;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
}

.global-chat-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(380px, calc(100% - 2rem));
  min-width: 280px;
  max-width: min(640px, calc(100% - 2rem));
  height: 360px;
  min-height: 240px;
  max-height: min(80vh, calc(100% - 2rem));
  resize: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.5rem;
  background: rgba(24, 24, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 0.75rem;
  z-index: 70;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.global-chat-resize-handle {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background:
    linear-gradient(135deg, transparent 52%, rgba(255, 255, 255, 0.6) 52%, rgba(255, 255, 255, 0.6) 58%, transparent 58%),
    linear-gradient(135deg, transparent 67%, rgba(255, 255, 255, 0.5) 67%, rgba(255, 255, 255, 0.5) 73%, transparent 73%),
    rgba(255, 255, 255, 0.08);
  cursor: nwse-resize;
  z-index: 2;
}

.global-chat-resize-handle:hover {
  transform: none;
  filter: none;
  background-color: rgba(255, 255, 255, 0.14);
}

.global-chat-panel.is-resizing {
  user-select: none;
}

.global-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.global-chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.global-chat-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

#global-chat-cooldown-note {
  font-size: 0.75rem;
  color: var(--muted);
}

.global-chat-minimize-button {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.global-chat-minimized-bubble {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: auto;
  margin: 0;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  z-index: 71;
  background: rgba(24, 24, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.patch-notes-panel {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  width: min(380px, calc(100% - 2rem));
  min-width: 280px;
  max-width: min(640px, calc(100% - 2rem));
  height: 360px;
  min-height: 360px;
  max-height: min(80vh, calc(100% - 2rem));
  resize: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.6rem;
  background: rgba(24, 24, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 0.75rem;
  z-index: 70;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.patch-notes-resize-handle {
  appearance: none;
  justify-self: center;
  width: 72px;
  height: 8px;
  margin: -0.05rem auto 0.1rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: ns-resize;
  touch-action: none;
}

.patch-notes-resize-handle:hover {
  transform: none;
  filter: none;
  background: rgba(255, 255, 255, 0.2);
}

.patch-notes-panel.is-resizing {
  user-select: none;
}

.patch-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.patch-notes-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.patch-notes-minimize-button {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.patch-notes-content {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
}

.patch-notes-content h4 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
}

.patch-notes-content ul {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.patch-notes-lines {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.patch-notes-line {
  margin: 0;
  line-height: 1.35;
}

.patch-notes-line-section {
  margin-top: 0.35rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.patch-notes-line-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.patch-notes-line-main {
  border-left: 3px solid rgba(110, 231, 183, 0.9);
  padding-left: 0.5rem;
  color: #d1fae5;
  font-weight: 700;
}

.patch-notes-line-important {
  border-left: 3px solid rgba(251, 191, 36, 0.95);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
}

.patch-notes-minimized-bubble {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  width: auto;
  margin: 0;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  z-index: 71;
  background: rgba(24, 24, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.patch-notes-version-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #dbeafe;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.patch-notes-notification-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28);
  animation: patchNotesDotPulse 1.35s ease-in-out infinite;
}

@keyframes patchNotesDotPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
  }
  70% {
    transform: scale(1.18);
    box-shadow: 0 0 0 0.34rem rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .patch-notes-notification-dot {
    animation: none;
  }
}

.global-chat-messages {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.55rem;
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 0;
  justify-items: start;
  align-content: start;
}

.global-chat-message {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  width: min(100%, 280px);
  min-width: 0;
  max-width: 280px;
  box-sizing: border-box;
  justify-self: start;
  margin-top: 0;
}

.global-chat-message.mine {
  border-color: rgba(140, 120, 255, 0.45);
  background: rgba(140, 120, 255, 0.15);
  justify-self: end;
}

.global-chat-message.chat-message-new-sender {
  margin-top: 0.35rem;
}

.global-chat-message:first-child {
  margin-top: 0;
}

.global-chat-message p {
  margin: 0.3rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.global-chat-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.global-chat-user-button {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.78rem;
  font-weight: 700;
}

.global-chat-user-button:hover {
  transform: none;
  filter: none;
  color: #bfdbfe;
}

.global-chat-form {
  display: grid;
  gap: 0.5rem;
}

.global-chat-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

#global-chat-input,
#private-chat-input,
#chat-report-reason,
#chat-mute-reason {
  margin-top: 0;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  width: 100%;
}

#global-chat-input,
#private-chat-input {
  min-height: 74px;
  resize: none;
}

#chat-report-reason,
#chat-mute-reason {
  resize: vertical;
}

.chat-compose-resize {
  position: relative;
}

.chat-compose-input {
  padding-top: 1.05rem;
}

#private-chat-input.chat-compose-input {
  padding-top: 0.7rem;
  padding-bottom: 1.15rem;
}

.chat-compose-resize-handle {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background:
    linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.58) 50%, rgba(255, 255, 255, 0.58) 58%, transparent 58%),
    rgba(255, 255, 255, 0.08);
  cursor: ns-resize;
  z-index: 2;
}

.chat-compose-resize-handle:hover {
  transform: none;
  filter: none;
  background-color: rgba(255, 255, 255, 0.14);
}

#private-chat-input-resize-handle {
  top: auto;
  bottom: 0.35rem;
  left: 0.35rem;
}

.chat-compose-input.is-resizing {
  user-select: none;
}

.global-chat-actions {
  display: flex;
  justify-content: flex-end;
}

.global-chat-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
}

.private-chat-dialog {
  width: min(1050px, calc(100% - 2rem));
  height: min(760px, calc(100% - 2rem));
}

.private-chat-layout {
  display: grid;
  grid-template-columns: clamp(240px, 28vw, 320px) minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
}

.private-chat-sidebar {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.7rem;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.45rem;
  overflow: visible;
}

.private-chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.private-chat-sidebar-header h2 {
  margin: 0;
  font-size: 1rem;
}

.private-chat-sidebar-header button {
  width: auto;
  margin-top: 0;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
}

.private-chat-thread-list {
  overflow: visible;
  display: grid;
  gap: 0.22rem;
}

.private-chat-thread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.22rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
}

.private-chat-thread.active {
  background: transparent;
}

.private-chat-thread-open {
  margin: 0;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.34rem 0.48rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  display: grid;
  gap: 0.12rem;
}

.private-chat-thread-open strong {
  font-size: 0.85rem;
}

.private-chat-thread-open span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.private-chat-thread.active .private-chat-thread-open {
  border-color: rgba(140, 120, 255, 0.65);
  background: rgba(140, 120, 255, 0.14);
}

.private-chat-thread-close {
  width: auto;
  margin-top: 0;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.private-chat-main {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 0.52rem;
  min-height: min(72vh, 700px);
  min-width: 420px;
  max-width: 100%;
  justify-self: stretch;
  overflow: hidden;
  resize: horizontal;
}

.private-chat-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.private-chat-main-header h3 {
  margin: 0;
}

.private-chat-main-header button {
  width: auto;
  margin-top: 0;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
}

.private-chat-messages {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.7rem;
  display: grid;
  gap: 0;
  background: rgba(0, 0, 0, 0.2);
  justify-items: start;
  align-content: start;
  min-height: 0;
}

.private-chat-message {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  width: min(100%, 280px);
  min-width: 0;
  max-width: 280px;
  box-sizing: border-box;
  justify-self: start;
  margin-top: 0;
}

.private-chat-message.chat-message-new-sender {
  margin-top: 0.35rem;
}

.private-chat-message:first-child {
  margin-top: 0;
}

.private-chat-message.mine {
  border-color: rgba(140, 120, 255, 0.45);
  background: rgba(140, 120, 255, 0.15);
  justify-self: end;
}

.private-chat-message p {
  margin: 0.3rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.image-drop-zone {
  position: relative;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  min-height: 180px;
  overflow: hidden;
}

.image-drop-zone.has-image {
  min-height: 0;
  background: rgba(0, 0, 0, 0.22);
}

#concept-image-drop-zone {
  margin-bottom: 0.8rem;
}

.image-drop-zone-label {
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
}

.image-drop-zone-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.image-drop-zone-title {
  color: var(--text);
  font-weight: 600;
}

.image-crop-mini-preview {
  display: inline-grid;
  gap: 0.2rem;
  justify-items: end;
}

.image-crop-mini-preview-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
}

.image-crop-mini-preview-frame {
  width: 96px;
  aspect-ratio: var(--concept-preview-aspect-ratio);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.image-crop-mini-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-drop-zone-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.image-drop-zone-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.image-drop-zone-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.image-file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-drop-zone.drag-active {
  border-color: rgba(59, 130, 246, 0.7);
  background: rgba(59, 130, 246, 0.12);
}

.drop-zone-hint {
  display: block;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.image-drop-preview-wrap {
  position: absolute;
  inset: 0;
}

.image-drop-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-crop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.image-crop-window {
  position: absolute;
  width: min(var(--crop-box-default-width), 16rem);
  aspect-ratio: var(--concept-preview-aspect-ratio);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.34),
    0 8px 28px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.03);
  pointer-events: auto;
  cursor: grab;
}

.image-crop-window::after {
  content: 'Drag preview frame';
  position: absolute;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.image-crop-window.is-dragging {
  cursor: grabbing;
}

.image-crop-handle {
  display: none;
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.image-crop-handle-nw {
  cursor: nwse-resize;
}

.image-crop-handle-ne {
  cursor: nesw-resize;
}

.image-crop-handle-sw {
  cursor: nesw-resize;
}

.image-crop-handle-se {
  cursor: nwse-resize;
}

.upload-tags-label {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
}

.multi-value-list {
  display: grid;
  gap: 0.55rem;
}

.multi-value-input {
  margin-top: 0.55rem;
}

.multi-value-add {
  width: auto;
  min-width: 2rem;
  margin-top: 0.45rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1.2;
}

.chat-user-action-buttons {
  display: grid;
  gap: 0.55rem;
}

.chat-user-action-buttons button {
  margin-top: 0;
}

.concept-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--muted);
}

.concept-admin-hash {
  margin-top: 0.45rem;
  font-size: 0.76rem;
  color: #9fb0c9;
  word-break: break-all;
  user-select: text;
}

.edit-dialog {
  width: min(560px, calc(100% - 2rem));
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0;
}

#edit-concept-dialog {
  width: var(--edit-concept-dialog-width);
}

#nudge-dialog {
  width: min(1120px, calc(100% - 2rem));
}

.edit-dialog::backdrop {
  background: rgba(0,0,0,0.65);
}

.edit-form {
  padding: 1.5rem;
}

.edit-form h2 {
  margin-top: 0;
}

#suggest-change-input {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  min-height: 6.5rem;
}

#suggest-change-status {
  margin: 0.4rem 0 0;
  min-height: 1.2rem;
}

.edit-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
}

.edit-actions button {
  width: auto;
}

.import-destination-dialog {
  width: min(640px, calc(100% - 2rem));
}

.import-destination-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.import-destination-header h2 {
  margin: 0;
}

#import-destination-cancel {
  width: auto;
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}

.import-destination-options {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0.75rem;
}

#import-destination-always-indicator {
  margin: 0.35rem 0 0;
}

.import-destination-option {
  width: 100%;
  margin: 0;
  text-align: left;
  justify-content: flex-start;
  display: grid;
  gap: 0.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}

.import-destination-option.recommended {
  border-color: rgba(56, 189, 248, 0.8);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.3), rgba(14, 116, 144, 0.22));
}

.import-destination-option.selected {
  border-color: rgba(167, 139, 250, 0.9);
  background: linear-gradient(135deg, rgba(140, 120, 255, 0.52), rgba(79, 70, 229, 0.48));
}

.import-destination-option-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.import-destination-option-meta {
  color: #cbd5e1;
  font-size: 0.8rem;
}

.import-destination-option.recommended .import-destination-option-meta {
  color: #b7f2ff;
}

.import-destination-actions {
  justify-content: space-between;
}

#import-destination-always.active {
  border-color: rgba(167, 139, 250, 0.9);
  background: linear-gradient(135deg, rgba(140, 120, 255, 0.52), rgba(79, 70, 229, 0.48));
  color: #fff;
}

.concept-image-dialog {
  width: var(--full-concept-dialog-width);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0;
}

.concept-image-dialog::backdrop {
  background: rgba(0,0,0,0.75);
}

.concept-image-dialog-content {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.concept-image-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.concept-image-dialog-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

#concept-image-dialog-close {
  width: auto;
  margin-top: 0;
}

#concept-image-dialog-preview {
  width: 100%;
  max-height: var(--full-concept-image-max-height);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.2);
}

@media (max-width: 720px) {
  .extensions-launcher {
    left: 0.5rem;
    top: 0.5rem;
  }

  .admin-view-launcher {
    right: 0.75rem;
    top: 0.75rem;
  }

  .admin-hub-launcher {
    right: 0.75rem;
    top: 3.7rem;
  }

  .extensions-panel {
    width: min(220px, calc(100vw - 1rem));
  }

  .site-header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .site-preview-showcase {
    width: 100%;
    margin-top: 1rem;
    border-radius: 18px;
  }

  .header-user-stack {
    justify-items: stretch;
    margin-left: 0;
  }

  .profile-banner-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0 0 1rem;
  }

  .header-trade-toggle {
    width: 100%;
  }

  .admin-search {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .user-search {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .user-profile-summary-head {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .user-profile-banner-avatar {
    left: 1.2rem;
    width: 144px;
    height: 144px;
    border-radius: 14px;
  }

  .user-profile-summary-head img {
    width: 96px;
    height: 96px;
  }

  .user-profile-avatar-stack {
    margin-top: -2.35rem;
  }

  .user-profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .user-profile-header h2 {
    max-width: min(80vw, 640px);
  }

  .link-check-row {
    grid-template-columns: 1fr;
  }

  .tag-create-row button {
    width: 100%;
  }

  .link-check-row button {
    width: 100%;
  }

  .user-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .concept-list-header {
    flex-direction: column;
    align-items: stretch;
  }

  .concept-title-line {
    flex-wrap: wrap;
    row-gap: 0.2rem;
  }

  .concept-list-controls {
    display: grid;
    gap: 0.55rem;
  }

  .concept-density-control {
    justify-content: space-between;
  }

  .trade-columns {
    grid-template-columns: 1fr;
  }

  .trade-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .notification-header-actions {
    width: 100%;
  }

  .notification-header-actions button {
    flex: 1 1 0;
  }

  .suggestions-hub-layout {
    grid-template-columns: 1fr;
  }

  .suggestions-hub-main {
    min-height: 0;
  }

  .admin-hub-filters {
    grid-template-columns: 1fr;
  }

  .admin-hub-filter-actions {
    width: 100%;
  }

  .admin-hub-filter-actions button {
    width: 100%;
  }

  .admin-preview-grid {
    grid-template-columns: 1fr;
  }

  #past-trades-toggle {
    width: 100%;
  }

  .trade-preview-row {
    grid-template-columns: 1fr;
  }

  .trade-preview-arrow {
    display: none;
  }

  .trade-request-layout {
    grid-template-columns: 1fr;
  }

  .global-chat-panel {
    width: calc(100% - 1rem);
    right: 0.5rem;
    bottom: 0.5rem;
    max-height: 55vh;
  }

  .patch-notes-panel {
    width: calc(100% - 1rem);
    left: 0.5rem;
    bottom: 0.5rem;
    min-height: 300px;
    max-height: 55vh;
    resize: none;
  }

  .patch-notes-resize-handle {
    display: none;
  }

  .patch-notes-minimized-bubble {
    left: 0.5rem;
    bottom: 0.5rem;
  }

  .private-chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
  }

  .private-chat-sidebar {
    min-height: 0;
  }

  .private-chat-main {
    min-width: 0;
    min-height: 360px;
    resize: none;
  }

  .trade-request-arrows {
    justify-self: center;
    transform: rotate(90deg);
  }

  .content {
    grid-template-columns: 1fr;
  }

  .top-panels {
    grid-template-columns: 1fr;
  }

  #toggle-upload-button {
    width: 100%;
  }
}

.tag {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

button.tag {
  width: auto;
  margin: 0;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

button.tag.concept-tags-more-button {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.36);
  color: #d7f3ff;
}

button.tag.concept-tags-more-button:hover {
  background: rgba(56, 189, 248, 0.22);
}

.concept-status-detail {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.concept-status-detail-label {
  font-weight: 800;
  color: var(--text);
}

.testing-grounds-page {
  background: radial-gradient(circle at top, #1f2b45 0%, #0f172a 55%, #09101f 100%);
}

.testing-grounds-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  display: grid;
  gap: 1rem;
}

.testing-grounds-hero,
.testing-grounds-panel {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.testing-grounds-pill-row,
.testing-grounds-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.testing-grounds-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.42);
  color: #dbeafe;
  font-size: 0.8rem;
  font-weight: 700;
}

.testing-grounds-grid {
  display: grid;
  gap: 0.8rem;
}

.testing-grounds-flag {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.testing-grounds-flag h3 {
  margin: 0 0 0.35rem;
}

.testing-grounds-flag p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.testing-grounds-empty {
  color: var(--muted);
}

.testing-grounds-status {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 900px) {
  .content {
    grid-template-columns: 320px 1fr;
  }

  .filter-panel {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1100px) {
  .content {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .concept-list {
    grid-column: 1 / -1;
  }
}
