:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --bg-cool: #eaf4f7;
  --ink: #1a2130;
  --muted: #657084;
  --line: #d9d2c5;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --brand: #b8212f;
  --brand-dark: #8f1724;
  --gold: #e7ad36;
  --gold-deep: #a96e12;
  --teal: #0f766e;
  --danger: #b91c1c;
  --shadow: 0 18px 50px rgba(49, 38, 20, 0.14);
  --focus: 0 0 0 3px rgba(15, 118, 110, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Hiragino Sans GB",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

[hidden] {
  display: none !important;
}

[v-cloak] {
  display: none;
}

.player-page,
.admin-page {
  min-height: 100dvh;
  background:
    linear-gradient(125deg, rgba(255, 251, 239, 0.96), rgba(234, 244, 247, 0.9) 48%, rgba(255, 236, 223, 0.92)),
  var(--bg);
}

.egg-only-page {
  display: block;
  overflow: hidden;
  background:
    url("/assets/egg_bg.jpg") center / cover no-repeat fixed,
    radial-gradient(circle at 50% 18%, rgba(255, 218, 118, 0.3), transparent 24%),
    radial-gradient(circle at 18% 76%, rgba(250, 169, 57, 0.22), transparent 28%),
    linear-gradient(180deg, #bf1f31 0%, #9e1828 48%, #71121d 100%);
}

.egg-only-shell {
  width: 100vw;
  min-height: 100dvh;
}

.egg-only-stage {
  display: grid;
  width: 100vw;
  min-height: 100dvh;
  align-items: center;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(28px, 5vw, 72px);
  background: transparent;
}

.egg-only-stage .egg-grid {
  width: min(1160px, calc(100vw - clamp(48px, 9vw, 144px)));
  min-height: clamp(420px, 58vh, 560px);
  margin: 0 auto;
  padding: 0;
  gap: clamp(22px, 4vw, 56px);
}

.egg-only-stage .egg-card {
  min-height: clamp(350px, 46vh, 500px);
  border-color: rgba(255, 232, 171, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 244, 218, 0.04));
}

.egg-only-stage .egg-image {
  width: clamp(150px, 13vw, 210px);
  height: clamp(200px, 18vw, 280px);
}

.egg-only-stage .egg-open {
  width: clamp(200px, 17vw, 270px);
  height: clamp(216px, 18.5vw, 292px);
}

.egg-only-stage .hammer {
  width: clamp(88px, 8vw, 126px);
  top: clamp(34px, 7vh, 70px);
  right: clamp(28px, 4vw, 60px);
}

.scratch-page,
.wheel-page {
  overflow: hidden;
}

.scratch-page {
  background:
    url("/assets/guaguaka_bg.jpg?ver=2") center / cover no-repeat fixed,
    radial-gradient(circle at 50% 20%, rgba(255, 245, 185, 0.28), transparent 26%),
    linear-gradient(180deg, #0f766e 0%, #0b4f4a 52%, #062e2c 100%);
}

.wheel-page {
  background:
    url("/assets/egg_bg.jpg") center / cover no-repeat fixed,
    linear-gradient(180deg, #0f766e 0%, #0b4f4a 52%, #062e2c 100%);
}

.scratch-shell,
.wheel-shell {
  width: 100vw;
  min-height: 100dvh;
}

.scratch-stage,
.wheel-stage {
  display: grid;
  width: 100vw;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(20px, 5vw, 72px);
  color: #fffdf8;
  overflow: hidden;
  position: relative;
}

.scratch-stage {
  perspective: 1200px;
}

.scratch-stage::before,
.wheel-stage::before {
  content: "";
  position: absolute;
  inset: clamp(14px, 2.6vw, 36px);
  border: 1px solid rgba(223, 255, 243, 0.22);
  border-radius: 8px;
  pointer-events: none;
}

.scratch-grid {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(980px, calc(100vw - clamp(42px, 10vw, 160px)));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 32px);
}

.scratch-card {
  position: relative;
  display: grid;
  min-height: clamp(230px, 36vw, 360px);
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(235, 255, 246, 0.34);
  background: linear-gradient(135deg, rgba(255, 253, 245, 0.16), rgba(255, 255, 255, 0.06));
  color: #fffdf8;
  box-shadow: 0 18px 42px rgba(4, 26, 24, 0.2);
  transform-style: preserve-3d;
  transition:
    border-color 240ms ease,
    box-shadow 240ms ease,
    opacity 240ms ease,
    transform 240ms ease;
  will-change: transform;
}

.scratch-prize {
  position: relative;
  z-index: 1;
  color: #ffe58f;
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 900;
  line-height: 1;
}

.scratch-cover {
  position: absolute;
  inset: 12px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0 10px, rgba(210, 235, 228, 0.28) 10px 20px),
    linear-gradient(135deg, #d6eee6, #8eb8ad);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  transition:
    opacity 420ms ease,
    transform 520ms ease;
  backface-visibility: hidden;
}

.scratch-cover::after {
  content: "RASPE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(11, 79, 74, 0.76);
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 900;
}

.scratch-shine {
  position: absolute;
  inset: -45%;
  opacity: 0;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.84) 48%, transparent 60%);
  transform: translateX(-55%) rotate(12deg);
  pointer-events: none;
}

.scratch-card:hover:not(:disabled) {
  border-color: rgba(255, 229, 143, 0.66);
  box-shadow: 0 22px 54px rgba(4, 26, 24, 0.26);
  transform: translateY(-5px);
}

.scratch-card:hover:not(:disabled) .scratch-cover {
  transform: translateX(10%) rotate(-3deg);
}

.scratch-card.is-flipping {
  z-index: 4;
  border-color: rgba(255, 229, 143, 0.9);
  box-shadow:
    0 0 0 3px rgba(255, 229, 143, 0.2),
    0 30px 80px rgba(3, 20, 18, 0.34),
    0 0 46px rgba(255, 214, 102, 0.34);
  opacity: 1 !important;
  animation: scratch-card-flip 760ms linear infinite;
}

.scratch-card.is-flipping .scratch-cover {
  opacity: 1;
  transform: translateX(0) rotate(0);
}

.scratch-card.is-flipping .scratch-cover::after {
  content: "BOA SORTE";
  color: rgba(11, 79, 74, 0.9);
}

.scratch-card.is-flipping .scratch-shine {
  animation: scratch-shine-sweep 760ms linear infinite;
}

.scratch-card.is-open .scratch-cover {
  opacity: 0;
  transform: translateX(90%) rotate(-8deg);
}

.scratch-card.is-locked {
  opacity: 0.58;
}

.scratch-card.is-open {
  border-color: rgba(255, 229, 143, 0.72);
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 229, 143, 0.26), transparent 36%),
    linear-gradient(135deg, rgba(255, 253, 245, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: 0 22px 58px rgba(4, 26, 24, 0.25);
}

@keyframes scratch-card-flip {
  0% {
    transform: translateY(-8px) rotateY(0deg) rotateZ(0deg) scale(1.04);
  }

  50% {
    transform: translateY(-10px) rotateY(180deg) rotateZ(1.2deg) scale(1.08);
  }

  100% {
    transform: translateY(-8px) rotateY(360deg) rotateZ(0deg) scale(1.04);
  }
}

@keyframes scratch-shine-sweep {
  0% {
    opacity: 0;
    transform: translateX(-58%) rotate(12deg);
  }

  32% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
    transform: translateX(58%) rotate(12deg);
  }
}

.wheel-page {
  background:
    url("/assets/shihan_bg.jpg") center / cover no-repeat fixed,
    radial-gradient(circle at 50% 22%, rgba(255, 233, 148, 0.26), transparent 25%),
    radial-gradient(circle at 15% 78%, rgba(184, 33, 47, 0.36), transparent 26%),
    linear-gradient(180deg, #172554 0%, #0f172a 100%);
}

.wheel-wrap {
  position: relative;
  z-index: 1;
  width: min(78vmin, 560px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.wheel-disk {
  position: absolute;
  inset: 0;
  border: clamp(8px, 1.6vw, 16px) solid #fde68a;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.4), transparent 55%),
    conic-gradient(
      #ffd700 0deg 45deg,
      #8b0000 45deg 90deg,
      #b8860b 90deg 135deg,
      #dc143c 135deg 180deg,
      #ffd700 180deg 225deg,
      #8b0000 225deg 270deg,
      #b8860b 270deg 315deg,
      #dc143c 315deg 360deg
    );
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(255, 255, 255, 0.5),
    0 0 24px rgba(255, 215, 0, 0.45),
    inset 0 0 0 2px rgba(255, 255, 255, 0.35),
    inset 0 0 30px rgba(139, 0, 0, 0.25);
  transition: transform 3.8s cubic-bezier(0.16, 0.82, 0.18, 1);
}

.wheel-disk::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(139, 0, 0, 0.12));
  border: 1px solid rgba(255, 215, 0, 0.4);
  pointer-events: none;
}

.wheel-label {
  position: absolute;
  z-index: 1;
  color: #fffdf8;
  font-size: clamp(18px, 3.4vw, 34px);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  max-width: 28%;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.26);
  white-space: pre-line;
  letter-spacing: 0.01em;
}

.wheel-label[data-type="real"],
.wheel-label[data-type="fixed"] {
  color: #fffdf8;
  font-size: clamp(18px, 3.4vw, 34px);
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.wheel-pointer {
  position: absolute;
  z-index: 3;
  top: -4px;
  width: 0;
  height: 0;
  border-right: 18px solid transparent;
  border-left: 18px solid transparent;
  border-top: 0;
  border-bottom: 42px solid #fff7d6;
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.26));
}

.wheel-spin {
  position: relative;
  z-index: 2;
  width: min(28vmin, 170px);
  min-height: min(28vmin, 170px);
  border: 8px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: linear-gradient(180deg, #fff7d6, #f5b62f);
  color: #7f1d1d;
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.player-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.status-item,
.period-panel,
.stage-panel,
.auth-panel,
.period-form,
.records-panel {
  border: 1px solid rgba(137, 112, 77, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.status-item {
  min-height: 76px;
  padding: 16px 18px;
}

.status-item strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.35;
}

.game-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.period-panel {
  display: flex;
  min-height: 540px;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
}

.period-panel h1 {
  margin: 8px 0 14px;
  font-size: 34px;
  line-height: 1.16;
}

.period-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.result-summary {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.result-summary strong {
  display: block;
  margin: 8px 0;
  color: var(--brand-dark);
  font-size: 22px;
  line-height: 1.3;
}

.result-summary span:last-child {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.stage-panel {
  min-height: 540px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(184, 33, 47, 0.94), rgba(141, 28, 39, 0.96)),
    var(--brand);
  color: #fffdf8;
  overflow: hidden;
  position: relative;
}

.stage-panel::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 236, 171, 0.34);
  border-radius: 8px;
  pointer-events: none;
}

.egg-only-stage::before {
  inset: clamp(14px, 2.6vw, 36px);
  border-color: rgba(255, 237, 184, 0.26);
}

.stage-panel.egg-only-stage {
  display: grid;
  width: 100vw;
  min-height: 100dvh;
  align-items: center;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(28px, 5vw, 72px);
  background: transparent;
}

.stage-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}

.stage-head .eyebrow {
  color: rgba(255, 247, 224, 0.78);
}

.stage-head strong {
  font-size: 20px;
  line-height: 1.3;
}

.egg-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  min-height: 380px;
  align-items: end;
  padding: 28px 12px 10px;
}

.egg-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  padding: 18px 10px 22px;
  border: 1px solid rgba(255, 235, 172, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition:
    transform 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
}

.egg-card:hover:not(:disabled),
.egg-card.is-highlight:not(:disabled) {
  transform: translateY(-5px);
  border-color: rgba(255, 235, 172, 0.72);
  background: rgba(255, 255, 255, 0.13);
}

.egg-card:active:not(:disabled) {
  transform: translateY(-2px) scale(0.99);
}

.egg-plate {
  position: absolute;
  right: 24px;
  bottom: 20px;
  left: 24px;
  height: 32px;
  border-radius: 50%;
  background: rgba(68, 17, 20, 0.28);
  filter: blur(1px);
}

.egg-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 166px;
  height: 220px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition:
    opacity 180ms ease,
    transform 260ms ease;
}

.egg-open {
  display: none;
  width: 220px;
  height: 238px;
}

.egg-card.is-open .egg-closed,
.egg-card.is-hitting .egg-open {
  display: none;
}

.egg-card.is-open .egg-open {
  display: block;
  transform: translateY(-16px);
}

.egg-label {
  position: relative;
  z-index: 1;
  min-height: 26px;
  margin-top: 14px;
  color: rgba(255, 248, 226, 0.88);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.hammer {
  position: absolute;
  z-index: 2;
  top: 48px;
  right: 46px;
  width: 96px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transform-origin: 78% 80%;
  user-select: none;
  -webkit-user-drag: none;
}

.egg-card.is-highlight .hammer {
  animation: hammer-hover 1200ms ease-in-out infinite;
}

.egg-card.is-hitting .hammer {
  animation: hammer-hit 620ms ease-out forwards;
}

.egg-card.is-hitting .egg-closed {
  animation: egg-shake 620ms ease-out;
}

.egg-card.is-locked {
  opacity: 0.66;
}

.game-message {
  position: relative;
  z-index: 1;
  min-height: 28px;
  margin: 16px 0 0;
  color: rgba(255, 248, 226, 0.78);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 31, 0.58);
}

.modal-dialog {
  position: relative;
  display: grid;
  width: min(720px, 100%);
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 232, 180, 0.54);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  animation: modal-enter 260ms ease-out;
}

.modal-media {
  /*display: grid;*/
   display: none;
  min-height: 330px;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(184, 33, 47, 0.95), rgba(143, 23, 36, 0.98)),
    var(--brand);
}

.modal-media img {
  width: 210px;
  height: 230px;
  object-fit: contain;
}

.modal-content {
  padding: 34px;
}

.modal-content h2 {
  margin: 8px 0 12px;
  color: var(--brand-dark);
  font-size: 30px;
  line-height: 1.2;
}

.modal-content p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.account-form {
  display: grid;
  gap: 10px;
}

label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

.account-form button,
.auth-form button,
.period-form > button,
.primary-action {
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.account-form button:hover,
.auth-form button:hover,
.period-form > button:hover,
.primary-action:hover {
  background: #0d635d;
}

.account-form button:active,
.auth-form button:active,
.period-form > button:active,
.primary-action:active {
  transform: scale(0.99);
}

.secondary-action,
.danger-action {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.secondary-action:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.danger-action {
  border-color: rgba(185, 28, 28, 0.24);
  color: var(--danger);
}

.danger-action:hover {
  background: #fff1f1;
}

.form-error {
  margin: 2px 0 0 !important;
  color: var(--danger) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.admin-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.element-admin {
  min-height: 100dvh;
  --el-color-primary: var(--teal);
  --el-border-radius-base: 8px;
}

.element-auth {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
}

.element-shell {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(244, 248, 247, 0.94)),
    #f6f4ee;
}

.element-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  height: auto;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(14px);
}

.element-header h1 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.25;
}

.element-main {
  padding: 20px 28px 28px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-item {
  min-height: 82px;
  padding: 16px 18px;
  border: 1px solid rgba(137, 112, 77, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.summary-item strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.element-grid {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.period-card,
.records-card,
.login-card {
  border-color: rgba(137, 112, 77, 0.18);
  border-radius: 8px;
}

.period-card {
  position: sticky;
  top: 20px;
}

.records-card {
  min-width: 0;
}

.records-card .el-card__body {
  padding-top: 14px;
}

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

.card-title {
  display: grid;
  gap: 3px;
}

.card-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.card-title strong {
  font-size: 20px;
  line-height: 1.25;
}

.period-editor {
  display: grid;
  gap: 2px;
}

.full-field,
.full-button {
  width: 100%;
}

.full-button {
  margin-top: 8px;
}

.record-filter {
  width: 180px;
}

.element-admin .el-card__header {
  padding: 16px 18px;
}

.element-admin .el-card__body {
  padding: 18px;
}

.element-admin .el-button {
  min-height: 32px;
  border: var(--el-border);
  border-radius: 8px;
  font-weight: 700;
}

.element-admin .el-button.is-link {
  border: 0;
}

.element-admin input,
.element-admin textarea {
  min-height: auto;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.element-admin .el-input__inner {
  padding: 0;
}

.element-admin .el-input__wrapper,
.element-admin .el-select__wrapper,
.element-admin .el-textarea__inner {
  border-radius: 8px;
}

.element-admin .el-textarea__inner {
  padding: 5px 11px;
}

.admin-layout {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(244, 248, 247, 0.94)),
    #f6f4ee;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 50% 0%, rgba(15, 118, 110, 0.22), transparent 60%),
    linear-gradient(180deg, #14202e 0%, #0f1620 100%);
  color: #d6e2ee;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand .brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--brand));
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(184, 33, 47, 0.35);
}

.sidebar-brand span {
  display: grid;
  gap: 2px;
  color: #e8f1fa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.sidebar-brand span::after {
  content: "ADMIN";
  color: #6c8aa6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.side-nav {
  flex: 1 1 auto;
  display: grid;
  gap: 4px;
  padding: 18px 14px;
  align-content: start;
}

.side-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #9bb1c6;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.side-nav-item .side-icon {
  flex: 0 0 22px;
  width: 22px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  filter: grayscale(0.4);
  opacity: 0.85;
  transition: filter 160ms ease, opacity 160ms ease, transform 220ms ease;
}

.side-nav-item .side-label {
  flex: 1 1 auto;
}

.side-nav-item.is-system {
  margin-top: 14px;
  position: relative;
}

.side-nav-item.is-system::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.side-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e8f1fa;
}

.side-nav-item:hover .side-icon {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-1px);
}

.side-nav-item.is-active {
  border-color: rgba(15, 118, 110, 0.4);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.4), rgba(15, 118, 110, 0.18));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.4), 0 10px 22px rgba(15, 118, 110, 0.2);
}

.side-nav-item.is-active .side-icon {
  filter: grayscale(0);
  opacity: 1;
}

.sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #5e7c98;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
}

.admin-content {
  min-width: 0;
}

.admin-topbar {
  display: flex;
  height: auto;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(244, 248, 247, 0.94));
  backdrop-filter: blur(14px);
}

.topbar-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.topbar-heading h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(49, 38, 20, 0.06);
}

.game-switcher.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.switcher-label {
  padding: 0 6px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-pills {
  display: flex;
  gap: 2px;
}

.game-pill {
  min-width: 64px;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.game-pill:hover:not(.is-active):not(:disabled) {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.08);
}

.game-pill.is-active {
  background: linear-gradient(180deg, var(--teal), #0c5d56);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.28);
}

.game-pill:disabled {
  cursor: not-allowed;
}

.admin-main {
  padding: 22px 28px 30px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  position: relative;
  min-height: 148px;
  border-radius: 14px;
  overflow: hidden;
}

.metric-card .el-card__body {
  display: grid;
  height: 100%;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  padding: 20px 22px;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), transparent);
}

.metric-card .metric-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-card .metric-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.12);
  font-size: 17px;
}

.metric-card .metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.metric-card strong {
  align-self: end;
  color: var(--ink);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric-card strong small {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}

.metric-card .metric-foot {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.primary-metric {
  border-color: rgba(15, 118, 110, 0.24);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0.96));
}

.primary-metric::before {
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.primary-metric .metric-icon {
  background: rgba(15, 118, 110, 0.18);
}

.warn-metric::before {
  background: linear-gradient(90deg, var(--gold), var(--brand));
}

.warn-metric .metric-icon {
  background: rgba(231, 173, 54, 0.18);
}

.table-page .el-card,
.password-card {
  border-radius: 8px;
}

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

.pagination-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.password-page {
  max-width: 720px;
}

.password-card .el-descriptions {
  margin-bottom: 18px;
}

.password-card .el-form {
  width: 100%;
}

.password-card .el-form-item {
  width: 100%;
}

.period-dialog-form {
  display: grid;
  gap: 2px;
}

.period-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.time-zone-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.mobile-record-list {
  display: none;
}

.record-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.record-card + .record-card {
  margin-top: 10px;
}

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

.record-card-head strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.record-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.record-card dl > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
}

.record-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.record-card dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.auth-panel {
  display: grid;
  max-width: 820px;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  margin: 72px auto 0;
  padding: 30px;
  align-items: center;
}

.auth-panel h1,
.admin-header h1,
.period-form h2,
.records-panel h2 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.22;
}

.auth-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.admin-app {
  display: grid;
  gap: 18px;
}

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

.admin-actions,
.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-grid {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.period-form,
.records-panel {
  padding: 22px;
}

.period-form {
  display: grid;
  gap: 14px;
}

.form-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.form-head.tight {
  margin-top: 8px;
}

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

.two-cols {
  grid-template-columns: 1fr 1fr;
}

.checkbox-label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

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

.prize-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.prize-fieldset legend {
  padding: 0 8px;
  color: var(--gold-deep);
  font-weight: 800;
}

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

.records-panel > label {
  display: block;
  margin: 16px 0 14px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.records-panel table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.records-panel th,
.records-panel td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee8dd;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.records-panel th {
  background: #fbf6ea;
  color: #4f5667;
  font-weight: 800;
  white-space: nowrap;
}

.records-panel td {
  color: #242b39;
}

.records-panel td.copy-cell {
  overflow-wrap: anywhere;
}

.records-panel tr:last-child td {
  border-bottom: 0;
}

.row-copy {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: #f3fffd;
  color: var(--teal);
  font-weight: 800;
}

.records-message {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

@keyframes hammer-hover {
  0%,
  100% {
    opacity: 1;
    transform: rotate(12deg) translateY(0) scale(1);
  }

  50% {
    opacity: 1;
    transform: rotate(-12deg) translateY(-6px) scale(1.04);
  }
}

@keyframes hammer-hit {
  0% {
    opacity: 0;
    transform: rotate(-68deg) translate(-10px, -8px) scale(0.86);
  }

  35% {
    opacity: 1;
    transform: rotate(22deg) translate(6px, 8px) scale(1);
  }

  68% {
    opacity: 1;
    transform: rotate(-24deg) translate(-3px, -3px) scale(1);
  }

  100% {
    opacity: 1;
    transform: rotate(0deg) translate(0, 0) scale(1);
  }
}

@keyframes egg-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px) rotate(-2deg);
  }

  55% {
    transform: translateX(5px) rotate(2deg);
  }

  78% {
    transform: translateX(-2px) rotate(-1deg);
  }
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .player-shell,
  .admin-shell {
    width: min(100% - 28px, 760px);
    padding-top: 18px;
  }

  .status-strip,
  .game-layout,
  .auth-panel,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .period-panel {
    min-height: auto;
  }

  .egg-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .egg-card {
    min-height: 260px;
  }

  .modal-dialog {
    grid-template-columns: 1fr;
  }

  .modal-media {
    min-height: 180px;
  }

  .modal-media img {
    width: 150px;
    height: 160px;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .egg-only-page {
    overflow: auto;
  }

  .egg-only-shell {
    width: 100vw;
    min-height: 100dvh;
    padding: 0;
  }

  .egg-only-stage {
    min-height: 100dvh;
    padding: clamp(16px, 5vw, 24px);
  }

  .egg-only-stage .egg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 640px);
    min-height: auto;
    gap: clamp(8px, 2.4vw, 14px);
    padding: 16px 0;
  }

  .egg-only-stage .egg-card {
    min-height: clamp(168px, 54vw, 220px);
    padding: 10px 4px 14px;
  }

  .egg-only-stage .egg-plate {
    right: 8px;
    bottom: 16px;
    left: 8px;
    height: 22px;
  }

  .egg-only-stage .egg-image {
    width: clamp(74px, 24vw, 116px);
    height: clamp(100px, 32vw, 154px);
  }

  .egg-only-stage .egg-open {
    width: clamp(94px, 30vw, 138px);
    height: clamp(102px, 32vw, 148px);
  }

  .egg-only-stage .hammer {
    top: auto;
    right: clamp(-2px, 1vw, 6px);
    bottom: clamp(82px, 29vw, 118px);
    width: clamp(42px, 13vw, 62px);
  }

  .scratch-stage,
  .wheel-stage {
    padding: clamp(16px, 5vw, 24px);
  }

  .scratch-grid {
    width: min(100%, 640px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 2.4vw, 14px);
  }

  .scratch-card {
    min-height: clamp(160px, 50vw, 210px);
  }

  .scratch-cover {
    inset: 8px;
  }

  .wheel-wrap {
    width: min(88vmin, 420px);
  }

  .element-header,
  .card-toolbar,
  .admin-topbar,
  .page-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .element-main {
    padding: 14px;
  }

  .admin-layout {
    display: block;
  }

  .admin-sidebar {
    width: 100% !important;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand {
    padding: 12px 14px 10px;
  }

  .sidebar-brand strong {
    font-size: 17px;
  }

  .activity-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .admin-topbar {
    min-height: auto;
    align-items: center;
    flex-direction: row;
    padding: 12px 14px;
  }

  .admin-topbar h1 {
    font-size: 21px;
  }

  .admin-main {
    padding: 14px;
  }

  .desktop-record-table {
    display: none;
  }

  .mobile-record-list {
    display: block;
  }

  .password-page {
    max-width: none;
  }

  .password-card {
    width: 100%;
  }

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

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

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

  .period-card {
    position: static;
  }

  .record-filter {
    width: 100%;
  }
}

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

/* Admin is PC-only. Keep the management UI on the desktop layout even in a narrow preview pane. */
body.admin-page {
  min-width: 1280px;
  overflow-x: auto;
}

.admin-page .admin-layout {
  display: flex !important;
  min-width: 1280px;
}

.admin-page .admin-sidebar {
  flex: 0 0 156px !important;
  width: 156px !important;
  min-height: 100dvh !important;
  border-bottom: 0 !important;
}

.admin-page .admin-content {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-page .admin-topbar,
.admin-page .page-toolbar {
  flex-direction: row !important;
  align-items: center !important;
}

.admin-page .admin-topbar {
  min-height: 84px !important;
  padding: 18px 32px !important;
}

.admin-page .admin-topbar h1 {
  font-size: 22px !important;
}

.admin-page .admin-main {
  padding: 24px 32px 32px !important;
}

.admin-page .dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.admin-page .desktop-record-table {
  display: block !important;
}

.admin-page .mobile-record-list {
  display: none !important;
}

.admin-page .record-filter {
  width: 180px !important;
}

.admin-page .password-page {
  max-width: 760px !important;
}

.admin-page .password-card {
  width: 760px !important;
}

.admin-page .password-card .el-card__body {
  display: block !important;
  padding: 24px !important;
}

.admin-page .password-card .el-form {
  width: 520px !important;
  max-width: 100%;
}
