:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --accent: #111827;
  --blue: #2563eb;
  --pink: #db2777;
  --green: #16a34a;
  --amber: #d97706;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 24, 39, 0.06) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
}

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

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  padding: 14px;
}

.hero {
  position: relative;
  min-height: 206px;
  border-radius: 8px;
  padding: 22px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.38), rgba(17, 24, 39, 0.88)),
    url("../../douyin-products/portrait-01-main.png");
  background-size: cover;
  background-position: center 58%;
}

.hero-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #d1d5db;
  font-size: 13px;
}

.eyebrow.dark {
  color: var(--muted);
}

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

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
  letter-spacing: 0;
}

.hero p {
  margin-bottom: 0;
  line-height: 1.65;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 0;
  background: var(--bg);
}

.tab {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel,
.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
}

.product-card {
  cursor: pointer;
}

.product-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.product-title {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  padding: 7px 10px;
  font-size: 13px;
}

.notice {
  border-left: 4px solid var(--accent);
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  color: #475569;
  line-height: 1.7;
}

.notice.small {
  font-size: 14px;
}

.showcase-section {
  margin-bottom: 12px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
}

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

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

.showcase-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.showcase-card a {
  display: block;
}

.showcase-card img {
  display: block;
  width: 100%;
  height: 164px;
  object-fit: cover;
  background: #e5e7eb;
}

.showcase-info {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.showcase-info strong {
  font-size: 14px;
  line-height: 1.35;
}

.showcase-info span {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 20px;
}

.showcase-tags em {
  border-radius: 999px;
  padding: 3px 7px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-style: normal;
}

.showcase-empty {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.requirement-card {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: #f8fafc;
}

.requirement-card p {
  margin: 8px 0;
  color: #475569;
  line-height: 1.65;
}

.requirement-card ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.7;
  font-size: 14px;
}

.count-hint {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.count-hint.warn {
  background: #fef3c7;
  color: #92400e;
}

.count-hint.ok {
  background: #dcfce7;
  color: #166534;
}

.booth-auth {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: #f8fafc;
}

.booth-auth .field {
  margin-bottom: 6px;
}

.booth-auth input {
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.step {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: block;
  margin-bottom: 16px;
  color: #475569;
  font-size: 14px;
}

.field-title {
  margin-bottom: 8px;
  color: #475569;
  font-size: 14px;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.flow-strip span {
  min-height: 36px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.quick-package {
  display: grid;
  gap: 3px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: #fffbeb;
  color: #92400e;
}

.quick-package strong {
  color: #111827;
  font-size: 14px;
}

.quick-package span {
  font-size: 12px;
  line-height: 1.45;
}

.role-picker {
  margin-bottom: 10px;
}

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

.hero-template-card {
  min-height: 142px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 11px;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.hero-template-card strong {
  min-height: 42px;
  font-size: 16px;
  line-height: 1.32;
}

.hero-template-card em,
.role-style {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
}

.role-style {
  background: #eef2ff;
  color: #3730a3;
}

.hero-template-card em {
  background: #f1f5f9;
  color: #475569;
}

.hero-template-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.hero-template-card.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.hero-template-card.active .role-style {
  background: #fef3c7;
  color: #92400e;
}

.hero-template-card.active em {
  background: rgba(255, 255, 255, 0.14);
  color: #e5e7eb;
}

.hero-template-card.active p {
  color: #d1d5db;
}

.role-empty {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.hidden-config,
.native-hidden {
  display: none;
}

.template-summary {
  display: block;
  margin-top: 8px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.muted.compact {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.beauty-level-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.beauty-level {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 6px 4px;
  cursor: pointer;
}

.beauty-level strong,
.beauty-level span {
  display: block;
  line-height: 1.25;
}

.beauty-level strong {
  color: #111827;
  font-size: 16px;
}

.beauty-level span {
  margin-top: 2px;
  font-size: 12px;
}

.beauty-level.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.beauty-level.active strong {
  color: #fff;
}

select,
textarea,
input[type="text"],
input:not([type]),
input[type="file"] {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  line-height: 1.6;
  color: #334155;
}

.check-row input {
  margin-top: 5px;
}

.compact-check {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  font-size: 13px;
}

.primary,
.secondary,
.text-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.secondary {
  background: var(--blue);
  color: #fff;
}

.text-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.upload-list {
  margin-top: 12px;
}

.upload-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fff;
  color: #475569;
  font-size: 14px;
}

.upload-guidance {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.benchmark-line {
  margin-top: 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.sell-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.sell-points span {
  min-height: 32px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.image-grid img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #e5e7eb;
}

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

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
  cursor: pointer;
}

.rule-item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.rule-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  max-width: min(360px, calc(100vw - 32px));
  border-radius: 8px;
  padding: 12px 16px;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}
