:root {
  --green-950: #0c2f20;
  --green-900: #123f2c;
  --green-800: #17613f;
  --green-700: #1f7a4c;
  --green-600: #2f9b62;
  --green-100: #eaf7ef;
  --green-50: #f4fbf6;
  --wood: #b78457;
  --ink: #1f2923;
  --muted: #7e8b84;
  --line: #e2e9e4;
  --surface: #ffffff;
  --shadow: 0 18px 42px rgba(24, 63, 42, 0.12);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background: #fff;
  color: var(--ink);
}

body {
  min-width: 320px;
  margin: 0;
  padding-top: 70px;
  background:
    radial-gradient(circle at 50% 260px, rgba(47, 155, 98, 0.1), transparent 330px),
    linear-gradient(180deg, var(--green-50) 0, #fff 390px);
}

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

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  cursor: pointer;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 48px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 233, 228, 0.72);
  backdrop-filter: blur(18px);
}

.brand,
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand {
  font-size: 24px;
  color: #252724;
}

.brand-logo {
  display: block;
  width: 116px;
  height: 38px;
  object-fit: contain;
}

.brand-name {
  color: #252724;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  color: #526159;
  font-size: 14px;
}

.nav-feature-actions {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: 0;
  transform: translate(-50%, -50%);
}

.nav-feature-actions button,
.nav-feature-actions a {
  min-height: 36px;
  padding: 0 16px;
  color: #526159;
  background: transparent !important;
  border: 0 !important;
  border-radius: 18px;
  font-weight: 400;
  white-space: nowrap;
}

.nav-feature-actions button:hover,
.nav-feature-actions a:hover {
  background: var(--green-800) !important;
  color: #fff;
}

.top-actions a,
.top-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 18px;
  background: transparent;
}

.top-actions a:hover {
  color: #fff;
  background: var(--green-800);
}

.nav-link-button {
  color: #526159;
  background: transparent !important;
  border: 0 !important;
}

.nav-link-button:hover {
  color: #fff;
  background: var(--green-800) !important;
}

.top-actions .nav-feature-actions button {
  min-height: 36px;
  padding: 0 16px;
  color: #526159;
  background: transparent !important;
  border: 0 !important;
  border-radius: 18px;
  font-weight: 400;
}

.top-actions .nav-feature-actions button:hover {
  background: var(--green-800) !important;
  color: #fff;
}

.top-actions [data-view-link].active,
.nav-feature-actions [data-view-link].active {
  color: #fff !important;
  background: var(--green-800) !important;
  font-weight: 800;
}

.top-actions a[data-view-link].active {
  color: #fff;
  background: var(--green-800);
}

.dark-button {
  color: #fff;
  background: var(--green-950) !important;
}

.membership-nav-button {
  color: #fff !important;
  background: var(--green-800) !important;
  font-weight: 800;
}

.membership-nav-button:hover {
  color: #fff !important;
  background: var(--green-900) !important;
}

.account-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-900);
  font-size: 13px;
  white-space: nowrap;
}

.account-pill[hidden] {
  display: none !important;
}

.top-actions .account-trigger {
  display: grid;
  place-items: center;
  min-height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.top-actions .account-trigger:hover,
.account-pill.is-open .account-trigger {
  background: transparent;
}

.account-pill:hover,
.account-pill.is-open {
  background: transparent;
}

.account-credits {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  line-height: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.account-credits:hover {
  border-color: #b8dbc5;
  box-shadow: 0 5px 16px rgba(17, 97, 60, 0.1);
  transform: translateY(-1px);
}

.coin-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: linear-gradient(180deg, #f6c45a 0%, #d99a22 100%);
  border: 1px solid rgba(129, 84, 12, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(112, 69, 8, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--green-800);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 35;
  min-width: 132px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(12, 47, 32, 0.16);
}

.account-dropdown::before {
  position: absolute;
  right: 18px;
  top: -6px;
  width: 10px;
  height: 10px;
  content: "";
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

.top-actions .account-dropdown button {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 0 14px;
  color: #fff;
  background: var(--green-950);
  border-radius: 8px;
  font-weight: 800;
}

.top-actions .account-dropdown button:hover {
  background: var(--green-800);
}

.top-actions .account-dropdown button + button {
  margin-top: 6px;
}

.customer-service-button {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 35;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #fff;
  background: var(--green-800);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 18px 34px rgba(23, 97, 63, 0.28);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.customer-service-button:hover {
  background: var(--green-900);
  box-shadow: 0 20px 42px rgba(23, 97, 63, 0.34);
  transform: translateY(-2px);
}

.customer-service-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.customer-service-modal[hidden] {
  display: none !important;
}

.customer-service-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 47, 32, 0.48);
  backdrop-filter: blur(8px);
}

.customer-service-dialog {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 48px));
  padding: 26px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(226, 233, 228, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(12, 47, 32, 0.24);
}

.customer-service-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.customer-service-close:hover {
  color: var(--green-950);
  background: var(--green-50);
}

.customer-service-dialog h2 {
  margin: 0;
  color: var(--green-950);
  font-size: 24px;
}

.customer-service-dialog p {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.customer-service-qr {
  overflow: hidden;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-service-qr img {
  display: block;
  width: 100%;
  height: auto;
}

.page-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: rgba(12, 47, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(12, 47, 32, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.96);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.page-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 47, 32, 0.68);
  backdrop-filter: blur(3px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 24px 26px 22px;
  background: #fff;
  border: 1px solid rgba(226, 233, 228, 0.9);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(4, 28, 18, 0.28);
}

.auth-dialog h2 {
  margin: 0 0 14px;
  color: #151a17;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 900;
}

.auth-dialog p {
  margin: 10px 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e7e7e7;
}

.auth-tabs button {
  position: relative;
  min-height: 34px;
  color: #999;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 16px;
  font-weight: 500;
}

.auth-tabs button.active {
  color: #151a17;
  background: transparent;
  box-shadow: none;
  font-weight: 900;
}

.auth-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #67bd8d;
}

.auth-dialog label {
  display: block;
  margin-bottom: 16px;
}

.auth-dialog label > span {
  display: block;
  margin-bottom: 7px;
  color: #333;
  font-size: 15px;
  font-weight: 900;
}

.auth-dialog input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 10px;
  outline: none;
  font-size: 15px;
}

.auth-dialog input:focus {
  border-color: #67bd8d;
  box-shadow: 0 0 0 3px rgba(103, 189, 141, 0.14);
}

.auth-close {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #8b8b8b;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 200;
  line-height: 1;
}

.auth-close:hover {
  background: var(--green-100);
}

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

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

.captcha-row button {
  min-height: 46px;
  padding: 0;
  overflow: hidden;
  background: #f8fbf9;
  border: 1px solid #dedede;
  border-radius: 10px;
}

.captcha-row img {
  display: block;
  width: 100%;
  height: 46px;
  object-fit: cover;
}

.captcha-row [data-captcha-placeholder] {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 46px;
  color: var(--green-800);
  font-size: 14px;
  font-weight: 800;
}

.code-row button {
  min-height: 46px;
  color: #171d19;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
}

.code-row button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.auth-tip {
  min-height: 22px;
  margin: -4px 0 10px;
  color: #8f9892;
  font-size: 13px;
  line-height: 1.6;
}

.auth-tip.is-error {
  color: #b42318;
  font-weight: 700;
}

.link-button {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-height: 22px;
  margin: -8px 0 12px;
  padding: 0;
  color: var(--green-800);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 800;
}

.agree-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: -2px;
  margin-bottom: 16px !important;
  color: #777;
  font-size: 13px;
}

.agree-row input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  accent-color: var(--green-800);
}

.agree-row span {
  display: inline !important;
  margin: 0 !important;
  color: #777 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.agree-row a {
  color: var(--green-800);
  font-weight: 800;
}

.auth-dialog > .primary-action {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  background: #67bd8d;
  font-size: 17px;
  color: #111915;
}

.auth-dialog > .primary-action:disabled {
  cursor: not-allowed;
  color: #999;
  background: #ddd;
}

.auth-footnote {
  margin: 12px 0 0 !important;
  text-align: center;
  color: #9a9a9a !important;
  font-size: 14px;
}

.recharge-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: center;
  padding: 24px;
}

.recharge-modal[hidden] {
  display: none !important;
}

.history-view {
  width: 100%;
}

.legal-view {
  width: 100%;
}

.legal-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 46px 28px 64px;
  color: #19362a;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(21, 78, 50, 0.08);
}

.legal-shell .section-kicker {
  margin: 0 0 8px;
  color: var(--green-800);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-shell h2 {
  margin: 0 0 8px;
  color: #071e16;
  font-size: 34px;
  line-height: 1.18;
}

.legal-date {
  margin: 0 0 28px;
  color: #6c7d73;
  font-size: 14px;
}

.legal-shell h3 {
  margin: 30px 0 10px;
  color: #0f3325;
  font-size: 20px;
  line-height: 1.35;
}

.legal-shell p {
  margin: 0 0 14px;
  color: #3f5148;
  font-size: 16px;
  line-height: 1.85;
}

.history-shell {
  display: grid;
  gap: 20px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.history-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.history-card:hover {
  border-color: #b8dbc5;
  box-shadow: 0 12px 26px rgba(17, 97, 60, 0.1);
  transform: translateY(-1px);
}

.history-card-open {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
}

.history-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--green-50);
}

.history-download {
  right: 10px;
  bottom: 64px;
  min-height: 30px;
  padding: 0 10px;
}

.history-card-body {
  display: grid;
  gap: 5px;
  padding: 10px 11px 12px;
}

.history-card-body strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-body span {
  color: #66746d;
  font-size: 12px;
  line-height: 1.4;
}

.history-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 56px 16px;
  color: var(--muted);
  text-align: center;
  background: var(--green-50);
  border: 1px dashed #cbdcd1;
  border-radius: 8px;
}

.history-preview {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(28, 63, 44, 0.08);
}

.history-preview[hidden] {
  display: none !important;
}

.history-preview-head,
.history-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.history-preview-head span {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-preview-head h3 {
  margin: 4px 0 0;
  color: var(--green-950);
  font-size: 20px;
  line-height: 1.25;
}

.history-preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  background: var(--green-50);
  border: 1px solid #e0ebe4;
  border-radius: 8px;
}

.history-preview img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 6px;
}

.history-preview-arrow {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--green-950);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(18, 63, 44, 0.14);
  border-radius: 50%;
}

.history-preview-arrow {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  font-size: 38px;
  line-height: 1;
}

.history-preview-arrow.previous {
  left: 22px;
}

.history-preview-arrow.next {
  right: 22px;
}

.history-preview-arrow:hover {
  background: #fff;
}

.history-preview-foot {
  color: #66746d;
  font-size: 13px;
  font-weight: 800;
}

.recharge-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 47, 32, 0.68);
  backdrop-filter: blur(3px);
}

.recharge-dialog {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(226, 233, 228, 0.9);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(4, 28, 18, 0.28);
}

.recharge-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 32px;
}

.recharge-heading-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(180deg, #f6c45a 0%, #d99a22 100%);
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(112, 69, 8, 0.16);
  font-size: 20px;
  font-weight: 900;
}

.recharge-heading h2 {
  margin: 0;
  color: #151a17;
  font-size: 24px;
  font-weight: 900;
}

.recharge-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recharge-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  padding: 13px 15px;
  color: #526159;
  background: #f3faf5;
  border: 1px solid #dceee2;
  border-radius: 12px;
  font-size: 14px;
}

.recharge-balance strong {
  color: var(--green-900);
  font-size: 18px;
}

.recharge-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.recharge-form legend,
.recharge-custom > span:first-child {
  display: block;
  margin-bottom: 9px;
  color: #333;
  font-size: 14px;
  font-weight: 900;
}

.recharge-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.recharge-options button {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 10px;
  color: #26322b;
  background: #fff;
  border: 1px solid #dfe7e2;
  border-radius: 12px;
  text-align: center;
}

.recharge-options button:hover,
.recharge-options button.active {
  color: var(--green-900);
  background: #f2faf5;
  border-color: #67bd8d;
  box-shadow: 0 0 0 2px rgba(103, 189, 141, 0.12);
}

.recharge-options strong {
  font-size: 20px;
}

.recharge-options span {
  color: #7a857e;
  font-size: 12px;
}

.recharge-custom {
  display: block;
  margin-top: 18px;
}

.recharge-input-wrap {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dedede;
  border-radius: 10px;
}

.recharge-input-wrap:focus-within {
  border-color: #67bd8d;
  box-shadow: 0 0 0 3px rgba(103, 189, 141, 0.14);
}

.recharge-input-wrap b {
  color: #526159;
  font-size: 16px;
}

.recharge-input-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.recharge-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  color: #6f7b74;
  border-top: 1px solid #edf0ee;
  font-size: 14px;
}

.recharge-summary strong {
  color: var(--green-900);
}

.recharge-message {
  min-height: 22px;
  margin: 10px 0 4px;
  color: #b42318;
  font-size: 13px;
  line-height: 1.6;
}

.wechat-pay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  color: #fff;
  background: #07c160;
  border: 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
}

.wechat-pay-button:hover {
  background: #06ad56;
}

.wechat-pay-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.wechat-pay-button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #07c160;
  background: #fff;
  border-radius: 50%;
  font-size: 12px;
}

.recharge-form > small {
  display: block;
  margin-top: 10px;
  color: #9aa39e;
  text-align: center;
}

.wechat-qr-panel {
  display: grid;
  justify-items: center;
  padding-top: 20px;
  text-align: center;
}

.wechat-qr-panel[hidden] {
  display: none !important;
}

.wechat-qr-frame {
  width: 252px;
  height: 252px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dfe7e2;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(17, 97, 60, 0.1);
}

.wechat-qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
}

.wechat-qr-panel h3 {
  margin: 18px 0 6px;
  color: #1c2821;
  font-size: 19px;
}

.wechat-qr-panel p {
  margin: 0;
  color: #6f7b74;
  font-size: 14px;
}

.wechat-payment-status {
  width: 100%;
  margin: 18px 0 12px;
  padding: 11px 14px;
  color: #526159;
  background: #f3faf5;
  border-radius: 10px;
  font-size: 13px;
}

.wechat-payment-status.is-paid {
  color: #087c3c;
  background: #eaf9f0;
  font-weight: 900;
}

.wechat-qr-panel .primary-action {
  min-height: 42px;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 56px 76px;
}

main:has(.whole-house-view.active),
main:has(.tool-view.active),
main:has(.studio-view.active),
main:has(.admin-view.active) {
  width: 100%;
  max-width: none;
  padding: 0 18px 28px;
}

.admin-shell {
  display: grid;
  gap: 18px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 92px 0 34px;
}

.admin-heading,
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-heading > div > span,
.admin-card-head > div > span {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-heading h2 {
  margin: 5px 0 4px;
  color: var(--green-950);
  font-size: 30px;
}

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

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

.admin-metrics article,
.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(13, 57, 36, 0.06);
}

.admin-metrics article {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.admin-metrics span {
  color: #718078;
  font-size: 13px;
  font-weight: 800;
}

.admin-metrics strong {
  color: var(--green-950);
  font-size: 28px;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px;
  background: #eef7f1;
  border: 1px solid #dcebe2;
  border-radius: 16px;
}

.admin-tabs button {
  min-height: 42px;
  padding: 0 18px;
  color: #42604f;
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.admin-tabs button.active {
  color: #fff;
  background: var(--green-700);
  box-shadow: 0 8px 18px rgba(20, 120, 72, 0.18);
}

.admin-panel {
  display: grid;
  gap: 18px;
}

.admin-panel[hidden] {
  display: none;
}

.admin-credit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.admin-channel-grid {
  display: grid;
  gap: 18px;
}

.admin-channel-group {
  display: grid;
  gap: 12px;
}

.admin-channel-group h4 {
  margin: 0;
  color: var(--green-950);
  font-size: 18px;
}

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

.admin-channel-group-grid article {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #f8fbf9;
  border: 1px solid #dcebe2;
  border-radius: 14px;
}

.admin-channel-group-grid article.is-active {
  background: #eef9f2;
  border-color: #67bd8d;
  box-shadow: 0 8px 22px rgba(20, 120, 72, 0.1);
}

.admin-channel-grid span {
  color: #718078;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-channel-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--green-950);
  font-size: 22px;
}

.admin-channel-grid p {
  margin: 0;
  color: #415048;
  line-height: 1.6;
}

.admin-channel-grid small {
  color: #718078;
}

.admin-card {
  padding: 20px;
}

.admin-card-head {
  margin-bottom: 16px;
}

.admin-card-head h3 {
  margin: 4px 0 0;
  color: #1a2b21;
  font-size: 20px;
}

.admin-credit-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-selected-user {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 82px;
  margin-top: 14px;
  padding: 14px;
  color: #607068;
  background: #f7fbf8;
  border: 1px dashed #cfe3d6;
  border-radius: 12px;
}

.admin-selected-user span,
.admin-selected-user small {
  display: block;
  color: #718078;
  font-size: 12px;
  font-weight: 800;
}

.admin-selected-user strong {
  display: block;
  margin: 4px 0;
  color: var(--green-950);
  font-size: 22px;
}

.admin-user-match-head,
.admin-user-match-list {
  grid-column: 1 / -1;
}

.admin-user-match-head {
  color: #46534b;
  font-size: 13px;
  font-weight: 900;
}

.admin-user-match-list {
  display: grid;
  gap: 8px;
}

.admin-user-match-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  color: #263a2f;
  background: #fff;
  border: 1px solid #dcebe2;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.admin-user-match-list button:hover {
  border-color: #67bd8d;
  box-shadow: 0 6px 18px rgba(13, 57, 36, 0.08);
}

.admin-user-match-list button span,
.admin-user-match-list button small {
  margin: 0;
}

.admin-user-match-list button span {
  color: var(--green-950);
  font-size: 15px;
  font-weight: 900;
}

.admin-recharge-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  gap: 13px;
}

.admin-recharge-form .admin-card-head,
.admin-recharge-form .admin-form-hint,
.admin-recharge-form label:last-of-type,
.admin-recharge-form > p,
.admin-recharge-form > button {
  grid-column: 1 / -1;
}

.admin-form-hint {
  margin: -6px 0 0;
  color: #718078;
  font-size: 13px;
}

.admin-recharge-form label > span,
.admin-credit-search label > span {
  display: block;
  margin-bottom: 7px;
  color: #46534b;
  font-size: 13px;
  font-weight: 800;
}

.admin-recharge-form input,
.admin-credit-search input,
.admin-filter select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d9e3dc;
  border-radius: 9px;
  outline: none;
}

.admin-recharge-form input:focus,
.admin-credit-search input:focus,
.admin-filter select:focus {
  border-color: #67bd8d;
  box-shadow: 0 0 0 3px rgba(103, 189, 141, 0.12);
}

.admin-recharge-form > p {
  min-height: 20px;
  margin: -4px 0 0;
  color: #b42318;
  font-size: 13px;
}

.admin-recharge-form > p.is-success {
  color: #087c3c;
  font-weight: 800;
}

.admin-policy-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-policy-card li {
  padding: 13px 14px;
  color: #415048;
  background: #f3faf5;
  border-left: 3px solid #67bd8d;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.admin-table-card {
  min-width: 0;
}

.admin-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #66746c;
  font-size: 13px;
  font-weight: 800;
}

.admin-filter select {
  width: 112px;
  min-height: 36px;
}

.admin-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #edf1ee;
  border-radius: 10px;
}

.admin-table-wrap table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table-wrap th,
.admin-table-wrap td {
  padding: 12px 13px;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
  vertical-align: top;
}

.admin-table-wrap th {
  color: #5d6d64;
  background: #f7faf8;
  font-weight: 900;
  white-space: nowrap;
}

.admin-table-wrap td {
  max-width: 300px;
  color: #334139;
  line-height: 1.5;
}

.admin-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table-wrap tbody tr:hover td {
  background: #fbfdfb;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-status.success,
.admin-status.paid {
  color: #087c3c;
  background: #e7f8ee;
}

.admin-status.failed,
.admin-status.denied {
  color: #b42318;
  background: #fff0ed;
}

.admin-status.processing,
.admin-status.pending {
  color: #8b5b00;
  background: #fff7df;
}

.admin-error-text {
  color: #a93226;
}

.admin-credit-plus {
  color: #087c3c !important;
  font-weight: 900;
}

.admin-credit-minus {
  color: #b42318 !important;
  font-weight: 900;
}

.admin-empty-row {
  padding: 26px !important;
  color: #8a958f !important;
  text-align: center !important;
}

.site-footer {
  display: none;
  color: rgba(229, 244, 235, 0.82);
  background: #081711;
  border-top: 1px solid rgba(111, 175, 135, 0.18);
}

body:has(#home.active) .site-footer {
  display: block;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1440px, 100%);
  min-height: 84px;
  margin: 0 auto;
  padding: 22px 56px;
}

.site-footer-links,
.site-footer-records,
.police-record {
  display: inline-flex;
  align-items: center;
}

.site-footer-links {
  gap: 13px;
  font-size: 14px;
  font-weight: 700;
}

.site-footer-links span {
  width: 1px;
  height: 14px;
  background: rgba(229, 244, 235, 0.28);
}

.site-footer-links a {
  color: #e8f7ee;
}

.site-footer-links a:hover {
  color: #8ee0ac;
}

.site-footer-records {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 14px;
  color: rgba(229, 244, 235, 0.74);
}

.police-record {
  gap: 7px;
}

.record-emblem {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #ffd36b 0 22%, transparent 23%),
    radial-gradient(circle at 50% 50%, #d8342a 0 48%, #f2bf42 50% 66%, #153f77 68% 100%);
  box-shadow: 0 0 0 1px rgba(255, 224, 126, 0.45);
}

.record-emblem::after {
  position: absolute;
  inset: 5px;
  content: "";
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 190, 0.78);
}

.view {
  display: none;
  animation: fadeIn 0.22s ease-out;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 720px;
  padding-top: 220px;
  text-align: center;
}

.hero-brand {
  justify-content: center;
}

.hero-logo {
  display: block;
  width: min(280px, 58vw);
  height: auto;
  object-fit: contain;
}

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

h1 {
  color: var(--ink);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.18;
}

.hero > p {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.prompt-panel {
  width: min(1120px, calc(100vw - 160px));
  min-height: 300px;
  margin-top: 34px;
  padding: 26px;
  background: rgba(244, 251, 246, 0.92);
  border: 1px solid rgba(226, 233, 228, 0.95);
  border-radius: 26px;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.35),
    0 26px 70px rgba(24, 63, 42, 0.16);
}

.prompt-panel.template-active {
  border-color: rgba(31, 122, 76, 0.42);
  box-shadow:
    0 0 0 4px rgba(47, 155, 98, 0.1),
    var(--shadow);
}

.selected-template {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  margin-bottom: 12px;
  padding: 0 12px;
  color: var(--green-900);
  background: var(--green-100);
  border: 1px solid #bee5ca;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.selected-template[hidden] {
  display: none;
}

.prompt-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.prompt-panel-head span {
  display: block;
  margin-bottom: 12px;
  color: var(--green-800);
  font-size: 16px;
  font-weight: 900;
}

.prompt-panel-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.prompt-upload-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--green-800);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.prompt-upload-link input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.prompt-upload-link span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  font-size: 18px;
}

.prompt-panel textarea {
  display: block;
  width: 100%;
  min-height: 170px;
  padding: 26px;
  resize: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  font-size: 18px;
  line-height: 1.7;
}

.prompt-panel textarea::placeholder {
  color: #94a29a;
}

.prompt-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.prompt-upload-preview[hidden] {
  display: none;
}

.prompt-upload-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(16, 46, 30, 0.16);
}

.prompt-upload-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.prompt-upload-thumb button {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #fff;
  background: rgba(16, 26, 21, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.prompt-upload-thumb button:hover,
.prompt-upload-thumb button:focus-visible {
  background: #101a15;
}

.ai-generate-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.ai-generate-options.compact {
  margin-bottom: 10px;
}

.ai-generate-options.panel-options {
  grid-template-columns: 1fr;
}

.ai-generate-options fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ai-generate-options .model-select {
  align-self: start;
  min-width: 0;
}

.ai-generate-options legend {
  margin-bottom: 7px;
  color: #526159;
  font-size: 12px;
  font-weight: 800;
}

.segmented-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.segmented-options label {
  display: inline-flex;
}

.segmented-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-options span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  color: #526159;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.segmented-options input:checked + span {
  color: #fff;
  background: var(--green-800);
  border-color: var(--green-800);
}

.segmented-options span:hover {
  color: var(--green-900);
  background: var(--green-100);
}

.whole-house-form .segmented-options label,
.generator-card .segmented-options label,
.prompt-panel .segmented-options label {
  display: inline-flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

.whole-house-form .segmented-options span,
.generator-card .segmented-options span,
.prompt-panel .segmented-options span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 0;
  padding: 0 11px;
  color: #526159;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.whole-house-form .segmented-options input:checked + span,
.generator-card .segmented-options input:checked + span,
.prompt-panel .segmented-options input:checked + span {
  color: #fff;
  background: var(--green-800);
  border-color: var(--green-800);
}

.prompt-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.prompt-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.prompt-tool-icon,
.prompt-control-group {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #264339;
  background: rgba(255, 255, 255, 0.58);
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.prompt-tool-icon {
  justify-content: center;
  width: 32px;
  cursor: pointer;
}

.prompt-tool-icon input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.prompt-upload-button {
  gap: 6px;
  width: auto;
  min-width: 92px;
  padding: 0 11px;
  color: #fff;
  background: var(--green-800);
  border: 1px solid var(--green-900);
  box-shadow: 0 10px 20px rgba(22, 101, 52, 0.18);
}

.prompt-upload-button:hover,
.prompt-upload-button:focus-within {
  background: var(--green-900);
  box-shadow: 0 12px 24px rgba(22, 101, 52, 0.24);
}

.prompt-upload-button.is-filled {
  color: #d9ffe7;
  background: #101a15;
  border-color: #101a15;
}

.prompt-upload-button .upload-arrow {
  font-size: 15px;
  line-height: 1;
}

.prompt-control-group {
  gap: 6px;
  padding: 0 10px;
}

.prompt-select-group {
  overflow: visible;
  position: relative;
  padding-right: 6px;
}

.prompt-ratio-group {
  margin-left: 5px;
}

.prompt-custom-select {
  position: static;
  display: block;
  min-width: 52px;
}

.prompt-custom-select .select-trigger {
  position: relative;
  min-height: 32px;
  width: auto;
  min-width: 48px;
  padding: 0;
  color: #264339;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.prompt-custom-select .select-menu {
  left: 50%;
  right: auto;
  min-width: 108px;
  max-height: none;
  padding: 6px;
  overflow: visible;
  border: 1px solid #dbeee4;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(30, 63, 44, 0.16);
  transform: translateX(-50%);
}

.prompt-custom-select .select-menu button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  color: #264339;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.prompt-custom-select .select-menu button:hover,
.prompt-custom-select .select-menu button:focus-visible {
  color: var(--green-900);
  background: var(--green-100);
}

.prompt-control-group select {
  min-width: 0;
  color: #264339;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  cursor: pointer;
}

.generate-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto !important;
  min-width: 158px;
  height: 42px !important;
  padding: 0 18px !important;
  color: #75e3a2 !important;
  background: #101a15 !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 14px 26px rgba(16, 26, 21, 0.18);
  font-size: 15px !important;
  font-weight: 900;
}

button.is-generating {
  cursor: wait;
}

button.is-generating[disabled] {
  opacity: 0.82;
}

button.is-generating::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: generationSpin 0.72s linear infinite;
}

@keyframes generationSpin {
  to {
    transform: rotate(360deg);
  }
}

.tool-cluster {
  display: flex;
  gap: 8px;
}

.icon-button,
.send-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.icon-button {
  color: #47564d;
  background: #fff;
}

.upload-trigger input {
  display: none;
}

.send-button {
  color: #fff;
  background: var(--green-700);
  border-color: var(--green-700);
  font-size: 22px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}

.quick-actions button,
.tabs button,
.filter-bar button {
  min-height: 38px;
  color: #3d4a42;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.quick-actions button {
  padding: 0 17px;
}

.quick-actions button:hover,
.tabs button.active,
.tabs button:hover,
.filter-bar button.active,
.filter-bar button:hover {
  color: var(--green-950);
  background: var(--green-100);
  border-color: #caead6;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(720px, 100%);
  margin-top: 34px;
}

.hero-metrics div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  color: var(--green-900);
  font-size: 20px;
}

.hero-metrics span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.inspiration {
  padding: 20px 24px 0;
}

.section-head,
.page-heading {
  display: flex;
  gap: 20px;
}

.section-head {
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

h2 {
  font-size: 30px;
  line-height: 1.25;
}

.section-head p,
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
}

.section-head a {
  color: var(--green-700);
  font-weight: 700;
}

.tabs,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.tabs button,
.filter-bar button {
  padding: 0 22px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.case-grid.expanded {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(28, 63, 44, 0.08);
}

.case-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--green-100);
}

.case-card-body {
  padding: 14px 14px 16px;
}

.case-card h3 {
  font-size: 17px;
  line-height: 1.35;
}

.case-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.case-tags span {
  padding: 4px 8px;
  color: var(--green-800);
  background: var(--green-100);
  border-radius: 999px;
  font-size: 12px;
}

.case-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.case-actions button {
  flex: 1;
  min-height: 34px;
  color: var(--green-900);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.case-actions button.primary {
  color: #fff;
  background: var(--green-800);
  border-color: var(--green-800);
}

.page-heading {
  flex-direction: column;
  max-width: 760px;
  padding: 118px 0 34px;
}

.page-heading.compact {
  padding-top: 92px;
}

.tool-view > .page-heading,
.studio-view > .page-heading {
  display: none;
}

.page-heading span {
  color: var(--green-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.studio-layout,
.tool-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-height: calc(100vh - 70px);
  padding-top: 18px;
}

.whole-house-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 22px;
  min-height: calc(100vh - 70px);
  padding-top: 18px;
}

.whole-house-panel,
.whole-house-stage {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(28, 63, 44, 0.08);
}

.whole-house-panel {
  align-self: start;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 106px);
  overflow: auto;
  padding: 20px;
}

.panel-heading span,
.stage-toolbar span {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-heading h2,
.stage-toolbar h2 {
  margin-top: 8px;
  font-size: 24px;
}

.panel-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.whole-house-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.legacy-whole-house-form {
  display: none !important;
}

.whole-house-form label,
.whole-house-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.whole-house-form label > span,
.whole-house-form legend {
  color: #526159;
  font-size: 13px;
  font-weight: 700;
}

.whole-house-form .field-title,
.whole-house-form legend {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.whole-house-form .field-title em {
  color: #d63d3d;
  font-style: normal;
}

.whole-house-form select,
.whole-house-form input[type="number"],
.whole-house-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.whole-house-form textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.7;
}

.whole-house-form textarea:focus,
.whole-house-form input[type="number"]:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(52, 121, 79, 0.1);
}

.upload-dropzone {
  cursor: pointer;
}

.upload-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 24px;
  text-align: center;
  color: #98a19c;
  background: #fff;
  border: 2px dashed #d5d8d6;
  border-radius: 8px;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.upload-dropzone.is-dragging .upload-box,
.upload-dropzone:focus-within .upload-box {
  color: var(--green-800);
  background: var(--green-50);
  border-color: var(--green-500);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #999;
  font-size: 34px;
  line-height: 1;
}

.upload-box strong {
  margin-top: 6px;
  color: #9aa29d;
  font-size: 16px;
  font-weight: 500;
}

.upload-box small {
  color: #b0b7b3;
  font-size: 14px;
}

.upload-preview {
  width: min(100%, 280px);
  max-height: 168px;
  margin: 10px 0 8px;
  object-fit: contain;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(28, 63, 44, 0.08);
}

.upload-dropzone.has-preview .upload-icon {
  display: none;
}

.upload-dropzone.has-preview .upload-box strong {
  margin-top: 0;
  color: var(--green-900);
  font-size: 14px;
  font-weight: 800;
}

.upload-file-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--green-800) !important;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select {
  position: relative;
  display: grid;
  gap: 8px;
}

.select-trigger {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--green-300);
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(37, 136, 87, 0.08);
  font-size: 16px;
  font-weight: 800;
}

.select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 270px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(30, 63, 44, 0.16);
}

.select-menu button {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 0;
  font-size: 16px;
}

.select-menu button:hover,
.select-menu button.is-selected {
  background: var(--green-800);
  color: #fff;
  font-weight: 800;
}

.file-drop {
  padding: 14px;
  background: var(--green-50);
  border: 1px dashed #bddfc8;
  border-radius: 8px;
}

.file-drop input {
  width: 100%;
  color: var(--muted);
}

.file-drop strong,
.file-drop small {
  display: block;
}

.file-drop strong {
  color: var(--green-900);
}

.file-drop small {
  color: var(--muted);
}

.area-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.area-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 8px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.area-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.area-options label:has(input:checked) {
  background: var(--green-800);
  border-color: var(--green-800);
  color: #fff;
  font-weight: 800;
}

.area-options label:has(input:checked) span {
  color: #fff;
  font-weight: 800;
}

.area-options label:hover {
  border-color: var(--green-500);
}

.area-upload-picker {
  gap: 10px;
}

.area-upload-picker legend em {
  color: #d63d3d;
  font-style: normal;
}

.area-upload-picker > p {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.area-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.area-select-grid label {
  position: relative;
  display: block !important;
  cursor: pointer;
}

.area-select-grid input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.area-select-grid span {
  display: grid;
  min-height: 36px;
  place-items: center;
  color: var(--green-900);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.area-select-grid label:hover span {
  border-color: var(--green-500);
}

.area-select-grid input:checked + span {
  color: #fff;
  background: var(--green-700);
  border-color: var(--green-700);
  box-shadow: 0 8px 18px rgba(31, 122, 76, 0.14);
}

.area-upload-empty {
  display: grid;
  min-height: 74px;
  place-items: center;
  color: var(--muted);
  background: #f8fbf9;
  border: 1px dashed #cfe5d7;
  border-radius: 8px;
}

.area-upload-empty[hidden] {
  display: none;
}

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

.area-upload-card {
  position: relative;
  display: grid !important;
  min-height: 184px;
  padding: 10px;
  align-content: start;
  gap: 7px !important;
  background: #fff;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.area-upload-card[hidden] {
  display: none !important;
}

.area-upload-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.area-upload-card:hover,
.area-upload-card:focus-within {
  border-color: var(--green-700) !important;
  box-shadow: 0 8px 18px rgba(31, 122, 76, 0.08);
}

.area-upload-card.is-dragging {
  background: #f2fbf5;
  border-color: var(--green-700) !important;
  box-shadow: 0 0 0 3px rgba(47, 155, 98, 0.16);
}

.area-upload-card.is-dragging .area-upload-preview {
  background: #e8f7ed;
  border-color: var(--green-500);
}

.area-upload-card.has-file {
  background: var(--green-50);
  border-color: #8bd4a8 !important;
  box-shadow: inset 0 0 0 1px rgba(47, 155, 98, 0.18);
}

.area-upload-title {
  color: var(--green-950) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.area-upload-preview {
  display: grid;
  height: 120px;
  place-items: center;
  overflow: hidden;
  color: var(--green-700);
  background: #f7fbf8;
  border: 1px dashed #cfe5d7;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 800;
}

.area-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.area-upload-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.area-upload-card.has-file small {
  color: var(--green-800);
  font-weight: 800;
}

.whole-house-stage {
  min-width: 0;
  min-height: calc(100vh - 116px);
  padding: 22px;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.floor-preview {
  display: grid;
  align-items: start;
  justify-items: start;
  min-height: calc(100vh - 184px);
  margin-top: 20px;
  padding: 24px;
  background:
    linear-gradient(rgba(31, 122, 76, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 122, 76, 0.06) 1px, transparent 1px),
    #fbfdfb;
  background-size: 28px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.floor-placeholder {
  width: min(360px, 90%);
  padding: 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.floor-preview > .floor-placeholder:not(:has(.pending-preview-shell)):not(.has-result) {
  align-self: center;
  justify-self: center;
}

.floor-placeholder.has-result {
  width: 100%;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  align-self: start;
  justify-self: start;
}

.floor-placeholder strong {
  color: var(--green-900);
  font-size: 20px;
}

.floor-placeholder p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.floor-placeholder img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 260px);
  object-fit: contain;
  border-radius: 8px;
}

.render-queue {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.render-queue article {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.render-queue span {
  color: var(--green-900);
  font-weight: 800;
}

.render-queue p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.generator-card,
.result-panel,
.project-card,
.pipeline-card,
.task-card,
.budget-summary,
.budget-list {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(28, 63, 44, 0.08);
}

.generator-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.tool-layout .generator-card,
.studio-layout .generator-card {
  align-self: start;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 106px);
  overflow: auto;
  padding: 20px;
}

.generator-card label {
  display: grid;
  gap: 8px;
}

.generator-card label span {
  color: #526159;
  font-size: 13px;
  font-weight: 700;
}

.whole-house-form .segmented-options label,
.generator-card .segmented-options label,
.prompt-panel .segmented-options label {
  display: inline-flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

.whole-house-form .segmented-options span,
.generator-card .segmented-options span,
.prompt-panel .segmented-options span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 0;
  padding: 0 11px;
  color: #526159;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.whole-house-form .segmented-options input:checked + span,
.generator-card .segmented-options input:checked + span,
.prompt-panel .segmented-options input:checked + span {
  color: #fff;
  background: var(--green-800);
  border-color: var(--green-800);
}

.generator-card input,
.generator-card select,
.generator-card textarea {
  width: 100%;
  color: var(--ink);
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.generator-card input,
.generator-card select {
  height: 44px;
  padding: 0 12px;
}

.generator-card textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.generator-card .style-prompt-field {
  min-height: 132px;
  color: var(--green-900);
  background: #f1faf4;
  border-color: #caead6;
}

.tool-form .field-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.tool-form .field-title em {
  color: #d63d3d;
  font-style: normal;
}

.tool-form .field-title small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tool-form .model-select .field-title,
.generator-card .model-select .field-title {
  color: #526159;
  font-size: 12px;
  font-weight: 800;
}

.tool-form .upload-box {
  min-height: 168px;
}

.tool-form .upload-icon {
  width: 38px;
  height: 38px;
  color: #8d9891;
  font-size: 30px;
}

.optional-upload .upload-box {
  background: #fbfdfb;
}

.mask-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.mask-modal[hidden] {
  display: none !important;
}

.mask-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 12, 0.62);
  backdrop-filter: blur(6px);
}

.mask-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  width: min(1080px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(17, 69, 43, 0.14);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(5, 18, 12, 0.28);
}

.mask-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mask-dialog-head span {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mask-dialog-head h2 {
  margin-top: 6px;
  font-size: 24px;
}

.mask-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brush-size-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #526159;
  font-size: 13px;
  font-weight: 800;
}

.brush-size-control input {
  width: 180px;
  accent-color: var(--green);
}

.brush-size-control strong {
  min-width: 28px;
  color: var(--green-900);
}

.mask-modal-stage {
  display: grid;
  place-items: center;
  min-height: 320px;
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(45deg, rgba(31, 122, 76, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(31, 122, 76, 0.04) 25%, transparent 25%),
    #fbfdfb;
  background-size: 24px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mask-modal-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(6, 38, 23, 0.14);
  cursor: crosshair;
  touch-action: none;
}

.mask-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mask-dialog-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.mask-dialog-foot > div {
  display: flex;
  gap: 10px;
}

.style-preset-field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.style-preset-field legend {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.style-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.style-preset-grid label {
  display: block;
  cursor: pointer;
}

.style-preset-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-preset-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  text-align: center;
  color: #526159;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.style-preset-grid input:checked + span {
  color: #fff;
  background: var(--green-800);
  border-color: var(--green-800);
}

.style-preset-grid span:hover {
  color: var(--green-900);
  background: var(--green-100);
}

.workflow-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.primary-action {
  min-height: 44px;
  padding: 0 18px;
  color: #fff;
  background: var(--green-800);
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

.primary-action.muted {
  color: var(--green-950);
  background: var(--green-100);
}

.result-panel {
  min-height: 420px;
  padding: 24px;
}

.tool-layout .result-panel,
.studio-layout .result-panel {
  min-width: 0;
  min-height: calc(100vh - 116px);
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 22px;
}

.result-feed {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
  width: 100%;
}

.result-feed-item {
  min-width: 0;
  width: 100%;
}

.result-feed-item-wide {
  grid-column: 1 / -1;
}

.result-feed-item:has(.result-image-grid) {
  grid-column: 1 / -1;
}

.result-feed-item:has(.pending-preview-shell) {
  grid-column: 1 / -1;
}

.tool-layout .result-empty,
.studio-layout .result-empty {
  min-height: calc(100vh - 170px);
}

.tool-layout .result-empty.compact,
.studio-layout .result-empty.compact {
  min-height: 180px;
}

.result-image-frame {
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-image-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.result-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
  margin-bottom: 18px;
}

.result-image-card {
  position: relative;
  display: grid;
  gap: 10px;
  overflow: hidden;
  width: 100%;
  height: 100%;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(26, 58, 43, 0.07);
}

.result-image-open {
  display: grid;
  grid-template-rows: auto 20px;
  gap: 10px;
  width: 100%;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.result-image-card:hover {
  border-color: var(--green-500);
  box-shadow: 0 16px 34px rgba(26, 58, 43, 0.11);
}

.result-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--green-50);
  border-radius: 6px;
}

.result-image-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #526159;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  background: var(--green-800);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(12, 47, 32, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.image-download-button:hover,
.image-download-button:focus-visible {
  background: var(--green-900);
}

.image-download-button[disabled] {
  cursor: wait;
  opacity: 0.82;
}

.image-download-button span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: inherit;
  font-size: 16px;
  line-height: 1;
}

.image-download-button.is-downloading span {
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-top-color: #fff;
  border-radius: 50%;
  color: transparent;
  animation: downloadButtonSpin 0.74s linear infinite;
}

.card-download {
  position: absolute;
  right: 18px;
  bottom: 48px;
  z-index: 2;
  min-height: 30px;
  padding: 0 10px;
  background: rgba(12, 47, 32, 0.88);
}

.card-download:hover,
.card-download:focus-visible {
  background: var(--green-950);
}

@keyframes downloadButtonSpin {
  to {
    transform: rotate(360deg);
  }
}

.generated-preview-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px 84px;
}

.generated-preview-lightbox[hidden] {
  display: none;
}

.generated-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 21, 13, 0.72);
  border: 0;
}

.generated-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  max-width: calc(100vw - 168px);
  max-height: calc(100vh - 48px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.generated-preview-dialog img {
  display: block;
  max-width: calc(100vw - 168px);
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.generated-preview-close,
.generated-preview-arrow {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--green-950);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.generated-preview-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 3;
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.generated-preview-arrow {
  position: fixed;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  font-size: 30px;
  transform: translateY(-50%);
}

.generated-preview-arrow.previous {
  left: 11vw;
}

.generated-preview-arrow.next {
  left: auto;
  right: 11vw;
}

.generated-preview-dialog > span {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}

.generated-preview-download {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 3;
  min-height: 40px;
  padding: 0 16px;
}

.result-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #cbd9cf;
  border-radius: 8px;
}

.result-empty span {
  display: block;
  color: var(--green-800);
  font-weight: 800;
}

.pending-preview-shell {
  width: 100%;
  min-height: 0;
  padding: 0;
  margin: 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tool-layout .pending-preview-shell,
.studio-layout .pending-preview-shell {
  min-height: 0;
}

.result-feed .pending-preview-shell {
  min-height: 0;
}

.pending-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  align-items: stretch;
  gap: 18px;
  width: 100%;
}

.pending-preview-card {
  position: relative;
  display: grid;
  grid-template-rows: 190px minmax(0, auto);
  gap: 0;
  overflow: hidden;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(26, 58, 43, 0.08);
}

.pending-preview-thumb {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  height: 190px;
  color: var(--green-800);
  background: linear-gradient(135deg, var(--green-50), #fff);
  border: 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 800;
}

.pending-preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-preview-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
}

.pending-preview-status {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 7px 12px;
  color: var(--green-800);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.pending-preview-status i {
  width: 14px;
  height: 14px;
  background: transparent;
  border: 2px solid rgba(23, 97, 63, 0.22);
  border-top-color: var(--green-800);
  border-radius: 50%;
  animation: pendingPreviewSpin 0.74s linear infinite;
}

.pending-preview-copy h3 {
  margin: 0;
  overflow: hidden;
  color: var(--green-950);
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-preview-copy p {
  margin: 0;
  color: var(--muted);
  min-height: 44px;
  line-height: 1.55;
}

.pending-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pending-preview-meta span {
  padding: 4px 9px;
  color: #335244;
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.floor-placeholder .pending-preview-shell {
  max-width: none;
  min-height: 0;
}

.floor-placeholder .result-feed {
  width: 100%;
}

.floor-placeholder .result-feed-item-wide {
  grid-column: 1 / -1;
}

.floor-placeholder:has(.pending-preview-shell) {
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  align-self: start;
  justify-self: start;
}

.floor-placeholder .pending-preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@keyframes pendingPreviewSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1500px) {
  .result-feed,
  .result-image-grid,
  .pending-preview-grid,
  .floor-placeholder .pending-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .result-feed,
  .result-image-grid,
  .pending-preview-grid,
  .floor-placeholder .pending-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .result-feed,
  .result-image-grid,
  .pending-preview-grid,
  .floor-placeholder .pending-preview-grid {
    grid-template-columns: 1fr;
  }

  .generated-preview-lightbox {
    padding: 16px 54px;
  }

  .generated-preview-dialog {
    max-width: calc(100vw - 108px);
    max-height: calc(100vh - 32px);
    padding: 0;
  }

  .generated-preview-dialog img {
    max-width: calc(100vw - 108px);
    max-height: calc(100vh - 32px);
  }

  .generated-preview-arrow {
    width: 36px;
    height: 36px;
    font-size: 26px;
  }

  .generated-preview-arrow.previous {
    left: 10px;
  }

  .generated-preview-arrow.next {
    right: 10px;
  }

  .generated-preview-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .generated-preview-download {
    min-height: 36px;
    padding: 0 12px;
  }

  .pending-preview-shell {
    min-height: 240px;
  }

  .pending-preview-grid {
    grid-template-columns: 1fr;
  }

  .pending-preview-card {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .pending-preview-thumb {
    width: 86px;
  }

  .pending-preview-copy h3 {
    font-size: 16px;
  }
}

.result-block + .result-block {
  margin-top: 18px;
}

.result-block h3 {
  margin-bottom: 8px;
  color: var(--green-900);
}

.result-block ul {
  padding-left: 18px;
  margin: 0;
  color: #415047;
  line-height: 1.8;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  padding: 22px;
}

.project-card > span {
  display: inline-flex;
  padding: 5px 10px;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.project-card h3 {
  margin-top: 16px;
}

.project-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.progress {
  overflow: hidden;
  height: 8px;
  margin-top: 20px;
  background: #eef4f0;
  border-radius: 999px;
}

.progress i,
.budget-list i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green-700), #7fc69c);
  border-radius: inherit;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
}

.pipeline-card,
.task-card {
  padding: 22px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.pipeline div {
  padding: 16px 10px;
  text-align: center;
  background: var(--green-50);
  border-radius: 8px;
}

.pipeline strong,
.pipeline span {
  display: block;
}

.pipeline strong {
  color: var(--green-900);
  font-size: 26px;
}

.pipeline span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.task-card p {
  min-height: 76px;
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.budget-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
}

.budget-summary {
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(31, 122, 76, 0.96), rgba(18, 63, 44, 0.96)),
    var(--green-900);
  color: #fff;
}

.budget-summary span,
.budget-summary p {
  color: rgba(255, 255, 255, 0.74);
}

.budget-summary strong {
  display: block;
  margin: 18px 0 10px;
  font-size: 38px;
}

.budget-list {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.budget-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
}

.budget-list span {
  color: #536159;
}

.budget-list strong {
  color: var(--green-900);
}

.budget-list i {
  grid-column: 1 / -1;
  height: 8px;
  background: linear-gradient(90deg, var(--green-700), #8bd4a8);
}

.plans-panel {
  margin-top: 28px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(28, 63, 44, 0.08);
}

.plan-card span {
  color: var(--green-700);
  font-size: 13px;
  font-weight: 800;
}

.plan-card h3 {
  margin-top: 10px;
}

.plan-price {
  margin: 16px 0 8px;
  color: var(--green-950);
  font-size: 30px;
  font-weight: 800;
}

.plan-card p {
  color: var(--muted);
  line-height: 1.6;
}

.plan-card button {
  width: 100%;
  min-height: 40px;
  margin-top: 18px;
  color: #fff;
  background: var(--green-800);
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

.membership-view {
  min-height: calc(100vh - 70px);
  padding: 34px 0 40px;
  background:
    radial-gradient(circle at 50% 120px, rgba(47, 155, 98, 0.08), transparent 340px),
    linear-gradient(180deg, #f7fbf8 0, #fbfdfb 100%);
}

.membership-shell {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
}

.membership-heading {
  margin-bottom: 30px;
  text-align: center;
}

.membership-heading span {
  color: var(--green-700);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.membership-heading h2 {
  margin: 8px 0 8px;
  color: #101714;
  font-size: 34px;
  line-height: 1.2;
}

.membership-heading p {
  margin: 0;
  color: #66746d;
}

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

.membership-card {
  position: relative;
  display: flex;
  min-height: 440px;
  padding: 24px 22px 20px;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(198, 216, 205, 0.82);
  border-radius: 8px;
  box-shadow: 0 24px 58px rgba(31, 122, 76, 0.08);
}

.membership-card.is-featured {
  border-color: rgba(47, 155, 98, 0.36);
  box-shadow: 0 26px 64px rgba(31, 122, 76, 0.14);
}

.membership-ribbon {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 88px;
  padding: 6px 14px;
  color: var(--green-950);
  background: #76c797;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.membership-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.membership-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--green-700);
  background: #f0faf4;
  border-radius: 8px;
  font-size: 23px;
  font-weight: 900;
}

.membership-card.is-featured .membership-icon {
  color: var(--green-950);
  background: #70c491;
}

.membership-card h3 {
  margin: 0;
  color: #111814;
  font-size: 22px;
  line-height: 1.15;
}

.membership-card-head p {
  margin: 5px 0 0;
  color: #f07611;
  font-size: 13px;
  font-weight: 900;
}

.membership-price {
  display: block;
  margin: 24px 0 18px;
  color: #0d1110;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
}

.membership-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #24352d;
  font-size: 15px;
  line-height: 1.45;
}

.membership-card li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.membership-card li::before {
  content: "✓";
  color: #6fc58e;
  font-weight: 900;
}

.membership-card li.is-strong {
  color: var(--green-800);
  font-weight: 900;
}

.membership-card button {
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  color: var(--green-800);
  background: #fff;
  border: 1px solid #a9dfbd;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}

.membership-card button:hover {
  color: #fff;
  background: var(--green-800);
  border-color: var(--green-800);
}

.membership-card button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.membership-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(820px, 100%);
  margin: 24px auto 0;
}

.membership-notes div {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--green-800);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(31, 122, 76, 0.06);
}

@media (max-width: 1100px) {
  .topbar {
    padding: 0 24px;
  }

  .top-actions a {
    display: none;
  }

  .nav-feature-actions {
    display: none;
  }

  main {
    padding-inline: 28px;
  }

  .prompt-panel {
    width: min(820px, calc(100vw - 120px));
  }

  .case-grid,
  .case-grid.expanded,
    .project-grid,
    .workspace-layout,
    .membership-grid,
    .plan-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  .studio-layout,
  .tool-layout,
  .budget-layout,
  .whole-house-layout {
    grid-template-columns: 1fr;
  }

  .whole-house-panel {
    position: static;
  }

  .tool-layout .generator-card,
  .studio-layout .generator-card {
    position: static;
    max-height: none;
  }

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

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

@media (max-width: 760px) {
  body {
    padding-top: 62px;
  }

  .topbar {
    min-height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 21px;
  }

  main {
    padding: 0 18px 64px;
  }

  .site-footer-inner {
    align-items: center;
    flex-direction: column;
    gap: 12px;
    min-height: 118px;
    padding: 24px 18px;
    text-align: center;
  }

  .site-footer-records {
    justify-content: center;
    gap: 8px 14px;
    font-size: 13px;
  }

  .style-preset-grid {
    grid-template-columns: 1fr;
  }

  .mask-dialog {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    padding: 16px;
  }

  .mask-toolbar,
  .mask-dialog-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .brush-size-control,
  .mask-dialog-foot > div {
    width: 100%;
  }

  .brush-size-control input {
    width: 100%;
  }

  .mask-dialog-foot > div {
    justify-content: flex-end;
  }

  .mask-modal-stage {
    min-height: 260px;
  }

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

  .history-preview {
    padding: 14px;
  }

  .history-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-preview-stage {
    min-height: 280px;
  }

  .history-preview img {
    max-height: 62vh;
  }

  .history-preview-arrow {
    top: 50%;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
  }

  .history-preview-arrow.previous {
    left: 18px;
  }

  .history-preview-arrow.next {
    right: 18px;
  }

  .hero {
    min-height: 650px;
    padding-top: 110px;
  }

  .hero-brand {
    flex-direction: column;
    gap: 16px;
  }

  h1 {
    font-size: 34px;
  }

  .hero > p {
    max-width: 330px;
    font-size: 16px;
  }

  .prompt-panel {
    width: 100%;
    min-height: 0;
    padding: 20px;
  }

  .ai-generate-options {
    grid-template-columns: 1fr;
  }

  .prompt-panel-head {
    gap: 12px;
  }

  .prompt-panel-head strong {
    font-size: 17px;
  }

  .prompt-upload-link {
    font-size: 14px;
  }

  .prompt-panel textarea {
    min-height: 145px;
    padding: 18px;
    font-size: 15px;
  }

  .prompt-upload-preview {
    margin-top: 14px;
  }

  .prompt-upload-thumb {
    width: 64px;
    height: 64px;
  }

  .prompt-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .prompt-toolbar-left {
    gap: 8px;
  }

  .prompt-control-group {
    min-height: 31px;
    padding: 0 9px;
    font-size: 12px;
  }

  .generate-pill {
    width: 100% !important;
    min-width: 0;
    height: 40px !important;
    font-size: 14px !important;
  }

  .auth-dialog {
    padding: 24px 18px;
  }

  .recharge-dialog {
    padding: 24px 18px;
  }

  .admin-shell {
    padding-top: 82px;
  }

  .admin-heading,
  .admin-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-metrics,
  .admin-credit-grid,
  .admin-channel-grid,
  .admin-channel-group-grid,
  .admin-credit-search,
  .admin-selected-user,
  .admin-recharge-form {
    grid-template-columns: 1fr;
  }

  .admin-recharge-form > * {
    grid-column: 1 !important;
  }

  .recharge-options {
    gap: 7px;
  }

  .recharge-options button {
    min-height: 68px;
    padding: 8px 4px;
  }

  .recharge-options strong {
    font-size: 18px;
  }

  .wechat-qr-frame {
    width: 224px;
    height: 224px;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .prompt-panel textarea {
    font-size: 15px;
  }

  .hero-metrics,
  .case-grid,
  .case-grid.expanded,
  .project-grid,
  .workspace-layout,
  .pipeline,
  .membership-grid,
  .membership-notes,
  .budget-layout,
  .plan-grid,
  .whole-house-layout,
  .tool-layout,
  .render-queue {
    grid-template-columns: 1fr;
  }

  .inspiration,
  .page-heading,
  .studio-layout,
  .tool-layout,
  .workspace-layout,
  .budget-layout,
  .project-grid,
  .filter-bar,
  #cases .case-grid {
    padding-left: 0;
  }

  .page-heading {
    padding-top: 86px;
  }

  .membership-shell {
    width: min(100%, calc(100vw - 32px));
  }

  .membership-view {
    padding-top: 54px;
  }

  .membership-heading h2 {
    font-size: 32px;
  }

  .membership-card {
    min-height: auto;
  }

  .whole-house-layout {
    padding-top: 84px;
  }
}

body,
body *,
body *::before,
body *::after {
  font-synthesis: none;
  font-weight: 300 !important;
}

h1,
h2,
h3,
.page-heading span,
.panel-heading span,
.stage-toolbar span,
.panel-heading h2,
.stage-toolbar h2,
.section-head h2,
.field-title,
.ai-generate-options legend,
.custom-select .field-title,
.block-picker legend,
.style-preset-field legend,
.primary-action,
.send-button,
.dark-button,
.select-trigger,
.select-menu button,
.tabs button,
.filter-bar button {
  font-weight: 600 !important;
}

.tool-form label:has(textarea) > .field-title,
.generator-card label:has(textarea) > .field-title,
.whole-house-form label:has(textarea) > .field-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900 !important;
}

.tool-form .ai-generate-options,
.studio-layout .ai-generate-options,
.whole-house-form .ai-generate-options {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 14px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-form .ai-generate-options .model-select,
.studio-layout .ai-generate-options .model-select,
.whole-house-form .ai-generate-options .model-select {
  width: 100%;
}

.tool-form .ai-generate-options .select-trigger,
.studio-layout .ai-generate-options .select-trigger,
.whole-house-form .ai-generate-options .select-trigger {
  min-height: 46px;
  box-shadow: none;
}

.tool-form .segmented-options,
.studio-layout .segmented-options,
.whole-house-form .segmented-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tool-form .segmented-options label,
.studio-layout .segmented-options label,
.whole-house-form .segmented-options label {
  width: 100%;
}

.tool-form .segmented-options span,
.studio-layout .segmented-options span,
.whole-house-form .segmented-options span {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
}

.prompt-panel .segmented-options {
  display: flex;
}
