/* Section accents & standardized circular bordered Lucide icon badges. */
:root { --tn-mix: 78%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tn-mix: 40%; } }
:root[data-theme="dark"] { --tn-mix: 40%; }
.t-home { --tn: #2563EB; } .t-comm { --tn: #A8305E; } .t-ai { --tn: #4F46E5; } .t-games { --tn: #0D9488; }
.t-me { --tn: #0E6F8A; }
.t-work { --tn: #0E6F8A; } .t-notes { --tn: #B45309; } .t-about { --tn: #166534; } .t-links { --tn: #7C3AED; }
.t-hire { --tn: #C2410C; } .t-settings { --tn: #475569; } .t-privacy { --tn: #1D4ED8; } .t-terms { --tn: #6D28D9; }
.t-studio { --tn: #0F172A; } .t-ludo { --tn: #C48A14; } .t-tiles { --tn: #6D28D9; } .t-water { --tn: #0E7490; }
.t-pipe { --tn: #0369A1; } .t-bubble { --tn: #BE185D; }
:root[data-theme="dark"] .t-studio { --tn: #94A3B8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-studio { --tn: #94A3B8; } }

.ic-badge {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--nav-border);
  color: var(--tn, var(--accent));
}
.ic-badge-sm { width: 32px; height: 32px; }
.ic-badge-xs { width: 24px; height: 24px; }
.ic-badge svg { display: block; stroke: currentColor; }
.t-ludo .hm-game-n, .t-tiles .hm-game-n, .t-water .hm-game-n, .t-pipe .hm-game-n, .t-bubble .hm-game-n { color: #fff; }

.recent-row { margin-top: var(--sp-6); display: grid; gap: var(--sp-4); }
.rr-title { margin: 0; font: 700 var(--fs-1) var(--font-display); letter-spacing: -0.02em; }
.rr-empty { margin: 0; color: var(--muted); }
.rr-group { display: grid; gap: var(--sp-2); }
.rr-group h2 { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font: 700 var(--fs-0) var(--font-display); letter-spacing: -0.02em; }
.rr-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.rr-group a { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--nav-border); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; font: 500 var(--fs-small) var(--font-body); }
.rr-group a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-group a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---- Mobile refinements (v49) ---- */
@media (pointer: coarse), (max-width: 640px) {
  /* 16px stops iOS Safari from zooming the page when a field is focused */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),
  textarea, select { font-size: 16px !important; }
  .tb-select { max-width: 150px; text-overflow: ellipsis; }
  /* comfortable touch size (44px) for small links and buttons */
  .hm-tile-a, .hm-more, .ig-stat-btn { display: inline-flex; align-items: center; min-height: 44px; }
  .cf-name, .cf-space { position: relative; }
  .cf-name::after, .cf-space::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%); }
  footer a, .legal-links a, a[href="/privacy"], a[href="/terms"] { display: inline-block; padding-block: 10px; }
}
/* crowded top bar: keep the page title only when there is room, no "Commun…" cut-offs */
@media (max-width: 520px) {
  .topbar:has(.topbar-context > *) .topbar-sep,
  .topbar:has(.topbar-context > *) .topbar-title { display: none; }
}
