:root {
  --ink: #171916;
  --ink-soft: #555b53;
  --paper: #f4f2ed;
  --paper-deep: #ebe8e1;
  --white: #ffffff;
  --line: #d8d5ce;
  --line-dark: #c5c1b7;
  --acid: #d8ff3e;
  --acid-dark: #b7dd22;
  --green: #2c7054;
  --yellow: #edc13e;
  --red: #c64b3f;
  --shadow: 0 22px 60px rgba(23, 25, 22, 0.12);
  --radius: 6px;
  --sans: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.button svg,
.icon-button svg,
.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.button-primary,
.button-dark {
  background: var(--ink);
  color: var(--white);
}

.button-primary:hover,
.button-dark:hover {
  background: #2c302a;
}

.button-secondary {
  border-color: var(--line-dark);
  background: var(--white);
}

.button-secondary:hover,
.button-outline:hover {
  border-color: var(--ink);
}

.button-outline {
  border-color: var(--line-dark);
  background: transparent;
}

.button-accent {
  border-color: var(--acid);
  background: var(--acid);
}

.button-accent:hover {
  border-color: var(--acid-dark);
  background: var(--acid-dark);
}

.button-danger {
  background: var(--red);
  color: var(--white);
}

.button-large {
  min-height: 54px;
  padding-inline: 22px;
  font-size: 15px;
}

.button-full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.wordmark,
.sidebar-brand,
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 900;
}

.wordmark-mark {
  position: relative;
  display: inline-block;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.wordmark-mark::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 3px;
  width: 5px;
  height: 8px;
  border-radius: 3px 3px 0 0;
  background: currentColor;
  transform: rotate(-22deg);
}

.wordmark-mark::after {
  content: "";
  position: absolute;
  top: -8px;
  right: 3px;
  width: 5px;
  height: 8px;
  border-radius: 3px 3px 0 0;
  background: currentColor;
  transform: rotate(22deg);
}

.wordmark-mark span {
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.wordmark-mark span:first-child {
  left: 5px;
}

.wordmark-mark span:last-child {
  right: 5px;
}

.wordmark-mark-light {
  border-color: var(--acid);
  color: var(--acid);
}

.toast {
  position: fixed;
  z-index: 1000;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 17px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.toast.error {
  background: var(--red);
}

/* Public page */

.public-page {
  --party-ink: #28223f;
  --party-yellow: #ffd51f;
  --party-cyan: #5cdff5;
  --party-pink: #ff79aa;
  --party-purple: #7668f2;
  --party-green: #49c982;
  position: relative;
  overflow-x: hidden;
  background: var(--party-yellow);
  color: var(--party-ink);
  font-family: "Arial Rounded MT Bold", "Microsoft YaHei", Arial, sans-serif;
}

.party-backdrop {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.party-burst {
  position: absolute;
  display: block;
  border: 5px solid var(--party-ink);
}

.party-burst-left {
  top: 18%;
  left: -12%;
  width: 42vw;
  height: 56vh;
  background: var(--party-cyan);
  clip-path: polygon(0 12%, 78% 0, 100% 21%, 79% 38%, 100% 58%, 77% 77%, 89% 100%, 0 91%);
  transform: rotate(-5deg);
}

.party-burst-right {
  right: -13%;
  bottom: -9%;
  width: 40vw;
  height: 51vh;
  background: var(--party-pink);
  clip-path: polygon(15% 0, 100% 14%, 100% 100%, 0 100%, 9% 73%, 0 52%, 18% 31%);
  transform: rotate(5deg);
}

.party-cloud {
  position: absolute;
  display: block;
  width: 150px;
  height: 48px;
  border: 4px solid var(--party-ink);
  border-radius: 40px;
  background: #ffffff;
  box-shadow: 8px 9px 0 rgba(40, 34, 63, 0.18);
}

.party-cloud::before,
.party-cloud::after {
  content: "";
  position: absolute;
  bottom: 12px;
  border: 4px solid var(--party-ink);
  border-bottom: 0;
  border-radius: 60px 60px 0 0;
  background: #ffffff;
}

.party-cloud::before {
  left: 22px;
  width: 52px;
  height: 44px;
}

.party-cloud::after {
  right: 21px;
  width: 61px;
  height: 59px;
}

.party-cloud-one {
  top: 10%;
  left: 5%;
  transform: rotate(-5deg) scale(0.88);
}

.party-cloud-two {
  top: 15%;
  right: 8%;
  transform: rotate(5deg) scale(0.68);
}

.party-star {
  position: absolute;
  display: block;
  width: 54px;
  height: 54px;
  background: #ffffff;
  clip-path: polygon(50% 0, 62% 35%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 36% 36%);
  filter: drop-shadow(4px 5px 0 var(--party-ink));
}

.party-star-one {
  top: 30%;
  left: 3%;
  transform: rotate(12deg) scale(0.7);
}

.party-star-two {
  top: 8%;
  right: 29%;
  transform: rotate(-17deg) scale(0.5);
}

.party-star-three {
  right: 3%;
  bottom: 18%;
  transform: rotate(18deg) scale(0.82);
}

.party-confetti {
  position: absolute;
  display: block;
  width: 14px;
  height: 48px;
  border: 3px solid var(--party-ink);
  background: var(--party-purple);
}

.party-confetti-one {
  top: 19%;
  left: 37%;
  transform: rotate(28deg);
}

.party-confetti-two {
  right: 36%;
  bottom: 13%;
  height: 33px;
  background: var(--party-cyan);
  transform: rotate(-23deg);
}

.party-confetti-three {
  right: 5%;
  top: 38%;
  width: 12px;
  height: 39px;
  background: #ffffff;
  transform: rotate(47deg);
}

.party-mascot {
  position: absolute;
  width: 194px;
  height: 228px;
  border: 6px solid var(--party-ink);
  border-radius: 48% 48% 45% 45%;
  box-shadow: inset -20px -17px 0 rgba(40, 34, 63, 0.12), 12px 14px 0 rgba(40, 34, 63, 0.28);
}

.party-mascot::before,
.party-mascot::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 92px;
  width: 61px;
  height: 35px;
  border: 6px solid var(--party-ink);
  border-radius: 50%;
  background: inherit;
}

.party-mascot::before {
  left: -43px;
  transform: rotate(-30deg);
}

.party-mascot::after {
  right: -43px;
  transform: rotate(30deg);
}

.party-mascot-yellow {
  bottom: -58px;
  left: 2.5%;
  background: #ffdf31;
  transform: rotate(8deg);
}

.party-mascot-cyan {
  top: 18%;
  right: 3%;
  width: 148px;
  height: 175px;
  background: var(--party-cyan);
  transform: rotate(-13deg);
}

.mascot-antenna {
  position: absolute;
  top: -45px;
  left: 50%;
  width: 10px;
  height: 47px;
  border: 4px solid var(--party-ink);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: inherit;
  transform: translateX(-50%);
}

.mascot-antenna::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 24px;
  height: 24px;
  border: 4px solid var(--party-ink);
  border-radius: 50%;
  background: var(--party-pink);
  transform: translateX(-50%);
}

.party-mascot-cyan .mascot-antenna::before {
  background: var(--party-yellow);
}

.mascot-eye {
  position: absolute;
  top: 61px;
  width: 20px;
  height: 28px;
  border: 4px solid var(--party-ink);
  border-radius: 50%;
  background: #ffffff;
}

.mascot-eye::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 12px;
  border-radius: 50%;
  background: var(--party-ink);
}

.mascot-eye-left {
  left: 55px;
}

.mascot-eye-right {
  right: 55px;
}

.party-mascot-cyan .mascot-eye {
  top: 45px;
  transform: scale(0.8);
}

.party-mascot-cyan .mascot-eye-left {
  left: 38px;
}

.party-mascot-cyan .mascot-eye-right {
  right: 38px;
}

.mascot-mouth {
  position: absolute;
  top: 102px;
  left: 50%;
  width: 40px;
  height: 25px;
  border: 5px solid var(--party-ink);
  border-top: 0;
  border-radius: 0 0 25px 25px;
  background: #ffffff;
  transform: translateX(-50%);
}

.party-mascot-cyan .mascot-mouth {
  top: 78px;
  width: 31px;
  height: 18px;
}

.mascot-belly {
  position: absolute;
  right: 34px;
  bottom: 30px;
  width: 74px;
  height: 48px;
  border: 4px dashed rgba(40, 34, 63, 0.45);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.party-mascot-cyan .mascot-belly {
  right: 25px;
  bottom: 22px;
  width: 54px;
  height: 35px;
}

.mascot-foot {
  position: absolute;
  z-index: -1;
  bottom: -26px;
  width: 69px;
  height: 42px;
  border: 6px solid var(--party-ink);
  border-radius: 50%;
  background: #ffffff;
}

.mascot-foot-left {
  left: 19px;
  transform: rotate(-9deg);
}

.mascot-foot-right {
  right: 19px;
  transform: rotate(9deg);
}

.party-mascot-cyan .mascot-foot {
  bottom: -21px;
  width: 52px;
  height: 33px;
}

.public-shell {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 1280px);
  min-height: 100vh;
  flex-direction: column;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 30px max(18px, env(safe-area-inset-bottom));
}

.public-header,
.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.public-header {
  min-height: 64px;
  padding: 8px 16px;
  border: 3px solid var(--party-ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 6px 7px 0 rgba(40, 34, 63, 0.86);
}

.public-page .wordmark {
  gap: 11px;
  color: var(--party-ink);
}

.public-page .wordmark-mark {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border-width: 4px;
  background: var(--party-yellow);
}

.wordmark-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wordmark-copy strong {
  font-size: 14px;
}

.wordmark-copy small {
  color: #756e8f;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 900;
}

.live-indicator {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 2px solid var(--party-ink);
  border-radius: 999px;
  background: #effff5;
  color: var(--party-ink);
  font-size: 11px;
  font-weight: 900;
}

.live-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--party-ink);
  border-radius: 50%;
  background: #f3bd37;
}

.live-indicator.active .live-dot {
  background: var(--party-green);
  box-shadow: 0 0 0 4px rgba(73, 201, 130, 0.18);
}

.live-indicator.inactive .live-dot {
  background: #f45d60;
}

.public-main {
  flex: 1;
  padding: 35px 28px 30px;
}

.party-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(430px, 500px);
  align-items: center;
  gap: clamp(46px, 7vw, 96px);
}

.party-intro {
  max-width: 570px;
  margin: 0;
  text-align: left;
}

.party-kicker {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  gap: 7px;
  margin-bottom: 19px;
  padding: 0 13px;
  border: 3px solid var(--party-ink);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 4px 4px 0 var(--party-ink);
  font-size: 12px;
  font-weight: 900;
}

.party-kicker svg {
  width: 15px;
  height: 15px;
  fill: var(--party-yellow);
}

.party-intro .eyebrow {
  margin: 0 0 8px;
  color: var(--party-ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 950;
}

.party-intro h1 {
  max-width: 560px;
  margin: 0;
  color: #ffffff;
  font-size: 58px;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 4px 0 var(--party-ink), -4px 0 var(--party-ink), 0 4px var(--party-ink), 0 -4px var(--party-ink), 7px 8px 0 var(--party-pink);
}

.public-subtitle {
  max-width: 480px;
  margin: 22px 0 0;
  color: var(--party-ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.6;
}

.party-crew {
  display: flex;
  align-items: center;
  margin-top: 26px;
}

.crew-egg {
  position: relative;
  display: block;
  width: 45px;
  height: 52px;
  margin-left: -8px;
  border: 3px solid var(--party-ink);
  border-radius: 50% 50% 45% 45%;
  box-shadow: 2px 3px 0 rgba(40, 34, 63, 0.25);
}

.crew-egg:first-child {
  margin-left: 0;
}

.crew-egg::before,
.crew-egg::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 5px;
  height: 7px;
  border-radius: 50%;
  background: var(--party-ink);
}

.crew-egg::before {
  left: 12px;
}

.crew-egg::after {
  right: 12px;
}

.crew-egg i {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 6px;
  height: 15px;
  border: 3px solid var(--party-ink);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  transform: translateX(-50%);
}

.crew-egg-yellow {
  z-index: 3;
  background: var(--party-yellow);
}

.crew-egg-pink {
  z-index: 2;
  background: var(--party-pink);
  transform: rotate(7deg);
}

.crew-egg-cyan {
  z-index: 1;
  background: var(--party-cyan);
  transform: rotate(-6deg);
}

.party-crew strong {
  margin-left: 13px;
  padding: 7px 11px;
  border: 2px solid var(--party-ink);
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
}

.party-route {
  display: flex;
  width: max-content;
  max-width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 0 15px;
  border: 3px solid var(--party-ink);
  border-radius: 8px;
  background: var(--party-cyan);
  box-shadow: 6px 6px 0 var(--party-ink);
  font-size: 13px;
  font-weight: 950;
}

.party-route svg {
  width: 17px;
  height: 17px;
}

.qr-console {
  position: relative;
  width: 100%;
  padding: 19px;
  border: 4px solid var(--party-ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 12px 14px 0 rgba(40, 34, 63, 0.88);
}

.console-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  color: var(--party-ink);
  font-size: 11px;
  font-weight: 950;
}

.console-ribbon > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Arial, sans-serif;
}

.console-ribbon svg {
  width: 17px;
  height: 17px;
  color: var(--party-purple);
}

.console-ribbon strong {
  padding: 4px 9px;
  border: 2px solid var(--party-ink);
  border-radius: 999px;
  background: var(--party-yellow);
  font-size: 10px;
}

.qr-stage {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 10px;
  border: 4px solid var(--party-ink);
  border-radius: 8px;
  background: var(--party-cyan);
  box-shadow: 7px 8px 0 var(--party-ink);
}

.qr-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 3px solid var(--party-ink);
  border-radius: 4px;
  background: #ffffff;
}

.qr-frame > img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
  animation: reveal 250ms ease-out;
}

@keyframes reveal {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.qr-corner {
  position: absolute;
  z-index: 3;
  width: 31px;
  height: 31px;
  pointer-events: none;
}

.qr-corner-top-left {
  top: 5px;
  left: 5px;
  border-top: 5px solid var(--party-pink);
  border-left: 5px solid var(--party-pink);
}

.qr-corner-top-right {
  top: 5px;
  right: 5px;
  border-top: 5px solid var(--party-yellow);
  border-right: 5px solid var(--party-yellow);
}

.qr-corner-bottom-left {
  bottom: 5px;
  left: 5px;
  border-bottom: 5px solid var(--party-yellow);
  border-left: 5px solid var(--party-yellow);
}

.qr-corner-bottom-right {
  right: 5px;
  bottom: 5px;
  border-right: 5px solid var(--party-pink);
  border-bottom: 5px solid var(--party-pink);
}

.qr-loading,
.qr-empty {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  padding: 28px;
  color: #6b647e;
  text-align: center;
}

.qr-empty strong {
  color: var(--party-ink);
  font-size: 19px;
}

.qr-empty > span:last-child {
  font-size: 13px;
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 50%;
  border: 3px solid var(--party-ink);
  background: var(--party-yellow);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
}

.loader {
  width: 28px;
  height: 28px;
  border: 4px solid #d8d2e3;
  border-top-color: var(--party-purple);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.qr-meta {
  display: grid;
  width: min(100%, 380px);
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 14px;
  margin: 17px auto 0;
  padding: 10px 13px;
  border: 2px solid var(--party-ink);
  border-radius: 6px;
  background: #f2efff;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-item-right {
  text-align: right;
}

.meta-item span {
  color: #746c8b;
  font-size: 11px;
}

.meta-item strong {
  font-size: 12px;
}

.meta-divider {
  width: 1px;
  height: 29px;
  background: #b8b0c7;
}

.public-actions {
  display: grid;
  width: min(100%, 380px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 15px auto 0;
}

.public-actions > :only-child {
  grid-column: 1 / -1;
}

.public-page .public-actions .button {
  min-width: 0;
  border: 3px solid var(--party-ink);
  border-radius: 8px;
  font-weight: 950;
  box-shadow: 0 5px 0 var(--party-ink);
}

.public-page .public-actions .button:hover {
  transform: translateY(-2px);
}

.public-page .public-actions .button:active {
  box-shadow: 0 2px 0 var(--party-ink);
  transform: translateY(3px);
}

.public-page .button-primary {
  background: var(--party-purple);
  color: #ffffff;
}

.public-page .button-primary:hover {
  background: #6557dc;
}

.public-page .button-secondary {
  background: var(--party-yellow);
  color: var(--party-ink);
}

.public-note {
  width: min(100%, 380px);
  margin: 15px auto 0;
  padding: 9px 11px;
  border: 2px dashed var(--party-ink);
  border-radius: 6px;
  background: #fff7cb;
  color: #625a72;
  font-size: 12px;
  line-height: 1.6;
}

.public-footer {
  min-height: 48px;
  gap: 16px;
  padding: 5px 12px;
  border: 3px solid var(--party-ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 5px 6px 0 rgba(40, 34, 63, 0.82);
  color: #665f77;
  font-size: 10px;
  font-weight: 800;
}

.public-footer .icon-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.public-footer .icon-button:hover {
  border-color: var(--party-ink);
  background: var(--party-yellow);
}

.public-footer .icon-button svg {
  width: 15px;
  height: 15px;
}

/* Dual public QR */

.dual-public-shell {
  width: min(100%, 1280px);
}

.dual-public-main {
  padding-top: 35px;
}

.dual-public-copy {
  margin-bottom: 0;
}

.qr-kind-switch {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 auto 15px;
  padding: 5px;
  border: 3px solid var(--party-ink);
  border-radius: 8px;
  background: #e8faff;
}

.qr-kind-tab {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 61px;
  grid-template-columns: 37px minmax(0, 1fr) 9px;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.qr-kind-tab:hover {
  transform: translateY(-1px);
}

.qr-kind-tab.active {
  border-color: var(--party-ink);
  background: var(--party-ink);
  color: #ffffff;
  box-shadow: 0 4px 0 var(--party-yellow);
}

.tab-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 2px solid var(--party-ink);
  border-radius: 50%;
  background: var(--party-cyan);
  color: var(--party-ink);
}

.qr-kind-tab.active .tab-icon {
  background: var(--party-yellow);
}

.tab-icon svg {
  width: 18px;
  height: 18px;
}

.qr-kind-tab > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.qr-kind-tab strong {
  font-size: 14px;
  font-weight: 950;
}

.qr-kind-tab small {
  overflow: hidden;
  color: #756e87;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-kind-tab.active small {
  color: #ded9f0;
}

.tab-status-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--party-ink);
  border-radius: 50%;
  background: var(--party-green);
}

.qr-kind-tab.unavailable .tab-status-dot {
  background: #f45d60;
}

.active-code-heading {
  display: flex;
  width: min(100%, 380px);
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 9px;
  padding: 0;
}

.code-type-label {
  color: var(--party-purple);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 950;
}

.active-code-heading h2 {
  margin: 5px 0 0;
  font-size: 16px;
  font-weight: 950;
}

.code-state-pill {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 2px solid var(--party-ink);
  border-radius: 999px;
  background: #fff4cb;
  color: var(--party-ink);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.code-state-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--party-ink);
  background: #f3bd37;
}

.code-state-pill.active {
  border-color: var(--party-ink);
  background: #dcf8e8;
  color: #236746;
}

.code-state-pill.active span {
  background: var(--party-green);
}

.code-state-pill.expired,
.code-state-pill.empty {
  border-color: var(--party-ink);
  background: #ffe0e5;
  color: #9f3542;
}

.code-state-pill.expired span,
.code-state-pill.empty span {
  background: #f45d60;
}

.dual-qr-stage {
  width: min(100%, 380px);
}

.dual-qr-stage .qr-frame > img {
  padding: 8px;
}

.empty-action {
  margin-top: 9px;
}

.owner-fallback {
  display: grid;
  width: min(100%, 380px);
  min-height: 62px;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  margin: 15px auto 0;
  padding: 9px 11px;
  border: 3px solid var(--party-ink);
  border-radius: 8px;
  background: #ffd9e8;
  box-shadow: 4px 5px 0 var(--party-ink);
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.owner-fallback:hover {
  background: #ffc5dc;
  transform: translateY(-1px);
}

.fallback-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid var(--party-ink);
  border-radius: 50%;
  background: var(--party-yellow);
}

.fallback-icon svg {
  width: 20px;
  height: 20px;
}

.owner-fallback > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.owner-fallback strong {
  font-size: 12px;
  font-weight: 950;
}

.owner-fallback small {
  color: #6b5f73;
  font-size: 10px;
}

.owner-fallback > svg {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

@media (max-width: 1180px) {
  .party-layout {
    gap: 44px;
  }

  .party-intro h1 {
    font-size: 50px;
  }

  .party-mascot {
    opacity: 0.72;
    transform: scale(0.82) rotate(8deg);
  }

  .party-mascot-cyan {
    transform: scale(0.8) rotate(-13deg);
  }
}

@media (max-width: 920px) {
  .public-page {
    background-attachment: scroll;
  }

  .party-burst-left {
    top: 5%;
    left: -25%;
    width: 85vw;
    height: 34vh;
  }

  .party-burst-right {
    width: 65vw;
    height: 35vh;
  }

  .party-cloud-two,
  .party-mascot,
  .party-star-three,
  .party-confetti-three {
    display: none;
  }

  .public-shell,
  .dual-public-shell {
    width: min(100%, 570px);
    padding-inline: 18px;
  }

  .party-layout {
    grid-template-columns: 1fr;
    gap: 27px;
    padding-inline: 0;
  }

  .party-intro {
    max-width: none;
    text-align: center;
  }

  .party-kicker,
  .party-crew,
  .party-route {
    margin-inline: auto;
  }

  .party-intro h1,
  .public-subtitle {
    max-width: none;
  }

  .party-intro h1 {
    font-size: 42px;
  }

  .public-subtitle {
    margin-top: 16px;
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .public-shell,
  .dual-public-shell {
    padding: max(10px, env(safe-area-inset-top)) 10px max(11px, env(safe-area-inset-bottom));
  }

  .public-header {
    min-height: 54px;
    padding: 6px 10px;
    border-width: 2px;
    box-shadow: 4px 5px 0 rgba(40, 34, 63, 0.84);
  }

  .public-page .wordmark-mark {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-width: 3px;
  }

  .wordmark-copy strong {
    font-size: 12px;
  }

  .wordmark-copy small {
    font-size: 7px;
  }

  .live-indicator {
    min-height: 30px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .public-main,
  .dual-public-main {
    padding: 20px 2px 25px;
  }

  .party-layout {
    gap: 20px;
  }

  .party-kicker {
    min-height: 30px;
    margin-bottom: 12px;
    padding-inline: 10px;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--party-ink);
    font-size: 10px;
  }

  .party-intro .eyebrow {
    display: none;
  }

  .party-intro h1 {
    font-size: 34px;
    line-height: 1.12;
    text-shadow: 3px 0 var(--party-ink), -3px 0 var(--party-ink), 0 3px var(--party-ink), 0 -3px var(--party-ink), 5px 6px 0 var(--party-pink);
  }

  .public-subtitle {
    margin-top: 11px;
    font-size: 13px;
  }

  .party-crew {
    margin-top: 14px;
  }

  .crew-egg {
    width: 35px;
    height: 41px;
  }

  .crew-egg::before,
  .crew-egg::after {
    top: 14px;
  }

  .crew-egg::before {
    left: 9px;
  }

  .crew-egg::after {
    right: 9px;
  }

  .party-crew strong {
    padding: 5px 9px;
    font-size: 10px;
  }

  .party-route {
    display: none;
  }

  .qr-console {
    padding: 12px;
    border-width: 3px;
    box-shadow: 7px 8px 0 rgba(40, 34, 63, 0.88);
  }

  .console-ribbon {
    margin-bottom: 9px;
  }

  .qr-kind-switch {
    gap: 5px;
    margin-bottom: 12px;
    padding: 4px;
    border-width: 2px;
  }

  .qr-kind-tab {
    min-height: 56px;
    grid-template-columns: 33px minmax(0, 1fr) 8px;
    gap: 7px;
    padding: 6px 7px;
  }

  .tab-icon {
    width: 33px;
    height: 33px;
  }

  .qr-kind-tab strong {
    font-size: 12px;
  }

  .qr-kind-tab small {
    font-size: 9px;
  }

  .active-code-heading {
    margin-bottom: 7px;
  }

  .active-code-heading h2 {
    font-size: 14px;
  }

  .code-state-pill {
    min-height: 25px;
    padding-inline: 7px;
    font-size: 9px;
  }

  .qr-stage,
  .dual-qr-stage {
    width: min(100%, 354px);
    padding: 7px;
    border-width: 3px;
    box-shadow: 5px 6px 0 var(--party-ink);
  }

  .qr-frame {
    border-width: 2px;
  }

  .qr-frame > img,
  .dual-qr-stage .qr-frame > img {
    padding: 6px;
  }

  .qr-corner {
    width: 24px;
    height: 24px;
  }

  .qr-meta {
    margin-top: 14px;
    padding-block: 8px;
  }

  .public-actions {
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .public-actions > * {
    grid-column: auto !important;
  }

  .public-page .public-actions .button {
    min-height: 48px;
  }

  .owner-fallback {
    min-height: 58px;
    margin-top: 13px;
    border-width: 2px;
    box-shadow: 3px 4px 0 var(--party-ink);
  }

  .footer-entry {
    display: none;
  }

  .public-footer {
    min-height: 43px;
    border-width: 2px;
    box-shadow: 3px 4px 0 rgba(40, 34, 63, 0.82);
  }
}

@media (max-width: 380px) {
  .wordmark-copy small,
  .qr-kind-tab small,
  .party-crew strong {
    display: none;
  }

  .party-intro h1 {
    font-size: 30px;
  }

  .qr-kind-tab {
    grid-template-columns: 31px minmax(0, 1fr) 7px;
  }

  .tab-icon {
    width: 31px;
    height: 31px;
  }
}

/* Admin login */

.admin-page {
  background: var(--paper);
}

.login-view {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 72px 24px;
  background: var(--ink);
  color: var(--white);
}

.login-brand {
  position: absolute;
  top: 28px;
  left: 32px;
}

.login-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  padding: 37px;
  border-top: 3px solid var(--acid);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.login-heading {
  margin-bottom: 27px;
}

.login-heading h1 {
  margin: 0;
  font-size: 30px;
}

.login-heading > p:last-child {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 750;
}

.password-field {
  display: flex;
  height: 52px;
  align-items: center;
  border: 1px solid var(--line-dark);
  background: var(--white);
}

.password-field > svg {
  width: 17px;
  margin-left: 15px;
  color: #777c73;
}

.password-field input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
}

.form-error {
  min-height: 19px;
  margin: 8px 0;
  color: var(--red);
  font-size: 12px;
}

.back-link {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  margin: 21px auto 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.back-link svg {
  width: 14px;
}

.login-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-pattern span {
  position: absolute;
  border: 1px solid rgba(216, 255, 62, 0.15);
}

.login-pattern span:nth-child(1) { width: 150px; height: 150px; top: 12%; left: 8%; }
.login-pattern span:nth-child(2) { width: 48px; height: 48px; top: 25%; left: 20%; background: rgba(216, 255, 62, 0.05); }
.login-pattern span:nth-child(3) { width: 210px; height: 210px; right: 4%; bottom: 7%; }
.login-pattern span:nth-child(4) { width: 62px; height: 62px; right: 19%; bottom: 31%; background: rgba(216, 255, 62, 0.04); }
.login-pattern span:nth-child(5) { width: 20px; height: 20px; right: 28%; top: 12%; background: var(--acid); }

/* Admin layout */

.admin-app {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 228px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 50;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 228px;
  flex-direction: column;
  padding: 26px 18px 20px;
  background: var(--ink);
  color: #d5d8d1;
}

.sidebar-brand {
  min-height: 38px;
  margin: 0 10px 39px;
  color: var(--white);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.nav-item.active {
  background: var(--acid);
  color: var(--ink);
  font-weight: 800;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard {
  min-width: 0;
  grid-column: 2;
}

.dashboard-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 95px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 242, 237, 0.95);
  backdrop-filter: blur(12px);
}

.dashboard-header .eyebrow {
  margin-bottom: 5px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.server-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #49a66f;
  box-shadow: 0 0 0 4px rgba(73, 166, 111, 0.12);
}

.mobile-menu-button,
.sidebar-scrim {
  display: none;
}

.dashboard-content {
  padding: 13px clamp(24px, 4vw, 56px) 70px;
}

.dashboard-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.dashboard-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 21px;
}

.section-heading h2 {
  margin: 0;
  font-size: 21px;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #b7ccb8;
  border-radius: 999px;
  background: #e5f1e5;
  color: #2e6543;
  font-size: 11px;
  font-weight: 800;
}

.status-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.expired,
.status-badge.empty {
  border-color: #d9b4ac;
  background: #f5e3df;
  color: #9b4137;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(245px, 0.72fr);
  gap: 18px;
}

.current-code-panel {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(250px, 0.88fr) minmax(265px, 1fr);
  border: 1px solid var(--line-dark);
  background: var(--white);
}

.current-preview {
  display: grid;
  min-height: 410px;
  place-items: center;
  padding: clamp(22px, 4vw, 43px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(23, 25, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 22, 0.035) 1px, transparent 1px),
    #f8f7f3;
  background-size: 21px 21px;
}

.current-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 14px solid var(--white);
  box-shadow: 0 13px 34px rgba(23, 25, 22, 0.12);
}

.admin-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  color: var(--ink-soft);
  text-align: center;
}

.admin-empty svg {
  width: 36px;
  height: 36px;
}

.current-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(25px, 3.5vw, 40px);
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.detail-kicker {
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
}

.detail-heading h3 {
  overflow-wrap: anywhere;
  margin: 7px 0 0;
  font-size: 20px;
}

.detail-list {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.detail-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.detail-list dt {
  color: var(--ink-soft);
  font-size: 11px;
}

.detail-list dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.countdown-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 16px 18px;
  border-left: 3px solid var(--acid-dark);
  background: var(--paper);
}

.countdown-block span {
  color: var(--ink-soft);
  font-size: 11px;
}

.countdown-block strong {
  font-size: 22px;
}

.metrics-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.metric-card {
  display: flex;
  min-height: 91px;
  align-items: center;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--line-dark);
  background: var(--white);
}

.metric-icon {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
}

.metric-green .metric-icon { background: #dcece3; color: var(--green); }
.metric-yellow .metric-icon { background: #f6e9b9; color: #8a6711; }

.metric-icon svg {
  width: 21px;
  height: 21px;
}

.metric-card > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-card span {
  color: var(--ink-soft);
  font-size: 11px;
}

.metric-card strong {
  font-size: 25px;
}

.entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 13px;
  margin-top: auto;
  padding: 17px;
  border: 1px solid var(--line-dark);
  background: var(--ink);
  color: var(--white);
}

.entry-copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.entry-copy span {
  color: var(--acid);
  font-size: 10px;
  font-weight: 800;
}

.entry-copy strong {
  font-size: 12px;
  line-height: 1.5;
}

.entry-card > img {
  width: 76px;
  height: 76px;
  padding: 5px;
  background: var(--white);
  object-fit: contain;
}

.entry-card .button {
  grid-column: 1 / -1;
  min-height: 38px;
  border-color: #5f655b;
  color: var(--white);
  font-size: 12px;
}

/* Dual QR admin overview */

.dual-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(245px, 0.66fr);
  gap: 18px;
}

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

.current-slot {
  min-width: 0;
  border: 1px solid var(--line-dark);
  background: var(--white);
}

.slot-head {
  display: grid;
  min-height: 74px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.slot-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
}

.slot-icon-group {
  background: #dcece3;
  color: var(--green);
}

.slot-icon-owner {
  background: #f6e9b9;
  color: #8a6711;
}

.slot-icon svg {
  width: 20px;
  height: 20px;
}

.slot-head > div {
  min-width: 0;
}

.slot-head > div > span {
  color: var(--green);
  font-size: 8px;
  font-weight: 850;
}

.slot-head h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.slot-body {
  display: grid;
  grid-template-columns: minmax(145px, 0.9fr) minmax(150px, 1fr);
  min-height: 268px;
}

.slot-preview {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(23, 25, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 22, 0.035) 1px, transparent 1px),
    #f8f7f3;
  background-size: 18px 18px;
}

.slot-preview > img {
  width: 100%;
  aspect-ratio: 1;
  padding: 5px;
  background: var(--white);
  object-fit: contain;
  box-shadow: 0 10px 26px rgba(23, 25, 22, 0.11);
}

.slot-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 19px 16px 16px;
}

.slot-details > strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}

.compact-detail-list {
  gap: 11px;
  margin: 18px 0;
}

.slot-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
}

.slot-actions .button {
  min-width: 0;
  flex: 1;
  padding-inline: 10px;
  font-size: 11px;
}

.dual-metrics-column .entry-card {
  margin-top: auto;
}

.kind-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 19px;
  padding: 0;
  border: 0;
}

.kind-selector legend {
  width: 100%;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 750;
}

.kind-selector label {
  position: relative;
  cursor: pointer;
}

.kind-selector input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kind-selector label > span {
  display: grid;
  min-height: 76px;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 0 8px;
  padding: 10px;
  border: 1px solid var(--line-dark);
  background: #fbfaf7;
}

.kind-selector label > span > svg {
  width: 20px;
  height: 20px;
  grid-row: 1 / 3;
}

.kind-selector strong {
  align-self: end;
  font-size: 11px;
}

.kind-selector small {
  align-self: start;
  color: var(--ink-soft);
  font-size: 9px;
}

.kind-selector input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  box-shadow: inset 0 -3px var(--acid);
}

.kind-selector input:checked + span small {
  color: #c9cdc5;
}

.mini-badge.kind-group {
  border-color: #a8c3ac;
  color: var(--green);
}

.mini-badge.kind-owner {
  border-color: #ddc46d;
  color: #80600e;
}

/* Upload */

.upload-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  padding: 25px;
  border: 1px solid var(--line-dark);
  background: var(--white);
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 410px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #9a9e94;
  background:
    linear-gradient(rgba(23, 25, 22, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 22, 0.025) 1px, transparent 1px),
    #f9f8f5;
  background-size: 20px 20px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--green);
  background-color: #f2f5ed;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-placeholder {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  padding: 30px;
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 7px;
  background: var(--acid);
}

.upload-icon svg {
  width: 25px;
  height: 25px;
}

.drop-placeholder > span:not(.upload-icon, .button) {
  color: var(--ink-soft);
  font-size: 11px;
}

.drop-placeholder .button {
  margin-top: 11px;
}

.upload-preview {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 28px;
}

.upload-preview img {
  width: min(100%, 340px);
  max-height: 340px;
  object-fit: contain;
  box-shadow: 0 12px 32px rgba(23, 25, 22, 0.12);
}

.replace-image {
  position: absolute;
  bottom: 16px;
  left: 50%;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 750;
  transform: translateX(-50%);
}

.replace-image svg { width: 14px; }

.upload-fields {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-field > span {
  font-size: 12px;
  font-weight: 750;
}

.form-field em {
  color: #858a80;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.form-field input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  outline: 0;
  background: #fbfaf7;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field input:focus,
.password-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44, 112, 84, 0.1);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 3px 0 10px;
  cursor: pointer;
}

.toggle-row > span:first-child {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.toggle-row strong {
  font-size: 12px;
}

.toggle-row small {
  color: var(--ink-soft);
  font-size: 10px;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: #d9d8d2;
  transition: background 150ms ease;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(23, 25, 22, 0.25);
  transition: transform 150ms ease;
}

.toggle-row input:checked + .toggle {
  border-color: var(--ink);
  background: var(--ink);
}

.toggle-row input:checked + .toggle::after {
  background: var(--acid);
  transform: translateX(18px);
}

/* History */

.record-count {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.history-list {
  border-top: 1px solid var(--line-dark);
}

.history-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1.35fr) minmax(150px, 0.75fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.history-thumb {
  width: 72px;
  height: 72px;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--white);
  object-fit: contain;
}

.history-main {
  min-width: 0;
}

.history-title-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.history-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.mini-badge {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-badge.active {
  border-color: #a8c3ac;
  background: #e4efe4;
  color: #2f6845;
}

.mini-badge.expired {
  border-color: #d9b4ac;
  background: #f5e3df;
  color: #9b4137;
}

.history-main p,
.history-date span {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.history-date {
  display: flex;
  flex-direction: column;
}

.history-date strong {
  font-size: 11px;
}

.history-actions {
  display: flex;
  gap: 6px;
}

.history-actions .button {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 11px;
}

.history-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--ink-soft);
  font-size: 13px;
}

/* Settings and dialog */

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  padding: 25px;
  border: 1px solid var(--line-dark);
  background: var(--white);
}

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

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.settings-actions .form-error {
  margin-right: auto;
}

.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-top: 3px solid var(--red);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.confirm-dialog::backdrop {
  background: rgba(10, 12, 10, 0.62);
  backdrop-filter: blur(3px);
}

.confirm-dialog form {
  padding: 28px;
}

.dialog-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  background: #f0d9d5;
  color: var(--red);
}

.dialog-icon svg { width: 21px; }
.confirm-dialog h2 { margin: 19px 0 8px; font-size: 21px; }
.confirm-dialog p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 27px; }

@media (max-width: 1040px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .metrics-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .entry-card {
    grid-column: 1 / -1;
  }

  .history-row {
    grid-template-columns: 74px minmax(0, 1fr) auto;
  }

  .history-date {
    display: none;
  }

  .dual-overview-grid {
    grid-template-columns: 1fr;
  }

  .dual-metrics-column {
    display: grid;
  }
}

@media (max-width: 760px) {
  .admin-app {
    display: block;
  }

  .sidebar {
    width: min(280px, 82vw);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 45;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(10, 12, 10, 0.48);
  }

  body.menu-open .sidebar-scrim {
    display: block;
  }

  .dashboard {
    width: 100%;
  }

  .dashboard-header {
    min-height: 78px;
    padding: 13px 17px;
  }

  .mobile-menu-button {
    display: grid;
  }

  .dashboard-header h1 {
    font-size: 19px;
  }

  .dashboard-header .eyebrow,
  .server-status,
  .header-actions .button span {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions .button {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .dashboard-content {
    padding: 0 16px 50px;
  }

  .dashboard-section {
    padding: 39px 0;
  }

  .current-code-panel,
  .upload-layout {
    grid-template-columns: 1fr;
  }

  .current-slot-grid {
    grid-template-columns: 1fr;
  }

  .slot-body {
    grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 1fr);
  }

  .current-preview {
    min-height: auto;
    aspect-ratio: 1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics-column {
    grid-template-columns: 1fr;
  }

  .entry-card {
    grid-column: auto;
  }

  .upload-layout {
    gap: 23px;
    padding: 16px;
  }

  .drop-zone {
    min-height: auto;
    aspect-ratio: 1;
  }

  .history-row {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
  }

  .history-thumb {
    width: 60px;
    height: 60px;
  }

  .history-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .settings-form {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .field-wide {
    grid-column: auto;
  }

  .settings-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 520px) {
  .login-view {
    padding-inline: 16px;
  }

  .login-brand {
    top: 22px;
    left: 21px;
  }

  .login-panel {
    padding: 29px 22px;
  }

  .current-details {
    padding: 24px 19px;
  }

  .slot-head {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding-inline: 11px;
  }

  .slot-icon {
    width: 38px;
    height: 38px;
  }

  .slot-body {
    grid-template-columns: 1fr;
  }

  .slot-preview {
    aspect-ratio: 1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .kind-selector {
    grid-template-columns: 1fr;
  }

  .countdown-block {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

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

/* Official public experience v5 */

.public-page {
  --official-blue: #164f8f;
  --official-blue-deep: #12345f;
  --official-yellow: #ffd728;
  --official-cyan: #61d9ed;
  --official-ink: #17283d;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f4c817;
  color: var(--official-ink);
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.official-hero-art {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-color: #f4c817;
  background-image: url("/assets/eggy-official-hero.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.public-shell,
.dual-public-shell {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 1500px);
  min-height: 100vh;
  flex-direction: column;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 26px max(16px, env(safe-area-inset-bottom));
}

.public-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fan-brand {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 7px;
  border: 2px solid rgba(18, 52, 95, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--official-blue-deep);
  box-shadow: 0 5px 15px rgba(18, 52, 95, 0.15);
}

.fan-brand-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border-radius: 6px;
  background: var(--official-yellow);
}

.fan-brand-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.fan-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.fan-brand strong {
  font-size: 12px;
  font-weight: 900;
}

.fan-brand small {
  color: #687b92;
  font-size: 8px;
  font-weight: 700;
}

.public-page .live-indicator {
  min-height: 34px;
  padding: 0 12px;
  border: 2px solid rgba(18, 52, 95, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--official-blue-deep);
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 5px 15px rgba(18, 52, 95, 0.12);
}

.public-page .live-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--official-blue-deep);
  background: #e2ad25;
}

.public-page .live-indicator.active .live-dot {
  background: #41c879;
  box-shadow: 0 0 0 4px rgba(65, 200, 121, 0.17);
}

.public-main,
.dual-public-main {
  flex: 1;
  padding: 20px 8px 18px;
}

.party-layout {
  display: grid;
  grid-template-columns: 455px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: start;
  column-gap: 60px;
  row-gap: 14px;
}

.party-intro,
.dual-public-copy {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 455px;
  margin: 0;
  text-align: left;
}

.official-logo {
  display: block;
  width: 245px;
  height: auto;
  margin: 0 0 10px -5px;
  filter: drop-shadow(0 7px 8px rgba(18, 52, 95, 0.16));
}

.party-kicker {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--official-blue-deep);
  box-shadow: 0 5px 14px rgba(18, 52, 95, 0.12);
  font-size: 10px;
  font-weight: 900;
}

.party-kicker svg {
  width: 14px;
  height: 14px;
}

.party-intro h1 {
  max-width: 455px;
  margin: 0;
  color: #ffffff;
  font-size: 38px;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 2px 0 var(--official-blue-deep), -2px 0 var(--official-blue-deep), 0 2px var(--official-blue-deep), 0 -2px var(--official-blue-deep), 3px 4px 0 rgba(18, 52, 95, 0.9);
}

.public-subtitle {
  max-width: 455px;
  margin: 9px 0 0;
  color: var(--official-blue-deep);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.55;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.hero-points span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(18, 52, 95, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--official-blue-deep);
  font-size: 9px;
  font-weight: 800;
}

.hero-points svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.qr-console {
  grid-column: 1;
  grid-row: 2;
  width: 455px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(18, 52, 95, 0.23);
  backdrop-filter: blur(8px);
}

.console-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--official-blue-deep);
  font-size: 9px;
  font-weight: 900;
}

.console-ribbon > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.console-ribbon svg {
  width: 15px;
  height: 15px;
  color: var(--official-blue);
}

.console-ribbon strong {
  padding: 4px 9px;
  border: 1px solid rgba(18, 52, 95, 0.2);
  border-radius: 999px;
  background: #fff4b1;
  font-size: 9px;
}

.qr-kind-switch {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 11px;
  padding: 4px;
  border: 1px solid #c8d8e8;
  border-radius: 8px;
  background: #edf5fb;
}

.qr-kind-tab {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: 32px minmax(0, 1fr) 7px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--official-ink);
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.qr-kind-tab:hover {
  transform: translateY(-1px);
}

.qr-kind-tab.active {
  border-color: transparent;
  background: var(--official-blue);
  color: #ffffff;
  box-shadow: none;
}

.tab-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(18, 52, 95, 0.28);
  border-radius: 50%;
  background: var(--official-cyan);
  color: var(--official-blue-deep);
}

.qr-kind-tab.active .tab-icon {
  background: var(--official-yellow);
}

.tab-icon svg {
  width: 16px;
  height: 16px;
}

.qr-kind-tab > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.qr-kind-tab strong {
  font-size: 12px;
  font-weight: 900;
}

.qr-kind-tab small {
  overflow: hidden;
  color: #6f8195;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-kind-tab.active small {
  color: #dbe9f7;
}

.tab-status-dot {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(18, 52, 95, 0.7);
  border-radius: 50%;
  background: #42cb7d;
}

.qr-kind-tab.unavailable .tab-status-dot {
  background: #eb6265;
}

.active-code-heading {
  display: flex;
  width: min(100%, 340px);
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 7px;
  padding: 0;
}

.code-type-label {
  color: var(--official-blue);
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 900;
}

.active-code-heading h2 {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 900;
}

.code-state-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid #b9cadb;
  border-radius: 999px;
  background: #f4f8fb;
  color: #51677d;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.code-state-pill span {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: #d2a527;
}

.code-state-pill.active {
  border-color: #a8d7bc;
  background: #e9f8ef;
  color: #28724a;
}

.code-state-pill.active span {
  background: #42c87a;
}

.code-state-pill.expired,
.code-state-pill.empty {
  border-color: #e5b7bb;
  background: #fff0f1;
  color: #a6454d;
}

.code-state-pill.expired span,
.code-state-pill.empty span {
  background: #eb6265;
}

.qr-stage,
.dual-qr-stage {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 7px;
  border: 3px solid var(--official-yellow);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 52, 95, 0.14);
}

.qr-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid #b5c8db;
  border-radius: 5px;
  background: #ffffff;
}

.qr-frame > img,
.dual-qr-stage .qr-frame > img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}

.qr-corner {
  z-index: 3;
  width: 22px;
  height: 22px;
}

.qr-corner-top-left {
  top: 4px;
  left: 4px;
  border-top: 3px solid var(--official-blue);
  border-left: 3px solid var(--official-blue);
}

.qr-corner-top-right {
  top: 4px;
  right: 4px;
  border-top: 3px solid var(--official-blue);
  border-right: 3px solid var(--official-blue);
}

.qr-corner-bottom-left {
  bottom: 4px;
  left: 4px;
  border-bottom: 3px solid var(--official-blue);
  border-left: 3px solid var(--official-blue);
}

.qr-corner-bottom-right {
  right: 4px;
  bottom: 4px;
  border-right: 3px solid var(--official-blue);
  border-bottom: 3px solid var(--official-blue);
}

.qr-loading,
.qr-empty {
  color: #66798e;
}

.qr-empty strong {
  color: var(--official-ink);
}

.empty-icon {
  border: 0;
  background: #fff3a8;
}

.loader {
  border-color: #dce6ef;
  border-top-color: var(--official-blue);
}

.qr-meta {
  display: grid;
  width: min(100%, 340px);
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 12px;
  margin: 11px auto 0;
  padding: 8px 11px;
  border: 1px solid #d2deea;
  border-radius: 6px;
  background: #f5f8fb;
}

.meta-item {
  gap: 2px;
}

.meta-item span {
  color: #75869a;
  font-size: 9px;
}

.meta-item strong {
  font-size: 10px;
}

.meta-divider {
  height: 24px;
  background: #ccd8e4;
}

.public-actions {
  display: grid;
  width: min(100%, 340px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px auto 0;
}

.public-actions > :only-child {
  grid-column: 1 / -1;
}

.public-page .public-actions .button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
}

.public-page .public-actions .button-primary {
  background: var(--official-blue);
  color: #ffffff;
}

.public-page .public-actions .button-primary:hover {
  background: var(--official-blue-deep);
}

.public-page .public-actions .button-secondary {
  border: 1px solid #b8c9da;
  background: #ffffff;
  color: var(--official-blue-deep);
}

.public-note {
  width: min(100%, 340px);
  margin: 10px auto 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: #fff8d0;
  color: #6b6551;
  font-size: 9px;
  line-height: 1.55;
}

.owner-fallback {
  display: grid;
  width: min(100%, 340px);
  min-height: 54px;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  margin: 10px auto 0;
  padding: 7px 9px;
  border: 1px solid #bed3e5;
  border-radius: 7px;
  background: #edf8fd;
  box-shadow: none;
  color: var(--official-ink);
  text-align: left;
  cursor: pointer;
}

.owner-fallback:hover {
  background: #e1f3fb;
  transform: translateY(-1px);
}

.fallback-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--official-yellow);
  color: var(--official-blue-deep);
}

.fallback-icon svg {
  width: 17px;
  height: 17px;
}

.owner-fallback > span:nth-child(2) {
  gap: 2px;
}

.owner-fallback strong {
  font-size: 10px;
  font-weight: 900;
}

.owner-fallback small {
  color: #6c7f92;
  font-size: 8px;
}

.owner-fallback > svg {
  width: 14px;
  height: 14px;
}

.console-quick-actions {
  display: grid;
  width: min(100%, 340px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px auto 0;
}

.console-quick-actions .owner-fallback,
.share-poster-button {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  grid-template-columns: 32px minmax(0, 1fr) 14px;
  gap: 7px;
  padding: 7px;
}

.share-poster-button {
  display: grid;
  align-items: center;
  border: 1px solid #e3c13a;
  border-radius: 7px;
  background: #fff8cf;
  color: var(--official-ink);
  text-align: left;
  text-decoration: none;
}

.share-poster-button:hover {
  background: #ffef98;
  transform: translateY(-1px);
}

.poster-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--official-blue);
  color: #ffffff;
}

.poster-icon svg {
  width: 16px;
  height: 16px;
}

.share-poster-button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.share-poster-button strong {
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.share-poster-button small {
  overflow: hidden;
  color: #766d4c;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-poster-button > svg {
  width: 14px;
  height: 14px;
}

.public-footer {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 20px rgba(18, 52, 95, 0.12);
  color: #60758a;
  font-size: 9px;
  font-weight: 700;
}

.public-footer .icon-button:hover {
  border-color: transparent;
  background: #fff2a5;
}

@media (max-width: 1200px) {
  .official-hero-art {
    position: absolute;
    background-position: center top;
    background-size: auto 610px;
  }

  .public-shell,
  .dual-public-shell {
    width: min(100%, 620px);
    padding-inline: 18px;
  }

  .party-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 15px;
    padding-top: 230px;
  }

  .party-intro,
  .dual-public-copy {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
    text-align: center;
  }

  .official-logo {
    width: 225px;
    margin-inline: auto;
  }

  .party-kicker {
    margin-inline: auto;
  }

  .party-intro h1,
  .public-subtitle {
    max-width: none;
  }

  .hero-points {
    justify-content: center;
  }

  .qr-console {
    grid-column: 1;
    grid-row: 2;
    width: min(100%, 475px);
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .official-hero-art {
    background-position: 68% top;
    background-size: auto 300px;
  }

  .public-shell,
  .dual-public-shell {
    width: 100%;
    padding: max(9px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .public-header {
    min-height: 43px;
  }

  .fan-brand {
    min-height: 39px;
    padding: 4px 9px 4px 5px;
    border-width: 1px;
  }

  .fan-brand-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .fan-brand small {
    display: none;
  }

  .public-page .live-indicator {
    min-height: 30px;
    padding-inline: 9px;
    border-width: 1px;
    font-size: 9px;
  }

  .public-main,
  .dual-public-main {
    padding: 0 0 15px;
  }

  .party-layout {
    row-gap: 12px;
    padding-top: 170px;
  }

  .official-logo {
    width: 165px;
    margin-bottom: 5px;
  }

  .party-kicker {
    min-height: 25px;
    margin-bottom: 6px;
    padding-inline: 8px;
    font-size: 8px;
  }

  .party-intro h1 {
    font-size: 27px;
    text-shadow: 1px 0 var(--official-blue-deep), -1px 0 var(--official-blue-deep), 0 1px var(--official-blue-deep), 0 -1px var(--official-blue-deep), 2px 3px 0 rgba(18, 52, 95, 0.9);
  }

  .public-subtitle {
    margin-top: 5px;
    font-size: 11px;
  }

  .hero-points {
    display: none;
  }

  .qr-console {
    width: 100%;
    padding: 11px;
  }

  .console-ribbon {
    margin-bottom: 7px;
  }

  .qr-kind-switch {
    margin-bottom: 9px;
  }

  .qr-kind-tab {
    min-height: 49px;
    grid-template-columns: 30px minmax(0, 1fr) 7px;
    gap: 6px;
    padding: 4px 6px;
  }

  .tab-icon {
    width: 30px;
    height: 30px;
  }

  .qr-kind-tab strong {
    font-size: 11px;
  }

  .active-code-heading {
    margin-bottom: 6px;
  }

  .active-code-heading h2 {
    font-size: 13px;
  }

  .qr-stage,
  .dual-qr-stage {
    width: min(100%, 332px);
  }

  .qr-meta,
  .public-actions,
  .public-note,
  .owner-fallback,
  .console-quick-actions {
    width: min(100%, 332px);
  }

  .public-actions {
    grid-template-columns: 1fr;
  }

  .public-actions > * {
    grid-column: auto !important;
  }

  .console-quick-actions .owner-fallback,
  .share-poster-button {
    grid-template-columns: 30px minmax(0, 1fr) 12px;
    gap: 5px;
  }

  .footer-entry {
    display: none;
  }
}

@media (max-width: 370px) {
  .qr-kind-tab small {
    display: none;
  }

  .party-layout {
    padding-top: 160px;
  }

  .official-logo {
    width: 150px;
  }

  .party-intro h1 {
    font-size: 24px;
  }

  .console-quick-actions {
    grid-template-columns: 1fr;
  }
}
