:root {
  color-scheme: light;
  --bg: #fff7f1;
  --card: #ffffff;
  --text: #24150f;
  --muted: #7a675d;
  --brand: #ff6a3d;
  --brand-dark: #db4d24;
  --line: #f0dfd5;
  --soft: #fff0e8;
  --shadow: 0 18px 48px rgba(88, 38, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 177, 118, 0.42), transparent 32rem),
    var(--bg);
  color: var(--text);
}

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

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

.app-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.page {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none;
}

.hero-card,
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.hero-card {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(145deg, rgba(255, 106, 61, 0.95), rgba(255, 164, 93, 0.9)),
    var(--brand);
  color: #fff;
}

.store-kicker {
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.muted {
  color: rgba(255, 255, 255, 0.82);
  margin: 10px 0 0;
  line-height: 1.6;
}

.card .muted,
.hint {
  color: var(--muted);
}

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

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fffaf6;
  color: var(--text);
  line-height: 1.6;
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 106, 61, 0.12);
}

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

.single-action {
  display: grid;
  margin-top: 12px;
}

.primary-btn,
.secondary-btn,
.platform-btn,
.text-btn,
.bottom-nav button,
.admin-tab {
  border: 0;
  cursor: pointer;
}

.primary-btn,
.secondary-btn,
.platform-btn {
  min-height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.primary-btn {
  background: var(--brand);
  color: #fff;
}

.primary-btn:active {
  background: var(--brand-dark);
}

.guide-btn {
  cursor: pointer;
  user-select: none;
}

.secondary-btn,
.platform-btn {
  background: var(--soft);
  color: var(--brand-dark);
}

.text-btn {
  background: transparent;
  color: var(--brand-dark);
  font-weight: 700;
}

.full-width {
  width: 100%;
  margin-top: 12px;
}

.hint {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.pill {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

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

.photo-card {
  min-height: 104px;
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: #f6e4d7;
}

.photo-card.active {
  border-color: var(--brand);
}

.photo-card img {
  width: 100%;
  height: 104px;
  display: block;
  object-fit: cover;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 488px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.bottom-nav button {
  min-height: 44px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.bottom-nav button.active {
  background: var(--brand);
  color: #fff;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 12px;
  background: #fffaf6;
  color: var(--text);
  outline: none;
}

input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 12px;
  background: #fffaf6;
  color: var(--text);
  outline: none;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.admin-tab {
  min-height: 42px;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

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

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

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

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

.metric-card {
  min-height: 104px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--brand-dark);
}

.funnel-list {
  display: grid;
  gap: 12px;
}

.funnel-item {
  display: grid;
  gap: 8px;
}

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

.funnel-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f6e4d7;
}

.funnel-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ffb45d);
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.asset-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fffaf6;
}

.asset-thumb {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand), #ffbf73);
}

.asset-item strong {
  display: block;
  margin-bottom: 4px;
}

.asset-item span {
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-item {
  padding: 12px;
  border-radius: 14px;
  background: #fffaf6;
}

.detail-item strong {
  display: block;
  margin-bottom: 4px;
}

.code-line {
  overflow-wrap: anywhere;
  border-radius: 14px;
  padding: 12px;
  background: #fffaf6;
  color: var(--brand-dark);
}

.compliance-footer {
  display: grid;
  gap: 4px;
  padding: 0 18px 26px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.compliance-footer span:first-child {
  color: #b09384;
}

@media (max-width: 360px) {
  .action-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-tabs,
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
}
