/* Round detail: mobile-only overrides (same touch + narrow condition as the other *-mobile.css files).
   Everything lives inside the media query, so the PC design is untouched. */
@media (max-width: 899px) {
  .desktop-site .round-numbers-panel * { min-width: 0; }

  /* the grid column must not grow with the (wide) prize table below, or the whole card gets wider than the screen */
  .desktop-site .benchmark-detail-shell { grid-template-columns: minmax(0, 1fr); }
  .desktop-site .benchmark-detail-shell > * { min-width: 0; }
  .desktop-site .detail-top-grid { grid-template-columns: minmax(0, 1fr); }

  .desktop-site .round-numbers-panel { padding: 4px 0 0; }
  .desktop-site .round-numbers-top { margin-bottom: 12px; gap: 12px; }
  .desktop-site .round-numbers-top h2 { font-size: 20px; }
  .desktop-site .round-numbers-top .round-select-wrap { width: 120px; }
  .desktop-site .round-numbers-top .round-select-wrap::after { right: 14px; width: 7px; height: 7px; }
  .desktop-site .round-numbers-top .round-select { height: 38px; border-radius: 19px; padding: 0 30px 0 12px; font-size: 14px; }

  /* card: everything shrinks so the 6 balls + bonus fit on one screen line */
  .desktop-site .round-numbers-card { border-radius: 16px; padding: 24px 14px 26px; }
  .desktop-site .round-numbers-inner {
    --detail-ball: min(44px, calc((100vw - 96px) / 7));
    --detail-gap: 5px;
    width: 100%;
  }

  .desktop-site .round-numbers-head { padding-bottom: 18px; align-items: center; }
  .desktop-site .round-numbers-title { gap: 8px; }
  .desktop-site .round-numbers-title strong { font-size: 20px; }
  .desktop-site .round-numbers-title span { font-size: 13px; }

  /* smaller prev / next arrows (the drawn arrow lines are scaled with the circle) */
  .desktop-site .round-arrow { width: 34px; height: 34px; flex-basis: 34px; }
  .desktop-site .round-arrow::before { left: 8px; top: 16px; width: 17px; }
  .desktop-site .round-arrow::after { width: 10px; }
  .desktop-site .round-arrow-prev::after { left: 8px; top: 15px; }
  .desktop-site .round-arrow-next::after { right: 8px; top: 15px; }

  .desktop-site .round-numbers-balls { padding-top: 18px; }
  .desktop-site .round-numbers-group { gap: var(--detail-gap); }
  .desktop-site .round-numbers-balls > i { font-size: 18px; }
  .desktop-site .round-ball {
    width: var(--detail-ball);
    height: var(--detail-ball);
    flex: 0 0 var(--detail-ball);
    font-size: calc(var(--detail-ball) * .42);
  }

  /* labels under the balls follow the same widths: main label spans the 6 balls */
  .desktop-site .round-numbers-labels { margin-top: 14px; font-size: 12px; }
  .desktop-site .round-numbers-labels span { gap: 6px; }
  .desktop-site .round-numbers-labels .label-main { flex: 0 0 calc(var(--detail-ball) * 6 + var(--detail-gap) * 5); }
  .desktop-site .round-numbers-labels .label-bonus { flex: 0 0 calc(var(--detail-ball) + 22px); justify-content: flex-end; white-space: nowrap; }
  .desktop-site .round-numbers-labels .label-bonus::before { display: none; }
  .desktop-site .round-numbers-labels .label-bonus em { font-size: 11px; }

  /* ---------- prize table: the "등위별 총 당첨금" column is dropped, the remaining 3 columns fit the screen ---------- */
  .desktop-site .prize-overview-card { padding: 20px 16px 20px; }
  .desktop-site .prize-overview-head h2 { font-size: 20px; }
  .desktop-site .prize-ref-table { margin-top: 14px; table-layout: fixed; }
  .desktop-site .prize-ref-table th:nth-child(2),
  .desktop-site .prize-ref-table td:nth-child(2) { display: none; }
  .desktop-site .prize-ref-table th,
  .desktop-site .prize-ref-table td { padding: 0 8px; font-size: 14px; }
  .desktop-site .prize-ref-table th { height: 46px; font-size: 13px; }
  .desktop-site .prize-ref-table td { height: 52px; }
  .desktop-site .prize-ref-table th:first-child,
  .desktop-site .prize-ref-table td:first-child { width: 18%; }
  .desktop-site .prize-ref-table td:last-child { overflow-wrap: anywhere; }

  /* ---------- combination analysis: 2 columns; 구간 분포 and AC값 span the full row ---------- */
  .desktop-site .combination-analysis-card { padding: 20px 16px; }
  .desktop-site .combination-analysis-card > h2 { font-size: 20px; }
  .desktop-site .analysis-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
  .desktop-site .analysis-card-grid > .analysis-metric-card:nth-child(3),
  .desktop-site .analysis-card-grid > .analysis-metric-card:nth-child(6) { grid-column: 1 / -1; }
  .desktop-site .analysis-metric-card { min-height: 0; padding: 16px 14px; border-radius: 14px; }
  .desktop-site .analysis-metric-card > span { font-size: 14px; }
  .desktop-site .analysis-metric-card > strong,
  .desktop-site .analysis-word-card > strong { margin-top: 10px; font-size: 28px; }
  .desktop-site .analysis-metric-card > b { margin-top: 8px; font-size: 13px; }
  .desktop-site .analysis-metric-card > p { margin-top: 6px; font-size: 12px; }
  .desktop-site .analysis-metric-card .ratio-ring { width: 80px; height: 80px; margin: 8px auto 6px; }
  .desktop-site .analysis-metric-card .ratio-ring::before { inset: 12px; }
  .desktop-site .analysis-metric-card .ratio-caption { display: block; text-align: center; font-size: 12px; }
  .desktop-site .analysis-metric-card .range-distribution { gap: 8px; margin-top: 10px; }
  .desktop-site .analysis-metric-card .range-distribution > div { grid-template-columns: 10px 52px minmax(20px, 1fr) 34px; }

  /* notes on top, the two buttons below them (side by side, full width) */
  .desktop-site .prize-ref-foot { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 16px; }
  .desktop-site .prize-ref-foot ul { font-size: 13px; }
  .desktop-site .prize-ref-note { display: none; }
  .desktop-site .prize-ref-actions { width: 100%; gap: 8px; }
  .desktop-site .prize-ref-actions a { flex: 1 1 0; min-height: 46px; padding: 0 8px; border-radius: 10px; justify-content: center; font-size: 14px; white-space: nowrap; }
}
