:root {
  --ink: #19152b;
  --muted: #746d82;
  --soft: #fbf8f5;
  --paper: rgba(255, 255, 255, .86);
  --paper-solid: #fffdfb;
  --line: rgba(53, 45, 76, .12);
  --violet: #7f57d6;
  --plum: #4e356e;
  --rose: #d86e9f;
  --sage: #718866;
  --gold: #bd925e;
  --shadow: 0 18px 55px rgba(42, 31, 66, .16);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #f9f4ee;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    linear-gradient(180deg, rgba(37, 27, 67, .05), rgba(216, 110, 159, .04) 42%, rgba(255, 255, 255, .5)),
    #fbf7f1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .22;
  background-image: url("/media/1cabd15d5721537ed481fc614ac2fec2585eaf410e10dbb5e76edc65d61d8e39.png");
  background-size: cover;
  background-position: center top;
  filter: blur(38px) saturate(.85);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

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

.hero-panel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  margin: 0 -16px;
  border-radius: 24px;
  color: #fff;
  background: #17112a;
}

.hero-track {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform .65s cubic-bezier(.22, .8, .24, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #17112a;
}

.hero-media img {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  object-position: var(--hero-position-mobile, 50% 50%);
  transform: scale(var(--hero-scale-mobile, 1));
  transform-origin: center;
  user-select: none;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 8, 24, .05), rgba(10, 8, 24, .22) 45%, rgba(20, 13, 34, .92) 88%);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(18, 11, 31, .84), rgba(18, 11, 31, .28) 58%, rgba(18, 11, 31, .08));
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: max(18px, env(safe-area-inset-top)) 20px 0;
}

.brand-lockup {
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: .01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
}

.pill-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 54px;
}

.kicker {
  margin-bottom: 14px;
  color: #f5d8ff;
  font: 700 12px Georgia, serif;
  letter-spacing: .18em;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  font-size: clamp(44px, 12vw, 66px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(0, 0, 0, .42);
}

.hero-copy h1 em {
  color: #f4a7c8;
  font-style: normal;
  white-space: nowrap;
}

.hero-copy p {
  max-width: 420px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .9);
  font-size: 16px;
  line-height: 1.8;
}

.primary-cta {
  width: min(100%, 300px);
  min-height: 58px;
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #34224e;
  background: linear-gradient(90deg, #fff3f8, #ffc7d9);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(216, 110, 159, .3);
  font-weight: 900;
}

.hero-quote {
  padding-top: 12px;
  font-family: "Songti SC", "STSong", serif;
}

.hero-pagination {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-pagination button {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, .45);
  transition: width .25s ease, background .25s ease;
}

.hero-pagination button.active {
  width: 24px;
  background: #ffc1d8;
}

.quick-entry {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-brand {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 0 12px;
  border-bottom: 1px solid rgba(116, 84, 145, .12);
  color: var(--plum);
}

.quick-brand i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #8057d9;
  background: linear-gradient(135deg, #eee4ff, #ffd8e7);
  font-style: normal;
  box-shadow: 0 6px 14px rgba(126, 81, 180, .15);
}

.quick-brand b {
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
  letter-spacing: .08em;
}

.quick-entry a {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.quick-entry span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--violet);
  background: #f2ebfb;
  font-size: 20px;
}

.quick-entry b {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.quick-entry small {
  color: var(--muted);
  font-size: 11px;
}

.banner-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.reward-banner {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(110deg, rgba(255, 255, 255, .94), rgba(255, 238, 244, .86));
  box-shadow: 0 14px 40px rgba(79, 52, 102, .08);
}

.reward-banner .gift {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--rose);
  background: #f7e7ef;
  font-size: 28px;
}

.reward-banner h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.reward-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.reward-banner a,
.reward-banner .banner-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  color: white;
  background: var(--violet);
  font-weight: 800;
  white-space: nowrap;
}

.reward-banner .banner-action.disabled {
  color: #77727e;
  background: #ddd9df;
  box-shadow: none;
  cursor: not-allowed;
}

.mid-promo {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  margin-top: 38px;
  border-radius: 22px;
  color: white;
  background: #17112a;
  box-shadow: var(--shadow);
}

.mid-promo-track,
.mid-promo-slide {
  position: absolute;
  inset: 0;
}

.mid-promo-slide {
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}

.mid-promo-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.mid-promo-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--promo-position-mobile, 50% 50%);
  transform: scale(var(--promo-scale-mobile, 1));
  transform-origin: center;
}

.mid-promo-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(19, 11, 33, .94), rgba(19, 11, 33, .63) 55%, rgba(19, 11, 33, .12));
}

.mid-promo-copy {
  position: absolute;
  z-index: 2;
  left: 30px;
  top: 50%;
  width: min(62%, 560px);
  transform: translateY(-50%);
}

.mid-promo-copy small {
  color: #f5d8ff;
  font-family: Georgia, serif;
  font-weight: 900;
  letter-spacing: .12em;
}

.mid-promo-copy h2 {
  margin: 9px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 32px;
  line-height: 1.08;
}

.mid-promo-copy h2 em {
  color: #f4a7c8;
  font-style: normal;
}

.mid-promo-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mid-promo-copy a {
  min-height: 38px;
  margin-top: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  color: #34224e;
  background: linear-gradient(90deg, #fff3f8, #ffc7d9);
  font-size: 13px;
  font-weight: 900;
}

.mid-promo-pagination {
  position: absolute;
  z-index: 4;
  right: 22px;
  bottom: 18px;
  display: flex;
  gap: 7px;
}

.mid-promo-pagination button {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, .5);
}

.mid-promo-pagination button.active {
  width: 22px;
  background: #ffc1d8;
}

.mid-promo + #tests { margin-top: 34px; }

.section-block {
  margin-top: 34px;
}

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

.section-head div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
}

.section-icon {
  color: var(--violet);
  font-size: 26px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
}

.section-head p {
  grid-column: 2;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-head a {
  color: var(--plum);
  font-weight: 800;
  white-space: nowrap;
}

.segmented {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar { display: none; }

.segmented button {
  min-height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, .74);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 800;
}

.segmented button.active {
  color: white;
  background: linear-gradient(90deg, var(--violet), var(--rose));
  box-shadow: none;
}

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

.tool-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(105deg, rgba(255,255,255,.97), rgba(255,250,252,.9));
  box-shadow: 0 10px 26px rgba(69, 49, 94, .08);
}

.thumb {
  min-height: 112px;
  border-radius: 14px;
  overflow: hidden;
  background: #eee8f2;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--content-image-scale, 1));
  transform-origin: center;
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, rgba(30, 23, 54, .04), rgba(255, 255, 255, .08));
}

.tool-card h3,
.test-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.tool-card p,
.test-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

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

.tags span {
  border-radius: 999px;
  padding: 5px 10px;
  background: #f2eee8;
  color: #766b60;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 0 9px;
  color: #b35a78;
  background: #fff0f5;
  font-size: 12px;
  font-weight: 800;
}

.card-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0 20px;
  border: 1px solid rgba(137, 92, 183, .14);
  color: #4f2d68;
  background: linear-gradient(100deg, #eee4ff 0%, #f8d9f0 48%, #ffcddd 100%);
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(153, 92, 176, .2);
}

.card-action:hover,
.card-action:focus-visible {
  background: linear-gradient(100deg, #e5d7ff 0%, #f5cce9 48%, #ffbfd5 100%);
  transform: translateY(-1px);
}

.swipe-hint {
  display: none;
}

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

.test-card {
  min-height: 260px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 16px;
  border-radius: 16px;
  color: white;
  background: #241a34;
  box-shadow: var(--shadow);
}

.test-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--content-image-scale, 1));
  transform-origin: center;
}

.test-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(22, 16, 36, .05), rgba(22, 16, 36, .24) 45%, rgba(22, 16, 36, .9));
}

.test-card > :not(.test-card-image) {
  position: relative;
  z-index: 2;
}

.test-card p {
  color: rgba(255, 255, 255, .82);
}

.test-card .tags span {
  color: #fff;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
}

.test-card .badge {
  align-self: flex-start;
  color: white;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
}

.mini-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 12px;
  margin-top: 40px;
}

.mini-board article,
.discover-card {
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
}

.mini-board small { color: var(--muted); }
.mini-board span { color: var(--violet); font-size: 13px; font-weight: 800; }
.discover-card span { font-size: 26px; }

.site-note {
  margin-top: 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.site-note a {
  color: var(--violet);
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 720px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 20px 52px rgba(48, 34, 72, .2);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--violet);
  background: #f1ebfb;
}

.bottom-nav span {
  font-size: 22px;
  line-height: 1;
}

.coming-soon-dialog {
  width: min(calc(100% - 40px), 390px);
  border: 1px solid rgba(127, 87, 214, .2);
  border-radius: 28px;
  padding: 30px 26px 26px;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(circle at 15% 5%, rgba(255, 193, 216, .5), transparent 35%),
    linear-gradient(145deg, #fffdfd, #f7efff);
  box-shadow: 0 30px 90px rgba(34, 20, 58, .38);
}

.coming-soon-dialog::backdrop {
  background: rgba(20, 13, 34, .58);
  backdrop-filter: blur(6px);
}

.dialog-sparkles {
  margin-bottom: 12px;
  color: var(--rose);
  font-size: 24px;
  letter-spacing: .14em;
}

.dialog-kicker {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--violet);
  background: #efe7ff;
  font-size: 12px;
  font-weight: 900;
}

.coming-soon-dialog h2 {
  margin: 18px 0 12px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
  line-height: 1.35;
}

.coming-soon-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.coming-soon-dialog button {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--violet), var(--rose));
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(127, 87, 214, .24);
}

.admin-body::before { display: none; }

.admin-shell {
  width: min(100% - 28px, 1180px);
  margin: 0 auto;
  padding: 32px 0 80px;
}

.admin-hero,
.admin-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 34px rgba(49, 36, 77, .08);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}

.back-link {
  color: var(--violet);
  font-weight: 900;
}

.admin-hero h1 {
  margin: 12px 0 8px;
  font-size: 34px;
}

.admin-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.save-float,
.admin-row button,
#addContentBtn,
#addHeroSlideBtn {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  color: white;
  background: var(--violet);
  font-weight: 900;
}

.admin-section {
  margin-top: 16px;
  padding: 22px;
}

.admin-section h2 {
  margin: 0 0 16px;
}

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

.form-grid label,
.card-edit label,
.hero-slide-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wide { grid-column: 1 / -1; }

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

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

.content-editor {
  display: grid;
  gap: 12px;
}

.card-edit {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.card-edit .flags {
  display: flex;
  gap: 12px;
  align-items: center;
}

.card-edit .flags label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-edit input[type="checkbox"] {
  width: auto;
}

.content-media-panel {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid rgba(127, 87, 214, .18);
  border-radius: 14px;
  background: #fcfaff;
}

.content-media-panel summary {
  cursor: pointer;
  padding: 13px 15px;
  color: var(--plum);
  font-weight: 900;
  list-style-position: inside;
  user-select: none;
}

.content-media-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.content-media-edit {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.45fr);
  gap: 18px;
  padding: 16px;
}

.content-media-controls {
  display: grid;
  align-content: start;
  gap: 12px;
}

.content-media-controls > label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-image-guide {
  padding: 13px;
  border-radius: 12px;
  color: var(--plum);
  background: #f1eafb;
}

.content-image-guide p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.content-image-status {
  color: var(--muted);
  line-height: 1.5;
}

.content-preview-set {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(210px, .75fr);
  gap: 14px;
  align-items: start;
}

.content-card-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(69, 49, 94, .1);
}

.tool-content-preview {
  min-height: 150px;
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.content-preview-thumb {
  align-self: center;
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 200 / 112;
  overflow: hidden;
  border-radius: 12px;
  background: #eee8f2;
}

.content-preview-thumb img,
.content-preview-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--content-preview-scale, 1));
  transform-origin: center;
}

.content-preview-copy {
  min-width: 0;
  position: relative;
  z-index: 2;
}

.content-preview-copy small {
  color: #b35a78;
  font-weight: 900;
}

.content-preview-copy h3 {
  margin: 7px 0 5px;
  font-size: 16px;
  line-height: 1.25;
}

.content-preview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.content-preview-copy > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.content-preview-copy > div span {
  border-radius: 999px;
  padding: 3px 6px;
  color: #766b60;
  background: #f2eee8;
  font-size: 9px;
}

.content-preview-action {
  grid-column: 1 / -1;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #4f2d68;
  background: linear-gradient(100deg, #eee4ff, #ffcddd);
  font-size: 12px;
}

.save-confirm-dialog {
  width: min(calc(100% - 32px), 480px);
  border: 1px solid rgba(130, 87, 169, .18);
  border-radius: 24px;
  padding: 28px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #fff5fa);
  box-shadow: 0 28px 80px rgba(38, 22, 55, .3);
}

.save-confirm-dialog::backdrop {
  background: rgba(26, 18, 38, .58);
  backdrop-filter: blur(5px);
}

.save-confirm-dialog h2 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.save-confirm-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.save-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-top: 22px;
}

.save-confirm-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.save-cancel {
  color: var(--muted);
  background: #f0edf2;
}

.save-confirm {
  color: #4f2d68;
  background: linear-gradient(100deg, #e7d8ff, #ffc7dc);
  box-shadow: 0 10px 24px rgba(153, 92, 176, .2);
}

.mobile-content-preview.tool-content-preview {
  width: min(100%, 250px);
  justify-self: center;
  grid-template-columns: 42% minmax(0, 1fr);
}

.mobile-content-preview.tool-content-preview .content-preview-thumb {
  aspect-ratio: 118 / 104;
}

.test-content-preview {
  min-height: 0;
  aspect-ratio: 1.18 / 1;
  display: flex;
  align-items: end;
  padding: 15px;
  color: white;
  background: #241a34;
}

.mobile-content-preview.test-content-preview {
  width: min(100%, 230px);
  min-height: 0;
  justify-self: center;
  aspect-ratio: 210 / 260;
}

.content-preview-cover {
  position: absolute;
  inset: 0;
}

.test-content-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(22, 16, 36, .04), rgba(22, 16, 36, .25) 45%, rgba(22, 16, 36, .92));
}

.test-content-preview .content-preview-copy small,
.test-content-preview .content-preview-copy p {
  color: rgba(255, 255, 255, .86);
}

.test-content-preview .content-preview-copy h3 {
  font-size: 19px;
}

.test-content-preview .content-preview-copy > div span {
  color: white;
  background: rgba(255, 255, 255, .18);
}

.json-editor {
  min-height: 420px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.admin-hint {
  color: var(--muted);
  margin-top: -8px;
}

.admin-row .admin-hint {
  margin: 4px 0 0;
}

.image-size-guide {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(127, 87, 214, .2);
  border-radius: 14px;
  color: #4e356e;
  background: #f7f1ff;
}

.size-guide-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--violet);
}

.image-size-guide p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.hero-slide-editor {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.hero-slide-edit {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.hero-slide-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbf8ff;
}

.hero-slide-edit-head > div:first-child {
  display: grid;
  gap: 3px;
}

.hero-slide-edit-head span {
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
}

.hero-slide-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-slide-actions a,
.hero-slide-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  color: var(--violet);
  background: #eee7fb;
  font-size: 13px;
  font-weight: 900;
}

.hero-slide-actions button {
  color: #a74969;
  background: #fff0f5;
}

.hero-slide-edit-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  gap: 20px;
  align-items: start;
  padding: 18px;
}

.hero-slide-fields {
  display: grid;
  gap: 12px;
}

.compact-grid {
  gap: 10px;
}

.image-source-status {
  margin-top: -6px;
  color: var(--muted);
}

.image-adjustment {
  display: grid;
  gap: 12px;
  margin: 2px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fbfafc;
}

.image-adjustment legend {
  padding: 0 7px;
  color: var(--plum);
  font-size: 13px;
  font-weight: 900;
}

.image-adjustment label {
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
}

.image-adjustment output {
  color: var(--violet);
  font-variant-numeric: tabular-nums;
}

.image-adjustment input[type="range"] {
  grid-column: 1 / -1;
  padding: 0;
  accent-color: var(--violet);
}

.image-adjustment .reset-image-adjustment {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  color: var(--violet);
  background: #eee7fb;
  font-weight: 900;
}

.hero-slide-fields .inline-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.hero-slide-fields .inline-check input {
  width: auto;
}

.hero-preview-set {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
}

.preview-device {
  display: grid;
  gap: 6px;
}

.preview-device > b {
  font-size: 14px;
}

.preview-device > small {
  color: var(--muted);
}

.hero-admin-preview {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  color: white;
  background: #17112a;
  box-shadow: 0 16px 40px rgba(42, 31, 66, .2);
}

.desktop-preview {
  min-height: 280px;
  aspect-ratio: 16 / 9;
}

.mobile-preview {
  width: min(100%, 270px);
  min-height: 460px;
  justify-self: center;
  border-radius: 22px;
}

.mid-desktop-preview {
  min-height: 130px;
  aspect-ratio: 4.5 / 1;
}

.mid-mobile-preview {
  width: min(100%, 270px);
  min-height: 190px;
  justify-self: center;
  aspect-ratio: 1.4 / 1;
}

.mid-desktop-preview .hero-admin-preview-copy,
.mid-mobile-preview .hero-admin-preview-copy {
  left: 16px;
  right: 16px;
  bottom: 50%;
  max-width: 66%;
  transform: translateY(50%);
}

.mid-desktop-preview .hero-admin-preview-copy small,
.mid-mobile-preview .hero-admin-preview-copy small { font-size: 9px; }

.mid-desktop-preview .hero-admin-preview-copy h3,
.mid-mobile-preview .hero-admin-preview-copy h3 {
  margin-top: 5px;
  font-size: 18px;
}

.mid-desktop-preview .hero-admin-preview-copy p,
.mid-mobile-preview .hero-admin-preview-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  font-size: 9px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.mid-desktop-preview .hero-admin-preview-copy span,
.mid-mobile-preview .hero-admin-preview-copy span {
  min-height: 27px;
  margin-top: 7px;
  padding: 0 11px;
  font-size: 9px;
}

.mid-desktop-preview .hero-admin-preview-copy blockquote,
.mid-mobile-preview .hero-admin-preview-copy blockquote { display: none; }

.hero-admin-preview-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-admin-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--preview-scale, 1));
  transform-origin: center;
}

.hero-admin-preview-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 11, 31, .75), rgba(18, 11, 31, .12)),
    linear-gradient(180deg, rgba(10, 8, 24, .04), rgba(20, 13, 34, .92));
}

.hero-admin-preview-copy {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 24px;
}

.hero-admin-preview-copy small {
  color: #f5d8ff;
  font-family: Georgia, serif;
  font-weight: 900;
  letter-spacing: .12em;
}

.hero-admin-preview-copy h3 {
  margin: 12px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 36px;
  line-height: 1.12;
}

.desktop-preview .hero-admin-preview-copy h3 { font-size: 28px; }
.desktop-preview .hero-admin-preview-copy { max-width: 70%; }
.mobile-preview .hero-admin-preview-copy h3 { font-size: 30px; }

.hero-admin-preview-copy h3 em {
  color: #f4a7c8;
  font-style: normal;
}

.hero-admin-preview-copy p,
.hero-admin-preview-copy blockquote {
  margin: 12px 0 0;
  line-height: 1.6;
}

.hero-admin-preview-copy p {
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
}

.hero-admin-preview-copy span {
  min-height: 42px;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  color: #34224e;
  background: linear-gradient(90deg, #fff3f8, #ffc7d9);
  font-size: 13px;
  font-weight: 900;
}

.hero-admin-preview-copy blockquote {
  color: rgba(255, 255, 255, .8);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
}

.admin-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  transform: translateY(18px);
  opacity: 0;
  border-radius: 14px;
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  transition: .2s ease;
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 900px) {
  .hero-media img {
    object-position: var(--hero-position-desktop, 50% 50%);
    transform: scale(var(--hero-scale-desktop, 1));
  }
  .mid-promo-slide > img {
    object-position: var(--promo-position-desktop, 50% 50%);
    transform: scale(var(--promo-scale-desktop, 1));
  }
  .app-shell {
    width: min(100%, 1180px);
    padding: 0 28px 112px;
  }

  .hero-panel {
    min-height: 650px;
    margin-inline: -28px;
    border-radius: 30px;
  }

  .topbar { padding: 28px 40px 0; }

  .hero-copy {
    left: 64px;
    right: auto;
    width: min(620px, calc(100% - 128px));
    bottom: 58px;
  }

  .hero-copy h1 { font-size: 72px; }
  .hero-copy p { max-width: 560px; }
  .quick-entry { padding: 20px 32px; }
  .quick-entry small { font-size: 12px; }
  .banner-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mid-promo { min-height: 240px; margin-top: 48px; }
  .mid-promo-copy { left: 48px; width: min(58%, 620px); }
  .mid-promo-copy h2 { font-size: 38px; }
  .section-block { margin-top: 46px; }
  .test-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .test-card { min-height: 310px; }
  .bottom-nav { width: min(calc(100% - 40px), 900px); }
}

@media (max-width: 680px) {
  .app-shell { padding-inline: 12px; }
  .hero-panel { margin-inline: -12px; min-height: 620px; border-radius: 20px; }
  .hero-copy { left: 20px; right: 20px; }
  .hero-copy h1 { font-size: 42px; }
  .quick-entry { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px; }
  .quick-entry span { width: 38px; height: 38px; }
  .quick-entry b { font-size: 12px; }
  .quick-entry small { display: none; }
  .quick-brand { padding-bottom: 10px; }
  .quick-brand b { font-size: 16px; }
  .reward-banner { grid-template-columns: 48px 1fr; }
  .reward-banner a,
  .reward-banner .banner-action { grid-column: 1 / -1; }
  .reward-banner .gift { width: 46px; height: 46px; font-size: 22px; }
  .mid-promo { min-height: 260px; border-radius: 18px; }
  .mid-promo-copy { left: 20px; width: calc(100% - 78px); }
  .mid-promo-copy h2 { font-size: 29px; }
  .mid-promo-copy p { font-size: 12px; }
  .mid-promo-pagination { right: 16px; bottom: 14px; }
  .tool-card {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }
  .tool-card .card-action { grid-column: 1 / -1; }
  .thumb { min-height: 104px; }
  .tool-card h3 { font-size: 20px; line-height: 1.25; }
  .tool-card p { font-size: 13px; }
  .tool-card .tags { gap: 6px; margin-top: 10px; }
  .tool-card .tags span { padding: 4px 8px; font-size: 11px; }
  .swipe-hint {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 6px;
    margin: 8px 0 10px auto;
    border-radius: 999px;
    padding: 5px 10px;
    color: #76548e;
    background: linear-gradient(90deg, #f1e9ff, #ffe7f0);
    font-size: 11px;
    font-weight: 800;
  }
  .swipe-hint span {
    display: inline-block;
    color: #b05ca0;
    font-size: 17px;
    line-height: 1;
    animation: swipe-nudge 1.4s ease-in-out infinite;
  }
  .test-grid {
    display: grid;
    grid-template-columns: repeat(var(--test-column-count, 1), calc((100vw - 34px) / 2));
    grid-template-rows: repeat(2, 250px);
    grid-auto-flow: column;
    grid-auto-columns: calc((100vw - 34px) / 2);
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 18px 10px 0;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0 18px;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .test-grid::-webkit-scrollbar { display: none; }
  .test-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 250px;
    padding: 12px;
    isolation: isolate;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .test-card h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .test-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .test-card .test-meta { gap: 5px; }
  .test-card .test-meta span { padding: 4px 7px; font-size: 10px; }
  .mini-board { grid-template-columns: 1fr; }
  .form-grid, .card-edit { grid-template-columns: 1fr; }
  .content-media-edit { grid-template-columns: 1fr; }
  .content-preview-set { grid-template-columns: 1fr; }
  .hero-slide-edit-body { grid-template-columns: 1fr; }
  .hero-preview-set { position: relative; }
  .desktop-preview { min-height: 260px; }
  .hero-slide-edit-head { align-items: flex-start; }
  .hero-slide-actions { align-items: stretch; flex-direction: column; }
  .admin-hero { display: grid; }
}

@keyframes swipe-nudge {
  0%, 100% { transform: translateX(0); opacity: .65; }
  50% { transform: translateX(4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { transition: none; }
  .mid-promo-slide { transition: none; }
}
