:root {
  color-scheme: dark;
  --bg: #0d1017;
  --panel: rgba(19, 25, 36, 0.82);
  --ink: #fff6ec;
  --muted: #aab4c4;
  --red: #ff4655;
  --teal: #19d8c3;
  --yellow: #ffe45e;
  --line: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 70, 85, 0.2), transparent 24rem),
    radial-gradient(circle at 88% 72%, rgba(25, 216, 195, 0.18), transparent 22rem),
    linear-gradient(145deg, #0d1017 0%, #171923 54%, #111827 100%);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.invite-shell {
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: minmax(300px, 58svh) auto;
  gap: 18px;
}

.poster {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #151923;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.05);
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06) 0 1px,
    transparent 1px 7px
  );
  mix-blend-mode: overlay;
  animation: scan 2.6s linear infinite;
}

.ticker {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ticker span {
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 10, 16, 0.64);
  color: var(--yellow);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  transform: rotate(-1deg);
}

.ticker span:nth-child(2n) {
  color: var(--teal);
  transform: rotate(1.5deg);
}

.sticker {
  position: absolute;
  top: 18px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 3px solid #0d1017;
  background: var(--yellow);
  color: #111827;
  font-size: 32px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 6px 6px 0 rgba(255, 70, 85, 0.8);
  animation: wobble 1.2s ease-in-out infinite alternate;
}

.sticker-left {
  left: 18px;
}

.sticker-right {
  right: 18px;
  background: var(--teal);
  animation-delay: 0.25s;
}

.gif-card {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 3px solid #10151d;
  border-radius: 8px;
  background: #fff6ec;
  box-shadow: 7px 7px 0 rgba(16, 21, 29, 0.65);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gif-card::before,
.gif-card::after,
.gif-card span {
  content: "";
  position: absolute;
  border-radius: 999px;
  animation: gifBlink 0.7s steps(2, end) infinite;
}

.gif-card::before {
  width: 18px;
  height: 18px;
  left: 16px;
  top: 22px;
  background: #10151d;
}

.gif-card::after {
  width: 18px;
  height: 18px;
  right: 16px;
  top: 22px;
  background: #10151d;
  animation-delay: 0.15s;
}

.gif-card span {
  width: 34px;
  height: 9px;
  left: 19px;
  bottom: 17px;
  background: var(--red);
  border-radius: 0 0 999px 999px;
  animation-delay: 0.28s;
}

.card-a {
  left: 14px;
  bottom: 74px;
  transform: rotate(-8deg);
}

.card-b {
  right: 16px;
  bottom: 78px;
  background: var(--yellow);
  transform: rotate(8deg);
  animation: cardHop 1.1s ease-in-out infinite alternate;
}

.question-area {
  padding: 0 2px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 10vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

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

.choice {
  min-height: 72px;
  border: 0;
  border-radius: 8px;
  color: #111827;
  font-size: 26px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.choice:active {
  transform: translateY(5px) rotate(-1deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.yes {
  background: var(--red);
  color: #fff;
}

.no {
  background: var(--yellow);
}

.status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.quiet-door {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 12;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(10, 14, 20, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  overflow: hidden;
  padding: 3px;
  backdrop-filter: blur(8px);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}

.quiet-door:active {
  transform: scale(0.94);
  border-color: var(--teal);
}

.quiet-door img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.toast {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.toast.show {
  opacity: 1;
  background: rgba(0, 0, 0, 0.18);
}

.toast-face {
  width: min(72vw, 300px);
  aspect-ratio: 1;
  border: 4px solid #10151d;
  border-radius: 8px;
  background: #fff6ec;
  box-shadow: 12px 12px 0 var(--red);
  transform: scale(0.82) rotate(-5deg);
  overflow: hidden;
}

.toast-face[data-choice="\6ca1\6709"] {
  box-shadow: 12px 12px 0 var(--teal);
}

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

.toast.show .toast-face {
  animation: pop 0.58s cubic-bezier(0.2, 1.35, 0.36, 1) both;
}

.admin-body {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.admin-panel {
  width: min(100%, 920px);
}

.login-box,
.records-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  padding: 22px;
  backdrop-filter: blur(12px);
}

.login-box {
  max-width: 420px;
  margin: 0 auto;
}

.login-box h1,
.records-box h1 {
  font-size: 30px;
}

.login-form {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.login-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

.login-form button,
.refresh-btn {
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #10151d;
  font-weight: 900;
  padding: 0 18px;
  cursor: pointer;
}

.admin-status {
  min-height: 22px;
  color: var(--muted);
}

.records-head,
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.summary-row {
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: normal;
}

th {
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.06);
}

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

.hidden {
  display: none;
}

@keyframes scan {
  from {
    transform: translateY(-12px);
  }

  to {
    transform: translateY(12px);
  }
}

@keyframes wobble {
  from {
    transform: rotate(-8deg) translateY(0);
  }

  to {
    transform: rotate(7deg) translateY(6px);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.55) rotate(-8deg);
  }

  64% {
    transform: scale(1.08) rotate(4deg);
  }

  100% {
    transform: scale(1) rotate(-2deg);
  }
}

@keyframes gifBlink {
  50% {
    transform: translateY(6px) scaleX(1.25);
  }
}

@keyframes cardHop {
  from {
    transform: rotate(8deg) translateY(0);
  }

  to {
    transform: rotate(3deg) translateY(-9px);
  }
}

@media (max-width: 390px) {
  .invite-shell {
    padding-inline: 14px;
  }

  .choice {
    min-height: 64px;
    font-size: 23px;
  }

  .login-form {
    grid-template-columns: 1fr;
  }

  .login-form button {
    min-height: 46px;
  }
}
