.prediction-dock,
.metric-card,
.accuracy-panel,
.share-card,
.faq-item,
.battle-card,
.personality-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.prediction-dock {
  align-self: stretch;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  padding: 1.05rem;
  border-color: rgba(119, 233, 255, 0.24);
  background: linear-gradient(155deg, rgba(13, 31, 55, 0.78), rgba(6, 16, 31, 0.7));
}

.dock-topline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.live-dot {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(143, 240, 186, 0.6);
}

.dock-badges,
.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}

.result-meta {
  margin-top: 0.65rem;
}

.dock-badges span,
.result-meta span {
  display: inline-flex;
  min-height: 1.75rem;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(229, 241, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #d8eaff;
  font-size: 0.72rem;
  font-weight: 850;
}

.probability-ring {
  --ring-size: 15.35rem;
  position: relative;
  display: grid;
  place-items: center;
  width: min(var(--ring-size), 76vw);
  aspect-ratio: 1;
}

.probability-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.ring-track,
.ring-progress {
  fill: none;
  stroke-width: 10;
}

.ring-track {
  stroke: rgba(229, 241, 255, 0.12);
}

.ring-progress {
  stroke: url("#ring-gradient");
  stroke: var(--ice);
  stroke-linecap: round;
  stroke-dasharray: 427;
  stroke-dashoffset: 427;
  filter: drop-shadow(0 0 12px rgba(119, 233, 255, 0.42));
  transition: stroke-dashoffset 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ring-content {
  position: relative;
  display: grid;
  gap: 0.3rem;
  place-items: center;
  text-align: center;
}

.ring-percent {
  font-size: 3.65rem;
  line-height: 1;
  font-weight: 950;
  text-shadow: 0 0 18px rgba(119, 233, 255, 0.24);
}

.ring-label {
  max-width: 12rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-headline {
  min-height: 3.25rem;
  margin: 0;
  color: #d8eaff;
  text-align: center;
  line-height: 1.55;
}

.dock-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
}

.dock-stats div {
  min-height: 4.25rem;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  padding: 0.7rem;
  border: 1px solid rgba(229, 241, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.dock-stats span {
  color: var(--quiet);
  font-size: 0.76rem;
  font-weight: 800;
}

.dock-stats strong {
  font-size: 1rem;
}

.results-section {
  padding-top: 2.55rem;
}

.result-summary {
  display: grid;
  gap: 1.05rem;
  margin-bottom: 1.15rem;
  padding: 1.2rem;
  border: 1px solid rgba(119, 233, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(13, 31, 55, 0.82), rgba(6, 16, 31, 0.68));
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.result-summary[hidden] {
  display: none;
}

.result-kicker {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.result-summary h3 {
  margin: 0;
  font-size: 2.05rem;
  line-height: 1.05;
}

.result-summary p {
  max-width: 48rem;
  margin: 0.7rem 0 0;
  color: #d8eaff;
  line-height: 1.6;
}

.summary-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.summary-data-grid div {
  min-height: 4.8rem;
  padding: 0.75rem;
  border: 1px solid rgba(229, 241, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.summary-data-grid span {
  display: block;
  color: var(--quiet);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-data-grid strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.12rem;
}

.metrics-grid,
.battle-grid,
.personality-grid,
.accuracy-grid {
  display: grid;
  gap: 1rem;
}

.metric-card {
  min-height: 10.9rem;
  position: relative;
  overflow: hidden;
  padding: 1rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 3px;
  background: var(--accent, var(--ice));
  opacity: 0.86;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 241, 255, 0.3);
  background: rgba(18, 38, 67, 0.7);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.metric-icon {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent, var(--ice)) 18%, transparent);
  color: var(--text);
  font-weight: 900;
}

.metric-label {
  margin: 1.1rem 0 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  margin: 0;
  font-size: 1.82rem;
  font-weight: 950;
}

.metric-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.is-skeleton {
  pointer-events: none;
}

.skeleton-line {
  position: relative;
  width: 100%;
  height: 0.85rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(229, 241, 255, 0.11);
}

.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(229, 241, 255, 0.16), transparent);
  animation: skeletonShimmer 1.35s ease-in-out infinite;
}

.skeleton-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
}

.skeleton-value {
  width: 68%;
  height: 1.7rem;
  margin-top: 0.6rem;
}

.is-forecast-loading .probability-ring {
  animation: loadingPulse 1.4s ease-in-out infinite;
}

.result-summary.is-loading .summary-data-grid strong,
.result-summary.is-loading #summary-title,
.result-summary.is-loading #summary-explanation {
  color: rgba(245, 251, 255, 0.78);
}

.reasoning-section,
.share-section,
.accuracy-section {
  width: min(1180px, calc(100% - 2rem));
  border-top: 1px solid rgba(229, 241, 255, 0.09);
}

.reasoning-layout,
.personality-layout,
.share-layout,
.content-grid {
  display: grid;
  gap: 1.25rem;
}

.reasoning-bars {
  display: grid;
  gap: 0.9rem;
}

.reason-row {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.reason-row-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  color: var(--text);
  font-weight: 850;
}

.progress-shell {
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(229, 241, 255, 0.12);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ice), var(--amber));
  box-shadow: 0 0 18px rgba(119, 233, 255, 0.28);
  transition: width 850ms ease;
}

.timeline-section {
  max-width: none;
  width: 100%;
  padding-left: max(1rem, calc((100vw - 1180px) / 2));
  padding-right: 0;
}

.timeline-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 14.5rem;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.2rem max(1rem, calc((100vw - 1180px) / 2)) 1rem 0;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(119, 233, 255, 0.45) transparent;
}

.timeline-card {
  min-height: 13rem;
  scroll-snap-align: start;
  padding: 1rem;
}

.timeline-time {
  color: var(--amber);
  font-weight: 900;
}

.timeline-event {
  margin: 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.timeline-meter {
  height: 0.45rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(229, 241, 255, 0.12);
}

.timeline-meter span {
  display: block;
  width: var(--risk);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--coral));
}

.share-layout {
  align-items: start;
}

.share-card {
  min-height: 23rem;
  display: grid;
  align-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 10, 20, 0.38), rgba(4, 10, 20, 0.88)),
    url("../images/storm-hero.png") center / cover no-repeat;
}

.share-card-top,
.share-card-data {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.share-card-top span,
.share-card-data span {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(229, 241, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 10, 20, 0.48);
  color: #d8eaff;
  font-size: 0.78rem;
  font-weight: 850;
}

.share-card h3 {
  max-width: 13ch;
  margin: 0;
  font-size: 2.85rem;
  line-height: 0.98;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.46);
}

.share-card p {
  max-width: 34rem;
  margin: 0;
  color: #d8eaff;
  line-height: 1.55;
}

.share-actions {
  display: grid;
  gap: 0.7rem;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.secondary-button:hover {
  transform: translateY(-2px);
  border-color: rgba(119, 233, 255, 0.58);
  background: rgba(119, 233, 255, 0.12);
}

.copy-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--green);
  font-weight: 750;
}

.battle-card {
  padding: 1rem;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(13, 31, 55, 0.86), rgba(10, 19, 33, 0.62));
}

.battle-card.is-leader {
  border-color: rgba(255, 208, 111, 0.42);
  box-shadow: 0 24px 70px rgba(255, 208, 111, 0.12);
}

.battle-city {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.battle-city h3 {
  margin: 0;
  font-size: 1.3rem;
}

.odds-badge {
  display: inline-grid;
  place-items: center;
  min-width: 4.1rem;
  min-height: 2.4rem;
  border-radius: 8px;
  background: rgba(119, 233, 255, 0.15);
  color: var(--frost);
  font-weight: 950;
}

.battle-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.battle-stat-grid div,
.personality-card {
  min-height: 5.1rem;
  padding: 0.75rem;
  border: 1px solid rgba(229, 241, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.battle-stat-grid span,
.personality-card span {
  display: block;
  color: var(--quiet);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.battle-stat-grid strong,
.personality-card strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--text);
  font-size: 1.1rem;
}

.battle-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.personality-section {
  width: min(1180px, calc(100% - 2rem));
  border-top: 1px solid rgba(229, 241, 255, 0.09);
}

.accuracy-panel {
  min-height: 15rem;
  padding: 1.1rem;
}

.panel-number {
  color: var(--amber);
  font-weight: 950;
}

.accuracy-panel h3,
.content-copy h3 {
  margin: 1rem 0 0.6rem;
  font-size: 1.35rem;
}

.content-section {
  width: min(1180px, calc(100% - 2rem));
}

.content-copy {
  padding: 1.2rem 0;
}

.content-copy h2 + p,
.content-copy h3 + p {
  margin-top: 0;
}

.city-nav-section {
  width: min(1180px, calc(100% - 2rem));
  border-top: 1px solid rgba(229, 241, 255, 0.09);
}

.city-nav-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.city-nav-header h2 {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.05;
}

.city-nav-header > p {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.city-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.city-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 28rem);
  min-height: 5.35rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(119, 233, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(119, 233, 255, 0.1), transparent 42%),
    rgba(13, 31, 55, 0.58);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.city-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(119, 233, 255, 0.48);
  background:
    linear-gradient(135deg, rgba(119, 233, 255, 0.14), transparent 42%),
    rgba(18, 38, 67, 0.7);
}

.city-pill-code {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgba(119, 233, 255, 0.24);
  border-radius: 8px;
  background: rgba(119, 233, 255, 0.11);
  color: var(--ice);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.city-pill-main {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.city-pill-main strong {
  color: var(--text);
  font-size: 1rem;
}

.city-pill-main span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.city-pill-arrow {
  color: var(--amber);
  font-weight: 950;
  transition: transform 160ms ease;
}

.city-pill:hover .city-pill-arrow {
  transform: translateX(3px);
}

.faq-section {
  width: min(920px, calc(100% - 2rem));
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-item {
  overflow: hidden;
  background: rgba(13, 31, 55, 0.64);
}

.faq-question {
  width: 100%;
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.faq-question span:last-child {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid rgba(119, 233, 255, 0.34);
  border-radius: 8px;
  color: var(--ice);
  transition: transform 160ms ease;
}

.faq-item.is-open .faq-question span:last-child {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
}

.faq-answer p {
  margin: 0;
  padding: 0 1rem 1rem;
}

.storm-toggle {
  position: fixed;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  padding: 0 1rem;
  background: rgba(6, 16, 31, 0.78);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.6rem);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

body.has-forecast .storm-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.storm-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 208, 111, 0.6);
  background: rgba(255, 208, 111, 0.12);
}

.storm-panel {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  padding: 1rem;
  overflow: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 6, 14, 0.42), rgba(2, 6, 14, 0.94)),
    url("../images/storm-hero.png") center / cover no-repeat;
  transition: opacity 220ms ease, visibility 220ms ease;
}

body.storm-active {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.storm-active #site-header,
body.storm-active #site-footer,
body.storm-active .storm-toggle {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.storm-active .storm-panel {
  display: grid;
  transform: none !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.storm-core {
  display: grid;
  justify-items: center;
  gap: 1rem;
  width: min(42rem, 100%);
  text-align: center;
}

.storm-core h2 {
  max-width: 12ch;
  font-size: 3rem;
}

.storm-ring {
  --ring-size: 19.5rem;
}

.storm-ring .ring-percent {
  font-size: 4.9rem;
}

.storm-core p:last-child {
  max-width: 35rem;
  margin: 0;
  color: #d8eaff;
  line-height: 1.65;
}

.storm-exit {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: 1rem;
  z-index: 2;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.08);
}

.tool-info-section {
  width: min(1180px, calc(100% - 2rem));
  border-top: 1px solid rgba(229, 241, 255, 0.09);
}

.tool-info-grid {
  display: grid;
  gap: 1rem;
}

.tool-info-card {
  min-height: 12rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 31, 55, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.tool-info-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
}

.tool-info-card p {
  margin: 0;
}

