:root {
  --paper: #f5f0e8;
  --paper-2: #ece3d6;
  --ink: #3b3026;
  --muted: #8f8171;
  --gold: #a7844e;
  --gold-2: #cbb184;
  --line: rgba(113, 89, 58, .18);
  --white: rgba(255, 252, 247, .76);
  --shadow: 0 12px 34px rgba(76, 55, 32, .12), inset 0 1px rgba(255,255,255,.88);
  --soft-shadow: 0 5px 14px rgba(74, 52, 27, .11), inset 0 1px rgba(255,255,255,.88);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: #d8d0c5; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,.8), transparent 32%),
    linear-gradient(135deg, #dad2c7, #eee9e2 55%, #cec3b6);
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(100%, 470px);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background:
    linear-gradient(rgba(255,255,255,.24) 1px, transparent 1px),
    radial-gradient(circle at 18% 0, rgba(255,255,255,.8), transparent 36%),
    var(--paper);
  background-size: 100% 5px, auto, auto;
  box-shadow: 0 0 70px rgba(58, 43, 27, .2);
  overflow: hidden;
}

.topbar {
  height: calc(88px + env(safe-area-inset-top));
  padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(247, 242, 234, .9);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,.8);
}
.brand { flex: 1; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 0; }
.brand-mark { width: 50px; height: 50px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold); box-shadow: var(--soft-shadow); position: relative; overflow: hidden; }
.brand-mark:before, .brand-mark:after { content: ""; position: absolute; width: 36px; height: 12px; border-top: 2px solid var(--gold); border-radius: 50%; left: 6px; bottom: 7px; transform: rotate(-7deg); opacity: .65; }
.brand-mark:after { bottom: 2px; left: 11px; }
.brand-mark b { font-size: 17px; font-weight: 500; transform: translateY(-4px); }
.brand strong { display: block; font-size: 29px; letter-spacing: .14em; font-weight: 500; line-height: 1.1; color: #806642; }
.brand small { color: var(--muted); letter-spacing: .25em; font-size: 10px; }
.icon-btn { width: 46px; height: 46px; border-radius: 15px; border: 1px solid rgba(139,110,71,.18); background: rgba(255,255,255,.42); box-shadow: var(--soft-shadow); font-size: 29px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:active { transform: scale(.96); }
.is-hidden { display: none !important; }

.page { min-height: calc(100dvh - 170px); padding: 14px 14px calc(105px + env(safe-area-inset-bottom)); overflow-x: hidden; }
.hero { position: relative; height: 298px; overflow: hidden; border-radius: 26px; border: 1px solid rgba(125,94,56,.32); box-shadow: var(--shadow); background: #d8c7b1; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .4s; }
.hero:after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(29,20,12,.72)); }
.hero-copy { position: absolute; left: 22px; right: 22px; bottom: 22px; color: white; z-index: 2; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.hero-copy .eyebrow { opacity: .84; font-size: 12px; letter-spacing: .25em; }
.hero-copy h1 { margin: 6px 0 4px; font-size: 30px; font-weight: 500; letter-spacing: .05em; }
.hero-copy p { margin: 0; opacity: .88; font-size: 13px; }
.hero-dots { position: absolute; right: 18px; bottom: 22px; z-index: 3; display: flex; gap: 5px; }
.hero-dots i { display: block; width: 6px; height: 6px; background: rgba(255,255,255,.5); border-radius: 9px; }
.hero-dots i.active { width: 18px; background: #fff; }

.quick-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 18px -2px 8px; }
.quick-cat { border: 0; background: transparent; padding: 0; min-width: 0; }
.quick-cat span { height: 64px; border: 1px solid rgba(132,102,66,.15); background: linear-gradient(145deg, rgba(255,255,255,.74), rgba(226,214,197,.68)); border-radius: 19px; display: grid; place-items: center; font-size: 25px; color: var(--gold); box-shadow: var(--soft-shadow); }
.quick-cat b { display: block; font-size: 12px; font-weight: 400; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.section { margin-top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 15px; margin-bottom: 12px; }
.section:first-child .section-head { border: 0; }
.section-head h2 { margin: 0; font-size: 23px; font-weight: 500; }
.section-head button { border: 0; background: none; color: var(--muted); padding: 5px; }
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.card-row::-webkit-scrollbar { display: none; }
.case-card { scroll-snap-align: start; border-radius: 20px; overflow: hidden; background: var(--white); border: 1px solid rgba(132,101,62,.18); box-shadow: var(--soft-shadow); position: relative; text-align: left; }
.case-card .case-image { height: 158px; width: 100%; object-fit: cover; display: block; }
.case-card-body { padding: 12px 13px 13px; position: relative; }
.case-card h3 { margin: 0 42px 4px 0; font-size: 18px; font-weight: 500; }
.case-card p { color: var(--muted); font-size: 12px; margin: 0; }
.fav-btn { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.78); font-size: 20px; display: grid; place-items: center; z-index: 2; }
.fav-btn.active { color: #a06645; background: #f5e7da; }
.badge { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 9px; background: linear-gradient(135deg, #b49665, #8c6c3c); color: white; border-radius: 12px; font-size: 11px; }
.material-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.material { text-align: center; font-size: 11px; }
.material i { display: block; aspect-ratio: 1; border-radius: 17px; border: 1px solid rgba(128,97,60,.2); box-shadow: var(--soft-shadow); margin-bottom: 7px; background-color: #e6ddd0; }
.material:nth-child(1) i { background: linear-gradient(135deg,#eee8df,#cfc2b1); }
.material:nth-child(2) i { background: radial-gradient(circle at 20% 20%,#fff 0 3px,transparent 4px), #d9c9b2; background-size:15px 15px; }
.material:nth-child(3) i { background: repeating-radial-gradient(ellipse at 10% 70%,#e9dfd2 0 4px,#cdbca6 5px 8px); }
.material:nth-child(4) i { background: repeating-linear-gradient(70deg,#b99b67 0 2px,#d6bf91 2px 5px); }
.material:nth-child(5) i { background: radial-gradient(circle,#f8f1e6 1px,#ccbfae 4px,#e7ddd0 7px); background-size: 14px 14px; }

.search-box { position: relative; margin: 4px 0 14px; }
.search-box input { width: 100%; border: 1px solid rgba(134,103,63,.2); background: rgba(255,255,255,.48); box-shadow: var(--soft-shadow); border-radius: 18px; padding: 15px 45px 15px 17px; outline: none; color: var(--ink); }
.search-box button { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 13px; background: var(--paper-2); font-size: 20px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid rgba(126,95,57,.16); background: rgba(255,255,255,.45); border-radius: 14px; padding: 9px 16px; box-shadow: 0 2px 6px rgba(65,44,23,.05); }
.chip.active { background: linear-gradient(135deg,#b99a67,#957542); color: white; }
.masonry { columns: 2; column-gap: 10px; }
.masonry .case-card { break-inside: avoid; margin-bottom: 10px; display: inline-block; width: 100%; }
.masonry .case-card:nth-child(3n+2) .case-image { height: 210px; }
.masonry .case-image { height: 170px; }
.masonry .case-card h3 { font-size: 16px; }
.empty { text-align: center; padding: 70px 24px; color: var(--muted); }
.empty span { display: block; font-size: 54px; opacity: .55; margin-bottom: 12px; }

.creator-preview { height: 230px; border-radius: 24px; overflow: hidden; position: relative; box-shadow: var(--shadow); border: 1px solid rgba(134,102,62,.25); }
.creator-preview img { width: 100%; height: 100%; object-fit: cover; }
.creator-preview:after { content: "AI 场景预览"; position: absolute; bottom: 11px; right: 12px; color: white; background: rgba(41,30,18,.5); backdrop-filter: blur(10px); padding: 5px 10px; border-radius: 10px; font-size: 10px; letter-spacing: .1em; }
.config-card { background: rgba(255,255,255,.45); border: 1px solid rgba(126,95,57,.15); border-radius: 20px; padding: 15px; margin-top: 12px; box-shadow: var(--soft-shadow); }
.config-title { margin: 0 0 11px; font-size: 18px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.choice-grid { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.choice { flex: 0 0 auto; min-width: 72px; border: 1px solid rgba(126,95,57,.16); border-radius: 13px; padding: 9px 13px; background: rgba(255,255,255,.44); }
.choice.active { color: white; border-color: #9e7e4d; background: linear-gradient(135deg,#b99a67,#94713d); box-shadow: 0 6px 14px rgba(151,116,62,.25); }
.swatch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.swatch { border: 1px solid transparent; background: none; border-radius: 14px; padding: 5px; color: var(--muted); font-size: 11px; }
.swatch i { height: 55px; display: block; border-radius: 11px; margin-bottom: 5px; background: linear-gradient(135deg,#eee6d9,#cdbda7); }
.swatch:nth-child(2) i { background: repeating-radial-gradient(ellipse,#e4d9c9 0 3px,#c0aa8e 4px 7px); }
.swatch:nth-child(3) i { background: radial-gradient(circle at 25% 25%,#f8efe0 0 4px,#cdbb9f 5px 8px); background-size: 17px 17px; }
.swatch:nth-child(4) i { background: repeating-linear-gradient(45deg,#dfd3c2 0 4px,#bda98c 5px 7px); }
.swatch:nth-child(5) i { background: repeating-linear-gradient(80deg,#d7bd83 0 2px,#ad8950 3px 5px); }
.swatch:nth-child(6) i { background: linear-gradient(145deg,#f4ede4,#cfc2b3); }
.swatch.active { border-color: var(--gold); background: rgba(202,178,137,.15); color: var(--ink); }
.dimension-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 9px; }
.field label { display: block; color: var(--muted); font-size: 11px; margin: 0 0 5px 4px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid rgba(127,95,56,.17); background: rgba(255,255,255,.58); border-radius: 13px; padding: 12px; outline: none; }
.field textarea { min-height: 74px; resize: vertical; }
.dimension-row b { padding-bottom: 12px; font-weight: 400; color: var(--muted); }
.switch-row { display: flex; justify-content: space-between; align-items: center; }
.switch { width: 51px; height: 29px; padding: 3px; border: 0; border-radius: 20px; background: #c9c0b4; transition: .2s; }
.switch:before { content: ""; display: block; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: .2s; }
.switch.active { background: var(--gold); }
.switch.active:before { transform: translateX(22px); }
.price-box { padding: 17px; border-radius: 19px; background: linear-gradient(135deg,rgba(255,255,255,.7),rgba(225,211,190,.7)); border: 1px solid rgba(137,102,57,.2); margin: 12px 0; }
.price-box small { color: var(--muted); }
.price-box strong { display: block; color: #9b7643; font-size: 28px; margin-top: 4px; font-weight: 500; }
.primary-btn, .secondary-btn { width: 100%; border-radius: 18px; padding: 15px; border: 1px solid #8f6d3d; font-size: 18px; letter-spacing: .12em; }
.primary-btn { color: white; background: linear-gradient(135deg,#b49664,#896535); box-shadow: 0 8px 20px rgba(128,93,46,.26), inset 0 1px rgba(255,255,255,.35); }
.secondary-btn { background: rgba(255,255,255,.58); border-color: var(--line); }
.primary-btn:disabled { opacity: .55; }

.profile-hero { border-radius: 26px; padding: 22px; background: linear-gradient(135deg,rgba(255,255,255,.7),rgba(228,214,195,.66)); border: 1px solid rgba(135,101,58,.17); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.profile-hero:after { content: ""; position: absolute; width: 220px; height: 160px; right: -65px; top: -50px; border: 1px solid rgba(160,126,80,.18); border-radius: 50%; box-shadow: 0 0 0 18px rgba(160,126,80,.04), 0 0 0 36px rgba(160,126,80,.04); }
.person { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.avatar { width: 72px; height: 72px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); background: linear-gradient(145deg,#d4bf9c,#8f6e42); display: grid; place-items: center; color: white; font-size: 28px; box-shadow: var(--soft-shadow); }
.person h1 { margin: 0 0 3px; font-size: 29px; font-weight: 500; }
.person p { margin: 0; color: var(--muted); font-size: 12px; }
.verified { display: inline-block; margin-top: 6px; background: linear-gradient(135deg,#b59662,#8f6e3c); color: #fff; padding: 3px 9px; border-radius: 10px; font-size: 10px; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 18px; background: rgba(255,255,255,.4); border-radius: 18px; position: relative; z-index: 1; }
.stat { text-align: center; padding: 13px 3px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat strong { display: block; font-size: 20px; color: #80643d; }
.stat span { font-size: 10px; color: var(--muted); }
.menu-card { background: rgba(255,255,255,.48); border: 1px solid rgba(128,96,57,.15); border-radius: 20px; margin-top: 14px; box-shadow: var(--soft-shadow); overflow: hidden; }
.menu-item { width: 100%; border: 0; background: transparent; padding: 15px 16px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); text-align: left; }
.menu-item:last-child { border: 0; }
.menu-item i { font-style: normal; font-size: 22px; color: var(--gold); width: 28px; text-align: center; }
.menu-item b { margin-left: auto; color: var(--muted); font-weight: 400; }

.bottom-nav { position: fixed; width: min(100%, 470px); bottom: 0; height: calc(76px + env(safe-area-inset-bottom)); padding: 7px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5,1fr); background: rgba(247,242,234,.9); backdrop-filter: blur(22px); border-top: 1px solid rgba(255,255,255,.82); box-shadow: 0 -12px 32px rgba(71,51,29,.08); z-index: 45; border-radius: 26px 26px 0 0; }
.bottom-nav button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); min-width: 0; }
.bottom-nav span { font-size: 28px; line-height: 35px; }
.bottom-nav b { font-weight: 400; font-size: 11px; }
.bottom-nav button.active { color: #8a6738; }
.bottom-nav .create-nav span { width: 48px; height: 48px; line-height: 44px; margin-top: -23px; border-radius: 50%; color: white; font-size: 35px; background: linear-gradient(145deg,#c4a676,#8a6735); border: 3px solid #f3ede4; box-shadow: 0 7px 18px rgba(102,74,39,.28); }
.bottom-nav .create-nav b { margin-top: -3px; }

.modal { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; }
.modal.open { visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(45,34,23,.42); opacity: 0; transition: .25s; backdrop-filter: blur(4px); }
.modal.open .modal-backdrop { opacity: 1; }
.modal-sheet { position: absolute; left: 50%; bottom: 0; width: min(100%,470px); max-height: 91dvh; overflow-y: auto; background: var(--paper); border-radius: 28px 28px 0 0; padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%,100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -20px 60px rgba(45,31,18,.2); }
.modal.open .modal-sheet { transform: translate(-50%,0); }
.modal-close { position: sticky; float: right; top: 0; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.84); font-size: 22px; }
.detail-image { width: 100%; height: 260px; object-fit: cover; border-radius: 22px; margin-bottom: 16px; }
.detail-title { margin: 0; font-size: 28px; font-weight: 500; }
.detail-sub { color: var(--muted); margin: 6px 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 17px; }
.tag { background: rgba(255,255,255,.55); border: 1px solid var(--line); padding: 6px 10px; border-radius: 10px; font-size: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 14px 0 20px; }
.feature { padding: 12px 7px; text-align: center; border-radius: 15px; background: rgba(255,255,255,.48); border: 1px solid var(--line); font-size: 11px; }
.feature b { display: block; color: #8a693d; font-size: 18px; margin-bottom: 4px; }
.modal h2 { font-weight: 500; }
.form-grid { display: grid; gap: 11px; clear: both; }
.quote-total { display: flex; justify-content: space-between; align-items: flex-end; padding: 16px 0; border-top: 1px solid var(--line); margin-top: 9px; }
.quote-total strong { font-size: 29px; color: #987344; font-weight: 500; }
.line-items { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,.43); }
.line-item { display: flex; justify-content: space-between; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.line-item:last-child { border: 0; }
.chat-log { padding: 12px 0; min-height: 180px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 84%; padding: 11px 13px; border-radius: 16px; background: white; box-shadow: var(--soft-shadow); font-size: 13px; }
.bubble.user { align-self: flex-end; background: #a68655; color: white; }
.chat-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-input input { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: white; min-width: 0; }
.chat-input button { border: 0; border-radius: 14px; padding: 0 17px; background: var(--gold); color: white; }
.toast { position: fixed; left: 50%; bottom: calc(95px + env(safe-area-inset-bottom)); z-index: 200; transform: translate(-50%,20px); opacity: 0; background: rgba(53,40,27,.9); color: white; border-radius: 20px; padding: 10px 17px; font-size: 12px; pointer-events: none; transition: .25s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid #d7c9b5; border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: auto auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100dvh - 48px); max-height: calc(100dvh - 48px); border-radius: 42px; border: 7px solid rgba(255,255,255,.54); }
  .page { height: calc(100dvh - 136px); overflow-y: auto; }
  .bottom-nav { bottom: 24px; border-radius: 26px 26px 35px 35px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; } }
