/* v029 polish (Game Studio, PP-001). Loaded last; layout/typography only, no gameplay or structure changes.
   Remove this file's <link> in index.html to revert every rule below. */

/* ---- typography: balanced headings, no orphaned last word (e.g. "Saturday, October / 31") ---- */
.daily-date, .screen-title, .modal h2, .fail-card h3, .vx-hero h2, .start-hint h2 { text-wrap: balance; }

/* ---- small phones (320-359 px wide: iPhone SE 1st gen, small Androids) ----
   course / daily names and tile subtitles were cut off with an ellipsis, and the Shop tab bar ran off the right edge. */
@media (max-width: 359px) {
  .cs-info b, .dy-card .info b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 17px; line-height: 1.05; overflow: hidden; }
  .cs-course.next .cs-info small { white-space: normal; }
  .hm-t small { white-space: normal; line-height: 1.15; }
  .sh-tabs { max-width: 100%; }
  .sh-tabs button { padding-left: 10px !important; padding-right: 10px !important; font-size: 13.5px; }
}

/* ---- TV / 1080p+ displays: a 10-foot UI and overscan-safe edges ----
   At 1920x1080 the menus read small from a sofa, and the corner buttons sat ~14 px from the edge, inside a typical TV overscan crop. */
@media (min-width: 1800px) and (min-height: 1000px) {
  :root { --uiz: 1.6; } /* 1.45 before; 1.6 keeps Daily/Settings mostly on one screen while reading better from a sofa */
  #levels .cs-body { top: calc(var(--sat) + 98px); } /* clears the larger zoomed topbar (bar bottom ~84 px vs the 72 px row start) */
  /* Home only: the other screens place their content rows at fixed offsets under the topbar, so moving their bar would overlap it */
  #home .topbar { padding-left: max(calc(var(--sal) + 18px), 3.5vw) !important; padding-right: max(calc(var(--sar) + 18px), 3.5vw) !important; padding-top: max(calc(var(--sat) + 12px), 3.5vh) !important; }
}
