:root {
  --green: #176b55;
  --deep: #104f3f;
  --ink: #203a31;
  --muted: #66736c;
  --bg: #f6f7f4;
  --line: #e1e6de;
  --pale: #edf4ee;
  --amber: #85550e;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button,
a {
  touch-action: manipulation;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #bd7929;
  outline-offset: 4px;
}
button {
  border: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: -0.9px;
  font-weight: 750;
}
h2 {
  font-size: 18px;
  line-height: 1.5;
}
h3 {
  font-size: 15px;
}
.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 240px;
  background: #fff;
  padding: 10px;
  z-index: 100;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: translateY(0);
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 18px 22px;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 800;
  transform: rotate(-7deg);
}
.brand strong {
  font-size: 17px;
  letter-spacing: -0.5px;
  display: block;
  line-height: 1.4;
}
.brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.3px;
  margin-top: 2px;
}
.nav-label {
  margin: 43px 12px 12px;
  color: #7b867e;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #56675e;
  min-height: 47px;
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 550;
}
.sidebar nav a:hover {
  background: var(--pale);
  text-decoration: none;
}
.sidebar nav a.active {
  color: var(--green);
  background: #eaf3ec;
  font-weight: 700;
}
.sidebar nav a.active:after {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 17px 13px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.sidebar-bottom strong {
  font-weight: 600;
}
.sidebar-bottom p {
  color: var(--muted);
  margin-top: 5px;
}
.version {
  display: block;
  color: #6b7971;
  font-size: 10px;
  letter-spacing: 0.4px;
  margin-top: 15px;
}
.status-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  margin-right: 5px;
}
.workspace {
  margin-left: 220px;
}
.topbar {
  height: 69px;
  background: #ffffffb8;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 10px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}
.breadcrumb span {
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 550;
}
.badge {
  display: inline-flex;
  align-items: center;
  background: var(--pale);
  border: 1px solid #dbe9de;
  color: var(--green);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  white-space: nowrap;
}
.topbar .status-dot {
  width: 5px;
  height: 5px;
}
main {
  max-width: 1550px;
  margin: auto;
  padding: 30px 36px 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 23px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.3px;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 5px;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
  max-width: 730px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 17px;
  line-height: 1.4;
  white-space: nowrap;
}
.button:hover {
  background: var(--deep);
  text-decoration: none;
}
.button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.button.secondary:hover {
  border-color: #adc6b5;
  background: var(--pale);
}
.button.plain {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.button.plain:hover {
  color: var(--green);
  background: var(--pale);
}
.button.full {
  width: 100%;
}
.text-link {
  font-size: 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}
.snapshot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  background: #f0f2eb;
  border: 1px solid #e2e7d9;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  color: #5c6857;
}
.snapshot > .icon {
  width: 16px;
  height: 16px;
}
.snapshot strong {
  font-weight: 600;
}
.snapshot a {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
.snapshot a .icon {
  width: 14px;
}
.stale-note {
  color: var(--amber);
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.toolbar .muted {
  align-self: center;
  margin-left: 3px;
  font-size: 12px;
}
.control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.control > span {
  font-size: 12px;
  font-weight: 600;
}
.control input,
.control select {
  border: 1px solid #d9e1d7;
  background: #fff;
  border-radius: 7px;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--ink);
  font-size: 14px;
  max-width: 100%;
  min-width: 0;
}
.control select {
  padding-right: 32px;
}
.summary-grid {
  display: grid;
  grid-template-columns: 2.35fr repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.latest-card {
  background: var(--green);
  color: white;
  border-radius: var(--radius);
  padding: 23px 24px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.latest-card:after {
  content: "";
  width: 160px;
  height: 160px;
  border: 22px solid #ffffff05;
  border-radius: 50%;
  position: absolute;
  right: -50px;
  top: -65px;
  z-index: -1;
}
.card-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #deebe0;
}
.status-dot.light {
  background: #b4e3c0;
}
.latest-card h2 {
  font-variant-numeric: tabular-nums;
  font-size: 27px;
  font-weight: 700;
  margin: 12px 0 18px;
  letter-spacing: 0.7px;
}
.latest-card h2 > span {
  font-size: 13px;
  font-weight: 450;
  letter-spacing: 0;
}
.balls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.ball {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  background: #f0f3ed;
  border: 1px solid #e3e9df;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.balls-big .ball {
  width: 44px;
  height: 44px;
  font-size: 19px;
}
.latest-card .ball {
  background: white;
  color: var(--deep);
  border: none;
  box-shadow: 0 3px 6px #0d473827;
}
.latest-meta {
  display: flex;
  gap: 22px;
  border-top: 1px solid #ffffff25;
  padding-top: 17px;
  margin-top: 22px;
  font-size: 11px;
  color: #d5e6dc;
}
.latest-meta strong {
  color: white;
  font-size: 13px;
  margin-left: 7px;
  font-variant-numeric: tabular-nums;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px 20px;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.metric-icon {
  color: #718276;
  margin-bottom: 15px;
}
.metric p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.metric-value {
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -1px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.metric-value small {
  font-size: 11px;
  letter-spacing: 0;
  margin-left: 5px;
  font-weight: 400;
  color: var(--muted);
}
.metric > span:last-child {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 12px;
}
.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.panel {
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  margin-bottom: 24px;
}
.two-columns > .panel,
.analysis-summary > .panel,
.data-layout > .panel {
  margin-bottom: 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.panel-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.panel-heading > span {
  font-size: 11px;
}
.legend {
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 2px;
  margin-right: 5px;
}
.frequency-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding-top: 20px;
  background: repeating-linear-gradient(
    to top,
    transparent 0px,
    transparent 51px,
    #edf0e8 52px,
    #edf0e8 53px
  );
  background-clip: content-box;
  min-height: 230px;
  margin-top: 28px;
}
.chart-group {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
}
.bar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  padding-top: 4px;
  min-width: 0;
}
.bar-column:hover {
  background: #eaf2e9;
  text-decoration: none;
}
.bar-count {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  height: 185px;
  width: 100%;
  display: flex;
  align-items: end;
  max-width: 17px;
}
.bar {
  display: block;
  width: 100%;
  background: var(--green);
  border-radius: 3px 3px 0 0;
  min-height: 0;
}
.bar-column:hover .bar {
  background: #b78943;
}
.bar-label {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  padding-top: 9px;
  background: #fff;
  width: 100%;
  text-align: center;
}
.panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-top: 18px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.panel-foot a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  min-height: 35px;
}
.panel-foot .icon {
  width: 14px;
}
.rank-heading {
  color: var(--green);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 10px;
}
.rank-heading small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.rank-heading.cold {
  color: #6a7870;
  margin-top: 23px;
}
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rank-list a {
  display: grid;
  grid-template-columns: 26px 42px 1fr 43px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ink);
  min-height: 30px;
}
.rank-list .ball {
  height: 26px;
  width: 26px;
  font-size: 11px;
}
.ball.hot {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.rank-list strong {
  font-weight: 650;
  font-size: 13px;
}
.rank-list small {
  font-size: 10px;
  font-weight: 400;
}
.rank-track {
  height: 4px;
  background: #f1f4ef;
  border-radius: 3px;
  overflow: hidden;
}
.rank-track i {
  height: 100%;
  display: block;
  background: var(--green);
}
.cold + .rank-list .rank-track i {
  background: #a8bcb0;
}
.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 18px;
}
.draw-head,
.draw-row {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(210px, 1.7fr) 0.6fr 0.5fr;
  align-items: center;
  gap: 15px;
}
.draw-head {
  font-size: 11px;
  color: var(--muted);
  background: #f8f9f6;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.draw-row {
  padding: 17px 12px;
  border-bottom: 1px solid #edf0e8;
  font-size: 13px;
}
.draw-row:last-child {
  border-bottom: 0;
}
.draw-date {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
  gap: 2px;
}
.draw-date strong {
  font-size: 13px;
  font-weight: 550;
}
.draw-date span {
  font-size: 11px;
  color: var(--muted);
}
.draw-detail {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.mobile-label {
  display: none;
}
.muted {
  color: var(--muted);
}
footer {
  margin-top: 42px;
  padding: 20px 0 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  color: var(--muted);
}
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}
.filters .control {
  flex: 1;
  min-width: 145px;
}
.filters .button {
  flex-shrink: 0;
}
.count-badge {
  font-size: 11px;
  color: var(--green);
  background: var(--pale);
  padding: 4px 9px;
  border-radius: 6px;
  margin-left: 8px;
  white-space: nowrap;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  font-size: 13px;
}
.empty {
  padding: 70px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed #c6d5c8;
  border-radius: var(--radius);
}
.empty > .icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  color: var(--green);
}
.empty p {
  color: var(--muted);
  margin: 12px auto 22px;
  max-width: 480px;
  font-size: 14px;
}
.analysis-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.ratio-numbers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.ratio-numbers strong {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-left: 9px;
}
.ratio-track {
  margin: 18px 0 12px;
  background: #d9e6d9;
  border-radius: 9px;
  height: 10px;
  overflow: hidden;
}
.ratio-track i {
  height: 100%;
  display: block;
  background: var(--green);
}
.analysis-summary p.muted {
  font-size: 11px;
}
.number-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}
.number-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 18px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}
.number-card:hover {
  border-color: var(--green);
  text-decoration: none;
  background: #f2f7f0;
}
.number-card strong {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}
.number-card strong small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.number-card > span:not(.ball) {
  font-size: 10px;
  color: var(--muted);
}
.section-block {
  margin-bottom: 28px;
}
.tails {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 12px;
}
.tails > div {
  display: flex;
  flex-direction: column;
  text-align: center;
  background: var(--bg);
  border-radius: 9px;
  padding: 12px 4px;
}
.tails span {
  font-size: 12px;
}
.tails strong {
  font-size: 22px;
  font-weight: 600;
}
.tails small {
  font-size: 10px;
  color: var(--muted);
}
.picker {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 10px;
}
.number-pick {
  min-width: 0;
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.number-pick:hover {
  border-color: var(--green);
}
.number-pick[aria-pressed="true"] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.tracker-controls {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.tracker-controls .control:first-child {
  flex: 1;
}
.hint {
  padding: 34px;
  color: var(--muted);
  border: 1px dashed #ced8cb;
  border-radius: 12px;
  text-align: center;
}
.tracking-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}
.hit-label {
  padding: 4px 9px;
  background: #f2f3ef;
  color: var(--muted);
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
}
.hit-label.has-hit {
  background: var(--pale);
  color: var(--green);
}
.ball.match {
  background: var(--green);
  color: white;
  border-color: var(--green);
  box-shadow: 0 0 0 2px #d6e6d7;
}
.notice {
  background: #f7f1e5;
  color: #7c5a27;
  border: 1px solid #e9ddc7;
  padding: 14px 18px;
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 24px;
}
.notice.success {
  color: var(--green);
  background: #edf6ed;
  border-color: #cadfc9;
}
.notice.error {
  background: #fff0ed;
  color: #9b302b;
  border-color: #f4ceca;
}
.lab-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.lab-metrics .metric {
  min-height: 148px;
}
.hit-distribution {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.hit-distribution > div {
  display: grid;
  grid-template-columns: 80px 1fr 45px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.distribution-track {
  height: 12px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.distribution-track i {
  height: 100%;
  display: block;
  background: var(--green);
}
.backtest-list article {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.backtest-list small {
  font-size: 10px;
  color: var(--muted);
}
.row-label {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 7px;
}
.data-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 24px;
}
.upload-area {
  background: #f8faf6;
  border: 1px dashed #aec5ac;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
}
.upload-area > span:not(.upload-symbol) {
  font-size: 11px;
  color: var(--muted);
}
.upload-area input {
  max-width: 100%;
  font-size: 12px;
  margin-top: 15px;
}
.upload-area input::file-selector-button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  border-radius: 7px;
  padding: 8px 12px;
  margin-right: 10px;
  cursor: pointer;
}
.upload-symbol {
  width: 48px;
  height: 48px;
  background: #eaf3e8;
  color: var(--green);
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 8px;
}
.upload-symbol .icon {
  width: 25px;
  height: 25px;
}
.upload-form > .button {
  margin-top: 18px;
  margin-right: 6px;
}
.format-help {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  font-size: 12px;
  color: var(--muted);
}
.format-help summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  min-height: 36px;
}
.format-help p {
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.data-summary {
  margin: 0 0 30px;
}
.data-summary > div {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
}
.data-summary dt {
  color: var(--muted);
  flex-shrink: 0;
}
.data-summary dd {
  margin: 0;
  text-align: right;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.icon-button {
  background: transparent;
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.icon-button:hover {
  background: var(--pale);
}
.open-menu,
.close-menu {
  display: none;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: #102d2580;
  z-index: 35;
}
.backdrop[hidden] {
  display: none;
}
.menu-open {
  overflow: hidden;
}
@media (min-width: 1500px) {
  .bar-count,
  .bar-label {
    font-size: 10px;
  }
  .bar-track {
    height: 220px;
  }
}
@media (max-width: 1250px) {
  main {
    padding: 24px 24px 0;
  }
  .topbar {
    padding: 0 24px;
  }
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .latest-card {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
  .latest-card h2 {
    grid-column: 1;
    margin-bottom: 0;
  }
  .latest-card .balls {
    grid-column: 2;
    grid-row: 1/3;
    align-self: center;
    justify-content: flex-end;
  }
  .latest-meta {
    grid-column: 1/-1;
    margin-top: 20px;
  }
  .metric-icon {
    display: none;
  }
  .metric {
    padding: 20px;
  }
  .two-columns {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .number-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .backtest-list article {
    grid-template-columns: 1fr 1.2fr 1.2fr;
  }
  .backtest-list .hit-label {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .backtest-list .balls {
    gap: 4px;
  }
  .backtest-list .ball {
    width: 28px;
    height: 28px;
  }
  .frequency-chart {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 0;
    background: none;
    padding: 0;
  }
  .chart-group {
    gap: 8px;
  }
  .bar-track {
    height: 90px;
    max-width: 24px;
  }
  .bar-count,
  .bar-label {
    font-size: 10px;
  }
  .rank-list {
    gap: 13px;
  }
  .page-heading .button {
    font-size: 12px;
  }
  .lab-metrics {
    gap: 12px;
  }
  .lab-metrics .metric-value {
    font-size: 28px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    width: 270px;
    transition: transform 0.2s;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar .brand {
    margin-top: 25px;
  }
  .sidebar .close-menu {
    display: grid;
    position: absolute;
    right: 10px;
    top: 7px;
  }
  .sidebar nav a {
    font-size: 16px;
    min-height: 49px;
  }
  .workspace {
    margin-left: 0;
  }
  .open-menu {
    display: grid;
  }
  .topbar {
    height: 65px;
    padding: 0 18px;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .topbar .badge {
    font-size: 11px;
  }
  .sidebar-bottom {
    margin-top: auto;
  }
  .page-heading {
    gap: 20px;
  }
  .skip-link {
    left: 15px;
  }
  .data-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  }
  .backtest-list .ball {
    width: 31px;
    height: 31px;
  }
  .backtest-list .balls {
    gap: 6px;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  main {
    padding: 22px 16px 0;
  }
  .topbar {
    padding: 0 10px;
  }
  .breadcrumb {
    font-size: 12px;
    gap: 8px;
  }
  .breadcrumb > span:first-child,
  .breadcrumb > span:nth-child(2) {
    display: none;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 19px;
  }
  h1 {
    font-size: 25px;
    letter-spacing: -0.5px;
  }
  .eyebrow {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .subtitle {
    font-size: 14px;
    line-height: 1.85;
  }
  .page-heading > .button {
    min-height: 44px;
    font-size: 13px;
  }
  .snapshot {
    padding: 12px;
    align-items: start;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 21px;
  }
  .snapshot > .icon {
    margin-top: 3px;
  }
  .snapshot > span {
    flex: 1;
  }
  .snapshot a {
    display: none;
  }
  .stale-note {
    display: block;
  }
  .toolbar {
    gap: 10px;
  }
  .toolbar .control {
    flex: 1;
  }
  .toolbar .control select {
    width: 100%;
    font-size: 16px;
  }
  .toolbar > .muted {
    width: 100%;
    font-size: 11px;
    margin: 0;
  }
  .control > span {
    font-size: 12px;
  }
  .control input,
  .control select {
    font-size: 16px;
  }
  .summary-grid {
    gap: 9px;
    margin-bottom: 20px;
  }
  .latest-card {
    display: block;
    padding: 22px 20px;
  }
  .card-caption {
    font-size: 12px;
  }
  .latest-card h2 {
    font-size: 29px;
    margin: 10px 0 20px;
  }
  .latest-card .balls {
    justify-content: start;
    gap: 12px;
  }
  .latest-card .balls .ball {
    width: 43px;
    height: 43px;
    font-size: 19px;
  }
  .latest-meta {
    gap: 20px;
    padding-top: 16px;
    margin-top: 22px;
    font-size: 12px;
  }
  .latest-meta strong {
    font-size: 13px;
    margin-left: 4px;
  }
  .metric {
    padding: 16px 12px;
    border-radius: 12px;
    justify-content: start;
  }
  .metric p {
    font-size: 11px;
    margin-bottom: 7px;
  }
  .metric-value {
    font-size: 25px;
    letter-spacing: -0.6px;
  }
  .metric-value small {
    font-size: 10px;
    margin-left: 3px;
  }
  .metric > span:last-child {
    font-size: 10px;
    margin-top: 8px;
    line-height: 1.7;
  }
  .two-columns,
  .analysis-summary,
  .data-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  .panel {
    padding: 20px 16px;
    margin-bottom: 20px;
    border-radius: 14px;
  }
  .two-columns > .panel {
    margin-bottom: 0;
  }
  .panel-heading {
    gap: 12px;
    margin-bottom: 20px;
    align-items: start;
  }
  h2 {
    font-size: 17px;
  }
  .panel-heading p {
    font-size: 12px;
    line-height: 1.8;
  }
  .legend {
    font-size: 10px;
  }
  .chart-group {
    gap: 6px;
  }
  .bar-track {
    height: 105px;
    width: 85%;
    max-width: 22px;
  }
  .bar-count,
  .bar-label {
    font-size: 10px;
  }
  .frequency-chart {
    gap: 20px;
  }
  .panel-foot {
    font-size: 11px;
    align-items: start;
    gap: 8px;
    flex-direction: column;
    margin-top: 18px;
  }
  .panel-foot a {
    min-height: 44px;
    font-size: 13px;
  }
  .hot-cold .rank-list {
    gap: 10px;
  }
  .rank-list a {
    min-height: 38px;
    grid-template-columns: 32px 48px 1fr 45px;
    font-size: 12px;
  }
  .rank-list .ball {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .rank-list strong {
    font-size: 14px;
  }
  .rank-heading {
    font-size: 13px;
  }
  .note {
    font-size: 12px;
  }
  .draw-head {
    display: none;
  }
  .draw-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px 0;
  }
  .draw-date strong {
    font-size: 14px;
  }
  .draw-date span {
    font-size: 12px;
  }
  .draw-row .balls {
    grid-column: 1/-1;
    grid-row: 2;
    gap: 10px;
  }
  .draw-row .ball {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .draw-row .draw-detail {
    font-size: 12px;
  }
  .draw-row .draw-detail:nth-last-child(2) {
    grid-column: 1;
    grid-row: 3;
  }
  .draw-row .draw-detail:last-child {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
  }
  .mobile-label {
    display: inline;
    color: var(--muted);
    font-weight: 400;
  }
  .recent .panel-heading {
    flex-wrap: wrap;
  }
  .recent .text-link {
    margin-top: -8px;
    font-size: 13px;
  }
  .filters {
    gap: 13px;
  }
  .filters .control {
    min-width: calc(50% - 14px);
  }
  .filters .button {
    flex: 1;
    font-size: 13px;
  }
  .pagination {
    gap: 12px;
    font-size: 12px;
  }
  .pagination .button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .number-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .number-card {
    padding: 15px 5px;
  }
  .number-card > span:not(.ball) {
    font-size: 11px;
  }
  .number-card .ball {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
  .tails {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  .ratio-numbers strong {
    font-size: 26px;
  }
  .analysis-summary .panel-heading {
    flex-wrap: wrap;
  }
  .picker {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }
  .number-pick {
    min-height: 44px;
    font-size: 16px;
  }
  .tracker-controls {
    gap: 12px;
  }
  .tracker-controls > .control:first-child {
    flex-basis: 100%;
    width: 100%;
  }
  .tracker-controls .control:nth-child(2) {
    flex: 1;
  }
  .tracker-controls .button {
    font-size: 14px;
  }
  .tracking-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px 0;
  }
  .tracking-row > .balls {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .tracking-row .ball {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .tracking-row .hit-label {
    grid-row: 1;
    grid-column: 2;
  }
  .tracking-row .balls {
    gap: 10px;
  }
  .panel-heading > .balls {
    gap: 4px;
  }
  .panel-heading > .balls .ball {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }
  .lab-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .lab-metrics .metric {
    min-height: 0;
    padding: 18px 20px;
  }
  .lab-metrics .metric-value {
    font-size: 30px;
  }
  .lab-metrics .metric > span:last-child {
    font-size: 12px;
  }
  .backtest-list article {
    grid-template-columns: 1fr auto;
    gap: 15px;
    padding: 23px 0;
  }
  .backtest-list article > div:nth-child(2) {
    grid-column: 1/-1;
  }
  .backtest-list article > div:nth-child(3) {
    grid-column: 1/-1;
  }
  .backtest-list .hit-label {
    grid-column: 2;
    grid-row: 1;
  }
  .backtest-list .balls {
    gap: 10px;
  }
  .backtest-list .ball {
    width: 35px;
    height: 35px;
    font-size: 13px;
  }
  .backtest-list small {
    font-size: 11px;
  }
  .row-label {
    font-size: 12px;
  }
  .panel:has(.backtest-list) > .panel-heading {
    flex-direction: column;
  }
  .notice {
    padding: 14px;
    font-size: 13px;
  }
  .data-layout {
    margin-bottom: 0;
  }
  .upload-area {
    padding: 25px 12px;
  }
  .upload-area input {
    font-size: 12px;
    width: 100%;
  }
  .upload-form > .button {
    width: 100%;
    margin: 14px 0 0;
    font-size: 14px;
  }
  .data-summary > div {
    font-size: 13px;
  }
  .format-help {
    font-size: 13px;
  }
  .format-help summary {
    font-size: 14px;
    min-height: 44px;
  }
  footer {
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    margin-top: 30px;
  }
  .empty {
    padding: 45px 18px;
  }
  .hint {
    padding: 28px 18px;
    font-size: 14px;
  }
  .topbar .badge {
    padding: 4px 8px;
  }
  .count-badge {
    font-size: 10px;
  }
  .panel-heading:has(> .balls) {
    flex-direction: column;
  }
  .panel-heading > .balls .ball {
    width: 32px;
    height: 32px;
  }
  .panel-heading > .balls {
    gap: 8px;
  }
}
@media (max-width: 360px) {
  main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .latest-card {
    padding: 20px 16px;
  }
  .latest-card .balls {
    gap: 10px;
  }
  .latest-card .balls .ball {
    width: 40px;
    height: 40px;
  }
  .metric {
    padding: 13px 8px;
  }
  .metric-value {
    font-size: 22px;
  }
  .metric-value small {
    font-size: 9px;
  }
  .latest-meta {
    gap: 16px;
  }
  .panel {
    padding: 18px 13px;
  }
  .picker {
    gap: 6px;
    grid-template-columns: repeat(5, 1fr);
  }
  .chart-group {
    gap: 4px;
  }
  .bar-count,
  .bar-label {
    font-size: 9px;
  }
  .filters .control {
    min-width: 100%;
  }
  .tails {
    gap: 5px;
  }
  .card-caption {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .toolbar,
  .filters,
  .button,
  footer {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  main {
    padding: 0;
  }
  .panel,
  .metric {
    break-inside: avoid;
  }
  .snapshot {
    background: #fff;
  }
  .two-columns {
    display: block;
  }
  .latest-card {
    color: #000;
    background: #fff;
    border: 1px solid #999;
  }
  .latest-meta,
  .latest-meta strong,
  .card-caption {
    color: #000;
  }
}

/* Pattern research workspace */
.pattern-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.pattern-form-grid [hidden] {
  display: none;
}
.pattern-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.rule-explanation > p {
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.9;
}
.formula {
  padding: 13px 16px;
  background: var(--pale);
  border-radius: 8px;
  margin-bottom: 22px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.pattern-summary {
  margin: 0;
}
.pattern-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.pattern-summary dt {
  color: var(--muted);
}
.pattern-summary dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.pattern-ranking {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}
.pattern-ranking > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 14px 5px;
  background: var(--bg);
  border-radius: 9px;
  gap: 5px;
}
.pattern-ranking strong {
  font-size: 13px;
}
.pattern-ranking small {
  font-size: 11px;
  color: var(--muted);
}
.pattern-cases article {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.case-arrow {
  color: var(--green);
}
.pattern-backtests > article {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.pattern-backtests > article > .panel-heading {
  margin-bottom: 8px;
}
.pattern-backtests > article > .note {
  margin-top: 0;
}
.pattern-compare {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 25px;
  margin-top: 12px;
}
.pattern-compare .balls,
.rule-explanation + .two-columns .balls {
  flex-wrap: wrap;
}
.pattern-compare .note {
  margin-top: 0;
}
.rule-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.rule-library .panel {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.rule-library p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin: 12px 0;
}
.rule-library a {
  margin-top: auto;
}
#online-update-status {
  display: inline-block;
  margin-left: 12px;
}
@media (max-width: 1000px) {
  .rule-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pattern-ranking {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .pattern-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .pattern-form-grid > .control:first-child {
    grid-column: 1/-1;
  }
  .pattern-actions > .button {
    flex: 1;
  }
  .pattern-form-grid input,
  .pattern-form-grid select {
    width: 100%;
  }
  .pattern-ranking {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pattern-cases article {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
  .pattern-cases .balls {
    gap: 7px;
  }
  .pattern-compare,
  .rule-library {
    grid-template-columns: 1fr;
  }
  .pattern-compare .ball {
    width: 32px;
    height: 32px;
  }
  .pattern-compare .balls {
    gap: 8px;
  }
  .pattern-backtests > article > .panel-heading {
    align-items: start;
  }
  .panel:has(.pattern-backtests) > .panel-heading {
    flex-direction: column;
  }
  .pattern-summary > div {
    font-size: 12px;
  }
  .formula {
    padding: 12px;
    font-size: 13px;
  }
  .rule-library h3 {
    font-size: 17px;
  }
  #online-update-status {
    margin-left: 0;
    display: block;
  }
  .pattern-actions .text-link {
    width: 100%;
  }
}
@media (max-width: 360px) {
  .pattern-form-grid {
    grid-template-columns: 1fr;
  }
  .pattern-ranking {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 原始星期統計與點差紙本報表 */
.report-tabs,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.report-intro p {
  line-height: 1.9;
  color: var(--muted, #66736c);
}
.report-actions {
  margin-top: 20px;
  justify-content: space-between;
}
.report-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.report-week {
  min-width: 1100px;
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.report-week th,
.report-week td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #dce4de;
}
.report-week th:first-child {
  position: sticky;
  left: 0;
  background: #f0f5f1;
}
.report-week thead th {
  font-size: 12px;
  background: #f0f5f1;
}
.report-subtotal {
  background: #f2f6f3;
}
.report-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 16px;
}
.report-group {
  border: 1px solid #dde6df;
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.report-group.selected {
  border-color: #176b55;
  background: #f3f8f5;
}
.report-group h3 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.report-group h3 span {
  font-size: 12px;
  font-weight: 400;
}
.report-group .balls {
  flex-wrap: wrap;
}
.report-group dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  font-size: 13px;
}
.report-group dd {
  margin: 0;
  text-align: right;
}
.report-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  align-items: start;
}
.point-grid {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.point-grid th,
.point-grid td {
  border: 1px solid #bdc9c0;
  padding: 7px 2px;
  text-align: center;
  white-space: nowrap;
}
.point-grid th {
  background: #f0f5f1;
}
.point-grid .report-hit {
  background: #c0dbc9;
  color: #102e20;
  font-weight: 700;
}
.report-archive {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #e2e9e4;
  padding: 20px 0;
  flex-wrap: wrap;
}
.report-archive h3 {
  margin: 0 0 8px;
}
.report-archive p {
  margin: 0 0 8px;
}
.sidebar {
  overflow-y: auto;
}
@media (max-width: 1200px) {
  .report-columns {
    grid-template-columns: 1fr;
  }
  .point-grid {
    font-size: 14px;
  }
  .point-grid td {
    padding: 9px 4px;
  }
}
@media (max-width: 640px) {
  .report-tabs {
    display: grid;
  }
  .report-actions,
  .report-actions form,
  .report-actions button {
    width: 100%;
  }
  .report-group {
    padding: 14px;
  }
  .report-group dl div {
    font-size: 12px;
  }
  .report-archive .report-actions {
    justify-content: flex-start;
  }
}
.report-analysis summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  padding: 8px 0;
  line-height: 1.6;
}
.report-settings .filters {
  padding: 0;
  margin: 0;
  border: 0;
}
.report-group-input {
  display: block;
  margin-top: 20px;
}
.report-group-input textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #c8d4cb;
  border-radius: 8px;
  line-height: 1.8;
  font: inherit;
  font-variant-numeric: tabular-nums;
  resize: vertical;
  min-height: 90px;
}
.report-capacity-warning {
  font-weight: 600;
  line-height: 1.8;
}
[data-report-mode][hidden] {
  display: none !important;
}

.group-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.group-card {
  border: 1px solid #dce4df;
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}
.group-card.excluded {
  background: #f5f6f4;
}
.group-include {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}
.group-include input {
  width: 20px;
  height: 20px;
  accent-color: #176b55;
}
.group-state {
  margin-left: auto;
  font-size: 12px;
  color: #52645c;
}
.group-number-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.group-chip {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7f2eb;
  color: #176b55;
  font-weight: 700;
}
.group-card summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
  color: #176b55;
}
.number-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 6px;
}
.number-picker label {
  position: relative;
  cursor: pointer;
}
.number-picker input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.number-picker span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid #cad7cf;
  border-radius: 8px;
  font-weight: 700;
}
.number-picker input:checked + span {
  background: #176b55;
  color: white;
  border-color: #176b55;
}
.number-picker input:focus-visible + span {
  outline: 3px solid #bc871b;
  outline-offset: 2px;
}
.group-editor [hidden] {
  display: none;
}
@media (max-width: 700px) {
  .group-cards {
    grid-template-columns: 1fr;
  }
}

.update-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.update-option {
  border: 1px solid #dce4df;
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}
.update-option h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.update-option p {
  line-height: 1.7;
}
@media (max-width: 700px) {
  .update-options {
    grid-template-columns: 1fr;
  }
}
.archive-select {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}
.archive-select input {
  width: 20px;
  height: 20px;
  accent-color: #176b55;
}
.archive-toolbar {
  padding: 12px 0;
}
.danger-text {
  color: #a02b2b;
}
.danger-button {
  background: #a02b2b;
}
.deletion-list {
  padding-left: 24px;
}
.deletion-list li {
  padding: 12px 0;
  overflow-wrap: anywhere;
}

.invite-row { padding: 1rem 0; border-bottom: 1px solid var(--border, #e2e8f0); }
.invite-row:last-child { border-bottom: 0; }
.invite-heading, .invite-copy { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.invite-copy .control { flex: 1 1 260px; min-width: 0; }
.invite-copy [role="status"] { flex-basis: 100%; }
.invite-user-id { overflow-wrap: anywhere; word-break: break-all; }
.invite-row form { display: inline-block; margin: .25rem .5rem .25rem 0; }

.group-entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 24px; }
.group-entry { display: block; color: inherit; text-decoration: none; }
.group-entry:hover, .group-entry:focus-visible { border-color: #176b62; }
.group-entry h2 { margin-top: 0; }
.group-entry span { display: inline-flex; gap: 8px; align-items: center; color: #176b62; font-weight: 600; }
.group-entry svg { width: 18px; height: 18px; }
.group-period { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 700px) { .group-entry-grid { grid-template-columns: 1fr; } }
