:root {
  --bg: #11100f;
  --surface: #171514;
  --surface-2: #1f1b19;
  --surface-3: #26211f;
  --text: #f0e7dc;
  --muted: #b5a898;
  --subtle: #817467;
  --line: rgba(236, 218, 194, 0.14);
  --line-strong: rgba(236, 218, 194, 0.24);
  --copper: #d19a6c;
  --gold: #dfbd7d;
  --sage: #879f8a;
  --rose: #bf788b;
  --blue: #7f8ead;
  --danger: #d46868;
  --nav-h: 78px;
  --max-app: 520px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 18% 0%, rgba(209, 154, 108, 0.16), transparent 26rem),
    linear-gradient(135deg, #0b0b0a 0%, #171310 48%, #0e1010 100%);
  color: var(--text);
  font-family:
    "Noto Sans SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

body::selection {
  background: var(--copper);
  color: #11100f;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: min(100%, var(--max-app));
  min-height: 100svh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18rem),
    var(--bg);
  border-left: 1px solid rgba(236, 218, 194, 0.08);
  border-right: 1px solid rgba(236, 218, 194, 0.08);
  overflow: hidden;
}

.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 18px 12px;
  background: rgba(17, 16, 15, 0.86);
  border-bottom: 1px solid rgba(236, 218, 194, 0.08);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--copper);
  font-family: Georgia, serif;
  font-size: 0.76rem;
}

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

h1 {
  margin: 0;
  font-family:
    "Noto Serif SC",
    "Songti SC",
    serif;
  font-size: 1.42rem;
  font-weight: 500;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1.28;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.38;
}

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

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.icon-button#closeCompose {
  font-size: 1.4rem;
  line-height: 1;
}

.icon-button svg,
.bottom-nav svg,
.search-panel svg,
.compose-entry svg,
.floating-compose svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.app-main {
  min-height: calc(100svh - var(--nav-h));
  padding: 14px 14px calc(var(--nav-h) + 26px);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero-panel {
  position: relative;
  min-height: 268px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151312;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 16, 15, 0.08), rgba(17, 16, 15, 0.94));
}

.hero-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 28%;
  opacity: 0.84;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.hero-copy h2 {
  max-width: 330px;
  margin: 12px 0 10px;
  font-family:
    "Noto Serif SC",
    "Songti SC",
    serif;
  font-size: 1.7rem;
  font-weight: 400;
}

.hero-copy p {
  max-width: 330px;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.capsule,
.soft-label {
  color: var(--copper);
  font-size: 0.76rem;
}

.capsule {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(209, 154, 108, 0.35);
  border-radius: 999px;
  background: rgba(209, 154, 108, 0.1);
}

.entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.entry-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #201b18, #171514);
  text-align: left;
  cursor: pointer;
}

.entry-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: rgba(209, 154, 108, 0.18);
  color: var(--copper);
  font-size: 1.15rem;
  font-weight: 700;
}

.entry-card strong,
.entry-card small {
  display: block;
}

.entry-card small {
  margin-top: 8px;
  color: var(--subtle);
  line-height: 1.5;
}

.commerce-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.commerce-strip button {
  min-height: 72px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.commerce-strip strong,
.commerce-strip span {
  display: block;
}

.commerce-strip strong {
  margin-bottom: 4px;
  color: var(--gold);
}

.commerce-strip span {
  color: var(--subtle);
  font-size: 0.74rem;
}

.content-block,
.test-panel,
.scene-panel,
.profile-card,
.order-panel {
  margin-top: 18px;
}

.block-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--copper);
  cursor: pointer;
}

.brand-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(176px, 42%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.brand-strip::-webkit-scrollbar,
.story-tabs::-webkit-scrollbar {
  display: none;
}

.brand-card {
  min-height: 196px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(127, 142, 173, 0.15), transparent),
    var(--surface);
}

.brand-card img {
  width: 100%;
  height: 84px;
  margin-bottom: 12px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f1eb;
}

.brand-card.is-warm img {
  object-position: center 28%;
}

.brand-card:not(.is-warm) img {
  object-fit: contain;
  padding: 8px;
}

.brand-card.is-warm {
  background:
    linear-gradient(180deg, rgba(223, 189, 125, 0.18), transparent),
    var(--surface);
}

.brand-card.is-paper {
  background:
    linear-gradient(180deg, rgba(226, 217, 202, 0.12), transparent),
    var(--surface);
}

.brand-card.is-rose {
  background:
    linear-gradient(180deg, rgba(191, 120, 139, 0.16), transparent),
    var(--surface);
}

.brand-card span,
.post-meta,
.post-card footer,
.mini-list span,
.community-row p,
.question-count {
  color: var(--subtle);
  font-size: 0.78rem;
}

.brand-card strong {
  display: block;
  margin: 8px 0 8px;
  font-size: 1.04rem;
}

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

.feed-list,
.community-list,
.mini-list,
.market-list,
.trade-list {
  display: grid;
  gap: 10px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-card {
  position: relative;
  min-height: 294px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-card img {
  width: 100%;
  height: 142px;
  border-radius: 6px;
  background: #f5f1eb;
  object-fit: contain;
  padding: 8px;
}

.product-card:first-child img {
  object-fit: cover;
  padding: 0;
  object-position: center 26%;
}

.product-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 16, 15, 0.72);
  color: var(--gold);
  font-size: 0.7rem;
}

.product-card h3,
.product-card p {
  margin-bottom: 6px;
}

.product-card p {
  font-size: 0.82rem;
}

.price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 10px;
}

.price-line strong {
  color: var(--gold);
  font-size: 1.1rem;
}

.price-line span {
  color: var(--subtle);
  font-size: 0.74rem;
}

.buy-button,
.mini-buy {
  border: 1px solid rgba(209, 154, 108, 0.38);
  border-radius: 8px;
  background: rgba(209, 154, 108, 0.13);
  color: var(--gold);
  cursor: pointer;
}

.buy-button {
  width: 100%;
  min-height: 38px;
}

.post-card {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.post-card img {
  width: 94px;
  height: 126px;
  border-radius: 6px;
  object-fit: cover;
}

.post-card p {
  margin-bottom: 10px;
  font-size: 0.86rem;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.search-panel {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--subtle);
}

.compose-entry {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid rgba(209, 154, 108, 0.42);
  border-radius: 8px;
  background: rgba(209, 154, 108, 0.12);
  color: var(--gold);
  cursor: pointer;
}

.community-row {
  min-height: 104px;
  display: grid;
  grid-template-columns: 66px 34px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.community-row img {
  width: 66px;
  height: 76px;
  border-radius: 6px;
  background: #f5f1eb;
  object-fit: cover;
}

.community-row:not(:first-child) img {
  object-fit: contain;
  padding: 7px;
}

.community-row > strong {
  color: var(--copper);
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.community-row p {
  margin-bottom: 0;
}

.community-row > span {
  color: var(--sage);
  font-size: 0.82rem;
}

.market-row,
.trade-list article {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.market-row img,
.trade-list img {
  width: 74px;
  height: 86px;
  border-radius: 6px;
  background: #f5f1eb;
  object-fit: contain;
  padding: 7px;
}

.market-row h3,
.market-row p,
.trade-list h3,
.trade-list p {
  margin-bottom: 4px;
}

.market-row p,
.trade-list p {
  font-size: 0.82rem;
}

.mini-buy {
  width: 38px;
  height: 38px;
}

.topic-grid,
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.topic-grid button,
.feature-grid article,
.mini-list article {
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topic-grid button {
  cursor: pointer;
  text-align: left;
}

.test-panel,
.scene-panel,
.profile-card,
.order-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.progress-pill {
  min-width: 52px;
  padding: 4px 8px;
  border: 1px solid rgba(209, 154, 108, 0.3);
  border-radius: 999px;
  color: var(--copper);
  text-align: center;
  font-size: 0.78rem;
}

.question-card h3 {
  margin: 12px 0;
  font-size: 1.18rem;
}

.option-list {
  display: grid;
  gap: 9px;
}

.option-list button {
  min-height: 56px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #201c19;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.option-list button:hover,
.option-list button.is-selected {
  border-color: rgba(209, 154, 108, 0.66);
  background: rgba(209, 154, 108, 0.12);
}

.result-card {
  padding: 16px;
  border: 1px solid rgba(209, 154, 108, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(209, 154, 108, 0.12), transparent),
    #171514;
}

.result-card h3 {
  color: var(--gold);
  font-family:
    "Noto Serif SC",
    "Songti SC",
    serif;
  font-size: 1.42rem;
  font-weight: 400;
}

.scene-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.scene-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #201c19;
  cursor: pointer;
}

.scene-tabs button.is-active {
  border-color: rgba(209, 154, 108, 0.6);
  background: rgba(209, 154, 108, 0.14);
  color: var(--gold);
}

.match-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171514;
}

.match-card img {
  width: 86px;
  height: 112px;
  border-radius: 6px;
  object-fit: cover;
}

.match-card p {
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.match-tags span {
  padding: 4px 8px;
  border: 1px solid rgba(236, 218, 194, 0.16);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
}

.shelf-card {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.order-status-grid,
.profile-order-grid,
.service-grid {
  display: grid;
  gap: 8px;
}

.order-status-grid,
.profile-order-grid {
  grid-template-columns: repeat(5, 1fr);
}

.order-status-grid button,
.profile-order-grid button,
.service-grid button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #201c19;
  cursor: pointer;
}

.order-status-grid button,
.profile-order-grid button {
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}

.order-status-grid strong,
.profile-order-grid strong {
  color: var(--gold);
  font-size: 1.05rem;
}

.order-status-grid span,
.profile-order-grid span {
  color: var(--muted);
  font-size: 0.72rem;
}

.trade-state {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--copper);
  font-size: 0.76rem;
}

.shelf-card img {
  width: 126px;
  height: 162px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 32%;
}

.button-dark,
.full-button,
.ghost-button {
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
}

.button-dark {
  padding: 0 14px;
  border: 1px solid rgba(209, 154, 108, 0.36);
  background: rgba(209, 154, 108, 0.12);
  color: var(--gold);
}

.mini-list article {
  display: grid;
  gap: 6px;
}

.profile-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: center;
}

.avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(209, 154, 108, 0.38);
  border-radius: 8px;
  background: rgba(209, 154, 108, 0.14);
  color: var(--gold);
  font-family:
    "Noto Serif SC",
    "Songti SC",
    serif;
  font-size: 1.6rem;
}

.feature-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
}

.feature-grid span {
  color: var(--subtle);
  font-size: 0.82rem;
}

.full-button {
  width: 100%;
  border: 1px solid rgba(209, 154, 108, 0.42);
  background: var(--copper);
  color: #17100b;
  font-weight: 700;
}

.service-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-grid button {
  min-height: 54px;
  color: var(--muted);
}

.ghost-button {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
}

.bottom-nav {
  position: fixed;
  z-index: 18;
  left: 50%;
  bottom: 0;
  width: min(100%, var(--max-app));
  height: var(--nav-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(17, 16, 15, 0.94);
  backdrop-filter: blur(18px);
}

.floating-compose {
  position: fixed;
  z-index: 19;
  left: calc(50% + min(50vw, var(--max-app) / 2) - 76px);
  bottom: calc(var(--nav-h) + 18px);
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(209, 154, 108, 0.52);
  border-radius: 8px;
  background: var(--copper);
  color: #17100b;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
}

.bottom-nav button.is-active {
  color: var(--gold);
}

.bottom-nav span {
  font-size: 0.72rem;
}

.onboarding {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 8, 7, 0.72);
  backdrop-filter: blur(20px);
}

.compose-modal {
  position: fixed;
  z-index: 31;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(8, 8, 7, 0.72);
  backdrop-filter: blur(18px);
}

.compose-modal.is-hidden {
  display: none;
}

.compose-panel {
  width: min(100%, 440px);
  padding: 18px;
  border: 1px solid rgba(236, 218, 194, 0.22);
  border-radius: 8px;
  background: #171514;
}

.onboarding.is-hidden {
  display: none;
}

.onboarding__panel {
  width: min(100%, 440px);
  max-height: min(720px, calc(100svh - 36px));
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(236, 218, 194, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(209, 154, 108, 0.08), transparent),
    #171514;
}

.onboard-step {
  display: none;
}

.onboard-step.is-active {
  display: block;
}

.field-label {
  display: block;
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #211d1a;
  color: var(--text);
  outline: none;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #211d1a;
  color: var(--text);
  outline: none;
}

select {
  height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 116px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(209, 154, 108, 0.58);
}

.field-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-group .field-label {
  width: 100%;
}

.choice-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
}

.choice-chip.is-selected {
  border-color: rgba(209, 154, 108, 0.66);
  background: rgba(209, 154, 108, 0.13);
  color: var(--gold);
}

.onboard-step .full-button {
  margin-top: 22px;
}

.prompt-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

@media (min-width: 900px) {
  :root {
    --max-app: 620px;
  }

  .app-shell {
    min-height: calc(100svh - 48px);
    margin-top: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(236, 218, 194, 0.1);
    border-radius: 8px;
  }

  .bottom-nav {
    bottom: 24px;
    border-left: 1px solid rgba(236, 218, 194, 0.08);
    border-right: 1px solid rgba(236, 218, 194, 0.08);
  }
}

@media (max-width: 430px) {
  .app-main {
    padding-inline: 10px;
  }

  .app-header {
    padding-inline: 14px;
  }

  .hero-panel {
    min-height: 250px;
  }

  .entry-grid,
  .topic-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-auto-columns: 70%;
  }

  .post-card {
    grid-template-columns: 82px 1fr;
  }

  .post-card img {
    width: 82px;
    height: 116px;
  }

  .match-card,
  .shelf-card {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .order-status-grid,
  .profile-order-grid,
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .community-row,
  .market-row,
  .trade-list article {
    grid-template-columns: 64px 1fr;
  }

  .community-row > strong,
  .community-row > span,
  .market-row .mini-buy {
    grid-column: 2;
  }

  .match-card img,
  .shelf-card img {
    width: 100%;
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
