:root {
  --yellow: #ffe335;
  --ink: #101211;
  --muted: #79828a;
  --paper: #f5f7f8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #e9ecea;
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", "PingFang TC", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #358bca;
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
#app {
  position: relative;
  max-width: 520px;
  min-height: 100svh;
  margin: auto;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 70px #0001;
}
.welcome {
  position: relative;
  height: 100svh;
  min-height: 610px;
  background: #ffe335;
  overflow: hidden;
}
.welcome-art {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.welcome:before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  height: 45px;
  background: linear-gradient(#f4f8fa 75%, transparent);
}
/* 欢迎页语言切换按钮（左上角） */
.welcome-top {
  position: absolute;
  z-index: 2;
  top: calc(8px + env(safe-area-inset-top));
  left: 14px;
}
.welcome-top .lang-toggle {
  background: #ffffffcc;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
}
.welcome-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 24px calc(19px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, #ffe335 20%);
  text-align: center;
}
.enter {
  display: block;
  margin: 0 auto 12px;
  background: #070d0e;
  color: white;
  border-radius: 40px;
  width: 210px;
  padding: 16px;
  font-size: 21px;
  font-weight: 800;
}
.enter span {
  margin-left: 20px;
}
.welcome small {
  font-size: 10px;
  letter-spacing: 1.5px;
}
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 488/312;
  overflow: hidden;
}
.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.demo-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 20px 16px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #747b7d;
}
.demo-dot {
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.demo-bar button {
  font-size: 11px;
  text-decoration: underline;
  padding: 6px 0;
}
.content {
  padding: 0 22px 105px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feature {
  background: linear-gradient(145deg, #fafafa, #f2f3f2);
  border-radius: 15px;
  padding: 19px 14px 14px;
  text-align: left;
  position: relative;
  min-height: 172px;
  transition: transform 0.15s;
}
.feature:active {
  transform: scale(0.97);
}
.feature .art-icon {
  margin: 0 auto 15px;
}
.feature strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.5px;
}
.feature small {
  display: block;
  color: #727272;
  font-size: 10px;
  margin: 8px 0 17px;
}
.feature .arrow {
  position: absolute;
  bottom: 9px;
  right: 14px;
  color: #eabd00;
  font-size: 24px;
}
.art-icon {
  width: 88px;
  height: 88px;
  background-image: url("assets/reference-2.png");
  background-size: 488px 983px;
  background-repeat: no-repeat;
}
/* 内嵌 SVG 图标：无背景、透明，放大至 88px 区域并居中 */
.art-icon:has(> img) {
  background: none;
  display: grid;
  place-items: center;
}
.art-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.art-qr {
  background-position: -46px -363px;
}
.art-events {
  background-position: -207px -358px;
}
.art-draw {
  background-position: -368px -365px;
}
.art-map {
  background-position: -42px -572px;
}
.art-menu {
  background-position: -201px -574px;
}
.art-games {
  background-position: -370px -572px;
}
/* vote 未提供独立 SVG，用对勾符号占位，与其余卡片视觉统一 */
.art-vote {
  background: none;
  display: grid;
  place-items: center;
}
.art-vote::after {
  content: "";
  width: 44px;
  height: 30px;
  border-left: 6px solid #eabd00;
  border-bottom: 6px solid #eabd00;
  transform: rotate(-45deg) translate(-1px, 1px);
  border-radius: 3px;
}
/* 查桌号卡片：用 search 图标替代背景图 */
.art-find {
  background: #fff3b8;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.art-find svg {
  width: 32px;
  height: 32px;
  stroke: #1b2023;
  stroke-width: 2;
}
/* 查桌号结果项：姓名 + 机构 */
.person-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.person-info strong {
  font-size: 16px;
  line-height: 1.3;
}
.person-info small {
  font-size: 12px;
  color: #7c868c;
}
.friends {
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  background: #f5d920;
  border-radius: 18px;
  width: 100%;
  margin-top: 16px;
  text-align: left;
  padding: 22px 18px;
  min-height: 130px;
}
/* 查詢桌號：米色背景，参考 FIND A PERSON */
.friends--find {
  background: #faf3e3;
}
.friends-copy {
  z-index: 1;
  flex: 1;
  min-width: 0;
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.friends strong {
  font-size: 21px;
  font-weight: 800;
  display: block;
  letter-spacing: -0.4px;
  color: #1a1a1a;
  line-height: 1.15;
}
.friends small {
  font-size: 12px;
  font-weight: 400;
  display: block;
  margin-top: 8px;
  color: #3a3a3a;
  letter-spacing: 0.2px;
}
.friends--find small {
  letter-spacing: 0.6px;
  color: #4a4a4a;
  font-size: 11px;
}
/* 右侧漫画插画：紧贴右缘，按高度等比缩放，随卡片圆角裁切 */
.friends-art {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.friends-art img {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
}
.friends--find .friends-art {
  width: 52%;
}
.friends .arrow {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-top: 12px;
  color: #1a1a1a;
}
.friends--find .arrow {
  color: #f5a623;
}
.nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: 100%;
  display: flex;
  background: #fffffff5;
  backdrop-filter: blur(16px);
  border-top: 1px solid #eef0ef;
  padding: 11px 10px calc(12px + env(safe-area-inset-bottom));
}
.nav button {
  width: 20%;
  font-size: 10px;
  color: #707474;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.nav button.active {
  color: #111;
  font-weight: 700;
}
.nav svg {
  width: 23px;
  height: 23px;
}
.nav .active svg {
  fill: var(--yellow);
}
svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 20px 9px;
  background: #ffffffd9;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #eef0ef;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.icon-button:hover {
  background: #f4f5f5;
}
/* 语言切换按钮（左上角） */
.lang-toggle {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #101211;
}
.lang-toggle:hover {
  background: #f4f5f5;
}
.topbar-right {
  display: flex;
  gap: 4px;
}
.page {
  padding: 70px 25px 110px;
  min-height: calc(100svh - 65px);
}
h1 {
  font-size: 28px;
  line-height: 1.1;
  margin: 12px 0 17px;
  font-weight: 900;
  letter-spacing: -1px;
}
h1:after {
  display: block;
  content: "";
  width: 92px;
  height: 6px;
  background: var(--yellow);
  margin-top: 13px;
}
.sub {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
  margin: 0 0 20px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: #fff5b7;
  padding: 5px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-radius: 40px;
  padding: 14px 16px;
  margin: 24px 0 16px;
}
.search input {
  border: 0;
  background: none;
  min-width: 0;
  width: 100%;
  outline: none;
  font-size: 15px;
}
.search input::placeholder {
  color: #97a1aa;
}
.results {
  position: relative;
  z-index: 1;
}
.person {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  text-align: left;
  border-bottom: 1px solid #edf0f1;
}
.avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-image: url("assets/reference-3.png");
  background-size: 650px auto;
  background-position: -31px -197px;
}
.avatar.a1 {
  background-position: -31px -258px;
}
.avatar.a2 {
  background-position: -31px -319px;
}
.avatar.a3 {
  background-position: -31px -379px;
}
.person strong {
  flex: 1;
  font-size: 16px;
}
.person .chev {
  font-size: 25px;
  color: #969e9f;
}
.person .tag {
  font-size: 11px;
}
.people-art {
  height: 220px;
  position: relative;
  overflow: hidden;
  margin: 5px -25px -10px;
}
.people-art:after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -20px;
  width: 250px;
  height: 230px;
  background: url("assets/reference-3.png") right bottom / 390px auto no-repeat;
}
.people-art .caption {
  position: relative;
  font-size: 30px;
  color: #eac400;
  font-style: italic;
  font-weight: 900;
  display: block;
  padding: 40px 0 0 15px;
  transform: rotate(-10deg);
}
.tabs {
  display: flex;
  gap: 7px;
  margin: 25px 0 20px;
}
.tabs button {
  flex: 1;
  padding: 13px 7px;
  font-size: 11px;
  font-weight: 800;
  background: var(--paper);
  border-radius: 30px;
}
.tabs button.active {
  background: var(--yellow);
}
.dish {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 3px 15px #23343e09;
  margin-bottom: 13px;
  background: #fff;
}
.dish-photo {
  width: 73px;
  height: 70px;
  border-radius: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.dish-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dish-copy {
  flex: 1;
}
.dish strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}
.dish small {
  display: block;
  font-size: 12px;
  margin-top: 7px;
  color: #6e7475;
}
.dish > span:last-child {
  font-size: 25px;
}
.dish-emoji {
  width: 73px;
  height: 70px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #fff8d0;
  font-size: 35px;
  border-radius: 14px;
}
.menu-art {
  height: 165px;
  background: url("assets/reference-4.png") right bottom / 350px auto no-repeat;
  margin: 10px -25px -30px;
}
.map-frame {
  aspect-ratio: 4/3;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: #e5f2de;
  margin: 23px 0 12px;
}
.map-frame img {
  width: 113.1%;
  max-width: none;
  position: absolute;
  left: -7.2%;
  top: -30.4%;
}
.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.venue-note {
  padding: 12px 0;
  border-bottom: 1px solid #edf0f2;
}
.venue-note strong,
.venue-note small {
  display: block;
}
.venue-note small {
  font-size: 12px;
  color: #7c868c;
  margin-top: 4px;
}
.map-overlay {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: white;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 10px;
}
.map-link {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 15px;
  padding: 20px 0;
  text-align: left;
  border-bottom: 1px solid #edf0f2;
}
.map-link .map-symbol {
  border-radius: 50%;
  background: var(--yellow);
  padding: 10px;
  height: 44px;
}
.map-link span:nth-child(2) {
  flex: 1;
}
.map-link strong,
.map-link small {
  display: block;
}
.map-link small {
  font-size: 12px;
  color: #7c868c;
  margin-top: 6px;
}
.primary {
  background: var(--yellow);
  border-radius: 12px;
  width: 100%;
  padding: 17px;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 14px #c8ae1a12;
}
.spaced {
  margin-top: 24px;
}
.note {
  font-size: 11px;
  color: #788185;
  line-height: 1.6;
  margin: 12px 0;
}
.wheel-wrap {
  position: relative;
  margin: 24px auto;
  width: min(100%, 360px);
  aspect-ratio: 1;
}
.wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 13px solid var(--yellow);
  background: conic-gradient(
    from -30deg,
    #fff2a9 0 60deg,
    #fff 60deg 120deg,
    #fff2a9 120deg 180deg,
    #fff 180deg 240deg,
    #fff2a9 240deg 300deg,
    #fff 300deg
  );
  box-shadow: 0 5px 18px #a7971a19;
  transition: transform 3.7s cubic-bezier(0.12, 0.65, 0.15, 1);
}
.wheel-item {
  position: absolute;
  left: calc(50% - 24px);
  top: calc(50% - 25px);
  width: 48px;
  height: 50px;
  font-size: 34px;
  display: grid;
  place-items: center;
  transform: rotate(var(--angle)) translateY(var(--radius, -102px))
    rotate(calc(-1 * var(--angle)));
}
.wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32%;
  height: 32%;
  border: 8px solid white;
  border-radius: 50%;
  background: var(--yellow);
  font-size: 24px;
  font-weight: 900;
}
.pointer {
  position: absolute;
  z-index: 2;
  top: -8px;
  left: calc(50% - 13px);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 29px solid #101211;
  filter: drop-shadow(0 2px 0 white);
}
.prize-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  text-align: center;
}
.prize-art {
  padding: 20px 3px;
  background: #f3f7f8;
  border-radius: 14px;
  font-size: 37px;
}
.prize-grid strong {
  display: block;
  font-size: 11px;
  margin-top: 10px;
  font-weight: 500;
}
.prize-grid small {
  font-size: 10px;
  color: #7d888e;
}
.section-title {
  font-size: 20px;
  margin: 25px 0 16px;
}
.draw-result {
  background: #fff8cf;
  border: 1px dashed #ccaf18;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.7;
}
.qr-page {
  text-align: center;
}
.qr-page h1:after {
  margin-left: auto;
  margin-right: auto;
}
.qr-frame {
  width: min(235px, 72vw);
  aspect-ratio: 1;
  margin: 12px 0;
  border: 4px solid var(--yellow);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  background: white;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  border-radius: 6px;
}
.qr-frame svg {
  width: 100%;
  height: 100%;
  stroke: none;
  fill: #111;
}
.qr-demo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  background: var(--yellow);
  font-size: 16px;
  font-weight: 900;
  border: 3px solid white;
  padding: 8px;
}
.status {
  font-weight: 800;
  font-size: 18px;
  margin: 20px 0 8px;
}
.status.done:before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  background: var(--yellow);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  margin-right: 7px;
}
.check-art {
  height: 180px;
  overflow: hidden;
  position: relative;
  margin: 25px -25px -20px;
}
.check-art img {
  width: 100%;
  position: absolute;
  bottom: -10px;
  left: 0;
}
.check-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#fff, transparent 15%);
}
.secondary {
  border: 1px solid #d9dede;
  border-radius: 10px;
  width: 100%;
  padding: 14px;
  font-size: 13px;
  margin-top: 12px;
}
.ticket {
  border: 2px solid #111;
  border-radius: 15px;
  overflow: hidden;
  margin: 25px 0;
}
.ticket-head {
  background: var(--yellow);
  padding: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.ticket-body {
  padding: 20px;
  text-align: left;
}
.ticket-body h2 {
  font-size: 29px;
  margin: 4px 0 15px;
}
.ticket-body p {
  font-size: 13px;
  color: #757e80;
}
.timeline {
  margin-top: 24px;
}
.schedule {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid #eee;
  padding-bottom: 22px;
}
.schedule time {
  font-size: 14px;
  font-weight: bold;
  background: #fff6b7;
  height: max-content;
  padding: 7px;
  border-radius: 6px;
}
.schedule strong {
  display: block;
  margin: 5px 0 8px;
}
.schedule small {
  color: #7b8587;
  line-height: 1.5;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin: 25px 0;
}
.memory-card {
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--yellow);
  font-size: 27px;
  font-weight: 900;
  border: 2px solid #111;
}
.memory-card.revealed {
  background: #fff;
}
.memory-card.matched {
  background: #f5f6ef;
  border-color: #d9ddd0;
}
.game-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.empty {
  padding: 30px 0;
  text-align: center;
  color: #788185;
  font-size: 14px;
}
dialog {
  width: calc(100% - 40px);
  max-width: 420px;
  border: 0;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 100px #0003;
}
dialog::backdrop {
  background: #1118;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 25px;
  margin-top: 0;
}
dialog p {
  font-size: 14px;
  line-height: 1.7;
  color: #5c666a;
}
dialog .primary {
  margin-top: 15px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 35px);
  width: max-content;
  background: #111;
  color: white;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  z-index: 50;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.menu-links button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 0;
  border-bottom: 1px solid #eee;
}
.route-list {
  padding-left: 22px;
  line-height: 1.8;
  font-size: 14px;
}
.route-list li {
  margin-bottom: 14px;
}
.mini-label {
  font-size: 10px;
  color: #91999b;
  letter-spacing: 1px;
  text-align: center;
  margin: 25px 0 0;
}
@media (min-width: 450px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .feature {
    min-height: 189px;
    padding-left: 12px;
    padding-right: 10px;
  }
  .feature strong {
    font-size: 13px;
  }
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }
  .feature small {
    font-size: 9px;
  }
  .friends {
    min-height: 140px;
  }
  .friends-copy {
    padding-left: 6px;
  }
}
@media (max-width: 359px) {
  .page {
    padding-left: 18px;
    padding-right: 18px;
  }
  h1 {
    font-size: 25px;
  }
  .person {
    gap: 8px;
  }
  .person strong {
    font-size: 14px;
  }
  .wheel-item {
    --radius: -84px;
    font-size: 29px;
  }
  .wheel-center {
    font-size: 20px;
  }
  .tabs button {
    font-size: 10px;
  }
  .feature strong {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Preserve all lettering on unusually tall or short screens. */
.welcome {
  background: linear-gradient(#f4f9fb 0 35%, #ffe335 90%);
}
.welcome-art {
  object-fit: contain;
  object-position: center top;
}
.welcome-bottom {
  top: min(87%, calc(min(100vw, 520px) * 1.87));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(transparent, #ffe335 24px);
}
.people-art:after {
  width: 170px;
  height: 235px;
  background-size: 600px auto;
  bottom: 0;
  right: 0;
}
.welcome-bottom {
  background: #ffe335;
}

/* ===== 对接真实后端新增的表单/投票样式 ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px;
}
.auth-form input,
.auth-form textarea {
  width: 100%;
  border: 1px solid #dfe3e5;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15px;
  background: #fafbfb;
}
.auth-form input:focus,
.auth-form textarea:focus {
  outline: 2px solid #358bca;
  outline-offset: 1px;
  background: #fff;
}
.auth-form textarea {
  min-height: 72px;
  resize: vertical;
}
.code-row input {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 18px;
}
.rsvp-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.rsvp-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
}
.rsvp-row input[type="number"] {
  width: 64px;
}
.rsvp-row input[type="radio"] {
  width: auto;
}
.vote-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe3e5;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fafbfb;
}
.vote-option img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}
.vote-option span {
  flex: 1;
  font-size: 15px;
}
.vote-option small {
  color: var(--muted);
}
.vote-option input {
  width: auto;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 32px 20px;
  font-size: 14px;
}
.empty button {
  margin-top: 12px;
}

/* ===== Slido 投票 iframe ===== */
.slido-frame {
  position: relative;
  width: calc(100% + 50px);
  margin-left: -25px;
  margin-top: 12px;
  min-height: 560px;
}
.slido-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
}

/* ===== 扫码签到页 ===== */
.checkin-page {
  text-align: center;
}
.checkin-page h1:after {
  margin-left: auto;
  margin-right: auto;
}
.scan-box {
  width: 100%;
  max-width: 320px;
  margin: 6px auto 8px;
  border-radius: 16px;
  overflow: hidden;
  background: #101211;
  aspect-ratio: 1;
}
.scan-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan-hint {
  font-size: 12px;
  color: #788185;
  margin: 4px 0 10px;
}
.scan-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.scan-actions .secondary {
  flex: 1;
  margin-top: 0;
  padding: 12px;
}
/* 摄像头扫描开关：用 camera 图标 + 状态文案直观表示开启/停止 */
.scan-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #d64545;
  border: 0;
  border-radius: 40px;
  transition: background .2s ease, color .2s ease;
  cursor: pointer;
}
.scan-toggle svg {
  width: 20px;
  height: 20px;
}
/* 停止扫描状态：红色醒目，提示当前正在扫描 */
.scan-toggle.is-on {
  background: #d64545;
  color: #fff;
}
/* 开启扫描状态：低调灰，提示已停止 */
.scan-toggle:not(.is-on) {
  background: #eef0f1;
  color: #5b656b;
}
/* 低调的邮箱查询按钮：淡边框、柔和占位、无醒目底色 */
.scan-submit {
  border: 1px solid #dfe3e5;
  background: transparent;
  color: #6b7479;
  font-size: 14px;
  font-weight: 600;
  padding: 13px;
  margin-top: 0;
}
.scan-submit:hover {
  border-color: #c6cccf;
  color: #4a5256;
}
/* 签到页邮箱输入区始终可见，收紧与开关的间距 */
.checkin-page #checkin-form .search {
  margin: 8px 0 0;
}
.scan-result {
  background: #fafbfb;
  border: 1px solid #e2e6e8;
  border-radius: 14px;
  padding: 18px 16px;
  text-align: left;
  margin-top: 14px;
}
.scan-result.error {
  border-color: #f2b8b8;
  background: #fff5f5;
}
.scan-result.warn {
  border-color: #e8cf9a;
  background: #fffaf0;
}
.scan-result.done {
  border-color: #b9dcae;
  background: #f3fbf1;
}
.scan-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}
.scan-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.scan-field {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e5e9eb;
}
.scan-field span {
  color: #798188;
}
.scan-field b {
  font-weight: 700;
}
.table-input {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #555;
  margin-bottom: 14px;
}
.table-input input {
  flex: 1;
  border: 1px solid #dfe3e5;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  background: #fff;
}
.table-input input:focus {
  outline: 2px solid #358bca;
  outline-offset: 1px;
}
.scan-result .primary {
  margin-top: 4px;
}

/* ===== 签到确认弹窗（popup） ===== */
.checkin-popup {
  text-align: left;
}
.checkin-popup .popup-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #1b2023;
}
.checkin-popup .scan-fields {
  margin-bottom: 14px;
}
.checkin-popup .popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.checkin-popup .popup-actions .secondary,
.checkin-popup .popup-actions .primary {
  flex: 1;
  margin-top: 0;
  padding: 13px;
}


/* ===== Pass 页面：无标题 + 缩放适配可视区域（无滚动条） ===== */
.pass-page {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 25px;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}
.pass-logout {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 1;
  font-size: 13px;
  color: #707474;
  padding: 6px 10px;
  border-radius: 8px;
}
/* 通行证页语言切换按钮（左上角） */
.pass-top {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 1;
}
.pass-logout:hover { color: #111; background: #f2f4f3; }
.pass-page .ticket {
  margin: 0 0 16px;
}
.ticket-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tag-status {
  background: var(--paper);
  color: #555;
}
.pass-actions {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.pass-actions .primary {
  flex: 1;
  padding: 14px;
  font-size: 15px;
  white-space: nowrap;
}
.pass-actions .secondary {
  flex: 1;
  margin-top: 0;
  padding: 14px;
  white-space: nowrap;
}

/* 高度受限时收缩元素间距与字号，让内容整体塞进可视区域 */
@media (max-height: 720px) {
  .pass-page { padding: 12px 20px; }
  .pass-page .ticket { margin-bottom: 12px; }
  .pass-page .ticket-head { padding: 12px; }
  .pass-page .ticket-body { padding: 14px; }
  .pass-page .ticket-body h2 { font-size: 24px; margin-bottom: 10px; }
  .pass-page .qr-frame { width: min(190px, 55vw); margin: 8px 0; }
}
@media (max-height: 600px) {
  .pass-page .ticket-body h2 { font-size: 21px; }
  .pass-page .qr-frame { width: min(150px, 48vw); }
}

/* 扫码登录骨架屏：等 /api/auth/qr 返回期间占住版式，避免闪出「尚未登入」 */
.ticket-loading .ticket-body h2 { min-height: 34px; }
.sk {
  display: block;
  background: #e6eaec;
  border-radius: 6px;
  animation: sk-pulse 1.2s ease-in-out infinite;
}
.sk-title { width: 62%; height: 30px; margin: 6px 0 16px; }
.sk-tag { width: 96px; height: 24px; border-radius: 999px; }
.sk-sub { width: 40%; height: 14px; margin-top: 12px; }
.sk-qr { width: min(235px, 72vw); aspect-ratio: 1; margin: 12px 0; border-radius: 18px; }
@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
}
