/* License Plates — Americana. Prefix: pl- */
.pl-col { justify-content: center; gap: 8px; padding: 8px 14px 4px; }
.fa-bar .fa-title.pl-title { white-space: normal; font-size: 1rem; line-height: 1.05; }
@media (max-width: 360px) { .fa-bar .fa-title.pl-title { font-size: 0.86rem; letter-spacing: 0; } }

.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 420px; flex: none; }
.pl-where { color: var(--parchment); font-weight: 700; font-size: 15px; }

/* odometer */
.pl-odo {
  direction: ltr; display: flex; gap: 2px; padding: 4px 5px; border-radius: 7px;
  background: linear-gradient(#060d1b, #0B162B); border: 1px solid rgba(255, 241, 214, 0.28);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7);
}
.pl-reel {
  position: relative; display: block; width: 19px; height: 26px; overflow: hidden; border-radius: 3px;
  background: linear-gradient(#0a0f18, #2a3140 45%, #2a3140 55%, #0a0f18); color: #FFF1D6;
}
.pl-reel.is-last { background: linear-gradient(#b9ac8f, #FFF1D6 45%, #FFF1D6 55%, #b9ac8f); color: #13233F; }
.pl-strip { display: block; transition: transform 0.7s cubic-bezier(0.3, 1.3, 0.5, 1); }
.pl-strip i {
  display: block; height: 26px; line-height: 26px; text-align: center; font-style: normal;
  font: 400 17px/26px var(--font-display); font-variant-numeric: tabular-nums;
}

/* the road is the timer */
.pl-road {
  direction: ltr; position: relative; flex: none; width: 100%; max-width: 420px; height: 24px; border-radius: 12px;
  background: #1b2434; border: 1px solid rgba(255, 241, 214, 0.16); overflow: hidden;
}
.pl-road::before {
  content: ""; position: absolute; left: 10px; right: 30px; top: 50%; height: 2px; margin-top: -1px;
  background: repeating-linear-gradient(90deg, #FFC43D 0 12px, transparent 12px 24px); opacity: 0.75;
}
.pl-flag {
  position: absolute; right: 6px; top: 4px; width: 14px; height: 14px; border-radius: 2px;
  background: conic-gradient(#FFF1D6 25%, #13233F 0 50%, #FFF1D6 0 75%, #13233F 0) 0 0 / 7px 7px;
}
.pl-car { position: absolute; top: 2px; left: 0; width: 40px; height: 20px; margin-left: 2px; transition: left 0.12s linear; }
.pl-car svg { display: block; width: 100%; height: 100%; }
.pl-road.is-late { border-color: #E5383B; animation: pl-late 0.5s steps(2) infinite; }
@keyframes pl-late { 50% { background: #4a1c22; } }

/* the plate */
.pl-slot { flex: 0 1 215px; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.pl-plate {
  --pb: #FFF1D6; --pi: #13233F; --pa: #E5383B;
  direction: ltr; position: relative; flex: none; width: 300px; height: 150px; font-size: 15px;
  border-radius: 1.1em; background: var(--pb); color: var(--pi);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.14));
  box-shadow: 0 0.6em 1.4em rgba(0, 0, 0, 0.45), inset 0 0 0 0.16em rgba(255, 255, 255, 0.5), inset 0 0 0 0.42em var(--pb),
    inset 0 0 0 0.56em var(--pi), inset 0.2em 0.3em 0.5em 0.5em rgba(255, 255, 255, 0.22);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 1em 1em 0.95em;
  user-select: none; -webkit-user-select: none;
}
.pl-state {
  font: 400 1.25em/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--pa);
  text-shadow: 0 0.05em 0 rgba(0, 0, 0, 0.25);
}
.pl-letters { display: flex; gap: 0.16em; font: 400 4.5em/1 var(--font-display); letter-spacing: 0.04em; }
.pl-letters b {
  font-weight: 400; min-width: 0.8em; text-align: center; transition: transform 0.15s, color 0.15s;
  text-shadow: 0 -0.02em 0 rgba(255, 255, 255, 0.55), 0 0.035em 0 rgba(0, 0, 0, 0.45), 0 0.07em 0.06em rgba(0, 0, 0, 0.3);
}
.pl-letters b.is-on { transform: translateY(-0.05em) scale(1.06); color: var(--pa); }
.pl-slogan { font-size: 0.92em; font-weight: 700; font-style: italic; letter-spacing: 0.04em; opacity: 0.85; }
.pl-sticker {
  position: absolute; top: 0.85em; right: 1.05em; width: 1.9em; height: 1.9em; border-radius: 0.3em;
  background: var(--pa); color: var(--pb); font: 400 1.1em/1.9em var(--font-display); text-align: center;
  transform: rotate(4deg); box-shadow: 0 0.06em 0.12em rgba(0, 0, 0, 0.35);
}
.pl-bolt {
  position: absolute; width: 0.75em; height: 0.75em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4f4f4, #8c939e 60%, #4a505a); box-shadow: 0 0.06em 0.1em rgba(0, 0, 0, 0.5);
}
.pl-bolt0 { top: 1.1em; left: 1.3em; } .pl-bolt1 { bottom: 1em; left: 1.3em; } .pl-bolt2 { bottom: 1em; right: 1.3em; }
.pl-bolt3 { display: none; }
.pl-pause {
  display: none; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center;
  font: 400 1.9em/1 var(--font-display); opacity: 0.7;
}
.is-paused .pl-letters { visibility: hidden; }
.is-paused .pl-pause { display: block; }
.pl-plate.is-in { animation: pl-in 0.5s cubic-bezier(0.2, 1.2, 0.4, 1); }
.pl-plate.is-hit { animation: pl-hit 0.3s ease-out; }
@keyframes pl-in { from { transform: translateX(60%) rotate(8deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
@keyframes pl-hit { 40% { transform: scale(1.035) rotate(-0.6deg); } }

/* what you are typing */
.pl-entry {
  direction: ltr; flex: none; display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; max-width: 420px; height: 44px;
}
.pl-hint { direction: inherit; color: var(--mist); font-weight: 650; font-size: 14.5px; text-align: center; }
html[dir="rtl"] .pl-hint, html[dir="rtl"] .pl-also { direction: rtl; }
html[dir="rtl"] .pl-also { order: 9; }
.pl-tile {
  flex: 0 1 34px; min-width: 0; height: 42px; border-radius: 7px; background: var(--lapis-raise); color: var(--parchment);
  border: 1px solid rgba(255, 241, 214, 0.2); font: 400 21px/40px var(--font-display); text-align: center;
  animation: pl-pop 0.12s ease-out;
}
.pl-tile.is-hit { background: var(--gold); color: #13233F; border-color: var(--gold); }
.pl-entry.is-shake { animation: pl-shake 0.3s; }
.pl-also { color: var(--mist); font-weight: 650; font-size: 13.5px; margin: 0 2px; }
.pl-ex {
  padding: 5px 8px; border-radius: 7px; border: 1px dashed rgba(255, 196, 61, 0.6); color: var(--gold-soft);
  font-weight: 800; font-size: 13.5px; letter-spacing: 0.05em; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
@keyframes pl-pop { from { transform: scale(0.7); } }
@keyframes pl-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.pl-note { flex: none; height: 20px; font-weight: 750; font-size: 14px; line-height: 20px; color: var(--mist); text-align: center; }
.pl-note.is-bad { color: #FF8A8C; }
.pl-note.is-good { color: var(--gold); animation: pl-rise 0.4s ease-out; }
@keyframes pl-rise { from { transform: translateY(8px); opacity: 0; } }

.pl-found {
  direction: ltr; flex: none; display: flex; gap: 6px; width: 100%; max-width: 420px; height: 30px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.pl-word {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 0 9px; height: 28px; border-radius: 14px;
  background: rgba(255, 241, 214, 0.1); color: var(--parchment); font-weight: 750; font-size: 13px; letter-spacing: 0.05em;
}
.pl-word small { color: var(--gold); font-size: 12px; font-weight: 800; }
.pl-word.is-new { animation: pl-pop 0.25s ease-out; background: rgba(255, 196, 61, 0.22); }

/* keyboard */
.pl-dock { padding: 4px 4px calc(8px + env(safe-area-inset-bottom, 0px)); }
.pl-keys { direction: ltr; width: 100%; max-width: 520px; display: grid; gap: 6px; touch-action: manipulation; }
.pl-krow { display: flex; justify-content: center; gap: 4px; }
.pl-key {
  flex: 1 1 0; max-width: 46px; min-width: 0; height: 46px; padding: 0; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--lapis-raise); color: var(--parchment); font: 700 17px/1 inherit; font-family: inherit;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pl-key:active { transform: translateY(2px); box-shadow: none; background: var(--ultramarine); }
.pl-key.is-go { flex: 1.6 1 0; max-width: 72px; background: var(--gold); color: #13233F; font-family: var(--font-display); font-weight: 400; }
.pl-key.is-del { flex: 1.6 1 0; max-width: 72px; }
.pl-key svg { width: 24px; height: 24px; vertical-align: middle; }
.pl-key:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

@media (max-height: 600px) {
  .pl-col { gap: 5px; padding-top: 4px; }
  .pl-key { height: 42px; }
  .pl-keys { gap: 5px; }
  .pl-entry { height: 40px; } .pl-tile { height: 38px; line-height: 36px; font-size: 19px; }
}
@media (min-width: 700px) and (min-height: 700px) {
  .pl-col { gap: 14px; padding-top: 18px; }
  .pl-dock { padding-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-plate.is-in, .pl-plate.is-hit, .pl-tile, .pl-note.is-good, .pl-word.is-new, .pl-road.is-late { animation: none; }
  .pl-strip { transition: none; }
}
/* phones on their side: plate on the left, everything else beside it */
@media (orientation: landscape) and (max-height: 500px) {
  .pl-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: min-content; align-content: center; justify-items: center; gap: 4px 16px; padding: 4px 14px; }
  .pl-slot { grid-column: 1; grid-row: 1 / span 5; height: 100%; align-self: stretch; }
  .pl-head, .pl-road, .pl-entry, .pl-note, .pl-found { grid-column: 2; }
  .pl-key { height: 34px; font-size: 15px; }
  .pl-keys { gap: 4px; max-width: 620px; }
  .pl-key, .pl-key.is-go, .pl-key.is-del { max-width: none; }
  .pl-dock { padding-bottom: 6px; min-height: 0; }
  .pl-entry { height: 38px; } .pl-tile { height: 36px; line-height: 34px; font-size: 18px; }
}
@media (orientation: landscape) and (max-height: 340px) {
  .pl-col { gap: 2px 14px; padding: 2px 12px; }
  .pl-road { height: 20px; } .pl-car { top: 0; }
  .pl-note { height: 16px; line-height: 16px; font-size: 13px; }
  .pl-found { height: 26px; } .pl-word { height: 24px; }
  .pl-odo { padding: 2px 4px; } .pl-reel { height: 22px; } .pl-strip i { height: 22px; line-height: 22px; }
}
