:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #17211c;
  --muted: #5c6b64;
  --line: #e3ebe7;
  --accent: #0c6e56;
  --accent-dark: #084c3c;
  --soft: #f3faf7;
  --ok-bg: #e7f6f1;
  --warn: #8a4b08;
  --warn-bg: #fff6e8;
  --danger: #9f1239;
  --shadow: 0 12px 32px rgba(12, 70, 54, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

/* Static faces only. The name PingFang HK is not installed; fontconfig substitutes
   NotoSans-VariableFont_wdth,wght.ttf (wdth axis 62.5 to 100, default 100).
   An unlocked width axis draws glyphs condensed, which reads as stretched tall.
   Inter is opsz+wght only (no wdth). Noto Sans CJK HK is a static CFF gothic. */
@font-face {
  font-family: "BNI Latin";
  src: local("Inter"), local("Inter-Regular");
  font-weight: 100 900;
  font-style: normal;
  font-stretch: normal;
  font-display: swap;
}
@font-face {
  font-family: "BNI HK Gothic";
  src: local("Noto Sans CJK HK"), local("NotoSansCJKhk-Regular");
  font-weight: 400;
  font-style: normal;
  font-stretch: normal;
  unicode-range: U+2000-206F, U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31C0-31EF, U+3200-32FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
  font-display: swap;
}
@font-face {
  font-family: "BNI HK Gothic";
  src: local("Noto Sans CJK HK Bold"), local("NotoSansCJKhk-Bold");
  font-weight: 700;
  font-style: normal;
  font-stretch: normal;
  unicode-range: U+2000-206F, U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31C0-31EF, U+3200-32FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
  font-display: swap;
}

html, body {
  margin: 0;
  background: #fff;
  color: #171a20;
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
  font-size: 18px;
  line-height: 1.45;
}

a { color: var(--accent-dark); }

.wrap {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 1.1rem 1rem 3rem;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.chapter-line {
  margin: 0.35rem 0 0;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 1.15rem;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 1.05;
  margin: 0.35rem 0 0.2rem;
  letter-spacing: -0.03em;
}

.when {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 700;
}

.muted { color: #5c5e62; }

.hint, .error, .note {
  background: var(--soft);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.error {
  background: #fff1f2;
  color: var(--danger);
}

.count-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin: 1.1rem 0 0.4rem;
}

.count {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 800;
  margin: 0;
}

.count b { color: var(--accent); }

.reader-wrap { margin: 0.4rem auto 0.8rem; max-width: 560px; }

.reader {
  width: 100%;
  min-height: 240px;
  background: #101513;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.reader video {
  width: 100% !important;
  height: auto !important;
  border-radius: 20px;
}

.actions, .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

button, .btn, input, select {
  font: inherit;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

button.ghost, .btn.ghost {
  background: white;
  color: var(--accent-dark);
}

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

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

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

input {
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid #c9d5d0;
  background: white;
  color: var(--ink);
  font-weight: 500;
}

input:focus, button:focus, .btn:focus {
  outline: 3px solid rgba(12, 110, 86, 0.28);
  outline-offset: 1px;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin: 0.8rem 0 1.2rem;
}

.result {
  border-radius: 22px;
  padding: 1rem 1.1rem 1.15rem;
  margin: 0.4rem 0 1rem;
  background: var(--ok-bg);
  border: 2px solid var(--accent);
}

.result.already {
  background: var(--warn-bg);
  border-color: #e0b15a;
}

.result .who {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.result .co, .result .role {
  margin: 0.25rem 0 0;
  font-size: clamp(1.25rem, 3.5vw, 1.7rem);
}

.result .status {
  margin: 0.55rem 0 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 850;
  color: var(--accent-dark);
}

.result.already .status { color: var(--warn); }

.result .time {
  margin: 0.15rem 0 0;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
}

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 46vh;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.people li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: 0.55rem;
  padding: 0.75rem 0.1rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.people .n { font-weight: 800; }
.people .c { color: var(--muted); }
.people .t { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

.member {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem 1rem;
  margin: 0 0 0.75rem;
}

.member h2 { margin: 0; font-size: 1.45rem; }
.member p { margin: 0.15rem 0; }
.member .role { color: var(--accent-dark); font-weight: 800; }
.member .spec, .member .phone { color: var(--muted); font-size: 0.95rem; }
.member .actions { margin-top: 0.7rem; }

.footer-nav {
  margin-top: 1.6rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 1rem;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.manual {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.manual input { flex: 1 1 220px; }

.stage {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.4rem 1rem 2rem;
}

.stage h1 {
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  margin-top: 0.4rem;
}

.stage .co { font-size: 1.35rem; margin: 0.2rem 0; }
.stage .role { color: var(--accent-dark); font-weight: 800; margin: 0; }
.stage .spec { color: var(--muted); font-size: 0.95rem; max-width: 28rem; }
.stage .qr { margin: 0.8rem 0; width: min(78vw, 340px); }
.stage .qr svg { width: 100%; height: auto; display: block; }
.payload {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}

.sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.pcard {
  border: 1px solid #d5ded9;
  border-radius: 12px;
  padding: 10px 10px 12px;
  text-align: center;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pcard h2 { font-size: 1.15rem; margin: 0.2rem 0; line-height: 1.2; }
.pcard p { margin: 0.1rem 0; font-size: 0.92rem; }
.pcard .role { color: var(--accent-dark); font-weight: 800; }
.pcard .qr svg { width: 42mm; height: 42mm; }
.pcard .pid { font-size: 0.68rem; color: #666; word-break: break-all; }

@media (max-width: 640px) {
  .people li { grid-template-columns: 1fr; gap: 0.1rem; }
  .people .t { color: var(--muted); }
}

@media print {
  body { background: white; }
  .no-print { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .sheet { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .pcard { box-shadow: none; }
  .pcard .qr svg { width: 38mm; height: 38mm; }
}


/* Login and home: calm product page. Reception pages keep the styles above. */
body.page-login,
body.page-home {
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
  font-weight: 400;
  letter-spacing: -0.015em;
}

body.page-login a,
body.page-home a {
  color: #1d1d1f;
  text-underline-offset: 0.18em;
}

body.page-login .wrap,
body.page-home {
  font-size: 16px;
}

body.page-login .brand {
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: #6e6e73;
}

body.page-login .login-title {
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 1.6rem 0 0;
}

body.page-login .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 2.4rem 0 1.6rem;
}

body.page-login label {
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: #6e6e73;
  margin-bottom: 1.35rem;
}

body.page-login input {
  min-height: 48px;
  padding: 0.65rem 0;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 0;
  background: transparent;
  font-weight: 400;
  color: #1d1d1f;
}

body.page-login button:focus,
body.page-home button:focus,
body.page-home a:focus {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 3px;
}

body.page-login input:focus,
body.page-login select:focus {
  outline: none;
  border-bottom-color: #1d1d1f;
}

body.page-login select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 1.5rem 0.65rem 0;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 0;
  background-color: transparent;
  font-weight: 400;
  color: #1d1d1f;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6e6e73 50%), linear-gradient(135deg, #6e6e73 50%, transparent 50%);
  background-position: calc(100% - 8px) calc(50% - 2px), calc(100% - 3px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

body.page-login button {
  width: 100%;
  margin-top: 0.4rem;
  min-height: 48px;
  border: 0;
  border-radius: 980px;
  background: #1d1d1f;
  color: #fff;
  font-weight: 500;
  box-shadow: none;
}

body.page-login .error {
  background: transparent;
  color: #1d1d1f;
  border-radius: 0;
  padding: 1rem 0 0;
  margin: 0;
  font-size: 0.95rem;
}

body.page-login .muted {
  color: #6e6e73;
  font-size: 0.95rem;
}

body.page-home .wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

body.page-home .qr-launch {
  display: flex;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0.7rem 1.35rem;
  border: 0;
  border-radius: 980px;
  background: #1D1D1F;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: none;
}

body.page-home .qr-panel {
  text-align: center;
  margin: 14px 0 0;
}

body.page-home .qr-panel .qr {
  width: min(68vw, 220px);
  margin: 0 auto 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 12px;
}

body.page-home .qr-panel .qr svg {
  width: 100%;
  height: auto;
  display: block;
}

body.page-home .qr-panel p {
  margin: 0;
  color: #6e6e73;
  font-size: 14px;
}

body.page-home h1 {
  margin: 22px 0 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #1D1D1F;
}

body.page-home .month-score {
  margin-top: 18px;
}

body.page-home .score-label {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: #6e6e73;
}

body.page-home .score-value {
  margin: 2px 0 0;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #1D1D1F;
}

body.page-home .week-math {
  margin: 16px 0 0;
}

body.page-home .stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 11px 0;
  border-top: 1px solid rgba(29, 29, 31, 0.12);
}

body.page-home .stat:first-child { border-top: 0; }

body.page-home .stat dt {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #1D1D1F;
}

body.page-home .stat dd {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #1D1D1F;
  white-space: nowrap;
}

body.page-home table.light {
  width: 100%;
  margin: 22px 0 0;
  border-collapse: collapse;
  table-layout: fixed;
}

body.page-home table.light caption {
  caption-side: top;
  text-align: left;
  margin: 0 0 8px;
  padding: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #1D1D1F;
}

body.page-home table.light th,
body.page-home table.light td {
  padding: 12px 4px;
  border-bottom: 1px solid rgba(29, 29, 31, 0.12);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: #1D1D1F;
  vertical-align: baseline;
}

body.page-home table.light thead th {
  padding-top: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(29, 29, 31, 0.12);
  font-size: 13px;
  font-weight: 500;
  color: #6e6e73;
  text-align: right;
}

body.page-home table.light thead th:first-child,
body.page-home table.light tbody th {
  width: 22%;
  text-align: left;
  font-weight: 500;
}

body.page-home table.light td {
  text-align: right;
  white-space: nowrap;
}

body.page-home .predict {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 0 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: #1D1D1F;
}

body.page-home .predict-label { min-width: 0; }
body.page-home .predict-value {
  flex: none;
  font-weight: 400;
  white-space: nowrap;
}

body.page-home .suggest { margin-top: 22px; }

body.page-home h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1D1D1F;
}

body.page-home .quests {
  margin: 0;
  padding: 0 0 0 1.3em;
  list-style: decimal;
}

body.page-home .quest {
  margin: 0;
  padding: 8px 0;
  border: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: #1D1D1F;
}

body.page-home .quest::before { content: none; }

body.page-home .sug-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: #1D1D1F;
}

body.page-home .logout-form {
  margin: 18px 0 0;
}

body.page-home .logout-btn {
  min-height: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #86868b;
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
}

@media (max-width: 360px) {
  body.page-home h1 { font-size: 30px; }
  body.page-home .score-value { font-size: 34px; }
  body.page-home table.light th,
  body.page-home table.light td { font-size: 14px; padding: 10px 2px; }
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(29, 29, 31, 0.22);
  background: #F5F5F7;
  color: #1D1D1F;
  flex: none;
  display: block;
}

.avatar.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

.avatar[hidden] { display: none !important; }

.avatar.sm { width: 40px; height: 40px; font-size: 16px; }
.avatar.md { width: 64px; height: 64px; font-size: 22px; }
.avatar.lg { width: 96px; height: 96px; font-size: 34px; }

body.page-home .identity {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  margin-top: 0;
}

body.page-home .identity h1 {
  margin: 0;
  min-width: 0;
}

.result .avatar { margin: 0 0 10px; }

.member-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-top h2 { margin: 0; }

.stage #portrait { display: flex; justify-content: center; }
.stage .avatar { margin: 0.35rem auto 0.15rem; }

.pcard .avatar { margin: 0.15rem auto 0.35rem; }


/* Guest and observer registration. Login page only; home table is untouched. */
body.page-login .visit-entry {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 1.5rem 0 0.2rem;
}

body.page-login a.visit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  border-radius: 980px;
  background: #1d1d1f;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

body.page-login a.visit-btn:focus {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 3px;
}

body.page-visit .scan-note,
body.page-visit .scan-hint {
  margin: 0.2rem 0 0.9rem;
  color: #6e6e73;
  font-size: 0.95rem;
}

body.page-visit #scan-box {
  margin: 0.2rem 0 1rem;
}

body.page-visit #reader {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

body.page-visit .photo-label {
  margin-top: 0.8rem;
}

/* Confirm「已登記」— conference / café chest badge (胸牌), one-phone-screen */
body.page-visit:has(.confirm-badge) {
  background: #f4f6f9;
  /* Use dynamic viewport so mobile browser chrome doesn't force scroll */
  min-height: 100dvh;
}

/* Keep compact in-page brand/muted on confirm; site nav + footer stay visible */
body.page-visit:has(.confirm-badge) .brand,
body.page-visit:has(.confirm-badge) .muted {
  display: none !important;
}

body.page-visit:has(.confirm-badge) > .wrap {
  max-width: 400px;
  min-height: 100dvh;
  padding: 0.45rem 0.65rem 0.55rem;
  justify-content: flex-start;
  box-sizing: border-box;
}

body.page-visit:has(.confirm-badge) .login-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0 0 0.35rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: rgba(6, 20, 40, 0.06);
  border: 1px solid rgba(224, 177, 90, 0.5);
  color: #061428;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

body.page-visit .confirm-badge {
  width: 100%;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(6, 20, 40, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 28px rgba(6, 20, 40, 0.12),
    0 2px 6px rgba(6, 20, 40, 0.05);
}

body.page-visit .confirm-badge-head {
  position: relative;
  padding: 0.55rem 0.85rem 0.5rem;
  background: linear-gradient(135deg, #010814 0%, #061428 46%, #0a1c38 100%);
  color: #fff;
  text-align: center;
}

body.page-visit .confirm-badge-head::after {
  content: "";
  display: block;
  height: 2px;
  margin: 0.5rem -0.85rem -0.5rem;
  background: linear-gradient(90deg, #8a6a2e 0%, #e0b15a 45%, #f3d58a 50%, #e0b15a 55%, #8a6a2e 100%);
}

body.page-visit .confirm-badge-clip {
  width: 34px;
  height: 7px;
  margin: 0 auto 0.35rem;
  border-radius: 3px;
  background: linear-gradient(180deg, #c9cdd4 0%, #8b929c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(0, 0, 0, 0.35);
}

body.page-visit .confirm-badge-logo {
  display: block;
  width: auto;
  height: clamp(40px, 11vw, 52px);
  max-width: min(78%, 240px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

body.page-visit .confirm-badge-brand {
  display: none;
}

body.page-visit .confirm-badge-role {
  display: inline-block;
  margin: 0.4rem 0 0;
  padding: 0.34rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(224, 177, 90, 0.85);
  background: rgba(224, 177, 90, 0.16);
  color: #e0b15a;
  font-size: clamp(1.18rem, 5.2vw, 1.42rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

body.page-visit .confirm-badge-body {
  padding: 0.55rem 0.85rem 0.45rem;
  text-align: left;
}

body.page-visit .confirm-badge-guest {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

/* Inviter: padding-top under border-top = gap line→text; margin = space above line.
   Combined selector beats later .confirm-row--hero { padding: 0.02rem }. */
body.page-visit .confirm-row--hero.confirm-row--inviter,
body.page-visit .confirm-row--inviter {
  align-items: baseline;
  margin: 0.45rem 0 0;
  padding: 0.4rem 0 0.075rem;
  border-top: 1px dashed rgba(6, 20, 40, 0.12);
  border-bottom: none;
  min-height: 0;
}

body.page-visit .confirm-row--inviter .confirm-label {
  padding-top: 0 !important; /* beat hero label padding-top: 0.35rem */
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #8a6a2e;
  white-space: nowrap;
}

body.page-visit .confirm-row--inviter .confirm-value {
  color: #061428;
  font-size: 0.74rem !important; /* beat .confirm-row--hero .confirm-value clamp */
  font-weight: 550;
  letter-spacing: normal;
  line-height: 1.2;
}

/* Embed mode: card-only (desk modal iframe ?embed=1) */
body.page-embed .site-nav,
body.page-embed .site-footer,
body.page-embed > .wrap > .brand,
body.page-embed > .wrap > .login-title,
body.page-embed > .wrap > .muted {
  display: none !important;
}
body.page-embed.page-visit > .wrap {
  padding: 0.45rem 0.55rem 0.55rem;
  max-width: 28rem;
  margin: 0 auto;
}
body.page-embed {
  background: #fff;
  min-height: 0;
}
body.page-embed.page-card .brand,
body.page-embed.page-card .chapter-line {
  display: none !important;
}
body.page-embed.page-card .stage {
  padding: 0.75rem 0.85rem 1rem;
  max-width: 28rem;
  margin: 0 auto;
}

body.page-visit .confirm-badge-meta {
  margin: 0.1rem 0 0;
  color: #5c5e62;
  font-size: 0.78rem;
}

body.page-visit .confirm-badge-meeting {
  margin: 0;
  padding: 0.5rem 0.85rem 0.65rem;
  text-align: left;
  border-radius: 0;
  background: linear-gradient(180deg, #0a1c38 0%, #061428 100%);
  border: 0;
  border-top: 1px solid rgba(224, 177, 90, 0.35);
  color: #fff;
}

/* Observer confirm badge: Dynasty forest-green head + meeting footer */
/* Observer confirm badge: forest-green head + meeting footer */
body.page-visit .confirm-badge--observer .confirm-badge-head {
  background: linear-gradient(135deg, #0f2410 0%, #1a3d1a 42%, #2e5026 78%, #3d6333 100%);
}
body.page-visit .confirm-badge--observer .confirm-badge-head::after {
  background: linear-gradient(90deg, #8a6a2e 0%, #e0b15a 45%, #f3d58a 50%, #e0b15a 55%, #8a6a2e 100%);
}
body.page-visit .confirm-badge--observer .confirm-badge-meeting {
  background: linear-gradient(180deg, #2e5026 0%, #1a3d1a 55%, #142a14 100%);
  border-top-color: rgba(224, 177, 90, 0.45);
}
body.page-visit .confirm-badge--observer .confirm-badge-meeting-title {
  color: #f3d58a;
  border-bottom-color: rgba(224, 177, 90, 0.55);
}
body.page-visit .confirm-badge--observer .confirm-badge-meeting .confirm-label {
  color: rgba(243, 213, 138, 0.9);
}
body.page-visit .confirm-badge--observer .confirm-badge-meeting .confirm-value {
  color: rgba(255, 255, 255, 0.95);
}

/* Substitute confirm badge: Dynasty crimson-red head + meeting footer (ref gradient) */
body.page-visit .confirm-badge--substitute .confirm-badge-head {
  background: linear-gradient(135deg, #4a0608 0%, #6e0808 42%, #8c0e0e 78%, #a01418 100%);
}
body.page-visit .confirm-badge--substitute .confirm-badge-head::after {
  background: linear-gradient(90deg, #8a6a2e 0%, #e0b15a 45%, #f3d58a 50%, #e0b15a 55%, #8a6a2e 100%);
}
body.page-visit .confirm-badge--substitute .confirm-badge-meeting {
  background: linear-gradient(180deg, #8c0e0e 0%, #6e0808 55%, #3d0606 100%);
  border-top-color: rgba(224, 177, 90, 0.45);
}
body.page-visit .confirm-badge--substitute .confirm-badge-meeting-title {
  color: #f3d58a;
  border-bottom-color: rgba(224, 177, 90, 0.55);
}
body.page-visit .confirm-badge--substitute .confirm-badge-meeting .confirm-label {
  color: rgba(243, 213, 138, 0.85);
}
body.page-visit .confirm-badge--substitute .confirm-badge-meeting .confirm-value {
  color: rgba(255, 255, 255, 0.95);
}

body.page-visit .confirm-badge--observer .confirm-badge-role {
  border-color: rgba(224, 177, 90, 0.9);
  background: rgba(224, 177, 90, 0.18);
  color: #e0b15a;
}

body.page-visit .confirm-badge-meeting-title {
  margin: 0 0 0.28rem;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid rgba(224, 177, 90, 0.55);
  color: #f3d58a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

body.page-visit .confirm-row {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.1rem 0.5rem;
  align-items: start;
  margin: 0.28rem 0 0;
}

body.page-visit .confirm-badge-guest > .confirm-row:first-child,
body.page-visit .confirm-badge-meeting > .confirm-row:first-of-type {
  margin-top: 0;
}

body.page-visit .confirm-label {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

body.page-visit .confirm-value {
  color: #171a20;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.32;
  word-break: break-word;
}

body.page-visit .confirm-badge-meeting .confirm-value {
  font-size: 0.8rem;
  line-height: 1.3;
}

/* Meeting details: fixed 3-glyph label column (match 主講者); 2-char labels share that width */
body.page-visit .confirm-badge-meeting .confirm-row {
  grid-template-columns: 2.16rem 1fr; /* 3 × 0.72rem label size */
  column-gap: 0.32rem;
  row-gap: 0.1rem;
}

body.page-visit .confirm-badge-meeting .confirm-label {
  white-space: nowrap;
  color: rgba(243, 213, 138, 0.85);
}

body.page-visit .confirm-badge-meeting .confirm-value {
  min-width: 0;
  color: rgba(255, 255, 255, 0.95);
}

/* Name + specialty + inviter: identical 4-char label column (values share one left edge) */
body.page-visit .confirm-row--hero,
body.page-visit .confirm-row--inviter {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  column-gap: 0.5rem;
  row-gap: 0.1rem;
}

body.page-visit .confirm-row--hero {
  align-items: baseline;
  margin: 0;
  padding: 0.02rem 0;
}

body.page-visit .confirm-row--hero .confirm-label {
  padding-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

body.page-visit .confirm-row--hero .confirm-value {
  color: #061428;
  font-size: clamp(1.7rem, 7.8vw, 2.2rem);
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

/* Specialty slightly smaller than name */
body.page-visit .confirm-badge-guest .confirm-row--hero:nth-child(2) .confirm-value {
  font-size: clamp(1.05rem, 4.6vw, 1.28rem);
  font-weight: 700;
  line-height: 1.2;
}

body.page-visit .confirm-badge-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  padding: 0.55rem 0.75rem 0.6rem;
  background: #fff;
  color: #061428;
  text-align: center;
  border-top: 1px solid rgba(6, 20, 40, 0.08);
}

body.page-visit .confirm-badge-qr,
body.page-visit .confirm-badge .qr {
  width: min(58vw, 210px);
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(6, 20, 40, 0.1);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(6, 20, 40, 0.08);
}

body.page-visit .confirm-badge .qr svg {
  width: 100%;
  height: auto;
  display: block;
}

body.page-visit .confirm-qr-note {
  margin: 0;
  max-width: 17rem;
  color: #5c5e62;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
}

body.page-visit .confirm-type,
body.page-visit .confirm-name {
  margin: 0.75rem 0 0;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Short phones (SE / ~667–740): squeeze further so full badge fits */
@media (max-height: 760px) {
  body.page-visit:has(.confirm-badge) > .wrap {
    padding: 0.25rem 0.5rem 0.35rem;
  }

  body.page-visit:has(.confirm-badge) .login-title {
    margin-bottom: 0.22rem;
    padding: 0.08rem 0.45rem;
    font-size: 0.62rem;
  }

  body.page-visit .confirm-badge-head {
    padding: 0.4rem 0.7rem 0.38rem;
  }

  body.page-visit .confirm-badge-clip {
    height: 5px;
    margin-bottom: 0.22rem;
  }

  body.page-visit .confirm-badge-logo {
    height: clamp(34px, 9.5vw, 44px);
  }

  body.page-visit .confirm-badge-role {
    margin-top: 0.28rem;
    padding: 0.26rem 0.95rem;
    font-size: clamp(1.05rem, 4.6vw, 1.25rem);
  }

  body.page-visit .confirm-badge-body {
    padding: 0.4rem 0.7rem 0.32rem;
  }

  body.page-visit .confirm-badge-guest {
    gap: 0.12rem;
  }

  body.page-visit .confirm-row--hero .confirm-value {
    font-size: clamp(1.5rem, 7vw, 1.95rem);
  }

  body.page-visit .confirm-badge-guest .confirm-row--hero:nth-child(2) .confirm-value {
    font-size: clamp(0.98rem, 4.2vw, 1.15rem);
  }

  body.page-visit .confirm-badge-foot {
    padding: 0.4rem 0.6rem 0.45rem;
    gap: 0.2rem;
  }

  body.page-visit .confirm-badge-qr,
  body.page-visit .confirm-badge .qr {
    width: min(52vw, 188px);
    padding: 6px;
  }

  body.page-visit .confirm-qr-note {
    font-size: 0.66rem;
  }

  body.page-visit .confirm-badge-meeting {
    padding: 0.38rem 0.7rem 0.48rem;
  }

  body.page-visit .confirm-badge-meeting-title {
    margin-bottom: 0.18rem;
    padding-bottom: 0.18rem;
    font-size: 0.74rem;
  }

  body.page-visit .confirm-row {
    margin-top: 0.18rem;
    gap: 0.08rem 0.4rem;
  }

  body.page-visit .confirm-badge-meeting .confirm-value,
  body.page-visit .confirm-value {
    font-size: 0.74rem;
    line-height: 1.25;
  }
}

@media (max-width: 480px) {
  body.page-visit .confirm-row,
  body.page-visit .confirm-row--hero,
  body.page-visit .confirm-row--inviter {
    grid-template-columns: 4.2rem 1fr;
    gap: 0.12rem 0.45rem;
  }

  /* Hero + inviter stay on the shared 4-char column (above). Meeting stays 3-glyph. */
  body.page-visit .confirm-row--hero,
  body.page-visit .confirm-row--inviter {
    grid-template-columns: 4.2rem 1fr;
    column-gap: 0.45rem;
  }

  /* Keep meeting label column at 3-glyph width on phones (do not inherit 4.2rem) */
  body.page-visit .confirm-badge-meeting .confirm-row {
    grid-template-columns: 2.16rem 1fr;
    gap: 0.08rem 0.32rem;
  }
}

body.page-login .poster,
body.page-visit .poster {
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 12px;
  background: #fff;
}

body.page-login .meeting-poster,
body.page-visit .meeting-poster {
  margin: 0 0 1.4rem;
}

/* Login keeps compact side-by-side facts; visit uses homepage grid below. */
body.page-login:not(.page-visit) .poster-facts {
  margin: 0 0 1.1rem;
}

body.page-login:not(.page-visit) .poster-facts div {
  display: flex;
  gap: 0.75rem;
  margin: 0.15rem 0;
}

body.page-login:not(.page-visit) .poster-facts dt {
  min-width: 2.5rem;
  color: #6e6e73;
  font-weight: 500;
}

body.page-login:not(.page-visit) .poster-facts dd {
  margin: 0;
  color: #1d1d1f;
  font-weight: 400;
}

body.page-visit .checks {
  border: 0;
  margin: 0 0 1.35rem;
  padding: 0;
}

body.page-visit .checks legend,
body.page-visit .field-help,
body.page-visit .mode-wait {
  font-weight: 500;
  color: #6e6e73;
}

body.page-visit .checks legend {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  padding: 0;
}

body.page-visit .field-help,
body.page-visit .mode-wait {
  margin: 0.15rem 0 0.8rem;
  font-size: 0.95rem;
}

body.page-visit label.check {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 400;
  color: #1d1d1f;
}

body.page-visit input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 1.15rem;
  height: 1.15rem;
  min-height: 1.15rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  background: #fff;
}

body.page-visit button.text-link {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0.2rem 0 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d1d1f;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body.page-visit .pay-notice,
body.page-visit .wa-text {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: pre-wrap;
  font: inherit;
  color: #1d1d1f;
  line-height: 1.5;
}

body.page-visit .wa-label {
  margin: 1.2rem 0 0.35rem;
  color: #6e6e73;
  font-size: 0.82rem;
}

body.page-visit .confirm-date {
  margin: 0.35rem 0 0;
  color: #6e6e73;
  font-size: 1rem;
}

body.page-visit .qr {
  width: min(68vw, 220px);
  margin: 1rem 0;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 12px;
}

body.page-visit .qr svg {
  width: 100%;
  height: auto;
  display: block;
}

body.page-visit input[type="file"] {
  border: 0;
  border-radius: 0;
  padding: 0.45rem 0;
  font-weight: 400;
  background: transparent;
}


/* Public pages: white, Tesla-like type and controls. Reception keeps the styles above. */
body.page-login,
body.page-home {
  background: #fff;
  color: #171a20;
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
  font-weight: 400;
  letter-spacing: 0;
}

body.page-login a,
body.page-home a {
  color: #171a20;
}

body.page-login .wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0 20px 64px;
  font-size: 14px;
}

body.page-login .meeting-poster {
  margin-left: -20px;
  margin-right: -20px;
  margin-bottom: 4px;
}

body.page-login .brand {
  margin-top: 28px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #5c5e62;
}

body.page-login .login-title,
body.page-home h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.4px;
  line-height: 1.15;
  color: #171a20;
}

body.page-login .login-title {
  margin: 8px 0 0;
}

body.page-login .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 28px 0 20px;
}

body.page-login label {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  color: #5c5e62;
  margin-bottom: 22px;
}

body.page-login input,
body.page-login select,
body.page-visit input:not([type="checkbox"]):not([type="file"]):not([type="radio"]),
body.page-visit select {
  width: 100%;
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #d0d1d2;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: #171a20;
  font-weight: 400;
  font-size: 14px;
}

body.page-login input:focus,
body.page-login select:focus,
body.page-visit input:not([type="checkbox"]):not([type="file"]):not([type="radio"]):focus,
body.page-visit select:focus {
  outline: none;
  border-bottom-color: #171a20;
}

body.page-login button,
body.page-home .qr-launch {
  width: 100%;
  min-height: 40px;
  height: 40px;
  margin-top: 8px;
  padding: 0 16px;
  border: 3px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
}

body.page-login .visit-entry {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  margin: 16px 0 0;
}

body.page-login a.visit-btn {
  flex: 1 1 0;
  width: auto;
  min-height: 40px;
  height: 40px;
  padding: 0 8px;
  border: 3px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
}

body.page-login a.visit-btn.visit-btn-alt {
  background: #fff;
  color: #171a20;
}

body.page-login .poster,
body.page-visit .poster {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 0 0;
  border-radius: 0;
  background: #fff;
}

body.page-login .meeting-poster,
body.page-visit .meeting-poster {
  margin: 0 0 4px;
}

body.page-login .poster-facts,
body.page-visit .poster-facts {
  margin: 12px 0 0;
}

body.page-login .poster-facts dt,
body.page-visit .poster-facts dt,
body.page-login .muted,
body.page-home .muted,
body.page-home .score-label,
body.page-home .qr-panel p,
body.page-visit .checks legend,
body.page-visit .field-help,
body.page-visit .mode-wait,
body.page-visit .scan-note,
body.page-visit .scan-hint,
body.page-visit .wa-label,
body.page-visit .confirm-date {
  color: #5c5e62;
}

body.page-login .poster-facts dd,
body.page-visit .poster-facts dd,
body.page-visit .pay-notice,
body.page-visit .wa-text,
body.page-home .score-value,
body.page-home .stat dt,
body.page-home .stat dd,
body.page-home .predict,
body.page-home h2,
body.page-home .quest,
body.page-home table.light caption,
body.page-home table.light th,
body.page-home table.light td {
  color: #171a20;
}

body.page-home h1 {
  margin: 18px 0 0;
  font-weight: 500;
}

body.page-home .stat,
body.page-home table.light th,
body.page-home table.light td,
body.page-home table.light thead th {
  border-bottom-color: #e5e6e7;
  border-top-color: #e5e6e7;
}

body.page-home table.light thead th,
body.page-home .stat dt,
body.page-home table.light caption {
  color: #5c5e62;
  font-weight: 500;
}

body.page-home table.light tbody th {
  color: #171a20;
  font-size: 16px;
  font-weight: 500;
}

body.page-home .logout-btn {
  display: flex;
  width: 100%;
  min-height: 40px;
  height: 40px;
  margin-top: 8px;
  padding: 0 16px;
  border: 3px solid #171a20;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

body.page-visit .checks {
  border: 0;
  margin: 8px 0 28px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.page-visit .meet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 8px;
  align-items: start;
}

body.page-visit .meet-grid label.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  color: #171a20;
}

body.page-visit .meet-grid .meet-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

body.page-visit .meet-grid .meet-spec {
  color: #5c5e62;
  font-size: 12px;
  font-weight: 400;
}

@media (min-width: 480px) {
  body.page-visit .meet-grid label.check {
    font-size: 13px;
    gap: 6px;
  }

  body.page-visit .meet-grid .meet-spec {
    font-size: 11px;
  }

  body.page-visit .meet-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin-top: 1px;
  }
}

body.page-visit input[type="file"] {
  border: 1px solid #d0d1d2;
  border-radius: 4px;
  padding: 8px;
  background: #fff;
  font-weight: 400;
}

body.page-visit input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: #171a20;
  border: 1px solid #171a20;
  border-radius: 2px;
  background: #fff;
}

body.page-login .error {
  background: transparent;
  color: #171a20;
  border-radius: 0;
  padding: 12px 0 0;
  margin: 0;
  font-size: 14px;
}

body.page-visit button.text-link {
  display: inline;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 4px 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #171a20;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  box-shadow: none;
}

/* Member home: configurator. Large visual left, summary list right. */
body.page-home .wrap {
  width: min(1120px, 100%);
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 32px 72px;
  font-size: 14px;
}

body.page-home .config {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 400px);
  gap: 36px 56px;
  align-items: start;
}

body.page-home .config-visual {
  position: sticky;
  top: 24px;
  min-width: 0;
}

/* Member home header: small round photo LEFT, name + specialty RIGHT */
body.page-home .identity {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
}

body.page-home .identity .avatar,
body.page-home .identity .avatar.ph {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  max-width: 56px;
  aspect-ratio: 1 / 1;
  margin: 0;
  border: 1px solid rgba(29, 29, 31, 0.18);
  border-radius: 50%;
  background: #f0f0f0;
  object-fit: cover;
  box-shadow: none;
}

body.page-home .identity .avatar.ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #171a20;
}

body.page-home .identity-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.page-home .identity h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.25;
  color: #171a20;
}

body.page-home .identity-specialty {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  color: #5c5e62;
}

body.page-home .identity-name {
  display: block;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.25;
  color: #171a20;
}

body.page-home .identity-name .dir-name-text {
  font: inherit;
  color: inherit;
}

body.page-home .identity-text .dir-role {
  margin: 0;
  font-size: 13px;
}

/* Honor badges BELOW avatar+name block: all text chips */
body.page-home .config-visual > .dir-honors,
body.page-home .identity-text .dir-honors {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

body.page-home .config-visual > .dir-honors .dir-honor,
body.page-home .identity-text .dir-honor {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.3;
  border: 1px solid transparent;
}

body.page-home .config-visual > .dir-honors .dir-honor--green,
body.page-home .identity-text .dir-honor--green {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

body.page-home .config-visual > .dir-honors .dir-honor--mc,
body.page-home .identity-text .dir-honor--mc {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

body.page-home .config-visual > .dir-honors .dir-honor--gold,
body.page-home .identity-text .dir-honor--gold {
  background: #fef9c3;
  color: #a16207;
  border-color: #fde047;
}


/* QR lives in .identity (top-aligned with name); do not hide */
body.page-home .config-visual .qr-launch {
  display: inline-flex;
}

body.page-home .qr-panel {
  text-align: center;
  margin: 0 0 20px;
}

body.page-home .config-summary {
  min-width: 0;
  padding-top: 8px;
}

body.page-home .month-score,
body.page-home .stat,
body.page-home .predict,
body.page-home .quest {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #e8e8e8;
  background: transparent;
  box-shadow: none;
}

body.page-home .week-math,
body.page-home .suggest,
body.page-home .quests {
  margin: 0;
}

body.page-home .quests {
  padding: 0;
  list-style: none;
}

body.page-home .score-label,
body.page-home .stat dt,
body.page-home .predict-label,
body.page-home table.light thead th,
body.page-home table.light caption,
body.page-home h2,
body.page-home .qr-panel p {
  margin: 0;
  color: #5c5e62;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
}

body.page-home .score-value,
body.page-home .stat dd,
body.page-home .predict-value,
body.page-home .sug-text,
body.page-home table.light td {
  margin: 0;
  color: #171a20;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
}

body.page-home table.light {
  width: 100%;
  margin: 8px 0 0;
  border-collapse: collapse;
  background: transparent;
  box-shadow: none;
}

body.page-home table.light caption {
  caption-side: top;
  text-align: left;
  padding: 16px 0 8px;
}

body.page-home table.light th,
body.page-home table.light td {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #e8e8e8;
  background: transparent;
  vertical-align: baseline;
}

body.page-home table.light thead th {
  padding-top: 4px;
  padding-bottom: 8px;
  font-size: 12px;
  text-align: right;
}

body.page-home table.light thead th:first-child,
body.page-home table.light tbody th {
  text-align: left;
  color: #5c5e62;
  font-size: 14px;
  font-weight: 400;
}

body.page-home table.light td {
  text-align: right;
  white-space: nowrap;
}

body.page-home h2 {
  padding-top: 18px;
}

body.page-home .quest {
  padding-left: 0;
}

body.page-home .logout-form {
  margin: 28px 0 0;
}

body.page-home .logout-btn {
  width: 100%;
}

@media (max-width: 800px) {
  body.page-home .wrap {
    padding: 16px 20px 56px;
  }

  body.page-home .config {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  body.page-home .config-visual {
    position: static;
  }
}

/* Login only: Tesla account sign-in. Guest and observer keep the form styles above. */
body.page-login:not(.page-visit) .meeting-poster {
  margin: 0 -20px 0;
}

body.page-login:not(.page-visit) .auth {
  padding-top: 56px;
}

body.page-login:not(.page-visit) .brand {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #5c5e62;
}

body.page-login:not(.page-visit) .login-title {
  margin: 0 0 28px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.2;
  color: #171a20;
}

body.page-login:not(.page-visit) .panel {
  margin: 0;
}

body.page-login:not(.page-visit) label {
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-login:not(.page-visit) input {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d1d2;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 14px;
  font-weight: 400;
}

body.page-login:not(.page-visit) input:focus {
  outline: none;
  border-color: #171a20;
}

body.page-login:not(.page-visit) button[type="submit"] {
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

body.page-login:not(.page-visit) .visit-entry {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin: 28px 0 0;
}

body.page-login:not(.page-visit) a.visit-btn,
body.page-login:not(.page-visit) a.visit-btn.visit-btn-alt {
  flex: none;
  display: inline;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5c5e62;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.page-login:not(.page-visit) .muted {
  margin: 20px 0 0;
  font-size: 14px;
}

/* Guest page: poster sits above the title. Member list is grouped. */
body.page-visit .wrap {
  display: flex;
  flex-direction: column;
  max-width: 760px;
}

body.page-visit #visit-form[hidden],
body.page-visit #obs-start[hidden],
body.page-visit #obs-fail[hidden],
body.page-visit #scan-note[hidden] {
  display: none !important;
}

body.page-visit .confirm-block,
body.page-visit .meeting-poster {
  order: -1;
  width: 100%;
}

body.page-visit .meet-group {
  margin: 22px 0 6px;
}

body.page-visit .meet-group-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  cursor: pointer;
  font-weight: 500;
  color: #171a20;
}

body.page-visit .meet-group-title,
body.page-visit .meet-group h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  color: #171a20;
  line-height: 1.3;
}

body.page-visit .meet-industry-all {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex-shrink: 0;
}


/* Guest yes/no radios: same 16px as meet checkboxes; never text-field width. */
body.page-visit input[type="radio"],
body.page-visit .guest-first-time input.guest-radio,
body.page-visit label.check input[type="radio"] {
  appearance: auto;
  -webkit-appearance: radio;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 16px;
  flex-shrink: 0;
  accent-color: #171a20;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  vertical-align: middle;
}

body.page-visit .guest-first-time {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
}

body.page-visit .guest-first-time legend {
  flex: 0 0 100%;
  width: 100%;
}

body.page-visit .guest-first-time label.check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  width: auto;
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
}

body.page-visit .guest-first-time,
body.page-visit .guest-purposes {
  margin-top: 1.25rem;
}

body.page-visit .guest-first-time legend .req-star,
body.page-visit .guest-purposes legend .req-star {
  margin-left: 2px;
}

body.page-visit .zoom-ack-block {
  margin-top: 28px;
  margin-bottom: 1.75rem;
  width: 100%;
}

body.page-visit .zoom-ack-block .zoom-ack {
  margin-bottom: 0;
}

body.page-visit .proof-field .field-label {
  margin-bottom: 8px;
}

body.page-visit .payment-block {
  margin-top: 28px;
  margin-bottom: 1.75rem;
  width: 100%;
}

body.page-visit .payment-heading {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 500;
  color: #171a20;
}

/* Guest form: two fields per row (名稱|電話, 專業領域|職位). */
body.page-visit .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  align-items: start;
}

body.page-visit .form-row > label {
  min-width: 0;
  margin-bottom: 22px;
}

/* Label text + required * must stay on ONE line (label is flex column). */
body.page-visit .field-label {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
}

body.page-visit .req-star {
  display: inline;
  color: #c62828;
  font-weight: 700;
  margin-left: 2px;
  white-space: nowrap;
}

body.page-visit .req-note {
  margin: 16px 0 0;
  font-size: 0.92rem;
  color: #5c5e62;
  line-height: 1.4;
}

body.page-visit .req-note .req-star {
  margin-left: 0;
  margin-right: 4px;
}

/* Observer traffic-light: custom dropdown (iOS native picker ignores option color) */
body.page-visit .light-picker-field {
  display: block;
  position: relative;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  color: #5c5e62;
  margin-bottom: 22px;
}
body.page-visit .light-picker {
  position: relative;
}
body.page-visit select.observer-light.light-picker-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
html body.page-visit .light-picker-trigger,
html body.page-login .light-picker-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  height: auto;
  margin: 0;
  margin-top: 0;
  padding: 8px 28px 8px 0;
  border: 0;
  border-bottom: 1px solid #d0d1d2;
  border-radius: 0;
  background: transparent;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c5e62' d='M1.4 0.6L6 5.2 10.6 0.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px 8px;
  box-shadow: none;
  color: #171a20;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
html body.page-visit .light-picker-trigger:focus,
html body.page-login .light-picker-trigger:focus {
  outline: none;
  border-bottom-color: #171a20;
}
body.page-visit .light-picker-trigger.is-open {
  border-bottom-color: #171a20;
}
body.page-visit .light-picker-value {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-visit .light-picker-trigger.light-opt-green .light-picker-value,
body.page-visit .light-picker-option.light-opt-green { color: #16a34a; font-weight: 600; }
body.page-visit .light-picker-trigger.light-opt-yellow .light-picker-value,
body.page-visit .light-picker-option.light-opt-yellow { color: #ca8a04; font-weight: 600; }
body.page-visit .light-picker-trigger.light-opt-red .light-picker-value,
body.page-visit .light-picker-option.light-opt-red { color: #dc2626; font-weight: 600; }
body.page-visit .light-picker-trigger.light-opt-black .light-picker-value,
body.page-visit .light-picker-option.light-opt-black { color: #111111; font-weight: 600; }
body.page-visit .light-picker-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d0d1d2;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 240px;
  overflow: auto;
}
body.page-visit .light-picker-option {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.3;
}
body.page-visit .light-picker-option:hover,
body.page-visit .light-picker-option:focus,
body.page-visit .light-picker-option[aria-selected="true"] {
  background: #f4f4f4;
  outline: none;
}


/* Tesla-like type without Universal Sans. Latin: Inter (opsz+wght, no wdth).
   Chinese: static Noto Sans CJK HK. font-stretch normal and variation-settings
   normal keep a width axis off the 62.5 minimum. Wins on specificity. */
html body.page-login,
html body.page-home,
html body.page-visit,
html body.page-login :is(h1, h2, h3, button, input, select, textarea, label, a, .brand, .meet-group, .login-title),
html body.page-home :is(h1, h2, h3, button, input, select, textarea, label, a, .brand, .login-title),
html body.page-visit :is(h1, h2, h3, button, input, select, textarea, label, a, .brand, .meet-group, .login-title),
html body.page-visit .meet-group,
html body.page-visit .meet-group h2,
html body.page-visit .meet-group-title {
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
}

body.page-login,
body.page-home {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

body.page-login .brand {
  font-weight: 500;
  letter-spacing: 0;
}

body.page-login .login-title,
body.page-home h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

body.page-visit .meet-group h2,
body.page-visit .meet-group-title {
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
}

/* Reception desk only. Other pages keep their own rules. */
body.page-desk {
  background: #fff;
  color: #171a20;
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

body.page-desk .wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 20px 0 48px !important; /* no side pad — attendance fills viewport */
  box-sizing: border-box !important;
}

body.page-desk .topbar,
body.page-desk .wrap > section:not(.attendance-block) {
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

body.page-desk .attendance-block > h2,
body.page-desk .attendance-block > .desk-section-head,
body.page-desk .attendance-block > .roll-stats,
body.page-desk .attendance-block > .empty {
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

body.page-desk .topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

body.page-desk .brand {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #5c5e62;
}

body.page-desk h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  color: #171a20;
}

body.page-desk h2 {
  margin: 36px 0 12px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  color: #171a20;
}

body.page-desk h3 {
  margin: 28px 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-desk .logout-form {
  margin: 8px 0 0;
}

body.page-desk button.logout-btn,
body.page-desk button.checkin {
  width: auto;
  flex: none;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

body.page-desk label.search {
  gap: 6px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-desk input[type="search"] {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d1d2;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
}

body.page-desk input[type="search"]:focus {
  outline: none;
  border-color: #171a20;
}

body.page-desk .roster {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: none;
  overflow: visible;
  border-top: 0;
}

body.page-desk .roster li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e5e5;
}

body.page-desk .roster li[hidden] {
  display: none;
}

body.page-desk .roster .who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.page-desk .roster .n,
body.page-desk .roster .kind {
  font-size: 16px;
  font-weight: 500;
  color: #171a20;
}

body.page-desk .roster .spec,
body.page-desk .roster .co,
body.page-desk .roster .kind {
  font-size: 13px;
  font-weight: 400;
  color: #5c5e62;
}

body.page-desk .done {
  color: #5c5e62;
  font-size: 14px;
  white-space: nowrap;
}

body.page-desk .reader {
  background: #f4f4f4;
  border-radius: 4px;
  box-shadow: none;
  min-height: 180px;
}

body.page-desk .error,
body.page-desk .note {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 8px 0 0;
}

body.page-desk .error {
  color: #9f1239;
}

body.page-desk .empty,
body.page-desk .note {
  color: #5c5e62;
}

/* Attendance lists: full-bleed equal 5-col grid — NO table, NO shrink */
body.page-desk .attendance-block,
body.page-desk .attendance,
body.page-desk .attendance-body,
body.page-desk .attendance-row {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Rows: hard 5 equal columns filling full width */
body.page-desk .attendance-row {
  /* compact4 row height — comfortable mobile middle ground */
  display: grid !important;
  grid-template-columns: minmax(2.6rem, 0.5fr) minmax(0, 1.15fr) minmax(0, 1.35fr) minmax(0, 0.95fr) minmax(0, 0.85fr) minmax(0, 0.9fr) 1.4rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  gap: 0 !important;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 !important;
  padding: 5px 0 !important;
  table-layout: auto !important;
}

/* .attendance stacks head + body (NOT 4-col — that left half-width empty space) */
body.page-desk .attendance {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-size: 12px;
  font-weight: 400;
}

body.page-desk .attendance-row > * {
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  box-sizing: border-box !important;
  text-align: left !important;
  padding: 0 2px !important;
  margin: 0 !important;
  font-weight: 400;
  color: #171a20;
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow-wrap: normal;
  word-break: normal;
  overflow: hidden !important;
  text-overflow: ellipsis;
  float: none !important;
  display: block !important;
  min-height: 0 !important;
}

body.page-desk .attendance-head > * {
  font-size: 11px !important;
  font-weight: 400;
  color: #5c5e62;
}

body.page-desk .attendance-head > *:nth-child(3) {
  font-size: 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
}

body.page-desk .attendance-row .specialty {
  font-size: 10px !important;
  font-weight: 400;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  overflow-wrap: normal !important;
  word-break: normal !important;
  line-height: 1.25 !important;
}

body.page-desk .attendance-row .name {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  line-height: 1.25 !important;
}

/* Soft side inset so name isn't flush left / status isn't flush right */
body.page-desk .attendance {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

body.page-desk .attendance-row > *:first-child {
  padding-left: 8px !important;
}

body.page-desk .attendance-row > *:last-child {
  padding-right: 8px !important;
}

body.page-desk .attendance-row .arrival {
  font-variant-numeric: tabular-nums;
  display: flex !important;
  align-items: center !important;
}

body.page-desk .attendance-block {
  margin-top: 28px;
}

body.page-desk .attendance-block > h2 {
  margin-bottom: 4px;
}

body.page-desk .attendance-block > .desk-section-head > h2 {
  margin: 0;
}

body.page-desk .attendance-block > .roll-stats {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  color: #5c5e62;
  font-variant-numeric: tabular-nums;
}

body.page-desk .desk-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 4px;
}

body.page-desk .desk-section-head > h2 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

body.page-desk .desk-section-head .desk-temp-add-btn {
  flex: 0 0 auto;
  margin-left: auto;
}

body.page-desk .desk-temp-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid #171a20;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-sizing: border-box;
  font-family: inherit;
}

body.page-desk .desk-temp-add-btn:active {
  background: #f2f2f3;
}

body.page-desk .desk-temp-add-btn:focus,
body.page-desk .desk-temp-add-btn:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

body.page-desk .attendance-block .empty {
  margin: 0 0 12px;
}

body.page-desk .attendance-row .status,
body.page-desk .attendance-head > *:last-child {
  text-align: left !important;
  padding: 0 2px !important;
  font-size: 12px !important;
  font-weight: 400;
  line-height: 1.25 !important;
  min-height: 0 !important;
}

body.page-desk .attendance-body {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.page-desk .attendance-block {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Kill any legacy table.attendance if a cached page still serves it */
body.page-desk table.attendance {
  display: block !important;
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}
body.page-desk table.attendance thead,
body.page-desk table.attendance tbody,
body.page-desk table.attendance tr {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  width: 100% !important;
  column-gap: 0 !important;
}
body.page-desk table.attendance thead,
body.page-desk table.attendance tbody {
  display: block !important;
}
body.page-desk table.attendance th,
body.page-desk table.attendance td {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  padding: 1px 3px !important;
  text-align: left !important;
  box-sizing: border-box !important;
  font-size: 10px !important;
  font-weight: 400;
  line-height: 1.05;
}

/* Manual status picker — keep equal 4-col, no extra width */
body.page-desk .attendance-row .status {
  position: relative;
}

body.page-desk .attendance-row .status-select {
  -webkit-appearance: none;
  appearance: none;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 12px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235c5e62' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 0 center !important;
  background-size: 7px 4px !important;
  box-shadow: none !important;
  color: #171a20 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 24px !important;
  text-align: left !important;
  cursor: pointer;
  min-height: 0 !important;
  height: 24px !important;
  max-height: 28px !important;
}

body.page-desk .attendance-row .status-select:focus {
  outline: 1px solid #171a20;
  outline-offset: 2px;
}

body.page-desk .attendance-row .arrival-edit {
  position: relative;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: 24px !important;
  max-height: 28px !important;
  line-height: 24px !important;
  box-sizing: border-box !important;
  padding: 0 !important;
}

body.page-desk .attendance-row .arrival-ampm {
  display: flex !important;
  align-items: center !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 24px !important;
  height: 24px !important;
  max-height: 28px !important;
  color: #171a20 !important;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}

body.page-desk .attendance-row .arrival-input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  caret-color: transparent;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  cursor: pointer;
  min-height: 0 !important;
  max-height: 28px !important;
  opacity: 0;
  z-index: 1;
}

body.page-desk .attendance-row .arrival-edit:focus-within {
  outline: 1px solid #171a20;
  outline-offset: 2px;
}

body.page-desk .attendance-row .arrival-input:focus {
  outline: none;
}

body.page-desk .attendance-row .arrival-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  position: absolute;
  left: 0;
  top: 0;
}

body.page-desk .room-list,
body.page-desk .seats {
  margin: 0;
  padding: 0;
}

body.page-desk .room-list {
  list-style: none;
}

body.page-desk .room-list li,
body.page-desk .seats p {
  margin: 0 0 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e5e5;
}

body.page-desk .room-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
}

body.page-leave fieldset {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
}

body.page-leave legend {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-leave label.choice {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #171a20;
}

body.page-leave input[type="radio"] {
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* —— Public site: NBA-inspired sticky black top bar (visual only; no NBA marks) —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* visible so absolute burger menu is not clipped (overflow-x:hidden forces overflow-y:auto) */
  overflow: visible;
  background: linear-gradient(45deg, #010814 0%, #061428 48%, #0a1c38 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  /* Two rows: primary (burger|logo|lang) + links — English labels no longer hide zh/en */
  padding: 0;
  min-height: 0;
  overflow: visible;
  position: relative;
}

.site-nav-row-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0 16px 0 0.25rem;
  min-height: 48px;
  position: relative;
}

.site-nav-row-primary .site-nav-brand {
  flex: 1 1 auto;
  justify-content: flex-start;
  margin-inline-start: 0.15rem;
}

.site-nav-brand {
  flex: 0 0 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 0;
}

.site-nav-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: min(120px, 32vw);
  object-fit: contain;
  object-position: center center;
}

.site-nav-brand:hover,
.site-nav-brand:focus {
  color: #fff;
  opacity: 0.9;
}

.site-nav-links,
.site-nav-row-links {
  display: flex;
  align-items: stretch;
  justify-content: space-evenly;
  gap: 0.35rem;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 10px;
  min-height: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-nav-links::-webkit-scrollbar {
  display: none;
}

.site-nav-links a {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding-block: 0.7rem;
  padding-inline: 0.35rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  overflow: visible;
  text-overflow: unset;
}

.site-nav-links a:last-child {
  padding-inline-end: 0.35rem;
}

.site-nav-links a:hover,
.site-nav-links a:focus {
  color: #fff;
}

.site-nav-links a.is-active {
  color: #fff;
  border-bottom-color: #fff;
}

/* Must beat body.page-login button { width:100% } or burger eats the bar. */
body.page-login .site-nav-menu-btn,
body.page-visit .site-nav-menu-btn,
body.page-public .site-nav-menu-btn,
.site-nav-menu-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
}

.site-nav-menu-btn:hover,
.site-nav-menu-btn:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.site-nav-menu-btn:focus-visible {
  box-shadow: 0 0 0 2px #fff;
}

.site-nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
  height: 14px;
}

.site-nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: #fff;
}

.site-nav-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0.25rem;
  z-index: 1100;
  min-width: 11rem;
  padding: 0.35rem;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.site-nav-menu[hidden] {
  display: none !important;
}

.site-nav-menu.is-open {
  display: block !important;
}

.site-nav-menu a {
  display: block;
  padding: 0.7rem 0.85rem;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 7px;
  white-space: nowrap;
}

.site-nav-menu a:hover,
.site-nav-menu a:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

/* Language switcher — plain two-letter codes, no border/box/pill */
.lang-switch {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  margin-inline-start: auto;
  padding: 0;
  z-index: 1101;
  align-self: center;
  min-width: 0;
  max-width: none;
  line-height: 1.2;
  transform: none;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  box-sizing: border-box;
  width: auto !important;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 0;
  margin: 0;
  padding-block: 0.85rem;
  padding-inline: 0.15rem;
  border: 0;
  border-bottom: 2px solid transparent; /* match nav link underline box */
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  text-transform: lowercase;
  transform: none;
}

.lang-switch-btn:hover,
.lang-switch-btn:focus {
  background: transparent;
  opacity: 0.85;
  outline: none;
}

.lang-switch-btn:focus-visible {
  outline: 1px dotted #fff;
  outline-offset: 2px;
  box-shadow: none;
}

.lang-switch-current {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  font-variant-caps: normal;
  /* Align glyph box centerY with nav links / hamburger / logo (was 3.5px → +2.5px low) */
  position: relative;
  top: 1px;
  line-height: inherit;
  transform: none;
}

.lang-switch-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid rgba(255, 255, 255, 0.85);
  margin: 0;
  /* Match zh center nudge so caret travels with the label */
  position: relative;
  top: 1px;
  align-self: center;
  transform: none;
}

.lang-switch.is-open .lang-switch-caret {
  transform: rotate(180deg);
}

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 1200;
  min-width: 7.5rem;
  padding: 0.2rem 0;
  background: #111;
  border: 0;
  border-radius: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.lang-switch-menu[hidden] {
  display: none !important;
}

.lang-switch-option {
  display: block;
  width: 100% !important;
  min-width: 0;
  max-width: none;
  height: auto !important;
  min-height: 0;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}

.lang-switch-option:hover,
.lang-switch-option:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.lang-switch-option.is-active,
.lang-switch-option[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

/* Beat page-login / page-public full-width button rules (padding/height/border too) */
body.page-login .lang-switch-btn,
body.page-visit .lang-switch-btn,
body.page-public .lang-switch-btn,
body.page-admin .lang-switch-btn {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding-block: 0.85rem !important;
  padding-inline: 0.15rem !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  line-height: 1.2 !important;
  transform: none !important;
}

/* Kill page-login button:focus solid outline box on lang trigger */
body.page-login .lang-switch-btn:focus,
body.page-login .lang-switch-btn:focus-visible,
body.page-home .lang-switch-btn:focus,
body.page-home .lang-switch-btn:focus-visible,
body.page-visit .lang-switch-btn:focus,
body.page-visit .lang-switch-btn:focus-visible,
body.page-public .lang-switch-btn:focus,
body.page-public .lang-switch-btn:focus-visible,
html body.page-login .lang-switch-btn:focus,
html body.page-login.page-public .lang-switch-btn:focus {
  outline: none !important;
  outline-offset: 0 !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
html body.page-login .lang-switch-btn:focus-visible,
html body.page-public .lang-switch-btn:focus-visible {
  outline: 1px dotted #fff !important;
  outline-offset: 2px !important;
}

body.page-login .lang-switch-option,
body.page-visit .lang-switch-option,
body.page-public .lang-switch-option,
body.page-admin .lang-switch-option {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0.45rem 0.75rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  text-align: left !important;
  text-transform: none !important;
}

@media (max-width: 640px) {
  .site-nav-row-primary {
    min-height: 44px;
    padding: 0 12px 0 0.15rem;
    gap: 0.35rem;
  }
  .lang-switch {
    margin: 0;
    margin-inline-start: auto;
    padding: 0;
    flex: 0 0 auto;
    align-self: center;
    line-height: 1.15;
    transform: none;
  }
  .lang-switch-btn,
  body.page-login .lang-switch-btn,
  body.page-visit .lang-switch-btn,
  body.page-public .lang-switch-btn {
    height: auto !important;
    min-height: 0 !important;
    padding-block: 0.7rem !important;
    padding-inline: 0.1rem !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: normal !important;
    gap: 0.1rem;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .lang-switch-current {
    max-width: none;
    line-height: 1.15;
    position: relative;
    top: 1px;
    transform: none;
  }
  .site-nav-links,
  .site-nav-row-links {
    display: flex;
    justify-content: space-evenly;
    gap: 0.2rem;
    padding: 0 6px;
    min-height: 36px;
  }
  .site-nav-links a {
    flex: 1 1 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    padding-block: 0.55rem;
    padding-inline: 0.2rem;
  }
  .site-nav-links a:last-of-type {
    padding-inline-end: 0.2rem;
  }
}


.poster-facts dd .fact-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 13px;
  font-weight: 500;
  color: #5c5e62;
}

.poster-facts dd .presenter-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.poster-facts dd .presenter-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.35;
}

.poster-facts dd .presenter-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #171a20;
}

.poster-facts dd .presenter-detail {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #5c5e62;
  line-height: 1.4;
  white-space: pre-line;
}

body.page-public {
  background: #fff;
  color: #171a20;
}

body.page-public .public-wrap {
  width: min(920px, 100%);
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

body.page-public .public-hero h1,
body.page-public .public-directory h1,
body.page-public .visit-chooser h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #171a20;
}

body.page-public .public-hero .meeting-poster {
  margin: 0;
}

body.page-public .public-hero .poster {
  width: 100%;
  max-width: 640px;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #f3f3f3;
}

/* Homepage + visit/guest/observer: same poster-below facts layout/typography */
body.page-public .public-hero .poster-facts,
body.page-visit .poster-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0 0;
  padding: 0;
}

body.page-public .public-hero .poster-facts div,
body.page-visit .poster-facts div {
  display: block;
  margin: 0;
}

body.page-public .public-hero .poster-facts dt,
body.page-visit .poster-facts dt {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-public .public-hero .poster-facts dd,
body.page-visit .poster-facts dd {
  margin: 0.2rem 0 0;
  font-size: 16px;
  font-weight: 600;
  color: #171a20;
  line-height: 1.35;
}



body.page-public .public-hero .home-visit-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  margin: 1.5rem 0 0;
  width: 100%;
  max-width: 640px;
}

body.page-public .public-hero .home-visit-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 12px;
  border: 3px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease;
}

body.page-public .public-hero .home-visit-btn:hover,
body.page-public .public-hero .home-visit-btn:focus {
  background: #393c41;
  color: #fff;
  outline: none;
}


body.page-public .public-empty {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  background: #f5f5f5;
  border-radius: 10px;
  color: #5c5e62;
}

body.page-public .public-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e8e8e8;
  font-size: 13px;
  color: #8a8d91;
}

body.page-public .public-footer a {
  color: #8a8d91;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body.page-public .public-dir-count,
body.page-admin .public-dir-count {
  margin: -0.35rem 0 1.5rem;
  font-size: 14px;
}

body.page-public .dir-group,
body.page-admin .dir-group {
  margin: 0 0 1.75rem;
}

body.page-public .dir-group h2,
body.page-admin .dir-group h2 {
  margin: 0 0 0.75rem;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: #171a20;
  border-bottom: 1px solid #ececec;
  padding-bottom: 0.4rem;
}

/* Industry jump chips under 會員名單 title */
body.page-public .dir-industry-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  padding: 0;
}

body.page-public a.dir-industry-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.22rem 0.55rem;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
  color: #171a20;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.page-public a.dir-industry-chip:hover,
body.page-public a.dir-industry-chip:focus-visible {
  background: #171a20;
  border-color: #171a20;
  color: #fff;
  outline: none;
}

body.page-public a.dir-industry-chip:active {
  background: #c41230;
  border-color: #c41230;
  color: #fff;
}

body.page-public .dir-group {
  scroll-margin-top: 68px;
}

body.page-public .dir-grid,
body.page-admin .dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.page-public .dir-card,
body.page-admin .dir-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}

body.page-public .dir-card--link {
  padding: 0;
}

body.page-public a.dir-card-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem;
  min-width: 0;
  width: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-public .dir-card--link:hover,
body.page-public .dir-card--link:focus-within {
  border-color: #c8c8c8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

body.page-public a.dir-card-link:hover .dir-name,
body.page-public a.dir-card-link:focus-visible .dir-name {
  color: #c41230;
}

body.page-public a.dir-card-link:focus-visible {
  outline: 2px solid #c41230;
  outline-offset: 2px;
}

body.page-public .dir-card .avatar,
body.page-public .dir-card .avatar.ph,
body.page-admin .dir-card .avatar,
body.page-admin .dir-card .avatar.ph {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
  color: #171a20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  border: 0;
}

body.page-public .dir-meta,
body.page-admin .dir-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center; /* vertically center badges with name block */
  gap: 0.35rem 0.45rem;
  container-type: inline-size;
  container-name: dirmeta;
}

body.page-public .dir-meta-main,
body.page-admin .dir-meta-main {
  min-width: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  overflow: hidden;
}

body.page-public .dir-name,
body.page-admin .dir-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #171a20;
  line-height: 1.25;
  word-break: break-word;
  max-width: 100%;
}

body.page-public .dir-spec,
body.page-admin .dir-spec {
  margin: 0.15rem 0 0;
  font-size: 12px;
  color: #5c5e62;
  line-height: 1.35;
  word-break: break-word;
}

body.page-public .dir-role,
body.page-admin .dir-role,
body.page-home .dir-role {
  margin: 0.15rem 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #c41230;
  line-height: 1.35;
  word-break: break-word;
}

body.page-public .dir-name-text,
body.page-admin .dir-name-text,
body.page-home .dir-name-text {
  font: inherit;
  color: inherit;
}

/* Honor text chips: FULL labels, ONE horizontal row on RIGHT — shrink hard, never stack */
body.page-public .dir-honors,
body.page-admin .dir-honors {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  font-weight: 600;
  line-height: 1;
  flex: 0 1 auto;
  margin-left: auto;
  max-width: 64%;
  min-width: 0;
  overflow: hidden;
}

body.page-public .dir-honors--primary,
body.page-admin .dir-honors--primary,
body.page-public .dir-honors--extra,
body.page-admin .dir-honors--extra {
  /* legacy split classes unused; keep harmless */
  display: contents;
}

body.page-home .dir-honors {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  font-weight: 600;
  line-height: 1.2;
}

body.page-public .dir-honor,
body.page-admin .dir-honor {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  padding: 1px 3px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.2;
  border: 1px solid transparent;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
}

body.page-home .dir-honor {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* public/admin: pill chips (match home identity-text chips) */
body.page-public .dir-honor--green,
body.page-admin .dir-honor--green {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

body.page-public .dir-honor--mc,
body.page-admin .dir-honor--mc {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

body.page-public .dir-honor--gold,
body.page-admin .dir-honor--gold {
  background: #fef9c3;
  color: #a16207;
  border-color: #fde047;
}

/* home fallback text colors (identity-text chips override with backgrounds) */
body.page-home .dir-honor--green {
  color: #16a34a;
}

body.page-home .dir-honor--mc {
  color: #b91c1c;
}

body.page-home .dir-honor--gold {
  color: #ca8a04;
}

body.page-admin label.admin-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

body.page-admin label.admin-check input[type="checkbox"] {
  width: auto;
  margin: 0;
}


body.page-public .public-hero .home-visit-cards {
  margin: 1.5rem 0 0;
  max-width: 640px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

body.page-public .public-hero .home-visit-cards .visit-chooser-card {
  min-width: 0;
  padding: 1rem 0.85rem;
}

body.page-public .public-hero .home-visit-cards .visit-chooser-label {
  font-size: 15px;
}

body.page-public .public-hero .home-visit-cards .visit-chooser-hint {
  font-size: 12px;
  line-height: 1.35;
}

body.page-public .visit-chooser-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

body.page-public .visit-chooser-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.2rem;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: #171a20;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-public .visit-chooser-card:hover,
body.page-public .visit-chooser-card:focus {
  border-color: #171a20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  color: #171a20;
}

body.page-public .visit-chooser-label {
  font-size: 17px;
  font-weight: 600;
}

body.page-public .visit-chooser-hint {
  font-size: 13px;
  color: #5c5e62;
}

body.page-login.page-public .staff-quiet {
  margin-top: 1.5rem;
}

body.page-login.page-public .visit-entry {
  display: none;
}

html body.page-public :is(h1, h2, h3, button, input, select, textarea, label, a, .brand, .login-title, .site-nav),
html body.page-public .site-nav :is(a, .site-nav-brand, .site-nav-menu-btn) {
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
}

@media (max-width: 640px) {
  .site-nav-inner {
    min-height: 0;
    padding: 0;
    gap: 0;
  }

  .site-nav-brand {
    font-size: 10px;
    margin: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  .site-nav-logo {
    height: 28px;
    max-width: min(96px, 25vw);
  }

  .site-nav-menu-btn {
    flex: 0 0 auto;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 36px;
    min-height: 36px;
  }

  .lang-switch {
    flex: 0 0 auto;
    margin: 0;
    margin-inline-start: auto;
    padding: 0;
    align-self: center;
    line-height: 1.15;
    transform: none;
  }
}


body.page-desk .export-block {
  margin: 20px 0 28px;
  padding: 16px 0 0;
  border-top: 1px solid #e3e4e6;
  text-align: center;
}

body.page-desk a.export-pdf-btn,
body.page-desk button.export-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

body.page-desk a.export-pdf-btn:active,
body.page-desk button.export-pdf-btn:active {
  opacity: 0.88;
}

body.page-desk .export-pdf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

body.page-desk a.export-pdf-btn--secondary {
  background: #fff;
  color: #171a20;
  border: 1.5px solid #171a20;
}

body.page-desk button.export-pdf-btn--secondary,
body.page-desk button.export-pdf-btn--force-sync {
  background: #fff;
  color: #5c5e62;
  border: 1px solid #c5c7cb;
  font-weight: 500;
  font-size: 13px;
  min-height: 36px;
  padding: 0 14px;
}

body.page-desk a.export-pdf-btn--secondary:active {
  opacity: 0.88;
}



body.page-desk button.export-pdf-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
}
body.page-desk button.export-pdf-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

body.page-desk .export-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #5c5e62;
}


/* Reception desk: scanner collapsed until staff opens it */
body.page-desk .scan-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0.4rem 0 0.6rem;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}
body.page-desk .scan-toggle-btn:active {
  opacity: 0.88;
}
body.page-desk .scan-panel[hidden] {
  display: none !important;
}
body.page-desk .scan-panel {
  margin-top: 0.35rem;
}


/* All attendance sections: 6 cols — 座位 · 名稱 · 專業領域 · 到場 · 狀態 · 電話 */
body.page-desk .attendance-block[data-section="members"] .attendance-row,
body.page-desk .attendance-block[data-section="guests"] .attendance-row,
body.page-desk .attendance-block[data-section="observers"] .attendance-row,
body.page-desk .attendance-block[data-section="substitutes"] .attendance-row {
  grid-template-columns: minmax(2.6rem, 0.5fr) minmax(0, 1.15fr) minmax(0, 1.35fr) minmax(0, 0.95fr) minmax(0, 0.85fr) minmax(0, 0.9fr) 1.4rem !important;
}

body.page-desk .attendance-row .seat-id {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
}

body.page-desk .attendance-row .phone {
  min-width: 0;
}
body.page-desk .attendance-row .phone-action {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #000 !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  height: 24px !important;
  min-height: 0 !important;
  max-height: 28px !important;
  text-align: left !important;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
}
body.page-desk .attendance-row .phone-action:active {
  opacity: 0.75;
}

body.page-desk .attendance-row .desk-card-cell,
body.page-desk .attendance-head .desk-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 4px !important;
  overflow: visible !important;
  min-width: 1.4rem !important;
  max-width: 1.4rem !important;
}
body.page-desk .attendance-row .desk-card-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 0 !important;
  max-height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5c5e62 !important;
  cursor: pointer;
  line-height: 0 !important;
  flex-shrink: 0;
}
body.page-desk .attendance-row .desk-card-btn:hover,
body.page-desk .attendance-row .desk-card-btn:focus-visible {
  color: #0c6e56 !important;
  background: rgba(12, 110, 86, 0.08) !important;
  outline: none;
}
body.page-desk .attendance-row .desk-card-btn:active {
  opacity: 0.8;
}
body.page-desk .attendance-row .desk-card-icon {
  display: block;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

body.page-desk .desk-card-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}
body.page-desk .desk-card-modal[hidden] {
  display: none !important;
}
body.page-desk .desk-card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 26, 32, 0.5);
}
body.page-desk .desk-card-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 420px);
  height: min(92vh, 720px);
  max-height: 92vh;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
body.page-desk .desk-card-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid #e5e5e5;
  background: #f7f8f9;
}
body.page-desk .desk-card-modal-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #171a20;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.page-desk .desk-card-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #171a20;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
body.page-desk .desk-card-modal-close:hover {
  background: rgba(23, 26, 32, 0.08);
}
body.page-desk .desk-card-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #fff;
}


/* Desk scan success modal — holds camera paused until dismissed */
body.page-desk .desk-scan-done-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
body.page-desk .desk-scan-done-modal[hidden] {
  display: none !important;
}
body.page-desk .desk-scan-done-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 28, 0.55);
}
body.page-desk .desk-scan-done-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 22rem);
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(4, 12, 28, 0.28);
  text-align: center;
}
body.page-desk .desk-scan-done-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5c5e62;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}
body.page-desk .desk-scan-done-close:hover {
  background: rgba(6, 20, 40, 0.08);
  color: #061428;
}
body.page-desk .desk-scan-done-title {
  margin: 0.15rem 0 0.55rem;
  font-size: 1.45rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  color: #0a7a32;
}
body.page-desk .desk-scan-done-name {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #061428;
}
body.page-desk .desk-scan-done-detail {
  margin: 0;
  font-size: 0.92rem;
  color: #5c5e62;
}
body.page-desk.desk-scan-done-open {
  overflow: hidden;
}

body.page-desk.desk-card-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  /* Keep overlay look on phones — do NOT go edge-to-edge like a new page */
  body.page-desk .desk-card-modal {
    padding: 10px;
    align-items: center;
  }
  body.page-desk .desk-card-modal-panel {
    width: min(100%, 420px);
    height: min(90vh, 720px);
    max-height: 90vh;
    border-radius: 12px;
  }
  body.page-desk .attendance-row .desk-card-btn {
    width: 24px !important;
    height: 24px !important;
    max-height: 24px !important;
  }
}


body.page-desk .phone-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(23, 26, 32, 0.45);
  box-sizing: border-box;
}
body.page-desk .phone-sheet[hidden] {
  display: none !important;
}
body.page-desk .phone-sheet-card {
  width: min(100%, 360px);
  padding: 16px;
  border-radius: 12px 12px 10px 10px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
body.page-desk .phone-sheet-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #5c5e62;
}
body.page-desk .phone-sheet-num {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #171a20;
  word-break: break-all;
}
body.page-desk .phone-sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 0 14px;
  border-radius: 8px;
  background: #171a20;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
body.page-desk .phone-sheet-wa {
  background: #128c7e;
}
body.page-desk .phone-sheet-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 4px 0 0;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #eef0f3;
  color: #171a20;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Admin desk + admin login: Tesla-like match to public / reception / visit */
html body.page-admin :is(h1, h2, h3, button, input, select, textarea, label, a, .brand, .login-title, .site-nav),
html body.page-admin .site-nav :is(a, .site-nav-brand, .site-nav-menu-btn, button),
html body.page-admin-login :is(h1, h2, h3, button, input, select, textarea, label, a, .brand, .login-title, .site-nav),
html body.page-admin-login .site-nav :is(a, .site-nav-brand, .site-nav-menu-btn) {
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
}

body.page-admin {
  background: #fff;
  color: #171a20;
  font-family: "BNI Latin", "BNI HK Gothic", Inter, "Noto Sans CJK HK", sans-serif;
  font-stretch: normal;
  font-synthesis: none;
  font-variation-settings: normal;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

body.page-admin a {
  color: #171a20;
}

body.page-admin .admin-wrap {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

body.page-admin .admin-hero {
  margin: 0 0 1.5rem;
}

body.page-admin .admin-hero .brand {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #5c5e62;
}

body.page-admin .admin-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #171a20;
}

body.page-admin .admin-lead {
  margin: 0.5rem 0 0;
  font-size: 14px;
  color: #5c5e62;
}

body.page-admin h2 {
  margin: 0 0 0.75rem;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  color: #171a20;
}

body.page-admin h3 {
  margin: 0 0 1rem;
  font-size: 16px;
  font-weight: 500;
  color: #171a20;
}

body.page-admin .muted {
  color: #5c5e62;
  font-size: 14px;
}

body.page-admin .admin-panel {
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  box-shadow: none;
  padding: 1.25rem 1.2rem;
  margin: 0 0 1.25rem;
}

body.page-admin .admin-panel label,
body.page-admin .admin-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-admin .admin-panel input:not([type="file"]),
body.page-admin .admin-search input {
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d1d2;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
}

body.page-admin .admin-panel input:not([type="file"]):focus,
body.page-admin .admin-search input:focus {
  outline: none;
  border-color: #171a20;
}

body.page-admin .admin-panel input[type="file"] {
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #171a20;
}

body.page-admin .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

body.page-admin .poster-update-actions {
  margin: 0 0 14px;
}


body.page-admin button,
body.page-admin .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 40px;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

body.page-admin button.ghost,
body.page-admin .btn.ghost {
  background: #fff;
  color: #171a20;
  border: 1px solid #d0d1d2;
}

body.page-admin button.danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #f1c0c0;
}

body.page-admin button:focus,
body.page-admin .btn:focus,
body.page-admin input:focus {
  outline: none;
}

body.page-admin button:focus-visible,
body.page-admin .btn:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #171a20;
}

body.page-admin .count-row {
  margin: 0.5rem 0 0.75rem;
}

body.page-admin .count {
  margin: 0;
  font-size: 14px;
  color: #5c5e62;
}

body.page-admin .count b {
  color: #171a20;
  font-weight: 600;
}

body.page-admin .admin-search {
  max-width: 420px;
  margin-bottom: 1rem;
}

body.page-admin .admin-member-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

body.page-admin .member {
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #fff;
  padding: 1.15rem 1.1rem;
  margin: 0;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-admin .member:hover {
  border-color: #171a20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

body.page-admin .member h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #171a20;
}

body.page-admin .member p {
  margin: 0.2rem 0;
  font-size: 14px;
  color: #171a20;
}

body.page-admin .member .role {
  color: #171a20;
  font-weight: 500;
}

body.page-admin .member .spec,
body.page-admin .member .phone {
  color: #5c5e62;
  font-size: 13px;
}

body.page-admin .member .actions {
  margin-top: 0.85rem;
}

body.page-admin .member-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

body.page-admin .hint,
body.page-admin .error,
body.page-admin .note {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 14px;
  color: #5c5e62;
  box-shadow: none;
}

body.page-admin .error {
  background: #fff1f2;
  color: #b91c1c;
}

body.page-admin .poster-admin-preview {
  margin: 0 0 1rem;
}

body.page-admin .poster-admin-preview .meeting-poster {
  margin: 0;
}

body.page-admin .poster-admin-preview .poster {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 8px;
  background: #fff;
}

body.page-admin .poster-admin-preview .poster-facts {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

body.page-admin .poster-admin-preview .poster-facts dt {
  font-size: 12px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-admin .poster-admin-preview .poster-facts dd {
  margin: 0.15rem 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #171a20;
}

body.page-admin .admin-member-list {
  display: block;
}

body.page-admin .admin-dir-card {
  flex-wrap: wrap;
  align-items: flex-start;
}

body.page-admin .admin-dir-actions {
  flex: 1 1 100%;
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

body.page-admin .admin-presenters {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  background: #fafafa;
}

body.page-admin .admin-presenters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 14px;
  font-weight: 600;
  color: #171a20;
}

body.page-admin .admin-presenter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid #ececec;
}

body.page-admin .admin-presenter-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

body.page-admin .poster-admin-preview .poster-facts dd .fact-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 13px;
  font-weight: 500;
  color: #5c5e62;
}

body.page-admin .poster-admin-preview .presenter-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

body.page-admin .poster-admin-preview .presenter-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #171a20;
}

body.page-admin .poster-admin-preview .presenter-detail {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #5c5e62;
  white-space: pre-line;
}

/* Logout control inside deep-navy site-nav burger menu */
.site-nav-logout {
  margin: 0;
  padding: 0;
}

.site-nav-logout button {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.site-nav-logout button:hover,
.site-nav-logout button:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

body.page-admin .site-nav-menu-btn,
body.page-admin-login .site-nav-menu-btn {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

/* Admin: site-nav links must stay light on black bar/menu.
   body.page-admin a { color:#171a20 } otherwise makes burger menu illegible. */
body.page-admin .site-nav a,
body.page-admin .site-nav-brand,
body.page-admin .site-nav-menu a,
body.page-admin-login .site-nav a,
body.page-admin-login .site-nav-brand,
body.page-admin-login .site-nav-menu a {
  color: #fff;
}

body.page-admin .site-nav-links a,
body.page-admin-login .site-nav-links a {
  color: rgba(255, 255, 255, 0.78);
}

body.page-admin .site-nav-links a:hover,
body.page-admin .site-nav-links a:focus,
body.page-admin .site-nav-links a.is-active,
body.page-admin .site-nav-brand:hover,
body.page-admin .site-nav-brand:focus,
body.page-admin .site-nav-menu a:hover,
body.page-admin .site-nav-menu a:focus,
body.page-admin-login .site-nav-links a:hover,
body.page-admin-login .site-nav-links a:focus,
body.page-admin-login .site-nav-links a.is-active,
body.page-admin-login .site-nav-brand:hover,
body.page-admin-login .site-nav-brand:focus,
body.page-admin-login .site-nav-menu a:hover,
body.page-admin-login .site-nav-menu a:focus {
  color: #fff;
}

body.page-admin .site-nav-logout button,
body.page-admin-login .site-nav-logout button {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}

body.page-admin .site-nav-logout button:hover,
body.page-admin .site-nav-logout button:focus,
body.page-admin-login .site-nav-logout button:hover,
body.page-admin-login .site-nav-logout button:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

body.page-admin-login .auth {
  padding-top: 56px;
}


/* Admin: MC stars + gold side-by-side, centered, short select */
body.page-admin .admin-honors-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin: 0.35rem 0 0.15rem;
  width: 100%;
}
body.page-admin .admin-honors-row > label {
  flex: 0 0 auto;
  margin: 0;
  min-width: 0;
  width: auto;
}
body.page-admin .admin-honors-row > label.admin-check {
  flex: 0 0 auto;
  flex-direction: row;
  padding-bottom: 0.55rem;
  white-space: nowrap;
}
body.page-admin .admin-honors-row select[name="masterConnectorStars"],
body.page-admin .admin-honors-row #member-mc-stars {
  width: 5.75rem;
  min-width: 5.75rem;
  max-width: 5.75rem;
  box-sizing: border-box;
}

/* Admin meeting: taller speaker 詳情 */
body.page-admin .admin-presenter-row label.admin-presenter-detail {
  grid-column: 1 / -1;
}
body.page-admin .admin-presenter-row textarea[name="presenterDetail"] {
  display: block;
  width: 100%;
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.45;
  font: inherit;
  padding: 0.55rem 0.65rem;
  box-sizing: border-box;
}


/* Member home: site-nav must stay light on deep-blue bar.
   body.page-home a { color:#1d1d1f } otherwise paints nav links black. */
html body.page-home .site-nav a,
html body.page-home .site-nav-brand,
html body.page-home .site-nav-menu a,
html body.page-home .site-nav-menu-btn {
  color: #fff !important;
}

html body.page-home .site-nav-links a {
  color: rgba(255, 255, 255, 0.78) !important;
}

html body.page-home .site-nav-burger span {
  background: #fff !important;
}

html body.page-home .site-nav-links a:hover,
html body.page-home .site-nav-links a:focus,
html body.page-home .site-nav-links a.is-active,
html body.page-home .site-nav-brand:hover,
html body.page-home .site-nav-brand:focus,
html body.page-home .site-nav-menu a:hover,
html body.page-home .site-nav-menu a:focus {
  color: #fff !important;
}

/* Keep burger compact (page-home focus styles only; still pin size). */
body.page-home .site-nav-menu-btn {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
}

/* Login: site-nav links must stay light on black bar/menu.
   body.page-login a { color:#171a20 } otherwise makes burger menu illegible.
   Use html body + !important so Tesla link color never wins over the black bar. */
html body.page-login .site-nav a,
html body.page-login .site-nav-brand,
html body.page-login .site-nav-menu a,
html body.page-login.page-public .site-nav a,
html body.page-login.page-public .site-nav-brand,
html body.page-login.page-public .site-nav-menu a,
html body.page-login .site-nav-menu-btn {
  color: #fff !important;
}

html body.page-login .site-nav-links a,
html body.page-login.page-public .site-nav-links a {
  color: rgba(255, 255, 255, 0.78) !important;
}

html body.page-login .site-nav-burger span {
  background: #fff !important;
}

html body.page-login .site-nav-links a:hover,
html body.page-login .site-nav-links a:focus,
html body.page-login .site-nav-links a.is-active,
html body.page-login .site-nav-brand:hover,
html body.page-login .site-nav-brand:focus,
html body.page-login .site-nav-menu a:hover,
html body.page-login .site-nav-menu a:focus,
html body.page-login.page-public .site-nav-links a:hover,
html body.page-login.page-public .site-nav-links a:focus,
html body.page-login.page-public .site-nav-links a.is-active,
html body.page-login.page-public .site-nav-brand:hover,
html body.page-login.page-public .site-nav-brand:focus,
html body.page-login.page-public .site-nav-menu a:hover,
html body.page-login.page-public .site-nav-menu a:focus {
  color: #fff !important;
}

/* Member home identity size lock (beats body.page-home h1 { font-size:40px }) */
html body.page-home .identity h1,
html body.page-home .identity-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.25;
}
html body.page-home .identity .avatar,
html body.page-home .identity .avatar.ph,
html body.page-home .home-topbar .avatar,
html body.page-home .home-topbar .avatar.ph {
  width: 56px;
  height: 56px;
  max-width: 56px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}

/* Member home: topbar 3-col (nba25) — detailed rules later in file */
html body.page-home .home-topbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  margin: 0 0 12px;
  min-height: 36px;
}

/* QR check-in: max-size modal QR (qrmax) */
html body.page-home .qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

html body.page-home .qr-modal[hidden] {
  display: none !important;
}

html body.page-home .qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

html body.page-home .qr-modal-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(98vw, calc(100dvh - 16px), 720px);
  max-height: calc(100dvh - 16px);
  padding: 40px 10px 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  text-align: center;
  box-sizing: border-box;
}

html body.page-home .qr-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171a20;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

html body.page-home .qr-modal-close:hover,
html body.page-home .qr-modal-close:focus {
  background: rgba(0, 0, 0, 0.06);
}

html body.page-home .qr-modal-card .qr {
  width: min(94vw, calc(100dvh - 120px), 680px);
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 12px;
  box-sizing: border-box;
}

html body.page-home .qr-modal-card .qr svg {
  width: 100%;
  height: auto;
  display: block;
}

html body.page-home .qr-modal-card p {
  margin: 0;
  color: #5c5e62;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  flex-shrink: 0;
}

html body.qr-modal-open {
  overflow: hidden;
}

/* Identity: circular avatar LEFT, name/specialty/role RIGHT */
html body.page-home .identity {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
}

html body.page-home .identity-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html body.page-home .config-visual > .dir-honors {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}


/* Admin: collapsible 本週會議 + 新增會員 + in-card edit */
body.page-admin .admin-collapse {
  padding: 0;
  overflow: hidden;
}
body.page-admin .admin-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 52px;
  height: auto;
  margin: 0;
  padding: 0.9rem 1.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #171a20;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
body.page-admin .admin-collapse-toggle:hover,
body.page-admin .admin-collapse-toggle:focus-visible {
  background: #f7f7f8;
}
body.page-admin .admin-collapse-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #5c5e62;
  border-bottom: 2px solid #5c5e62;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
body.page-admin .admin-collapse-toggle.is-open .admin-collapse-chevron,
body.page-admin .admin-collapse.is-open .admin-collapse-chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
body.page-admin .admin-collapse-body {
  padding: 0 1.2rem 1.25rem;
  border-top: 1px solid #ececec;
}
body.page-admin .admin-collapse-body > .muted:first-child {
  margin-top: 0.9rem;
}
body.page-admin .admin-add-wrap {
  margin: 0 0 1.25rem;
}
body.page-admin .admin-add-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 44px;
  margin: 0 0 0.75rem;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}
body.page-admin .admin-add-toggle.is-open {
  background: #3a3d44;
}
body.page-admin .admin-add-form[hidden],
body.page-admin .admin-collapse-body[hidden] {
  display: none !important;
}
body.page-admin .admin-add-form {
  margin-bottom: 0;
}
body.page-admin .admin-panel select,
body.page-admin .admin-inline-edit select {
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d1d2;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
}
body.page-admin .admin-panel select:focus,
body.page-admin .admin-inline-edit select:focus,
body.page-admin .admin-inline-edit input:not([type="checkbox"]):focus {
  outline: none;
  border-color: #171a20;
}
body.page-admin .admin-dir-card.is-editing {
  border-color: #171a20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
body.page-admin .admin-inline-edit {
  flex: 1 1 100%;
  width: 100%;
  margin: 0.75rem 0 0;
  padding: 0.9rem 0.85rem 0.95rem;
  border-top: 1px solid #ececec;
  background: #fafafa;
  border-radius: 0 0 10px 10px;
}
body.page-admin .admin-inline-title {
  margin: 0 0 0.75rem;
  font-size: 14px;
  font-weight: 600;
  color: #171a20;
}
body.page-admin .admin-inline-edit label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: #5c5e62;
}
body.page-admin .admin-inline-edit input:not([type="checkbox"]) {
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d1d2;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
  box-sizing: border-box;
}
body.page-admin .admin-inline-edit .actions {
  margin-top: 0.25rem;
}
body.page-admin .admin-inline-msg {
  margin: 0.55rem 0 0;
}

/* Greenlight sheet metrics on member /home */
body.page-home .gl-metrics {
  margin: 12px 0 16px;
}
body.page-home .gl-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr));
  gap: 8px;
  margin: 0;
}
body.page-home .gl-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
}
body.page-home .gl-metric dt {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
body.page-home .gl-metric dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}

/* —— Member recent sheet data —— */
body.page-home .identity-kicker {
  display: none !important;
}
body.page-home .member-data-heading {
  margin: 4px 0 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #171a20;
}

/* 1) Monthly score: black bold larger, horizontally centered */
body.page-home .gl-calc-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
body.page-home .gl-calc .month-score {
  margin: 0;
  padding: 10px 0 4px;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  text-align: center;
  border: 0;
  background: transparent;
  display: block;
}
body.page-home .gl-calc .score-line {
  margin: 0;
  text-align: center;
  color: #111111;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
body.page-home .gl-calc .score-label,
body.page-home .gl-calc .score-value {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111111;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
body.page-home .gl-calc .score-label {
  margin-right: 0.35em;
}

/* 2) Week math row: compact / de-emphasized (secondary info) */
body.page-home .week-math-eq {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2px 3px;
  margin: 8px 0 0;
  padding: 4px 6px;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  opacity: 0.92;
}
body.page-home .week-math-eq .stat {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin: 0;
  padding: 1px 1px;
  border: 0;
  text-align: center;
  min-width: 0;
  background: transparent;
}
body.page-home .week-math-eq .stat dt {
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}
body.page-home .week-math-eq .stat dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-align: center;
  line-height: 1.15;
}
body.page-home .week-math-eq .week-op {
  flex: 0 0 auto;
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  padding: 0 1px;
  text-align: center;
  line-height: 1;
}

/* 3) Table columns 要求/現有/分數: center-aligned */
body.page-home table.light thead th:not(:first-child),
body.page-home table.light tbody td {
  text-align: center;
}
body.page-home table.light thead th:first-child,
body.page-home table.light tbody th {
  text-align: left;
}

body.page-home table.light td.tone-full {
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
  border-radius: 6px;
}
body.page-home table.light td.tone-mid {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  border-radius: 6px;
}
body.page-home table.light td.tone-low {
  background: #ffe4e6;
  color: #9f1239;
  font-weight: 700;
  border-radius: 6px;
}

/* 4) 現時預測 X月燈數 YY分: black bold larger */
body.page-home .gl-calc .predict {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.35em;
  margin: 16px 0 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid #e8e8e8;
  background: transparent;
  color: #111111;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
body.page-home .gl-calc .predict-label,
body.page-home .gl-calc .predict-value {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111111;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  white-space: normal;
}

/* 5) X月建議 heading: prominent badge */
body.page-home .gl-calc .suggest {
  margin-top: 22px;
}
body.page-home .gl-calc .suggest > h2,
body.page-home .gl-calc #suggest-title {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 14px;
  padding: 10px 14px;
  text-align: center;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

/* Absolute points bands for monthly score + prediction */
body.page-home .gl-calc .score-value.pts-black,
body.page-home .gl-calc .predict-value.pts-black {
  color: #111111 !important;
}
body.page-home .gl-calc .score-value.pts-red,
body.page-home .gl-calc .predict-value.pts-red {
  color: #dc2626 !important;
}
body.page-home .gl-calc .score-value.pts-yellow,
body.page-home .gl-calc .predict-value.pts-yellow {
  color: #ca8a04 !important;
}
body.page-home .gl-calc .score-value.pts-green,
body.page-home .gl-calc .predict-value.pts-green {
  color: #16a34a !important;
}

/* 6) Tips by topic: status icon LEFT | title | body */
body.page-home .gl-calc .quests {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.page-home .gl-calc .tip-row,
body.page-home .gl-calc .quest.tip-row {
  display: grid;
  grid-template-columns: 1.75rem 3.25em minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #e8e8e8;
  background: transparent;
  box-shadow: none;
}
body.page-home .gl-calc .tip-topic {
  color: #111111;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.45;
  white-space: nowrap;
}
body.page-home .gl-calc .tip-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.page-home .gl-calc .tip-row .sug-text {
  color: #171a20;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}
/* OK tips (✓): green/normal */
body.page-home .gl-calc .quest-ok .sug-text { color: #047857; }
body.page-home .gl-calc .quest-ok .tip-topic {
  color: #111111;
}
/* Alert tips (!): topic title AND suggestion text both red */
body.page-home .gl-calc .quest-alert .tip-topic,
body.page-home .gl-calc .quest-alert .sug-text {
  color: #b91c1c;
}
body.page-home .gl-calc .quest-alert .sug-text {
  font-weight: 600;
}
body.page-home .gl-calc .sug-detail {
  display: block;
  margin-top: 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  max-width: 100%;
}
body.page-home .gl-calc .sug-detail.gain-hi {
  background: #ecfdf5;
  color: #065f46;
}
body.page-home .gl-calc .sug-detail.gain-lo {
  background: #fef3c7;
  color: #92400e;
}
/* Left status: green ✓ or red triangle ! */
body.page-home .gl-calc .tip-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  min-height: 1.45em;
  flex-shrink: 0;
  justify-self: start;
}
body.page-home .gl-calc .tip-status-ok .tip-status-mark {
  color: #16a34a;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}
body.page-home .gl-calc .tip-status-alert .tip-status-tri {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 0;
  border-left: 0.55rem solid transparent;
  border-right: 0.55rem solid transparent;
  border-bottom: 0.95rem solid #dc2626;
}
body.page-home .gl-calc .tip-status-alert .tip-status-bang {
  position: absolute;
  top: 0.28rem;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  font-family: system-ui, -apple-system, sans-serif;
}


/* Member home: open BNI memberdetails (web; native deep link unknown) */
html body.page-home .bni-connect-cta {
  margin: 20px 0 0;
}

html body.page-home a.bni-connect-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  height: 48px;
  padding: 0 16px;
  border: 2px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: none;
}

html body.page-home a.bni-connect-btn:focus,
html body.page-home a.bni-connect-btn:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

html body.page-home .bni-connect-hint {
  display: block;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #5c5e62;
  text-align: center;
}

html body.page-home a.bni-connect-btn-follow {
  margin-top: 16px;
}

/* 「更新會員資料」 sits under honors (+ nba26 below-honors reserve), above 會員最近數據 */
html body.page-home .config-visual > .bni-connect-cta--update {
  margin: 0;
}

/* Member home nba25: top row 3 equal cols — empty | 會員卡片 | QR */
html body.page-home .home-topbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  margin: 0 0 12px;
  min-height: 36px;
}

html body.page-home .home-topbar .home-topbar-left {
  min-width: 0;
  min-height: 36px;
}

html body.page-home .home-topbar .intro-launch,
html body.page-home .intro-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 100%;
  max-width: none;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border: 2px solid #171a20;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  box-sizing: border-box;
}

/* QR in topbar right third; top-aligned with 會員卡片 (same row as name band) */
html body.page-home .home-topbar .qr-launch,
html body.page-home .qr-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  align-self: start;
  width: 100%;
  max-width: none;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border: 2px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  box-sizing: border-box;
}

/* Identity no longer hosts QR */
html body.page-home .identity .qr-launch,
html body.page-home .config-visual .identity .qr-launch {
  display: none;
}


/* nba26: reserved vertical space above name and below honors — equal height */
html body.page-home .home-reserve {
  display: block;
  width: 100%;
  flex: none;
  pointer-events: none;
}
html body.page-home .home-reserve--above-name,
html body.page-home .home-reserve--below-honors {
  height: 16px;
  min-height: 16px;
}

/* 「更新會員資料」 under honors (+ reserved spacer); WA editor is in 會員卡片 modal */
html body.page-home .config-visual > .bni-connect-cta--update {
  margin: 0;
}


/* WA prefill text modal */
html body.page-home .wa-text-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

html body.page-home .wa-text-modal[hidden] {
  display: none !important;
}

html body.page-home .wa-text-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

html body.page-home .wa-text-modal-card {
  position: relative;
  z-index: 1;
  width: min(96vw, 420px);
  padding: 40px 20px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

html body.page-home .wa-text-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171a20;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

html body.page-home .wa-text-modal-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #171a20;
}

html body.page-home .wa-text-modal-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #5c5e62;
}

html body.page-home .wa-text-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #171a20;
}

html body.page-home .wa-text-input {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 29, 31, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #171a20;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}

html body.page-home .wa-text-input:focus {
  outline: 2px solid #0071e3;
  outline-offset: 1px;
}

html body.page-home .wa-text-status {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: #15803d;
}

html body.page-home .wa-text-status.is-error {
  color: #b91c1c;
}

html body.page-home .wa-text-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

html body.page-home .wa-text-reset,
html body.page-home .wa-text-save {
  flex: 1 1 0;
  min-height: 44px;
  height: 44px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}

html body.page-home .wa-text-reset {
  border: 2px solid #171a20;
  background: #fff;
  color: #171a20;
}

html body.page-home .wa-text-save {
  border: 2px solid #171a20;
  background: #171a20;
  color: #fff;
}

/* Intro card: one-screen modal — NBA-style navy hero (top) + WhatsApp QR (bottom) */
html body.page-home .intro-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top, 0px))
    max(8px, env(safe-area-inset-right, 0px))
    max(8px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

html body.page-home .intro-modal[hidden] {
  display: none !important;
}

html body.page-home .intro-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

html body.page-home .intro-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(96vw, 420px);
  max-width: 96vw;
  height: min(96dvh, 720px);
  max-height: 96dvh;
  padding: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
}

html body.page-home .intro-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  /* Plain × only — no circle/pill behind it (nba22) */
}

html body.page-home .intro-modal-close:hover,
html body.page-home .intro-modal-close:focus {
  background: transparent;
  opacity: 0.85;
}

html body.page-home .intro-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  /* Shared WA stack width: QR + edit button (nba27) */
  --intro-wa-qr-size: min(86vw, 42dvh, 300px);
}

/* —— TOP HALF: deep navy NBA-style player profile —— */
html body.page-home .intro-card-hero {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  min-height: min(40dvh, 288px);
  /* No horizontal padding — stats bar must full-bleed edge-to-edge.
     Small top pad for × close; avatar+meta row grows into remaining navy. */
  padding: 8px 0 0;
  background:
    radial-gradient(ellipse 95% 80% at 10% 90%, rgba(40, 95, 190, 0.62) 0%, transparent 58%),
    radial-gradient(ellipse 75% 55% at 92% 8%, rgba(28, 78, 160, 0.48) 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 48% -5%, rgba(55, 110, 200, 0.38) 0%, transparent 55%),
    linear-gradient(168deg, #0e2444 0%, #0c1e3a 28%, #0a1a32 55%, #061428 82%, #040f20 100%);
  color: #fff;
  box-sizing: border-box;
}

html body.page-home .intro-card-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  min-height: 0;
  /* Grow into navy empty space; portrait+meta are absolute (nba17) */
  flex: 1 1 auto;
  /* Padding insets in-flow only; absolute portrait/meta use full width so
     avatar centers in true left 1/3 and meta starts at 33.333%. */
  position: relative;
  padding: 4px 14px 14px;
  box-sizing: border-box;
}

html body.page-home .intro-card-portrait {
  /* Avatar centered in left 1/3 of FULL card (nba17). Absolute so width % is
     vs full top (not padded content — flex 33% sat ~10px right). No vertical
     pad: share meta’s absolute box so avatar CY == meta block CY. */
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 33.333%;
  max-width: none;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  min-width: 0;
  overflow: visible;
  z-index: 1;
  box-sizing: border-box;
}

/* Circle avatar: same photo as member home; light-gray studio fill
   (matches .avatar / identity) so cutout PNGs show light bg, not black/navy. */
html body.page-home .intro-card-portrait .avatar,
html body.page-home .intro-card-portrait .avatar.ph,
html body.page-home .intro-card-portrait .avatar.lg,
html body.page-home .intro-card-portrait .avatar.intro-cutout {
  width: min(22vw, 80px);
  height: min(22vw, 80px);
  max-width: 80px;
  max-height: 80px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  background-color: #F5F5F7;
  background-image: none;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
  font-size: clamp(26px, 6dvh, 34px);
  color: #1D1D1F;
  -webkit-mask-image: none;
  mask-image: none;
  filter: none;
  mix-blend-mode: normal;
  isolation: isolate;
  opacity: 1;
}

html body.page-home .intro-card-portrait .avatar.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F5F5F7;
  background-image: none;
  border-radius: 50%;
  -webkit-mask-image: none;
  mask-image: none;
  filter: none;
  mix-blend-mode: normal;
}

html body.page-home .intro-card-meta {
  /* Name/specialty/role/honors start at left 1/3 of card (nba17 / Mark: 名字由三分一開始) */
  position: absolute;
  left: 33.333%;
  right: 14px;
  top: 0;
  bottom: 0;
  transform: none;
  flex: none;
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
  padding: 4px 0;
  box-sizing: border-box;
}

/* Small chapter meta above name */
html body.page-home .intro-card-topline {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.58rem, 1.5dvh, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

html body.page-home .intro-card-topline-sep {
  opacity: 0.55;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Name smaller so long Chinese/English names fit without overflow */
html body.page-home .intro-card-name {
  margin: 0;
  padding: 0;
  font-size: clamp(1.05rem, 3.4dvh, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #fff;
  text-wrap: balance;
  text-transform: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Specialty first (under name), then BNI role/崗位 */
html body.page-home .intro-card-spec {
  margin: 0.1rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.72rem, 1.85dvh, 0.88rem);
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
}

html body.page-home .intro-card-role,
html body.page-home .intro-card-role.dir-role {
  margin: 0.06rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  font-size: clamp(0.64rem, 1.6dvh, 0.78rem);
  letter-spacing: 0.03em;
  text-transform: none;
  line-height: 1.2;
}

/* Curry-style stats strip: deep navy BLUE (not black), full-bleed L–R */
html body.page-home .intro-card-stats {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  /* Deep navy blue — darker than hero but clearly blue, not #020810 black */
  background: #061428;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-sizing: border-box;
}

html body.page-home .intro-card-stat {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  min-width: 0;
  /* Shorter bar (Mark: 矮啲 — less height/padding); keep small text / navy / full-bleed */
  padding: 5px 4px 6px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
  overflow: visible;
}

html body.page-home .intro-card-stat:last-child {
  border-right: 0;
}

html body.page-home .intro-card-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  /* Slightly smaller again (Mark: 再細多少少) */
  font-size: clamp(0.48rem, 1.15dvh, 0.60rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

html body.page-home .intro-card-stat-value {
  display: block;
  color: #fff;
  /* Slightly smaller again (Mark: 再細多少少); bar height/navy/full-bleed unchanged */
  font-size: clamp(0.60rem, 1.55dvh, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Contact strip values stay white (NBA stat look); legacy honor color hooks unused.
   Include nested <a> so iOS tel: auto-links do not pick up body.page-home a (#171a20). */
html body.page-home .intro-card-stat--company .intro-card-stat-value,
html body.page-home .intro-card-stat--company .intro-card-stat-value a,
html body.page-home .intro-card-stat--role .intro-card-stat-value,
html body.page-home .intro-card-stat--role .intro-card-stat-value a,
html body.page-home .intro-card-stat--phone .intro-card-stat-value,
html body.page-home .intro-card-stat--phone .intro-card-stat-value a,
html body.page-home .intro-card-stat--green .intro-card-stat-value,
html body.page-home .intro-card-stat--mc .intro-card-stat-value,
html body.page-home .intro-card-stat--gold .intro-card-stat-value {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-decoration: none;
}

/* Phone can stay on one line when short */
html body.page-home .intro-card-stat--phone .intro-card-stat-value {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Inline-editable 公司/職位/電話 — tap cell, no separate button */
html body.page-home .intro-card-stat--editable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}
html body.page-home .intro-card-stat--editable:hover,
html body.page-home .intro-card-stat--editable:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
html body.page-home .intro-card-stat--editable.is-editing {
  background: rgba(255, 255, 255, 0.10);
  cursor: text;
}
html body.page-home .intro-card-stat--editable.is-editing .intro-card-stat-value {
  display: none !important;
}
html body.page-home .intro-card-stat-input {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2px 4px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: rgba(0, 12, 32, 0.85);
  color: #fff;
  font: inherit;
  font-size: clamp(0.60rem, 1.55dvh, 0.76rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  box-sizing: border-box;
  outline: none;
}
html body.page-home .intro-card-stat-input:focus {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.45);
}
html body.page-home .intro-card-stat--phone .intro-card-stat-input {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Honor chips UNDER role line inside meta (nba17 / t247s1001) — ONE line,
   max size that fits (~10.3px, pad 1×4, nowrap). NOT above avatar/name. */
html body.page-home .intro-card-honors {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 3px 4px;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 0.2rem 0 0;
  padding: 0;
  background: transparent;
  border: none;
  box-sizing: border-box;
  overflow: visible;
}

html body.page-home .intro-card-honors .dir-honors {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 3px 4px;
  margin: 0;
  max-width: 100%;
}

/* Enlarged framed chips on navy — max one-line fit (~10.3px, pad 1×4) */
html body.page-home .intro-card-honors .dir-honor {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: clamp(0.50rem, 1.22dvh, 0.62rem);
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1.25;
  border: 1px solid transparent;
  box-sizing: border-box;
}

html body.page-home .intro-card-honors .dir-honor--green {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

html body.page-home .intro-card-honors .dir-honor--mc {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

html body.page-home .intro-card-honors .dir-honor--gold {
  background: #fef9c3;
  color: #a16207;
  border-color: #fde047;
}

/* —— BOTTOM HALF: large WhatsApp QR + edit button (nba27) ——
   Caption + QR + button share .intro-card-wa-stack, centered as one unit so
   space ABOVE 掃描說明 == space BELOW the WhatsApp edit button.
   Stack width drives both QR and button → same width, L–R centered. */
html body.page-home .intro-card-wa {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  min-height: 0;
  width: 100%;
  /* Equal top/bottom padding so free space + pad stay symmetric (nba27) */
  padding: 14px 12px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

html body.page-home .intro-card-wa-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: var(--intro-wa-qr-size);
  max-width: 100%;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

html body.page-home .intro-card-wa-caption {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  max-width: 100%;
  color: #1d1d1f;
  font-size: clamp(0.72rem, 1.9dvh, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
}

html body.page-home .intro-card-wa-qr {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-width: 100%;
  max-height: min(42dvh, 300px);
  line-height: 0;
  flex: 0 1 auto;
  align-self: stretch;
  margin: 0;
  box-sizing: border-box;
}

html body.page-home .intro-card-wa-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Green WhatsApp label removed; keep rule inert if markup reappears */
html body.page-home .intro-card-wa-label {
  display: none !important;
}

html body.page-home .intro-card-wa-note {
  margin: 0;
  font-size: 0.9em;
  text-align: center;
}

/* Edit button sits under QR inside the stack — same width as QR (nba27) */
html body.page-home .intro-card-wa-edit {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 10px 0 0;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
}

html body.page-home .intro-card-wa-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 2px solid #171a20;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-sizing: border-box;
  box-shadow: none;
  cursor: pointer;
}

html body.page-home .intro-card-wa-edit-btn:focus,
html body.page-home .intro-card-wa-edit-btn:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

html body.intro-modal-open {
  overflow: hidden;
}


/* —— Site-wide deep-navy gradient bars: topbar + footer —— */
html:has(body.page-public),
html:has(body.page-home),
html:has(body.page-login) {
  height: 100%;
}

body.page-public,
body.page-home,
body.page-login {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.page-public > main,
body.page-home > main,
body.page-login > main {
  flex: 1 0 auto;
}

body.page-home > script,
body.page-public > script,
body.page-login > script,
body.page-home > .qr-modal,
body.page-home > .intro-modal,
body.page-home > .wa-text-modal {
  flex: 0 0 auto;
}

/* —— NBA-style site footer (accordion + social + legal) —— */
.site-footer {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  margin-top: auto;
  background: linear-gradient(45deg, #010814 0%, #061428 48%, #0a1c38 100%);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Stacked: social icons centered, then pipe-separated nav links */
.site-footer-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.75rem;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex: 0 0 auto;
  width: 100%;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

a.site-footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff !important;
  text-decoration: none;
  opacity: 0.95;
}

a.site-footer-social:hover,
a.site-footer-social:focus-visible {
  opacity: 1;
  outline: none;
}

.site-footer-social-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: #fff;
  fill: currentColor;
}

.site-footer-links {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.35rem;
  width: 100%;
  min-width: 0;
  text-align: center;
}

a.site-footer-link {
  color: rgba(255, 255, 255, 0.78) !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
}

a.site-footer-link:hover,
a.site-footer-link:focus-visible {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  outline: none;
}

.site-footer-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  user-select: none;
  padding: 0 0.1rem;
}

.site-footer-legal {
  padding: 0.75rem 0.75rem 1rem;
  box-sizing: border-box;
}

.site-footer-copy {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.45);
}

/* Force footer text white where needed (beats page-login / page-public a rules) */
html body .site-footer {
  color: #fff !important;
}
html body .site-footer a.site-footer-social,
html body .site-footer a.site-footer-link {
  /* colors set on those classes */
}


/* Phone cell must stay visible (Mark: 5629 5097) — never clip/fade.
   iOS/Safari data-detectors wrap the number in <a href="tel:…">; body.page-home a
   is near-black (#171a20), so force white on the link too (same as 公司/職位). */
html body.page-home .intro-card-stat--phone {
  flex: 1 1 0;
  min-width: 4.5rem;
  overflow: visible;
}
html body.page-home .intro-card-stat--phone .intro-card-stat-label,
html body.page-home .intro-card-stat--phone .intro-card-stat-value,
html body.page-home .intro-card-stat--phone .intro-card-stat-value a,
html body.page-home .intro-card-stat--phone a,
html body.page-home .intro-card-stat--phone a:link,
html body.page-home .intro-card-stat--phone a:visited,
html body.page-home .intro-card-stat--phone a:hover,
html body.page-home .intro-card-stat--phone a:active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-decoration: none !important;
}
html body.page-home .intro-card-stat--phone .intro-card-stat-label,
html body.page-home .intro-card-stat--phone .intro-card-stat-value {
  display: block !important;
}
html body.page-home .intro-card-stat--phone .intro-card-stat-value {
  font-size: clamp(0.62rem, 1.6dvh, 0.78rem) !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}
html body.page-home .intro-card-stat--phone.is-editing .intro-card-stat-value {
  display: none !important;
}

/* Contact strip values + any auto-linked <a> stay white (公司/職位/電話) */
html body.page-home .intro-card-stat--company .intro-card-stat-value,
html body.page-home .intro-card-stat--company .intro-card-stat-value a,
html body.page-home .intro-card-stat--role .intro-card-stat-value,
html body.page-home .intro-card-stat--role .intro-card-stat-value a,
html body.page-home .intro-card-stat--phone .intro-card-stat-value,
html body.page-home .intro-card-stat--phone .intro-card-stat-value a {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Guest/observer registration posters: same rounded layout as 本週會議 */
html body.page-visit .meeting-poster,
html body.page-login.page-visit .meeting-poster {
  margin: 0 0 1rem;
  width: 100%;
  max-width: 640px;
}
html body.page-visit .poster,
html body.page-login.page-visit .poster {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0;
  border-radius: 8px !important;
  background: #f3f3f3;
  overflow: hidden;
}

/* ===== lang=en: reflow for longer English UI strings ===== */
html.lang-en .site-nav-links {
  flex-wrap: wrap;
  row-gap: 0.15rem;
  align-items: center;
}
html.lang-en .site-nav-links a {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  max-width: 11.5rem;
  text-align: center;
}
html.lang-en .site-nav-menu a {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
html.lang-en .site-footer-links {
  flex-wrap: wrap;
  row-gap: 0.35rem;
  align-items: center;
}
html.lang-en .site-footer-link {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
html.lang-en .visit-chooser-cards {
  align-items: stretch;
}
html.lang-en .visit-chooser-card {
  min-height: 0;
  align-items: flex-start;
}
html.lang-en .visit-chooser-label,
html.lang-en .visit-chooser-hint {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
html.lang-en .login-title,
html.lang-en h1,
html.lang-en .member-data-heading,
html.lang-en #suggest-title {
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.3;
}
html.lang-en body.page-login .auth label,
html.lang-en body.page-visit label,
html.lang-en .field-label,
html.lang-en legend {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
html.lang-en .poster-facts dt,
html.lang-en .poster-facts dd,
html.lang-en .fact-sub {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
html.lang-en body.page-home .home-topbar {
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}
html.lang-en body.page-home .intro-launch,
html.lang-en body.page-home .qr-launch {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  max-width: 100%;
  height: auto;
  min-height: 2.25rem;
  padding-block: 0.45rem;
}
html.lang-en body.page-home .score-label,
html.lang-en body.page-home .predict-label,
html.lang-en body.page-home .predict-value,
html.lang-en body.page-home .stat dt,
html.lang-en body.page-home .stat dd {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
html.lang-en body.page-home table.light th,
html.lang-en body.page-home table.light td,
html.lang-en body.page-home table.light caption {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
html.lang-en body.page-home .sug-text,
html.lang-en body.page-home .quest {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
html.lang-en .dir-honor,
html.lang-en .dir-role,
html.lang-en .dir-industry-chip {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  height: auto;
}
html.lang-en .dir-industry-nav {
  flex-wrap: wrap;
  gap: 0.4rem;
}
html.lang-en .wa-text-modal-hint,
html.lang-en .wa-text-label,
html.lang-en #qr-modal-title,
html.lang-en #wa-text-modal-title {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
html.lang-en .muted {
  overflow-wrap: anywhere;
}
html.lang-en .home-topbar-left .lang-switch {
  position: relative;
}
@media (max-width: 720px) {
  html.lang-en .site-nav-links a {
    max-width: none;
    text-align: left;
  }
}


body.page-visit .scan-note.is-busy {
  color: #1d1d1f;
  font-weight: 600;
}

body.page-visit .scan-note.is-error {
  color: #b00020;
  font-weight: 500;
}

body.page-visit #scan-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

body.page-visit #obs-fail #obs-fill {
  margin-right: 0.5rem;
}



/* Reception: industry reseat button beside seating chart */
body.page-desk .floorplan-seats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 6px;
}
body.page-desk .floorplan-seats-head h2 {
  margin: 0;
}
body.page-desk .floorplan-seats-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
body.page-desk .reseat-industry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #c8102e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
body.page-desk .reseat-industry-btn:active {
  opacity: 0.88;
}
body.page-desk .reseat-industry-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
body.page-desk .reseat-industry-note {
  margin: 0;
  font-size: 12px;
  color: #5c5e62;
  text-align: right;
  max-width: 280px;
}

/* Floorplan seating chart (reception desk) */
body.page-desk .floorplan-seats, body.page-admin .floorplan-live-preview .floorplan-seats {
  margin-top: 1.2rem;
}
body.page-desk .floorplan-summary, body.page-admin .floorplan-live-preview .floorplan-summary {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.85rem;
}

/* Top row: STAGE + hug-content 控制台 (no empty space right of names) */
body.page-desk .seat-board-top, body.page-admin .floorplan-live-preview .seat-board-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 0.4rem;
  align-items: stretch;
  margin: 0 0 0.55rem;
}
body.page-desk .seat-board-top--control-left, body.page-admin .floorplan-live-preview .seat-board-top--control-left {
  grid-template-columns: max-content minmax(0, 1fr);
}
body.page-desk .seat-board-top .seat-board-stage, body.page-admin .floorplan-live-preview .seat-board-top .seat-board-stage {
  margin: 0;
  max-width: none;
  width: 100%;
  align-self: stretch;
  min-height: 1.75rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}
body.page-desk .seat-workdesk, body.page-admin .floorplan-live-preview .seat-workdesk {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  width: max-content;
  max-width: 100%;
  min-width: auto;
  padding: 0.22rem 0.2rem;
  background: #fff;
  border: 1px solid rgba(6, 20, 40, 0.12);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(6, 20, 40, 0.04);
  box-sizing: border-box;
}
body.page-desk .seat-workdesk--vertical, body.page-admin .floorplan-live-preview .seat-workdesk--vertical {
  align-self: stretch;
  width: max-content;
  justify-self: end;
}
body.page-desk .seat-board-top--control-left .seat-workdesk--vertical,
body.page-admin .floorplan-live-preview .seat-board-top--control-left .seat-workdesk--vertical {
  justify-self: start;
}
body.page-desk .seat-workdesk-label, body.page-admin .floorplan-live-preview .seat-workdesk-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #171a20;
  text-align: center;
  white-space: nowrap;
}
/* Compact strips: column hugs longest name; all cells equal width */
body.page-desk .seat-workdesk-seats, body.page-admin .floorplan-live-preview .seat-workdesk-seats {
  display: inline-grid;
  grid-template-columns: 1fr;
  gap: 2px;
  flex: 0 0 auto;
  width: max-content;
  justify-items: stretch;
}
body.page-desk .seat-cell--workdesk, body.page-admin .floorplan-live-preview .seat-cell--workdesk {
  background: #f3f6fb;
  border-color: #b7c7db;
}
body.page-desk .seat-cell--workdesk .seat-cell-name, body.page-admin .floorplan-live-preview .seat-cell--workdesk .seat-cell-name {
  color: #1e3a5f;
}
@media (max-width: 720px) {
  body.page-desk .seat-board-top, body.page-admin .floorplan-live-preview .seat-board-top {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.3rem;
  }
  body.page-desk .seat-board-top--control-left, body.page-admin .floorplan-live-preview .seat-board-top--control-left {
    grid-template-columns: max-content minmax(0, 1fr);
  }
  body.page-desk .seat-board-top .seat-board-stage, body.page-admin .floorplan-live-preview .seat-board-top .seat-board-stage {
    min-height: 1.5rem;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
  }
  body.page-desk .seat-workdesk-seats, body.page-admin .floorplan-live-preview .seat-workdesk-seats {
    display: inline-grid;
    grid-template-columns: 1fr;
    width: max-content;
    gap: 2px;
  }
  body.page-desk .seat-workdesk .seat-cell, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell {
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0.1rem 0.22rem;
  }
  body.page-desk .seat-workdesk .seat-cell-name, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell-name {
    font-size: 0.58rem;
  }
  body.page-desk .seat-workdesk .seat-cell-detail, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell-detail {
    display: none !important;
  }
}

body.page-desk .floorplan-chart, body.page-admin .floorplan-live-preview .floorplan-chart {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 0.8rem;
  background: #f4f6f9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(6, 20, 40, 0.12);
}
body.page-desk .floorplan-bg, body.page-admin .floorplan-live-preview .floorplan-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.55;
}
body.page-desk .floorplan-stage, body.page-admin .floorplan-live-preview .floorplan-stage {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 20, 40, 0.72);
  color: #f3d58a;
  border: 2px solid #e0b15a;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  pointer-events: none;
}
body.page-desk .floorplan-table, body.page-admin .floorplan-live-preview .floorplan-table {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #0c6e56;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 2px;
  box-sizing: border-box;
}
body.page-desk .floorplan-table--long, body.page-admin .floorplan-live-preview .floorplan-table--long {
  border-radius: 10px;
}
body.page-desk .floorplan-podium, body.page-admin .floorplan-live-preview .floorplan-podium {
  position: absolute;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  border: 2px solid #b45a28;
  background: rgba(180, 90, 40, 0.35);
  border-radius: 4px;
  pointer-events: none;
}
body.page-desk .floorplan-table-id, body.page-admin .floorplan-live-preview .floorplan-table-id {
  font-size: 0.68rem;
  font-weight: 800;
  color: #0c6e56;
}
body.page-desk .floorplan-table-people, body.page-admin .floorplan-live-preview .floorplan-table-people {
  font-size: 0.58rem;
  line-height: 1.15;
  color: #171a20;
  max-height: 70%;
  overflow: hidden;
}
body.page-desk .floorplan-zones h3, body.page-admin .floorplan-live-preview .floorplan-zones h3 {
  margin: 0.7rem 0 0.15rem;
  font-size: 0.9rem;
}

body.page-desk .floorplan-zones h3.floorplan-zones-unseated,
body.page-admin .floorplan-live-preview .floorplan-zones h3.floorplan-zones-unseated {
  margin-top: 1rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(6, 20, 40, 0.14);
  color: #8a3b00;
}
body.page-desk .floorplan-zones h3.floorplan-zones-unseated.has-unseated,
body.page-admin .floorplan-live-preview .floorplan-zones h3.floorplan-zones-unseated.has-unseated {
  color: #b42318;
}
body.page-desk .floorplan-unseated-list,
body.page-admin .floorplan-live-preview .floorplan-unseated-list {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #5c3a10;
}
body.page-desk .floorplan-unseated-list:not(.is-empty),
body.page-admin .floorplan-live-preview .floorplan-unseated-list:not(.is-empty) {
  font-weight: 650;
  color: #9a3412;
}
body.page-desk .floorplan-unseated-list.is-empty,
body.page-admin .floorplan-live-preview .floorplan-unseated-list.is-empty {
  color: #6b7280;
  font-weight: 500;
}

body.page-desk .seat-board, body.page-admin .floorplan-live-preview .seat-board {
  max-width: 980px;
  margin: 0 auto 1rem;
  padding: 0.7rem 0.5rem 1rem;
  background: #eef0f3;
  border: 1px solid rgba(6, 20, 40, 0.08);
  border-radius: 14px;
}
body.page-desk .seat-board-stage, body.page-admin .floorplan-live-preview .seat-board-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  max-width: none;
  min-height: 1.75rem;
  padding: 0.15rem 0.55rem;
  background: #171a20;
  border: 0;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}
body.page-desk .seat-board-grid, body.page-admin .floorplan-live-preview .seat-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.5rem;
  align-items: stretch;
}
body.page-desk .seat-table, body.page-admin .floorplan-live-preview .seat-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(6, 20, 40, 0.1);
  border-radius: 10px;
  padding: 5px;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(6, 20, 40, 0.04);
}
body.page-desk .seat-board-back, body.page-admin .floorplan-live-preview .seat-board-back {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(6, 20, 40, 0.14);
}
body.page-desk .seat-board-back-label, body.page-admin .floorplan-live-preview .seat-board-back-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b3d12;
  text-align: center;
  line-height: 1.2;
}
body.page-desk .seat-board-back-grid, body.page-admin .floorplan-live-preview .seat-board-back-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem 0.45rem;
  align-items: start;
}
/* Interview unit: blank table bar on top + 3 stools (no 枱號/凳號).
   Empty = neutral (same as main empty seats); guest yellow only when a real 來賓 sits. */
body.page-desk .seat-table.seat-table--interview,
body.page-admin .floorplan-live-preview .seat-table.seat-table--interview {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 3px;
  align-content: start;
  height: auto;
  min-height: 0;
  padding: 4px;
  background: #fff;
  border: 1px solid #e2e5eb;
  border-radius: 10px;
  box-shadow: none;
}
/* Table bar: same cool gray as main spines — never baked-in guest tan */
body.page-desk .seat-table--interview .seat-table-spine--interview,
body.page-admin .floorplan-live-preview .seat-table--interview .seat-table-spine--interview {
  display: block;
  min-height: 1.15rem;
  height: 1.15rem;
  padding: 0;
  background: #f3f4f6;
  border: 1px solid #d8dde5;
  border-radius: 5px;
  cursor: default;
}
/* Optional: warm bar only when a real 來賓 occupies a stool on this unit */
body.page-desk .seat-table--interview.seat-table--has-guest .seat-table-spine--interview,
body.page-admin .floorplan-live-preview .seat-table--interview.seat-table--has-guest .seat-table-spine--interview {
  background: #e8d4a0;
  border-color: #d2b56a;
}
body.page-desk .seat-table--interview .seat-table-side--below,
body.page-admin .floorplan-live-preview .seat-table--interview .seat-table-side--below {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 0;
  height: auto;
  grid-template-rows: auto !important;
  grid-auto-rows: auto;
  align-items: start;
}
body.page-desk .seat-cell.seat-cell--interview,
body.page-admin .floorplan-live-preview .seat-cell.seat-cell--interview {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: 1.55rem !important;
  height: auto;
  max-height: none;
  padding: 0.12rem 0.18rem;
  background: #f8fafc;
  border: 1px solid #e2e5eb;
  border-radius: 5px;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
}
/* Empty interview stools: match main .seat-cell.is-empty (no guest tan) */
body.page-desk .seat-cell--interview.is-empty,
body.page-admin .floorplan-live-preview .seat-cell--interview.is-empty {
  min-height: 1.35rem !important;
  background: #fafbfc;
  border-style: dashed;
  border-color: #dde1e7;
  opacity: 0.7;
}
/* Occupied guest on interview: keep guest yellow (beats empty rules) */
body.page-desk .seat-cell--interview.seat-cell--guest:not(.is-empty),
body.page-admin .floorplan-live-preview .seat-cell--interview.seat-cell--guest:not(.is-empty) {
  background: #fff7ea;
  border-style: solid;
  border-color: #e5c48a;
  opacity: 1;
}
body.page-desk .seat-cell--interview .seat-cell-id,
body.page-admin .floorplan-live-preview .seat-cell--interview .seat-cell-id {
  display: none !important; /* stools: name only; roll uses INTB */
}
body.page-desk .seat-cell--interview .seat-cell-body,
body.page-admin .floorplan-live-preview .seat-cell--interview .seat-cell-body {
  display: block;
  min-width: 0;
  padding: 0;
}
body.page-desk .seat-cell--interview .seat-cell-name,
body.page-admin .floorplan-live-preview .seat-cell--interview .seat-cell-name {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
body.page-desk .seat-cell--interview .seat-cell-detail,
body.page-admin .floorplan-live-preview .seat-cell--interview .seat-cell-detail {
  display: none !important;
}
body.page-desk .seat-cell--interview.seat-cell--type-editable:hover,
body.page-admin .floorplan-live-preview .seat-cell--interview.seat-cell--role-editable:hover,
body.page-desk .seat-cell--interview.seat-cell--type-editable:focus-visible,
body.page-admin .floorplan-live-preview .seat-cell--interview.seat-cell--role-editable:focus-visible,
body.page-desk .seat-cell--interview.seat-cell--type-editable.is-picking {
  background: #f3f5f8;
  border-color: #c9d0da;
  box-shadow: 0 0 0 2px rgba(100, 120, 150, 0.18);
  outline: none;
}
body.page-desk .seat-cell--interview.seat-cell--guest:not(.is-empty).seat-cell--type-editable:hover,
body.page-desk .seat-cell--interview.seat-cell--guest:not(.is-empty).seat-cell--type-editable.is-picking {
  background: #fff3d6;
  border-color: #c4922a;
  box-shadow: 0 0 0 2px rgba(196, 146, 42, 0.22);
}

body.page-desk .seat-table-spine, body.page-admin .floorplan-live-preview .seat-table-spine {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: 1px solid #d8dde5;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #171a20;
}
body.page-desk .seat-table-spine span, body.page-admin .floorplan-live-preview .seat-table-spine span {
  transform: none;
}
/* Admin: click table number to rename */
body.page-admin .floorplan-live-preview .seat-table-spine--editable {
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
body.page-admin .floorplan-live-preview .seat-table-spine--editable:hover,
body.page-admin .floorplan-live-preview .seat-table-spine--editable:focus-visible {
  background: #e8f5ef;
  border-color: #0c6e56;
  box-shadow: 0 0 0 2px rgba(12, 110, 86, 0.18);
  outline: none;
}
body.page-admin .floorplan-live-preview .seat-table-spine--editable.is-editing {
  background: #fff;
  border-color: #0c6e56;
  padding: 2px;
}
body.page-admin .floorplan-live-preview .seat-table-label-input {
  width: 100%;
  min-width: 2.2rem;
  max-width: 4.5rem;
  margin: 0;
  padding: 0.15rem 0.2rem;
  border: none;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  color: #171a20;
  outline: none;
}
body.page-desk .seat-table-side, body.page-admin .floorplan-live-preview .seat-table-side {
  display: grid;
  grid-template-rows: repeat(3, auto);
  gap: 4px;
  min-width: 0;
  min-height: 0;
  align-content: start;
}
body.page-desk .seat-cell, body.page-admin .floorplan-live-preview .seat-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 0.28rem 0.35rem 0.24rem;
  border: 1px solid #e2e5eb;
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
  overflow: hidden;
}
body.page-desk .seat-cell-id, body.page-admin .floorplan-live-preview .seat-cell-id {
  display: block;
  margin: 0 0 0.05rem;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(92, 94, 98, 0.65);
  line-height: 1.1;
  position: static;
}
body.page-desk .seat-cell-body, body.page-admin .floorplan-live-preview .seat-cell-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.06rem;
  min-width: 0;
  padding-right: 0;
}
body.page-desk .seat-cell-name, body.page-admin .floorplan-live-preview .seat-cell-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 100%;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #171a20;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.page-desk .seat-cell-detail, body.page-admin .floorplan-live-preview .seat-cell-detail {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 100%;
  margin: 0;
  font-size: 0.58rem;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.page-desk .seat-cell--member, body.page-admin .floorplan-live-preview .seat-cell--member {
  background: #f4f8fc;
  border-color: #c9d7e8;
}
body.page-desk .seat-cell--guest, body.page-admin .floorplan-live-preview .seat-cell--guest {
  background: #fff7ea;
  border-color: #e5c48a;
}
body.page-desk .seat-cell--guest .seat-cell-name, body.page-admin .floorplan-live-preview .seat-cell--guest .seat-cell-name {
  color: #7a4e12;
}
/* Admin ids_only preview: reserved guest seats (near-stage 02 / N+2) — warm, not gray empty */
body.page-desk .seat-cell.seat-guest-reserve,
body.page-admin .floorplan-live-preview .seat-cell.seat-guest-reserve {
  background: #fff6eb;
  border-color: #e8c49a;
  border-style: solid;
  opacity: 1;
}
body.page-desk .seat-cell.seat-guest-reserve.is-empty,
body.page-admin .floorplan-live-preview .seat-cell.seat-guest-reserve.is-empty {
  background: #fff6eb;
  border-color: #e8c49a;
  border-style: dashed;
  opacity: 0.95;
}
body.page-desk .seat-cell.seat-guest-reserve .seat-cell-id,
body.page-admin .floorplan-live-preview .seat-cell.seat-guest-reserve .seat-cell-id {
  color: #b8894a;
  font-weight: 700;
}
/* Admin: member-forced seat (override) — cool, not warm guest */
body.page-desk .seat-cell.seat-role-member,
body.page-admin .floorplan-live-preview .seat-cell.seat-role-member {
  background: #f4f8fc;
  border-color: #c9d7e8;
  border-style: solid;
  opacity: 1;
}
body.page-desk .seat-cell.seat-role-member.is-empty,
body.page-admin .floorplan-live-preview .seat-cell.seat-role-member.is-empty {
  background: #f4f8fc;
  border-color: #c9d7e8;
  border-style: dashed;
  opacity: 0.95;
}
body.page-desk .seat-cell.seat-role-member .seat-cell-id,
body.page-admin .floorplan-live-preview .seat-cell.seat-role-member .seat-cell-id {
  color: #5a7a9a;
  font-weight: 700;
}

/* STRICT (Mark): 會員 occupant never yellow/orange — beats guest classes */
body.page-desk .seat-cell--member,
body.page-admin .floorplan-live-preview .seat-cell--member,
body.page-desk .seat-cell--member.seat-cell--guest,
body.page-admin .floorplan-live-preview .seat-cell--member.seat-cell--guest,
body.page-desk .seat-cell--member.seat-guest-reserve,
body.page-admin .floorplan-live-preview .seat-cell--member.seat-guest-reserve,
body.page-desk .seat-cell--member.seat-cell--honored,
body.page-admin .floorplan-live-preview .seat-cell--member.seat-cell--honored {
  background: #f4f8fc;
  border-color: #c9d7e8;
  border-style: solid;
  opacity: 1;
}
body.page-desk .seat-cell--member .seat-cell-name,
body.page-admin .floorplan-live-preview .seat-cell--member .seat-cell-name,
body.page-desk .seat-cell--member.seat-cell--guest .seat-cell-name,
body.page-admin .floorplan-live-preview .seat-cell--member.seat-cell--guest .seat-cell-name {
  color: #171a20;
}
body.page-desk .seat-cell--member .seat-cell-id,
body.page-admin .floorplan-live-preview .seat-cell--member .seat-cell-id {
  color: #5a7a9a;
  font-weight: 700;
}

/* Member sitting on a guest-designated seat: never keep guest orange */
body.page-desk .seat-cell--member.seat-guest-reserve,
body.page-admin .floorplan-live-preview .seat-cell--member.seat-guest-reserve,
body.page-desk .seat-cell.seat-role-member.seat-guest-reserve,
body.page-admin .floorplan-live-preview .seat-cell.seat-role-member.seat-guest-reserve {
  background: #f4f8fc;
  border-color: #c9d7e8;
  border-style: solid;
  opacity: 1;
}
body.page-desk .seat-cell--member.seat-guest-reserve .seat-cell-id,
body.page-admin .floorplan-live-preview .seat-cell--member.seat-guest-reserve .seat-cell-id,
body.page-desk .seat-cell.seat-role-member.seat-guest-reserve .seat-cell-id,
body.page-admin .floorplan-live-preview .seat-cell.seat-role-member.seat-guest-reserve .seat-cell-id {
  color: #5a7a9a;
  font-weight: 700;
}
body.page-desk .seat-cell--member.seat-guest-reserve .seat-cell-name,
body.page-admin .floorplan-live-preview .seat-cell--member.seat-guest-reserve .seat-cell-name {
  color: #171a20;
}

/* Admin preview: clickable seats to pick 來賓 / 會員 */
body.page-admin .floorplan-live-preview .seat-cell--role-editable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
body.page-admin .floorplan-live-preview .seat-cell--role-editable:hover,
body.page-admin .floorplan-live-preview .seat-cell--role-editable:focus {
  outline: 2px solid #c9a227;
  outline-offset: 1px;
  z-index: 1;
}
body.page-admin .floorplan-live-preview {
  position: relative;
}
body.page-admin .seat-role-menu {
  position: absolute;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 6.5rem;
  padding: 4px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}
body.page-admin .seat-role-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  color: #1a1a1a;
  min-height: 2.5rem;
}
body.page-admin .seat-role-menu button:hover,
body.page-admin .seat-role-menu button:focus {
  background: #f3f5f8;
  outline: none;
}
body.page-admin .seat-role-menu button[aria-current="true"] {
  background: #fff6eb;
  font-weight: 700;
  color: #7a4e12;
}
body.page-admin .seat-role-menu button[data-role="member"][aria-current="true"] {
  background: #eef4fa;
  color: #3a5a7a;
}
body.page-admin .seat-role-menu button[data-role="auto"][aria-current="true"] {
  background: #f0f1f3;
  color: #444;
}
body.page-desk .seat-cell.is-empty, body.page-admin .floorplan-live-preview .seat-cell.is-empty {
  background: #fafbfc;
  border-style: dashed;
  border-color: #dde1e7;
  opacity: 0.7;
  min-height: 1.55rem;
  padding-top: 0.2rem;
  padding-bottom: 0.18rem;
}
body.page-desk .seat-cell.is-empty .seat-cell-name, body.page-admin .floorplan-live-preview .seat-cell.is-empty .seat-cell-name,
body.page-desk .seat-cell.is-empty .seat-cell-detail, body.page-admin .floorplan-live-preview .seat-cell.is-empty .seat-cell-detail {
  display: none;
}
/* 控制台: equal-width boxes = longest "P · Name"; column still max-content */
body.page-desk .seat-workdesk-seats, body.page-admin .floorplan-live-preview .seat-workdesk-seats {
  display: inline-grid;
  grid-template-columns: 1fr;
  gap: 2px;
  width: max-content;
  justify-items: stretch;
}
body.page-desk .seat-workdesk .seat-cell, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 0.12rem 0.28rem;
  border-radius: 4px;
  box-sizing: border-box;
}
body.page-desk .seat-workdesk .seat-cell-id, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell-id {
  display: inline;
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #1e3a5f;
  line-height: 1.15;
}
body.page-desk .seat-workdesk .seat-cell-id::after, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell-id::after {
  content: " · ";
  font-weight: 600;
  color: #8a94a6;
}
body.page-desk .seat-workdesk .seat-cell-body, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell-body {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 0;
  gap: 0;
}
body.page-desk .seat-workdesk .seat-cell-name, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell-name {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  max-width: 100%;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
}
/* 控制台: name only — hide any leftover detail line */
body.page-desk .seat-workdesk .seat-cell-detail, body.page-admin .floorplan-live-preview .seat-workdesk .seat-cell-detail {
  display: none !important;
}
/* Desk + Admin: click 控制台 person / empty slot → member picker / clear */
body.page-desk .floorplan-seats .seat-cell--control-editable,
body.page-admin .floorplan-live-preview .seat-cell--control-editable {
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
body.page-desk .floorplan-seats .seat-cell--control-editable:hover,
body.page-desk .floorplan-seats .seat-cell--control-editable:focus-visible,
body.page-desk .floorplan-seats .seat-cell--control-editable.is-picking,
body.page-admin .floorplan-live-preview .seat-cell--control-editable:hover,
body.page-admin .floorplan-live-preview .seat-cell--control-editable:focus-visible,
body.page-admin .floorplan-live-preview .seat-cell--control-editable.is-picking {
  background: #e8f5ef;
  border-color: #0c6e56;
  box-shadow: 0 0 0 2px rgba(12, 110, 86, 0.18);
  outline: none;
}
body.page-admin .control-member-picker {
  position: absolute;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(18rem, calc(100% - 12px));
  max-height: min(22rem, 70vh);
  padding: 8px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}
body.page-admin .control-member-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body.page-admin .control-member-picker-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e3a5f;
}
body.page-admin .control-member-picker-close {
  appearance: none;
  border: 0;
  background: #f3f5f8;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #444;
}
body.page-admin .control-member-picker-close:hover,
body.page-admin .control-member-picker-close:focus {
  background: #e8ecf1;
  outline: none;
}
body.page-admin .control-member-picker-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 1rem;
  min-height: 2.6rem;
}
body.page-admin .control-member-picker-search:focus {
  border-color: #0c6e56;
  outline: none;
  box-shadow: 0 0 0 2px rgba(12, 110, 86, 0.15);
}
body.page-admin .control-member-picker-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  flex: 1;
}
body.page-admin .control-member-picker-option {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  color: #1a1a1a;
  min-height: 2.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
body.page-admin .control-member-picker-option:hover,
body.page-admin .control-member-picker-option:focus {
  background: #f3f5f8;
  outline: none;
}
body.page-admin .control-member-picker-option.is-current,
body.page-admin .control-member-picker-option[aria-selected="true"] {
  background: #e8f5ef;
  font-weight: 700;
  color: #0c6e56;
}
body.page-admin .control-member-picker-name {
  font-size: 0.95rem;
  line-height: 1.25;
}
body.page-admin .control-member-picker-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: #667085;
  line-height: 1.2;
}
body.page-admin .control-member-picker-option.is-current .control-member-picker-meta {
  color: #3d7a66;
}
body.page-admin .control-member-picker-empty {
  margin: 0.4rem 0.2rem 0.2rem;
  font-size: 0.85rem;
}
@media (max-width: 720px) {
  body.page-desk .seat-board, body.page-admin .floorplan-live-preview .seat-board {
    padding: 0.55rem 0.3rem 0.8rem;
  }
  body.page-desk .seat-board-grid, body.page-admin .floorplan-live-preview .seat-board-grid {
    gap: 0.45rem 0.28rem;
  }
  body.page-desk .seat-table, body.page-admin .floorplan-live-preview .seat-table {
    grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    gap: 3px;
    padding: 3px;
    border-radius: 8px;
  }
  body.page-desk .seat-table-spine, body.page-admin .floorplan-live-preview .seat-table-spine {
    font-size: 0.9rem;
    border-radius: 4px;
  }
  body.page-desk .seat-table-side, body.page-admin .floorplan-live-preview .seat-table-side {
    gap: 3px;
  }
  body.page-desk .seat-cell, body.page-admin .floorplan-live-preview .seat-cell {
    min-height: 0;
    padding: 0.22rem 0.26rem 0.2rem;
    border-radius: 5px;
  }
  body.page-desk .seat-cell-name, body.page-admin .floorplan-live-preview .seat-cell-name {
    font-size: 0.64rem;
    line-height: 1.18;
  }
  body.page-desk .seat-cell-detail, body.page-admin .floorplan-live-preview .seat-cell-detail {
    font-size: 0.52rem;
    line-height: 1.18;
  }
  body.page-desk .seat-cell-id, body.page-admin .floorplan-live-preview .seat-cell-id {
    font-size: 0.42rem;
  }
  body.page-desk .seat-board-stage, body.page-admin .floorplan-live-preview .seat-board-stage {
    max-width: none;
    min-height: 28px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }
  body.page-desk .seat-workdesk-seats, body.page-admin .floorplan-live-preview .seat-workdesk-seats {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

body.page-desk .floorplan-table-label, body.page-admin .floorplan-live-preview .floorplan-table-label {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 1.4rem;
  min-height: 1.4rem;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #0c6e56;
  color: #0c6e56;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
body.page-desk .floorplan-seat, body.page-admin .floorplan-live-preview .floorplan-seat {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 11%;
  max-width: 5.5rem;
  min-height: 1.6rem;
  padding: 0.15rem 0.25rem;
  box-sizing: border-box;
  border-radius: 4px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #0c6e56;
  font-size: 0.58rem;
  line-height: 1.15;
  text-align: center;
  overflow: hidden;
}



body.page-desk .seat-table--round, body.page-admin .floorplan-live-preview .seat-table--round {
  border-radius: 999px;
  background: #f7faf8;
  border-color: #9bb9a8;
}
body.page-desk .seat-table--round .seat-table-spine, body.page-admin .floorplan-live-preview .seat-table--round .seat-table-spine {
  border-radius: 999px;
}
body.page-desk .seat-table--round .seat-table-side--right.is-empty-side, body.page-admin .floorplan-live-preview .seat-table--round .seat-table-side--right.is-empty-side {
  display: none;
}
body.page-desk .seat-table--round, body.page-admin .floorplan-live-preview .seat-table--round {
  grid-template-columns: minmax(0, 1fr) 26px;
}

body.page-admin .floorplan-settings {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ececec;
}
body.page-admin .floorplan-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}
body.page-admin .floorplan-settings label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
}
body.page-admin .floorplan-xy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
body.page-admin .floorplan-xy input {
  width: 4.2rem;
}
/* Interview controls: one compact horizontal line (beat .admin-panel input{width:100%}) */
body.page-admin .floorplan-backrow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  font-size: 0.92rem;
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
}
body.page-admin .floorplan-backrow-title {
  display: block;
  line-height: 1.35;
  writing-mode: horizontal-tb;
}
body.page-admin .floorplan-backrow-controls {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.35rem 0.4rem;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
}
/* Compact number inputs — must outrank .admin-panel input { width:100%; height:40px } */
body.page-admin .admin-panel .floorplan-xy input,
body.page-admin .admin-panel .floorplan-backrow-controls input[type="number"],
body.page-admin .floorplan-settings .floorplan-xy input[type="number"] {
  width: 3rem !important;
  min-width: 3rem !important;
  max-width: 3rem !important;
  flex: 0 0 3rem !important;
  min-height: 2rem !important;
  height: 2rem !important;
  padding: 0 0.3rem !important;
  box-sizing: border-box;
  text-align: center;
}
body.page-admin .floorplan-check {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  flex: 0 0 auto;
  font-size: inherit;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  cursor: pointer;
}
body.page-admin .admin-panel .floorplan-check input[type="checkbox"],
body.page-admin .floorplan-check input[type="checkbox"] {
  width: 1rem !important;
  min-width: 1rem !important;
  max-width: 1rem !important;
  min-height: 1rem !important;
  height: 1rem !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
}
body.page-admin .floorplan-check span {
  writing-mode: horizontal-tb;
  white-space: nowrap;
  line-height: 1.3;
}
body.page-admin .floorplan-xy-sep {
  flex: 0 0 auto;
  line-height: 1;
}
body.page-admin .floorplan-backrow-unit {
  flex: 0 0 auto;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  font-size: 0.85rem;
}
body.page-admin .floorplan-settings-hint {
  margin: 0.6rem 0 0.2rem;
  font-size: 0.85rem;
}
@media (max-width: 720px) {
  body.page-admin .floorplan-settings-grid {
    grid-template-columns: 1fr;
  }
}


/* Admin live seating preview panel */
body.page-admin .floorplan-live-preview-wrap {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #ececec;
}
body.page-admin .floorplan-live-preview-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}
body.page-admin .floorplan-live-preview-hint {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}
body.page-admin .floorplan-live-preview {
  overflow-x: auto;
  max-width: 100%;
  padding: 0.35rem 0 0.2rem;
}
body.page-admin .floorplan-live-preview .floorplan-zones {
  display: none;
}
body.page-admin .floorplan-live-preview .floorplan-seats > h2 {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}
body.page-admin .floorplan-live-preview .seat-board {
  max-width: 100%;
}
body.page-admin .floorplan-live-preview.is-loading {
  opacity: 0.55;
}
body.page-admin .floorplan-live-preview-empty {
  margin: 0;
  padding: 0.75rem;
  background: #f7f8fa;
  border: 1px dashed #d0d5dd;
  border-radius: 10px;
  color: #667085;
  font-size: 0.9rem;
}


/* Reception seating: seat names sized so ~9-letter first name (Christina) fits one line */
body.page-desk .floorplan-seats .seat-cell-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.48rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-height: calc(1.12em * 2);
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  /* Keep whole words (Christina) on one line; wrap at spaces only */
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
/* Hide blank/member specialty so vertical space collapses (desk + admin preview) */
body.page-desk .floorplan-seats .seat-cell--no-specialty .seat-cell-detail,
body.page-desk .floorplan-seats .seat-cell-detail.is-blank,
body.page-admin .floorplan-live-preview .seat-cell--no-specialty .seat-cell-detail,
body.page-admin .floorplan-live-preview .seat-cell-detail.is-blank {
  display: none;
}
body.page-desk .floorplan-seats .seat-cell--member:not(.seat-cell--guest) .seat-cell-detail,
body.page-admin .floorplan-live-preview .seat-cell--member:not(.seat-cell--guest) .seat-cell-detail {
  display: none;
}
/* Covered member (有替代人): show 「由 XXX 替代」 on seat */
body.page-desk .floorplan-seats .seat-cell--substituted .seat-cell-detail,
body.page-admin .floorplan-live-preview .seat-cell--substituted .seat-cell-detail {
  display: block;
  color: #6b21a8;
  font-weight: 600;
}
body.page-desk .floorplan-seats .seat-cell--substitute .seat-cell-detail,
body.page-admin .floorplan-live-preview .seat-cell--substitute .seat-cell-detail {
  color: #6b21a8;
  font-weight: 600;
}
/* Names-only / no specialty: no reserved gap below name */
body.page-desk .seat-cell.seat-cell--no-specialty,
body.page-admin .floorplan-live-preview .seat-cell.seat-cell--no-specialty {
  min-height: 0;
  padding-top: 0.22rem;
  padding-bottom: 0.18rem;
}
body.page-desk .seat-cell.seat-cell--no-specialty .seat-cell-body,
body.page-admin .floorplan-live-preview .seat-cell.seat-cell--no-specialty .seat-cell-body {
  gap: 0;
}
body.page-desk .floorplan-seats .seat-cell--type-editable {
  cursor: pointer;
}
body.page-desk .floorplan-seats .seat-cell--type-editable:hover,
body.page-desk .floorplan-seats .seat-cell--type-editable:focus-visible,
body.page-desk .floorplan-seats .seat-cell--type-editable.is-picking {
  outline: none;
  box-shadow: 0 0 0 2px rgba(12, 110, 86, 0.28);
  border-color: #0c6e56;
}
body.page-desk .seat-cell--honored {
  background: #fff4d6;
  border-color: #e0b84a;
}
body.page-desk .seat-cell--observer {
  background: #b7d4f5;
  border-color: #4a7eb8;
}
body.page-desk .seat-cell--substitute {
  background: #f3eefc;
  border-color: #c4b0e4;
}
body.page-desk .seat-type-menu {
  position: absolute;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 7.5rem;
  padding: 4px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(6, 20, 40, 0.14);
}
body.page-desk .seat-type-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: #171a20;
  cursor: pointer;
}
body.page-desk .seat-type-menu button:hover,
body.page-desk .seat-type-menu button:focus {
  background: #eef7f3;
  outline: none;
}
body.page-desk .seat-type-menu button[aria-current="true"] {
  background: #0c6e56;
  color: #fff;
}

body.page-desk .seat-type-menu--people {
  min-width: 11rem;
  max-width: min(16rem, 90vw);
  max-height: min(22rem, 60vh);
  overflow-y: auto;
}
body.page-desk .seat-type-menu-head {
  padding: 0.35rem 0.55rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #5b6573;
  letter-spacing: 0.02em;
}
body.page-desk .seat-type-menu-empty {
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
  color: #8a93a0;
}
body.page-desk .seat-type-menu button.seat-type-back {
  color: #0c6e56;
  font-weight: 700;
}
body.page-desk .seat-type-menu button[data-seated="1"] {
  color: #6b7280;
}
body.page-desk .seat-type-menu button.seat-type-disabled,
body.page-desk .seat-type-menu button[data-disabled="1"],
body.page-desk .seat-type-menu button[disabled] {
  color: #9aa3af;
  cursor: not-allowed;
  opacity: 0.72;
  pointer-events: none;
}
body.page-desk .seat-type-hint {
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #9aa3af;
}


/* compact4: comfortable rows + 到場時間 vertically centered with name/status/phone */
body.page-desk .attendance-row {
  min-height: 0 !important;
  padding: 5px 0 !important; /* ~4–6px vertical */
  margin: 0 !important;
  row-gap: 0 !important;
  align-items: center !important;
  line-height: 1.25 !important;
}
body.page-desk .attendance-row > *,
body.page-desk .attendance-row .status,
body.page-desk .attendance-row .phone,
body.page-desk .attendance-row .arrival,
body.page-desk .attendance-row .name,
body.page-desk .attendance-row .specialty,
body.page-desk .attendance-row .seat-id {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  line-height: 1.25 !important;
  min-height: 0 !important;
}
body.page-desk .attendance-row .arrival {
  display: flex !important;
  align-items: center !important;
}
body.page-desk .attendance-row .arrival-edit {
  display: flex !important;
  align-items: center !important;
}
body.page-desk .attendance-row .arrival-ampm {
  display: flex !important;
  align-items: center !important;
}
body.page-desk .attendance-row .status-select,
body.page-desk .attendance-row .arrival-input,
body.page-desk .attendance-row .arrival-edit,
body.page-desk .attendance-row .arrival-ampm,
body.page-desk .attendance-row .phone-action,
body.page-desk .attendance-row button.phone-action {
  min-height: 0 !important;
  height: 24px !important; /* ~22–28px controls */
  max-height: 28px !important;
  line-height: 24px !important; /* match height → vertical center text */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
body.page-desk .attendance-row button.phone-action {
  /* global button{min-height:48px} was inflating every row */
  min-height: 0 !important;
  height: 24px !important;
  max-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 24px !important;
}
@media (max-width: 640px) {
  body.page-desk .attendance-row {
    font-size: 12px !important;
    padding: 5px 0 !important;
    line-height: 1.25 !important;
  }
  body.page-desk .attendance-row > * {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.25 !important;
    font-size: 12px !important;
  }
  body.page-desk .attendance-row .arrival {
    display: flex !important;
    align-items: center !important;
  }
  body.page-desk .attendance-row .arrival-edit,
  body.page-desk .attendance-row .arrival-ampm {
    display: flex !important;
    align-items: center !important;
  }
  body.page-desk .attendance-row .status-select,
  body.page-desk .attendance-row .arrival-input,
  body.page-desk .attendance-row .arrival-edit,
  body.page-desk .attendance-row .arrival-ampm,
  body.page-desk .attendance-row button.phone-action,
  body.page-desk .attendance-row .phone-action {
    min-height: 0 !important;
    height: 26px !important;
    max-height: 28px !important;
    line-height: 26px !important;
    font-size: 12px !important;
  }
}


/* Substitute application button + modal (member home) */
html body.page-home .sub-apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  height: 40px;
  margin: 20px 0 0;
  padding: 0 16px;
  border: 3px solid #171a20;
  border-radius: 4px;
  background: #fff;
  color: #171a20;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
  box-sizing: border-box;
}

html body.page-home .sub-apply-btn:focus,
html body.page-home .sub-apply-btn:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

html body.page-home .logout-form {
  margin-top: 12px;
}

html body.page-home .sub-apply-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

html body.page-home .sub-apply-modal[hidden] {
  display: none !important;
}

html body.page-home .sub-apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

html body.page-home .sub-apply-modal-card {
  position: relative;
  z-index: 1;
  width: min(96vw, 420px);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 40px 20px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

html body.page-home .sub-apply-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171a20;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

html body.page-home .sub-apply-modal-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #171a20;
  padding-top: 0;
}

html body.page-home .sub-apply-label {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #171a20;
}

html body.page-home .sub-apply-label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 29, 31, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #171a20;
  font-size: 15px;
  line-height: 1.45;
  box-sizing: border-box;
  font-family: inherit;
}

html body.page-home .sub-apply-label input:focus {
  outline: 2px solid #0071e3;
  outline-offset: 1px;
}

html body.page-home .sub-apply-fieldset {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
}

html body.page-home .sub-apply-fieldset legend {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #171a20;
}

html body.page-home .sub-apply-choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 400;
  color: #171a20;
  cursor: pointer;
}

html body.page-home .sub-apply-choice input[type="radio"] {
  appearance: auto;
  -webkit-appearance: radio;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: #171a20;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html body.page-home .sub-apply-status {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #15803d;
}

html body.page-home .sub-apply-status.is-error {
  color: #b91c1c;
}

html body.page-home .sub-apply-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-sizing: border-box;
}

html body.page-home .sub-apply-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

html body.page-home .sub-apply-submit:focus,
html body.page-home .sub-apply-submit:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

body.sub-apply-modal-open {
  overflow: hidden;
}


/* Admin 登記替代人 — reuse .sub-apply-* under page-admin */
body.page-admin .admin-sub-register-wrap {
  margin: 0 0 1.25rem;
}
body.page-admin .admin-sub-register-btn {
  display: flex;
  width: 100%;
  box-sizing: border-box;
}

html body.page-admin .sub-apply-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
html body.page-admin .sub-apply-modal[hidden] {
  display: none !important;
}
html body.page-admin .sub-apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
html body.page-admin .sub-apply-modal-card {
  position: relative;
  z-index: 1;
  width: min(96vw, 420px);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 40px 20px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
html body.page-admin .sub-apply-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171a20;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
html body.page-admin .sub-apply-modal-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #171a20;
  padding-top: 0;
}
html body.page-admin .sub-apply-label {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #171a20;
}
html body.page-admin .sub-apply-label input,
html body.page-admin .sub-apply-label select {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 29, 31, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #171a20;
  font-size: 15px;
  line-height: 1.45;
  box-sizing: border-box;
  font-family: inherit;
}
html body.page-admin .sub-apply-label input:focus,
html body.page-admin .sub-apply-label select:focus {
  outline: 2px solid #0071e3;
  outline-offset: 1px;
}
html body.page-admin .sub-apply-fieldset {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
}
html body.page-admin .sub-apply-fieldset legend {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #171a20;
}
html body.page-admin .sub-apply-choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 400;
  color: #171a20;
  cursor: pointer;
}
html body.page-admin .sub-apply-choice input[type="radio"] {
  appearance: auto;
  -webkit-appearance: radio;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: #171a20;
  border: 0;
  background: transparent;
  box-shadow: none;
}
html body.page-admin .sub-apply-status {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #15803d;
}
html body.page-admin .sub-apply-status.is-error {
  color: #b91c1c;
}
html body.page-admin .sub-apply-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-sizing: border-box;
}
html body.page-admin .sub-apply-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
html body.page-admin .sub-apply-submit:focus,
html body.page-admin .sub-apply-submit:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}


/* Desk 登記替代人 modal (status → 替代人) */
html body.page-desk .sub-apply-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
html body.page-desk .sub-apply-modal[hidden] {
  display: none !important;
}
html body.page-desk .sub-apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
html body.page-desk .sub-apply-modal-card {
  position: relative;
  z-index: 1;
  width: min(96vw, 420px);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 40px 20px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
html body.page-desk .sub-apply-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171a20;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
html body.page-desk .sub-apply-modal-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: #171a20;
  padding-top: 0;
}
html body.page-desk .sub-apply-member-line {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.4;
  color: #3a3d44;
}
html body.page-desk .sub-apply-label {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #171a20;
}
html body.page-desk .sub-apply-label input,
html body.page-desk .sub-apply-label select {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 29, 31, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #171a20;
  font-size: 15px;
  line-height: 1.45;
  box-sizing: border-box;
  font-family: inherit;
}
html body.page-desk .sub-apply-label input:focus,
html body.page-desk .sub-apply-label select:focus {
  outline: 2px solid #0071e3;
  outline-offset: 1px;
}
html body.page-desk .sub-apply-fieldset {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
}
html body.page-desk .sub-apply-fieldset legend {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #171a20;
}
html body.page-desk .sub-apply-choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 400;
  color: #171a20;
  cursor: pointer;
}
html body.page-desk .sub-apply-choice input[type="radio"] {
  appearance: auto;
  -webkit-appearance: radio;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: #171a20;
  border: 0;
  background: transparent;
  box-shadow: none;
}
html body.page-desk .sub-apply-status {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #15803d;
}
html body.page-desk .sub-apply-status.is-error {
  color: #b91c1c;
}
html body.page-desk .sub-apply-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid #171a20;
  border-radius: 4px;
  background: #171a20;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-sizing: border-box;
}
html body.page-desk .sub-apply-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
html body.page-desk .sub-apply-submit:focus,
html body.page-desk .sub-apply-submit:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}


/* Substitute register: required * on all fields (admin / desk / home) */
html body.page-admin .sub-apply-label .req-star,
html body.page-admin .sub-apply-fieldset legend .req-star,
html body.page-desk .sub-apply-label .req-star,
html body.page-desk .sub-apply-fieldset legend .req-star,
html body.page-home .sub-apply-label .req-star,
html body.page-home .sub-apply-fieldset legend .req-star {
  color: #dc2626;
  font-weight: 700;
  margin-left: 0.15em;
}
