/* Light the Lamp / Build Nephi's Ship */

.ll { max-width: 52rem; margin: 0 auto; }

.ll-controls {
    display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1rem; padding: 1rem 1.25rem;
    background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.ll-control { display: flex; flex-direction: column; gap: .25rem; font-weight: 700; flex: 1 1 12rem; }
.ll-control select {
    font: inherit; font-weight: 500; min-height: var(--tap); padding: 0 .75rem;
    border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
}

.ll-board {
    display: grid; gap: 1rem; align-items: center; padding: 1.25rem;
    background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (min-width: 720px) { .ll-board { grid-template-columns: 15rem 1fr; } }

.ll-scene { max-width: 15rem; margin: 0 auto; width: 100%; }
.ll-svg { display: block; width: 100%; height: auto; }

/* Lamp */
.ll-glow { fill: #fde68a; transition: r .4s ease, opacity .4s ease; }
.ll-flame { transition: transform .4s ease; }
.ll-flame__outer { fill: #f59e0b; }
.ll-flame__inner { fill: #fef3c7; }
.ll-smoke { fill: none; stroke: #9ca3af; stroke-width: 3; stroke-linecap: round; opacity: .8; }
.ll-body { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 5; stroke-linejoin: round; }
.ll-line { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.ll-wick { fill: var(--ink); }
.ll-drop { fill: var(--accent); stroke: var(--accent); stroke-width: 2; transition: fill .3s ease; }
.ll-drop--used { fill: transparent; stroke: var(--line); }

/* Ship */
.ll-sail { fill: #fff; stroke: var(--accent); stroke-width: 4; stroke-linejoin: round; }
.ll-flag { fill: var(--accent); }
.ll-sea { fill: none; stroke: #2563eb; stroke-width: 4; stroke-linecap: round; }
.ll-wave { fill: none; stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.ll-wave--on { stroke: #2563eb; }
.ll-sun { fill: #fde68a; stroke: #f59e0b; stroke-width: 3; }
.ll-ship { transform-origin: 120px 140px; transition: transform .5s ease; }
.ll-ship.is-lost { transform: rotate(10deg) translateY(6px); }
.ll-ship.is-sailing { animation: ll-bob 2s ease-in-out infinite; }
@keyframes ll-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }

/* Word area */
.ll-main { text-align: center; }
.ll-stats { font-size: .9rem; margin-bottom: .25rem; }
.ll-category { font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; margin-bottom: .75rem; }
.ll-word { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; margin-bottom: 1rem; }
.ll-word__part { display: inline-flex; gap: .3rem; }
.ll-ch {
    display: inline-grid; place-items: center; width: clamp(1.6rem, 6vw, 2.3rem); height: clamp(2rem, 7.5vw, 2.8rem);
    border-bottom: 4px solid var(--ink); font-size: clamp(1.3rem, 5vw, 1.9rem); font-weight: 800;
}
.ll-ch.is-known { color: var(--accent); }
.ll-ch.is-missed { color: #b91c1c; }
.ll-ch--punct { border-bottom: 0; width: auto; }
.ll-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ll-clue { min-height: 3rem; margin-bottom: .5rem; }
.ll-clue p { margin: 0; background: var(--accent-soft); border-radius: var(--radius-sm); padding: .6rem .9rem; display: inline-block; }
.ll-clue-btn:disabled { opacity: .55; cursor: default; }
.ll-ref { color: var(--ink-soft); white-space: nowrap; }

.ll-message:empty { display: none; }
.ll-result { font-size: 1.3rem; font-weight: 800; margin-bottom: .25rem; }
.ll-result.is-won { color: #15803d; }
.ll-result.is-lost { color: var(--ink); }
.ll-answer { margin-bottom: .75rem; }

/* Keyboard */
.ll-keyboard { display: flex; flex-direction: column; align-items: center; gap: .4rem; margin: 1rem 0; }
.ll-keyrow { display: flex; gap: .4rem; justify-content: center; }
.ll-key {
    width: clamp(2.4rem, 11vw, 3.25rem); height: clamp(2.8rem, 12vw, 3.25rem);
    font: inherit; font-size: 1.2rem; font-weight: 800; color: var(--ink);
    background: var(--surface); border: 2px solid var(--line); border-radius: 10px; cursor: pointer;
}
.ll-key:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.ll-key:disabled { cursor: default; }
.ll-key.is-hit { background: var(--accent); border-color: var(--accent); color: #fff; }
.ll-key.is-miss { background: #f1ede5; color: #9a948a; text-decoration: line-through; }
.ll-key:disabled:not(.is-hit):not(.is-miss) { opacity: .6; }

.ll-footnote { max-width: 44rem; margin: 1rem auto 0; font-size: .9rem; text-align: center; }
