:root {
  --bg: #fff7ed;
  --ink: #2f160f;
  --muted: #7b5b4a;
  --surface: #fffaf4;
  --line: #f1caa5;
  --accent: #e8502f;
  --accent-strong: #b9321d;
  --teal: #f08a28;
  --gold: #f6b73c;
  --navy: #5b2416;
  --shadow: 0 18px 50px rgba(136, 54, 22, 0.13);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(232, 80, 47, 0.12), transparent 34%),
    linear-gradient(225deg, rgba(246, 183, 60, 0.16), transparent 32%),
    var(--bg);
  color: var(--ink);
}

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
  padding: 0 12px;
  outline: none;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(240, 138, 40, 0.18);
}

.is-hidden {
  display: none !important;
}

.topbar,
.admin-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 20px clamp(18px, 5vw, 64px);
}

.brand {
  align-items: center;
  display: inline-flex;
  min-width: 0;
  text-decoration: none;
}

.brand-lockup {
  align-items: center;
  display: grid;
  gap: clamp(10px, 2.4vw, 18px);
  grid-template-columns: auto auto minmax(0, auto);
  justify-content: start;
  width: min(100%, 860px);
}

.brand-logo-image {
  border-radius: 10px;
  display: block;
  height: var(--brand-logo-height);
  max-width: min(28vw, 170px);
  object-fit: contain;
  width: auto;
}

.brand-text {
  color: #fff8ef;
  display: block;
  font-size: var(--brand-text-size);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-shadow:
    0 0 16px rgba(255, 45, 85, 0.24),
    0 0 24px rgba(255, 211, 90, 0.18);
  white-space: nowrap;
}

.brand-divider {
  background: linear-gradient(90deg, #ff3d2e, #ff8a1f, #ffd166);
  border-radius: 999px;
  display: block;
  height: clamp(24px, 5vw, 40px);
  width: 3px;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.topbar-note {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
}

.topbar-note span {
  background: var(--teal);
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(240, 138, 40, 0.14);
  height: 8px;
  width: 8px;
}

.ghost-link,
button.secondary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 0 14px;
}

button.secondary:hover,
.ghost-link:hover {
  background: #f0f3f8;
}

button.danger {
  background: var(--navy);
}

button.danger:hover {
  background: #13253e;
}

.public-shell {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(100vh - 96px);
  padding: 24px clamp(18px, 5vw, 64px) 56px;
}

.entry-panel,
.wheel-stage,
.login-panel,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 222, 232, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.entry-panel {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 40px);
}

.entry-panel h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.02;
  margin: 0;
}

.entry-panel p,
.wheel-copy p,
.privacy-note,
.form-message {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.code-form {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
}

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

.process-strip div {
  align-items: center;
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.process-strip span {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.process-strip strong {
  font-size: 13px;
  line-height: 1.2;
}

.privacy-note {
  border-left: 3px solid var(--gold);
  font-size: 13px;
  padding-left: 12px;
}

.form-message {
  min-height: 24px;
}

.form-message.error {
  color: var(--accent-strong);
}

.form-message.success {
  color: var(--teal);
}

.welcome-stage {
  display: grid;
  gap: 18px;
}

.welcome-card,
.comfort-grid {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 222, 232, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.welcome-card {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 420px;
  padding: clamp(24px, 4vw, 44px);
}

.welcome-card h2 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  margin: 0 0 14px;
}

.welcome-card p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.mini-wheel {
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(from -90deg, var(--accent) 0 33%, var(--teal) 33% 66%, var(--gold) 66% 100%);
  border: 10px solid #fff;
  border-radius: 50%;
  box-shadow: 0 22px 48px rgba(23, 32, 42, 0.16);
  display: flex;
  justify-content: center;
  max-width: 180px;
  position: relative;
}

.mini-wheel::before {
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid var(--ink);
  content: "";
  left: 50%;
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
}

.mini-wheel span {
  background: #fff;
  border: 7px solid var(--ink);
  border-radius: 50%;
  height: 62px;
  width: 62px;
}

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

.comfort-grid div {
  background: #fff;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 18px;
}

.comfort-grid strong {
  font-size: 15px;
}

.comfort-grid span {
  color: var(--muted);
  font-size: 12px;
}

.wheel-stage {
  align-items: center;
  display: grid;
  gap: 24px;
  justify-items: center;
  min-height: 640px;
  padding: clamp(22px, 4vw, 36px);
}

.wheel-copy {
  text-align: center;
}

.wheel-copy h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin: 8px 0;
}

.campaign-code {
  color: var(--accent) !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.wheel-wrap {
  aspect-ratio: 1;
  max-width: 520px;
  position: relative;
  width: min(78vw, 520px);
}

.prize-preview-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 520px;
  padding: 16px;
  width: 100%;
}

.prize-preview-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.prize-preview-title h3 {
  font-size: 18px;
  margin: 0;
}

.prize-preview-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.prize-preview-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 10px;
}

.prize-thumb {
  align-items: center;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 42px;
}

.prize-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.prize-preview-item div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.prize-preview-item strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prize-preview-item span {
  color: var(--muted);
  font-size: 12px;
}

.wheel {
  aspect-ratio: 1;
  border: 12px solid #fff;
  border-radius: 50%;
  box-shadow: 0 24px 70px rgba(23, 32, 42, 0.2), inset 0 0 0 2px rgba(23, 32, 42, 0.08);
  overflow: hidden;
  position: relative;
  transform: rotate(0deg);
  transition: transform 4s cubic-bezier(0.13, 0.72, 0.08, 1);
}

.wheel::after {
  background: #fff;
  border: 8px solid var(--ink);
  border-radius: 50%;
  content: "";
  height: 72px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  z-index: 3;
}

.wheel-pointer {
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 34px solid var(--ink);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18));
  left: 50%;
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  z-index: 3;
}

.wheel-prize-image {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(1, 7, 18, 0.22);
  display: flex;
  height: var(--wheel-image-size);
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%);
  width: var(--wheel-image-size);
  z-index: 1;
}

.wheel-prize-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.wheel.is-crowded .wheel-prize-image {
  border-radius: 12px;
  border-width: 2px;
}

.wheel-bg-canvas,
.wheel-label-canvas {
  display: block;
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.wheel-bg-canvas {
  z-index: 0;
}

.wheel-label-canvas {
  z-index: 2;
}

.spin-button {
  align-items: center;
  border: 8px solid #fff;
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(23, 32, 42, 0.22);
  display: inline-flex;
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 900;
  height: 104px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  left: 50%;
  padding: 0;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  width: 104px;
  z-index: 4;
}

.spin-button:hover {
  transform: translate(-50%, -51%);
}

.spin-button:disabled {
  transform: translate(-50%, -50%);
}

.result-panel {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  max-width: 520px;
  padding: 14px;
  width: 100%;
}

.result-panel img {
  background: #f1f4f8;
  border-radius: 8px;
  height: 72px;
  object-fit: cover;
  width: 72px;
}

.result-panel p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.result-panel h3 {
  font-size: 26px;
  margin: 4px 0 0;
}

body.public-page {
  --topbar-offset: clamp(64px, 13vw, 86px);
  background:
    radial-gradient(circle at 82% 14%, rgba(255, 209, 102, 0.2), transparent 25%),
    radial-gradient(circle at 14% 36%, rgba(255, 94, 98, 0.18), transparent 31%),
    linear-gradient(rgba(255, 171, 99, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 171, 99, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, #2a0d09 0%, #45170d 48%, #6f2414 100%);
  background-size: auto, auto, 72px 72px, 72px 72px, auto;
  color: #fff8ef;
  padding-top: var(--topbar-offset);
}

.public-page .topbar {
  --brand-logo-height: clamp(32px, 7vw, 50px);
  --brand-text-size: clamp(24px, 7vw, 44px);
  --event-title-size: clamp(11px, 2.2vw, 16px);
  align-items: center;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 141, 51, 0.18), transparent 31%),
    linear-gradient(180deg, rgba(61, 18, 10, 0.98), rgba(42, 13, 9, 0.96));
  border-bottom: 1px solid rgba(255, 185, 112, 0.24);
  flex-direction: row;
  gap: 0;
  justify-content: flex-start;
  left: 0;
  padding: clamp(9px, 1.8vw, 18px) clamp(18px, 6vw, 72px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.event-title {
  color: #ffd166;
  display: block;
  font-size: var(--event-title-size);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  text-align: left;
  text-shadow: 0 0 18px rgba(255, 211, 90, 0.28);
  white-space: nowrap;
}

.brand-word {
  color: #fff8ef;
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-word strong {
  color: #ffb000;
}

.topbar-cta {
  align-items: center;
  background: linear-gradient(135deg, #ff4d3d, #ffb000);
  border-radius: 999px;
  box-shadow: 0 0 28px rgba(255, 129, 49, 0.38);
  color: #351007;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  min-height: 54px;
  padding: 0 25px;
  white-space: nowrap;
}

.public-page .public-shell {
  align-items: stretch;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto;
  max-width: 620px;
  min-height: auto;
  padding: 34px clamp(18px, 4vw, 28px) 110px;
}

.public-page .entry-panel,
.public-page .wheel-stage {
  background: linear-gradient(155deg, rgba(80, 25, 12, 0.96), rgba(45, 15, 10, 0.94));
  background-clip: padding-box;
  border: 1px solid rgba(255, 184, 107, 0.34);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(71, 21, 9, 0.42);
}

.public-page .entry-panel {
  gap: 14px;
  overflow: hidden;
  padding: 22px;
}

.public-page .entry-panel h1 {
  color: #fff8ef;
  display: grid;
  font-size: clamp(40px, 11vw, 64px);
  gap: 0;
  line-height: 1.08;
  margin: 0;
}

.public-page .entry-panel h1 strong {
  color: #ffb000;
}

.public-page .entry-panel h1 em {
  color: #ff7a45;
  font-style: normal;
}

.public-page .entry-panel p,
.public-page .wheel-copy p,
.public-page .form-message {
  color: #e9b99a;
}

.public-page .code-form {
  grid-template-columns: 1fr;
}

.public-page input {
  background: rgba(52, 17, 9, 0.88);
  border: 1px solid rgba(255, 190, 122, 0.36);
  border-radius: 16px;
  color: #fff8ef;
  min-height: 58px;
  padding: 0 18px;
}

.public-page input::placeholder {
  color: #b98265;
}

.public-page input:focus {
  border-color: #ff9f45;
  box-shadow: 0 0 0 4px rgba(255, 159, 69, 0.18);
}

.public-page button {
  background: linear-gradient(135deg, #ff4d3d, #ffb000);
  border-radius: 18px;
  color: #351007;
  font-size: 17px;
  font-weight: 900;
  min-height: 58px;
  box-shadow: 0 0 30px rgba(255, 129, 49, 0.3);
}

.public-page button:hover {
  background: linear-gradient(135deg, #ff6755, #ffc247);
}

.public-page button:disabled {
  background: #6e3324;
  color: #d8a891;
  opacity: 1;
}

.public-page .process-strip {
  gap: 10px;
}

.public-page .process-strip div {
  align-content: center;
  background: rgba(61, 20, 11, 0.76);
  border-color: rgba(255, 190, 122, 0.28);
  color: #ffe8d2;
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
}

.public-page .process-strip span {
  background: #ffb000;
  color: #351007;
}

.public-page .process-strip strong {
  color: #fff8ef;
  display: block;
  font-size: clamp(12px, 2.8vw, 14px);
  line-height: 1.16;
  max-width: 100%;
  text-align: center;
  width: 100%;
}

.public-page .wheel-stage {
  gap: 22px;
  min-height: 0;
  overflow: hidden;
  padding: 26px 22px;
  position: relative;
}

.public-page .wheel-copy {
  text-align: center;
}

.public-page .wheel-copy h2 {
  color: #fff8ef;
  font-size: clamp(34px, 9vw, 48px);
}

.public-page .campaign-code {
  color: #ffb000 !important;
}

.public-page .wheel-wrap {
  width: min(84vw, 420px);
}

.public-page .wheel {
  border-color: rgba(255, 246, 232, 0.94);
  box-shadow: 0 30px 78px rgba(70, 18, 8, 0.44), inset 0 0 0 2px rgba(82, 24, 8, 0.18);
}

.public-page .wheel::after {
  border-color: #3b1309;
}

.public-page .wheel-pointer {
  border-top-color: #fff7ea;
}

.public-page .spin-button {
  background: linear-gradient(135deg, rgba(255, 77, 61, 0.95), rgba(255, 176, 0, 0.95));
  border-color: rgba(255, 247, 234, 0.82);
  border-radius: 50%;
  color: #351007;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1;
  min-height: 0;
  padding: 0;
}

.public-page .spin-button:disabled {
  background: linear-gradient(135deg, #7a341f, #9f4a23);
  color: #fff7ea;
}

.public-page .result-panel {
  background: rgba(59, 19, 9, 0.84);
  border-color: rgba(255, 159, 69, 0.38);
}

.public-page .result-panel h3 {
  color: #ffb000;
}

.vision-panel {
  background:
    linear-gradient(90deg, rgba(255, 61, 46, 0.94), rgba(255, 138, 31, 0.94), rgba(255, 209, 102, 0.94)) top / 100% 3px no-repeat,
    linear-gradient(155deg, rgba(83, 27, 12, 0.97), rgba(45, 15, 10, 0.95));
  border: 1px solid rgba(255, 184, 107, 0.36);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(71, 21, 9, 0.36);
  display: grid;
  gap: 18px;
  grid-column: 1 / -1;
  overflow: hidden;
  padding: clamp(24px, 5vw, 38px);
}

.vision-heading {
  display: grid;
}

.vision-panel h2 {
  color: #fff8ef;
  font-size: clamp(26px, 7vw, 42px);
  line-height: 1.05;
  margin: 0;
}

.vision-copy {
  color: #f2c9ad;
  display: grid;
  font-size: clamp(14px, 3.5vw, 16px);
  gap: 14px;
  line-height: 1.72;
}

.vision-copy p {
  margin: 0;
}

.vision-copy p:first-child {
  color: #fff8ef;
  font-weight: 800;
}

.login-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-panel {
  display: grid;
  gap: 16px;
  max-width: 380px;
  padding: 32px;
  width: 100%;
}

.login-panel h1 {
  margin: 0;
}

.login-panel label,
.campaign-form label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.admin-shell {
  min-height: 100vh;
}

.admin-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  padding: 0 clamp(18px, 4vw, 40px) 40px;
}

.panel {
  padding: 18px;
}

.panel-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.panel-title h2,
.prize-toolbar h3 {
  font-size: 20px;
  margin: 0;
}

.small-button {
  font-size: 13px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
}

.campaign-list {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
}

.campaign-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding: 12px;
  text-align: left;
  transform: none !important;
}

.campaign-item:hover,
.campaign-item.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(7, 143, 138, 0.12);
}

.code-generator-panel,
.prize-settings-panel {
  align-self: start;
}

.code-generator-panel .form-grid {
  grid-template-columns: 1fr;
}

.code-generator-panel .panel-title span,
.generated-code-panel .panel-title span {
  white-space: nowrap;
}

.generated-code-panel {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.compact-title {
  margin-bottom: 10px;
}

.compact-title h3 {
  font-size: 16px;
  margin: 0;
}

.generated-codes {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.generated-code-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.campaign-item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.campaign-item-body strong,
.generated-code-item strong {
  color: var(--navy);
  font-size: 15px;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-item-body span,
.generated-code-item span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-delete-button {
  background: #fff;
  border: 1px solid rgba(226, 61, 87, 0.42);
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 13px;
  min-height: 34px;
  padding: 0 12px;
}

.code-delete-button:hover {
  background: rgba(226, 61, 87, 0.08);
  color: var(--accent-strong);
}

.editor-panel {
  min-width: 0;
}

.campaign-form {
  display: grid;
  gap: 18px;
}

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

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

.switch-row {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  gap: 10px !important;
}

.switch-row input {
  min-height: auto;
  width: 18px;
}

.prize-toolbar,
.submit-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

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

.prize-guide p {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  min-height: 58px;
  padding: 10px 12px;
}

.prize-guide p::first-line {
  color: var(--navy);
  font-weight: 800;
}

.prize-table {
  display: grid;
  gap: 10px;
}

.prize-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.4fr auto auto;
}

.upload-button {
  align-items: center;
  background: #f0f3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink) !important;
  cursor: pointer;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 44px;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

.upload-button input {
  display: none;
}

.icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  display: inline-flex;
  font-size: 24px;
  height: 44px;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  width: 44px;
}

.logs-panel {
  grid-column: 1 / -1;
}

.table-scroll {
  overflow: auto;
}

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
}

.pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  min-width: 92px;
  text-align: center;
}

.pagination button {
  min-height: 36px;
}

.empty-table-message {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

table {
  border-collapse: collapse;
  min-width: 920px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 800;
}

td {
  line-height: 1.45;
}

@media (max-width: 900px) {
  .public-shell,
  .welcome-card,
  .admin-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .public-shell {
    min-height: auto;
  }

  .public-page .topbar {
    padding-bottom: clamp(11px, 2.4vw, 19px);
  }

  .wheel-stage {
    min-height: 0;
  }

  .mini-wheel {
    justify-self: center;
    width: min(52vw, 180px);
  }

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

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

@media (max-width: 560px) {
  .code-form,
  .code-generate-field,
  .comfort-grid,
  .prize-guide,
  .prize-row {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .admin-actions,
  .panel-title,
  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: center;
    padding: 12px 16px 6px;
  }

  .public-page .topbar {
    gap: 0;
    padding: 10px 18px;
  }

  .brand-lockup {
    gap: 9px;
    grid-template-columns: auto auto minmax(0, auto);
    width: 100%;
  }

  .brand-divider {
    height: 28px;
    width: 2px;
  }

  .event-title {
    font-size: 11px;
  }

  .topbar-cta {
    flex: 0 0 auto;
    font-size: 14px;
    min-height: 44px;
    padding: 0 16px;
  }

  .public-shell {
    gap: 16px;
    padding: 10px 10px 30px;
  }

  .public-page .public-shell {
    padding: 20px 14px 96px;
  }

  .entry-panel,
  .wheel-stage {
    min-width: 0;
    width: 100%;
  }

  .entry-panel {
    gap: 16px;
    padding: 22px 18px 18px;
  }

  .public-page .entry-panel {
    padding: 16px;
  }

  .entry-panel h1 {
    font-size: 36px;
  }

  .public-page .entry-panel h1 {
    font-size: clamp(40px, 12vw, 48px);
  }

  .entry-panel p,
  .wheel-copy p,
  .form-message {
    font-size: 14px;
  }

  .code-form {
    gap: 10px;
  }

  .process-strip {
    gap: 8px;
  }

  .process-strip div {
    align-items: flex-start;
    flex-direction: column;
    padding: 9px;
  }

  .process-strip strong {
    font-size: 12px;
  }

  .public-page .process-strip div {
    align-items: center;
    min-height: 70px;
  }

  .wheel-stage {
    gap: 16px;
    padding: 18px 12px;
  }

  .public-page .wheel-stage {
    padding: 22px 14px;
  }

  .wheel-copy h2 {
    font-size: 28px;
  }

  .wheel-wrap {
    width: min(84vw, 360px);
  }

  .public-page .wheel-wrap {
    width: min(82vw, 330px);
  }

  .wheel {
    border-width: 8px;
  }

  .wheel::after {
    border-width: 7px;
    height: 58px;
    width: 58px;
  }

  .spin-button {
    border-width: 7px;
    font-size: 13px;
    height: 78px;
    width: 78px;
  }

  .prize-preview-panel {
    padding: 12px;
  }

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

  .prize-preview-item {
    align-items: center;
    flex-direction: column;
    gap: 6px;
    justify-content: start;
    min-height: 104px;
    padding: 8px 6px;
    text-align: center;
  }

  .prize-thumb {
    height: 36px;
    width: 36px;
  }

  .prize-preview-item strong {
    display: -webkit-box;
    font-size: 12px;
    line-height: 1.25;
    min-height: 30px;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .prize-preview-item span {
    font-size: 11px;
  }

}
