/* Additive UX layer. Does not alter the original landing artwork. */
:root {
  --ux-ink: #2b2119;
  --ux-accent: #78372e;
  --ux-parchment: #ede1c8;
  --ux-sea: #263d43;
}
.landing-introduction { margin: 0 auto .85rem; max-width: 35rem; color: #f3e7ce; text-align: center; }
.landing-kicker, .bearing-kicker { margin: 0 0 .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.landing-kicker { color: #d7bc8a; }
.landing-introduction h1 { margin: .15rem 0 .5rem; font-family: Georgia, "Times New Roman", "Noto Serif", "DejaVu Serif", serif; font-size: clamp(1.15rem, 3.6vw, 1.65rem); line-height: 1.17; }
.landing-introduction h1 span { color: #d5b18b; }
.landing-introduction > p:last-child { margin: .4rem auto 0; max-width: 33rem; font-size: .9rem; line-height: 1.5; color: #eee1c7; }
.landing-roles { align-items: stretch; }
.landing-role .role-copy { display: flex; flex-direction: column; justify-content: center; gap: .16rem; min-width: 0; }
.landing-role .role-objective { display: block; font-size: .7em; font-weight: 600; line-height: 1.25; color: #f4e5c5; text-transform: none; letter-spacing: 0; }
.landing-control[aria-pressed="true"] { outline: 3px solid #f6d68a; outline-offset: 2px; box-shadow: 0 0 0 4px #332116, 0 0 0 6px #f4d48e, 0 6px 16px rgba(0,0,0,.4); }
.guided-choice { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: .85rem auto 0; padding: .6rem .75rem; max-width: 23rem; border: 1px solid #856b4c; border-radius: 4px; background: #211e1a; color: #f0e3ca; cursor: pointer; line-height: 1.4; }
.guided-choice input { width: 1.2rem; height: 1.2rem; margin: 0; flex: 0 0 auto; accent-color: #d6ac75; }
.guided-choice span { display: flex; flex-direction: column; align-items: flex-start; }
.guided-choice small { color: #d1c1a7; font-size: .74rem; }
.guided-choice:focus-within { outline: 3px solid #f6d68a; outline-offset: 2px; }
.how-steps { margin: .75rem auto 1rem; padding-left: 1.5rem; text-align: left; line-height: 1.55; }
.how-steps li { margin-bottom: .8rem; padding-left: .2rem; }
.how-steps li::marker { color: var(--ux-accent); font-weight: 800; }
.bearing-report { display: flex; align-items: center; gap: 1.1rem; width: min(100%,780px); margin: .5rem auto 1.2rem; padding: .85rem 1rem; border: 1px solid rgba(86,58,35,.55); border-radius: 4px; background: linear-gradient(120deg,#efe2c8,#d9c8a7); color: var(--ux-ink); }
.compass-dial { width: 84px; height: 84px; position: relative; flex: 0 0 84px; border: 3px solid #614a36; border-radius: 50%; background: radial-gradient(circle,#f6ecd7,#c6ac7d); box-shadow: inset 0 0 0 3px #e0cfa8, 0 2px 4px rgba(0,0,0,.15); }
.compass-dial > span:not(.compass-needle) { position: absolute; font: 900 .6rem/1 "Courier New", "DejaVu Sans Mono", monospace; color: #583e2b; }
.compass-n { top: 5px; left: 50%; transform: translateX(-50%); }
.compass-e { top: 50%; right: 5px; transform: translateY(-50%); }
.compass-s { bottom: 5px; left: 50%; transform: translateX(-50%); }
.compass-w { top: 50%; left: 5px; transform: translateY(-50%); }
.compass-needle { position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 26px solid #852f27; transform-origin: 50% 81%; transform: translate(-50%,-81%) rotate(var(--needle-angle,0deg)); transition: transform .36s ease; filter: drop-shadow(0 1px 1px #382c21); }
.compass-needle::after { content: ""; position: absolute; top: 23px; left: -4px; width: 8px; height: 8px; border-radius: 50%; background: #3b2d21; }
.compass-needle.is-idle { opacity: .24; }
.bearing-copy { min-width: 0; flex: 1; }
.bearing-kicker { color: #6d392c; }
.bearing-copy h2 { margin: .1rem 0 .25rem; font-size: clamp(1.05rem, 2.4vw, 1.3rem); line-height: 1.3; color: #35231c; }
.bearing-copy p:last-child { margin: 0; font-size: .9rem; line-height: 1.5; color: #55473b; }
.guided-tip { width: min(100%,780px); margin: .25rem auto .9rem; padding: .8rem 1rem; border-left: 4px solid #416873; background: #f7ecd4; color: #25383b; font-size: .93rem; line-height: 1.5; }
.guided-tip[hidden], .board-scroll-hint[hidden] { display: none !important; }
.board-scroll-hint { display: block; width: min(100%,780px); margin: .1rem auto .6rem; padding: .5rem .65rem; border: 1px solid #7d6042; background: #f0e2c5; color: #382a21; font-size: .82rem; line-height: 1.45; }
.board-scroll-hint span { font-size: 1.15rem; font-weight: 900; padding-right: .35rem; }
.legend .legend-untried { display: inline-flex; align-items: center; gap: .35rem; }
.legend-untried::before { content: ""; display: inline-block; width: 10px; height: 10px; border: 1px solid #3d5759; background: #d4c5a4; }
.attempt-log { width: min(100%,780px); margin: 1.1rem auto; border: 1px solid #806346; background: #e9dcc2; color: var(--ux-ink); }
.attempt-log summary { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .8rem .95rem; cursor: pointer; font-weight: 800; }
.attempt-log summary::after { content: "▾"; font-size: 1.1rem; padding-left: .5rem; }
.attempt-log[open] summary::after { content: "▴"; }
.attempt-log summary:focus-visible { outline: 3px solid var(--ux-accent); outline-offset: -3px; }
.log-count { font-size: .76rem; font-weight: 700; color: #624534; }
.history-empty { margin: .15rem 1rem 1rem; line-height: 1.5; }
.attempt-history { margin: .25rem 1rem 1rem; padding-left: 1.4rem; }
.attempt-history li { margin-bottom: .7rem; padding-left: .15rem; line-height: 1.4; }
.attempt-history .log-coord { display: inline-block; min-width: 2rem; margin-right: .3rem; font-family: "Courier New", "DejaVu Sans Mono", monospace; font-weight: 900; }
.attempt-history .log-result { font-weight: 800; }
.attempt-history .log-result.hit { color: #782d27; }
.attempt-history .log-result.miss { color: #254954; }
.attempt-history .log-detail { display: block; margin-top: .15rem; color: #5a4a3a; font-size: .84rem; }
.result-dialog[data-result="win"] { border-color: #436450; }
.result-dialog[data-result="loss"] { border-color: #7d332e; }
.result-dialog .result-statline { margin: .65rem auto; padding: .4rem .6rem; max-width: 20rem; text-align: center; border-block: 1px solid #937a57; font: 800 .86rem "Courier New", "DejaVu Sans Mono", monospace; }
.scene.impact-hit::after, .scene.impact-miss::after { position: absolute; z-index: 5; inset: 0; content: ""; pointer-events: none; transform-origin: center; }
.scene.impact-hit::after { background: radial-gradient(circle at 50% 55%, rgba(244,224,183,.3), transparent 40%), linear-gradient(95deg, transparent 30%, rgba(255,231,189,.3) 52%, transparent 72%); animation: whale-impact-hit .65s ease-out both; }
.scene.impact-miss::after { background: radial-gradient(ellipse at 50% 78%, rgba(204,231,229,.24), transparent 47%); animation: whale-impact-miss .55s ease-out both; }
@keyframes whale-impact-hit { 0% { opacity: 0; transform: scale(.98); } 20% { opacity: .95; } 100% { opacity: 0; transform: scale(1.05); } }
@keyframes whale-impact-miss { 0% { opacity: 0; } 30% { opacity: .7; } 100% { opacity: 0; } }
/* Keep the entire landing panel visible on typical 390×844 phones without
   changing, cropping or replacing the approved artwork asset. */
@media (max-width: 520px) {
  .landing-artwork img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(43svh, 400px);
    margin-inline: auto;
  }
  .landing-controls { padding: .65rem; }
  .landing-introduction { margin-bottom: .65rem; }
  .landing-actions { gap: .65rem; margin-top: .7rem; }
  .guided-choice { margin-top: .5rem; padding: .4rem .6rem; }
  .landing-status, .landing-status.show { margin-top: .5rem; }
}
@media (max-width: 560px) {
  .landing-introduction h1 { font-size: 1.2rem; }
  .landing-introduction > p:last-child { font-size: .82rem; }
  .landing-role .role-objective { font-size: .68em; }
  .bearing-report { gap: .75rem; padding: .7rem; }
  .compass-dial { width: 66px; height: 66px; flex-basis: 66px; }
  .compass-needle { border-left-width: 6px; border-right-width: 6px; border-bottom-width: 20px; }
  .compass-needle::after { top: 18px; }
  .bearing-copy p:last-child { font-size: .82rem; }
}
@media (forced-colors: active) {
  .bearing-report, .attempt-log, .guided-choice { border: 1px solid CanvasText; }
  .compass-needle { border-bottom-color: Highlight; forced-color-adjust: none; }
  .coord-cell.hit, .coord-cell.miss { outline: 2px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  .scene.impact-hit::after, .scene.impact-miss::after { animation: none !important; opacity: 0; }
  .compass-needle { transition: none; }
}
