:root {
  color-scheme: light;
  --bg: #f8fbf4;
  --panel: rgba(255, 255, 255, 0.86);
  --ink: #24312d;
  --muted: #688075;
  --line: rgba(93, 126, 112, 0.2);
  --accent: #d34b45;
  --accent-2: #2b8ea0;
  --accent-soft: #fff5ef;
  --gold: #e8aa24;
  --jade: #71aa83;
  --spring: #cfe7b7;
  --paper: rgba(255, 255, 250, 0.78);
  --shadow: rgba(45, 72, 62, 0.16);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(255, 253, 244, 0.36), rgba(248, 251, 238, 0.42)),
    url("/background-image"),
    var(--bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 52% 42%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 245, 0.1), rgba(255, 255, 245, 0.28) 45%, rgba(255, 255, 245, 0.08));
}

img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #f8fafc;
}

.home-shell,
.detail-shell,
.game-shell,
.settings-shell {
  width: 100%;
  height: calc(100dvh - 44px);
  margin: 0 auto;
  padding: 12px;
  overflow: hidden;
}

.game-layout {
  height: calc(100dvh - 118px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: 10px;
  overflow: hidden;
}

.match-table-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.18);
}

.match-score-table {
  width: 100%;
  min-width: 0;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: clamp(7px, 1.2vmin, 16px);
}

.match-score-table th,
.match-score-table td {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(128, 158, 141, 0.28);
  line-height: 1;
  text-align: center;
}

.match-score-table th {
  position: relative;
  background: linear-gradient(180deg, #7fb38d, #428873);
  color: #fff;
  font-weight: 800;
}

.match-score-table td {
  background: rgba(255, 255, 255, 0.7);
}

.match-score-table tr:nth-child(even) td {
  background: rgba(244, 251, 237, 0.68);
}

.match-member-heading::after {
  content: attr(data-rank);
  position: absolute;
  z-index: 2;
  top: clamp(24px, 6dvh, 64px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(180, 59, 48, 0.3);
  font-size: clamp(72px, min(22vw, 28dvh), 280px);
  line-height: 1;
  pointer-events: none;
}

.match-score-table .is-inactive {
  opacity: 0.52;
}

.match-label-column {
  width: clamp(32px, 4vw, 72px);
  min-width: 0;
}

.match-ended-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
}

.match-ended-message[hidden] {
  display: none;
}

.game-images {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.game-images figure {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 5px;
  overflow: hidden;
  border: 1px solid rgba(87, 123, 104, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.18);
}

.game-images img {
  width: 100%;
  height: 100%;
}

.settings-shell {
  overflow: auto;
}

.topbar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(248, 255, 241, 0.68)),
    var(--paper);
  box-shadow: 0 8px 24px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.topbar::before {
  content: "";
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--gold) 0 19%, #d92f39 20% 38%, #235fae 39% 58%, #f7fafc 59% 76%, #202938 77% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.28);
}

.topbar h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.2;
  font-weight: 700;
}

.status {
  min-width: 76px;
  padding: 6px 10px;
  border: 1px solid rgba(96, 135, 116, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: #58766a;
  font-size: 14px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.status.is-live {
  border-color: rgba(88, 164, 126, 0.36);
  background: rgba(223, 246, 228, 0.78);
  color: #2e795a;
}

.match-launch-button,
.match-invite-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(42, 126, 146, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, #69cad8, #2c879e);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.match-launch-button:disabled,
.match-invite-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.match-invite-list {
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.match-invite-list:not(:empty) {
  min-height: 34px;
}

.match-dialog {
  max-width: min(520px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(87, 123, 104, 0.3);
  border-radius: 12px;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(30, 52, 44, 0.35);
}

.match-dialog:not([open]) {
  display: none;
}

.match-dialog.match-dialog-fallback-open {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  display: block;
  margin: 0;
  transform: translate(-50%, -50%);
}

.match-dialog::backdrop {
  background: rgba(20, 30, 27, 0.42);
}

.match-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.match-dialog-actions button {
  min-width: 92px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #2b8ea0;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 84px;
  padding: 0 12px;
  border: 1px solid rgba(111, 146, 130, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4fbef);
  color: #2d4b3f;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(68, 102, 82, 0.16);
}

.sound-toggle.is-on {
  border-color: #f0b13e;
  background: linear-gradient(180deg, #ffd979, #e8a72d);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.home-pager {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.active-matches {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.active-match-link {
  min-width: 0;
  height: 32px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(198, 77, 66, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #ff8c6e, #cf4944);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.active-match-link.is-compact {
  max-width: 92px;
  padding: 0 8px;
}

.home-pager[hidden] {
  display: none;
}

.home-pager button {
  height: 32px;
  min-width: 64px;
  padding: 0 10px;
  border: 1px solid rgba(111, 146, 130, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4fbef);
  color: #2d4b3f;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.home-pager button:disabled {
  cursor: default;
  opacity: 0.42;
}

.home-pager span {
  min-width: 46px;
  color: #45675a;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.reset-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-width: 150px;
  padding: 0 24px;
  border: 1px solid rgba(198, 77, 66, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #ff8c6e, #cf4944);
  color: #fffdf6;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(174, 65, 52, 0.22);
}

.reset-target:disabled {
  cursor: default;
  opacity: 0.72;
}

.change-paper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-width: 150px;
  padding: 0 24px;
  border: 1px solid rgba(42, 126, 146, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #5fc7d8, #247f9b);
  color: #fffdf6;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(34, 112, 137, 0.22);
}

.change-paper:disabled {
  cursor: default;
  opacity: 0.72;
}

.game-shell .topbar .reset-target,
.game-shell .topbar .change-paper {
  flex: 0 1 auto;
  height: 30px;
  min-width: clamp(76px, 8vw, 112px);
  padding: 0 clamp(6px, 1vw, 12px);
  font-size: clamp(10px, 1vw, 13px);
}

.settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 64px;
  padding: 0 12px;
  border: 1px solid rgba(111, 146, 130, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eef9ff);
  color: #2b6370;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(68, 102, 82, 0.16);
}

.settings-link:hover {
  border-color: #2b8ea0;
  color: #b7443f;
}

.target-grid {
  --home-gap: 10px;
  --home-tile: min(
    calc((100vw - 24px - var(--home-gap) * 2) / 3),
    calc((100dvh - 118px - var(--home-gap)) / 2)
  );
  height: calc(100dvh - 118px);
  display: grid;
  grid-template-columns: repeat(3, var(--home-tile));
  grid-template-rows: repeat(2, var(--home-tile));
  align-content: center;
  justify-content: center;
  gap: var(--home-gap);
  overflow: hidden;
}

.target-card {
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(87, 123, 104, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 252, 239, 0.78));
  color: inherit;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  box-shadow:
    0 10px 28px rgba(58, 89, 72, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.88);
}

.target-card img,
.detail-figure img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
}

.target-card:hover {
  border-color: rgba(211, 75, 69, 0.58);
  box-shadow:
    0 14px 34px rgba(58, 89, 72, 0.23),
    0 0 0 3px rgba(211, 75, 69, 0.1);
}

.target-card.is-hit {
  border-color: rgba(211, 75, 69, 0.9);
  animation: target-hit-shake 760ms ease both;
  box-shadow:
    0 16px 38px rgba(178, 67, 55, 0.28),
    0 0 0 5px rgba(232, 170, 36, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.94);
}

@keyframes target-hit-shake {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }
  12% {
    transform: translateX(-7px) scale(1.015);
  }
  24% {
    transform: translateX(7px) scale(1.015);
  }
  36% {
    transform: translateX(-5px) scale(1.012);
  }
  48% {
    transform: translateX(5px) scale(1.012);
  }
  60% {
    transform: translateX(-3px) scale(1.006);
  }
  72% {
    transform: translateX(3px) scale(1.006);
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(111, 146, 130, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4fbef);
  color: #2d4b3f;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(68, 102, 82, 0.16);
}

.back-link:hover {
  border-color: #e8aa24;
  color: #b7443f;
}

.detail-layout {
  height: calc(100dvh - 118px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  overflow: hidden;
}

.image-pair {
  grid-column: span 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  overflow: hidden;
}

.target-action-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
}

.detail-figure {
  width: 100%;
  aspect-ratio: 1 / 1;
  align-self: center;
  justify-self: center;
  min-width: 0;
  min-height: auto;
  max-height: 100%;
  margin: 0;
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(87, 123, 104, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 252, 239, 0.78));
  box-shadow:
    0 10px 28px rgba(58, 89, 72, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.88);
}

.score-table {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  align-self: stretch;
  border-collapse: collapse;
  table-layout: fixed;
  overflow: hidden;
  border: 1px solid rgba(87, 123, 104, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(252, 249, 235, 0.8)),
    radial-gradient(circle at 18% 20%, rgba(151, 190, 162, 0.14), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(214, 151, 104, 0.1), transparent 32%);
  font-size: clamp(12px, 1.05vw, 17px);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.18);
}

.score-table th,
.score-table td {
  height: 6.25%;
  padding: 0 2px;
  border: 1px solid rgba(128, 158, 141, 0.24);
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-table th {
  background: linear-gradient(180deg, #7fb38d, #428873);
  color: #fffdf6;
  font-weight: 700;
}

.score-table td {
  background: rgba(255, 255, 255, 0.64);
}

.score-table tbody tr:nth-child(even) td {
  background: rgba(244, 251, 237, 0.58);
}

.star {
  color: var(--gold);
  font-size: clamp(16px, 1.8vw, 26px);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.24), 0 0 10px rgba(244, 191, 42, 0.55);
}

.settings-grid {
  width: 100%;
  max-width: calc(320px * 4 + 14px * 3);
  min-height: calc(100dvh - 118px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 320px));
  grid-auto-rows: auto;
  align-content: center;
  justify-content: center;
  gap: 14px;
  overflow: visible;
}

.settings-tabs {
  min-height: 40px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.settings-tab {
  height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(75, 126, 111, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #365d50;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(58, 89, 72, 0.12);
}

.settings-tab.is-active {
  border-color: rgba(193, 69, 61, 0.42);
  background: linear-gradient(180deg, #ef7c62, #cf4944);
  color: #fff;
}

.settings-panel[hidden] {
  display: none;
}

#portSettingsPanel:not([hidden]) {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
}

.endpoint-settings-card {
  padding: 18px;
  border: 1px solid rgba(87, 123, 104, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.16);
}

.endpoint-catalog-tabs,
.endpoint-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.endpoint-catalog-tab,
.endpoint-actions button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: #648f7f;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.endpoint-catalog-tab.is-active {
  background: linear-gradient(180deg, #ef7c62, #cf4944);
}

.endpoint-catalog-panel[hidden] {
  display: none;
}

.endpoint-table-scroll {
  max-height: calc(100dvh - 284px);
  margin-bottom: 12px;
  overflow: auto;
}

.endpoint-table {
  width: 100%;
  border-collapse: collapse;
}

.endpoint-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef6ee;
}

.endpoint-table th,
.endpoint-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(75, 126, 111, 0.2);
  text-align: center;
}

.endpoint-table input:not([type="checkbox"]),
.endpoint-table select {
  width: 100%;
  min-width: 110px;
  height: 36px;
  border: 1px solid rgba(111, 146, 130, 0.32);
  border-radius: 7px;
  background: #fff;
  font: inherit;
}

.endpoint-save-result {
  min-height: 22px;
  margin: 0;
  color: #2e795a;
  font-weight: 700;
}

#cameraMappingPanel:not([hidden]) {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.camera-mapping-card {
  width: min(760px, calc(100% - 24px));
  margin: 6vh auto 0;
  padding: 24px;
  border: 1px solid rgba(87, 123, 104, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.16);
}

#cameraMappingPanel .camera-mapping-card {
  width: 100%;
  margin: 0;
}

.camera-brightness-card {
  margin-top: 0;
  margin-bottom: 0;
}

.camera-brightness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-bottom: 18px;
}

.camera-brightness-row {
  display: grid;
  grid-template-columns: 52px repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
}

.camera-brightness-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #365d50;
}

.camera-brightness-row input {
  width: 68px;
  min-height: 34px;
  border: 1px solid rgba(75, 126, 111, 0.35);
  border-radius: 6px;
  font: inherit;
  text-align: center;
}

.camera-chain-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-bottom: 18px;
}

.camera-chain-group-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) minmax(90px, 1fr);
  align-items: center;
  gap: 12px;
}

.camera-chain-group-row select {
  width: 100%;
  min-height: 36px;
}

.camera-target-mapping-card {
  margin-top: 0;
}

.camera-target-mapping-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.camera-target-mapping-row {
  display: grid;
  grid-template-columns: 90px repeat(2, minmax(180px, 1fr));
  align-items: center;
  gap: 12px;
}

.camera-target-mapping-row.is-header {
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(75, 126, 111, 0.25);
  color: #365d50;
  text-align: center;
}

.camera-target-mapping-row select {
  min-height: 40px;
  padding: 5px 10px;
  border: 1px solid rgba(75, 126, 111, 0.35);
  border-radius: 7px;
  background: #fff;
  color: #294c40;
  font: inherit;
}

.camera-target-mapping-actions {
  display: flex;
  gap: 12px;
}

.target-mapping-reset,
.target-mapping-dialog button {
  min-height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 7px;
  background: #648f7f;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.target-mapping-dialog {
  width: min(620px, calc(100% - 32px));
  padding: 24px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(30, 48, 42, 0.34);
}

.target-mapping-dialog::backdrop {
  background: rgba(20, 35, 30, 0.48);
}

.target-mapping-conflict-lines {
  margin-bottom: 20px;
  color: #9d302c;
  font-weight: 700;
}

.target-mapping-conflict-lines p {
  margin: 6px 0;
}

.camera-mapping-card h1 {
  margin: 0 0 8px;
  color: #365d50;
}

.match-management-card {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(87, 123, 104, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.16);
  backdrop-filter: blur(6px);
}

.match-management-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.match-management-tab {
  height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(79, 126, 105, 0.28);
  border-radius: 8px;
  background: rgba(244, 251, 241, 0.88);
  color: #365d50;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.match-management-tab.is-active {
  border-color: rgba(197, 65, 60, 0.34);
  background: linear-gradient(180deg, #ef7c62, #cf4944);
  color: #fff;
}

.match-management-subpanel[hidden],
.match-management-empty[hidden] {
  display: none;
}

.match-management-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.match-management-table {
  width: 100%;
  border-collapse: collapse;
  color: #2f5044;
}

.match-management-table th,
.match-management-table td {
  padding: 12px 14px;
  border: 1px solid rgba(87, 123, 104, 0.22);
  text-align: center;
  vertical-align: middle;
}

.match-management-table th {
  background: rgba(228, 243, 225, 0.92);
  color: #365d50;
  white-space: nowrap;
}

.match-management-participants {
  min-width: 220px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.match-management-actions {
  min-width: 224px;
  white-space: nowrap;
}

.match-management-actions button {
  height: 34px;
  margin: 0 4px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.match-management-actions button[data-action="reset"] {
  background: linear-gradient(180deg, #5fc7d8, #247f9b);
}

.match-management-actions button[data-action="close"] {
  background: linear-gradient(180deg, #ef7c62, #cf4944);
}

.match-management-actions button:disabled {
  cursor: default;
  opacity: 0.58;
}

.match-management-row-result {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: #b33d37;
  font-size: 12px;
  white-space: normal;
}

.match-management-empty,
.match-management-placeholder {
  margin: 28px 0;
  color: #567267;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.web-settings-card {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(87, 123, 104, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.16);
  backdrop-filter: blur(6px);
}

.web-settings-card h1,
.web-settings-help { margin: 0; }

.web-settings-card h1 { color: #365d50; }

.web-settings-help {
  color: #567267;
  text-align: center;
}

.background-file-label {
  color: #365d50;
  font-weight: 800;
}

#backgroundFile { width: min(520px, 100%); }

.background-preview-wrap {
  width: min(640px, 100%);
  height: min(52dvh, 420px);
  overflow: hidden;
  border: 1px solid rgba(51, 82, 70, 0.28);
  border-radius: 8px;
  background: #eef2f0;
}

.background-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-mapping-help {
  margin: 0 0 18px;
  color: #567267;
}

.camera-mapping-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.camera-mapping-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.camera-mapping-row select {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid rgba(75, 126, 111, 0.35);
  border-radius: 7px;
  background: #fff;
  color: #294c40;
  font: inherit;
}

.center-check-grid {
  width: 100%;
  max-width: min(100%, calc((100dvh - 170px) * 1.5));
  height: calc(100dvh - 168px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.center-check-card {
  min-width: 0;
  min-height: 0;
  padding: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(87, 123, 104, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 20px rgba(58, 89, 72, 0.14);
  backdrop-filter: blur(5px);
}

.center-check-card h2 {
  margin: 0;
  color: #c4473f;
  font-size: 16px;
  line-height: 1.1;
}

.center-check-image-wrap {
  flex: 1;
  min-height: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(51, 82, 70, 0.28);
  border-radius: 5px;
  background: #fff;
}

.center-check-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.center-check-card .target-card-change {
  flex: 0 0 auto;
  min-width: 132px;
}

.center-check-time {
  flex: 0 0 16px;
  height: 16px;
  margin: 0;
  color: #567267;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.center-check-card .setting-result {
  flex: 0 0 14px;
  height: 14px;
  line-height: 14px;
  font-size: 12px;
}

.position-calibrator {
  width: 100%;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(87, 123, 104, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(58, 89, 72, 0.16);
  backdrop-filter: blur(6px);
}

.position-calibrator h1 {
  margin: 0;
  color: #c4473f;
  font-size: 22px;
  line-height: 1.2;
}

.position-toolbar {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.exposure-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.exposure-tools[hidden] {
  display: none;
}

.exposure-button,
.save-exposure {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(166, 112, 22, 0.3);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.exposure-button { background: linear-gradient(180deg, #e5ae36, #aa7119); }
.save-exposure { background: linear-gradient(180deg, #8c67df, #6541b8); }
.exposure-button:disabled,
.save-exposure:disabled { cursor: default; opacity: 0.58; }

.add-auxiliary-line {
  height: 36px;
  min-width: 126px;
  padding: 0 18px;
  border: 1px solid rgba(42, 126, 146, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #5fc7d8, #247f9b);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(34, 112, 137, 0.2);
}

.add-auxiliary-line:disabled {
  cursor: default;
  opacity: 0.58;
}

.position-stage-wrap {
  width: min(100%, calc((100dvh - 230px) * 1.5));
  min-width: 280px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid rgba(41, 72, 62, 0.46);
  border-radius: 6px;
  background: #000;
  box-shadow: 0 8px 22px rgba(40, 64, 54, 0.18);
}

.position-stage {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.position-stage:active {
  cursor: grabbing;
}

.position-stage.is-waiting image,
.position-stage.is-waiting .position-line,
.position-stage.is-waiting .position-label,
.position-stage.is-waiting .position-endpoint,
.position-stage.is-waiting .position-handle,
.position-stage.is-waiting .position-hand {
  visibility: hidden;
}

.position-stage.is-waiting .exposure-polygon,
.position-stage.is-waiting .exposure-vertex {
  visibility: hidden;
}

.exposure-polygon {
  fill: rgba(255, 216, 64, 0.2);
  stroke: #ffe04b;
  stroke-width: 3;
  stroke-dasharray: 10 7;
  vector-effect: non-scaling-stroke;
  cursor: move;
}

.exposure-vertex {
  fill: #ffe04b;
  stroke: #5b4300;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  cursor: move;
}

.exposure-vertex.is-selected {
  fill: #ff643e;
  stroke: #fff;
}

.position-line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.auxiliary-line {
  stroke: #f5f8ff;
  stroke-dasharray: 8 7;
  filter: drop-shadow(0 0 1px rgba(28, 54, 65, 0.9));
}

.line-a { stroke: #1687f8; }
.line-b { stroke: #e44d45; }
.line-c { stroke: #27a56a; }
.line-d { stroke: #f0b323; }

.position-label {
  stroke: rgba(255, 255, 255, 0.94);
  paint-order: stroke fill;
  stroke-linejoin: round;
  text-anchor: middle;
  dominant-baseline: auto;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.label-a { fill: #1687f8; }
.label-b { fill: #e44d45; }
.label-c { fill: #27a56a; }
.label-d { fill: #f0b323; }

.position-endpoint {
  fill: #fff;
  cursor: move;
  vector-effect: non-scaling-stroke;
}

.position-handle {
  fill: rgba(0, 0, 0, 0.001);
  stroke: none;
  cursor: move;
}

.endpoint-a { stroke: #1687f8; }
.endpoint-b { stroke: #e44d45; }
.endpoint-c { stroke: #27a56a; }
.endpoint-d { stroke: #f0b323; }
.endpoint-auxiliary { stroke: #58d7ea; }

.position-hand {
  cursor: move;
}

.position-hand rect {
  fill: rgba(0, 0, 0, 0.001);
  stroke: none;
}

.position-hand path {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(38, 58, 52, 0.9);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.hand-a path { filter: drop-shadow(0 0 1px rgba(22, 135, 248, 0.9)); }
.hand-b path { filter: drop-shadow(0 0 1px rgba(228, 77, 69, 0.9)); }
.hand-c path { filter: drop-shadow(0 0 1px rgba(39, 165, 106, 0.9)); }
.hand-d path { filter: drop-shadow(0 0 1px rgba(240, 179, 35, 0.9)); }
.hand-auxiliary path { filter: drop-shadow(0 0 1px rgba(88, 215, 234, 0.95)); }

.confirm-endpoints {
  min-width: 132px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(197, 65, 60, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #ef7c62, #cf4944);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(174, 65, 52, 0.2);
}

.confirm-endpoints:disabled {
  cursor: default;
  opacity: 0.58;
}

.endpoint-result {
  min-height: 20px;
  margin: 0;
  color: #2e795a;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.setting-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(87, 123, 104, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(246, 253, 241, 0.62)),
    radial-gradient(circle at 18% 16%, rgba(113, 170, 131, 0.12), transparent 32%),
    radial-gradient(circle at 86% 80%, rgba(211, 75, 69, 0.07), transparent 34%);
  box-shadow:
    0 10px 28px rgba(58, 89, 72, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(6px);
}

.setting-card h2 {
  margin: 0;
  color: #c4473f;
  font-size: clamp(19px, 1.55vw, 24px);
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.setting-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  column-gap: 10px;
  color: #2f5044;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 700;
}

.setting-field legend,
.setting-label {
  margin-right: 0;
  color: #58766a;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.setting-options {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.setting-field label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.setting-field input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #d34b45;
}

.target-paper-model,
.target-front-motion,
.remote-motion,
.audio-player,
.score-push-server {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid rgba(111, 146, 130, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #2d4b3f;
  font: inherit;
}

.line-threshold,
.arrow-width {
  width: 136px;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid rgba(111, 146, 130, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #2d4b3f;
  font: inherit;
}

.number-stepper {
  width: 136px;
  max-width: 136px;
  min-width: 136px;
  justify-self: start;
  display: inline-grid;
  grid-template-columns: 36px 64px 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid rgba(111, 146, 130, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.number-stepper button,
.number-stepper input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #2d4b3f;
  font: inherit;
  font-weight: 800;
  text-align: center;
}

.number-stepper button {
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(240, 249, 236, 0.8));
}

.number-stepper input {
  border-right: 1px solid rgba(111, 146, 130, 0.2);
  border-left: 1px solid rgba(111, 146, 130, 0.2);
  -moz-appearance: textfield;
}

.number-stepper input::-webkit-outer-spin-button,
.number-stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.submit-setting {
  align-self: center;
  min-width: 104px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(197, 65, 60, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, #ef7c62, #cf4944);
  color: #fffdf6;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(174, 65, 52, 0.2);
}

.target-setting-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.target-card-reset,
.target-card-change {
  height: 34px;
  min-width: 92px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.target-card-reset {
  border: 1px solid rgba(198, 77, 66, 0.24);
  background: linear-gradient(180deg, #ff8c6e, #cf4944);
  box-shadow: 0 6px 15px rgba(174, 65, 52, 0.18);
}

.target-card-change {
  border: 1px solid rgba(42, 126, 146, 0.28);
  background: linear-gradient(180deg, #5fc7d8, #247f9b);
  box-shadow: 0 6px 15px rgba(34, 112, 137, 0.18);
}

.target-card-reset:disabled,
.target-card-change:disabled {
  cursor: default;
  opacity: 0.62;
}

.setting-result {
  height: 20px;
  margin: 0;
  color: #2e795a;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1100px) {
  #cameraMappingPanel:not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-shell,
  .detail-shell,
  .game-shell,
  .settings-shell {
    padding: 8px;
  }

  .topbar {
    height: 34px;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 8px;
  }

  .topbar::before {
    width: 24px;
    height: 24px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .settings-tabs {
    min-height: 34px;
    margin-bottom: 8px;
  }

  .settings-tab {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .match-management-card {
    padding: 10px;
  }

  .match-management-tab {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .match-management-table th,
  .match-management-table td {
    padding: 8px;
    font-size: 12px;
  }

  .match-management-actions {
    min-width: 184px;
  }

  .match-management-actions button {
    height: 30px;
    margin: 0 2px;
    padding: 0 9px;
    font-size: 11px;
  }

  .center-check-grid {
    height: calc(100dvh - 144px);
    gap: 6px;
  }

  .center-check-card {
    padding: 5px;
    gap: 4px;
  }

  .center-check-card h2 {
    font-size: 13px;
  }

  .center-check-time {
    flex-basis: 13px;
    height: 13px;
    font-size: 10px;
    line-height: 13px;
  }

  .center-check-card .target-card-change {
    height: 28px;
    min-width: 112px;
    font-size: 11px;
  }

  .position-calibrator {
    padding: 8px;
  }

  .position-calibrator h1 {
    font-size: 18px;
  }

  .position-stage-wrap {
    width: min(100%, calc((100dvh - 210px) * 1.5));
    min-width: 0;
  }

  .target-grid {
    --home-gap: 6px;
    --home-tile: min(
      calc((100vw - 16px - var(--home-gap) * 2) / 3),
      calc((100dvh - 94px - var(--home-gap)) / 2)
    );
    height: calc(100dvh - 94px);
  }

  .detail-layout {
    height: calc(100dvh - 94px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .game-layout {
    height: calc(100dvh - 102px);
  }

  .settings-grid {
    min-height: calc(100dvh - 94px);
    grid-template-columns: 1fr;
    grid-auto-rows: 430px;
    align-content: start;
    gap: 8px;
  }

  .setting-card {
    gap: 6px;
    padding: 8px;
  }

  .setting-field {
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 5px;
    font-size: 12px;
  }

  .setting-field legend,
  .setting-label {
    font-size: 12px;
  }

  .number-stepper {
    width: 100px;
    max-width: 100px;
    min-width: 100px;
    grid-template-columns: 28px 44px 28px;
    height: 30px;
  }

  .submit-setting {
    min-width: 78px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .target-setting-actions {
    gap: 6px;
  }

  .target-card-reset,
  .target-card-change {
    height: 30px;
    min-width: 80px;
    padding: 0 8px;
    font-size: 12px;
  }

  .image-pair {
    gap: 6px;
  }

  .target-action-row {
    min-height: 44px;
  }

  .reset-target,
  .change-paper {
    height: 38px;
    min-width: 118px;
    padding: 0 16px;
    font-size: 14px;
  }

  .game-shell .topbar .reset-target,
  .game-shell .topbar .change-paper {
    height: 28px;
    min-width: 72px;
    padding: 0 6px;
    font-size: 10px;
  }

  .back-link,
  .status,
  .sound-toggle,
  .settings-link {
    height: 30px;
    min-width: auto;
    padding: 0 8px;
    font-size: 12px;
  }

  .home-pager {
    gap: 4px;
  }

  .home-pager button {
    height: 28px;
    min-width: 48px;
    padding: 0 6px;
    font-size: 11px;
  }

  .home-pager span {
    min-width: 38px;
    font-size: 11px;
  }
}

@media (orientation: portrait) {
  html.mobile-layout,
  html.mobile-layout body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  html.mobile-layout .home-shell,
  html.mobile-layout .detail-shell,
  html.mobile-layout .game-shell,
  html.mobile-layout .settings-shell {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100dvh;
    height: calc(100dvw - 44px);
    max-width: none;
    /* 向右平移 22px：旋转后只在左侧（横屏底部）留 44px 给备案栏，其他边贴满 */
    transform: translate(calc(-50% + 22px), -50%) rotate(90deg);
    transform-origin: center;
    /* 背景随容器旋转（跟随强制横屏） */
    background:
      linear-gradient(rgba(255, 253, 244, 0.36), rgba(248, 251, 238, 0.42)),
      url("/background-image"),
      var(--bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  /* 手机横屏（旋转90°）布局：备案栏位于视口左侧（=旋转后屏幕底部），文字旋转为正立 */
  html.mobile-layout .site-filing {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    background: rgba(250, 252, 244, 0.94);
  }
  html.mobile-layout .site-filing a {
    transform: rotate(90deg);
    white-space: nowrap;
  }

  html.mobile-layout .target-grid {
    --home-gap: 6px;
    --home-tile: min(
      calc((100dvh - 16px - var(--home-gap) * 2) / 3),
      calc((100dvw - 102px - var(--home-gap)) / 2)
    );
    height: calc(100dvw - 102px);
  }

  html.mobile-layout .detail-layout {
    height: calc(100dvw - 102px);
  }

  html.mobile-layout .game-layout {
    height: calc(100dvw - 102px);
    grid-template-rows: minmax(0, 1fr) minmax(0, 0.8fr);
  }

  html.mobile-layout .match-table-wrap {
    overflow-x: hidden;
    overflow-y: hidden;
  }

  html.mobile-layout .match-score-table {
    height: 100%;
    font-size: clamp(7px, 1.7dvw, 12px);
  }

  html.mobile-layout .match-score-table th,
  html.mobile-layout .match-score-table td {
    padding: 0;
    line-height: 1;
    border-width: 1px;
  }

  html.mobile-layout .match-label-column {
    width: 28px;
  }

  html.mobile-layout .match-member-heading::after {
    top: 24px;
    font-size: clamp(96px, min(20dvh, 36dvw), 180px);
  }

  html.mobile-layout .settings-grid {
    min-height: calc(100dvw - 136px);
  }

  html.mobile-layout .center-check-grid {
    height: calc(100dvw - 144px);
  }

  html.mobile-layout .position-stage-wrap {
    width: min(100%, 90dvh);
  }
}

.contact-button {
  margin-left: auto;
  white-space: nowrap;
}

.site-filing {
  height: 44px;
  padding: 8px 16px;
  color: rgba(33, 68, 58, 0.85);
  font-size: 13px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.site-filing a {
  color: inherit;
  text-decoration: none;
}

.site-filing a:hover {
  color: rgba(33, 68, 58, 0.95);
  text-decoration: underline;
}

.cloud-settings-shell {
  min-height: calc(100vh - 80px);
}

.cloud-setting-label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 700;
}

.cloud-setting-input {
  width: min(100%, 720px);
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(58, 104, 91, 0.35);
  border-radius: 8px;
  font: inherit;
}
