:root {
  --bg: #fff46c;
  --bg-deep: #ffe854;
  --panel: rgba(255, 255, 187, 0.92);
  --card: #fffbe8;
  --ink: #1d160d;
  --muted: #826f46;
  --orange: #ff8b1f;
  --orange-deep: #f05c10;
  --green: #18ba54;
  --red: #ef5b45;
  --line: rgba(197, 151, 28, 0.2);
  --shadow: 0 12px 28px rgba(164, 119, 18, 0.16);
  --page-pad: clamp(10px, 3.6vw, 18px);
  --page-max: 560px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-deep);
  -webkit-text-size-adjust: 100%;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 255, 255, 0.88), transparent 22%),
    radial-gradient(circle at 86% 8%, rgba(255, 151, 31, 0.34), transparent 28%),
    linear-gradient(180deg, #fffdf2 0%, var(--bg) 22%, var(--bg-deep) 100%);
}

button,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.page-shell {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding:
    max(var(--page-pad), env(safe-area-inset-top))
    var(--page-pad)
    calc(28px + env(safe-area-inset-bottom));
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: clamp(15px, 4vw, 20px);
  border-radius: 0 0 28px 28px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0 72%, rgba(255, 171, 0, 0.92) 72%),
    linear-gradient(135deg, #fff, #ffe8aa);
  box-shadow: 0 14px 34px rgba(172, 124, 15, 0.14);
}

.hero-card.has-image {
  min-height: clamp(220px, 56vw, 268px);
  padding-top: clamp(124px, 34vw, 154px);
}

.hero-image {
  position: absolute;
  inset: 0 0 auto;
  height: clamp(126px, 35vw, 156px);
  background-position: center;
  background-size: cover;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.92));
}

.hero-card::before {
  content: "";
  position: absolute;
  right: -36px;
  top: -18px;
  width: clamp(120px, 36vw, 156px);
  height: clamp(120px, 36vw, 156px);
  border: clamp(12px, 4vw, 18px) solid rgba(255, 255, 255, 0.84);
  border-radius: 50%;
}

.hero-card::after {
  content: "AI";
  position: absolute;
  right: 24px;
  bottom: -18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(68px, 20vw, 96px);
  font-weight: 1000;
  transform: rotate(90deg);
}

.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: clamp(40px, 11vw, 46px);
  height: clamp(40px, 11vw, 46px);
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 1000;
  background: linear-gradient(145deg, #231a12, #5f3b19);
  box-shadow: inset 0 -7px 12px rgba(255, 255, 255, 0.12);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--orange-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(21px, 6vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  word-break: break-word;
}

.hero-meta {
  position: relative;
  z-index: 1;
  max-width: min(100%, 380px);
  margin: 12px 0 0;
  color: #6c5532;
  line-height: 1.55;
  font-size: clamp(13px, 3.6vw, 15px);
}

.hero-ribbon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  max-width: 100%;
}

.hero-ribbon span,
.hero-ribbon strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  font-size: clamp(11px, 3.2vw, 12px);
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

.hero-ribbon strong {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

.content {
  display: grid;
  gap: clamp(12px, 3.4vw, 18px);
  padding-top: clamp(12px, 3.4vw, 16px);
}

.status-card {
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.status-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.status-card p {
  margin-bottom: 0;
}

.status-card.is-hidden {
  display: none;
}

.status-card.is-error {
  color: #9f2d21;
  background: #fff1ed;
}

.entry-panel,
.panel,
.guide-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.entry-panel {
  padding: clamp(58px, 15vw, 68px) clamp(12px, 3.8vw, 18px) clamp(12px, 3.8vw, 18px);
}

.floating-title {
  position: absolute;
  left: 50%;
  top: 16px;
  min-width: 128px;
  max-width: calc(100% - 28px);
  padding: 8px clamp(18px, 6vw, 24px);
  border-radius: 999px;
  color: #fff;
  font-size: clamp(18px, 5.8vw, 23px);
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(201, 118, 15, 0.18);
}

.orange-title {
  background: linear-gradient(135deg, #ff9a22, #ff711c);
}

.green-title {
  background: linear-gradient(135deg, #24cf62, #12a845);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2.8vw, 12px);
}

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

.entry-card,
.review-card {
  min-width: 0;
  min-height: clamp(100px, 26vw, 116px);
  padding: clamp(10px, 3vw, 13px) clamp(6px, 2.4vw, 9px);
  border-radius: 18px;
  color: var(--ink);
  text-align: center;
  background: rgba(255, 255, 238, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.entry-card:active,
.review-card:active {
  transform: scale(0.96);
}

.entry-icon,
.review-icon {
  display: grid;
  position: relative;
  overflow: hidden;
  width: clamp(54px, 15vw, 64px);
  height: clamp(54px, 15vw, 64px);
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 18px;
  color: #fff;
  font-size: clamp(16px, 4.8vw, 20px);
  font-weight: 1000;
  background: linear-gradient(145deg, #ff7e24, #f14118);
  box-shadow:
    0 12px 22px rgba(22, 16, 8, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.entry-icon::after,
.review-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 44%);
  pointer-events: none;
}

.brand-logo {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 78%;
  display: block;
}

.brand-fallback {
  position: relative;
  z-index: 1;
}

.douyin-logo {
  width: 82%;
  height: 82%;
}

.douyin-cyan {
  fill: #25f4ee;
  transform: translate(-3px, 2px);
}

.douyin-red {
  fill: #fe2c55;
  transform: translate(3px, 1px);
}

.douyin-white {
  fill: #fff;
}

.entry-icon.douyin {
  background: #050505;
}

.entry-icon.kuaishou,
.review-icon.kuaishou {
  background: #ff5b22;
}

.entry-icon.xhs,
.review-icon.xhs {
  background: #ff2442;
}

.entry-icon.moments,
.review-icon.moments {
  background: #f9fbff;
}

.entry-icon.wechat,
.review-icon.wechat {
  background: #07c160;
}

.review-icon.douyin {
  background: #050505;
}

.review-icon.meituan {
  background: #ffd100;
}

.review-icon.dazhong {
  background: #ff7a2c;
}

.entry-icon.meituan,
.entry-icon.dazhong {
  background: #ff7a2c;
}

.meituan-logo {
  width: 76%;
  height: 76%;
}

.dazhong-logo {
  width: 80%;
  height: 80%;
}

.entry-card strong,
.review-card strong {
  display: block;
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 1000;
  line-height: 1.2;
  word-break: keep-all;
}

.entry-card .card-subtitle,
.review-card .card-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.review-block h2,
.deal-block h2 {
  margin: 4px 0 12px;
  color: var(--red);
  font-size: clamp(21px, 6vw, 25px);
  font-weight: 1000;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2.8vw, 12px);
  padding: clamp(12px, 3.8vw, 16px);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.review-card {
  min-height: 108px;
}

.deal-block h2 {
  color: #fff;
  text-shadow: 0 2px 10px rgba(176, 111, 0, 0.28);
}

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

.empty-deal {
  padding: 20px;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.deal-card {
  display: grid;
  grid-template-columns: clamp(70px, 20vw, 84px) minmax(0, 1fr) auto;
  gap: clamp(9px, 3vw, 12px);
  padding: clamp(10px, 3.2vw, 12px);
  border: 2px solid rgba(239, 91, 69, 0.34);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(239, 91, 69, 0.12);
}

.deal-cover {
  width: clamp(70px, 20vw, 84px);
  height: clamp(70px, 20vw, 84px);
  border-radius: 16px;
  object-fit: cover;
  background: #fff0c8;
}

.deal-card h3 {
  margin: 0 0 6px;
  font-size: clamp(16px, 4.5vw, 18px);
  line-height: 1.25;
  word-break: break-word;
}

.deal-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.deal-price {
  color: #ef3467;
  font-size: clamp(18px, 5vw, 21px);
  font-weight: 1000;
}

.deal-badge {
  align-self: start;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: #ef3467;
  font-weight: 900;
}

.panel,
.guide-card {
  padding: clamp(14px, 4vw, 18px);
  background: rgba(255, 255, 255, 0.82);
}

.note-panel.is-hidden,
.guide-card.is-hidden {
  display: none;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head span {
  display: inline-block;
  margin-bottom: 3px;
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(18px, 5vw, 21px);
}

.edit-box {
  margin-bottom: 12px;
}

.keyword-grid,
.style-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.keyword-chip,
.style-chip {
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #6f5746;
  background: #fff4d6;
}

.keyword-chip.is-active,
.style-chip.is-active {
  color: #fff;
  background: #21170f;
}

textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 13px;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 18px;
  color: var(--ink);
  background: #fffdf4;
  line-height: 1.6;
  font-size: 16px;
}

.note-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, #fffaf0, #fff);
  border: 1px solid var(--line);
}

.note-card h3 {
  margin-bottom: 10px;
  font-size: clamp(18px, 5vw, 20px);
  line-height: 1.35;
}

.note-card p {
  margin-bottom: 12px;
  color: #5f4939;
  line-height: 1.8;
  white-space: pre-wrap;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.note-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--orange-deep);
  background: #ffe8cc;
  font-size: 12px;
  font-weight: 800;
}

.material-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.material-strip.is-hidden {
  display: none;
}

.material-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #fff3d4;
  min-height: 74px;
}

.material-item img,
.material-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-material {
  grid-column: 1 / -1;
  padding: 14px;
  border-radius: 16px;
  color: var(--muted);
  background: #fff6db;
  line-height: 1.6;
}

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

.action-grid .dark-btn {
  grid-column: 1 / -1;
}

.primary-btn,
.soft-btn,
.dark-btn,
.ghost-btn {
  min-width: 0;
  min-height: 46px;
  border-radius: 16px;
  font-weight: 1000;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #ff8a22, #f04c11);
  box-shadow: 0 12px 24px rgba(240, 76, 17, 0.18);
}

.soft-btn {
  color: var(--orange-deep);
  background: #fff0dc;
}

.dark-btn {
  color: #fff;
  background: linear-gradient(135deg, #2c2018, #130e0a);
}

.ghost-btn {
  min-height: 36px;
  padding: 0 12px;
  color: var(--orange-deep);
  background: #fff2e2;
}

.guide-card h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.guide-card ol {
  margin: 0;
  padding-left: 20px;
  color: #5d4939;
  line-height: 1.75;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: min(88vw, 420px);
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(31, 23, 17, 0.92);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: 0.22s ease;
  text-align: center;
  line-height: 1.45;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 700px) {
  :root {
    --page-max: 600px;
  }

  .page-shell {
    padding-top: 22px;
  }

  .hero-card {
    border-radius: 30px;
  }
}

@media (max-width: 420px) {
  .hero-card {
    border-radius: 0 0 24px 24px;
  }

  .deal-card {
    grid-template-columns: clamp(68px, 21vw, 78px) minmax(0, 1fr);
  }

  .deal-badge {
    grid-column: 2;
    width: fit-content;
    margin-top: -2px;
  }
}

@media (max-width: 380px) {
  .entry-grid,
  .review-grid {
    gap: 8px;
  }

  .entry-card,
  .review-card {
    min-height: 104px;
  }

  .entry-icon,
  .review-icon {
    width: 52px;
    height: 52px;
  }

  .hero-ribbon strong {
    max-width: 100%;
  }
}

@media (max-width: 340px) {
  :root {
    --page-pad: 10px;
  }

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

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

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

  .action-grid .dark-btn {
    grid-column: auto;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .page-shell {
    width: min(100%, 720px);
  }

  .hero-card.has-image {
    min-height: 188px;
    padding-top: 108px;
  }

  .hero-image {
    height: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
