:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #737373;
  --line: rgba(23, 23, 23, 0.13);
  --line-strong: rgba(23, 23, 23, 0.34);
  --panel: rgba(255, 255, 255, 0.92);
  --lu: #25825a;
  --quan: #7650a6;
  --ke: #2f6f9d;
  --taiwei-red: #a51f24;
  --taiwei-red-strong: #a51f24;
  --taiwei-red-soft: rgba(165, 31, 36, 0.1);
  --taiwei-red-border: rgba(165, 31, 36, 0.34);
  --ji: var(--taiwei-red-strong);
  --fly-lu: #2f974f;
  --fly-quan: #8d3faf;
  --fly-ke: #2f86d9;
  --fly-ji: var(--taiwei-red);
  --fly-line-color-lu: rgb(47, 151, 79);
  --fly-line-color-quan: rgb(141, 63, 175);
  --fly-line-color-ke: rgb(47, 134, 217);
  --fly-line-color-ji: rgb(165, 31, 36);
  --minor: #2d7376;
  --adjective: #62666d;
  --shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
  --soft-shadow: 0 6px 18px rgba(15, 23, 42, 0.045);
  --board-scale: 1;
  --board-fit-scale: 1;
  --board-width: 1392px;
  --board-height: 900px;
  --chart-font-scale: 1;
  --page-margin: 40px;
  --board-padding: 32px;
  --board-padding-x: 52px;
  --board-padding-y: 52px;
  --fly-line-width: 2.8px;
  --manual-fly-line-width: 2.8px;
  --fly-line-dash: 9 6;
  --fly-line-dash-lu: 7 5;
  --fly-line-dash-quan: 10 5;
  --fly-line-dash-ke: 11 6;
  --fly-line-dash-ji: 9 5;
  --fly-line-pulse-duration: 1s;
  --fly-line-pulse-distance: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "PingFang TC",
    "PingFang SC",
    "Noto Sans CJK TC",
    "Noto Sans CJK SC",
    "Source Han Sans TC",
    "Source Han Sans SC",
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px 0 14px;
  overflow: hidden;
}

.site-header {
  width: min(var(--board-width), calc(100vw - (var(--page-margin) * 2)));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 34px;
}

.status-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

h1,
p {
  margin: 0;
}

h1 {
  line-height: 1;
}

.brand-title {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  color: var(--ink);
  letter-spacing: 0;
}

.brand-name {
  font-size: clamp(24px, 1.55vw, 34px);
  font-weight: 620;
}

.brand-separator {
  width: 1px;
  height: 0.9em;
  margin: 0 2px;
  transform: translateY(0.08em);
  background: rgba(23, 23, 23, 0.18);
}

.brand-subtitle {
  color: rgba(23, 23, 23, 0.72);
  font-size: clamp(16px, 0.9vw, 19px);
  font-weight: 430;
}

.header-button {
  height: 30px;
  min-width: 44px;
  padding: 0 11px;
  border: 1px solid rgba(22, 22, 22, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(22, 22, 22, 0.68);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  backdrop-filter: none;
}

.header-button:hover,
.header-button:focus-visible {
  border-color: rgba(22, 22, 22, 0.28);
  color: rgba(22, 22, 22, 0.94);
}

.header-button:disabled {
  cursor: default;
  opacity: 0.36;
}

.account-header-button {
  min-width: 82px;
  border-color: rgba(23, 23, 23, 0.18);
  background: #ffffff;
  color: rgba(23, 23, 23, 0.82);
  font-weight: 500;
}

.account-header-button.is-authenticated {
  color: rgba(23, 23, 23, 0.64);
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

.account-modal.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(248, 248, 249, 0.78);
  cursor: default;
}

.account-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.account-close-button {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 7px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.58);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.account-close-button:hover,
.account-close-button:focus-visible {
  border-color: rgba(23, 23, 23, 0.24);
  color: rgba(23, 23, 23, 0.9);
}

.settings-panel {
  position: fixed;
  top: 72px;
  right: var(--page-margin);
  z-index: 60;
  width: 372px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 96px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(22, 22, 22, 0.13);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: none;
}

.settings-note {
  color: rgba(23, 23, 23, 0.68);
  font-size: 12px;
  line-height: 1.55;
}

.settings-action {
  height: 32px;
  width: 100%;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 7px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.72);
  cursor: pointer;
  font-size: 12px;
  text-align: center;
}

.settings-action:hover,
.settings-action:focus-visible {
  border-color: rgba(23, 23, 23, 0.24);
  color: rgba(23, 23, 23, 0.94);
}

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

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
}

.settings-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(23, 23, 23, 0.09);
}

.settings-language {
  padding-top: 0;
  border-top: 0;
}

.settings-section h2,
.settings-subhead {
  margin: 0;
  color: rgba(23, 23, 23, 0.9);
  font-size: 12px;
  font-weight: 620;
  line-height: 1;
}

.settings-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.settings-field input,
.settings-field textarea,
.settings-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(23, 23, 23, 0.14);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
}

.settings-field input,
.settings-field select {
  height: 30px;
}

.settings-field textarea {
  min-height: 68px;
  padding: 8px 9px;
  resize: vertical;
  line-height: 1.45;
}

.settings-field.settings-select-row {
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
}

.settings-button-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.settings-button-grid .settings-action {
  padding: 0 8px;
}

.settings-status-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-status-row strong {
  color: rgba(23, 23, 23, 0.82);
  font-size: 12px;
  font-weight: 520;
}

.settings-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.case-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(23, 23, 23, 0.09);
}

.case-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(23, 23, 23, 0.09);
}

.case-item.is-active .case-item-main strong {
  color: var(--ji);
}

.case-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.case-item-main strong {
  overflow: hidden;
  color: rgba(23, 23, 23, 0.92);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-item-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-item-actions {
  display: inline-flex;
  gap: 5px;
}

.case-item-actions button {
  height: 26px;
  min-width: 42px;
  padding: 0 8px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 6px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.7);
  cursor: pointer;
  font-size: 11px;
}

.case-item-actions button:hover,
.case-item-actions button:focus-visible {
  border-color: rgba(23, 23, 23, 0.26);
  color: rgba(23, 23, 23, 0.94);
}

.settings-head button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(22, 22, 22, 0.5);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.settings-panel label {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.settings-panel .settings-field {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 6px;
  font-size: 11px;
}

.settings-panel .settings-field.settings-select-row {
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
}

.settings-panel .line-style-lock {
  display: none;
}

.settings-panel input[type="range"] {
  height: 20px;
  padding: 0;
  accent-color: #111111;
  background: transparent;
}

.settings-panel output {
  color: rgba(22, 22, 22, 0.7);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.settings-panel .settings-select-row {
  grid-template-columns: 72px minmax(0, 1fr);
}

.settings-panel select {
  height: 30px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid rgba(23, 23, 23, 0.14);
  border-radius: 7px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.78);
  font-size: 12px;
}

.settings-reset {
  height: 32px;
  border: 1px solid rgba(22, 22, 22, 0.12);
  border-radius: 7px;
  background: rgba(22, 22, 22, 0.04);
  color: rgba(22, 22, 22, 0.72);
  cursor: pointer;
  font-size: 12px;
}

.bottom-dock {
  z-index: 40;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(var(--board-width), calc(100vw - (var(--page-margin) * 2)));
  margin: 0 auto;
}

.input-panel {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 70;
  width: fit-content;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
  backdrop-filter: none;
  opacity: 1;
  transform: translateX(-50%);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}

.input-panel.is-collapsed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}

.input-panel:not(.is-collapsed) {
  padding: 9px 10px;
}

.input-panel-tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 8px;
  padding: 2px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 7px;
  background: #f7f7f8;
}

.input-panel-tabs button {
  height: 26px;
  min-width: 54px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(23, 23, 23, 0.58);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}

.input-panel-tabs button.is-active {
  background: #ffffff;
  color: rgba(23, 23, 23, 0.9);
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.08);
}

.input-pane[hidden] {
  display: none;
}

.chart-form {
  display: grid;
  grid-template-columns: 126px 54px 114px 118px 164px 76px;
  gap: 6px;
  align-items: end;
  width: max-content;
  max-width: 100%;
}

.chart-form label,
.chart-form .chart-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chart-form label span,
.chart-form .chart-field span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

input,
select,
.chart-form button {
  height: 34px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
}

input,
select {
  width: 100%;
  padding: 0 9px;
  font-size: 12.5px;
}

.field-gender select,
#timeBranchInput {
  padding-right: 18px;
  padding-left: 7px;
  text-align: center;
  text-align-last: center;
}

.time-input-grid {
  display: grid;
  grid-template-columns: 68px 44px;
  gap: 6px;
}

.time-field-head {
  display: grid;
  grid-template-columns: 68px 44px;
  gap: 6px;
}

.field-time {
  position: relative;
}

.date-segment-control {
  display: grid;
  grid-template-columns: 38px 6px 18px 6px 18px;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.date-segment-control:focus-within {
  border-color: rgba(23, 23, 23, 0.48);
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.12);
}

.date-segment-input {
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12.5px;
  text-align: center;
}

.date-year-input {
  text-align: center;
}

.date-segment-input:focus {
  outline: 0;
}

.date-segment-input::placeholder {
  color: rgba(23, 23, 23, 0.38);
}

.date-segment-separator {
  color: rgba(23, 23, 23, 0.42);
  font-size: 12px;
  text-align: center;
}

.time-input-grid input[readonly] {
  cursor: pointer;
  padding: 0 6px;
  text-align: center;
}

.time-popover {
  position: absolute;
  left: min(50%, 520px);
  bottom: calc(100% + 10px);
  width: 224px;
  padding: 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(22, 22, 22, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

.time-popover[hidden] {
  display: none;
}

.time-wheel-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.time-wheel-column {
  display: grid;
  gap: 5px;
}

.time-wheel-label {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.time-wheel {
  height: 156px;
  overflow-y: auto;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 7px;
  background: #fbfbfb;
  scroll-snap-type: y proximity;
}

.chart-form .time-wheel-option {
  display: block;
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(23, 23, 23, 0.78);
  cursor: pointer;
  font-size: 13px;
  scroll-snap-align: center;
  font-weight: 500;
}

.chart-form .time-wheel-option:hover,
.chart-form .time-wheel-option:focus-visible {
  background: rgba(23, 23, 23, 0.06);
  color: rgba(23, 23, 23, 0.92);
  outline: 0;
}

.chart-form .time-wheel-option.is-selected {
  background: rgba(23, 23, 23, 0.86);
  color: #ffffff;
}

.longitude-input-grid {
  display: grid;
  grid-template-columns: 62px 96px;
  gap: 6px;
}

.longitude-input-grid input[type="number"] {
  appearance: textfield;
}

.longitude-input-grid input[type="number"]::-webkit-outer-spin-button,
.longitude-input-grid input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.case-panel {
  width: min(660px, calc(100vw - 56px));
}

.case-panel-head,
.case-list-head,
.case-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.case-panel-head {
  margin-bottom: 8px;
}

.case-panel-head strong,
.account-panel-copy strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.case-storage-state,
#caseCountLabel {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.case-primary-action,
.case-option-row button,
.account-panel button {
  height: 30px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 6px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.75);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}

.case-primary-action {
  border-color: rgba(23, 23, 23, 0.28);
  background: rgba(23, 23, 23, 0.88);
  color: #ffffff;
}

.case-editor-grid {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) 86px minmax(142px, 1fr);
  gap: 7px;
  align-items: start;
}

.case-editor-grid label {
  display: grid;
  gap: 4px;
}

.case-editor-grid label span,
.case-list-head span,
.case-check span,
.account-panel-copy p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.case-note-field {
  grid-column: 1 / -1;
}

.case-note-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 8px 9px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.case-option-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 8px 0;
}

.case-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
}

.case-check input {
  width: 14px;
  height: 14px;
  padding: 0;
}

.case-list {
  display: grid;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 7px;
  background: #ffffff;
}

.case-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.07);
}

.case-item:last-child {
  border-bottom: 0;
}

.case-item.is-active {
  background: #fafafa;
}

.case-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.case-item-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-item-main span,
.case-item-main em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-item-actions {
  display: flex;
  gap: 5px;
}

.case-item-actions button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 5px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.62);
  cursor: pointer;
  font-size: 10.5px;
}

.settings-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 11px;
}

.account-panel {
  width: min(420px, calc(100vw - 56px));
}

.account-panel-copy {
  display: grid;
  gap: 6px;
  margin: 0 32px 12px 0;
}

.account-panel-copy p {
  margin: 0;
}

.account-control-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.account-email-field {
  display: grid;
  gap: 4px;
}

.account-email-field span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.account-email-field input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(23, 23, 23, 0.13);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  outline: none;
}

.account-email-field input:focus {
  border-color: rgba(23, 23, 23, 0.34);
}

.account-status {
  min-height: 14px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.account-status.is-error {
  color: var(--red);
}

.account-panel button:disabled {
  cursor: default;
  opacity: 0.48;
}

.date-field {
  position: relative;
}

.date-popover {
  display: none !important;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: 318px;
  padding: 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(22, 22, 22, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 58px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(22px) saturate(1.15);
}

.date-picker-head {
  display: grid;
  grid-template-columns: 30px 30px 1fr 64px 58px 30px 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.date-picker-head strong {
  min-width: 58px;
  text-align: center;
  font-size: 13px;
  font-weight: 520;
}

.date-picker-head select,
.date-picker-head input {
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 6px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.78);
  font-size: 12px;
  text-align: center;
}

.date-picker-head button,
.date-picker-days button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.date-picker-head button {
  height: 28px;
  border-radius: 999px;
  font-size: 14px;
}

.date-picker-head button:hover,
.date-picker-days button:hover {
  background: rgba(22, 22, 22, 0.06);
}

.date-picker-weekdays,
.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.date-picker-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.date-picker-days span,
.date-picker-days button {
  height: 30px;
}

.date-picker-days button {
  border-radius: 7px;
  font-size: 12px;
}

.date-picker-days button.is-selected {
  background: rgba(22, 22, 22, 0.86);
  color: #ffffff;
}

.chart-form button {
  padding: 0 14px;
  cursor: pointer;
  background: #111111;
  color: #ffffff;
  border-color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  font-size: 13px;
  font-weight: 560;
}

.chart-form .date-picker-head button,
.chart-form .date-picker-days button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.chart-form .date-picker-head button {
  height: 28px;
  border-radius: 999px;
}

.chart-form .date-picker-days button {
  height: 30px;
  border-radius: 7px;
}

.chart-form .date-picker-head button:hover,
.chart-form .date-picker-days button:hover {
  background: rgba(22, 22, 22, 0.06);
}

.chart-form .date-picker-days button.is-selected {
  background: rgba(22, 22, 22, 0.86);
  color: #ffffff;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(22, 22, 22, 0.7);
  outline-offset: 2px;
}

.chart-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0 var(--page-margin);
  overflow: hidden;
}

.board-shell {
  align-self: center;
  justify-self: center;
  width: var(--board-width);
  height: var(--board-height);
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  padding: var(--board-padding-y) var(--board-padding-x);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  backdrop-filter: none;
}

.chart-board {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: visible;
  border: 1px solid var(--line-strong);
  background: var(--line);
  font-size: calc(16px * var(--chart-font-scale));
}

.palace {
  position: relative;
  z-index: auto;
  min-width: 0;
  min-height: 0;
  padding: clamp(8px, 0.55vw, 11px);
  background: #ffffff;
  cursor: pointer;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 4px;
  outline: 0 solid transparent;
  transition: none;
}

.palace:hover {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(22, 22, 22, 0.16);
}

.palace.is-selected {
  z-index: auto;
  background: #ffffff;
  box-shadow: none;
}

.palace.is-auto-source {
  z-index: auto;
  background: #ffffff;
  box-shadow: none;
}

.palace.is-pending-source {
  z-index: 18;
  box-shadow:
    inset 0 0 0 2px rgba(39, 128, 85, 0.9),
    0 10px 30px rgba(39, 128, 85, 0.14);
}

.palace.is-inbound-target {
  z-index: 18;
  box-shadow:
    inset 0 0 0 2px rgba(165, 31, 36, 0.72),
    0 10px 30px rgba(165, 31, 36, 0.12);
}

.palace.is-inbound-source {
  background: #f8faf9;
}

.palace-name {
  color: var(--taiwei-red);
  font-size: calc(clamp(14.5px, 0.88vw, 19px) * var(--chart-font-scale));
  font-weight: 560;
  line-height: 1;
  white-space: nowrap;
}

.palace-name-mark {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--taiwei-red-border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--taiwei-red);
  font-size: 8.5px;
  font-weight: 560;
  line-height: 1;
}

.palace-name-mark.mark-origin {
  border-radius: 4px;
  background: rgba(165, 31, 36, 0.06);
}

.palace-name-mark.mark-body {
  border-radius: 4px;
  background: rgba(165, 31, 36, 0.06);
}

.palace-branch,
.palace-mark,
.palace-meta,
.empty-star,
.brightness,
.center-mutagen-title {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.palace-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #111111;
  background: #ffffff;
}

.star-field {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: clamp(7px, 0.45vw, 10px);
  padding-right: clamp(28px, 1.9vw, 42px);
  overflow: hidden;
}

.upper-stars,
.star-column-group {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: clamp(4px, 0.33vw, 7px);
  min-width: 0;
}

.upper-stars {
  flex: 0 0 auto;
}

.adjective-group {
  flex: 1 1 auto;
  row-gap: 5px;
}

.empty-star {
  visibility: hidden;
}

.star-name {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: calc(18px * var(--chart-font-scale));
  min-width: calc(16px * var(--chart-font-scale));
  max-height: 108px;
  white-space: nowrap;
  color: var(--minor);
  font-size: calc(clamp(14px, 0.78vw, 17px) * var(--chart-font-scale));
  line-height: 1;
}

.star-name.secondary {
  color: #2d3136;
  font-weight: 480;
}

.star-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0;
  line-height: 1;
}

.star-name.is-star-highlight .star-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--taiwei-red);
  color: #ffffff;
  text-shadow: none;
}

.star-name.is-star-highlight.is-fly-target .star-text {
  background: var(--taiwei-red);
  border: 0;
  box-shadow: none;
  outline: 0;
}

.star-name.primary {
  color: var(--taiwei-red);
  width: calc(24px * var(--chart-font-scale));
  min-width: calc(22px * var(--chart-font-scale));
  font-size: calc(clamp(20px, 1.12vw, 25px) * var(--chart-font-scale));
  font-weight: 560;
  line-height: 1;
}

.star-name.adjective {
  color: var(--adjective);
  width: calc(15px * var(--chart-font-scale));
  min-width: calc(14px * var(--chart-font-scale));
  font-size: calc(clamp(12px, 0.68vw, 15px) * var(--chart-font-scale));
  line-height: 1;
}

.star-name.is-fly-target {
  z-index: 35;
}

.star-name.is-fly-target .star-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #ffffff;
  text-shadow: none;
}

.star-name.fly-target-lu .star-text {
  background: var(--fly-lu);
}

.star-name.fly-target-quan .star-text {
  background: var(--fly-quan);
}

.star-name.fly-target-ke .star-text {
  background: var(--fly-ke);
}

.star-name.fly-target-ji .star-text {
  background: var(--fly-ji);
}

.brightness {
  writing-mode: vertical-rl;
  text-orientation: upright;
  margin-top: 1px;
  color: rgba(22, 22, 22, 0.62);
  font-size: 0.62em;
  line-height: 1;
}

.year-mutagen-seal {
  display: inline-grid;
  place-items: center;
  width: calc(22px * var(--chart-font-scale));
  height: calc(22px * var(--chart-font-scale));
  border-radius: 5px;
  background: var(--ji);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 10px rgba(165, 31, 36, 0.14);
  font-size: calc(14px * var(--chart-font-scale));
  font-weight: 650;
  line-height: 1;
}

.mutagen-lu .year-mutagen-seal {
  background: var(--lu);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 10px rgba(39, 128, 85, 0.14);
}

.mutagen-quan .year-mutagen-seal {
  background: var(--quan);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 10px rgba(124, 77, 162, 0.14);
}

.mutagen-ke .year-mutagen-seal {
  background: var(--ke);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 10px rgba(47, 111, 159, 0.14);
}

.palace-footer {
  position: relative;
  --palace-footer-pair-height: calc(clamp(32px, 1.9vw, 38px) * var(--chart-font-scale));
  min-height: clamp(58px, 4.25vw, 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  column-gap: clamp(4px, 0.36vw, 7px);
}

.palace-small-meta {
  align-self: end;
  display: grid;
  justify-items: start;
  gap: 2px;
  color: var(--minor);
  font-size: calc(clamp(11px, 0.68vw, 14px) * var(--chart-font-scale));
  line-height: 1.1;
  padding-bottom: 2px;
}

.palace-footer-main {
  align-self: end;
  justify-self: end;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: end;
  align-content: stretch;
  gap: 0;
  height: var(--palace-footer-pair-height);
  min-width: clamp(56px, 4.05vw, 78px);
  padding-bottom: 0;
}

.palace-age {
  align-self: start;
  color: #171717;
  font-size: calc(clamp(14px, 0.84vw, 18px) * var(--chart-font-scale));
  font-weight: 520;
  line-height: 0.98;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.palace-title-row {
  align-self: end;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.palace-stem-branch {
  justify-self: end;
  align-self: end;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  height: var(--palace-footer-pair-height);
  color: #171717;
  font-size: calc(clamp(17px, 1vw, 22px) * var(--chart-font-scale));
  font-weight: 430;
  line-height: 0.94;
}

.palace-heavenly-stem,
.palace-earthly-branch {
  display: block;
  line-height: 0.94;
}

.palace-flow-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.palace-flow-marker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 22px;
  width: 22px;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  font-size: 0;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  text-shadow:
    0 1px 0 var(--paper),
    0 -1px 0 var(--paper),
    1px 0 0 var(--paper),
    -1px 0 0 var(--paper);
}

.flow-arrow {
  position: relative;
  display: block;
  width: 17px;
  height: 1.9px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
  transform: rotate(var(--arrow-angle));
  transform-origin: center;
}

.flow-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.9px solid currentColor;
  border-right: 1.9px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  transform-origin: center;
}

.palace-flow-marker.kind-lu {
  color: var(--lu);
}

.palace-flow-marker.kind-quan {
  color: var(--quan);
}

.palace-flow-marker.kind-ke {
  color: var(--ke);
}

.palace-flow-marker.kind-ji {
  color: var(--ji);
}

.command-dock {
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 0;
  pointer-events: auto;
}

.dock-group,
.command-dock > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 23, 23, 0.1);
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
}

.dock-group {
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
}

.command-dock button {
  height: 34px;
  min-width: 76px;
  padding: 0 16px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 6px;
  background: #ffffff;
  color: rgba(23, 23, 23, 0.68);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.command-dock button:hover,
.command-dock button:focus-visible {
  background: rgba(23, 23, 23, 0.06);
  color: rgba(23, 23, 23, 0.92);
}

.command-dock button.is-active {
  border-color: rgba(23, 23, 23, 0.22);
  background: rgba(23, 23, 23, 0.86);
  color: #ffffff;
}

.command-dock button:disabled,
.command-dock button.is-disabled,
.command-dock button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.36;
}

.fly-manual-control,
.fly-edit-control {
  display: none;
}

[data-fly-mode="manual"] .fly-manual-control,
[data-fly-mode="manual"] .fly-edit-control,
[data-fly-mode="all"] .fly-manual-control,
[data-fly-mode="all"] .fly-edit-control,
[data-tool-mode="fly"] .fly-manual-control,
[data-tool-mode="fly"] .fly-edit-control {
  display: inline-flex;
}

.manual-line-layer {
  position: absolute;
  inset: -1px;
  z-index: 32;
  overflow: visible;
  pointer-events: none;
}

.fly-relation-label-layer {
  position: absolute;
  inset: 0;
  z-index: 33;
  display: none;
  pointer-events: none;
}

.fly-relation-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 24px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fly-quan);
  font-size: calc(clamp(16px, 1vw, 22px) * var(--chart-font-scale));
  font-weight: 560;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: none;
  transform: translate(-50%, -50%);
}

.manual-fly-line,
.fly-line {
  fill: none;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  stroke-width: var(--manual-fly-line-width);
  opacity: 0.84;
  stroke-dasharray: var(--fly-line-dash);
  stroke-dashoffset: 0;
  filter: none;
  animation: none;
  transition: none;
}

.manual-fly-line.line-mode-auto {
  opacity: 0.9;
  stroke-width: var(--fly-line-width);
  animation: taiweiFlyLinePulse var(--fly-line-pulse-duration) linear infinite;
}

.manual-fly-line.line-mode-manual {
  opacity: 0.58;
  animation: none;
}

.manual-fly-line.line-lu {
  stroke: var(--fly-line-color-lu);
  stroke-dasharray: var(--fly-line-dash-lu);
  --fly-line-pulse-distance: 12px;
}

.manual-fly-line.line-quan {
  stroke: var(--fly-line-color-quan);
  stroke-dasharray: var(--fly-line-dash-quan);
  --fly-line-pulse-distance: 15px;
}

.manual-fly-line.line-ke {
  stroke: var(--fly-line-color-ke);
  stroke-dasharray: var(--fly-line-dash-ke);
  --fly-line-pulse-distance: 17px;
}

.manual-fly-line.line-ji {
  stroke: var(--fly-line-color-ji);
  stroke-dasharray: var(--fly-line-dash-ji);
  --fly-line-pulse-distance: 14px;
}

.manual-fly-line.is-highlighted {
  opacity: 0.9;
  stroke-width: var(--manual-fly-line-width);
}

.manual-fly-line.line-mode-auto.is-highlighted {
  stroke-width: var(--fly-line-width);
}

.manual-fly-line.is-dimmed {
  opacity: 0.16;
}

.mutagen-context-menu {
  position: fixed;
  z-index: 90;
  display: grid;
  min-width: 92px;
  padding: 6px;
  border: 1px solid rgba(22, 22, 22, 0.14);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(22, 22, 22, 0.12);
  color: #171717;
}

.mutagen-context-menu[hidden] {
  display: none;
}

.mutagen-context-action {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #171717;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.mutagen-context-action::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.mutagen-context-action:hover,
.mutagen-context-action:focus-visible {
  outline: 0;
  background: rgba(22, 22, 22, 0.055);
}

.mutagen-context-action.line-lu {
  color: var(--fly-line-color-lu);
}

.mutagen-context-action.line-quan {
  color: var(--fly-line-color-quan);
}

.mutagen-context-action.line-ke {
  color: var(--fly-line-color-ke);
}

.mutagen-context-action.line-ji {
  color: var(--fly-line-color-ji);
}

@keyframes taiweiFlyLinePulse {
  to {
    stroke-dashoffset: calc(var(--fly-line-pulse-distance) * -1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .manual-fly-line.line-mode-auto {
    stroke-dashoffset: 0;
    animation: none;
  }
}

.center-panel {
  position: relative;
  z-index: 2;
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(14px, 1vw, 22px);
  background: #ffffff;
}

.center-card {
  width: min(460px, 100%);
  max-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  text-align: center;
  overflow: hidden;
}

.center-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #111111;
  font-size: calc(clamp(12px, 0.72vw, 14px) * var(--chart-font-scale));
  font-weight: 540;
  line-height: 1;
}

.center-brand-name {
  color: #111111;
  font-weight: 560;
}

.center-brand-domain {
  color: rgba(23, 23, 23, 0.58);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82em;
  font-weight: 500;
}

.center-subtitle {
  color: rgba(23, 23, 23, 0.58);
  font-size: calc(clamp(10px, 0.58vw, 12px) * var(--chart-font-scale));
  font-weight: 460;
  line-height: 1.1;
}

.center-title {
  color: #171717;
  font-family: "Songti SC", "STSong", "Noto Serif CJK TC", "Noto Serif TC", Georgia, serif;
  font-size: calc(clamp(14px, 0.84vw, 18px) * var(--chart-font-scale));
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

.center-meta {
  color: var(--muted);
  display: grid;
  gap: 4px;
  font-size: calc(clamp(12px, 0.74vw, 15px) * var(--chart-font-scale));
  line-height: 1.24;
}

.center-mutagens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}

.center-mutagen,
.center-mutagen-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: calc(12px * var(--chart-font-scale));
  font-weight: 520;
  line-height: 1;
  box-shadow: none;
  filter: none;
  text-shadow: none;
}

.center-mutagen.kind-lu {
  color: var(--lu);
}

.center-mutagen.kind-quan {
  color: var(--quan);
}

.center-mutagen.kind-ke {
  color: var(--ke);
}

.center-mutagen.kind-ji {
  color: var(--ji);
}

.screen-footer {
  width: min(1540px, calc(100vw - (var(--page-margin) * 2)));
  margin: 0 auto;
  min-height: 0;
}

.status-line {
  position: fixed;
  left: var(--page-margin);
  bottom: 64px;
  z-index: 50;
  max-width: min(520px, calc(100vw - (var(--page-margin) * 2)));
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.status-line.is-visible {
  padding: 7px 10px;
  border: 1px solid rgba(198, 71, 63, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
  opacity: 0.95;
  transform: translateY(0);
}

.status-line.is-error {
  color: var(--ji);
}

body.is-presentation .site-header,
body.is-presentation .input-panel,
body.is-presentation .dock-mode-control,
body.is-presentation .fly-manual-control,
body.is-presentation .fly-edit-control,
body.is-presentation .screen-footer {
  display: none;
}

body.is-presentation #rebuildChartButton {
  display: none;
}

body.is-presentation .page-shell {
  grid-template-rows: minmax(0, 1fr) auto;
  padding-top: 14px;
}

body.is-presentation .chart-stage {
  padding-top: 0;
}

body.is-presentation .bottom-dock {
  width: auto;
}

body.is-presentation .command-dock {
  width: auto;
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .page-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .site-header,
  .screen-footer,
  .bottom-dock {
    width: min(100vw - 24px, 980px);
  }

  .chart-stage {
    padding: 0 12px;
    overflow-x: auto;
    place-items: start center;
  }

  .site-header {
    align-items: flex-start;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .settings-panel {
    right: 12px;
  }

  .board-shell {
    width: var(--board-width);
    height: var(--board-height);
    min-height: 0;
    overflow-x: auto;
  }

  .chart-board {
    min-width: 0;
    min-height: 0;
  }

  .input-panel {
    width: fit-content;
    max-width: calc(100vw - 28px);
  }

  .command-dock {
    width: min(920px, calc(100vw - 24px));
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .input-panel {
    width: min(520px, calc(100vw - 28px));
  }

  .chart-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }

  .time-input-grid,
  .time-field-head {
    grid-template-columns: minmax(0, 1fr) 56px;
  }

  .longitude-input-grid {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .chart-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    display: grid;
  }

  .settings-panel {
    top: 116px;
    width: min(372px, calc(100vw - 24px));
  }

  .chart-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .input-panel {
    bottom: 78px;
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100vh - 108px);
    overflow-y: auto;
  }

  .time-popover {
    left: 50%;
    width: min(294px, calc(100vw - 48px));
  }

  .command-dock {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .dock-group {
    flex: 0 0 auto;
  }

  .bottom-dock {
    justify-items: stretch;
  }
}
