/* Site quick links, kept below dialogs and the active selection tray. */
.tt-quick-actions {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
body.has-pick-basket-open .tt-quick-actions {
  bottom: calc(162px + env(safe-area-inset-bottom, 0px));
}
.tt-quick-actions > :is(button, a) {
  box-sizing: border-box;
  min-inline-size: 112px;
  min-block-size: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  font-family: inherit;
  font-weight: 800 !important;
  font-size: 13px !important;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.tt-quick-actions > .btn-header-toolbox {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  color: #fff !important;
  border: 1px solid #6ee7b7 !important;
  box-shadow: 0 4px 12px rgb(16 185 129 / 32%) !important;
}
.tt-quick-actions > .btn-top-sponsor {
  background: #c52236 !important;
  color: #ffffff !important;
  border: 1px solid #a9182c !important;
  box-shadow: 0 3px 9px rgb(169 24 44 / 22%) !important;
}
/* The same quick navigation is emitted on every public HTML page. */
.tt-quick-actions > .tt-quick-about {
  background: #1e3a5f;
  border: 1px solid #294f7e;
  color: #fff;
  box-shadow: 0 3px 9px rgb(30 58 95 / 22%);
}
.tt-quick-actions > .tt-quick-about[aria-current="page"] {
  box-shadow: inset 0 0 0 2px #b3c9e6;
}
/* Fourth shared shortcut. */
.tt-quick-actions > .tt-quick-erge {
  background: #5b4627;
  border: 1px solid #674c27;
  color: #fff;
}
@media (hover: hover) {
  .tt-quick-actions > .tt-quick-erge:hover { background: #46361e; }
}
.tt-quick-actions-spacer.tt-quick-actions-spacer-with-erge {
  min-block-size: calc(216px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 760px), (max-height: 450px) {
  .tt-quick-actions-spacer.tt-quick-actions-spacer-with-erge {
    min-block-size: calc(116px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 419px) {
  .tt-quick-actions.tt-quick-actions-with-erge {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tt-quick-actions.tt-quick-actions-with-erge > :is(button, a) { width: 100%; }
}

.tt-quick-actions-spacer {
  display: block;
  pointer-events: none;
  min-block-size: calc(160px + env(safe-area-inset-bottom, 0px));
}
@media (hover: hover) {
  .tt-quick-actions > .tt-quick-about:hover { background: #294f7e; }
  .tt-quick-actions > .btn-header-toolbox:hover { background: linear-gradient(135deg, #0fa574 0%, #04644a 100%) !important; }
  .tt-quick-actions > .btn-top-sponsor:hover { background: #a9182c !important; }
}
.tt-quick-actions > :is(button, a):focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .tt-quick-actions {
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }
}
@media (max-width: 760px), (max-height: 450px) {
  .tt-quick-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-inline-size: calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    pointer-events: none;
  }
  .tt-quick-actions > :is(button, a) {
    min-inline-size: 44px;
    padding-inline: 9px !important;
    pointer-events: auto;
  }
  .tt-quick-actions-spacer {
    min-block-size: calc(70px + env(safe-area-inset-bottom, 0px));
  }
}

/* Shared toolbox: iOS-inspired grouped surfaces, scoped to the dialog. */
#toolbox-modal {
  align-items: center;
  justify-content: center;
  background: rgb(15 23 42 / 58%) !important;
  -webkit-backdrop-filter: blur(7px) !important;
  backdrop-filter: blur(7px) !important;
}
#toolbox-modal .toolbox-phase2-dialog {
  --sheet-base: #f2f2f7;
  --sheet-card: #fff;
  --sheet-ink: #1c1c1e;
  --sheet-muted: #51515a;
  --sheet-line: #d9d9e0;
  --sheet-accent: #17624a;
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  min-width: 0;
  max-height: 88vh;
  max-height: 88dvh;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 26px;
  background: var(--sheet-base);
  box-shadow: 0 24px 80px rgb(15 23 42 / 30%);
  color: var(--sheet-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
#toolbox-modal .toolbox-phase2-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 18px;
  background: var(--sheet-base);
  border-bottom: 1px solid var(--sheet-line);
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  #toolbox-modal .toolbox-phase2-header {
    background: rgb(242 242 247 / 94%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
#toolbox-modal .toolbox-phase2-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sheet-ink);
  margin: 0;
  font-size: clamp(1.25rem, 4.8vw, 1.5rem);
  font-weight: 750;
  line-height: 1.2;
}
#toolbox-modal .toolbox-phase2-header h3::before {
  content: "";
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(#f1faf5 0 0) 9px 9px/6px 6px no-repeat,
    linear-gradient(#f1faf5 0 0) 19px 9px/6px 6px no-repeat,
    linear-gradient(#f1faf5 0 0) 9px 19px/6px 6px no-repeat,
    linear-gradient(#f1faf5 0 0) 19px 19px/6px 6px no-repeat,
    var(--sheet-accent);
}
#toolbox-modal .toolbox-phase2-close {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  min-width: 58px;
  padding: 4px 12px;
  border: 0;
  border-radius: 99px;
  font: inherit;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--sheet-accent);
  background: #e2ebe6;
  cursor: pointer;
  flex: 0 0 auto;
}
#toolbox-modal .toolbox-phase2-content { padding: 17px 18px 20px; }
#toolbox-modal .toolbox-phase2-first { margin: 0 0 17px; }
#toolbox-modal .toolbox-phase2-first h4 {
  margin: 0 0 9px 2px;
  color: var(--sheet-muted);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.35;
}
#toolbox-modal .toolbox-category-heading {
  margin: 0 0 8px 2px;
  color: var(--sheet-muted);
  font-size: .9375rem;
  line-height: 1.35;
}
#toolbox-modal .toolbox-category-copy { display: grid; gap: 3px; min-width: 0; }
#toolbox-modal .toolbox-category-title { font-weight: 750; }
#toolbox-modal .toolbox-category-hint {
  color: var(--sheet-muted);
  font-size: .8125rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
#toolbox-modal .toolbox-phase2-group {
  min-width: 0;
  margin: 0 0 7px;
  border: 0;
  border-radius: 15px;
  background: var(--sheet-card);
}
#toolbox-modal .toolbox-phase2-group[open] { background: var(--sheet-card); }
#toolbox-modal .toolbox-phase2-group summary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 15px;
  list-style: none;
  color: var(--sheet-ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
#toolbox-modal .toolbox-phase2-group summary::-webkit-details-marker { display: none; }
#toolbox-modal .toolbox-phase2-group summary::after {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  margin: -4px 2px 0 0;
  border: solid #63636d;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
#toolbox-modal .toolbox-phase2-group[open] summary {
  color: var(--sheet-accent);
}
#toolbox-modal .toolbox-phase2-group[open] summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
  border-color: var(--sheet-accent);
}
#toolbox-modal .toolbox-phase2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 0 9px 9px;
}
#toolbox-modal .toolbox-phase2-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
#toolbox-modal .toolbox-phase2-content .toolbox-item-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  gap: 3px;
  padding: 8px 10px;
  color: var(--sheet-ink);
  background: #f6f6fa;
  border: 0;
  border-radius: 11px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
#toolbox-modal .toolbox-phase2-content .toolbox-item-card .name {
  color: inherit;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.35;
}
#toolbox-modal .toolbox-phase2-content .toolbox-item-card .desc {
  color: var(--sheet-muted);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.5;
}
#toolbox-modal .toolbox-phase2-content .toolbox-phase2-quick-grid .toolbox-item-card {
  min-height: 86px;
  padding: 8px;
  align-items: center;
  text-align: center;
  color: #123f31;
  background: #eaf4ee;
  border: 1px solid #cbdfd2;
}
#toolbox-modal .toolbox-phase2-quick-grid .toolbox-item-card .name {
  font-size: 1rem;
  font-weight: 750;
}
#toolbox-modal .toolbox-shortcut-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: var(--sheet-accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (min-width: 600px) {
  #toolbox-modal .toolbox-phase2-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}
#toolbox-modal .toolbox-phase2-content .toolbox-phase2-home {
  align-items: center;
  text-align: center;
  margin-top: 12px;
  background: var(--sheet-card);
  color: var(--sheet-accent);
}
@media (hover: hover) {
  #toolbox-modal .toolbox-phase2-content .toolbox-item-card:hover,
  #toolbox-modal .toolbox-phase2-close:hover,
  #toolbox-modal .toolbox-phase2-group summary:hover {
    background: #e6efe9;
    transform: none;
  }
}
#toolbox-modal .toolbox-phase2-dialog :is(a, button, summary):active { background: #dce9e1; }
#toolbox-modal .toolbox-phase2-dialog :is(a, button, summary):focus-visible {
  outline: 2px solid var(--sheet-accent);
  outline-offset: -2px;
  transform: none;
}
#toolbox-modal .toolbox-phase2-dialog :is(a, button, summary) { scroll-margin-block: 78px 12px; }
@media (min-width: 440px) {
  #toolbox-modal .toolbox-phase2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 680px) {
  #toolbox-modal .toolbox-phase2-content { padding-inline: 22px; }
  #toolbox-modal .toolbox-phase2-header { padding-inline: 22px; }
}
@media (max-width: 599px) and (orientation: portrait) {
  #toolbox-modal {
    align-items: flex-end;
    padding: max(8px, env(safe-area-inset-top, 0px)) 0 0 !important;
  }
  #toolbox-modal .toolbox-phase2-dialog {
    max-height: 92vh;
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 8px));
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -12px 46px rgb(15 23 42 / 24%);
  }
  #toolbox-modal .toolbox-phase2-header,
  #toolbox-modal .toolbox-phase2-content {
    padding-inline-start: max(14px, env(safe-area-inset-left, 0px));
    padding-inline-end: max(14px, env(safe-area-inset-right, 0px));
  }
  #toolbox-modal .toolbox-phase2-content { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  #toolbox-modal .toolbox-phase2-dialog,
  #toolbox-modal .toolbox-phase2-content .toolbox-item-card {
    animation: none;
    transition: none;
  }
}
@media (forced-colors: active) {
  #toolbox-modal .toolbox-phase2-dialog :is(a, button, summary):focus-visible { outline-color: Highlight; }
}

/* Service card sits to the right of the toolbox title. */
#toolbox-modal .toolbox-phase2-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}
#toolbox-modal .toolbox-haosheng {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-self: start;
  padding: 5px 7px 5px 10px;
  border: 1px solid #d8e8e0;
  border-radius: 13px;
  background: #f5f9f7;
  color: #123b2d;
}
#toolbox-modal .toolbox-haosheng-copy { min-width: 0; }
#toolbox-modal .toolbox-haosheng-copy strong,
#toolbox-modal .toolbox-haosheng-copy span { display: block; }
#toolbox-modal .toolbox-haosheng-copy strong {
  font-size: .8125rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
#toolbox-modal .toolbox-haosheng-copy span {
  margin-top: 2px;
  color: #475569;
  font-size: .75rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#toolbox-modal .toolbox-haosheng > a {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #b9cec2;
  border-radius: 9px;
  background: #fff;
  color: #164e3b;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
#toolbox-modal .toolbox-haosheng > a:hover { background: #e6f4ed; }
#toolbox-modal .toolbox-phase2-dialog :is(a, button, summary) { scroll-margin-block-start: 112px; }
@media (max-width: 599px) {
  #toolbox-modal .toolbox-phase2-header { gap: 6px; }
  #toolbox-modal .toolbox-phase2-header h3 { font-size: 1.0625rem; white-space: nowrap; }
  #toolbox-modal .toolbox-phase2-close { min-width: 44px; padding-inline: 5px; font-size: .8125rem; white-space: nowrap; }
  #toolbox-modal .toolbox-haosheng { flex-direction: column; align-items: stretch; gap: 3px; padding: 5px; }
  #toolbox-modal .toolbox-haosheng > a { padding-inline: 5px; }
  #toolbox-modal .toolbox-phase2-dialog :is(a, button, summary) { scroll-margin-block-start: 150px; }
}
@media (max-width: 440px) {
  #toolbox-modal .toolbox-phase2-header h3::before { content: none; }
}

/* Main site chrome and neutral reading surfaces. Keep data views, dialogs and fixed actions independent. */
:root {
  --tt-ui-ink: #132d25;
  --tt-ui-muted: #455b54;
  --tt-ui-line: #d4e1db;
  --tt-ui-paper: #fff;
  --tt-ui-green: #10493a;
  --tt-ui-radius: 16px;
  --tt-ui-focus: #2563eb;
}

header.site-dual-header {
  box-shadow: none !important;
}
header.site-dual-header .header-top-roof {
  padding-block: 4px !important;
  border-bottom-color: var(--tt-ui-line) !important;
}
header.site-dual-header .brand-wrap {
  min-block-size: 44px;
  border-radius: 10px;
}
header.site-dual-header .brand-icon {
  border-radius: 10px !important;
  box-shadow: none !important;
}
header.site-dual-header .brand-title {
  font-size: 18px !important;
  color: var(--tt-ui-ink) !important;
}
header.site-dual-header .brand-subtitle {
  color: var(--tt-ui-muted) !important;
}
header.site-dual-header .brand-tagline-badge {
  color: var(--tt-ui-muted);
  background: #f4f8f6;
  border-color: var(--tt-ui-line);
}

header.site-dual-header .header-pine-navbar {
  background: var(--tt-ui-green) !important;
  border-top: 0 !important;
  border-bottom: 1px solid #0d4033 !important;
}
header.site-dual-header .pine-nav-strip {
  gap: 3px;
  padding-block: 2px !important;
}
header.site-dual-header .pine-nav-link {
  box-sizing: border-box;
  min-block-size: 44px;
  padding-block: 5px !important;
  border-radius: 9px;
  color: #f4f9f7 !important;
}
header.site-dual-header .pine-nav-link:not(:last-child)::after {
  display: none;
}
header.site-dual-header .pine-nav-link.is-gold {
  color: #f9e6a9 !important;
}
header.site-dual-header .pine-nav-link.is-live {
  color: #ffd6d6 !important;
}
header.site-dual-header .pine-nav-link:is(.active-nav, :active) {
  background: #e4f4ed !important;
  color: #123e31 !important;
}
@media (hover: hover) {
  header.site-dual-header .pine-nav-link:hover:not(.active-nav) {
    background: #266051 !important;
    color: #fff !important;
  }
}
header.site-dual-header .pine-nav-link:focus-visible {
  outline: 3px solid #c5f9e3 !important;
  outline-offset: -4px !important;
}
header.site-dual-header .pine-nav-link:is(.active-nav, :active):focus-visible {
  outline-color: #165a46 !important;
}
header.site-dual-header .brand-wrap:focus-visible,
.subpage-h1-bar > a[href]:focus-visible {
  outline: 3px solid var(--tt-ui-focus) !important;
  outline-offset: 2px !important;
}

.subpage-h1-bar {
  align-items: baseline;
  justify-content: flex-start;
  gap: 5px 12px;
  padding: 10px 13px;
  background: var(--tt-ui-paper);
  border: 1px solid var(--tt-ui-line);
  border-radius: var(--tt-ui-radius);
  overflow-wrap: anywhere;
  transition: none;
}
.subpage-h1-bar > h1 {
  flex-basis: 100%;
  font-size: clamp(1.0625rem, 3.6vw, 1.375rem) !important;
  color: var(--tt-ui-ink) !important;
  line-height: 1.35 !important;
}
.subpage-h1-bar > :is(p, span) {
  font-size: 0.875rem !important;
  line-height: 1.55 !important;
  color: var(--tt-ui-muted) !important;
}
.subpage-h1-bar > a[href] {
  color: #165a46;
  font-weight: 700;
  text-underline-offset: 3px;
}

main :is(section.setting-card, section.checker-card, section.filter-card,
         section.control-panel-card, section.search-filter-card, section.history-card,
         div.error-card, article.article-section) {
  border-color: var(--tt-ui-line);
  border-radius: var(--tt-ui-radius);
  box-shadow: 0 2px 8px rgb(19 45 37 / 5%);
}
main :is(button.btn-check-main, button.btn-clear-picks, button.btn-append-pillar, a.link-btn) {
  min-block-size: 44px;
}

main #sticky-nav-triple .tabs-card > button.tab-btn {
  min-block-size: 44px;
}
main #sticky-nav-triple :is(button.tab-btn, button.model-nav-btn, button.range-btn):focus-visible {
  outline: 3px solid var(--tt-ui-focus) !important;
  outline-offset: -3px !important;
  box-shadow: inset 0 0 0 1px white;
}
main .home-heroes-card-ball:focus-visible {
  outline: 3px solid var(--tt-ui-focus) !important;
  outline-offset: 2px !important;
}

body > header.site-header {
  background: var(--tt-ui-green);
}
body > header.site-header + main.inner > section {
  border-color: var(--tt-ui-line);
  border-radius: var(--tt-ui-radius);
  box-shadow: 0 2px 8px rgb(19 45 37 / 5%);
}
@media (max-width: 599px) {
  header.site-dual-header .pine-nav-strip {
    gap: 2px;
  }
  header.site-dual-header .pine-nav-link {
    padding-inline: 9px !important;
  }
  .subpage-h1-bar {
    padding-inline: 11px;
  }
  body > header.site-header + main.inner {
    padding-block-start: 26px;
  }
}
@media (forced-colors: active) {
  header.site-dual-header :is(.brand-wrap, .pine-nav-link):focus-visible,
  header.site-dual-header .pine-nav-link:is(.active-nav, :active):focus-visible,
  .subpage-h1-bar > a[href]:focus-visible,
  main #sticky-nav-triple :is(button.tab-btn, button.model-nav-btn, button.range-btn):focus-visible,
  main .home-heroes-card-ball:focus-visible {
    outline-color: Highlight !important;
  }
}
