:root {
  --berry: #53364f;
  --red: #ed77a4;
  --pink: #f6b7d1;
  --cream: #f8fffd;
  --brown: #4e374b;
  --line: #8fdad8;
}

body {
  background: linear-gradient(180deg, #8fdedb, #f8c8dc 72%, #f9e4ec);
}

.page-shell::after {
  background: linear-gradient(180deg, rgba(239,255,252,.03), rgba(239,255,252,.16) 25%, rgba(255,240,247,.35) 58%, rgba(255,233,242,.72));
}

.eyebrow {
  color: #427d81;
  border: 2px solid rgba(77, 54, 75, .16);
  background: rgba(239, 255, 252, .78);
  box-shadow: 3px 3px 0 rgba(76, 54, 74, .13);
}

.hero h1 small {
  color: #52354e;
  -webkit-text-stroke: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(255,255,255,.92), 0 5px 14px rgba(68,50,66,.18);
}

.hero h1 b {
  color: #51364d;
  border: 2px solid #50364d;
  background: linear-gradient(90deg, rgba(210,250,245,.91), rgba(255,221,236,.91));
  box-shadow: 4px 5px 0 rgba(78,54,75,.19);
  text-shadow: 1px 1px 0 #fff;
}

.festival-copy {
  color: #523f50;
}

.lottery-card,
.history-card {
  border: 3px solid rgba(77, 54, 75, .78);
  background: linear-gradient(145deg, rgba(231,255,251,.78), rgba(255,226,238,.76));
  box-shadow: 7px 9px 0 rgba(78,54,75,.2), inset 0 0 0 5px rgba(255,255,255,.65);
}

.lottery-card::before {
  border: 2px dashed rgba(80, 55, 77, .22);
}

.chance-pill {
  color: #50374b;
  border: 2px solid #50374b;
  background: linear-gradient(90deg, #e3fcf8, #ffe1ed);
  box-shadow: 3px 4px 0 rgba(78,54,75,.17);
}

.chance-pill span {
  color: #46888a;
  border-color: rgba(78,54,75,.25);
}

.chance-pill strong {
  color: #e35f93;
}

.halo {
  border: 2px dashed rgba(79,55,76,.25);
  box-shadow: none;
}

.halo-two {
  border-color: rgba(78, 191, 189, .45);
}

.wheel-stage {
  --wheel-stage-size: min(calc(100vw - 48px), 460px);
  width: var(--wheel-stage-size) !important;
  height: var(--wheel-stage-size) !important;
  min-width: var(--wheel-stage-size) !important;
  min-height: var(--wheel-stage-size) !important;
  max-width: var(--wheel-stage-size) !important;
  max-height: var(--wheel-stage-size) !important;
  aspect-ratio: 1 / 1 !important;
  margin: 8px auto 12px;
  contain: layout size;
}

.wheel-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1.2%;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 66%, rgba(255,255,255,.95) 66.3% 68%, transparent 68.3%),
    repeating-conic-gradient(from -4deg, #f397b8 0 8deg, #9be1dd 8deg 15deg);
  box-shadow: 0 12px 30px rgba(76,52,73,.22), 0 0 0 3px #50364d;
}

.wheel {
  z-index: 1;
  width: 88% !important;
  height: 88% !important;
  min-width: 88% !important;
  min-height: 88% !important;
  max-width: 88% !important;
  max-height: 88% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px #50364d, 0 14px 28px rgba(77,53,75,.2);
  filter: none;
}

#wheel-canvas {
  border-radius: 50%;
}

.pointer {
  z-index: 7;
  top: -5px;
  width: 108px;
  height: 112px;
  filter: drop-shadow(0 7px 4px rgba(78,54,75,.25));
}

.pointer::before {
  content: "★";
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 31px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #f8a4c1, #e55f94);
  box-shadow: 0 0 0 3px #50374c, inset 0 2px rgba(255,255,255,.5);
  font-size: 19px;
  line-height: 1;
}

.pointer::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 3px;
  width: 102px;
  height: 40px;
  border: 3px solid #50364d;
  border-radius: 17px 17px 22px 22px;
  background: linear-gradient(90deg, #9ce5e0 0 43%, #f5a4c2 43% 57%, #9ce5e0 57%);
  clip-path: polygon(0 13%, 35% 30%, 50% 0, 65% 30%, 100% 13%, 86% 100%, 54% 65%, 50% 100%, 46% 65%, 14% 100%);
}

.pointer i {
  position: absolute;
  z-index: 2;
  top: 47px;
  left: 38px;
  width: 32px;
  height: 61px;
  background: linear-gradient(90deg, #6c4965, #432d42 50%, #6c4965);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 0 #fff);
}

.spin-button {
  color: #fff;
  border: 4px solid #fff;
  outline: 3px solid #50364d;
  background: linear-gradient(145deg, #f797ba, #e55f94);
  box-shadow: 0 8px 0 #53364f, 0 15px 28px rgba(77,53,75,.28), inset 0 3px rgba(255,255,255,.48);
}

.spin-button:active:not(:disabled) {
  box-shadow: 0 3px 0 #53364f;
}

.status-text {
  color: #50384c;
  text-shadow: 1px 1px 0 rgba(255,255,255,.8);
}

.fair-note {
  color: #527d7e;
  font-weight: 700;
}

.section-heading {
  border-color: rgba(79,55,77,.22);
}

.section-heading h2,
.record-result {
  color: #50364c;
}

.section-heading > span,
.empty-state span {
  color: #d9578c;
  background: #ffe3ef;
  border-color: #ed9cbe;
}

.record-index {
  background: #67c9c6;
  box-shadow: 0 4px 0 #3a9696;
}

.result-panel {
  border-color: #fff;
  outline: 3px solid #50364d;
  background: linear-gradient(145deg, #e3fffb, #ffe1ed);
}

.result-record {
  margin: -5px 0 20px;
  padding: 13px 14px;
  border: 2px dashed rgba(80, 54, 77, .34);
  border-radius: 15px;
  color: #50364d;
  background: rgba(255, 255, 255, .52);
  text-align: left;
}

.result-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 9px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(80, 54, 77, .16);
  font-size: 11px;
  font-weight: 900;
}

.result-record-head strong {
  color: #dc5e91;
  font: 900 12px Arial, sans-serif;
}

.result-history-list {
  max-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #eba0bd transparent;
}

.result-history-item {
  display: grid;
  grid-template-columns: 29px 1fr;
  align-items: center;
  gap: 9px;
  padding: 8px 2px;
  border-bottom: 1px dashed rgba(80, 54, 77, .18);
}

.result-history-item:last-child {
  border-bottom: 0;
}

.result-history-item > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #63c4c1;
  font: 800 9px Arial, sans-serif;
}

.result-history-item div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.result-history-item strong {
  min-width: 0;
  color: #50364d;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.result-history-item time {
  flex: 0 0 auto;
  color: #9d7180;
  font-size: 8px;
}

.seal,
.confirm-button {
  background: #eb70a0;
}

.seal {
  border: 4px solid #fff;
  outline: 3px solid #50364d;
  color: #fff;
  background: linear-gradient(145deg, #f59abc, #df5e93);
  box-shadow: 0 7px 0 #50364d, 0 12px 25px rgba(77,53,75,.22);
  font-family: Arial, sans-serif;
  font-size: 32px;
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(80,54,77,.28);
  transform: rotate(-6deg);
}

.admin-page .generator-card {
  border: 3px solid #50364d;
  background: linear-gradient(145deg, rgba(231,255,251,.91), rgba(255,226,238,.91));
  box-shadow: 6px 7px 0 rgba(78,54,75,.2);
}

.admin-mark,
.generate-button,
.copy-button {
  background: linear-gradient(145deg, #f38db3, #dc5e91);
  box-shadow: 0 5px 0 #53364f;
}
