/* Letter Landslide. Everything is prefixed ll- and lives inside .ll (the play fragment). */
.ll { position: relative; --ll-glow: #55d6ff; --ll-bw: 360px; color: #dfe9ff; font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0 auto; min-height: 430px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.ll [hidden] { display: none !important; }
.ll *, .ll *::before, .ll *::after { box-sizing: border-box; }
:where(.ll) button { color: inherit; }
.ll button { font: inherit; cursor: pointer; margin: 0; }
.ll button:disabled { cursor: default; }
.ll button:focus-visible, .ll-cv:focus-visible, .ll-sheet:focus-visible { outline: 2px solid #55d6ff; outline-offset: 2px; }
.ll svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ll-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ll[data-imm="1"] { display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.ll[data-imm="1"] > section { margin-block: auto; }

/* buttons */
.ll-btn { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #1c2b4a; background: #0f1a36; color: #dfe9ff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.ll-btn:hover:not(:disabled) { border-color: #2f4674; background: #13224a; }
.ll-btn:disabled { opacity: 0.45; }
.ll-btn-primary { background: linear-gradient(#ffe08a, #ffd166); border-color: #ffd166; color: #2a1b00; }
.ll-btn-primary:hover:not(:disabled) { background: linear-gradient(#ffe9a8, #ffd97f); border-color: #ffe08a; }
.ll-ibtn { width: 44px; min-width: 44px; height: 40px; border-radius: 10px; border: 1px solid #1c2b4a; background: #0f1a36; display: inline-grid; place-items: center; padding: 0; }
.ll-ibtn:hover:not(:disabled) { border-color: #2f4674; background: #13224a; }
.ll-ibtn:disabled { opacity: 0.4; }
.ll [aria-pressed="true"] .ll-cross, .ll [aria-pressed="false"] .ll-wave { display: none; }

/* ---------- menu ---------- */
.ll-home { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 6px 12px; width: 100%; max-width: 520px; margin-inline: auto; }
.ll-hero { display: flex; gap: 4px; padding-top: 4px; }
.ll-hero span { width: 34px; height: 38px; border-radius: 8px; background: linear-gradient(#f3dfb8, #dcc194); box-shadow: 0 4px 0 #9c7f52; color: #2c1c0b; font-weight: 800; font-size: 22px; display: grid; place-items: center; animation: ll-drop 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) backwards; }
.ll-hero span:nth-child(1) { animation-delay: 0.02s; } .ll-hero span:nth-child(2) { animation-delay: 0.1s; transform: rotate(-3deg); } .ll-hero span:nth-child(3) { animation-delay: 0.06s; }
.ll-hero span:nth-child(4) { animation-delay: 0.16s; transform: rotate(2deg) translateY(2px); background: linear-gradient(#ffb08a, #ff8a5c); box-shadow: 0 4px 0 #b3401f; } .ll-hero span:nth-child(5) { animation-delay: 0.04s; }
.ll-hero span:nth-child(6) { animation-delay: 0.2s; transform: rotate(-2deg); } .ll-hero span:nth-child(7) { animation-delay: 0.12s; background: linear-gradient(#a5ecff, #6fe0ff); box-shadow: 0 4px 0 #1f86b3; }
.ll-hero span:nth-child(8) { animation-delay: 0.24s; transform: rotate(3deg) translateY(1px); } .ll-hero span:nth-child(9) { animation-delay: 0.18s; background: linear-gradient(#ffeeb4, #ffe08a); box-shadow: 0 4px 0 #c08a1e; }
@keyframes ll-drop { from { translate: 0 -46px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.ll-pitch { margin: 0; text-align: center; color: #8aa3c4; max-width: 34ch; }
.ll-play { width: 100%; min-height: 68px; border: 0; border-radius: 16px; background: linear-gradient(#ffe08a, #ffd166); color: #2a1b00; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-shadow: 0 5px 0 #b98a23, 0 14px 30px rgba(255, 209, 102, 0.18); }
.ll-play:hover { background: linear-gradient(#ffe9a8, #ffd97f); }
.ll-play:active { translate: 0 3px; box-shadow: 0 2px 0 #b98a23; }
.ll-play-main { font-size: 23px; font-weight: 800; line-height: 1.1; }
.ll-play-sub { font-size: 13px; font-weight: 600; opacity: 0.8; }
.ll-diffrow { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ll-seg { display: flex; width: 100%; background: #0b1328; border: 1px solid #1c2b4a; border-radius: 12px; padding: 3px; gap: 3px; }
.ll-segbtn { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #8aa3c4; font-weight: 700; }
.ll-segbtn:hover { color: #dfe9ff; }
.ll-segbtn[aria-checked="true"] { background: #55d6ff; color: #04121c; }
.ll-note { margin: 0; font-size: 13px; color: #8aa3c4; text-align: center; min-height: 18px; }
.ll-modes { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ll-modewrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ll-mode { flex: 1; width: 100%; min-height: 70px; text-align: left; background: #0b1328; border: 1px solid #1c2b4a; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.ll-mode:hover { border-color: #2f4674; background: #0e1833; }
.ll-mode b { font-size: 15px; }
.ll-mode span { font-size: 12.5px; color: #8aa3c4; line-height: 1.3; }
.ll-dailybest { font-size: 12px; color: #8aa3c4; padding-left: 4px; }
.ll-dailybest:empty { display: none; }
.ll-homefoot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- journey map ---------- */
.ll-map { width: 100%; max-width: 780px; margin-inline: auto; padding: 6px 2px 10px; }
.ll-maphead { display: flex; align-items: center; gap: 10px; }
.ll-maptitle { flex: 1; font-size: 18px; font-weight: 800; }
.ll-mapstars { font-weight: 800; color: #ffd166; font-variant-numeric: tabular-nums; }
.ll-stratum { margin-top: 10px; border: 1px solid #1c2b4a; border-radius: 14px; background: #0b1328; padding: 10px 10px 12px; border-left: 4px solid var(--c, #55d6ff); }
.ll-stratum.is-locked { opacity: 0.55; }
.ll-stratumhead { display: flex; align-items: baseline; gap: 8px; }
.ll-stratumname { font-weight: 800; flex: 1; }
.ll-stratumstars { font-size: 13px; color: #ffd166; font-variant-numeric: tabular-nums; }
.ll-stratumblurb { font-size: 13px; color: #8aa3c4; margin-top: 1px; }
.ll-levels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.ll[data-w="wide"] .ll-levels { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.ll-lv { position: relative; min-height: 48px; border-radius: 10px; border: 0; background: var(--t, #dcc194); color: var(--i, #2c1c0b); box-shadow: 0 3px 0 var(--e, #9c7f52); font-weight: 800; font-size: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; padding: 2px 0 0; }
.ll-lv:hover:not(:disabled) { filter: brightness(1.08); }
.ll-lv:disabled { background: #18233f; color: #5b6f91; box-shadow: 0 3px 0 #0e1730; }
.ll-lv small { font-size: 10px; letter-spacing: 1px; height: 12px; opacity: 0.9; }
.ll-lv.is-next { outline: 2px solid #ffd166; outline-offset: 2px; }
.ll-lv.is-clock::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; opacity: 0.7; }

/* ---------- the game ---------- */
.ll-game { display: grid; gap: 8px; justify-content: center; align-content: start; grid-template-columns: minmax(var(--ll-bw), 340px); grid-template-areas: "hud" "word" "board" "bar"; }
.ll[data-layout="wide"] .ll-game { grid-template-columns: var(--ll-bw) minmax(230px, 300px); grid-template-rows: auto auto 1fr auto; grid-template-areas: "word hud" "board hud" "board side" "board bar"; column-gap: 16px; }
.ll[data-layout="short"] .ll-game { grid-template-columns: var(--ll-bw) minmax(210px, 330px); grid-template-rows: auto auto 1fr auto; grid-template-areas: "board hud" "board word" "board ." "board bar"; column-gap: 12px; gap: 6px 12px; }
.ll-hud { grid-area: hud; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ll-hudtop { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.ll[data-compact="1"] .ll-titles, .ll[data-compact="1"] .ll-aux { display: none; }
.ll[data-compact="1"] .ll-hud { flex-direction: row; align-items: stretch; }
.ll[data-compact="1"] .ll-stats { flex: 1; }
.ll[data-compact="1"] .ll-hudtop { align-items: stretch; }
.ll[data-compact="1"] .ll-ibtn#ll-menu { height: auto; min-height: 44px; }
.ll-titles { flex: 1; min-width: 0; }
.ll-title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-sub { color: #8aa3c4; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-aux { text-align: right; flex: none; }
.ll-auxtop { font-weight: 800; font-size: 15px; white-space: nowrap; }
.ll-auxtop .ll-st { color: #2b3a5c; font-size: 18px; letter-spacing: 1px; transition: color 0.25s; }
.ll-auxtop .ll-st.on { color: #ffd166; text-shadow: 0 0 10px rgba(255, 209, 102, 0.55); }
.ll-auxsub { color: #8aa3c4; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ll-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ll-stat { background: #0b1328; border: 1px solid #1c2b4a; border-radius: 10px; padding: 4px 9px 5px; min-width: 0; display: flex; flex-direction: column; position: relative; }
.ll-k { font-size: 10.5px; color: #8aa3c4; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.ll-stat b { font-size: 20px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ll-stat.is-low b { color: #ff6b81; }
.ll-stat.is-bump b { animation: ll-bump 0.3s; }
@keyframes ll-bump { 40% { transform: scale(1.18); color: #ffd166; } }
.ll-pips { display: flex; gap: 3px; margin-top: 2px; height: 4px; }
.ll-pips i { flex: 1; max-width: 26px; border-radius: 2px; background: #1c2b4a; }
.ll-pips i.on { background: var(--ll-glow); box-shadow: 0 0 6px var(--ll-glow); }
.ll-word { grid-area: word; display: flex; align-items: center; gap: 6px; height: 46px; background: #0b1328; border: 1px solid #1c2b4a; border-radius: 12px; padding: 2px 3px; min-width: 0; }
.ll-wordtext { flex: 1; min-width: 0; max-height: 40px; text-align: center; font-weight: 800; font-size: 22px; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-wordtext small { font-size: 13px; letter-spacing: 0; margin-left: 8px; color: #ffd166; font-weight: 700; }
.ll-wordtext[data-state="idle"], .ll-wordtext[data-state="note"] { font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: #8aa3c4; white-space: normal; line-height: 1.2; }
.ll-wordtext[data-state="note"] { color: #ffd166; font-weight: 600; }
.ll-wordtext[data-state="ok"] { color: #7dff9b; }
.ll-wordtext[data-state="bad"] { color: #ff6b81; animation: ll-shake 0.28s; }
.ll-wordtext[data-state="done"] { color: #ffd166; }
@keyframes ll-shake { 20% { transform: translateX(-5px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
.ll-go:not(:disabled) { background: #1d6b3b; border-color: #3ee07a; color: #eafff0; }
.ll-boardwrap { grid-area: board; position: relative; display: grid; place-items: start center; min-width: 0; }
.ll-cv { display: block; touch-action: none; outline: none; border-radius: 14px; cursor: pointer; transition: filter 0.2s; }
.ll[data-hide="1"] .ll-cv { filter: blur(18px) brightness(0.55); }
.ll-banner { position: absolute; left: 50%; top: 40%; translate: -50% -50%; scale: 0.7; opacity: 0; pointer-events: none; font-weight: 900; font-size: 34px; line-height: 1.05; text-align: center; color: #fff3c4; text-shadow: 0 2px 0 rgba(4, 6, 15, 0.9), 0 0 22px rgba(255, 209, 102, 0.75); transition: opacity 0.2s, scale 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); white-space: nowrap; padding: 12px 22px 13px; border-radius: 18px; background: rgba(6, 10, 24, 0.9); border: 1px solid rgba(255, 209, 102, 0.4); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55); max-width: 94%; }
.ll-banner small { display: block; font-size: 15px; font-weight: 700; color: #dfe9ff; margin-top: 5px; white-space: nowrap; text-shadow: none; }
.ll-banner.on { opacity: 1; scale: 1; }
.ll-bar { grid-area: bar; display: flex; gap: 6px; align-items: stretch; min-height: 48px; min-width: 0; }
.ll-tool { padding: 0 10px; gap: 5px; min-height: 48px; font-size: 14px; }
.ll-tool i { font-style: normal; font-size: 12px; min-width: 18px; height: 18px; border-radius: 9px; background: #ffd166; color: #2a1b00; display: inline-grid; place-items: center; font-weight: 800; }
.ll-bar .ll-ibtn { height: auto; min-height: 48px; }
.ll-slide { flex: 1; min-width: 0; position: relative; overflow: hidden; border-radius: 12px; border: 1px solid #1c2b4a; background: #0b1328; color: #8aa3c4; font-weight: 800; min-height: 48px; padding: 0 6px; transition: color 0.3s; }
.ll-slide:disabled { opacity: 1; }
.ll-meterfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #7a3f1e, #d9773c); opacity: 0.6; transition: width 0.35s; }
.ll-slide span { position: relative; white-space: nowrap; }
.ll-slide.is-ready { color: #2a1200; border-color: #ffd166; animation: ll-ready 1.1s infinite; }
.ll-slide.is-ready .ll-meterfill { opacity: 1; background: linear-gradient(90deg, #ffb347, #ffd166); }
/* The Landslide button always keeps its whole label. It is two rows beside the board: the meter on top, the tools under it. */
.ll[data-layout="wide"] .ll-bar { flex-wrap: wrap; }
.ll[data-layout="wide"] .ll-slide { flex: 1 0 100%; order: -1; }
.ll[data-layout="wide"] .ll-tool { flex: 1 1 0; }
/* Under the board and on a phone held sideways, the two tools shrink to their icons while the Hint button is showing. */
.ll-tool { position: relative; }
.ll:not([data-layout="wide"]) #ll-hint:not([hidden]) > span, .ll:not([data-layout="wide"]) #ll-hint:not([hidden]) + .ll-tool > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ll:not([data-layout="wide"]) #ll-hint:not([hidden]), .ll:not([data-layout="wide"]) #ll-hint:not([hidden]) + .ll-tool { min-width: 48px; padding: 0 9px; }
@keyframes ll-ready { 50% { box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.28); } }
.ll-side { grid-area: side; display: none; flex-direction: column; min-height: 0; background: #0b1328; border: 1px solid #1c2b4a; border-radius: 12px; padding: 10px 12px; overflow: hidden; }
.ll[data-layout="wide"] .ll-side { display: flex; }
.ll-sidehead { font-size: 11px; color: #8aa3c4; text-transform: uppercase; letter-spacing: 0.05em; }
.ll-log { list-style: none; margin: 6px 0 0; padding: 0; flex: 1 1 0; min-height: 60px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.ll-log li { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; letter-spacing: 0.04em; }
.ll-log li span { color: #ffd166; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ll-log li:first-child { color: #7dff9b; }
.ll-log .ll-logempty { color: #8aa3c4; font-weight: 500; letter-spacing: 0; }
.ll-sidekeys { margin: 8px 0 0; font-size: 12px; color: #8aa3c4; line-height: 1.4; border-top: 1px solid #1c2b4a; padding-top: 8px; }

/* ---------- sheets ---------- */
.ll-scrim { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(4, 6, 15, 0.74); padding: 10px; border-radius: 12px; }
.ll-sheet { width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: #0b1328; border: 1px solid #24365c; border-radius: 16px; padding: 18px 16px 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); text-align: center; outline: none; animation: ll-pop 0.22s cubic-bezier(0.3, 1.3, 0.5, 1); }
@keyframes ll-pop { from { scale: 0.92; opacity: 0; } }
.ll-sheet-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.ll-sheet-sub { color: #8aa3c4; margin: 0 0 10px; }
.ll-stars { display: flex; justify-content: center; gap: 8px; margin: 6px 0 8px; font-size: 44px; line-height: 1; }
.ll-stars span { color: #24365c; }
.ll-stars span.on { color: #ffd166; text-shadow: 0 0 18px rgba(255, 209, 102, 0.6); animation: ll-star 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) backwards; }
.ll-stars span.on:nth-child(2) { animation-delay: 0.25s; } .ll-stars span.on:nth-child(3) { animation-delay: 0.5s; }
@keyframes ll-star { from { scale: 0; rotate: -40deg; } }
.ll-bigscore { font-size: 40px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff3c4; }
.ll-newbest { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 10px; background: #ff6b81; color: #2a0008; font-weight: 800; font-size: 13px; }
.ll-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 4px; text-align: left; }
.ll-facts div { background: #0f1a36; border: 1px solid #1c2b4a; border-radius: 10px; padding: 6px 10px; min-width: 0; }
.ll-facts span { display: block; font-size: 10.5px; color: #8aa3c4; text-transform: uppercase; letter-spacing: 0.05em; }
.ll-facts b { font-size: 16px; overflow-wrap: anywhere; }
.ll-sheetbtns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ll-sheetbtns .ll-btn { width: 100%; min-height: 46px; }
.ll-sheetrow { display: flex; gap: 8px; }
.ll-sheetrow .ll-btn { flex: 1; padding: 0 8px; }
.ll-tip { margin: 10px 0 0; font-size: 13.5px; color: #8aa3c4; }
.ll-dailyline { display: block; margin-top: 8px; font-size: 13.5px; color: #8aa3c4; min-height: 18px; }
.ll-how { text-align: left; }
.ll-how h3 { margin: 14px 0 4px; font-size: 14px; color: #ffd166; text-transform: uppercase; letter-spacing: 0.05em; }
.ll-how p { margin: 0 0 6px; color: #c5d3ee; font-size: 14.5px; }
.ll-how ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ll-how li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #c5d3ee; }
.ll-how li canvas { flex: none; width: 40px; height: 40px; }
.ll-how li b { color: #dfe9ff; }

@media (prefers-reduced-motion: reduce) {
  .ll *, .ll *::before, .ll *::after { animation: none !important; transition: none !important; }
}
