:root {
  --red-bright: #CC243C;
  --red-main: #B01A2E;
  --red-deep: #8E1424;
  --red-dark: #8E1424;
  --red-soft: #e8b4b8;
  --gold: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-bright: #ffe9a0;
  --gold-dark: #8c6d1f;
  --gold-yellow: #E8C547;
  --ivory: #FFF8F1;
  --cream: #FFF8F1;
  --ink: #4A1018;
  --paper: #FFFDF8;
  --ok: #2e7d4f;
  --font-serif: "Noto Serif CJK SC", "Noto Serif CJK", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Noto Sans CJK SC", "Noto Sans CJK", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 18px 50px rgba(142, 20, 36, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--red-deep);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
a { color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.gold-text {
  background: linear-gradient(180deg, #fff4c4 0%, #d4af37 45%, #8c6d1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.25));
}

.velvet {
  min-height: 100%;
  background-color: #B01A2E;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 253, 248, 0.10), transparent 50%),
    radial-gradient(ellipse at 18% 85%, rgba(243, 229, 171, 0.14), transparent 42%),
    radial-gradient(ellipse at 82% 75%, rgba(243, 229, 171, 0.12), transparent 40%),
    linear-gradient(180deg, #CC243C 0%, #B01A2E 52%, #8E1424 100%);
  position: relative;
  overflow: hidden;
}

.flora, .flora-br {
  position: absolute;
  width: 280px;
  height: 280px;
  background: url("../img/flora.svg") no-repeat center / contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}
.flora { top: -70px; right: -90px; width: 240px; height: 240px; opacity: 0.45; z-index: 0; }
.flora-br { bottom: -30px; left: -20px; transform: rotate(180deg); }
.flora-bl { position:absolute; left:-10px; top: 30%; width:200px; height:200px; background: url("../img/flora.svg") no-repeat center / contain; pointer-events:none; z-index:2; opacity:.45; transform: rotate(-30deg); }
.velvet::before {
  content: "囍";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: min(70vh, 70vw);
  color: rgba(212, 175, 55, 0.045);
  pointer-events: none;
  line-height: 1;
  font-weight: 700;
}

/* Falling petals */
.petals { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.petal {
  position: absolute;
  top: -8%;
  width: 14px; height: 18px;
  background: radial-gradient(circle at 30% 30%, #ffd0d6, #c41e3a 70%);
  border-radius: 80% 0 80% 0;
  opacity: 0.7;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translate3d(0,-10vh,0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  100% { transform: translate3d(var(--drift, 40px), 110vh, 0) rotate(360deg); opacity: 0.15; }
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, #f3e5ab 0%, #d4af37 55%, #b8942a 100%);
  color: #4A1018;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  box-shadow: 0 6px 0 #8c6d1f, 0 10px 24px rgba(0,0,0,.25);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #8c6d1f, 0 6px 12px rgba(0,0,0,.2); }
.btn:disabled { filter: grayscale(.3) brightness(.9); cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent;
  color: var(--gold-light);
  box-shadow: none;
  border-color: rgba(212,175,55,.55);
}
.btn-danger {
  background: linear-gradient(180deg, #e25a6a, #9b1b2e);
  color: #fff8e8;
  border-color: #7a1422;
  box-shadow: 0 6px 0 #5c0b16, 0 10px 24px rgba(0,0,0,.25);
}
.btn-small { padding: 0.4em 0.9em; font-size: 13px; box-shadow: 0 3px 0 #8c6d1f; }

/* Gold frame */
.frame {
  position: relative;
  border: 1px solid rgba(212,175,55,.7);
  box-shadow:
    inset 0 0 0 4px rgba(90, 12, 22, 0.5),
    inset 0 0 0 6px rgba(212,175,55,.55),
    var(--shadow);
  background: rgba(42, 4, 9, 0.45);
}
.frame::before, .frame::after {
  content: "";
  position: absolute;
  width: 72px; height: 72px;
  background: url("../img/corners.svg") no-repeat center / contain;
  pointer-events: none;
  opacity: 0.9;
}
.frame::before { top: 8px; left: 8px; }
.frame::after { bottom: 8px; right: 8px; transform: rotate(180deg); }
.frame .corner-tr, .frame .corner-bl {
  position: absolute; width: 72px; height: 72px;
  background: url("../img/corners.svg") no-repeat center / contain;
  pointer-events: none;
  opacity: 0.9;
}
.frame .corner-tr { top: 8px; right: 8px; transform: scaleX(-1); }
.frame .corner-bl { bottom: 8px; left: 8px; transform: scaleY(-1); }

/* ===== Portal ===== */
.portal { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.portal-card {
  width: min(920px, 100%);
  text-align: center;
  padding: 56px 40px 48px;
  border-radius: 8px;
}
.portal .xi {
  font-family: var(--font-serif);
  font-size: 88px;
  line-height: 1;
  color: var(--gold-light);
  text-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.portal h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  margin-top: 8px;
  letter-spacing: 0.18em;
}
.portal .meta {
  color: var(--gold-light);
  margin: 10px 0 36px;
  letter-spacing: 0.2em;
  font-family: var(--font-serif);
}
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.portal-grid a {
  text-decoration: none;
  display: block;
  padding: 28px 16px;
  border: 1px solid rgba(212,175,55,.45);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(155,27,46,.35), rgba(58,5,12,.35));
  color: var(--gold-light);
  transition: transform .15s ease, border-color .15s, background .15s;
}
.portal-grid a:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(196,30,58,.5), rgba(58,5,12,.4));
}
.portal-grid strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.16em;
  color: #fff4c4;
  margin-bottom: 6px;
}
.portal-grid span { font-size: 13px; opacity: 0.85; letter-spacing: 0.08em; }
@media (max-width: 640px) {
  .portal-card { padding: 36px 18px; }
  .portal .xi { font-size: 64px; }
  .portal h1 { font-size: 28px; }
  .portal-grid { grid-template-columns: 1fr; }
}

/* ===== Check-in (mobile) ===== */
.checkin {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}
.checkin-card {
  width: min(420px, 100%);
  background:
    linear-gradient(180deg, rgba(255,253,248,0.98), rgba(250,243,230,0.96));
  color: var(--ink);
  border-radius: 16px;
  padding: 36px 24px 28px;
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 6px #B01A2E,
    0 0 0 8px rgba(212,175,55,.8),
    var(--shadow);
  text-align: center;
  position: relative;
  z-index: 1;
}
.checkin-card .xi {
  font-family: var(--font-serif);
  font-size: 72px;
  line-height: 1;
  color: var(--red-bright);
}
.checkin-card h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: 0.16em;
  color: var(--red-dark);
  margin: 4px 0 6px;
}
.checkin-card .meta {
  color: var(--gold-dark);
  letter-spacing: 0.16em;
  font-family: var(--font-serif);
  margin-bottom: 22px;
}
.checkin label {
  display: block;
  text-align: left;
  font-size: 13px;
  color: var(--red-main);
  letter-spacing: 0.08em;
  margin: 12px 0 6px;
}
.checkin input {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid #e0c98a;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.checkin input:focus {
  border-color: var(--red-main);
  box-shadow: 0 0 0 3px rgba(196,30,58,.15);
}
.checkin .btn-submit {
  width: 100%;
  margin-top: 22px;
  font-size: 18px;
  padding: 14px 16px;
  letter-spacing: 0.28em;
}
.checkin .hint { margin-top: 12px; font-size: 12px; color: #8a6a4a; }
.checkin .error {
  margin-top: 12px;
  color: var(--red-bright);
  font-size: 14px;
  min-height: 1.2em;
}

.success-card { text-align: center; }
.success-card .xi {
  animation: popxi .6s cubic-bezier(.2,1.4,.3,1) both;
}
@keyframes popxi {
  0% { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.success-card h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  letter-spacing: 0.2em;
  color: var(--red-dark);
  margin: 8px 0 10px;
}
.success-card p { color: #6b3a32; line-height: 1.8; padding: 0 6px; }
.success-card .guest-name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--red-main);
  margin: 10px 0;
}

/* ===== Wall ===== */
.wall {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 20px 28px 16px;
  color: var(--gold-light);
}
.wall-top, .lottery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 3;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(212,175,55,.28);
}
.wall-top, .lottery-top { padding-right: 220px; align-items: flex-start; }
.brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
.brand .xi {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1;
  color: var(--gold-light);
  flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  color: #FFFDF8;
}
.brand .brand-title {
  font-family: var(--font-serif);
  letter-spacing: 0.24em;
  font-size: 20px;
  color: #FFFDF8;
  margin-top: 4px;
  white-space: nowrap;
}
.brand .brand-date,
.brand .sub {
  font-family: var(--font-serif);
  letter-spacing: 0.18em;
  font-size: 18px;
  color: var(--gold-light);
  margin-top: 2px;
  white-space: nowrap;
}
.header-aside {
  text-align: right;
  flex: 0 0 auto;
  max-width: 320px;
}
.wall-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  min-height: 0;
  padding: 22px 0;
}
.qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  border-radius: 12px;
  text-align: center;
}
.qr-panel img {
  width: 300px;
  height: 300px;
  background: #fffdf6;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.qr-panel h2 {
  font-family: var(--font-serif);
  letter-spacing: 0.24em;
  margin: 18px 0 6px;
  font-size: 22px;
  color: #fff4c4;
}
.qr-panel p { font-size: 13px; opacity: 0.8; }
.wall-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.count-line {
  text-align: center;
  margin-bottom: 16px;
  font-family: var(--font-serif);
  letter-spacing: 0.16em;
  font-size: 20px;
  color: var(--gold-light);
}
.count-line strong {
  font-size: 72px;
  margin: 0 8px;
  background: linear-gradient(180deg, #fff4c4, #d4af37);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.name-board {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 12px;
  overflow: hidden;
  padding: 8px;
}
.name-chip {
  padding: 8px 16px;
  border: 1px solid rgba(212,175,55,.45);
  border-radius: 999px;
  background: rgba(155, 27, 46, 0.35);
  color: #fff4c4;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.12em;
  animation: chipIn .5s ease both;
  white-space: nowrap;
}
.name-chip .table {
  opacity: 0.65;
  font-size: 12px;
  letter-spacing: 0;
  margin-left: 6px;
  font-family: var(--font-sans);
}
@keyframes chipIn {
  from { transform: scale(.6) translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.popup-name {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  text-align: center;
  animation: popup 2.2s ease forwards;
}
.popup-name .who {
  font-family: var(--font-serif);
  font-size: 64px;
  letter-spacing: 0.16em;
  color: #fff4c4;
  text-shadow: 0 0 24px rgba(212,175,55,.6), 0 8px 24px rgba(0,0,0,.4);
  white-space: nowrap;
}
.popup-name .tag {
  margin-top: 8px;
  letter-spacing: 0.3em;
  color: var(--gold);
  font-size: 16px;
}
@keyframes popup {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(.7); opacity: 0; }
}
.wall-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  overflow: hidden;
  padding-top: 8px;
  border-top: 1px solid rgba(212,175,55,.28);
  min-height: 48px;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  align-items: center;
  font-size: 15px;
}
.wall-bottom .marquee { opacity: 0.9; white-space: nowrap; }

/* ===== Lottery ===== */
.lottery {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px 28px 14px;
  color: var(--gold-light);
}
.lottery-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  min-height: 0;
  padding-top: 18px;
}
.lottery-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 28px 24px;
  border-radius: 12px;
}
.tier-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
}
.tier-tab {
  border: 1px solid rgba(212,175,55,.45);
  background: rgba(58,5,12,.35);
  color: var(--gold-light);
  border-radius: 999px;
  padding: 8px 16px;
  letter-spacing: 0.1em;
  font-size: 15px;
}
.tier-tab.active {
  background: linear-gradient(180deg, #f3e5ab, #d4af37);
  color: #4A1018;
  border-color: var(--gold);
  font-weight: 700;
}
.tier-tab .n { opacity: 0.8; margin-left: 4px; font-size: 12px; }
.roll-frame {
  width: min(720px, 100%);
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}
.roll-frame.rolling .roll-name {
  filter: blur(1.2px);
  animation: flicker .08s linear infinite;
}
@keyframes flicker {
  50% { opacity: 0.82; transform: translateY(2px); }
}
.roll-name {
  font-family: var(--font-serif);
  font-size: 84px;
  letter-spacing: 0.18em;
  color: #fff8dc;
  text-shadow: 0 0 30px rgba(212,175,55,.55), 0 8px 18px rgba(0,0,0,.45);
  line-height: 1.1;
  min-height: 1.1em;
  padding: 0 16px;
  text-align: center;
}
.roll-gift {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  min-height: 1.4em;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
}
.roll-gift.show {
  opacity: 1;
  transform: none;
  transition: opacity .4s ease, transform .4s ease;
}
.lottery-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.lottery-actions .hint { font-size: 13px; opacity: 0.75; letter-spacing: 0.08em; }
.winners-panel {
  border-radius: 12px;
  padding: 18px 16px 16px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.winners-panel h2 {
  font-family: var(--font-serif);
  letter-spacing: 0.2em;
  font-size: 20px;
  text-align: center;
  color: #fff4c4;
  margin-bottom: 10px;
}
.winners-list {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}
.winners-list h3 {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.12em;
  margin: 10px 0 6px;
  border-bottom: 1px solid rgba(212,175,55,.25);
  padding-bottom: 4px;
}
.winner-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed rgba(212,175,55,.12);
  animation: chipIn .4s ease both;
}
.winner-row .who { color: #fff4c4; font-family: var(--font-serif); letter-spacing: 0.08em; flex: 0 0 auto; }
.winner-row .gift { color: var(--gold-light); opacity: 0.9; text-align: right; font-size: 12px; line-height: 1.4; }
.winner-flash { animation: winflash 1.2s ease; }
@keyframes winflash {
  0% { box-shadow: inset 0 0 80px rgba(255, 233, 160, 0.55); }
  100% { box-shadow: none; }
}

/* ===== Admin ===== */
.admin-body {
  background-color: #B01A2E;
  background-image: linear-gradient(180deg, #CC243C 0%, #B01A2E 52%, #8E1424 100%);
  color: var(--ink);
  min-height: 100%;
  font-size: 14px;
}
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 80px; position: relative; z-index: 1; }
.admin-wrap h1 {
  font-family: var(--font-serif);
  letter-spacing: 0.18em;
  font-size: 30px;
}
.admin-lead { color: #7A3A42; margin: 6px 0 24px; }
.admin-grid { display: grid; gap: 18px; }
.admin-card {
  background: #FFF8F1;
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 18px 18px 16px;
  color: var(--ink);
  box-shadow: 0 8px 28px rgba(142, 20, 36, 0.18);
}
.admin-card h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.14em;
  color: var(--red-deep);
  margin-bottom: 12px;
}
.login-box {
  max-width: 420px;
  margin: 12vh auto;
  text-align: center;
}
.login-box .xi { font-family: var(--font-serif); font-size: 64px; color: var(--red-main); }
.form-row { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; align-items: end; }
.form-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink); letter-spacing: 0.08em; flex: 1; min-width: 160px; }
.form-row input, .form-row select, .form-row textarea {
  background: rgba(255,253,248,.95);
  border: 1px solid #e0c98a;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 14px;
}
.form-row textarea { min-height: 90px; width: 100%; }
.chk { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.chk input { width: 16px; height: 16px; }
.table-wrap { overflow: auto; max-height: 420px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td {
  border-bottom: 1px solid rgba(212,175,55,.18);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}
table.data th { color: var(--red-deep); font-weight: 600; position: sticky; top: 0; background: #FFF8F1; }
table.data td.note { color: #7A3A42; font-size: 12px; }
table.data td.price { white-space: nowrap; color: var(--ink); }
.msg { min-height: 1.4em; margin-top: 8px; color: var(--ink); }
.msg.error { color: #B01A2E; }
.msg.ok { color: #b6f0c8; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(212,175,55,.4); font-size: 12px; }

@media (max-width: 1100px) {
  .wall-main, .lottery-main { grid-template-columns: 1fr; }
  .qr-panel { flex-direction: row; gap: 20px; }
  .qr-panel img { width: 160px; height: 160px; }
  .winners-panel { max-height: 280px; }
  .roll-name { font-size: 56px; }
  .count-line strong { font-size: 52px; }
  .wall-top, .lottery-top { padding-right: 8px; }
}

/* ===== 3D lottery ===== */
.lottery-stage-3d {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
}
#sphereCanvas, #confettiCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#confettiCanvas { pointer-events: none; z-index: 3; }
#sphereCanvas { z-index: 1; }
.draw-count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}
.draw-count button {
  border: 1px solid rgba(212,175,55,.45);
  background: rgba(58,5,12,.35);
  color: var(--gold-light);
  border-radius: 999px;
  min-width: 44px;
  padding: 6px 12px;
}
.draw-count button.active {
  background: linear-gradient(180deg, #f2c94c, #d4af37);
  color: #4A1018;
  border-color: var(--gold);
  font-weight: 700;
}
.gift-remain {
  color: var(--gold-yellow);
  letter-spacing: 0.08em;
  font-size: 14px;
}


/* Seat map on check-in success (ported from the original RSVP/check-in program) */
.success-card .ok-table {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--red-main);
  letter-spacing: 0.08em;
}
.success-card .ok-lottery {
  margin: 6px 0 0;
  color: var(--red-main);
  font-weight: 600;
}
.seat-map-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(155, 27, 46, 0.18);
  text-align: left;
}
.seat-map-caption {
  margin: 0 0 12px;
  text-align: center;
  font-size: 13px;
  color: #6b3a32;
}
.seat-map {
  display: block;
  width: 100%;
  height: auto;
  max-width: 280px;
  margin: 0 auto;
}
.seat-map .stage-rect { fill: var(--red-main); }
.seat-map .stage-label {
  fill: #ffffff;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.seat-map .aisle { fill: var(--red-main); }
.seat-map .table-circle {
  fill: var(--paper);
  stroke: var(--red-main);
  stroke-width: 3;
}
.seat-map .table-num {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.seat-map .table-spare-tag {
  fill: var(--red-main);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
}
.seat-map .table-node.is-mine .table-circle {
  fill: var(--red-main);
  stroke: var(--gold);
  stroke-width: 6;
}
.seat-map .table-node.is-mine .table-num {
  fill: #ffffff;
  font-size: 34px;
}
.seat-map .table-node.is-mine {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.18);
}
.badge-miss {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fde8e8;
  color: #9b1b2e;
  font-size: 12px;
}
.badge-ok {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e8f5ee;
  color: #2e7d4f;
  font-size: 12px;
}
.badge-no {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eceff4;
  color: #5a6f8c;
  font-size: 12px;
}


/* Connection + fullscreen + winner modal */
.conn-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.06em;
  background: #FFF8F1;
  color: #4A1018;
  border: 1px solid #D4AF37;
  box-shadow: 0 8px 24px rgba(142, 20, 36, 0.28);
  pointer-events: none;
}
.conn-banner.warn {
  background: #4A1018;
  color: #F3E5AB;
  border-color: #F3E5AB;
}
.btn-fullscreen {
  margin-left: 4px;
}
.winner-modal {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(142, 20, 36, 0.48);
  padding: 24px;
}
.winner-modal.hidden { display: none !important; }
.winner-modal-card {
  background: #FFF8F1;
  color: #4A1018;
  border: 2px solid #D4AF37;
  border-radius: 16px;
  padding: 36px 48px 28px;
  width: min(820px, 92vw);
  max-height: 86vh;
  overflow: auto;
  text-align: center;
  box-shadow:
    0 0 0 6px #B01A2E,
    0 0 0 8px rgba(212, 175, 55, 0.85),
    0 24px 60px rgba(74, 16, 24, 0.35);
}
.winner-modal-card .xi {
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1;
  color: #B01A2E;
}
.winner-modal-card .modal-kicker {
  letter-spacing: 0.28em;
  color: #8E1424;
  margin: 4px 0 18px;
  font-family: var(--font-serif);
}
.winner-list { display: flex; flex-direction: column; gap: 18px; }
.winner-item .who-name {
  font-family: var(--font-serif);
  font-size: 44px;
  letter-spacing: 0.16em;
  color: #4A1018;
  line-height: 1.2;
}
.winner-item .who-code {
  margin-top: 4px;
  letter-spacing: 0.2em;
  color: #B01A2E;
  font-size: 20px;
  font-weight: 700;
}
.winner-item .who-gift {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 26px;
  color: #8c6d1f;
  letter-spacing: 0.08em;
}
.winner-modal .modal-hint {
  margin-top: 20px;
  font-size: 13px;
  color: #7A3A42;
  letter-spacing: 0.08em;
}

@media (min-width: 1600px) {
  .brand h1 { font-size: 36px; }
  .brand .brand-title { font-size: 22px; }
  .winner-item .who-name { font-size: 52px; }
}
