*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #f2eadc;
  --surface: #fffdf7;
  --surface-soft: #f8f1e5;
  --line: rgba(55, 43, 28, 0.14);
  --line-strong: rgba(55, 43, 28, 0.24);
  --text: #211b14;
  --text-soft: #4f4335;
  --muted: #7a6d5c;
  --accent: #7a4f2b;
  --accent-dark: #4b2f1a;
  --accent-soft: rgba(180, 138, 73, 0.14);
  --gold: #b48a49;
  --danger: #9e3f31;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(48, 35, 18, 0.05), 0 18px 42px rgba(52, 38, 20, 0.08);
  --font-main: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

html.artwork-viewer-open,
html.artwork-viewer-open body {
  overflow: hidden;
}

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 46% at 50% 118%, rgba(180, 138, 73, 0.16), transparent 58%),
    radial-gradient(circle, rgba(55, 43, 28, 0.045) 0 0.8px, transparent 1px),
    linear-gradient(180deg, #fbf6ec 0%, #f4ead9 46%, var(--bg) 100%);
  background-size: auto, 22px 22px, auto;
  font-family: var(--font-main);
  font-size: 15.5px;
  line-height: 1.55;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(251, 246, 236, 0.28), rgba(242, 234, 220, 0.56)),
    url("/static/bg-qingming-river.jpg") center top / cover no-repeat;
  opacity: 0.34;
  filter: sepia(0.22) saturate(0.72) contrast(0.95);
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 2.5vw, 2.55rem);
  line-height: 1.16;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  line-height: 1.3;
}

p {
  color: var(--muted);
}

code {
  color: var(--accent-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 251, 242, 0.88);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong {
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 780;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-dark);
  border-color: rgba(122, 79, 43, 0.24);
  background: var(--accent-soft);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.nav-user {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  white-space: nowrap;
}

.page {
  width: min(1240px, calc(100% - 32px));
  flex: 1 0 auto;
  margin: 24px auto 48px;
}

.site-footer {
  flex: 0 0 auto;
  border-top: 1px solid rgba(255, 250, 241, 0.12);
  background: #070604;
  color: #fffaf1;
}

.site-footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(280px, 1.45fr) auto;
  gap: 22px;
  align-items: center;
  padding: 30px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.footer-logo {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  padding: 5px;
  border: 1px solid rgba(255, 250, 241, 0.72);
  border-radius: 10px;
  background: #fffaf1;
}

.footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-size: 1rem;
  line-height: 1.2;
}

.footer-brand span {
  margin-top: 3px;
  color: rgba(255, 250, 241, 0.68);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-nav-groups {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.footer-manage-links {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 250, 241, 0.12);
}

.footer-legal-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-links a,
.footer-link-button,
.footer-record a,
.footer-legal-links a {
  color: rgba(255, 250, 241, 0.8);
  font-size: 0.88rem;
  font-weight: 760;
}

.footer-links a:hover,
.footer-link-button:hover,
.footer-record a:hover,
.footer-legal-links a:hover {
  color: #fffaf1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-link-button {
  border: 0;
  background: transparent;
  padding: 0;
}

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

.footer-record {
  display: grid;
  gap: 9px;
  justify-self: end;
  justify-items: end;
  white-space: nowrap;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 780;
}

.breadcrumbs a {
  color: var(--accent-dark);
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb-separator {
  color: rgba(79, 67, 53, 0.46);
}

.hero-card,
.card,
.art-card,
.feed-card,
.metric-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
}

.eyebrow,
.hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.trust-list,
.tag-row,
.action-row,
.inline-fields,
.section-head,
.section-heading,
.profile-header,
.inline-form {
  display: flex;
  align-items: center;
}

.trust-list,
.tag-row,
.action-row {
  flex-wrap: wrap;
  gap: 8px;
}

.trust-list span,
.tag-row span,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(122, 79, 43, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 760;
}

.application-status {
  border-color: transparent;
  background: transparent;
  padding-inline: 0;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 162px;
  margin-bottom: 12px;
  padding: clamp(16px, 2.5vw, 28px);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 253, 247, 0.96) 0%, rgba(246, 239, 226, 0.78) 58%),
    url("https://images.unsplash.com/photo-1578301978693-85fa9c0320b9?auto=format&fit=max&w=1600&q=82") center / cover;
}

.hero-card > div:first-child {
  display: flex;
  flex-direction: column;
  align-self: center;
  text-align: left;
}

.hero-card p {
  order: 3;
  max-width: 680px;
  margin-bottom: 0;
  color: var(--text-soft);
}

.hero-card h1 {
  order: 1;
  margin-bottom: 4px;
  font-size: clamp(1.32rem, 1.9vw, 1.82rem);
}

.hero-card .eyebrow {
  order: 2;
  margin-bottom: 6px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-grid.compact {
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  min-width: 300px;
  margin-bottom: 0;
}

.metric-card {
  padding: 9px 11px;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(246, 239, 226, 0.9));
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.metric-card strong {
  display: block;
  margin-top: 2px;
  font-size: 1.14rem;
  line-height: 1.1;
}

.card {
  padding: 18px;
  margin-bottom: 16px;
}

.legal-page {
  max-width: 860px;
  margin: 0 auto 16px;
  padding: clamp(24px, 4vw, 40px);
}

.legal-sections {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.legal-sections section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.legal-sections h2 {
  margin-bottom: 6px;
}

.search-form,
.form,
.manager-list {
  display: grid;
  gap: 11px;
}

.search-form {
  gap: 14px;
}

.search-panel {
  padding: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-row input {
  min-height: 48px;
}

.search-row .btn {
  min-width: 92px;
  min-height: 48px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.category-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 72px;
  padding: 0 14px;
  border: 1px solid rgba(122, 79, 43, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.82);
  color: var(--accent-dark);
  font-weight: 820;
  cursor: pointer;
}

.category-option:hover,
.category-option.active {
  border-color: var(--accent-dark);
  background: var(--text);
  color: #fffaf1;
}

.search-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 2px;
}

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

.auth-page {
  min-height: min(650px, calc(100vh - 160px));
  display: grid;
  place-items: center;
  padding: 28px 0 56px;
}

.auth-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 24px 70px rgba(52, 38, 20, 0.16);
  padding: clamp(28px, 5vw, 52px);
}

.auth-brand {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 34px;
  text-align: center;
}

.auth-brand .brand-mark {
  width: 96px;
  height: 96px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.65rem;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form.compact {
  margin-top: 14px;
  gap: 10px;
}

.phone-field {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.phone-field > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: rgba(246, 239, 226, 0.68);
  color: var(--text);
  font-weight: 820;
}

.phone-field input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.phone-field input,
.code-field input,
.code-field .btn,
.password-field input,
.auth-submit {
  min-height: 50px;
}

.code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
}

.auth-submit {
  background: #b8e4c9;
  border-color: #b8e4c9;
  color: #225039;
}

.agreement-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.agreement-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.agreement-check a {
  color: #2468c9;
  font-weight: 820;
}

.agreement-check a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 38px 0 16px;
  color: var(--muted);
  font-weight: 820;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-mode-switch {
  text-align: center;
}

.inline-fields {
  gap: 10px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.88);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(122, 79, 43, 0.6);
  box-shadow: 0 0 0 3px rgba(180, 138, 73, 0.16);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fffaf1;
  font-weight: 850;
  white-space: nowrap;
}

.btn.ghost {
  border-color: var(--line-strong);
  background: rgba(255, 253, 247, 0.84);
  color: var(--text);
}

.btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.art-grid,
.shop-grid,
.feed-grid,
.account-grid,
.cart-grid,
.admin-grid {
  display: grid;
  gap: 16px;
}

.art-grid {
  display: block;
  column-count: 3;
  column-gap: 16px;
}

.art-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  overflow: hidden;
  break-inside: avoid;
}

.art-media {
  position: relative;
  overflow: hidden;
}

.art-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.art-image-button img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--surface-soft);
  transition: transform 0.36s ease, filter 0.36s ease;
}

.art-image-button:hover img,
.art-image-button:focus-visible img {
  transform: scale(1.07);
  filter: saturate(1.04) contrast(1.03);
}

.favorite-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 250, 241, 0.76);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  color: #7a4f2b;
  box-shadow: 0 10px 28px rgba(33, 24, 13, 0.18);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.art-media:hover .favorite-toggle,
.art-media:focus-within .favorite-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.favorite-toggle:hover,
.favorite-toggle:focus-visible {
  color: #9e3f31;
  transform: translateY(-1px) scale(1.04);
}

.favorite-toggle:disabled {
  cursor: wait;
  opacity: 0.72;
}

.favorite-toggle.is-favorited {
  background: rgba(158, 63, 49, 0.94);
  color: #fffaf1;
}

@media (hover: none) {
  .favorite-toggle {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}

.favorite-icon {
  width: 23px;
  height: 23px;
  pointer-events: none;
}

.favorite-icon-solid {
  display: none;
}

.favorite-toggle.is-favorited .favorite-icon-outline {
  display: none;
}

.favorite-toggle.is-favorited .favorite-icon-solid {
  display: block;
}

.invalid-artwork {
  opacity: 0.72;
}

.invalid-artwork .art-image-button img {
  filter: grayscale(0.45) contrast(0.92);
}

.invalid-hint {
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 850;
}

.art-card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.art-card h2 {
  margin-bottom: 0;
  font-size: 1.42rem;
  font-weight: 950;
  line-height: 1.1;
}

.shop-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 850;
  line-height: 1.2;
}

.shop-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-link-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: currentColor;
}

.art-card-shop-link {
  margin-top: -2px;
}

.viewer-shop-link {
  align-self: flex-end;
  font-size: 1rem;
  margin-top: -8px;
}

.shop-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shop-detail-hero h1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}

.shop-detail-hero .shop-link-icon {
  width: 1em;
  height: 1em;
}

.shop-detail-hero p {
  margin: 0;
  color: var(--muted);
}

.art-description {
  display: -webkit-box;
  margin: -4px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.artwork-viewer {
  position: relative;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 0 28px 90px rgba(52, 38, 20, 0.34);
}

.artwork-viewer::backdrop {
  background: rgba(33, 27, 20, 0.48);
  backdrop-filter: blur(5px);
}

.viewer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  min-height: min(760px, calc(100vh - 72px));
}

.viewer-gallery {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  background: #16130f;
}

.viewer-gallery > img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  max-height: calc(100vh - 170px);
  object-fit: contain;
}

.artwork-viewer .viewer-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 8;
  box-shadow: 0 10px 28px rgba(22, 19, 15, 0.16);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 52px;
  border: 1px solid rgba(255, 250, 241, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(22, 19, 15, 0.58);
  color: #fffaf1;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.viewer-prev {
  left: 16px;
}

.viewer-next {
  right: 16px;
}

.viewer-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.viewer-thumbs button {
  width: 58px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  overflow: hidden;
}

.viewer-thumbs button.active {
  border-color: var(--accent);
}

.viewer-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  overflow-y: auto;
}

.viewer-info .section-head {
  align-items: start;
}

.viewer-info h2 {
  margin: 0;
  padding-right: 78px;
}

.viewer-description {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.viewer-params {
  display: grid;
  gap: 10px;
  margin: 0;
}

.viewer-params div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.viewer-params dt {
  color: var(--muted);
  font-weight: 850;
}

.viewer-params dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.viewer-purchase-summary {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.viewer-purchase-summary .price {
  color: #9e3f31;
  font-size: 2.15rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.viewer-actions {
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(rgba(255, 253, 247, 0), var(--surface) 24px);
}

.price {
  color: var(--accent-dark);
  white-space: nowrap;
}

.art-card .price {
  display: inline-flex;
  align-items: baseline;
  color: #9e3f31;
  font-size: 1.42rem;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shop-grid,
.account-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.my-page {
  display: grid;
  gap: 16px;
}

.my-header {
  margin-bottom: 0;
}

.my-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.my-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--muted);
  font-weight: 850;
}

.my-tabs a:hover,
.my-tabs a.active {
  border-color: var(--line);
  background: rgba(255, 253, 247, 0.92);
  color: var(--accent-dark);
}

.order-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.order-flow span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(246, 239, 226, 0.58);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.profile-facts div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(246, 239, 226, 0.52);
}

.profile-facts span,
.profile-facts strong {
  display: block;
}

.profile-facts span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.profile-fact-action {
  display: grid;
  gap: 10px;
  align-content: start;
}

.profile-fact-action .btn {
  justify-self: start;
  margin-top: 2px;
}

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

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

.checkout-address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.address-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(246, 239, 226, 0.52);
  cursor: pointer;
}

.checkout-address-row .address-choice {
  min-width: 0;
}

.checkout-address-row > .btn {
  align-self: center;
}

.address-choice input {
  margin-top: 4px;
}

.address-choice strong,
.address-choice em {
  display: block;
}

.address-choice em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
}

.checkout-empty {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.66);
}

.checkout-empty p {
  margin: 0;
}

.inline-action {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkout-address-create {
  justify-self: start;
  margin-top: 2px;
}

.attachment-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.attachment-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.84);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 820;
}

.shop-empty-state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  color: var(--muted);
}

.shop-empty-state a:not(.btn) {
  color: var(--accent-dark);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-empty-state p {
  margin: 0;
}

.store-modal {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 0 28px 90px rgba(52, 38, 20, 0.28);
}

.store-modal::backdrop {
  background: rgba(33, 27, 20, 0.36);
  backdrop-filter: blur(4px);
}

.store-application-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.setup-modal {
  width: min(480px, calc(100vw - 32px));
}

.setup-form .hint {
  margin: -4px 0 2px;
}

.setup-form input {
  min-height: 48px;
}

.setup-form .action-row .btn {
  flex: 1 1 140px;
  justify-content: center;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 {
  margin: 0;
}

.store-application-form label {
  display: grid;
  gap: 7px;
}

.store-application-form label > span {
  color: var(--text-soft);
  font-weight: 850;
}

.store-application-form em {
  color: var(--muted);
  font-style: normal;
  font-weight: 760;
}

.attachment-field {
  position: relative;
  min-height: 112px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(246, 239, 226, 0.45);
  cursor: pointer;
}

.attachment-field input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.attachment-field strong {
  color: var(--muted);
  font-weight: 760;
}

.attachment-field b {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.9);
  color: var(--accent-dark);
  font-size: 1.35rem;
  line-height: 1;
}

.avatar-attachment-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.avatar-attachment-field > span:first-child,
.avatar-attachment-field strong {
  grid-column: 1;
}

.avatar-attachment-field > span:first-child {
  display: grid;
  gap: 3px;
}

.avatar-attachment-field .avatar-preview,
.avatar-attachment-field b {
  grid-column: 2;
}

.avatar-attachment-field .avatar-preview {
  grid-row: 1 / 3;
  align-self: center;
}

.avatar-attachment-field b {
  justify-self: end;
}

.address-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.address-form .modal-head,
.address-form .region-selects,
.address-form .checkbox-line,
.address-form > .btn {
  grid-column: 1 / -1;
}

.region-selects {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.region-selects select:disabled {
  color: rgba(79, 67, 53, 0.48);
  background: rgba(246, 239, 226, 0.5);
  cursor: not-allowed;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 760;
}

.checkbox-line input {
  width: auto;
}

.feed-grid {
  display: block;
  column-count: 3;
  column-gap: 18px;
}

.community-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.community-modal {
  width: min(640px, calc(100vw - 32px));
}

.feed-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  break-inside: avoid;
}

.feed-card-media {
  aspect-ratio: var(--feed-ratio, 4 / 5);
  background: var(--surface-soft);
  overflow: hidden;
}

.feed-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease, filter 0.36s ease;
}

.feed-card:hover .feed-card-media img,
.feed-card:focus-within .feed-card-media img {
  transform: scale(1.07);
  filter: saturate(1.05) contrast(1.03);
}

.feed-card-body {
  display: grid;
  gap: 8px;
  padding: 12px 13px 13px;
}

.feed-author {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.feed-author strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.3;
}

.feed-author span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  white-space: nowrap;
}

.feed-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.52;
}

.feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.feed-actions button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(122, 79, 43, 0.16);
  border-radius: 999px;
  background: rgba(246, 239, 226, 0.55);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.feed-actions button:hover {
  border-color: rgba(122, 79, 43, 0.32);
  background: rgba(180, 138, 73, 0.18);
  color: var(--accent-dark);
}

.feed-actions button.liked {
  border-color: rgba(122, 79, 43, 0.42);
  background: rgba(180, 138, 73, 0.22);
  color: var(--accent-dark);
}

.feed-actions button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.cart-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.cart-page,
.checkout-page {
  display: grid;
  gap: 16px;
}

.cart-page .section-head h1 {
  margin-bottom: 4px;
  font-size: 1.55rem;
}

.cart-check {
  width: 18px;
  height: 18px;
}

.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(122, 79, 43, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(180, 138, 73, 0.18), rgba(255, 253, 247, 0.92));
}

.checkout-total span {
  color: var(--text-soft);
  font-weight: 900;
}

.checkout-total strong {
  color: var(--accent-dark);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1;
}

.payment-field {
  display: grid;
  gap: 7px;
}

.payment-field span {
  color: var(--text-soft);
  font-weight: 850;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-dashboard {
  display: grid;
  gap: 16px;
}

.manager-tabs {
  margin-bottom: 0;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-hero h1 {
  margin-bottom: 4px;
  font-size: 1.55rem;
}

.admin-hero p {
  margin: 0;
  color: var(--muted);
}

.admin-quick-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-todo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-todo-grid div,
.shop-stat-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(246, 239, 226, 0.5);
}

.admin-todo-grid div {
  padding: 12px;
}

.admin-todo-grid span,
.shop-stat-row span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

.admin-todo-grid strong,
.shop-stat-row strong {
  display: block;
  margin-top: 4px;
}

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

.shop-stat-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(92px, auto));
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.admin-review-row {
  grid-template-columns: minmax(0, 1fr) 150px auto;
}

.wide {
  grid-column: 1 / -1;
}

.section-head,
.section-heading {
  justify-content: space-between;
  gap: 14px;
}

.profile-header {
  gap: 14px;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

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

.profile-dialog input,
.profile-dialog textarea {
  min-height: 46px;
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-upload-row input {
  min-height: auto;
}

.avatar-preview {
  flex: 0 0 auto;
}

.avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(122, 79, 43, 0.24);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.4rem;
  font-weight: 900;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(246, 239, 226, 0.55);
}

.complaint-row {
  align-items: start;
}

.identity-request-row {
  grid-template-columns: minmax(0, 1fr) 150px auto;
  align-items: start;
}

.community-admin-row {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: start;
}

.community-admin-media {
  display: grid;
  width: 76px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
}

.community-admin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity-review-modal {
  width: min(960px, calc(100vw - 32px));
}

.approval-grid {
  display: grid;
  gap: 18px;
}

.approval-subtabs {
  margin: 12px 0 18px;
}

.compact-head {
  margin-bottom: 10px;
}

.compact-head h2 {
  margin-bottom: 0;
}

.manager-row strong,
.manager-row span {
  display: block;
}

.manager-row span {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.artwork-modal {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.artwork-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

.artwork-form .form-field {
  display: grid;
  gap: 7px;
}

.artwork-form .form-field > span,
.artwork-form .artwork-image-field > span {
  color: var(--text-soft);
  font-weight: 850;
}

.artwork-form input,
.artwork-form select,
.artwork-form textarea {
  min-height: 46px;
}

.artwork-form textarea {
  min-height: 108px;
}

.artwork-form .modal-head,
.artwork-form .span-full,
.artwork-form .artwork-image-field,
.artwork-form .artwork-image-hint,
.artwork-form > .btn {
  grid-column: 1 / -1;
}

.artwork-form .artwork-image-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
}

.artwork-form .artwork-image-field > span,
.artwork-form .artwork-image-field strong {
  grid-column: 1;
}

.artwork-form .artwork-image-field b {
  grid-column: 2;
  grid-row: 1 / 3;
}

.artwork-form .artwork-image-hint {
  margin: -8px 0 0;
}

.artwork-form > .btn {
  width: min(180px, 100%);
  justify-self: end;
}

.table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions .inline-form {
  flex-wrap: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.76);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(246, 239, 226, 0.72);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
}

.favorites-empty-state {
  width: 100%;
  min-height: 220px;
  padding: 32px;
}

.toast-stack {
  position: fixed;
  right: 22px;
  top: 50vh;
  z-index: 800;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 28px));
  transform: translateY(-50%);
}

.toast {
  border-radius: var(--radius);
  background: var(--text);
  color: #fffaf1;
  padding: 12px 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  animation: toast-in 0.22s ease-out both;
}

.toast.auth-required {
  background: var(--accent-dark);
}

.toast-hide {
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(18px, 0); }
  to { opacity: 1; transform: translate(0, 0); }
}

@media (max-width: 980px) {
  .topbar-inner,
  .section-head,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .main-nav,
  .auth-actions {
    align-items: stretch;
  }

  .auth-actions {
    margin-left: 0;
  }

  .hero-card,
  .search-row,
  .region-selects,
  .phone-field,
  .code-field,
  .art-grid,
  .shop-grid,
  .feed-grid,
  .account-grid,
  .profile-facts,
  .address-form,
  .cart-grid,
  .checkout-grid,
  .admin-grid,
  .admin-metrics,
  .metric-grid,
  .metric-grid.compact,
  .artwork-form,
  .manager-row,
  .admin-todo-grid,
  .shop-stat-row {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-quick-actions {
    justify-content: flex-start;
  }

  .viewer-shell {
    grid-template-columns: 1fr;
  }

  .viewer-gallery > img {
    min-height: 320px;
    max-height: 54vh;
  }

  .art-grid {
    column-count: 2;
  }

  .feed-card {
    grid-template-columns: 1fr;
  }

  .feed-grid {
    column-count: 2;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-nav-groups {
    justify-items: start;
  }

  .footer-record {
    justify-self: start;
    justify-items: start;
  }

  .footer-legal-links {
    justify-content: flex-start;
  }
}
}

@media (max-width: 640px) {
  .artwork-viewer {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .viewer-gallery {
    padding: 12px;
  }

  .viewer-gallery > img {
    min-height: 240px;
  }

  .viewer-info {
    padding: 18px;
  }

  .viewer-params div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .feed-grid {
    column-count: 1;
  }

  .art-grid {
    column-count: 1;
  }
}

.support-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 250;
}

.mobile-support-page {
  display: grid;
  gap: 16px;
}

.support-widget.support-widget-page {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
}

.support-fab {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(255, 250, 241, 0.72);
  border-radius: 999px;
  background: #17110c;
  color: #fffaf1;
  box-shadow: 0 18px 44px rgba(32, 22, 12, 0.24);
  font-weight: 900;
  touch-action: none;
}

.support-fab-icon {
  width: 33px;
  height: 33px;
  color: #fffaf1;
  pointer-events: none;
}

.nav-link-with-badge,
.tab-pill,
.support-thread-avatar {
  position: relative;
}

.unread-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 250, 241, 0.86);
  background: #9e3f31;
  color: #fffaf1;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.nav-link .unread-badge,
.tab-pill .unread-badge {
  margin-left: 6px;
}

.support-fab-badge {
  position: absolute;
  top: -3px;
  right: -3px;
}

.unread-badge.mini {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 0.68rem;
  font-style: normal;
}

.unread-badge.inline {
  display: inline-grid;
  margin-left: 6px;
  vertical-align: middle;
}

.support-popover {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(460px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 110px));
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(33, 24, 13, 0.22);
}

.support-widget.support-widget-page .support-fab {
  display: none;
}

.support-widget.support-widget-page .support-popover {
  position: static;
  width: 100%;
  height: min(720px, calc(100dvh - 210px));
  min-height: 520px;
}

.support-thread-rail {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 9px;
  border-right: 1px solid var(--line);
  background: #17110c;
  scrollbar-width: thin;
}

.support-thread-avatar,
.support-thread-mini-avatar {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fffaf1;
  color: var(--accent-dark);
  font-weight: 900;
}

.support-thread-avatar {
  width: 44px;
  height: 44px;
  border: 2px solid transparent;
  overflow: hidden;
}

.support-thread-avatar.platform {
  background: #2563eb;
  color: #ffffff;
}

.support-platform-icon {
  width: 25px;
  height: 25px;
  color: currentColor;
  pointer-events: none;
}

.support-thread-avatar.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(180, 138, 73, 0.2);
}

.support-chat,
.support-panel-chat {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.support-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 241, 229, 0.76);
}

.support-chat-head strong {
  display: block;
}

.support-messages {
  min-height: 0;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #fbf5ea;
}

.support-message {
  max-width: 82%;
  align-self: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.support-message.own {
  align-self: flex-end;
  border-color: rgba(122, 79, 43, 0.26);
  background: rgba(180, 138, 73, 0.16);
}

.support-message.system {
  max-width: 100%;
  align-self: center;
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}

.support-message strong,
.support-message time {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.support-message p {
  margin: 3px 0;
  color: var(--text);
  white-space: pre-wrap;
}

.support-composer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.support-composer input {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdfa;
}

.support-panel-hero {
  align-items: center;
}

.support-panel-page {
  padding: 0;
  overflow: hidden;
}

.support-panel-tabs {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 241, 229, 0.72);
}

.tab-pill {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-weight: 850;
}

.tab-pill.active {
  border-color: rgba(122, 79, 43, 0.32);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.support-panel-layout {
  min-height: 680px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
}

.support-panel-threads {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fffaf1;
}

.support-panel-threads .empty-copy.centered {
  min-height: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.support-panel-thread {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.support-panel-thread.active,
.support-panel-thread:hover {
  background: var(--accent-soft);
}

.support-thread-mini-avatar {
  width: 44px;
  height: 44px;
  background: #17110c;
  color: #fffaf1;
}

.support-panel-thread strong,
.support-panel-thread small,
.support-panel-thread em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-panel-thread small,
.support-panel-thread em,
.empty-copy {
  color: var(--muted);
}

.support-panel-thread em {
  margin-top: 3px;
  font-style: normal;
}

.support-messages.panel {
  min-height: 520px;
}

@media (max-width: 760px) {
  .support-popover {
    grid-template-columns: 54px minmax(0, 1fr);
    width: calc(100vw - 20px);
    right: -10px;
  }

  .support-widget.support-widget-page .support-popover {
    width: 100%;
    height: calc(100dvh - 170px);
    min-height: 520px;
    right: auto;
  }

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

  .support-panel-threads {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
