:root { color-scheme: light; --ink: #162f35; --muted: #647477; --teal: #176c61; --teal-dark: #104f48; --bg: #f5f6f2; --line: #dce4df; --soft: #edf5ee; font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Arial, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: var(--teal); text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .secondary, .danger-secondary { min-height: 46px; border-radius: 10px; cursor: pointer; font-weight: 650; }
button { border: 0; }
button:disabled { opacity: .56; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #f0b45c; outline-offset: 3px; }
input, select { width: 100%; min-height: 50px; padding: 11px 13px; background: white; border: 1px solid #bdccc5; border-radius: 9px; color: var(--ink); }
input:focus, select:focus { border-color: var(--teal); }
input[readonly] { background: #f7f9f6; }
label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 8px; }
label span { font-weight: 450; margin-left: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; letter-spacing: -.045em; line-height: 1.17; font-weight: 650; }
h2 { font-size: 22px; letter-spacing: -.025em; line-height: 1.3; font-weight: 650; margin-bottom: 8px; }
h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
p { margin-bottom: 16px; }
.primary { background: var(--teal); color: white; padding: 12px 20px; }
.primary:hover { background: var(--teal-dark); }
.secondary { display: inline-flex; align-items: center; justify-content: center; background: white; color: var(--ink); border: 1px solid var(--line); padding: 10px 15px; }
.secondary:hover { background: #edf3ee; }
.danger-secondary { color: #9d3f2f; background: #fff5ef; padding: 10px 16px; border: 1px solid #efdad0; white-space: nowrap; }
.danger-secondary:hover { background: #ffe9dd; }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: var(--teal); background: transparent; padding: 8px 10px; font-weight: 550; font-size: 14px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.text-button:hover { text-decoration-color: currentColor; }
.full-width { width: 100%; }
.button-arrow { margin-left: 18px; }
.muted, .field-hint { color: var(--muted); }
.small { font-size: 13px; }
.field-hint { font-size: 13px; line-height: 1.65; margin-top: 10px; margin-bottom: 22px; }
.eyebrow { font-size: 11px; letter-spacing: .14em; font-weight: 750; color: var(--teal); margin-bottom: 20px; }
.wordmark { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.wordmark > span[lang] { font-size: 13px; color: var(--muted); font-weight: 450; margin-left: 2px; }
.brand-mark { display: inline-block; width: 22px; height: 22px; border: 2px solid var(--teal); border-radius: 7px; transform: rotate(-8deg); position: relative; }
.brand-mark::after { content: ""; position: absolute; width: 8px; height: 4px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); top: 5px; left: 5px; transform: rotate(-45deg); }
.notice { padding: 12px 15px; background: #edf4ed; border-radius: 10px; font-size: 14px; color: #285749; white-space: pre-line; overflow-wrap: anywhere; border: 1px solid #dbe8d9; }
.notice.error { background: #fff0ea; border-color: #ecd3c6; color: #8c3528; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.attendee-page { min-height: 100svh; background: radial-gradient(ellipse at 50% 0, #e4ede3 0, var(--bg) 55%); }
.checkin-shell { max-width: 460px; margin: 0 auto; padding: 45px 20px 24px; }
.checkin-shell > .wordmark { margin: 0 4px 30px; }
.checkin-card { background: #fff; border: 1px solid #e2e9df; border-radius: 23px; padding: 31px 27px; box-shadow: 0 14px 50px #163c2910; }
.checkin-card h1 { overflow-wrap: anywhere; margin-bottom: 12px; }
.checkin-card h1 span { font-size: 24px; }
.event-time { font-size: 13px; margin-bottom: 30px; }
.checkin-card input { min-height: 57px; font-size: 19px; }
.checkin-card .primary { min-height: 57px; font-size: 17px; }
.checkin-card #retry-button { margin-top: 8px; }
.forget-button { width: 100%; margin-top: 13px; font-size: 12px; color: var(--muted); font-weight: 450; }
.privacy-note { color: #77837f; text-align: center; font-size: 11px; line-height: 1.9; margin: 24px 8px 0; }
.success { padding-top: 12px; text-align: center; }
.success-mark { width: 66px; height: 66px; border-radius: 50%; background: #e4f1df; color: var(--teal); font-size: 35px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.success h2 { font-size: 23px; }
.success h2 span { display: block; font-size: 18px; font-weight: 500; margin-top: 4px; }
.success-name { font-size: 21px; font-weight: 650; margin: 24px 0 4px; overflow-wrap: anywhere; }
.success #success-time { font-size: 13px; }
.success-note { font-size: 14px; color: var(--muted); margin: 25px 0 0; }
.admin-shell { max-width: 1200px; margin: 0 auto; padding: 0 36px; }
.admin-header { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 35px; }
.header-actions { display: flex; gap: 15px; align-items: center; }
.organizer-label { font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); padding-right: 16px; }
.card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.login-card { max-width: 420px; margin: 70px auto 110px; padding: 34px; }
.login-card .primary { margin-top: 24px; }
.login-card .muted { margin-bottom: 28px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 27px; gap: 24px; }
.page-intro .eyebrow { margin-bottom: 10px; }
.page-intro h1 { margin-bottom: 0; }
.page-intro > p { margin-bottom: 0; font-size: 13px; }
.start-panel { margin-bottom: 30px; }
.start-panel .muted { font-size: 14px; margin-bottom: 20px; }
.start-form { display: flex; gap: 14px; align-items: flex-end; }
.start-form .primary { min-height: 50px; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.event-toolbar { display: flex; align-items: flex-end; gap: 16px; margin: 27px 0 20px; }
.event-toolbar .grow { max-width: 540px; }
.refresh-state { color: var(--muted); font-size: 11px; margin: 0 0 14px auto; white-space: nowrap; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.event-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.event-heading h2 { margin: 14px 0 8px; overflow-wrap: anywhere; }
.event-heading > div { min-width: 0; }
.event-heading .danger-secondary { font-size: 12px; min-height: 40px; }
.badge { background: #edf0ed; color: #647068; border-radius: 20px; padding: 5px 9px; font-size: 10px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; display: inline-block; }
.badge.open { color: #286348; background: #e7f2e3; }
.attendee-summary { margin: 13px 0 20px; padding: 17px 0; border-top: 1px solid #e7ece6; border-bottom: 1px solid #e7ece6; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.attendee-summary > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.attendee-count { font-size: 38px; font-weight: 600; letter-spacing: -.06em; line-height: 1.2; }
.attendee-summary .muted { font-size: 13px; }
.export-actions { display: flex; align-items: center; gap: 4px; }
.small-button { font-size: 12px; min-height: 40px; padding: 8px 12px; }
.table-scroll { overflow-x: auto; }
.attendance-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.attendance-table th { color: var(--muted); font-size: 11px; font-weight: 550; padding: 0 0 12px; }
.attendance-table td { padding: 14px 0; border-top: 1px solid #eef1ec; vertical-align: top; }
.attendance-table td:first-child { color: #96a09a; width: 32px; }
.attendance-table td:nth-child(2) { overflow-wrap: anywhere; padding-right: 10px; }
.attendance-table td:last-child { color: var(--muted); font-size: 11px; white-space: nowrap; }
.duplicate-badge { display: block; font-size: 10px; color: #976222; margin-top: 3px; }
.empty-state { text-align: center; padding: 35px 16px; color: var(--muted); font-size: 13px; }
.empty-state h3 { color: var(--ink); }
.empty-state p { margin-bottom: 0; }
.empty-mark { display: inline-block; font-size: 29px; color: #8aa28d; margin-bottom: 13px; }
.qr-panel .eyebrow { margin-bottom: 10px; }
.qr-panel h2 { font-size: 20px; overflow-wrap: anywhere; margin-bottom: 20px; }
.qr-panel select { min-height: 43px; font-size: 12px; }
.qr-frame { margin: 20px auto 15px; width: 100%; max-width: 270px; padding: 7px; border: 1px solid #edf0ea; border-radius: 12px; background: white; }
.qr-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.qr-panel .field-hint { font-size: 11px; margin-bottom: 14px; }
.share-url { font-size: 11px; min-height: 41px; }
.qr-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.qr-actions .secondary { min-height: 40px; font-size: 12px; padding: 8px 12px; }
.qr-actions .text-button { font-size: 12px; min-height: 40px; padding: 7px; }
.print-instruction { display: none; }
.admin-footer { font-size: 11px; color: #8b978f; margin: 45px 0 24px; }
@media (max-width: 900px) {
  .admin-shell { padding: 0 22px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.4fr) minmax(255px, 1fr); gap: 16px; }
  .card { padding: 21px; }
  .page-intro h1 { font-size: 27px; }
  .event-heading { flex-direction: column; gap: 0; }
  .event-heading .danger-secondary { margin-bottom: 12px; }
  .attendee-summary { flex-wrap: wrap; }
  .refresh-state { font-size: 10px; white-space: normal; text-align: right; }
}
@media (max-width: 660px) {
  .admin-shell { padding: 0 16px; }
  .admin-header { height: 72px; margin-bottom: 24px; }
  .organizer-label { display: none; }
  .page-intro { display: block; }
  .page-intro > p { margin-top: 13px; }
  .page-intro > p br { display: none; }
  .page-intro h1 { font-size: 28px; }
  .start-form { display: block; }
  .start-form .primary { width: 100%; margin-top: 13px; }
  .event-toolbar { gap: 10px; flex-wrap: wrap; }
  .event-toolbar .grow { flex-basis: calc(100% - 100px); }
  .event-toolbar .refresh-state { order: 3; width: 100%; text-align: left; margin: 0; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .attendance-panel { order: 2; }
  .qr-panel { order: 1; }
  .qr-frame { max-width: 220px; }
  .qr-actions { justify-content: center; }
  .event-heading { flex-direction: row; gap: 12px; }
  .event-heading .danger-secondary { padding: 8px; font-size: 11px; }
  .login-card { margin: 40px auto 80px; }
}
@media (max-width: 380px) {
  .checkin-shell { padding: 30px 13px 20px; }
  .checkin-card { padding: 26px 22px; }
  .checkin-card h1 { font-size: 28px; }
  .checkin-shell .wordmark { font-size: 14px; }
  .checkin-shell .wordmark > span[lang] { font-size: 12px; }
}
@media print {
  @page { size: A4; margin: 20mm; }
  body { background: white; }
  .admin-shell { max-width: none; padding: 0; }
  .admin-header, #global-message, .page-intro, #start-panel, #open-reminder, .event-toolbar, .attendance-panel, .admin-footer, #login-panel, #no-events { display: none !important; }
  .workspace-grid { display: block; }
  .qr-panel { border: 0; padding: 0; text-align: center; }
  .qr-panel .eyebrow { font-size: 14px; margin-top: 15mm; }
  .qr-panel h2 { font-size: 28px; margin: 10mm 0; }
  .qr-panel select, .qr-actions, #qr-help { display: none; }
  .qr-frame { max-width: 110mm; width: 110mm; padding: 0; border: 0; margin: 12mm auto; }
  .share-url { border: 0; text-align: center; background: white; font-size: 12px; padding: 0; width: 100%; }
  .print-instruction { display: block; font-size: 15px; margin-top: 8mm; line-height: 2; }
}

/* Chinese-first labels and explicit, manual refresh. */
:root { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif; }
.heading-en { display: block; font-size: .58em; font-weight: 500; letter-spacing: 0; margin-top: 7px; color: var(--muted); }
.wordmark { flex-wrap: wrap; row-gap: 2px; }
.wordmark .brand-mark { flex-shrink: 0; }
.eyebrow { letter-spacing: .03em; }
.refresh-controls { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.refresh-button { min-height: 52px; font-size: 16px; white-space: nowrap; }
.refresh-button > span { font-size: 22px; margin-right: 5px; }
.refresh-state { margin: 0; font-size: 12px; white-space: normal; }
.event-toolbar { margin-bottom: 8px; align-items: flex-start; }
.refresh-hint { margin-top: 0; margin-bottom: 24px; }
.delete-panel { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; }
.delete-panel .field-hint { margin: 0 0 12px; }
.attendance-table th:first-child { min-width: 58px; padding-right: 8px; }
.confirm-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 26px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; }
.confirm-dialog::backdrop { background: #162f3580; }
.confirm-dialog p { overflow-wrap: anywhere; }
.confirm-meeting { font-weight: 650; margin-top: 16px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
@media (max-width: 660px) {
  .event-toolbar .grow { flex-basis: 100%; max-width: none; }
  .refresh-controls { width: 100%; align-items: stretch; }
  .refresh-state { text-align: left; }
  .event-heading { flex-direction: column; gap: 0; }
  .event-heading .danger-secondary { padding: 10px 14px; font-size: 13px; }
  .export-actions { flex-wrap: wrap; }
  .checkin-shell > .wordmark { column-gap: 7px; }
}
@media print { .refresh-hint, .confirm-dialog { display: none !important; } }
