/* Lotería — Mexican picture bingo. Everything here is prefixed lo-; colours are the fiesta palette of themes.css. */

.lo-defs { position: absolute; }

/* ---------------------------------------------------------------- stage: bunting, round header, rivals, tabla */

/* Papel picado: five cut-paper flags on a sagging string, repeated across the top. */
.lo-bunting {
  position: absolute;
  top: 0; right: -6px; left: -6px;
  z-index: 1;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 28'%3E%3Cpath d='M0 2.6Q100 8 200 2.6' fill='none' stroke='%23FFF3E0' stroke-opacity='.6'/%3E%3Cpath fill='%23FF3D8B' fill-rule='evenodd' d='M2 3.3h36v13l-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5zM20 5.9l3.6 3.6-3.6 3.6-3.6-3.6zM9 7.3l2.2 2.2-2.2 2.2-2.2-2.2zM31 7.3l2.2 2.2-2.2 2.2-2.2-2.2zM5.3 14.5h2.4v1.6h-2.4zM14.3 14.5h2.4v1.6h-2.4zM23.3 14.5h2.4v1.6h-2.4zM32.3 14.5h2.4v1.6h-2.4z'/%3E%3Cpath fill='%23FFB627' fill-rule='evenodd' d='M42 4.6h36v13l-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5zM60 7.2l3.6 3.6-3.6 3.6-3.6-3.6zM49 8.6l2.2 2.2-2.2 2.2-2.2-2.2zM71 8.6l2.2 2.2-2.2 2.2-2.2-2.2zM45.3 15.8h2.4v1.6h-2.4zM54.3 15.8h2.4v1.6h-2.4zM63.3 15.8h2.4v1.6h-2.4zM72.3 15.8h2.4v1.6h-2.4z'/%3E%3Cpath fill='%2319C9B6' fill-rule='evenodd' d='M82 5h36v13l-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5zM100 7.6l3.6 3.6-3.6 3.6-3.6-3.6zM89 9l2.2 2.2-2.2 2.2-2.2-2.2zM111 9l2.2 2.2-2.2 2.2-2.2-2.2zM85.3 16.2h2.4v1.6h-2.4zM94.3 16.2h2.4v1.6h-2.4zM103.3 16.2h2.4v1.6h-2.4zM112.3 16.2h2.4v1.6h-2.4z'/%3E%3Cpath fill='%23B5E61D' fill-rule='evenodd' d='M122 4.6h36v13l-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5zM140 7.2l3.6 3.6-3.6 3.6-3.6-3.6zM129 8.6l2.2 2.2-2.2 2.2-2.2-2.2zM151 8.6l2.2 2.2-2.2 2.2-2.2-2.2zM125.3 15.8h2.4v1.6h-2.4zM134.3 15.8h2.4v1.6h-2.4zM143.3 15.8h2.4v1.6h-2.4zM152.3 15.8h2.4v1.6h-2.4z'/%3E%3Cpath fill='%237B3FBF' fill-rule='evenodd' d='M162 3.3h36v13l-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5-4.5 4.5-4.5-4.5zM180 5.9l3.6 3.6-3.6 3.6-3.6-3.6zM169 7.3l2.2 2.2-2.2 2.2-2.2-2.2zM191 7.3l2.2 2.2-2.2 2.2-2.2-2.2zM165.3 14.5h2.4v1.6h-2.4zM174.3 14.5h2.4v1.6h-2.4zM183.3 14.5h2.4v1.6h-2.4zM192.3 14.5h2.4v1.6h-2.4z'/%3E%3C/svg%3E") repeat-x 50% 0 / 200px 28px;
  pointer-events: none;
  transform-origin: 50% 0;
  animation: lo-sway 4.6s ease-in-out infinite;
}
@keyframes lo-sway { 0%, 100% { transform: skewX(-4deg); } 50% { transform: skewX(4deg); } }

.lo-wrap {
  --top-h: 90px;
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 560px;
  margin: 0 auto;
  padding: 27px 8px 2px;
}
.lo-top { position: relative; flex: none; height: var(--top-h); }
.lo-pick,
.lo-caller { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; }
.lo-pick[hidden],
.lo-caller[hidden],
.lo-ready[hidden],
.lo-shout[hidden] { display: none; }

/* ---------------------------------------------------------------- before the round: the four patterns */
.lo-pick { flex-direction: column; gap: 5px; }
.lo-pats { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.lo-pat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 2px;
  border: 0;
  border-radius: 12px;
  background: var(--lapis-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--parchment);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
}
.lo-pat .lo-es { white-space: normal; }
.lo-pat[aria-pressed="true"] { background: var(--gold); box-shadow: none; color: var(--lapis); }
.lo-hint {
  flex: none;
  overflow: hidden;
  color: var(--mist);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The tiny 4 x 4 diagram of a pattern. */
.lo-diag {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2px;
  width: calc(var(--top-h) * 0.3);
  height: calc(var(--top-h) * 0.3);
  direction: ltr;
}
.lo-diag i { border-radius: 2px; background: rgba(255, 243, 224, 0.2); transition: background-color 0.2s linear; }
.lo-diag i.is-on { background: var(--w-pink); }
.lo-pat[aria-pressed="true"] .lo-diag i { background: rgba(42, 15, 61, 0.2); }
.lo-pat[aria-pressed="true"] .lo-diag i.is-on { background: var(--lapis); }

/* ---------------------------------------------------------------- during the round: the cantor */
.lo-caller { gap: 9px; align-items: stretch; }
.lo-cantor { position: relative; flex: none; width: calc(var(--top-h) * 0.7); perspective: 520px; }
.lo-cantor::before {
  content: "";
  position: absolute;
  top: 3px; right: -3px; bottom: 5px; left: 3px;
  border-radius: 9px;
  background: var(--w-purple);
  box-shadow: inset 0 0 0 2px rgba(255, 182, 39, 0.55);
}
.lo-turn { position: absolute; top: 0; right: 0; bottom: 8px; left: 0; transform-style: preserve-3d; }
.lo-turn.is-back { transform: rotateY(180deg); }
.lo-turn.is-flip { animation: lo-flip 0.55s cubic-bezier(0.45, 0, 0.3, 1.35) both; }
.lo-turn > .lo-face,
.lo-turn > .lo-back { position: absolute; top: 0; right: 0; bottom: 0; left: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.lo-back {
  border: 3px solid var(--w-marigold);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 50%, var(--w-pink) 0 15%, var(--w-marigold) 16% 21%, transparent 22%),
    repeating-linear-gradient(45deg, rgba(255, 182, 39, 0.3) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(25, 201, 182, 0.3) 0 2px, transparent 2px 9px),
    var(--w-purple);
  transform: rotateY(180deg);
}
@keyframes lo-flip {
  from { transform: rotateY(180deg) scale(0.92); }
  to { transform: rotateY(0) scale(1); }
}
.lo-face {
  --em: calc(var(--top-h) * 0.36);
  --fs-es: calc(var(--top-h) * 0.098);
  --fs-tr: calc(var(--top-h) * 0.08);
  --fs-num: calc(var(--top-h) * 0.085);
}
.lo-timer { position: absolute; right: 1px; bottom: 0; left: 1px; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255, 243, 224, 0.16); }
.lo-timer i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transform-origin: 0 50%; }
[dir="rtl"] .lo-timer i { transform-origin: 100% 50%; }

.lo-call { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.lo-call__name { display: flex; align-items: baseline; gap: 7px; min-width: 0; line-height: 1.15; white-space: nowrap; }
.lo-call__name b { flex: none; color: var(--gold); font-family: var(--font-display); font-size: calc(var(--top-h) * 0.18); font-weight: 400; }
.lo-call__name span { min-width: 0; overflow: hidden; color: var(--parchment); font-size: calc(var(--top-h) * 0.125); font-weight: 600; text-overflow: ellipsis; }
.lo-call__line {
  display: -webkit-box;
  overflow: hidden;
  color: var(--mist);
  font-size: calc(var(--top-h) * 0.13);
  font-style: italic;
  line-height: 1.22;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
html[lang="ar"] .lo-call__line { font-style: normal; }
.lo-strip { display: flex; gap: 4px; }
.lo-mini {
  --em: calc(var(--top-h) * 0.19);
  flex: 0 1 calc(var(--top-h) * 0.33);
  min-width: 0;
  height: calc(var(--top-h) * 0.31);
  padding: 0;
  border-width: 2px;
  border-radius: 6px;
}
.lo-mini .lo-num,
.lo-mini .lo-es,
.lo-mini .lo-tr { display: none; }
.lo-mini.is-empty { border: 1.5px dashed rgba(255, 243, 224, 0.22); background: none; }
.lo-mini.is-new { animation: kit-pop 0.3s var(--ease-out) both; }

.lo-goal {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: calc(var(--top-h) * 0.52);
  text-align: center;
}
.lo-goal .lo-diag { width: calc(var(--top-h) * 0.36); height: calc(var(--top-h) * 0.36); }
.lo-goal__name { color: var(--gold-soft); font-size: 9.5px; font-weight: 700; line-height: 1.1; white-space: normal; }
.lo-count { margin-top: auto; color: var(--mist); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; direction: ltr; }

/* ---------------------------------------------------------------- the three relatives */
.lo-rivals { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.lo-rival {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 3px 8px 3px 4px;
  border-radius: 12px;
  background: var(--lapis-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: box-shadow 0.25s linear;
}
[dir="rtl"] .lo-rival { padding: 3px 4px 3px 8px; }
.lo-ava { flex: none; display: block; width: 26px; height: 26px; overflow: hidden; border-radius: 50%; }
.lo-ava svg { width: 100%; height: 100%; }
.lo-rival__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lo-rival__name { overflow: hidden; font-size: 10.5px; font-weight: 700; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; }
.lo-pips { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 2px; direction: ltr; }
.lo-pips i { height: 5px; border-radius: 3px; background: rgba(255, 243, 224, 0.2); transition: background-color 0.25s linear; }
.lo-pips i.is-on { background: var(--w-turquoise); }
.lo-rival.is-close { box-shadow: inset 0 0 0 1.5px var(--w-marigold); }
.lo-rival.is-close .lo-pips i.is-on { background: var(--w-marigold); }
.lo-rival.is-full { box-shadow: inset 0 0 0 2px var(--w-pink), 0 0 14px rgba(255, 61, 139, 0.6); animation: lo-nervous 0.3s ease-in-out infinite alternate; }
.lo-rival.is-full .lo-pips i.is-on { background: var(--w-pink); }
@keyframes lo-nervous { from { transform: translateY(1px); } to { transform: translateY(-2px); } }

/* ---------------------------------------------------------------- the tabla and its cards */
.lo-board { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lo-tabla {
  display: grid;
  grid-template-columns: repeat(4, var(--cw, 68px));
  grid-auto-rows: var(--ch, 62px);
  gap: var(--gap, 4px);
  padding: var(--gap, 4px);
  border-radius: 14px;
  background: var(--lapis-deep);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 12px 28px rgba(0, 0, 0, 0.32);
  direction: ltr;
}
.lo-card {
  --c: #FF3D8B;
  --n: #2A0F3D;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: 0 1px 2px;
  border: 3px solid var(--c);
  border-radius: 9px;
  background: linear-gradient(180deg, #FFF9EE 0%, #FCE8CA 100%);
  color: #2A0F3D;
  font-family: var(--font-text);
  line-height: 1;
  text-align: center;
}
.lo-card.c1 { --c: #FFB627; }
.lo-card.c2 { --c: #19C9B6; }
.lo-card.c3 { --c: #B5E61D; }
.lo-card.c4 { --c: #7B3FBF; --n: #FFF3E0; }
.lo-num {
  position: absolute;
  top: -1px; left: -1px;
  min-width: 1.75em;
  padding: 0.1em 0.3em 0.16em;
  border-radius: 5px 0 0.75em 0;
  background: var(--c);
  color: var(--n);
  font-size: var(--fs-num, 9px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.lo-pic {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  font-size: var(--em, 30px);
  line-height: 1.2;
}
.lo-es { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.lo-card .lo-es { max-width: 100%; overflow: hidden; font-size: var(--fs-es, 10px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.18; }
.lo-tr { max-width: 100%; overflow: hidden; color: #7A5488; font-size: var(--fs-tr, 9px); font-weight: 600; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.lo-tabla:not(.is-roomy) .lo-sq .lo-tr { display: none; }

.lo-sq { cursor: pointer; touch-action: manipulation; transition: transform 0.12s var(--ease-out); }
.lo-sq:active { transform: scale(0.95); }
.lo-sq:focus-visible { outline: 3px solid var(--parchment); outline-offset: 1px; }
.lo-sq.is-marked { z-index: 1; }
.lo-tabla.is-deal > .lo-sq { animation: kit-pop 0.34s var(--ease-out) backwards; animation-delay: calc(var(--i) * 22ms); }
.lo-tabla > .lo-sq.lo-no,
.lo-shout.lo-no { animation: kit-shake 0.32s linear; }
.lo-card.is-win { z-index: 2; box-shadow: 0 0 0 3px var(--gold), 0 0 16px 3px rgba(255, 182, 39, 0.85); }
.lo-tabla > .lo-sq.is-win { animation: lo-win 0.45s ease-in-out infinite alternate; }
@keyframes lo-win { from { transform: scale(1); } to { transform: scale(1.07); } }

/* A glossy pinto bean. */
.lo-bean {
  position: absolute;
  top: 50%; left: 50%;
  width: calc(var(--em, 30px) * 0.78);
  height: calc(var(--em, 30px) * 0.54);
  margin: calc(var(--em, 30px) * -0.36) 0 0 calc(var(--em, 30px) * -0.39);
  border-radius: 56% 44% 48% 52% / 62% 60% 40% 38%;
  background:
    radial-gradient(ellipse 30% 22% at 30% 26%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 58% 30%, #8C4A2B 0 6%, transparent 7.5%),
    radial-gradient(circle at 77% 52%, #8C4A2B 0 5%, transparent 6.5%),
    radial-gradient(circle at 45% 63%, #7A3F24 0 7%, transparent 8.5%),
    radial-gradient(circle at 22% 57%, #9A5A36 0 4.5%, transparent 6%),
    radial-gradient(circle at 64% 77%, #9A5A36 0 4%, transparent 5.5%),
    radial-gradient(circle at 36% 41%, #9A5A36 0 3.5%, transparent 5%),
    radial-gradient(ellipse at 42% 34%, #F3DCBB 0%, #D9B286 55%, #A26F44 100%);
  box-shadow: 0 2px 4px rgba(42, 15, 61, 0.55), inset 0 -2px 3px rgba(96, 54, 22, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  pointer-events: none;
  transform: rotate(var(--r, -20deg));
}
.lo-bean.is-drop { animation: lo-drop 0.46s cubic-bezier(0.3, 0.6, 0.4, 1) both; }
@keyframes lo-drop {
  0% { opacity: 0; transform: translateY(-190%) rotate(calc(var(--r, -20deg) - 40deg)) scale(1.25); }
  20% { opacity: 1; }
  58% { transform: translateY(0) rotate(var(--r, -20deg)) scale(1); }
  76% { transform: translateY(-24%) rotate(calc(var(--r, -20deg) + 6deg)) scale(1); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--r, -20deg)) scale(1); }
}

/* ---------------------------------------------------------------- dock: speed, new tabla, start · the shout */
.lo-ready { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.lo-start { flex: 1 1 auto; max-width: 260px; min-height: 52px; }
.lo-start.lo-no { animation: kit-pop 0.3s var(--ease-out); }
.lo-gauge { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 22px; direction: ltr; }
.lo-gauge i { width: 5px; border-radius: 2px; background: currentColor; opacity: 0.28; }
.lo-gauge i:nth-child(1) { height: 9px; }
.lo-gauge i:nth-child(2) { height: 15px; }
.lo-gauge i:nth-child(3) { height: 21px; }
.lo-gauge[data-n="1"] i:nth-child(1),
.lo-gauge[data-n="2"] i:nth-child(-n+2),
.lo-gauge[data-n="3"] i { opacity: 1; }

.lo-shout {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 440px;
  min-height: 56px;
  padding: 7px 20px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--lapis-raise);
  box-shadow: inset 0 0 0 2px rgba(255, 182, 39, 0.55);
  color: var(--gold-soft);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s linear, color 0.2s linear;
}
.lo-shout__txt { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.02em; line-height: 1; opacity: 0.7; }
/* Arabic falls back to the phone's own face: keep the "!" in that face too, not in the heavy display font. */
html[lang="ar"] .lo-shout__txt,
html[lang="ar"] .lo-banner,
html[lang="ar"] .kit-result .fa-panel__title { font-family: var(--font-text); font-weight: 800; letter-spacing: 0; }
.lo-shout .lo-pips { width: min(62%, 160px); }
.lo-shout .lo-pips i.is-on { background: var(--gold); }
.lo-shout.is-ready {
  background: linear-gradient(180deg, #FFD166 0%, #FFB627 100%);
  color: #2A0F3D;
  animation: lo-ready 0.85s ease-in-out infinite;
}
.lo-shout.is-won { background: linear-gradient(180deg, #FFD166 0%, #FFB627 100%); color: #2A0F3D; }
.lo-shout.is-ready .lo-shout__txt,
.lo-shout.is-won .lo-shout__txt { opacity: 1; }
.lo-shout.is-ready .lo-pips i.is-on,
.lo-shout.is-won .lo-pips i.is-on { background: var(--w-pink); }
@keyframes lo-ready {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 61, 139, 0.9), 0 6px 20px rgba(255, 182, 39, 0.4); }
  55% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(255, 61, 139, 0), 0 6px 26px rgba(255, 182, 39, 0.7); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 61, 139, 0), 0 6px 20px rgba(255, 182, 39, 0.4); }
}

/* ---------------------------------------------------------------- the call: a stamp across the table */
.lo-banner {
  position: absolute;
  top: 46%; left: 50%;
  z-index: 4;
  padding: 0.12em 0.45em 0.2em;
  border-radius: 0.35em;
  background: var(--w-pink);
  box-shadow: 0 0 0 4px var(--w-marigold), 0 0 0 8px var(--w-turquoise), 0 18px 40px rgba(0, 0, 0, 0.5);
  color: #FFF3E0;
  font-family: var(--font-display);
  font-size: clamp(34px, 12.5vw, 84px);
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 0.06em 0 #7B3FBF;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-6deg);
  animation: lo-banner 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.lo-banner small { display: block; margin-bottom: 0.15em; font-family: var(--font-text); font-size: 0.34em; font-weight: 800; letter-spacing: 0.02em; text-shadow: none; }
.lo-banner.is-rival { background: var(--w-purple); box-shadow: 0 0 0 4px var(--w-turquoise), 0 18px 40px rgba(0, 0, 0, 0.5); font-size: clamp(28px, 10vw, 64px); text-shadow: 0 0.06em 0 #1B0829; }
@keyframes lo-banner {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scale(0.3); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1); }
}

/* The winner's tabla on the result panel. */
.lo-won { display: inline-grid; grid-template-columns: repeat(4, 46px); grid-auto-rows: 44px; gap: 4px; padding: 5px; box-shadow: inset 0 0 0 1px var(--hairline); }
.lo-won .lo-mini { --em: 24px; height: auto; opacity: 0.5; }
.lo-won .lo-mini.is-marked { opacity: 1; }
.fa-panel__art .lo-ava { width: 68px; height: 68px; box-shadow: 0 0 0 3px var(--gold); }

/* ---------------------------------------------------------------- sizes */
@media (max-width: 359px) {
  .lo-kin { display: none; }
  /* room for the whole name next to two chips */
  .fa-title { font-size: 0.94rem; }
  .fa-scores { gap: 4px; }
  .fa-chip { min-width: 46px; padding: 4px 5px 3px; }
  .fa-chip__label { letter-spacing: 0.04em; }
}
@media (max-width: 419px) { html[lang="ar"] .lo-kin { display: none; } }
@media (max-height: 620px) and (orientation: portrait) {
  .lo-bunting { height: 22px; background-size: 157px 22px; }
  .lo-wrap { padding-top: 21px; }
}
@media (max-height: 720px) {
  /* keep "Play again" in reach on short screens: no portrait, a smaller headline and tabla on the result */
  .kit-result .fa-panel__art { display: none; }
  .kit-result .fa-panel__title { font-size: 1.5rem; }
  .lo-won { grid-template-columns: repeat(4, 36px); grid-auto-rows: 34px; }
  .lo-won .lo-mini { --em: 19px; }
}
@media (min-height: 700px) and (min-width: 360px) {
  .lo-wrap { --top-h: 112px; gap: 8px; }
  .lo-call__name { flex-direction: column; align-items: flex-start; gap: 0; }
  .lo-call__name span { max-width: 100%; }
  .lo-pat { font-size: 11px; }
  .lo-hint { font-size: 12.5px; }
  .lo-goal__name { font-size: 10.5px; }
  .lo-rival { min-height: 38px; }
  .lo-ava { width: 30px; height: 30px; }
  .lo-rival__name { font-size: 11.5px; }
  .lo-pips i { height: 6px; }
}
@media (min-height: 800px) and (min-width: 380px) { .lo-wrap { --top-h: 126px; } }
@media (min-height: 900px) and (min-width: 540px) {
  .lo-wrap { --top-h: 150px; gap: 10px; }
  .lo-pat { font-size: 13px; }
  .lo-hint { font-size: 14px; }
  .lo-goal__name { font-size: 12px; }
  .lo-count { font-size: 13px; }
}
@media (orientation: landscape) {
  .lo-wrap {
    --top-h: 96px;
    display: grid;
    /* the tabla is only as wide as the height lets it be; the cantor and the relatives get the rest of the row */
    grid-template-columns: minmax(236px, 36%) minmax(0, 1fr);
    grid-template-columns: minmax(236px, 1fr) minmax(0, min(62%, calc((100vh - 136px) * 1.3 + 24px)));
    grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
    gap: 8px 14px;
    max-width: 1000px;
    padding: 22px 10px 2px;
  }
  .lo-bunting { height: 22px; background-size: 157px 22px; }
  .lo-top { grid-column: 1; grid-row: 2; }
  .lo-rivals { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr); }
  .lo-board { grid-column: 2; grid-row: 1 / span 4; }
  .lo-call__name { flex-direction: row; align-items: baseline; gap: 7px; }
}
/* A small phone on its side: the relatives sit in one row, and the smallest screens give up the bunting. */
@media (orientation: landscape) and (max-height: 380px) {
  .lo-wrap { --top-h: 84px; gap: 6px 12px; padding-top: 17px; }
  .lo-bunting { height: 16px; background-size: 114px 16px; }
  .lo-rivals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lo-kin { display: none; }
}
@media (orientation: landscape) and (max-height: 340px) {
  .lo-wrap { padding-top: 4px; }
  .lo-bunting { display: none; }
}
@media (orientation: landscape) and (min-height: 620px) {
  .lo-wrap { --top-h: 138px; grid-template-columns: minmax(236px, 42%) minmax(0, 1fr); gap: 12px 22px; padding-top: 30px; }
  .lo-bunting { height: 28px; background-size: 200px 28px; }
  .lo-call__name { flex-direction: column; align-items: flex-start; gap: 0; }
  .lo-pat { font-size: 12px; }
  .lo-hint { font-size: 13.5px; }
  .lo-goal__name { font-size: 11.5px; }
  .lo-count { font-size: 13px; }
  .lo-rival { min-height: 50px; gap: 10px; padding: 6px 14px 6px 8px; }
  [dir="rtl"] .lo-rival { padding: 6px 8px 6px 14px; }
  .lo-ava { width: 36px; height: 36px; }
  .lo-rival__name { font-size: 13.5px; }
  .lo-pips i { height: 7px; }
  .lo-rival__txt { gap: 6px; }
}
