﻿:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111316;
  --panel-2: #171a1f;
  --panel-3: #0b0d10;
  --text: #f6f7f8;
  --muted: #969ca5;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ff7a00;
  --accent-2: #ffb13b;
  --power: #ff8a00;
  --red: #ff453a;
  --blue: #4aa3ff;
  --green: #42d66b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 84px; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, p { margin: 0; }

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 122, 0, 0.16), transparent 32%),
    linear-gradient(180deg, #050505, #07080a 52%, #030303);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 122, 0, 0.72);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 122, 0, 0.08);
  font-weight: 900;
}

.brand h1 { font-size: 19px; line-height: 1.05; }

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 19, 22, 0.86);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 122, 0, 0.78);
}

.status-card strong { font-size: 13px; }

.app-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 12px 10px 84px;
}

.page-view {
  display: none;
}

.page-view.active {
  display: grid;
  gap: 12px;
}

.page-view.hidden-view {
  display: none !important;
}

.secret-main {
  padding-bottom: 26px;
}

.secret-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.secret-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.secret-tab.active {
  border-color: rgba(255, 122, 0, 0.52);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.28), rgba(255, 122, 0, 0.08));
}

.detail-tabs {
  position: sticky;
  top: 72px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 8, 18, 0.92);
  backdrop-filter: blur(16px);
}

.detail-tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.detail-tab.active {
  border-color: rgba(0, 216, 255, 0.36);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.22), rgba(255, 29, 77, 0.08)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(145, 194, 255, 0.08);
}

.detail-section {
  display: none;
}

.detail-section.active {
  display: block;
}

.secret-section {
  display: none;
}

.secret-section.active {
  display: grid;
  gap: 12px;
}

.ghost-link {
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
}

.page-head,
.panel,
.legend-card,
.data-status-card,
.summary-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 19, 22, 0.94);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.app-visual {
  position: relative;
  min-height: 198px;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 0, 0.22);
  border-radius: 8px;
  background: #080808;
}

.app-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(0.92) contrast(1.05);
}

.app-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 3, 3, 0.92), rgba(3, 3, 3, 0.38) 58%, rgba(3, 3, 3, 0.72)),
    linear-gradient(180deg, transparent, rgba(255, 122, 0, 0.12));
}

.app-visual div {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 4px;
  min-height: 198px;
  padding: 18px 16px;
}

.app-visual strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.app-visual span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.page-head h2 {
  margin-top: 3px;
  font-size: 22px;
  line-height: 1.2;
}

.detail-head {
  justify-content: flex-start;
}

.detail-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

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

.summary-metrics div {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 122, 0, 0.06);
  border-color: rgba(255, 122, 0, 0.24);
}

.summary-metrics strong,
.summary-metrics span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-metrics strong { font-size: 16px; }

.summary-metrics span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.legend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.legend-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.legend-card small {
  color: var(--muted);
}

.data-status-card {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.data-status-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.data-status-card span {
  padding: 6px 8px;
  border: 1px solid rgba(145, 194, 255, 0.14);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 800;
}

.legend-card i {
  width: 18px;
  height: 10px;
  border-radius: 999px;
}

.legend-power { background: linear-gradient(90deg, #1a0c04, #b85f12); }

.panel {
  min-width: 0;
  padding: 14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-header.compact { margin-bottom: 10px; }
.panel h3 { font-size: 18px; }

.panel-note {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.observation-summary {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(0, 216, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.12), rgba(255, 29, 77, 0.05)),
    rgba(3, 8, 18, 0.86);
}

.observation-summary strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.observation-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pill {
  flex: 0 0 auto;
  color: var(--accent-2);
  border: 1px solid rgba(255, 122, 0, 0.35);
  border-radius: 8px;
  background: rgba(255, 122, 0, 0.08);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 900;
}

.icon-button,
.ghost-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0b0c0f;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  font-size: 18px;
}

.ghost-button {
  padding: 0 13px;
}

.venue-list {
  display: grid;
  gap: 10px;
}

.venue-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}

.venue-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.venue-card strong { font-size: 17px; }
.muted { color: var(--muted); }

.race-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.race-button {
  position: relative;
  min-height: 50px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(78, 42, 20, 0.34), rgba(122, 68, 24, 0.2)),
    #0b0c0f;
  cursor: pointer;
}

.race-button.is-hot {
  border-color: rgba(255, 122, 0, 0.58);
  background:
    linear-gradient(135deg, rgba(198, 86, 0, calc(0.36 + var(--power) * 0.28)), rgba(255, 139, 17, calc(0.2 + var(--power) * 0.18))),
    #140801;
  box-shadow:
    inset 0 0 0 1px rgba(255, 178, 74, 0.08),
    0 0 14px rgba(255, 122, 0, 0.1);
}

.race-button.is-normal {
  border-color: rgba(163, 92, 31, 0.24);
  background:
    linear-gradient(135deg, rgba(96, 50, 20, 0.35), rgba(136, 76, 28, 0.2)),
    #0b0c0f;
}

.race-button.is-hard {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(37, 24, 18, 0.58), rgba(68, 36, 20, 0.22)),
    #07080a;
}

.race-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}

.race-button strong,
.race-button span {
  position: relative;
  z-index: 1;
  display: block;
}

.race-button strong {
  font-size: 15px;
  font-weight: 900;
}

.race-button span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.race-button.is-hot span {
  color: #fff0d4;
}

.race-button.is-normal span {
  color: rgba(255, 255, 255, 0.72);
}

.race-button.is-hard span {
  color: rgba(220, 204, 188, 0.68);
}

.race-button:hover {
  border-color: rgba(255, 122, 0, 0.7);
}

.entry-list,
.mini-list,
.recommendation-list,
.performance-list {
  display: grid;
  gap: 8px;
}

.entry-row,
.mini-row,
.performance-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.elo-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.elo-row-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.elo-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.elo-row-head strong,
.elo-row-head em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.elo-row-head strong {
  min-width: 0;
  font-size: 15px;
}

.elo-row-head em {
  flex: 0 0 auto;
  color: var(--text);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.metric-heatmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.metric-cell {
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid rgba(255, 122, 0, calc(0.12 + var(--level) * 0.28));
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, calc(0.05 + var(--level) * 0.34)), rgba(255, 177, 59, calc(0.025 + var(--level) * 0.16))),
    #08090b;
}

.metric-cell small,
.metric-cell strong {
  display: block;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-cell small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 900;
}

.metric-cell strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
}

.finish-heatmap {
  display: grid;
  gap: 7px;
}

.finish-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1.55fr) repeat(3, minmax(64px, 1fr));
  align-items: center;
  gap: 7px;
}

.finish-grid-head {
  padding: 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.finish-grid-head span:not(:first-child) {
  text-align: center;
}

.finish-grid-row {
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.finish-lane {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.finish-lane strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finish-cell {
  display: grid;
  min-height: 42px;
  place-items: center;
  gap: 1px;
  border: 1px solid rgba(0, 140, 255, calc(0.14 + var(--heat) * 0.38));
  border-radius: 7px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(0, 140, 255, calc(0.07 + var(--heat) * 0.28)), rgba(0, 229, 255, calc(0.04 + var(--heat) * 0.2))),
    rgba(4, 9, 18, 0.82);
  box-shadow: inset 0 0 18px rgba(0, 140, 255, calc(var(--heat) * 0.16));
}

.finish-cell strong,
.finish-cell small {
  display: block;
  line-height: 1.08;
}

.finish-cell strong {
  font-size: 13px;
  font-weight: 950;
}

.finish-cell small {
  color: rgba(223, 236, 255, 0.72);
  font-size: 9px;
  font-weight: 900;
}

.finish-cell.is-up {
  border-color: rgba(0, 216, 255, calc(0.2 + var(--heat) * 0.44));
  background:
    linear-gradient(135deg, rgba(0, 140, 255, calc(0.1 + var(--heat) * 0.32)), rgba(0, 229, 255, calc(0.05 + var(--heat) * 0.24))),
    rgba(4, 9, 18, 0.86);
}

.finish-cell.is-flat {
  border-color: rgba(145, 194, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(85, 125, 170, 0.12), rgba(0, 140, 255, 0.08)),
    rgba(4, 9, 18, 0.82);
}

.finish-cell.is-down {
  border-color: rgba(145, 160, 180, 0.14);
  background:
    linear-gradient(135deg, rgba(82, 96, 116, 0.08), rgba(18, 27, 42, 0.1)),
    rgba(4, 9, 18, 0.82);
  color: rgba(235, 242, 255, 0.82);
}

.finish-cell.is-down small {
  color: rgba(185, 197, 215, 0.62);
}

.finish-note {
  margin: 4px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.tan-paid-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-color: rgba(255, 214, 10, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 214, 10, 0.12), rgba(255, 122, 0, 0.07)),
    rgba(7, 8, 10, 0.76);
}

.tan-paid-panel h3 {
  margin: 2px 0 4px;
  font-size: 16px;
  line-height: 1.35;
}

.tan-paid-panel p {
  margin: 0;
  color: rgba(235, 242, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.tan-paid-panel > strong {
  display: inline-grid;
  min-width: 96px;
  min-height: 42px;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 214, 10, 0.34);
  border-radius: 8px;
  color: var(--accent-2);
  background: rgba(0, 0, 0, 0.26);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .tan-paid-panel {
    grid-template-columns: 1fr;
  }

  .tan-paid-panel > strong {
    justify-self: start;
  }
}

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

.tan-saas-summary {
  display: grid;
  gap: 8px;
}

.tan-saas-summary div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(255, 122, 0, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.14), rgba(255, 255, 255, 0.035));
}

.tan-saas-summary span,
.tan-combo b {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
}

.tan-saas-summary strong {
  font-size: 19px;
  line-height: 1.25;
}

.tan-saas-summary em,
.tan-combo em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.tan-saas-combos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.tan-combo-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tan-formation {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 221, 0, 0.22);
  border-radius: 8px;
  background: rgba(255, 221, 0, 0.055);
}

.tan-formation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tan-formation-head strong {
  font-size: 15px;
}

.tan-formation-head span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.tan-formation-tree span,
.tan-formation-tree em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.tan-formation-tree {
  display: grid;
  gap: 8px;
}

.tan-tree-first {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(145, 194, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.tan-tree-first-head,
.tan-tree-second-head,
.tan-tree-third {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tan-tree-first-head {
  min-height: 32px;
}

.tan-tree-first-head em,
.tan-tree-second-head em,
.tan-tree-third em {
  margin-left: auto;
  white-space: nowrap;
}

.tan-tree-second-list {
  display: grid;
  gap: 6px;
  margin-left: 17px;
  padding-left: 14px;
  border-left: 1px solid rgba(145, 194, 255, 0.22);
}

.tan-tree-second {
  display: grid;
  gap: 5px;
}

.tan-tree-second-head {
  position: relative;
  min-height: 30px;
}

.tan-tree-second-head::before,
.tan-tree-third::before {
  content: "";
  width: 14px;
  height: 1px;
  margin-left: -14px;
  background: rgba(145, 194, 255, 0.28);
}

.tan-tree-third-list {
  display: grid;
  gap: 4px;
  margin-left: 42px;
  padding-left: 14px;
  border-left: 1px solid rgba(145, 194, 255, 0.16);
}

.tan-tree-third {
  min-height: 28px;
  padding: 3px 6px 3px 0;
}

.tan-tree-second-head b,
.tan-tree-third b {
  color: var(--muted);
}

.tan-combo {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(7, 8, 10, 0.82);
}

.tan-combo strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tan-saas-board-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tan-saas-board-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 122, 0, 0.22);
  border-radius: 8px;
  background: rgba(255, 122, 0, 0.08);
}

.tan-saas-board-summary span,
.tan-race-meta,
.tan-race-top3 em {
  color: var(--muted);
  font-size: 12px;
}

.tan-saas-board-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.tan-strategy-search-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(145, 194, 255, 0.2);
  border-radius: 8px;
  background: rgba(5, 14, 27, 0.82);
}

.tan-strategy-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tan-strategy-search-head h3 {
  margin: 0;
  font-size: 16px;
}

.tan-publish-note {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 6px 0 0;
  padding: 3px 8px;
  border: 1px solid rgba(255, 122, 0, 0.3);
  border-radius: 8px;
  color: #ffd60a;
  background: rgba(255, 122, 0, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.tan-strategy-form {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr;
  gap: 8px;
}

.tan-simulator-form {
  display: grid;
  grid-template-columns: 0.85fr 1.3fr 0.85fr 0.85fr 1fr 1fr 0.9fr auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
}

.tan-strategy-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tan-simulator-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tan-strategy-form span,
.tan-simulator-form span,
.tan-strategy-search-summary span {
  color: var(--muted);
  font-size: 12px;
}

.tan-simulator-form .primary-button {
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
}

.compact-input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(145, 194, 255, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(3, 8, 18, 0.92);
}

.point-picker {
  display: grid;
  grid-template-columns: 34px minmax(62px, 1fr) 34px;
  gap: 4px;
  min-width: 0;
}

.point-select {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.point-stepper {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(145, 194, 255, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(3, 8, 18, 0.92);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.point-stepper:hover,
.point-stepper:focus-visible {
  border-color: rgba(255, 122, 0, 0.46);
  background: rgba(255, 122, 0, 0.12);
}

.tan-strategy-search-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tan-strategy-search-summary div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 122, 0, 0.2);
  border-radius: 8px;
  background: rgba(255, 122, 0, 0.07);
}

.tan-strategy-search-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.tan-strategy-search-summary.empty,
.tan-strategy-results.empty {
  padding: 12px;
  border: 1px dashed rgba(145, 194, 255, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(3, 8, 18, 0.45);
}

.tan-strategy-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.tan-strategy-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(145, 194, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
}

.tan-strategy-result:hover {
  border-color: rgba(255, 221, 0, 0.54);
  background: rgba(255, 221, 0, 0.08);
}

.tan-strategy-result span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tan-strategy-result strong,
.tan-strategy-result em,
.tan-strategy-result b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tan-strategy-result em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.tan-strategy-result b {
  flex: 0 0 auto;
  color: #fff33a;
  font-size: 15px;
}

.tan-roi-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 221, 0, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(8, 20, 34, 0.92), rgba(15, 12, 20, 0.9));
}

.tan-roi-card.empty {
  color: var(--muted);
  border-color: rgba(145, 194, 255, 0.16);
  background: rgba(3, 8, 18, 0.72);
}

.tan-roi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tan-roi-head h3 {
  margin: 0;
  font-size: 16px;
}

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

.tan-roi-metrics div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tan-roi-metrics span,
.tan-roi-legend {
  color: var(--muted);
  font-size: 12px;
}

.tan-roi-metrics strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.tan-roi-warning {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 214, 10, 0.72);
  border-radius: 8px;
  color: #fff33a;
  background: rgba(70, 38, 0, 0.72);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
}

.tan-roi-chart {
  display: block;
  width: 100%;
  min-height: 170px;
}

.tan-roi-panels {
  display: grid;
  gap: 10px;
}

.tan-roi-strategy-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(145, 194, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.tan-roi-strategy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tan-roi-strategy-head h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 14px;
}

.tan-roi-strategy-head h4 i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.tan-roi-strategy-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.tan-roi-strategy-head strong {
  flex: 0 0 auto;
  text-align: right;
  font-size: 13px;
}

.tan-roi-panel-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tan-roi-mini-chart {
  display: block;
  width: 100%;
  min-height: 140px;
}

.tan-roi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.tan-roi-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tan-roi-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.tan-roi-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.tan-main-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: -4px 0 12px;
  padding: 4px;
  border: 1px solid rgba(145, 194, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 18, 0.72);
}

.tan-main-tab {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.tan-main-tab.active {
  border-color: rgba(255, 221, 0, 0.58);
  color: var(--text);
  background: rgba(255, 122, 0, 0.16);
}

.tan-cover-tabs.is-board {
  grid-column: 1 / -1;
}

.tan-cover-tabs.is-detail {
  margin-top: -2px;
}

.tan-cover-tab {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
  cursor: pointer;
}

.tan-cover-tab.active {
  border-color: rgba(255, 221, 0, 0.72);
  color: #111;
  background: var(--accent-2);
}

.tan-saas-board-list {
  display: grid;
  gap: 10px;
}

.tan-venue-card .race-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tan-race-button span {
  font-size: 10px;
  line-height: 1.2;
}

.tan-result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tan-result-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.tan-result-summary .is-met {
  border-color: rgba(56, 189, 107, 0.42);
  background: rgba(56, 189, 107, 0.1);
}

.tan-result-summary .is-miss {
  border-color: rgba(255, 122, 0, 0.32);
  background: rgba(255, 122, 0, 0.08);
}

.tan-result-summary .is-pending {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.tan-result-summary span,
.tan-result-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.tan-result-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.tan-result-list {
  display: grid;
  gap: 9px;
}

.tan-result-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 8, 10, 0.86);
}

.tan-result-card header {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.tan-result-card header span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.tan-result-card header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tan-result-card header em {
  color: var(--text);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

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

.tan-result-targets span {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.tan-result-targets .is-hit {
  border-color: rgba(56, 189, 107, 0.52);
  color: #8df0ad;
  background: rgba(56, 189, 107, 0.1);
}

.tan-result-targets .is-miss {
  color: var(--muted);
}

.tan-result-targets b {
  color: var(--accent-2);
}

.tan-result-targets em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.tan-race-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 8, 10, 0.86);
}

.tan-race-open {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tan-race-open span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.tan-race-open strong {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tan-race-open em {
  color: var(--text);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.tan-race-meta,
.tan-race-top3,
.tan-cover-targets,
.tan-race-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tan-race-meta span,
.tan-race-top3 span,
.tan-cover-targets span,
.tan-race-picks span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.tan-cover-targets span {
  border-color: rgba(255, 122, 0, 0.18);
}

.tan-cover-targets b {
  color: var(--accent-2);
}

.tan-cover-targets strong {
  color: var(--text);
}

.tan-cover-targets em {
  color: var(--muted);
  font-style: normal;
}

.tan-cover-targets.is-detail {
  margin-top: -2px;
}

.tan-race-meta .is-shibori {
  border-color: rgba(255, 122, 0, 0.42);
  color: var(--accent-2);
  background: rgba(255, 122, 0, 0.1);
  font-weight: 900;
}

.tan-race-picks b {
  color: var(--accent-2);
}

.pattern-ideas {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.pattern-ideas div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(7, 8, 10, 0.82);
}

.pattern-ideas span,
.pattern-ideas strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pattern-ideas span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.pattern-ideas strong {
  color: var(--text);
  font-size: 13px;
}

.pattern-section-title {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.entry-main,
.mini-row > div {
  min-width: 0;
}

.entry-main strong,
.entry-main span,
.mini-row strong,
.mini-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-main span,
.mini-row span {
  color: var(--muted);
  font-size: 12px;
}

.lane {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--panel-2);
  font-weight: 900;
}

.lane-stack {
  width: 34px;
  display: grid;
  justify-items: center;
  gap: 3px;
}

.rank-num {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.lane-1 {
  color: #111;
  background: #f7f7f7;
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.lane-2 {
  color: #f4f4f4;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px dashed rgba(210, 214, 220, 0.9);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.72);
}
.lane-3 {
  color: #fff;
  background: #d6001c;
}
.lane-4 {
  color: #fff;
  background: #1765d8;
}
.lane-5 {
  color: #111;
  background: #ffd400;
}
.lane-6 {
  color: #fff;
  background: #159947;
}

.elo-chart {
  width: 100%;
  min-height: 210px;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    #07080a;
  background-size: 100% 25%, 16.666% 100%;
}

.elo-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid,
.chart-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

.elo-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: #050505;
  margin-top: 7px;
}

.elo-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.performance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-3);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.performance-row.active {
  border-color: rgba(255, 122, 0, 0.62);
  background: rgba(255, 122, 0, 0.09);
}

.recommendation-group {
  display: grid;
  gap: 8px;
}

.recommendation-group h3 {
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 15px;
}

.recommendation-card {
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.recommendation-card strong,
.recommendation-card small,
.performance-row strong,
.performance-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-card small,
.performance-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.recommendation-card .combo-line {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.recommendation-card em,
.performance-row em {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 900;
}

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

.bet-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.bet-tab {
  min-width: 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.bet-tab small {
  display: block;
  margin-top: 2px;
  color: currentColor;
  font-size: 10px;
  opacity: 0.72;
}

.bet-tab.active {
  border-color: rgba(255, 122, 0, 0.52);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.28), rgba(255, 122, 0, 0.08));
  box-shadow: inset 0 -1px 0 rgba(255, 122, 0, 0.2);
}

.compact-select {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 122, 0, 0.32);
  border-radius: 8px;
  color: var(--text);
  background: #0b0c0f;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.community-note {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.comment-form,
.comment-list {
  display: grid;
  gap: 8px;
}

.comment-form {
  margin-bottom: 10px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-3);
  font: inherit;
}

.comment-form input {
  min-height: 42px;
  padding: 0 10px;
}

.comment-form textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px;
  line-height: 1.6;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comment-form-actions span {
  color: var(--muted);
  font-size: 12px;
}

.comment-form-actions button,
.comment-card footer button {
  min-height: 36px;
  border: 1px solid rgba(255, 122, 0, 0.34);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 122, 0, 0.08);
  font-weight: 900;
  cursor: pointer;
}

.comment-form-actions button {
  padding: 0 14px;
}

.comment-list.empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
}

.comment-card {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.comment-card header,
.comment-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comment-card header strong {
  color: var(--text);
  font-size: 13px;
}

.comment-card header span {
  color: var(--muted);
  font-size: 11px;
}

.comment-card p {
  color: rgba(246, 247, 248, 0.92);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-card footer {
  justify-content: flex-start;
}

.comment-card footer button {
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.comment-card footer button:first-child {
  color: var(--accent-2);
}

.performance-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 122, 0, 0.24);
  border-radius: 8px;
  background: rgba(255, 122, 0, 0.06);
}

.performance-grid strong,
.performance-grid span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-grid strong { font-size: 18px; }

.performance-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.profit-chart {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.profit-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.profit-chart-head strong,
.profit-chart-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-chart-head strong {
  color: var(--text);
  font-size: 13px;
}

.profit-chart-head span {
  color: var(--muted);
  font-size: 11px;
}

.profit-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 154px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(0, 0, 0, 0.2);
  background-size: 64px 52px;
}

.profit-line {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255, 122, 0, 0.22));
}

.profit-area {
  fill: rgba(255, 122, 0, 0.16);
}

.profit-dot {
  fill: var(--accent);
}

.performance-detail {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.performance-detail.empty {
  color: var(--muted);
  font-size: 12px;
}

.performance-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.performance-detail-head strong,
.performance-detail-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-detail-head strong {
  color: var(--text);
  font-size: 13px;
}

.performance-detail-head span {
  color: var(--muted);
  font-size: 11px;
}

.ticket-list {
  display: grid;
  gap: 6px;
}

.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.ticket-row strong,
.ticket-row span,
.ticket-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-row strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.ticket-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.ticket-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.ticket-row.is-hit {
  border-color: rgba(255, 122, 0, 0.36);
}

.ticket-row.is-hit em {
  color: var(--accent);
}

.ticket-row.is-refund em {
  color: #9ed6ff;
}

.plan-list {
  display: grid;
  gap: 8px;
}

.plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.plan-card.current {
  border-color: rgba(255, 122, 0, 0.42);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.12), rgba(11, 13, 16, 0.96));
}

.plan-card span,
.plan-card strong,
.plan-card em,
.plan-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-card span {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.plan-card strong {
  color: var(--accent-2);
  font-size: 14px;
}

.plan-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.plan-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.plan-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.account-menu {
  display: grid;
  gap: 8px;
}

.account-menu a,
.account-menu button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-3);
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.account-menu a::after,
.account-menu button::after {
  content: "窶ｺ";
  color: var(--muted);
  font-size: 18px;
}

.account-menu button {
  color: #ffd7d7;
}

.bet-summary-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.bet-summary-card {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
  gap: 5px 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
}

.bet-summary-card strong,
.bet-summary-card span,
.bet-summary-card em,
.bet-summary-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-summary-card strong {
  color: var(--text);
  font-size: 14px;
}

.bet-summary-card span,
.bet-summary-card small {
  color: var(--muted);
  font-size: 11px;
}

.bet-summary-card em {
  color: var(--accent-2);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.bet-summary-card small {
  grid-column: 1 / -1;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 13px;
}

.skeleton { min-height: 130px; }

.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 78px;
  z-index: 40;
  padding: 12px 14px;
  border: 1px solid rgba(255, 122, 0, 0.35);
  border-radius: 8px;
  background: #111316;
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 122, 0, 0.12), transparent 38%),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.ad-overlay.active {
  display: flex;
}

.ad-modal {
  width: min(420px, 100%);
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 10px;
  background: #111316;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

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

.ad-modal-head span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.ad-modal-head button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.ad-slot {
  display: grid;
  align-content: center;
  min-height: 280px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.14), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
    #090a0c;
}

.ad-slot h2 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.ad-slot p:last-child,
.ad-note {
  color: var(--muted);
  line-height: 1.7;
}

.ad-note {
  padding: 12px;
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(6, 7, 9, 0.94);
  backdrop-filter: blur(16px);
}

.nav-item,
.nav-link {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover,
.nav-link:hover {
  color: var(--text);
  background: var(--panel-2);
}

@media (min-width: 820px) {
  .app-main {
    padding-bottom: 84px;
  }

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

  .race-buttons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .recommendation-list {
    grid-template-columns: 1fr;
  }

  .performance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .app-main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .page-head,
  .panel {
    padding: 12px;
  }

  .race-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .race-button {
    min-height: 46px;
  }
}

/* Ultra Boat refresh */
:root {
  --bg: #020615;
  --panel: rgba(5, 11, 25, 0.88);
  --panel-2: rgba(8, 18, 38, 0.86);
  --panel-3: rgba(3, 8, 18, 0.88);
  --text: #ffffff;
  --muted: #a9b7d6;
  --line: rgba(145, 194, 255, 0.18);
  --accent: #00a3ff;
  --accent-2: #fff34a;
  --power: #ff1d4d;
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 164, 255, 0.35), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(255, 29, 77, 0.24), transparent 28%),
    #020615;
}

.ultra-shell {
  background:
    linear-gradient(180deg, rgba(0, 24, 73, 0.48), rgba(1, 4, 14, 0.98) 46%, #02040b),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 22px);
}

.ultra-topbar {
  min-height: 74px;
  border-bottom-color: rgba(0, 163, 255, 0.22);
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.94), rgba(4, 14, 34, 0.88)),
    rgba(2, 6, 18, 0.9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

.brand-mark {
  border-color: rgba(255, 255, 255, 0.68);
  color: #07101d;
  background:
    radial-gradient(circle at 35% 25%, #ffffff, #c9eaff 50%, #02a8ff 92%);
  box-shadow:
    0 0 24px rgba(0, 163, 255, 0.4),
    inset 0 0 12px rgba(255, 255, 255, 0.62);
  font-style: italic;
  letter-spacing: -0.04em;
}

.brand h1 {
  font-size: 22px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(0, 163, 255, 0.42);
}

.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 243, 74, 0.3);
}

.status-card {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(4, 11, 26, 0.78);
}

.status-dot {
  background: #ff1d4d;
  box-shadow: 0 0 18px rgba(255, 29, 77, 0.9);
}

.app-main {
  width: min(1180px, 100%);
}

.page-view.active {
  gap: 14px;
}

.ultra-hero {
  position: relative;
  aspect-ratio: 1792 / 1024;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 163, 255, 0.26);
  border-radius: 16px;
  background: #020615;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.46),
    0 0 52px rgba(0, 163, 255, 0.14);
}

.ultra-secret-hero {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(0, 163, 255, 0.24);
  border-radius: 14px;
  background: #020615;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.36),
    0 0 38px rgba(0, 163, 255, 0.12);
}

.ultra-secret-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.08) contrast(1.08);
  opacity: 0.72;
}

.ultra-secret-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 3, 12, 0.88), rgba(0, 5, 18, 0.36), rgba(0, 2, 8, 0.74)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 3, 13, 0.72));
}

.ultra-secret-hero div {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 4px;
  min-height: 190px;
  padding: 22px;
}

.ultra-secret-hero h2 {
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -0.04em;
}

.ultra-secret-hero span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.ultra-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.ultra-hero-shade {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.ultra-hero::before,
.ultra-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.ultra-hero::before {
  left: -10%;
  right: -10%;
  top: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 232, 255, 0.0), rgba(0, 232, 255, 0.82), rgba(255, 29, 77, 0.72), transparent);
  transform: rotate(-8deg);
  box-shadow: 0 0 20px rgba(0, 232, 255, 0.55);
  opacity: 0;
}

.ultra-hero::after {
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 5px);
  opacity: 0;
  mix-blend-mode: screen;
}

.ultra-hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: clamp(290px, 48vw, 560px);
  width: min(520px, 72%);
  padding: clamp(22px, 4vw, 54px);
}

.ultra-hero-copy h2 {
  font-size: clamp(28px, 5vw, 70px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-style: italic;
  text-shadow:
    0 0 22px rgba(0, 163, 255, 0.48),
    0 3px 0 rgba(255, 29, 77, 0.25);
}

.ultra-hero-copy p:last-child {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(13px, 1.8vw, 18px);
  font-weight: 800;
}

.page-head,
.panel,
.legend-card,
.data-status-card,
.summary-metrics div,
.venue-card,
.responsible-card {
  border-color: rgba(145, 194, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(4, 14, 34, 0.9), rgba(5, 8, 18, 0.9)),
    rgba(5, 11, 25, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.page-head-glow {
  border-color: rgba(0, 163, 255, 0.28);
  background:
    linear-gradient(120deg, rgba(0, 163, 255, 0.14), rgba(255, 29, 77, 0.08), rgba(2, 7, 17, 0.9));
}

.page-head h2,
.panel h3 {
  font-weight: 950;
  letter-spacing: -0.02em;
}

.responsible-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 10px;
}

.responsible-card strong {
  font-size: 19px;
  line-height: 1.25;
}

.responsible-card span {
  color: var(--muted);
  font-size: 13px;
}

.summary-metrics div {
  border-color: rgba(0, 163, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.16), rgba(255, 29, 77, 0.08)),
    rgba(3, 9, 21, 0.88);
}

.summary-metrics strong {
  color: #ffffff;
}

.legend-power {
  background: linear-gradient(90deg, rgba(0, 163, 255, 0.16), #00d8ff, #fff34a, #ff1d4d);
  box-shadow: 0 0 18px rgba(0, 216, 255, 0.28);
}

.venue-card {
  border-radius: 12px;
}

.venue-card strong {
  letter-spacing: -0.01em;
}

.pill {
  color: #fff34a;
  border-color: rgba(255, 243, 74, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 243, 74, 0.13), rgba(255, 29, 77, 0.08));
}

.race-button {
  min-height: 54px;
  border-color: rgba(145, 194, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.11), rgba(255, 29, 77, 0.06)),
    #030816;
}

.race-button.is-hot {
  border-color: rgba(255, 243, 74, 0.6);
  background:
    linear-gradient(135deg, rgba(255, 29, 77, calc(0.18 + var(--power) * 0.3)), rgba(255, 243, 74, calc(0.13 + var(--power) * 0.18))),
    linear-gradient(135deg, #041a3d, #10040d);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 18px rgba(255, 29, 77, 0.14);
}

.race-button.is-normal {
  border-color: rgba(0, 163, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.16), rgba(0, 37, 90, 0.22)),
    #030816;
}

.race-button.is-hard {
  border-color: rgba(160, 174, 204, 0.14);
  background:
    linear-gradient(135deg, rgba(8, 18, 38, 0.86), rgba(4, 8, 18, 0.88)),
    #030816;
}

.race-button:hover {
  border-color: rgba(255, 243, 74, 0.72);
  transform: translateY(-1px);
}

.race-button strong {
  font-size: 16px;
  font-style: italic;
}

.race-button span {
  color: rgba(255, 255, 255, 0.82);
}

.entry-row,
.mini-row,
.elo-row,
.performance-row,
.recommendation-card,
.comment-card,
.plan-card,
.ticket-row,
.metric-cell,
.pattern-ideas div {
  border-color: rgba(145, 194, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.07), rgba(255, 29, 77, 0.035)),
    rgba(2, 7, 17, 0.92);
}

.metric-cell {
  border-color: rgba(0, 216, 255, calc(0.12 + var(--level) * 0.3));
  background:
    linear-gradient(135deg, rgba(0, 163, 255, calc(0.05 + var(--level) * 0.25)), rgba(255, 243, 74, calc(0.03 + var(--level) * 0.11))),
    #030816;
}

.elo-chart,
.profit-chart svg {
  border-color: rgba(0, 163, 255, 0.18);
  background:
    linear-gradient(rgba(145, 194, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145, 194, 255, 0.055) 1px, transparent 1px),
    #020714;
}

.chart-label {
  fill: #b9d6ff;
}

.bottom-nav {
  border-top-color: rgba(0, 163, 255, 0.2);
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.98), rgba(4, 14, 34, 0.96));
}

.nav-item.active,
.nav-item:hover,
.nav-link:hover {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.22), rgba(255, 29, 77, 0.11));
  box-shadow: inset 0 0 0 1px rgba(145, 194, 255, 0.12);
}

.ghost-button,
.icon-button,
.compact-select,
.comment-form textarea,
.comment-form input,
.account-menu a,
.account-menu button {
  border-color: rgba(145, 194, 255, 0.2);
  background: rgba(3, 8, 18, 0.9);
}

.comment-form-actions button,
.comment-card footer button {
  border-color: rgba(0, 163, 255, 0.34);
  background: rgba(0, 163, 255, 0.09);
}

.ad-modal {
  border-color: rgba(0, 163, 255, 0.28);
  background: #050b18;
}

.ad-slot {
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.16), rgba(255, 29, 77, 0.1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
    #030816;
}

@media (min-width: 820px) {
  .ultra-hero {
    min-height: 0;
  }

  .ultra-hero-copy {
    min-height: 520px;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: 66px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

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

  .status-card {
    min-height: 34px;
    padding: 6px 8px;
  }

  .ultra-hero {
    min-height: 0;
    border-radius: 12px;
  }

  .ultra-hero img {
    object-position: center;
  }

  .ultra-hero-shade {
    background: transparent;
  }

  .ultra-hero-copy {
    align-content: end;
    min-height: 430px;
    width: 100%;
    padding: 22px 16px;
  }

  .ultra-hero-copy h2 {
    font-size: 34px;
  }

  .summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tan-strategy-form,
  .tan-simulator-form,
  .tan-strategy-search-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tan-simulator-form .primary-button {
    grid-column: 1 / -1;
  }

  .tan-strategy-results {
    grid-template-columns: 1fr;
  }
}
