/* ================================================================ C155: launch polish for the shared parts of the app (loaded last).
   Small, safe touches only: nothing here changes what a screen shows, only how comfortable it is to read and tap.
   Remove the one <link> line for this file in index.html to get the old look back. Notes: C155_PROGRESS.md. */

/* ---------------------------------------------------------------- iPhone on its side: keep the app clear of the notch.
   index.html asks for the full screen (viewport-fit=cover), so the side insets must be added by the page. env() is 0 everywhere else. */
.app-shell {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
@media (max-width: 899px) {
  .app-nav {
    /* 4px = app.css's phone value (keeps "Middlegame" whole at 375px) */
    padding-left: calc(4px + env(safe-area-inset-left, 0px));
    padding-right: calc(4px + env(safe-area-inset-right, 0px));
  }
}

/* ---------------------------------------------------------------- finger-sized tap areas (touch screens only).
   These small round buttons keep their look; an invisible ring around them takes the tap (WCAG 2.5.8 / Apple's 44pt). */
@media (pointer: coarse) {
  .app-topbar .app-brand,
  .pf-i,
  .st-task-check { position: relative; }
  .app-topbar .app-brand::after,
  .pf-i::after,
  .st-task-check::after { content: ""; position: absolute; inset: -8px; }
}

/* ---------------------------------------------------------------- readable numbers
   Scores, ratings and counters use same-width digits, so "+0.4" -> "+1.3" or "9 -> 10 solved" does not make the line jiggle. */
.an-big, .an-best-sc, .mn-count, .sbt-badge,
.app-period-n, .app-period-lbl, .hm-rating, .pf-rating, [class*="-count"], [class*="-score"] {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- a toast with a long word (a username) wraps instead of overflowing */
.app-toast-msg { overflow-wrap: anywhere; }
