/* لمّة / Lamma (Connections): game parts on top of ../retro/kit.css (linked first). Same magazine as the main grid:
   paper cover with cyan rule, print buttons with hard shadows, yellow sticker for mistakes left, solved links as
   category bars in their panel family colour with the main grid's icon, wrong = red hatch + "غلط" stamp. */

html.sheet-open, html.sheet-open body { overflow: hidden; }


/* ---- issue strip with previous / next ---- */
.lm-issue { display: grid; grid-template-columns: var(--tap) minmax(0, 1fr) var(--tap); gap: 4px; padding: 4px 0; }
.lm-issue__mid { text-align: center; min-width: 0; }
.lm-issue__head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.lm-issue .r-issue__meta { margin-top: 1px; }

/* ---- headline + mistakes sticker ---- */
.lm-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.lm-status__txt { min-width: 0; }
.lm-headline { margin: 0; font-size: clamp(21px, 6.2vw, 28px); }
/* mistakes: four stamps. Unused = paper square; used = red hatch + a cross (shape as well as colour) */
.lm-marks { flex: 0 0 auto; display: grid; justify-items: center; gap: 4px; padding: 6px 8px 8px; background: var(--yellow); border: 2px solid var(--ink);
            box-shadow: var(--shadow-hard); }
.lm-marks small { font: 800 13px/1.3 var(--font-ui); color: var(--ink); white-space: nowrap; }
.lm-marks__row { display: flex; gap: 5px; }
.lm-marks__row i { position: relative; width: 20px; height: 20px; border: 2px solid var(--ink); background: var(--paper-clip); }
.lm-marks__row i.used { border-color: var(--red); background-color: #F7D4CF;
  background-image: repeating-linear-gradient(-45deg, rgba(215,38,46,.55) 0 3px, transparent 3px 6px); }
.lm-marks__row i.used::before, .lm-marks__row i.used::after { content: ""; position: absolute; inset-inline-start: 50%; top: -2px; width: 3px; height: 20px;
  margin-inline-start: -1.5px; background: var(--red-ink); transform: rotate(45deg); }
.lm-marks__row i.used::after { transform: rotate(-45deg); }

/* ---- board ---- */
.lm-board { display: grid; gap: 14px; }
.lm-solved { display: grid; gap: 16px; padding-top: 6px; }
.lm-tilewrap { position: relative; }
.lm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.tile { position: relative; min-width: 0; min-height: 68px; padding: 6px 3px; border: 2px solid var(--ink); border-radius: 2px; background: var(--paper-clip); color: var(--ink);
        box-shadow: 2px 2px 0 var(--ink); font: 800 clamp(11px, 3.3vw, 14.5px)/1.3 var(--font-ui); display: flex; align-items: center; justify-content: center;
        text-align: center; overflow: hidden; overflow-wrap: anywhere; user-select: none; -webkit-user-select: none; transition: transform 60ms; }
.tile > span { padding: 3px 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.tile.long { font-size: clamp(10.5px, 2.9vw, 13.5px); }
.tile:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.tile.sel { background: var(--yellow); transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.tile.sel::after { content: ""; position: absolute; top: 4px; inset-inline-end: 4px; width: 8px; height: 8px; background: var(--ink); border-radius: 50%; }
.tile.bad { border-color: var(--red); color: var(--red-ink); background-color: #F7D4CF;
            background-image: repeating-linear-gradient(-45deg, rgba(215,38,46,.09) 0 6px, transparent 6px 13px); box-shadow: 2px 2px 0 var(--red); transform: none; }
.tile.bad::after { display: none; }
.lm-stampbox { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.lm-stampbox .r-stamp { font-size: 44px; padding: 2px 18px 0; }

/* ---- controls ---- */
.lm-controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin-top: 16px; position: sticky; bottom: 0; z-index: 4;
                padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 2px solid var(--ink); }
.lm-controls .r-btn { min-height: 56px; padding: 0 6px; font-size: 16px; min-width: 0; white-space: nowrap; }

/* ---- solved link = a category bar: family colour + halftone, the grid's icon, ink label band, names on paper ---- */
.lm-bar { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 84px;
          padding: 8px 10px; border: 2px solid var(--ink); background: var(--fam-team); box-shadow: 3px 3px 0 var(--ink); }
.lm-bar::before { content: ""; position: absolute; inset: 0; background-image: var(--tex-halftone); background-size: 5px 5px; pointer-events: none; }
.lm-bar[data-family="honours"] { background: var(--fam-honours); }
.lm-bar[data-family="where"] { background: var(--fam-where); }
.lm-bar[data-family="profile"] { background: var(--fam-profile); }
.lm-bar[data-family="numbers"] { background: var(--fam-numbers); }
.lm-bar__art { position: relative; height: 64px; display: grid; place-items: center; }
.lm-bar__art img { max-width: 64px; max-height: 64px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.45)); }
.lm-bar__art .r-panel__ico { width: 58px; max-width: none; }
.lm-bar__txt { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.lm-bar__band { display: block; max-width: 100%; background: var(--ink); color: var(--paper-clip); font: 800 15px/1.3 var(--font-ui); padding: 4px 9px 5px; }
.lm-bar__names { display: block; max-width: 100%; background: var(--paper-clip); color: var(--ink); font: 700 14px/1.5 var(--font-ui); padding: 3px 9px 4px;
                 border: 1.5px solid var(--ink); border-top: 0; }
.lm-bar .lm-bar__lv { position: absolute; bottom: 5px; inset-inline-start: 6px; }
/* correct: tape + lime frame + tick seal, like the main grid's clipping */
.lm-bar.found { outline: 3px solid var(--lime); outline-offset: 2px; }
.lm-bar.found::after { content: ""; position: absolute; top: 6px; inset-inline-end: 6px; width: 26px; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink); z-index: 1;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23141821' stroke-width='3.6' stroke-linecap='square'/%3E%3C/svg%3E") center / 70% no-repeat; }
.lm-bar.found .lm-bar__txt::before { content: none; position: absolute; top: -18px; inset-inline-start: 27%; width: 46%; height: 12px; transform: rotate(-4deg); background: rgba(244,210,31,.82); }
.lm-bar.missed { outline: 3px dashed var(--red); outline-offset: 2px; }
.lm-missed { position: absolute; top: 6px; inset-inline-end: 8px; font: 800 13px/1.5 var(--font-ui); color: var(--red-ink); background: var(--paper-clip);
             border: 2px solid var(--red); padding: 0 8px; transform: rotate(-4deg); }
.lm-bar.r-fresh { animation: r-drop 240ms cubic-bezier(.3,1.6,.5,1); }

/* level chip: number + difficulty word (index, legend); number only on the bar */
.lm-lv { display: inline-flex; align-items: center; gap: 4px; background: var(--paper-clip); color: var(--ink); border: 2px solid var(--ink); font: 800 13px/1.5 var(--font-ui);
         padding: 0 6px; white-space: nowrap; box-shadow: 1.5px 1.5px 0 var(--ink); }

/* ---- side column: result back page + the issue's links (index) ---- */
.lm-side { display: grid; gap: 18px; align-content: start; margin-top: 18px; }
.lm-index { display: none; }
.lm-result { margin-top: 0; padding: 18px 16px; }
.lm-result .r-kicker { font-size: 14px; }
.lm-result__label { font-family: var(--font-display); font-size: 26px; line-height: 1.25; }
.lm-history { display: grid; justify-content: center; gap: 6px; margin: 14px 0 4px; }
.lm-hrow { display: flex; gap: 5px; direction: ltr; padding: 3px; }
.lm-hrow.ok { outline: 2.5px solid var(--lime); }
.lm-hrow.no { outline: 2px dashed var(--red); }
.lm-hrow i { position: relative; width: 30px; height: 30px; display: grid; place-items: center; font: 900 16px/1 var(--font-ui); font-style: normal;
             border: 2px solid var(--ink); background: var(--fam-team); color: var(--paper-clip); overflow: hidden; }
.lm-hrow i[data-family="honours"] { background: var(--fam-honours); }
.lm-hrow i[data-family="where"] { background: var(--fam-where); color: var(--ink); }
.lm-hrow i[data-family="profile"] { background: var(--fam-profile); }
.lm-hrow i[data-family="numbers"] { background: var(--fam-numbers); color: var(--ink); }
.lm-herring { margin: 14px 0 0; text-align: start; font-size: 16px; line-height: 1.6; font-weight: 700; }
.lm-herring b { display: block; color: var(--red-ink); font-size: 14px; font-weight: 800; }
.lm-result__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.lm-result__actions .r-btn { padding: 0 10px; }
.r-share.flash { animation: r-drop 200ms ease-out; }

.lm-index__head { margin-bottom: 14px; }
.lm-index__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lm-ipanel, .lm-slot { min-height: 168px; position: relative; }
.lm-ipanel > .lm-lv, .lm-slot > .lm-lv { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 1; }
.lm-ipanel .r-band { font-size: 14px; }
.lm-ipanel.lm-gone { outline: 3px dashed var(--red); outline-offset: 2px; }
.lm-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed rgba(26,26,26,.45); background: var(--paper-2); color: var(--ink-soft); font-weight: 800; font-size: 13px; }
.lm-slot__q { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--red); color: var(--red-ink); display: grid; place-items: center; font: 400 32px/1 var(--font-display); padding-top: 6px; }
.lm-index__note { margin: 14px 0 0; font-size: 16px; line-height: 1.6; font-weight: 700; color: var(--ink-meta); }

/* ---- help sheet ---- */
.lm-sheet { outline: none; }
.lm-sheet .r-h2 { font-size: 28px; }
.lm-tagline { margin: -2px 0 12px; font-size: 16px; line-height: 1.6; font-weight: 700; color: var(--ink-meta); }
.lm-howto { list-style: none; counter-reset: s; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.lm-howto li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: 16px; line-height: 1.6; font-weight: 600; }
.lm-howto li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: var(--paper-clip); border: 2px solid var(--ink);
                       display: grid; place-items: center; font: 900 17px/1 var(--font-ui); box-shadow: 2px 2px 0 var(--ink); }
html[lang="ar"] .lm-howto li::before { content: counter(s, arabic-indic); }
.lm-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.lm-fine { font-size: 14px; line-height: 1.6; color: var(--ink-meta); font-weight: 600; margin: 10px 0 14px; }
.lm-keys { margin-top: -6px; }
@media (hover: none) { .lm-keys { display: none; } }
.lm-wide { width: 100%; }

/* ---- toast ---- */
.lm-toast { position: fixed; z-index: 50; top: calc(84px + var(--it)); inset-inline: 16px; margin-inline: auto; width: fit-content; max-width: calc(100% - 32px);
            background: var(--ink); color: var(--paper-clip); border: 2px solid var(--paper-clip); box-shadow: 3px 3px 0 var(--navy-deep);
            font: 800 16px/1.5 var(--font-ui); padding: 8px 16px; text-align: center; pointer-events: none; animation: r-drop 160ms ease-out; }
.lm-toast.near { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* ---- small phones ---- */
@media (max-width: 360px) {
  .lm-tiles { gap: 5px; }
  .tile { min-height: 62px; padding: 4px 2px; font-size: 11px; }
  .lm-controls { grid-template-columns: 1fr 1fr; }
  .lm-controls .submit { grid-column: 1 / -1; }
  .lm-marks__row i { width: 17px; height: 17px; } .lm-marks__row { gap: 4px; }
  .lm-marks__row i.used::before, .lm-marks__row i.used::after { height: 17px; }
  .lm-bar { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; padding: 8px; }
  .lm-bar__art { height: 50px; } .lm-bar__art img { max-width: 50px; max-height: 50px; } .lm-bar__art .r-panel__ico { width: 46px; }
  .lm-bar__band { font-size: 14px; }
}
@media (min-width: 600px) { .tile { min-height: 78px; } }

/* ---- desktop: the cover (board) beside the inside page (result + the issue's links) ---- */
@media (min-width: 1024px) {
  .r-poster { --maxw: 1080px; }
  .lm-spread { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 32px; }
  .lm-side { margin-top: 0; }
  .lm-controls { position: static; padding: 0; background: none; border: 0; }
  .lm-index { display: block; }
  .tile { min-height: 92px; font-size: 16px; padding: 8px 6px; }
  .lm-tiles { gap: 10px; }
  .lm-bar { min-height: 96px; grid-template-columns: 76px minmax(0, 1fr); }
  .lm-bar__art { height: 76px; } .lm-bar__art img { max-width: 76px; max-height: 76px; } .lm-bar__art .r-panel__ico { width: 68px; }
  .lm-bar__band { font-size: 17px; } .lm-bar__names { font-size: 14px; }
}
@media (hover: hover) and (pointer: fine) {
  .tile:not(.sel):not(.bad):hover { background: var(--paper); }
}
@media (prefers-reduced-motion: reduce) { .lm-bar.r-fresh, .lm-toast, .r-share.flash { animation: none !important; } }
@media (forced-colors: active) { .tile.sel { forced-color-adjust: none; background: Highlight; color: HighlightText; } }

.lm-lv b { font: 900 14px/1.5 var(--font-ui); background: var(--ink); color: var(--paper-clip); min-width: 18px; text-align: center; margin-inline-start: -4px; }


/* =====================================================================================================
   Difficulty colours (owner, 2026-11-09): easy green, medium yellow, hard blue, tricky purple, like the classic
   group-puzzle convention. The bar takes the difficulty colour; the icon keeps its family colour on its own tile
   (so gold trophies never vanish on yellow). Used on bars, chips, legend, index slots and the guess history.
   ===================================================================================================== */
.lm-wrap, body { --lv0: #5FA82C; --lv1: #F4D21F; --lv2: #2A4DA0; --lv3: #6E3FA3; }
.lm-bar[data-lv="0"] { background: var(--lv0); } .lm-bar[data-lv="1"] { background: var(--lv1); }
.lm-bar[data-lv="2"] { background: var(--lv2); } .lm-bar[data-lv="3"] { background: var(--lv3); }
.lm-bar.found { outline: 3px solid var(--ink); }
.lm-bar__art { border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--fam-team); padding: 4px; box-sizing: content-box; }
.lm-bar__art[data-family="honours"] { background: var(--fam-honours); } .lm-bar__art[data-family="where"] { background: var(--fam-where); }
.lm-bar__art[data-family="profile"] { background: var(--fam-profile); } .lm-bar__art[data-family="numbers"] { background: var(--fam-numbers); }
.lm-lv[data-lv] b { color: var(--ink); }
.lm-lv[data-lv="0"] b { background: var(--lv0); } .lm-lv[data-lv="1"] b { background: var(--lv1); }
.lm-lv[data-lv="2"] b { background: var(--lv2); color: #fff; } .lm-lv[data-lv="3"] b { background: var(--lv3); color: #fff; }
.lm-lv[data-lv] { border-color: var(--ink); }
.lm-hrow i[data-lv="0"] { background: var(--lv0); color: var(--ink); } .lm-hrow i[data-lv="1"] { background: var(--lv1); color: var(--ink); }
.lm-hrow i[data-lv="2"] { background: var(--lv2); color: #fff; } .lm-hrow i[data-lv="3"] { background: var(--lv3); color: #fff; }
.lm-ipanel[data-lv], .lm-slot[data-lv] { border-top: 8px solid var(--lvc, var(--ink)); }
[data-lv="0"].lm-ipanel, [data-lv="0"].lm-slot { --lvc: var(--lv0); } [data-lv="1"].lm-ipanel, [data-lv="1"].lm-slot { --lvc: var(--lv1); }
[data-lv="2"].lm-ipanel, [data-lv="2"].lm-slot { --lvc: var(--lv2); } [data-lv="3"].lm-ipanel, [data-lv="3"].lm-slot { --lvc: var(--lv3); }
.lm-bar[data-lv="2"] .lm-bar__band, .lm-bar[data-lv="3"] .lm-bar__band { box-shadow: 0 0 0 2px var(--paper-clip); }

/* ---- losing sequence ---- */
@keyframes lm-board-shake { 0%, 100% { transform: none; } 15% { transform: translateX(-7px) rotate(-.6deg); } 30% { transform: translateX(6px) rotate(.5deg); }
  45% { transform: translateX(-4px); } 60% { transform: translateX(3px); } 75% { transform: translateX(-1px); } }
@keyframes lm-fall { 0% { transform: none; opacity: 1; } 25% { transform: translateY(-6px) rotate(calc(var(--r) * .3)); }
  100% { transform: translateY(240px) rotate(var(--r)); opacity: 0; } }
@keyframes lm-out-slam { 0% { transform: scale(2.4) rotate(-22deg); opacity: 0; } 60% { transform: scale(.94) rotate(-9deg); opacity: 1; }
  100% { transform: scale(1) rotate(-10deg); opacity: 1; } }
@keyframes lm-reveal-in { 0% { transform: translateY(-26px) rotate(-3deg); opacity: 0; } 70% { transform: translateY(3px) rotate(.6deg); opacity: 1; }
  100% { transform: none; opacity: 1; } }
@keyframes lm-late-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.lm-losing { position: relative; animation: lm-board-shake 360ms ease-out; }
.lm-losing .tile { animation: lm-fall 560ms cubic-bezier(.5,0,.8,.4) var(--d, 200ms) both; pointer-events: none; }
.lm-out { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: grid; place-items: center; }
.lm-out span { transform: rotate(-10deg); animation: lm-out-slam 240ms 100ms cubic-bezier(.2,1.4,.4,1) both; }
.lm-out span { display: inline-block; font-family: var(--font-display); font-size: clamp(54px, 15vw, 96px); line-height: 1.2; padding: 6px 26px 0; white-space: nowrap;
  color: var(--paper-clip); background: var(--red); border: 5px double var(--paper-clip); outline: 5px solid var(--red); box-shadow: 6px 6px 0 var(--ink); }
.lm-fade { opacity: .25; transition: opacity 240ms; pointer-events: none; }
.lm-bar.lm-reveal { animation: lm-reveal-in 380ms cubic-bezier(.3,1.4,.5,1) both; }
.lm-bar.lm-reveal .lm-missed { animation: r-slam 200ms ease-out both; animation-delay: inherit; }
#result.lm-late { animation: lm-late-in 300ms ease-out both; }
.lm-toast.lost { background: var(--red); color: #fff; }
@keyframes lm-fade-in { from { opacity: 0; } to { opacity: 1; } }
/* reduced motion: no shake, fall or drop; what arrives fades in (opacity only, 150 ms) */
@media (prefers-reduced-motion: reduce) {
  .lm-losing, .lm-losing .tile, .lm-out span { animation: none !important; }
  .lm-bar.lm-reveal, #result.lm-late, .lm-bar.r-fresh { animation: lm-fade-in 150ms linear both !important; animation-delay: 0s !important; }
  .lm-fade { transition: opacity 150ms; }
  .tile, .tile.sel { transition: none; }
  .tile.sel { transform: none; }
}

/* high contrast ("ألوان واضحة", mode.js data-contrast): the four difficulty colours become Okabe-Ito sky blue, orange,
   blue and reddish purple (told apart under every common colour-vision deficiency); the word stays on every chip */
html[data-contrast="high"] body { --lv0: #56B4E9; --lv1: #E69F00; --lv2: #0072B2; --lv3: #CC79A7; }
html[data-contrast="high"] .lm-lv[data-lv="3"] b, html[data-contrast="high"] .lm-hrow i[data-lv="3"] { color: var(--ink); }

/* crest library art (club links): the crest on a paper roundel inside the icon tile; two clubs overlap */
.lm-bar__art.is-crest { background: var(--paper-clip); border-radius: 50%; }
.lm-bar__art .lm-crest { width: 78%; height: 78%; max-width: none; max-height: none; object-fit: contain; filter: none; }
.lm-bar__art.is-pair { display: flex; align-items: center; justify-content: center; }
.lm-bar__art.is-pair .lm-crest { width: 54%; height: 54%; }
.lm-bar__art.is-pair .lm-crest + .lm-crest { margin-inline-start: -10%; }
/* end screen (end.js) inside the back page: Lamma's history and red herring follow it */
.lm-result #endBox:empty { display: none; }
.r-end .lm-extras { margin: 4px 0 14px; }
.r-end .lm-extras .lm-history { margin-top: 6px; }
/* the level chip and the missed tag sit inside the bar (owner rule: nothing past a box edge); after the phone padding rules */
.lm-bar.lm-bar { padding-bottom: 34px; }
.lm-bar.missed.missed { padding-top: 34px; }
/* dual names in the Arabic UI (kit.js dual): Arabic, then the English name smaller in brackets */
.tile > span:has(> .r-dn) { display: block; overflow: visible; }
.tile .r-dn { display: flex; align-items: center; }
.tile .r-dn__en { font-size: max(10px, .78em); line-height: 1.2; }

/* UI sweep C4 (2026-11-16): short phones (<= 680 px tall): the 4th tile row stays above the sticky controls: tiles 56 px with
   4 px gaps, the mistakes stamps on the kicker line, one row of controls (Shuffle | Deselect | Submit). Tile names:
   Arabic 13 px / 1.3 (a long name shows its family name, game.js), the English line 11 px on one line. */
.tile .r-dn__ar { font-size: 13px; line-height: 1.3; }
.tile > span:has(> .r-dn) { width: 100%; min-width: 0; }
.tile .r-dn { flex-direction: column; width: 100%; min-width: 0; }
.tile .r-dn__ar { max-width: 100%; }
.tile .r-dn__en { display: block; width: 100%; min-width: 0; font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) { html[lang="en"] .tile { font-size: 13px; } html[lang="en"] .tile.long { font-size: 12px; } }
@media (max-width: 599px) and (max-height: 680px) {
  .lm-tiles { gap: 4px; }
  .tile { min-height: 56px; padding: 3px 2px; }
  .lm-status { position: relative; margin-bottom: 8px; align-items: flex-end; }
  .lm-status__txt { flex: 1 1 auto; }
  .lm-marks { position: absolute; top: 0; inset-inline-end: 0; display: flex; align-items: center; gap: 6px; padding: 2px 6px; box-shadow: 2px 2px 0 var(--ink); }
  .lm-marks small { font-size: 12px; }
  .lm-marks__row i { width: 15px; height: 15px; } .lm-marks__row { gap: 3px; }
  .lm-marks__row i.used::before, .lm-marks__row i.used::after { height: 15px; }
  .lm-status .r-kicker { min-height: 24px; padding-inline-end: 4px; max-width: calc(100% - 190px); }
  .lm-controls { grid-template-columns: 1fr 1fr 1.2fr; gap: 6px; margin-top: 10px; padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px)); }
  .lm-controls .submit { grid-column: auto; }
  .lm-controls .r-btn { min-height: 48px; font-size: 15px; padding: 0 4px; }
}
/* UI sweep E1: the level tag 14 px */
.lm-lv { font-size: 14px; }
/* P3-fix2 (17): names wrap between words only; game.js fitTiles steps a too-long single word down a size instead
   (.brk: past the 9.5 px floor it may break) */
.tile, .tile .r-dn__ar { overflow-wrap: normal; word-break: normal; }
.tile > span:not(:has(> .r-dn)) { max-width: 100%; }
.tile.brk, .tile.brk .r-dn__ar { overflow-wrap: anywhere; }
@media (max-width: 359px) { .tile, .tile.long { padding-inline: 0; } }   /* 320 px: 4 px more for one long word */
