:root {
  color-scheme: light;
  --bg: #f5f7f2;
  --surface: #ffffff;
  --ink: #1d2823;
  --muted: #68736e;
  --line: #dfe6dc;
  --red: #b7272f;
  --red-deep: #831d2a;
  --green: #24735b;
  --gold: #b97922;
  --blue: #2e658a;
  --warn: #d38a1d;
  --bad: #a63628;
  --shadow: 0 16px 36px rgba(29, 40, 35, 0.1);
  --z-dropdown: 40;
  --z-modal: 80;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef3ec 0%, var(--bg) 42%, #f8faf6 100%);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    system-ui,
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

[hidden] {
  display: none !important;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(18px, 4vw, 48px) 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 3.5vw, 36px);
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.test-user-account {
  position: relative;
  flex: 0 1 250px;
  min-width: 0;
}

.test-user-account-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.test-user-account-trigger:hover,
.test-user-account-trigger[aria-expanded="true"] {
  border-color: #b9c8ba;
  background: #f7faf6;
}

.test-user-account-trigger:focus-visible,
.test-user-menu button:focus-visible,
.test-user-picker-close:focus-visible,
.test-user-load-more:focus-visible,
.test-user-card:focus-visible {
  outline: 3px solid rgba(36, 115, 91, 0.2);
  outline-offset: 2px;
}

.test-user-account-avatar,
.test-user-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #e4eee7;
  color: var(--green);
  font-weight: 800;
}

.test-user-account-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  font-size: 13px;
}

.test-user-account-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.test-user-account-copy span,
.test-user-account-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-user-account-copy span {
  color: var(--muted);
  font-size: 11px;
}

.test-user-account-copy strong {
  font-size: 14px;
}

.test-user-chevron {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.test-user-account-trigger[aria-expanded="true"] .test-user-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.test-user-menu {
  position: absolute;
  z-index: var(--z-dropdown);
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: min(240px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 8px rgba(29, 40, 35, 0.12);
}

.test-user-menu button {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.test-user-menu button:hover {
  background: #f0f5ef;
}

#restoreRealUser {
  color: var(--red-deep);
}

body.test-user-picker-open {
  overflow: hidden;
}

.test-user-picker {
  position: fixed;
  z-index: var(--z-modal);
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 28, 23, 0.58);
  animation: test-user-picker-fade 160ms ease-out;
}

.test-user-picker-dialog {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: min(1180px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f7f9;
  box-shadow: 0 4px 8px rgba(18, 28, 23, 0.18);
  animation: test-user-picker-enter 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.test-user-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.test-user-picker-head > div {
  display: grid;
  gap: 5px;
}

.test-user-picker-head h2 {
  font-size: 20px;
  text-wrap: balance;
}

.test-user-picker-head p,
.test-user-picker-footer p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.test-user-picker-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.test-user-picker-close:hover {
  border-color: #c3cec4;
  background: #f4f7f3;
}

.test-user-picker-search {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: #eef3f5;
}

.test-user-picker-search label {
  color: var(--ink);
  font-size: 14px;
}

.test-user-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.test-user-picker-search input {
  min-height: 46px;
  background: var(--surface);
}

.test-user-picker-search input:focus {
  outline: 3px solid rgba(36, 115, 91, 0.18);
  outline-offset: 1px;
  border-color: var(--green);
}

.test-user-search-submit {
  min-width: 84px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.test-user-search-submit:hover {
  border-color: #1c624e;
  background: #1c624e;
}

.test-user-search-submit:focus-visible {
  outline: 3px solid rgba(36, 115, 91, 0.2);
  outline-offset: 2px;
}

.test-user-picker-error {
  display: none;
  margin: 0 22px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff2f0;
  color: var(--bad);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.test-user-picker-error:not(:empty) {
  display: block;
  margin-top: 12px;
}

.test-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 220px;
  padding: 16px 22px 22px;
  overflow-y: auto;
  background: #f4f7f9;
}

.test-user-grid:empty:not([aria-busy="true"])::before {
  content: "搜索后将在这里显示员工";
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.test-user-grid[aria-busy="true"]::before {
  content: "正在加载员工…";
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  font-size: 14px;
  animation: test-user-loading 900ms ease-in-out infinite alternate;
}

.test-user-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 120px;
  padding: 16px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.test-user-card:hover {
  border-color: #b8c8ba;
  background: #f7faf6;
  box-shadow: none;
}

.test-user-card:active {
  transform: translateY(1px);
}

.test-user-card[aria-pressed="true"],
.test-user-card.is-selected {
  border-color: var(--green);
  background: #edf7f1;
  box-shadow: none;
}

.test-user-card[aria-pressed="true"]::after,
.test-user-card.is-selected::after {
  content: "已选择";
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.test-user-card[aria-disabled="true"],
.test-user-card.is-inactive {
  cursor: not-allowed;
  opacity: 0.58;
}

.test-user-card[aria-disabled="true"]:hover,
.test-user-card[aria-disabled="true"]:active,
.test-user-card.is-inactive:hover,
.test-user-card.is-inactive:active {
  border-color: transparent;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transform: none;
}

.test-user-avatar {
  width: 48px;
  height: 48px;
}

.test-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.test-user-card-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.test-user-card-copy strong,
.test-user-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-user-card-copy strong {
  font-size: 15px;
}

.test-user-card-copy span,
.test-user-department,
.test-user-meta {
  color: var(--muted);
  font-size: 12px;
}

.test-user-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: #fafbf9;
}

.test-user-load-more {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
  color: var(--green);
  font-weight: 800;
}

.test-user-load-more:hover {
  background: #edf7f1;
}

.test-user-load-more:disabled {
  border-color: var(--line);
  background: #f1f4f0;
  color: var(--muted);
}

@keyframes test-user-picker-fade {
  from {
    opacity: 0;
  }
}

@keyframes test-user-picker-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes test-user-loading {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

.icon-button,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.icon-button:hover,
.submit-button:hover {
  border-color: #c7d3c8;
  box-shadow: 0 8px 16px rgba(29, 40, 35, 0.08);
}

.icon-button.primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.icon-button.danger {
  color: var(--red-deep);
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 18px auto 32px;
}

.admin-module-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-module-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.admin-module-tab:hover {
  background: #f1f5ef;
  color: var(--ink);
}

.admin-module-tab.active {
  background: var(--green);
  color: #fff;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.layout,
.review-layout {
  display: grid;
  gap: 14px;
}

.layout {
  grid-template-columns: 320px minmax(480px, 1fr) 340px;
}

.review-layout {
  grid-template-columns: 420px 1fr;
  margin-top: 14px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-help,
.form-message {
  margin: -4px 0 0;
  line-height: 1.5;
  font-size: 12px;
}

.identity-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #d8e1d6;
  border-radius: 8px;
  background: #f6f8f4;
}

.identity-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.identity-box strong {
  font-size: 15px;
}

.auth-debug {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e1d6;
  border-radius: 8px;
  background: #fffdf7;
}

.auth-debug div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-debug span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-debug strong {
  font-size: 13px;
}

.auth-debug ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-debug li[data-type="ok"] {
  color: var(--green);
}

.auth-debug li[data-type="error"] {
  color: var(--bad);
}

.auth-debug li span {
  margin-right: 6px;
  color: inherit;
  font-weight: 700;
}

.qr-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 16px 16px 0;
  padding: 14px;
  border: 1px solid #d8e1d6;
  border-radius: 8px;
  background: #fbfcfa;
  text-align: center;
}

.qr-box div {
  display: grid;
  gap: 3px;
}

.qr-box strong {
  font-size: 15px;
}

.qr-box span,
.qr-box a {
  color: var(--muted);
  font-size: 12px;
}

.qr-box img {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #edf1ea;
  color: var(--muted);
  font-weight: 800;
}

.form-help {
  color: var(--muted);
}

.form-message {
  min-height: 18px;
  color: var(--bad);
  font-weight: 700;
}

.form-message[data-type="ok"] {
  color: var(--green);
}

.camera-panel {
  display: grid;
  gap: 10px;
}

.camera-panel > span {
  color: var(--muted);
  font-weight: 800;
}

.capture-guide {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d8e7d8;
  border-radius: 8px;
  background: #f3faf3;
}

.capture-guide strong {
  color: var(--ink);
  font-size: 15px;
}

.capture-guide span,
.capture-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.capture-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.capture-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.capture-task img {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  background: #edf1ea;
}

.capture-task.selected {
  border-color: var(--green);
  background: #f4fbf5;
  box-shadow: 0 0 0 2px rgba(36, 115, 91, 0.12);
  color: var(--ink);
}

.capture-task span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.capture-task strong {
  flex: 0 0 auto;
  color: var(--ink);
}

.capture-task.complete {
  border-color: #b9d9bd;
  background: #eef8ef;
  color: var(--green);
}

.capture-task.complete.selected {
  border-color: var(--green);
  background: #e7f5e9;
}

.camera-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.camera-actions .icon-button {
  min-width: 0;
  width: 100%;
}

.capture-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.capture-thumbs figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f3;
  aspect-ratio: 1;
}

.capture-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capture-thumbs span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(27, 41, 33, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.admin-panel {
  margin-top: 18px;
}

.meeting-room-config {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meeting-auto-deduction-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.meeting-auto-deduction-copy {
  display: grid;
  gap: 4px;
}

.meeting-auto-deduction-copy > span {
  color: var(--muted);
  font-size: 13px;
}

.meeting-toggle-control {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
}

.meeting-toggle-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.meeting-toggle-control input + span {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.meeting-toggle-control input + span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(27, 41, 33, 0.28);
  transition: transform 160ms ease;
}

.meeting-toggle-control input:checked + span {
  background: var(--primary);
}

.meeting-toggle-control input:checked + span::after {
  transform: translateX(20px);
}

.meeting-toggle-control input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.24);
}

.meeting-room-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.meeting-room-config-head > div {
  display: grid;
  gap: 4px;
}

.meeting-room-config-head span {
  color: var(--muted);
  font-size: 13px;
}

.meeting-room-editor-list {
  display: grid;
  gap: 8px;
}

.meeting-room-editor-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) minmax(260px, 1.6fr) auto auto;
  gap: 8px;
  align-items: center;
}

.meeting-room-editor-row input,
.meeting-room-editor-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
}

.admin-gate {
  display: grid;
  gap: 14px;
}

#adminSettingsContent {
  display: grid;
  gap: 14px;
}

.admin-gate-copy {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #e1d7bf;
  border-radius: 8px;
  background: #fffaf0;
}

.admin-gate-copy span {
  color: var(--muted);
  line-height: 1.55;
}

.admin-user-picker {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfa;
}

.admin-password-dialog-open {
  overflow: hidden;
}

.admin-password-modal {
  position: fixed;
  z-index: var(--z-modal);
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-password-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 23, 0.58);
}

.admin-password-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(620px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  gap: 18px;
  padding: 22px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 20px 54px rgba(18, 28, 23, 0.24);
}

.admin-password-dialog form {
  display: grid;
  gap: 16px;
}

.admin-password-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-password-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.admin-password-head p,
.admin-password-actions p {
  color: var(--muted);
  line-height: 1.5;
}

.admin-password-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-password-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-password-grid input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

.admin-password-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-password-actions p {
  min-height: 24px;
}

.admin-password-actions p[data-type="ok"] {
  color: var(--green);
  font-weight: 700;
}

.admin-password-actions p[data-type="error"] {
  color: var(--red-deep);
  font-weight: 700;
}

.admin-user-picker-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.admin-user-picker-head p,
.admin-user-picker-state,
.admin-user-hydration-warning {
  color: var(--muted);
  line-height: 1.5;
}

.admin-user-picker-group {
  display: grid;
  gap: 8px;
}

.admin-user-selected,
.admin-user-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-user-card.is-inactive {
  background: #f3f5f2;
}

.admin-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-user-avatar-fallback {
  display: grid;
  place-items: center;
  background: #e6eee7;
  color: var(--green);
  font-weight: 800;
}

.admin-user-card-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-user-card-copy strong,
.admin-user-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-card-copy span {
  color: var(--muted);
  font-size: 12px;
}

.admin-user-action,
.admin-user-load-more {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #cbd8cf;
  border-radius: 8px;
  background: var(--surface);
  color: var(--green);
  font-weight: 800;
}

.admin-user-action.danger-action {
  color: var(--red-deep);
}

.admin-user-search {
  display: grid;
  gap: 7px;
}

.admin-user-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-user-search-controls input {
  min-width: 0;
  min-height: 44px;
}

.admin-user-search-controls .icon-button {
  min-height: 44px;
}

.admin-user-picker-state {
  min-height: 24px;
}

.admin-user-hydration-warning {
  min-height: 0;
}

.admin-user-hydration-warning:empty {
  display: none;
}

.admin-user-hydration-warning.warning {
  color: #8a5a00;
  font-weight: 700;
}

.admin-user-picker-state.error {
  color: var(--red-deep);
  font-weight: 700;
}

.admin-user-load-more {
  justify-self: center;
}

.admin-user-empty {
  grid-column: 1 / -1;
  padding: 22px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

body.admin-page .submit-panel {
  display: none;
}

body.admin-page .layout {
  grid-template-columns: minmax(520px, 1fr) 340px;
}

body.admin-page .review-layout {
  grid-template-columns: 420px 1fr;
}

body.user-page .top-actions,
body.user-page .status-strip,
body.user-page .board-panel,
body.user-page .gallery-panel {
  display: none;
}

body.user-page .layout {
  grid-template-columns: minmax(320px, 420px) minmax(320px, 1fr);
}

body.user-page .review-layout {
  grid-template-columns: minmax(0, 1fr);
}

body.user-page .details-panel {
  min-height: 320px;
}

body.display-page .top-actions,
body.display-page .submit-panel,
body.display-page .board-panel,
body.display-page .gallery-panel,
body.display-page .admin-panel,
body.display-page .admin-qr-panel {
  display: none;
}

body.display-page .shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(520px, 1.45fr);
  gap: 14px;
}

body.display-page .status-strip {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

body.display-page .layout,
body.display-page .review-layout {
  display: contents;
}

body.display-page .result-panel,
body.display-page .details-panel {
  min-height: calc(100dvh - 190px);
}

body.display-page .winner-list,
body.display-page .score-details {
  align-content: start;
}

body.display-page .display-result-card.active {
  border-color: var(--red);
  background: #fff8f5;
}

body.display-page .display-result-card.active .rank {
  background: var(--red);
  color: #fff;
}

body.display-page .display-result-card.active .score-badge {
  color: var(--red-deep);
}

.office-editor {
  display: grid;
  gap: 10px;
}

.office-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.office-editor-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.7fr) minmax(88px, 1fr) minmax(120px, 1.1fr) minmax(180px, 1.5fr) auto;
  gap: 8px;
  align-items: center;
}

.points-room-combobox {
  position: relative;
  min-width: 0;
}

.points-room-trigger {
  width: 100%;
  min-height: 42px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.points-room-trigger:focus-visible,
.points-room-combobox.open .points-room-trigger {
  border-color: var(--primary);
  outline: 2px solid color-mix(in srgb, var(--primary) 22%, transparent);
  outline-offset: 1px;
}

.points-room-trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-room-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.points-room-combobox.open .points-room-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.points-room-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  min-width: 260px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(23, 35, 29, 0.16);
}

.points-room-menu[hidden] {
  display: none;
}

.points-room-menu input {
  width: 100%;
  min-width: 0;
}

.points-room-options {
  display: grid;
  max-height: 240px;
  overflow-y: auto;
}

.points-room-option {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.points-room-option:hover,
.points-room-option:focus-visible {
  outline: 0;
  background: var(--soft);
}

.points-room-option.selected {
  background: #eaf4ee;
  color: var(--primary);
  font-weight: 800;
}

.points-room-empty {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 13px;
}

.scene-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scene-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scene-editor-head div {
  display: grid;
  gap: 3px;
}

.scene-editor-head span {
  color: var(--muted);
  font-size: 12px;
}

.scene-editor-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.scene-editor-rows {
  display: grid;
  gap: 10px;
}

.scene-editor-row {
  display: grid;
  grid-template-columns: 72px minmax(150px, 1fr) 96px 112px;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf6;
}

.scene-editor-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scene-standard-field {
  grid-column: 2 / -1;
}

.scene-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  grid-column: 1 / -1;
  gap: 6px;
}

.danger-action {
  color: var(--bad);
}

.scene-standard-field textarea {
  min-height: 92px;
  line-height: 1.55;
}

.scene-sample {
  display: grid;
  width: 72px;
  min-height: 72px;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  align-content: start;
  gap: 4px;
  border: 1px dashed #b9c6bb;
  border-radius: 8px;
  background: #eef2ec;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.scene-sample img,
.scene-sample span {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
}

.scene-sample img {
  object-fit: cover;
}

.scene-sample span {
  display: grid;
  place-items: center;
  min-width: 0;
  background: #f7faf5;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.capture-samples {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 2px;
}

.capture-samples img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8cf;
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.submit-button {
  width: 100%;
  min-height: 46px;
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.submit-button:disabled {
  background: #7c8780;
  border-color: #7c8780;
}

.submit-button.secondary {
  background: #3f5f4c;
  border-color: #3f5f4c;
}

.table-wrap {
  overflow: auto;
  max-height: 514px;
}

body.admin-page .board-panel .table-wrap {
  max-height: none;
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: #fafbf8;
}

tr {
  transition: background 0.16s ease;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.active {
  background: #f0f5ef;
}

.office-name {
  display: grid;
  gap: 2px;
}

.office-name strong {
  font-size: 14px;
}

.office-name span {
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.pill.pending {
  background: var(--blue);
}

.pill.submitted,
.pill.qualified {
  background: var(--green);
}

.pill.review {
  background: var(--warn);
}

.pill.failed,
.pill.waived {
  background: var(--bad);
}

.score {
  font-weight: 900;
}

.score-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.confirm-stamp {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef6e9;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.winner-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.winner-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.winner-card:hover,
.winner-card:focus-visible {
  border-color: #bdcbb5;
  background: #fbfff8;
}

.user-score-card {
  background: #f7fbf4;
}

.rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f8e7c6;
  color: var(--gold);
  font-weight: 900;
}

.winner-card strong {
  display: block;
}

.winner-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.score-badge {
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.score-details {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.score-confirm-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e3d2aa;
  border-radius: 8px;
  background: #fff8e9;
}

.score-confirm-panel.confirmed {
  border-color: #c9dfc0;
  background: #f4fbf0;
}

.score-confirm-panel div {
  display: grid;
  gap: 4px;
}

.score-confirm-panel strong {
  color: var(--ink);
}

.score-confirm-panel span {
  color: var(--muted);
  font-size: 12px;
}

.points-award-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.points-award-control.detail {
  display: flex;
}

.points-award-input {
  width: 72px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
  font-weight: 800;
}

.points-award-input.compact {
  width: 58px;
  height: 30px;
}

.points-award-stamp {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: #eef8ea;
  color: #2e6b35;
  font-size: 12px;
  font-weight: 800;
}

.meeting-admin-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 16px;
}

.meeting-admin-note {
  display: grid;
  gap: 8px;
  margin: 0 16px 16px;
  padding: 12px;
  border: 1px solid #d8e1d6;
  border-radius: 8px;
  background: #f6f8f4;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.meeting-admin-note strong {
  color: var(--ink);
  font-size: 14px;
}

.meeting-admin-note a {
  color: var(--red-deep);
  font-weight: 800;
}

.meeting-status-card {
  cursor: default;
}

.criterion {
  display: grid;
  gap: 7px;
}

.criterion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece5;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #8ba449, var(--gold));
}

.criterion-note {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.criterion-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.criterion-thumb {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: zoom-in;
}

.criterion-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #edf1ea;
}

.criterion-thumb span {
  min-width: 0;
  padding: 0 7px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.criterion-thumb:hover,
.criterion-thumb:focus-visible {
  border-color: var(--green);
  color: var(--green);
}

.criterion-upload,
.admin-scene-upload-list {
  display: grid;
  gap: 10px;
}

.criterion-upload {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 4px;
  padding: 10px;
  border: 1px dashed #c9d4c3;
  border-radius: 8px;
  background: #fbfdf8;
}

.criterion-upload div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.criterion-upload strong {
  color: var(--ink);
  font-size: 13px;
}

.criterion-upload span {
  color: var(--muted);
  font-size: 12px;
}

.admin-scene-upload-list {
  padding: 0 16px 16px;
}

.ai-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8f4;
  color: var(--muted);
  line-height: 1.7;
}

.ai-note strong {
  color: var(--ink);
}

.ai-note span {
  display: block;
}

.danger-note {
  background: #fff4f1;
  color: var(--bad);
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px;
}

body.admin-page .gallery-panel .media-gallery {
  display: block;
  padding: 16px;
}

body.admin-page .gallery-panel .scene-editor {
  border: 0;
  padding: 0;
  background: transparent;
}

.media-item {
  min-height: 172px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.media-preview-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.media-item img,
.media-item video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf1ea;
}

.media-item figcaption {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.media-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.media-action:hover,
.media-action:focus-visible,
.media-preview-trigger:hover + figcaption,
.media-preview-trigger:focus-visible + figcaption {
  color: var(--red);
}

.admin-media-editor {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  width: 100%;
}

.admin-media-hint,
.admin-media-area {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-media-hint {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-media-hint strong {
  color: var(--ink);
  font-size: 13px;
}

.admin-media-area {
  overflow: hidden;
}

.admin-media-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8faf6;
}

.admin-media-area-head div {
  display: grid;
  gap: 2px;
}

.admin-media-area-head strong {
  color: var(--ink);
}

.admin-media-area-head span {
  color: var(--muted);
  font-size: 12px;
}

.admin-upload-action {
  min-width: 120px;
  border-color: var(--green);
}

.admin-area-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
}

.admin-area-thumb {
  min-height: 150px;
}

.compact-empty {
  margin: 12px;
  padding: 14px;
}

.media-preview[hidden] {
  display: none !important;
}

.media-preview {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.media-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 20, 17, 0.72);
}

.media-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(960px, 100%);
  max-height: min(92dvh, 820px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.media-preview-head,
.media-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.media-preview-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.media-preview-actions .submit-button {
  width: auto;
  min-width: 118px;
  padding-inline: 16px;
}

.media-preview-stage {
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: auto;
  background: #141a17;
}

.media-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 72dvh;
  object-fit: contain;
}

body.preview-open {
  overflow: hidden;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1180px) {
  .layout,
  .review-layout {
    grid-template-columns: 1fr;
  }

  .submit-panel {
    order: 1;
  }

  body.display-page .shell {
    grid-template-columns: 1fr;
  }

  body.display-page .result-panel,
  body.display-page .details-panel {
    min-height: 0;
  }
}

@media (max-width: 780px) {
  body.admin-page .layout,
  body.admin-page .review-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.admin-page .section-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  body.admin-page .section-title span,
  body.admin-page .meeting-admin-note,
  body.admin-page .ai-note {
    overflow-wrap: anywhere;
    text-align: left;
  }

  body.admin-page .board-panel table {
    display: block;
    width: 100%;
  }

  body.admin-page .board-panel thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  body.admin-page .board-panel tbody {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 12px;
  }

  body.admin-page .board-panel tr {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  body.admin-page .board-panel tbody tr:hover,
  body.admin-page .board-panel tbody tr.active {
    background: #f0f5ef;
  }

  body.admin-page .board-panel td {
    display: grid;
    grid-template-columns: minmax(88px, .35fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  body.admin-page .board-panel td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  body.admin-page .board-panel td > * {
    min-width: 0;
  }

  body.admin-page .board-panel .admin-record-empty {
    display: block;
    width: 100%;
    text-align: center;
  }

  body.admin-page .board-panel .admin-record-empty::before {
    content: none;
  }

  body.admin-page .score-actions,
  body.admin-page .points-award-control {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  body.admin-page .admin-media-area-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .admin-upload-action {
    width: 100%;
  }

  body.admin-page .admin-area-thumbs {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  body.admin-page .meeting-room-editor-row .icon-button {
    width: 100%;
  }

  body.admin-page .admin-qr-content {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    text-align: left;
  }

  body.admin-page .admin-qr-content > div {
    min-width: 0;
    width: 100%;
  }

  body.admin-page .admin-qr-content a {
    justify-self: stretch;
    width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: center;
  }

  body.admin-page .admin-qr-content img {
    max-width: min(220px, 100%);
    justify-self: center;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-controls {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .test-user-account {
    flex-basis: auto;
    width: 100%;
  }

  .top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-module-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-module-tab {
    min-width: 0;
  }

  .meeting-room-config-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page.meeting-page .meeting-auto-deduction-control {
    align-items: flex-start;
  }

  .meeting-room-editor-row {
    grid-template-columns: 1fr;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .icon-button {
    flex: 1 1 120px;
  }

  .test-user-picker {
    padding: 0;
  }

  .test-user-picker-dialog {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .test-user-picker-head {
    padding-top: max(16px, env(safe-area-inset-top));
  }

  .test-user-picker-search {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .test-user-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-selected,
  .admin-user-results {
    grid-template-columns: 1fr;
  }

  .admin-user-search-controls {
    grid-template-columns: 1fr;
  }

  .test-user-picker-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.display-page .status-strip {
    gap: 8px;
  }

  body.display-page .metric {
    min-height: 74px;
    padding: 12px;
  }

  body.display-page .metric strong {
    font-size: 18px;
  }

  .shell {
    width: min(100% - 20px, 1480px);
  }

  .admin-qr-content {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .admin-qr-content a,
  .admin-qr-content img {
    justify-self: center;
  }

  .media-preview {
    padding: 10px;
  }

  .media-preview-dialog {
    max-height: calc(100dvh - 20px);
  }

  .media-preview-head {
    align-items: flex-start;
  }

  .media-preview-stage {
    min-height: 220px;
  }

  .media-preview-stage img {
    max-height: 68dvh;
  }

  .scene-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .scene-editor-head-actions {
    justify-content: stretch;
  }

  .scene-editor-head-actions .media-action {
    flex: 1 1 130px;
  }

  .scene-editor-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .scene-editor-actions,
  .scene-standard-field {
    grid-column: 1 / -1;
  }

  .scene-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-editor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .office-editor-row [data-field="dept"],
  .office-editor-row .points-room-combobox {
    grid-column: 1 / -1;
  }

  .office-editor-row > .icon-button {
    grid-column: 2;
    justify-self: end;
  }

  .meeting-admin-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .admin-password-modal {
    padding: 10px;
  }

  .admin-password-dialog {
    max-height: calc(100dvh - 20px);
    padding: 18px;
  }

  .admin-password-head {
    gap: 12px;
  }

  body.admin-page .admin-password-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .admin-password-actions .submit-button {
    width: 100%;
  }

  body.admin-page .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-page .office-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .office-editor-head .icon-button,
  body.admin-page .meeting-room-config-head .icon-button {
    width: 100%;
  }

  body.admin-page .points-room-menu {
    min-width: 0;
    max-width: 100%;
  }

  body.admin-page .board-panel td {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  body.admin-page .score-confirm-panel {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .criterion-upload {
    grid-template-columns: 1fr;
  }

  .topbar-controls {
    gap: 8px;
  }

  .test-user-account,
  .test-user-account-trigger {
    width: 100%;
  }

  .test-user-account-trigger {
    min-height: 48px;
  }

  .test-user-account-copy strong {
    max-width: calc(100vw - 112px);
  }

  .test-user-picker-head,
  .test-user-picker-search,
  .test-user-grid,
  .test-user-picker-footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .test-user-search-controls {
    grid-template-columns: 1fr;
  }

  .test-user-search-submit {
    width: 100%;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 10px;
  }

  .office-editor-row {
    grid-template-columns: 1fr;
  }

  .office-editor-row > *,
  .office-editor-row [data-field="dept"],
  .office-editor-row .points-room-combobox,
  .office-editor-row > .icon-button {
    grid-column: 1;
    width: 100%;
  }
}

/* Mobile client experience */
body.user-page {
  --client-bg: #f3f5ef;
  --client-ink: #18231f;
  --client-muted: #66736d;
  --client-line: #d8e0d6;
  --client-soft: #f8faf5;
  --client-primary: #1f6f58;
  --client-primary-deep: #155541;
  --client-accent: #b42f38;
  --client-gold: #b87820;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, #fff8f0 0, #f6f1e8 120px, var(--client-bg) 360px),
    var(--client-bg);
  color: var(--client-ink);
  -webkit-tap-highlight-color: transparent;
}

body.user-page .topbar {
  position: relative;
  display: block;
  padding: calc(18px + env(safe-area-inset-top)) 18px 18px;
  border-bottom: 0;
  background: #fff8f0;
}

body.user-page .topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--client-accent), var(--client-gold), var(--client-primary));
}

body.user-page .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid #ecd8bf;
  border-radius: 999px;
  background: #fffdf8;
  color: #8f3a30;
  font-size: 12px;
}

body.user-page h1 {
  max-width: 13em;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}

body.user-page h2 {
  font-size: 17px;
  line-height: 1.3;
}

body.user-page .shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 12px calc(28px + env(safe-area-inset-bottom));
}

body.user-page .layout,
body.user-page .review-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

body.user-page .review-layout {
  margin-top: 12px;
}

body.user-page .panel {
  overflow: hidden;
  border-color: var(--client-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(31, 45, 38, 0.08);
}

body.user-page .submit-panel {
  order: 1;
}

body.user-page .result-panel {
  order: 2;
}

body.user-page .details-panel {
  min-height: 0;
}

body.user-page .section-title {
  min-height: 54px;
  padding: 14px;
  border-bottom-color: #e3e8df;
  background: linear-gradient(180deg, #ffffff, #fbfcf8);
}

body.user-page .section-title span {
  max-width: 46%;
  color: var(--client-muted);
  font-size: 12px;
  line-height: 1.35;
}

body.user-page .qr-box {
  display: none;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  justify-items: stretch;
  gap: 12px;
  margin: 12px 14px 0;
  padding: 12px;
  border-color: #ead7bd;
  background: #fffaf2;
  text-align: left;
}

body.user-page .qr-box div {
  gap: 5px;
}

body.user-page .qr-box strong {
  color: var(--client-ink);
  font-size: 15px;
}

body.user-page .qr-box span,
body.user-page .qr-box a {
  font-size: 12px;
  line-height: 1.45;
}

body.user-page .qr-box img {
  width: 104px;
  height: 104px;
  justify-self: end;
}

body.user-page .qr-box a {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #e2d2b6;
  border-radius: 8px;
  background: #fff;
  color: #795322;
  font-weight: 800;
  text-decoration: none;
}

.admin-qr-panel {
  margin-top: 14px;
}

.admin-qr-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.admin-qr-content > div {
  display: grid;
  gap: 10px;
}

.admin-qr-content strong {
  font-size: 18px;
}

.admin-qr-content span {
  color: var(--muted);
  line-height: 1.6;
}

.admin-qr-content a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #cfd8cf;
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.admin-qr-content img {
  width: 220px;
  height: 220px;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

body.user-page form {
  gap: 13px;
  padding: 14px;
}

body.user-page label {
  gap: 7px;
  color: #4f5d57;
  font-size: 13px;
}

body.user-page input,
body.user-page select,
body.user-page textarea {
  min-height: 48px;
  border-color: #cfd9ce;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  line-height: 1.45;
}

body.user-page textarea {
  min-height: 86px;
}

body.user-page input:focus,
body.user-page select:focus,
body.user-page textarea:focus,
body.user-page button:focus-visible {
  outline: 3px solid rgba(31, 111, 88, 0.18);
  outline-offset: 2px;
  border-color: var(--client-primary);
}

body.user-page .identity-box,
body.user-page .auth-debug,
body.user-page .capture-guide,
body.user-page .ai-note {
  border-color: #dce5d9;
  border-radius: 8px;
  background: var(--client-soft);
}

body.user-page .identity-box {
  grid-template-columns: 1fr;
  padding: 12px;
}

body.user-page .identity-box strong {
  font-size: 16px;
  line-height: 1.4;
}

body.user-page .auth-debug {
  padding: 11px;
}

body.user-page .auth-debug ol {
  max-height: 86px;
  overflow: auto;
  padding-right: 2px;
}

body.user-page .form-help,
body.user-page .form-message,
body.user-page .capture-status {
  font-size: 13px;
  line-height: 1.55;
}

body.user-page .form-message {
  min-height: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff6f4;
}

body.user-page .form-message:empty {
  display: none;
}

body.user-page .form-message[data-type="ok"] {
  background: #eef8ef;
}

body.user-page .camera-panel {
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce5d9;
  border-radius: 8px;
  background: #fbfcf8;
}

body.user-page .camera-panel > span {
  color: var(--client-ink);
  font-size: 15px;
}

body.user-page .capture-guide {
  gap: 5px;
  padding: 12px;
}

body.user-page .capture-guide strong {
  font-size: 18px;
  line-height: 1.35;
}

body.user-page .capture-guide span {
  font-size: 13px;
  line-height: 1.5;
}

body.user-page .capture-checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.user-page .capture-task {
  align-items: flex-start;
  min-height: 58px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
}

body.user-page .capture-task img {
  width: 42px;
  height: 42px;
}

body.user-page .capture-task .capture-samples img {
  width: 26px;
  height: 26px;
}

body.user-page .capture-task strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  border-radius: 999px;
  background: #eef2eb;
  font-size: 12px;
}

body.user-page .capture-task.complete {
  border-color: #a9d2b0;
  background: #eef8ef;
}

body.user-page .capture-task.complete strong {
  background: #d7eddc;
  color: var(--client-primary-deep);
}

body.user-page .camera-actions {
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

body.user-page .camera-actions .icon-button {
  min-height: 48px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 15px;
}

body.user-page .camera-actions .danger {
  grid-column: 1 / -1;
}

body.user-page .icon-button,
body.user-page .submit-button {
  min-height: 48px;
  border-radius: 8px;
  touch-action: manipulation;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

body.user-page .icon-button:active,
body.user-page .submit-button:active,
body.user-page .winner-card:active {
  transform: scale(0.985);
}

body.user-page .icon-button.primary,
body.user-page .submit-button {
  background: var(--client-primary);
  border-color: var(--client-primary);
}

body.user-page .icon-button:disabled,
body.user-page .submit-button:disabled {
  transform: none;
  border-color: #c7d1c7;
  background: #b8c4bb;
  color: #f9fbf8;
  box-shadow: none;
}

body.user-page .submit-button[type="submit"] {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
  min-height: 54px;
  margin-top: 4px;
  box-shadow: 0 12px 22px rgba(31, 111, 88, 0.24);
}

body.user-page .capture-thumbs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

body.user-page .capture-thumbs figure {
  border-radius: 8px;
}

body.user-page .winner-list,
body.user-page .score-details {
  padding: 12px;
}

body.user-page .winner-card {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #fffefa;
}

body.user-page .winner-card strong,
body.user-page .winner-card span {
  overflow-wrap: anywhere;
}

body.user-page .rank {
  width: 38px;
  height: 38px;
}

body.user-page .score-badge {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

body.user-page .criterion {
  padding: 11px;
  border: 1px solid #e1e7dd;
  border-radius: 8px;
  background: #fff;
}

body.user-page .criterion-head {
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.35;
}

body.user-page .bar {
  height: 10px;
}

body.user-page .criterion-note {
  font-size: 13px;
}

body.user-page .empty-state {
  min-height: 150px;
  padding: 24px 18px;
  line-height: 1.55;
}

@media (max-width: 380px) {
  body.user-page .shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  body.user-page h1 {
    font-size: 24px;
  }

  body.user-page .capture-checklist,
  body.user-page .camera-actions {
    grid-template-columns: 1fr;
  }

  body.user-page .camera-actions .danger {
    grid-column: auto;
  }

  body.user-page .capture-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.user-page .winner-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  body.user-page .score-badge {
    grid-column: 2;
    justify-self: start;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .test-user-picker,
  .test-user-picker-dialog,
  .test-user-grid[aria-busy="true"]::before {
    animation: none;
  }

  .test-user-account-trigger,
  .test-user-chevron,
  .test-user-card {
    transition: none;
  }

  .test-user-card:active {
    transform: none;
  }

  body.user-page .icon-button,
  body.user-page .submit-button,
  body.user-page .winner-card {
    transition: none;
  }

  body.user-page .icon-button:active,
  body.user-page .submit-button:active,
  body.user-page .winner-card:active {
    transform: none;
  }
}

/* Employee mobile shell */
.employee-mobile-only {
  display: none;
}

body.employee-office-page {
  --employee-accent: #1f6f58;
  --employee-accent-soft: #e8f3ee;
  --employee-background: #f6f8f3;
  --employee-ink: #15211c;
  --employee-line: #dfe7e1;
  --employee-muted: #627068;
  --employee-surface: #fff;
  min-height: 100dvh;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
  background: var(--employee-background);
  color: var(--employee-ink);
}

body.employee-office-page .employee-mobile-only {
  display: block;
}

body.employee-office-page .identity-box {
  display: none;
}

body.employee-office-page .topbar {
  padding-top: calc(18px + env(safe-area-inset-top));
  background: var(--employee-background);
}

body.employee-office-page .topbar::after,
body.employee-office-page .top-actions,
body.employee-office-page .status-strip,
body.employee-office-page .board-panel,
body.employee-office-page .gallery-panel,
body.employee-office-page .submit-panel > .section-title,
body.employee-office-page .employee-legacy-identity-fields {
  display: none;
}

body.employee-office-page .shell {
  width: min(100%, 560px);
  padding: 0 0 calc(18px + env(safe-area-inset-bottom));
}

body.employee-office-page .layout,
body.employee-office-page .review-layout {
  display: block;
  margin: 0;
}

body.employee-office-page .panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.employee-office-page .employee-identity-summary {
  padding: 16px;
  border-bottom: 1px solid rgba(31, 111, 88, 0.14);
  background: #fff;
}

body.employee-office-page .employee-identity-summary > div:first-child {
  display: grid;
  gap: 4px;
}

body.employee-office-page .employee-identity-summary span,
body.employee-office-page .employee-identity-summary small {
  color: #627068;
}

body.employee-office-page .employee-identity-summary strong {
  font-size: 18px;
  line-height: 1.4;
}

body.employee-office-page .employee-auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

body.employee-office-page .employee-auth-actions[hidden] {
  display: none;
}

body.employee-office-page .employee-auth-actions button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(31, 111, 88, 0.24);
  border-radius: 8px;
  background: #fff;
  color: var(--employee-accent);
}

body.employee-office-page .employee-submitted-state {
  margin: 16px;
  padding: 24px 18px;
  border-radius: 12px;
  background: var(--employee-accent-soft);
  color: var(--employee-ink);
  text-align: center;
}

body.employee-office-page .employee-submitted-state[hidden],
body.employee-office-page .employee-rank-back[hidden],
body.employee-office-page .employee-mobile-tabs[hidden] {
  display: none;
}

body.employee-office-page .employee-submitted-state strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

body.employee-office-page .employee-submitted-state p {
  margin: 10px 0 0;
  color: #526159;
  line-height: 1.6;
}

body.employee-office-page .employee-submitted-state button,
body.employee-office-page .employee-rank-back {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--employee-accent);
  color: #fff;
}

body.employee-office-page .employee-submitted-state button {
  width: 100%;
  margin-top: 16px;
}

body.employee-office-page .employee-rank-back:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 16px 0;
  padding: 0 14px;
}

body.employee-office-page .employee-mobile-tabs:not([hidden]) {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding:
    6px max(12px, env(safe-area-inset-right))
    calc(6px + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  border-top: 1px solid rgba(21, 33, 28, 0.12);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

body.employee-office-page .employee-mobile-tabs button {
  min-height: 58px;
  border: 0;
  background: transparent;
  color: #68736d;
  font: inherit;
}

body.employee-office-page .employee-mobile-tabs button[aria-pressed="true"] {
  color: var(--employee-accent);
  font-weight: 700;
}

body.employee-office-page .camera-panel {
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.employee-office-page .legacy-capture-title {
  display: none;
}

body.employee-office-page .employee-capture-progress {
  padding: 0 24px;
}

body.employee-office-page .employee-capture-progress > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

body.employee-office-page #employeeCaptureTaken {
  font-size: 58px;
  line-height: 1;
}

body.employee-office-page #employeeCaptureRequired {
  color: var(--employee-accent);
  font-size: 22px;
  font-weight: 900;
}

body.employee-office-page .employee-capture-track {
  height: 5px;
  margin-top: 12px;
  background: var(--employee-line);
}

body.employee-office-page #employeeCaptureProgressBar {
  display: block;
  height: 100%;
  background: var(--employee-accent);
  transition: width 180ms ease;
}

body.employee-office-page .capture-zone-heading {
  display: flex;
  justify-content: space-between;
  padding: 2px 24px 0;
}

body.employee-office-page .capture-checklist {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 7% 10px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
}

body.employee-office-page .capture-zone-card {
  flex: 0 0 86%;
  scroll-snap-align: center;
  background: var(--employee-surface);
  box-shadow: 0 8px 22px rgba(22, 33, 44, 0.12);
}

body.employee-office-page .capture-zone-select {
  display: grid;
  width: 100%;
  gap: 12px;
  padding: 18px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

body.employee-office-page .capture-zone-card.selected {
  outline: 2px solid var(--employee-accent);
  outline-offset: -2px;
}

body.employee-office-page .capture-zone-card-head {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
}

body.employee-office-page .capture-zone-samples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

body.employee-office-page .capture-zone-samples img,
body.employee-office-page .capture-zone-samples > span {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e6ecf2;
}

body.employee-office-page .capture-zone-standards {
  display: grid;
  gap: 7px;
  color: #3e4750;
  font-size: 13px;
}

body.employee-office-page .camera-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 18px;
}

body.employee-office-page .result-panel,
body.employee-office-page .details-panel {
  min-height: calc(100dvh - 150px);
}

body.employee-office-page .result-panel .section-title {
  display: none;
}

body.employee-office-page .winner-list,
body.employee-office-page .score-details {
  display: grid;
  gap: 10px;
  padding: 20px;
}

body.employee-office-page .employee-winner-hero {
  display: grid;
  width: 100%;
  padding: 26px 24px;
  border: 0;
  background: var(--employee-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 12px 28px rgba(239, 43, 31, 0.25);
}

body.employee-office-page .employee-winner-hero strong {
  margin-top: 12px;
  font-size: 34px;
  line-height: 1.08;
}

body.employee-office-page .employee-winner-hero b {
  margin-top: 8px;
  font-size: 52px;
  line-height: 1;
}

body.employee-office-page .employee-winner-hero.waiting {
  background: #59636e;
  cursor: default;
}

body.employee-office-page .employee-ranking-summary {
  padding: 10px 4px 2px;
  color: var(--employee-muted);
  font-size: 12px;
}

body.employee-office-page .employee-ranking-status {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 4px solid #b41f18;
  background: #fff1ef;
  color: #7f1a14;
  font-size: 13px;
}

body.employee-office-page .employee-ranking-status span {
  overflow-wrap: anywhere;
  color: #8f4b46;
  font-size: 12px;
}

body.employee-office-page .winner-card {
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 4px 14px rgba(22, 33, 44, 0.08);
}

body.employee-office-page .winner-card .employee-mine-tag {
  display: inline;
  margin-right: 6px;
  padding: 2px 6px;
  background: #ffe2df;
  color: #b41f18;
  font-style: normal;
  font-size: 10px;
}

body.employee-office-page .employee-rank-back:not([hidden]) {
  min-height: 48px;
  margin: 4px 20px 0;
  border: 0;
  background: transparent;
  color: var(--employee-accent);
  font-weight: 800;
}

body.employee-office-page .criterion {
  border: 0;
  border-radius: 0;
  box-shadow: 0 4px 14px rgba(22, 33, 44, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  body.employee-office-page #employeeCaptureProgressBar {
    transition: none;
  }
}

/* AIWS20260715016 — employee prototype parity */
body.employee-office-page {
  --employee-accent: #ec3013;
  --employee-accent-100: #fff2ef;
  --employee-accent-200: #ffe0d9;
  --employee-accent-300: #ffc4b8;
  --employee-accent-600: #dd2b0f;
  --employee-accent-700: #ae1800;
  --employee-accent-900: #4d170e;
  --employee-background: #f5f8fb;
  --employee-surface: #fff;
  --employee-ink: #16212c;
  --employee-muted: #6e7c8a;
  --employee-line: #d2dbe4;
  --employee-shadow-sm: 0 1px 2px rgba(45, 43, 43, 0.14);
  --employee-shadow-md: 0 3px 10px rgba(45, 43, 43, 0.16);
  --employee-shadow-lg: 0 12px 32px rgba(45, 43, 43, 0.22);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background: var(--employee-background);
  color: var(--employee-ink);
  font-family: "Archivo", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
}

body.employee-office-page :where(button, input, textarea, select, .panel, .criterion, .winner-card) {
  border-radius: 0 !important;
}

body.employee-office-page .topbar {
  display: block;
  padding: calc(14px + env(safe-area-inset-top)) 24px 0;
  border: 0;
  background: var(--employee-background);
}

body.employee-office-page .topbar > div:not(.employee-brand-row) {
  display: none;
}

body.employee-office-page .employee-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

body.employee-office-page .employee-brand-mark {
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--employee-accent);
}

body.employee-office-page .employee-brand-row strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

body.employee-office-page .employee-brand-time {
  margin-left: auto;
  color: var(--employee-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

body.employee-office-page .shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
}

body.employee-office-page .submit-panel,
body.employee-office-page .result-panel,
body.employee-office-page .details-panel {
  min-height: 0;
  padding: 0;
}

body.employee-office-page .employee-identity-summary {
  padding: 20px 24px 2px;
  border: 0;
  background: transparent;
}

body.employee-office-page .employee-identity-summary > div.employee-identity-line:first-child {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--employee-muted);
  font-size: 13px;
}

body.employee-office-page .employee-identity-line span,
body.employee-office-page .employee-identity-line strong {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.5;
}

body.employee-office-page .employee-identity-line small:empty {
  display: none;
}

body.employee-office-page .employee-auth-actions {
  margin-top: 10px;
}

body.employee-office-page .employee-auth-actions button {
  border-color: var(--employee-accent-300);
  color: var(--employee-accent-700);
}

body.employee-office-page #submitForm {
  display: grid;
  gap: 0;
}

body.employee-office-page .camera-panel {
  display: grid;
  gap: 0;
}

body.employee-office-page .employee-capture-progress {
  padding: 0 24px;
}

body.employee-office-page #employeeCaptureTaken {
  color: var(--employee-ink);
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

body.employee-office-page #employeeCaptureRequired {
  color: var(--employee-accent);
  font-size: 24px;
  font-weight: 800;
}

body.employee-office-page .employee-capture-track {
  height: 5px;
  margin-top: 10px;
  background: var(--employee-line);
}

body.employee-office-page #employeeCaptureProgressBar {
  background: var(--employee-accent);
  transition: width 0.4s ease;
}

body.employee-office-page .capture-zone-heading {
  align-items: center;
  gap: 12px;
  padding: 18px 24px 10px;
}

body.employee-office-page .capture-zone-heading > strong {
  font-size: 15px;
  font-weight: 800;
}

body.employee-office-page .employee-zone-controls,
body.employee-office-page .employee-zone-dots {
  display: flex;
  align-items: center;
}

body.employee-office-page .employee-zone-controls {
  gap: 6px;
  margin-left: auto;
}

body.employee-office-page .employee-zone-dots {
  gap: 6px;
  margin-right: 4px;
}

body.employee-office-page .employee-zone-dots i {
  width: 8px;
  height: 8px;
  background: var(--employee-line);
}

body.employee-office-page .employee-zone-dots i.complete {
  background: var(--employee-accent-300);
}

body.employee-office-page .employee-zone-dots i.selected {
  background: var(--employee-accent);
}

body.employee-office-page .employee-zone-controls button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  background: #e9f0f7;
  color: var(--employee-ink);
  font-size: 16px;
  font-weight: 800;
}

body.employee-office-page .employee-zone-controls button:last-child {
  background: var(--employee-accent);
  color: #fff;
}

body.employee-office-page .employee-zone-controls button:disabled {
  opacity: 0.32;
}

body.employee-office-page .capture-guide,
body.employee-office-page .camera-actions,
body.employee-office-page .capture-thumbs,
body.employee-office-page .form-help {
  display: none;
}

body.employee-office-page .capture-checklist {
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  padding: 0 7% 8px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
}

body.employee-office-page .capture-zone-card {
  display: flex;
  flex: 0 0 86%;
  min-height: 530px;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: center;
  outline: 0;
  background: #fff;
  box-shadow: var(--employee-shadow-md);
}

/* 会议室只有一个区域时才铺满并关掉轮播；多区域时必须保留横向滚动与上一个/下一个
   按钮，否则滑到第二个区域后回不去（容器不可滚 + 导航被隐藏）。
   单区域标记由 renderEmployeeCaptureGuide 按实际区域数打在 body 上。 */
body.employee-office-page.employee-meeting-page.employee-meeting-single-zone .employee-zone-controls {
  display: none;
}

body.employee-office-page.employee-meeting-page.employee-meeting-single-zone .capture-checklist {
  overflow-x: visible;
  scroll-snap-type: none;
}

body.employee-office-page.employee-meeting-page.employee-meeting-single-zone .capture-zone-card {
  flex-basis: 100%;
  width: 100%;
  min-height: 0;
}

body.employee-office-page.employee-meeting-page .result-panel,
body.employee-office-page.employee-meeting-page .details-panel {
  padding: 20px;
}

body.employee-office-page.employee-meeting-page .review-layout:not([hidden]) {
  display: block;
}

body.employee-office-page.employee-meeting-page .result-panel .section-title,
body.employee-office-page.employee-meeting-page .details-panel .section-title {
  display: flex;
}

body.employee-office-page.employee-meeting-page .meeting-status-card {
  margin: 0;
}

body.employee-office-page .capture-zone-card.selected {
  outline: 0;
}

body.employee-office-page .capture-zone-select {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0;
  padding: 18px 18px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

body.employee-office-page .capture-zone-content {
  padding: 0 18px;
}

body.employee-office-page .capture-zone-card-head {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

body.employee-office-page .capture-zone-card-head strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
}

body.employee-office-page .capture-zone-card-head b {
  margin-left: auto;
  color: var(--employee-muted);
  font-size: 16px;
  font-weight: 800;
}

body.employee-office-page .capture-zone-card.complete .capture-zone-card-head b {
  color: var(--employee-accent-700);
}

body.employee-office-page .capture-zone-complete {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  background: var(--employee-accent);
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

body.employee-office-page .capture-zone-label {
  margin-bottom: 6px;
  color: var(--employee-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.employee-office-page .capture-zone-samples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

body.employee-office-page .capture-zone-samples.is-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

body.employee-office-page .capture-zone-samples.is-carousel::-webkit-scrollbar {
  display: none;
}

body.employee-office-page .capture-zone-samples.is-carousel .capture-sample {
  flex: 0 0 calc(100% - 28px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body.employee-office-page .capture-zone-samples.is-carousel .capture-sample.current {
  outline: 2px solid var(--employee-accent);
  outline-offset: -2px;
}

body.employee-office-page .capture-zone-samples > .capture-sample {
  position: relative;
  display: block;
  width: 100%;
  min-height: 130px;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  background: #e6ecf2;
}

body.employee-office-page button.capture-sample {
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}

body.employee-office-page button.capture-sample:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
  box-shadow: inset 0 0 0 2px var(--employee-accent);
}

body.employee-office-page .capture-sample img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

body.employee-office-page .capture-sample em {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 7px;
  background: var(--employee-accent);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

body.employee-office-page .capture-sample small {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 2px 5px;
  background: rgba(22, 33, 44, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

body.employee-office-page .capture-sample > b {
  position: absolute;
  right: 8%;
  bottom: 20px;
  left: 8%;
  color: rgba(255, 255, 255, 0.75);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  transform: rotate(-14deg);
}

body.employee-office-page .capture-zone-standards {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  color: #3e4750;
  font-size: 13px;
}

body.employee-office-page .capture-zone-standards > span {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

body.employee-office-page .capture-zone-standards i {
  flex: none;
  color: var(--employee-accent);
  font-style: normal;
  font-weight: 900;
}

body.employee-office-page .employee-zone-shots {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 0 18px;
}

body.employee-office-page .employee-zone-shots > span {
  position: relative;
  display: block;
  width: 96px;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  background: var(--employee-accent-100);
  color: var(--employee-accent-700);
}

body.employee-office-page .employee-zone-shots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

body.employee-office-page .employee-zone-shots em {
  position: absolute;
  z-index: 1;
  bottom: 6px;
  left: 6px;
  padding: 2px 3px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-style: normal;
}

body.employee-office-page .employee-zone-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 14px 18px 18px;
}

body.employee-office-page .employee-zone-actions button {
  min-height: 44px;
  border: 0;
  font-size: 13px;
  font-weight: 800;
}

body.employee-office-page .employee-zone-snap {
  padding: 0 18px;
  background: var(--employee-accent);
  color: #fff;
}

body.employee-office-page .employee-zone-clear {
  padding: 0 8px;
  background: transparent;
  color: var(--employee-accent);
}

body.employee-office-page .employee-zone-next {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  color: var(--employee-accent);
}

body.employee-office-page .employee-zone-next span {
  font-size: 19px;
}

body.employee-office-page .capture-status {
  padding: 8px 24px 0;
  color: #93a0ae;
  font-size: 11px;
  font-weight: 400;
}

body.employee-office-page .form-message:empty {
  display: none;
}

body.employee-office-page .form-message {
  min-height: 0;
  margin: 10px 24px 0;
  color: var(--employee-accent-700);
  font-size: 12px;
}

body.employee-office-page #submitForm > label:last-of-type {
  display: grid;
  gap: 8px;
  padding: 18px 24px 0;
  color: var(--employee-muted);
  font-size: 0;
}

body.employee-office-page #submitForm > label:last-of-type::before {
  content: "备注(可选)";
  font-size: 12px;
}

body.employee-office-page #noteInput {
  width: 100%;
  min-height: 62px;
  resize: none;
  border: 1px solid var(--employee-line);
  padding: 10px 12px;
  background: #fff;
  color: var(--employee-ink);
  font-size: 14px;
}

body.employee-office-page .submit-button[type="submit"] {
  position: static;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: flex-start;
  margin: 16px 20px 28px;
  padding: 0 18px;
  border: 0;
  background: var(--employee-accent);
  box-shadow: none;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

body.employee-office-page .submit-button[type="submit"] span {
  margin-left: auto;
}

body.employee-office-page .submit-button[type="submit"]:disabled {
  background: var(--employee-accent);
  opacity: 0.45;
}

body.employee-office-page .employee-submitted-state {
  margin: 0;
  padding: 24px 20px 16px;
  background: transparent;
  color: var(--employee-ink);
  text-align: left;
}

body.employee-office-page .employee-submitted-poster {
  padding: 40px 24px;
  background: var(--employee-accent);
  box-shadow: var(--employee-shadow-lg);
  color: #fff;
}

body.employee-office-page .employee-submitted-poster > span {
  display: block;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.employee-office-page .employee-submitted-state strong {
  margin: 0;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: pre-line;
}

body.employee-office-page .employee-submitted-state p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.5;
}

body.employee-office-page .employee-submitted-state #employeeViewRanking {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  padding: 0 18px;
  border: 0;
  background: #fff;
  box-shadow: var(--employee-shadow-sm);
  color: var(--employee-ink);
  font-weight: 800;
  text-align: left;
}

body.employee-office-page .winner-list {
  display: block;
  padding: 0;
}

body.employee-office-page .employee-winner-hero {
  display: block;
  width: calc(100% - 40px);
  margin: 20px 20px 0;
  padding: 26px 24px 22px;
  border: 0;
  background: var(--employee-accent);
  box-shadow: var(--employee-shadow-lg);
  color: #fff;
  text-align: left;
}

body.employee-office-page .employee-winner-hero > span {
  margin: 0 0 12px;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.employee-office-page .employee-winner-hero > span::before {
  content: "⚑";
  margin-right: 8px;
  font-size: 14px;
}

body.employee-office-page .employee-winner-hero strong {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

body.employee-office-page .employee-winner-hero b {
  display: inline-block;
  margin-top: 8px;
  color: #fff;
  font-size: 52px;
  line-height: 1;
}

body.employee-office-page .employee-winner-hero small {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

body.employee-office-page .employee-winner-hero.waiting {
  background: #59636e;
}

body.employee-office-page .employee-ranking-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 20px 24px;
}

body.employee-office-page .employee-ranking-stats div {
  display: grid;
  gap: 2px;
}

body.employee-office-page .employee-ranking-stats strong {
  font-size: 26px;
  font-weight: 800;
}

body.employee-office-page .employee-ranking-stats span {
  color: var(--employee-muted);
  font-size: 11px;
}

body.employee-office-page .employee-ranking-cards {
  display: grid;
  gap: 8px;
  padding: 0 20px 16px;
}

body.employee-office-page .winner-card {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 50px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  box-shadow: var(--employee-shadow-sm);
}

body.employee-office-page .winner-card:has(.employee-mine-tag) {
  background: var(--employee-accent-100);
}

body.employee-office-page .winner-card .rank {
  display: block;
  width: 24px;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #93a0ae;
  font-size: 14px;
  font-weight: 800;
}

body.employee-office-page .winner-card strong {
  font-size: 14px;
  font-weight: 700;
}

body.employee-office-page .employee-ranking-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.employee-office-page .employee-ranking-name > span {
  display: none;
  margin: 0;
}

body.employee-office-page .winner-card .employee-mine-tag {
  display: inline-block;
  margin: 0;
  padding: 2px 6px;
  background: var(--employee-accent-100);
  color: var(--employee-accent-700);
  font-size: 10px;
}

body.employee-office-page .winner-card .score-badge {
  color: var(--employee-accent);
  font-size: 17px;
  font-weight: 800;
}

body.employee-office-page .employee-ranking-hint,
body.employee-office-page .employee-ranking-summary {
  padding: 0 24px 24px;
  color: #93a0ae;
  font-size: 12px;
}

body.employee-office-page .employee-rank-back:not([hidden]) {
  min-height: 44px;
  margin: 8px 24px 0;
  padding: 0;
  background: transparent;
  color: var(--employee-accent);
  font-size: 14px;
  font-weight: 700;
}

body.employee-office-page .details-panel > .section-title {
  display: none;
}

body.employee-office-page .score-details {
  display: grid;
  gap: 10px;
  padding: 0 20px 24px;
}

body.employee-office-page .employee-detail-hero {
  margin: 0 -20px;
  padding: 0 24px 10px;
}

body.employee-office-page .employee-detail-hero > span {
  color: var(--employee-muted);
  font-size: 12px;
}

body.employee-office-page .employee-detail-hero > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

body.employee-office-page .employee-detail-hero strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.employee-office-page .employee-detail-hero b {
  color: var(--employee-accent);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
}

body.employee-office-page .criterion {
  gap: 8px;
  padding: 16px;
  border: 0;
  background: #fff;
  box-shadow: var(--employee-shadow-sm);
}

body.employee-office-page .criterion-head {
  font-size: 15px;
  font-weight: 800;
}

body.employee-office-page .criterion-head .score-actions > span {
  color: var(--employee-accent-700);
}

body.employee-office-page .bar {
  height: 6px;
  border-radius: 0;
  background: #e6ecf2;
}

body.employee-office-page .bar span {
  border-radius: 0;
  background: linear-gradient(90deg, var(--employee-accent), #ff9783);
}

 .maintenance-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 12px 20px;
  border-bottom: 1px solid #f0c36a;
  background: #fff4d6;
  color: #6b4700;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.maintenance-banner[hidden] {
  display: none;
}

body.employee-office-page .criterion-note {
  color: #59636e;
  font-size: 12px;
  line-height: 1.6;
}

body.employee-office-page .criterion-thumb {
  border-radius: 0;
}

body.employee-office-page .ai-note {
  padding: 18px;
  border-radius: 0;
  background: var(--employee-accent-100);
  color: var(--employee-accent-900);
  font-size: 13px;
  line-height: 1.6;
}

body.employee-office-page .ai-note strong {
  color: var(--employee-accent-700);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.employee-office-page .score-details > .ai-note:not(:has(strong)) {
  display: none;
}

body.employee-office-page .employee-mobile-tabs:not([hidden]) {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 0 calc(22px + env(safe-area-inset-bottom));
  border: 0;
  background: #fff;
  box-shadow: 0 -3px 10px rgba(41, 49, 58, 0.1);
}

body.employee-office-page .employee-mobile-tabs button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 0;
  border: 0;
  background: transparent;
  color: #93a0ae;
  font-size: 14px;
  font-weight: 800;
}

body.employee-office-page .employee-mobile-tabs button[aria-pressed="true"] {
  color: var(--employee-accent);
}

@media (max-width: 390px) {
  body.employee-office-page .capture-zone-card {
    min-height: 510px;
  }

  body.employee-office-page .employee-zone-controls button {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 720px) {
  body.employee-office-page.employee-meeting-page .shell {
    max-width: 680px;
    padding: 24px 0 40px;
  }
}

body.employee-sample-preview-open {
  overflow: hidden;
}

.employee-sample-preview {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: calc(var(--z-modal) + 20);
  display: grid;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  animation: employee-sample-preview-fade 120ms ease-out;
}

.employee-sample-preview-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(5, 10, 15, 0.94);
}

.employee-sample-preview-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  pointer-events: none;
}

.employee-sample-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: auto;
}

.employee-sample-preview-close {
  position: absolute;
  z-index: 2;
  top: max(0px, env(safe-area-inset-top));
  right: max(0px, env(safe-area-inset-right));
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(5, 10, 15, 0.78);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  pointer-events: auto;
}

.employee-sample-preview-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.employee-sample-preview-error {
  position: absolute;
  bottom: 112px;
  max-width: min(560px, calc(100vw - 32px));
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  pointer-events: auto;
}

.employee-sample-preview-gate {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: max(0px, env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 12px;
  background: linear-gradient(180deg, rgba(5, 10, 15, 0), rgba(5, 10, 15, 0.94) 28%);
  color: #fff;
  pointer-events: auto;
}

.employee-sample-preview-gate p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.employee-sample-preview-continue {
  min-width: min(320px, calc(100vw - 48px));
  min-height: 48px;
  border: 1px solid #fff;
  background: var(--employee-accent, #ec3013);
  color: #fff;
  font: inherit;
  font-weight: 900;
}

.employee-sample-preview-continue:disabled {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.68);
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes employee-sample-preview-fade {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .employee-sample-preview {
    animation: none;
    transition: none;
  }
}

/* 管理员页隐藏了 .submit-panel（#formMessage 的宿主），
   区域设置的保存结果与校验错误改由区域编辑器内的提示位展示。 */
.scene-editor-message {
  margin: 0;
  min-height: 18px;
  line-height: 1.5;
  font-size: 12px;
  font-weight: 700;
  white-space: pre-line;
  color: var(--bad);
}

.scene-editor-message[data-type="ok"] {
  color: var(--green);
}

/* 会议室清单每行的提报二维码：会议室房间号写在 URL 里，必须每间一个码。 */
.meeting-room-qr {
  display: grid;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--employee-line, #d8e1ea);
  background: #fafcfe;
}

.meeting-room-qr img {
  width: 140px;
  height: 140px;
}

.meeting-room-qr > div {
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.meeting-room-qr a {
  overflow-wrap: anywhere;
}

/* Office awards: progress stays visible on the admin board, including reconnect. */
.batch-award-status { margin: 0; padding: 12px 16px; background: #f4fbf0; color: #26472e; overflow-wrap: anywhere; }
#batchAwardPointsButton[aria-busy="true"]::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 7px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: points-award-spin 0.8s linear infinite; }
@keyframes points-award-spin { to { transform: rotate(360deg); } }
