@font-face {
  font-family: Lake;
  src: local("Avenir Next"), local("Avenir"), local("Segoe UI");
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  font-family: Lake, Arial, sans-serif;
  background: #163f46;
  color: #fff;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #cdf5be;
  outline-offset: 5px;
}
button {
  border: 0;
  background: none;
}
button[hidden],
[hidden] {
  display: none !important;
}
#game,
#view {
  position: absolute;
  inset: 0;
}
#view canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    #05171b30,
    transparent 23%,
    transparent 65%,
    #0f171a55
  );
}
header {
  position: absolute;
  top: 28px;
  left: 30px;
  right: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
  text-shadow: 0 1px 12px #20323c50;
}
header button {
  pointer-events: auto;
}
h1 {
  font-size: 42px;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0;
  font-weight: 750;
}
.brand p {
  margin: 8px 0;
  font-size: 21px;
}
.scoreboard {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 2px;
  display: flex;
  gap: 22px;
  align-items: center;
  white-space: nowrap;
  letter-spacing: 1.5px;
  font-size: 14px;
}
.scoreboard b {
  font-size: 25px;
  margin-left: 12px;
  font-weight: 600;
}
.scoreboard i {
  font-style: normal;
}
.utilities {
  display: flex;
  align-items: center;
  gap: 12px;
}
.conditions {
  font-size: 11px;
  letter-spacing: 1.3px;
  font-weight: 650;
}
.icon {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  background: #22383d35;
  backdrop-filter: blur(12px);
  font-size: 27px;
  position: relative;
}
.off {
  position: absolute;
  left: 18px;
  top: 5px;
  font-size: 25px;
}
#launch {
  position: absolute;
  left: 31%;
  top: 67%;
  width: 240px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  touch-action: none;
  padding: 28px 15px;
  background: radial-gradient(ellipse, #052d3655, transparent 70%);
  border-radius: 50%;
  text-shadow: 0 1px 8px #102b32;
}
.launch-stone {
  width: 75px;
  height: 32px;
  display: block;
  background: linear-gradient(165deg, #758183, #293b40 65%, #152327);
  border-radius: 48% 41% 40% 32%;
  box-shadow:
    inset 0 3px 3px #d6e2df45,
    0 11px 10px #042b3180;
  transform: rotate(-17deg);
  margin-bottom: 20px;
}
.launch-label {
  font-size: 17px;
  font-weight: 650;
}
.launch-label small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-top: 6px;
}
.stones {
  position: absolute;
  left: 30px;
  bottom: 38px;
  display: flex;
  gap: 4px;
}
.stones button {
  width: 100px;
  padding: 0;
  text-align: center;
  text-shadow: 0 1px 5px #173036;
}
.stone-art {
  display: block;
  height: 62px;
  margin-bottom: 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #a3a28c35;
  position: relative;
  backdrop-filter: blur(8px);
}
.stone-art:after {
  content: "";
  position: absolute;
  inset: 15px 14px;
  background: linear-gradient(165deg, #7c8586, #333c3e 48%, #151e23);
  border-radius: 50% 33% 48% 32%;
  box-shadow:
    inset 1px 2px 2px #dae2dd66,
    2px 5px 5px #071d2570;
  transform: rotate(-15deg);
}
.thin:after {
  inset: 20px 15px 14px;
  background: linear-gradient(150deg, #777f7e, #283133 60%, #12232a);
}
.heavy:after {
  inset: 12px 14px;
  background: linear-gradient(150deg, #dfd5bc, #a39a85 65%, #787a6a);
  border-radius: 45% 51% 39% 42%;
}
.stones [aria-pressed="true"] .stone-art {
  border-color: #fff3d7;
  background-color: #d7d0ab55;
}
.stones strong {
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 550;
  display: block;
}
.stones small {
  font-size: 13px;
  display: block;
  margin-top: 4px;
}
#throwPanel {
  position: absolute;
  bottom: 29px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  text-align: center;
}
.glass {
  padding: 18px 24px 10px;
  border: 1px solid #fff8;
  border-radius: 24px;
  background: #363c35a8;
  box-shadow: 0 8px 30px #071d2833;
  backdrop-filter: blur(20px);
}
.power-row {
  display: flex;
  align-items: center;
  gap: 17px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eeebd533;
}
.power-row label {
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.power-row b {
  font-size: 16px;
  margin-left: 10px;
}
input[type="range"] {
  accent-color: #f8f2de;
  width: 100%;
  height: 5px;
  cursor: pointer;
}
.tilt-row {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 22px;
}
.level-stone {
  width: 39px;
  height: 8px;
  border: 1px solid #fff9;
  border-radius: 50%;
}
.track {
  height: 3px;
  background: #f7f2df;
  width: 100%;
  position: relative;
}
.track:before,
.track:after {
  content: "";
  height: 10px;
  width: 2px;
  background: #fff;
  position: absolute;
  top: -4px;
  left: 0;
}
.track:after {
  left: auto;
  right: 0;
}
#sweet {
  position: absolute;
  left: 40%;
  width: 20%;
  height: 24px;
  top: -11px;
  background: #8ddb8360;
}
#needle {
  position: absolute;
  top: -15px;
  height: 32px;
  width: 3px;
  background: #fff;
  left: 50%;
  box-shadow: 0 0 6px #fff9;
}
.level-label {
  display: block;
  margin: 14px 0 0 60px;
  font-size: 11px;
  letter-spacing: 1px;
}
#instruction {
  font-size: 14px;
  margin: 11px 0 0;
  text-shadow: 0 2px 6px #001b25;
}
#feedback {
  position: absolute;
  bottom: 197px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  color: #c8ffb5;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 2px 8px #10382b;
}
#actions {
  position: absolute;
  right: 30px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.primary {
  background: #f5f0df;
  color: #14201b;
  padding: 14px 26px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 650;
  min-width: 185px;
  box-shadow: 0 4px 18px #061f2333;
}
.primary span {
  margin-left: 20px;
}
.link {
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
  padding: 5px;
}
.dark {
  background: #21493b;
  color: #fff;
  width: 100%;
}
#result {
  position: absolute;
  bottom: 39px;
  left: 50%;
  transform: translateX(-50%);
  width: 315px;
  padding: 24px 30px 17px;
  background: #f4f0e4f2;
  border: 1px solid #fff8;
  border-radius: 23px;
  text-align: center;
  color: #182522;
  box-shadow: 0 10px 35px #10273122;
  backdrop-filter: blur(18px);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.6px;
  margin: 0 0 10px;
  font-weight: 650;
}
#result h2 {
  font-size: 37px;
  letter-spacing: -1px;
  margin: 8px 0;
}
#resultMessage {
  font-size: 15px;
  margin: 8px 0 17px;
}
hr {
  height: 1px;
  background: #294e3c33;
  border: 0;
}
#resultDetail {
  font-size: 13px;
  margin: 13px -12px 15px;
  color: #40574f;
}
#result .link {
  margin-top: 8px;
}
#floating,
#ghostLabel {
  position: absolute;
  pointer-events: none;
  text-shadow: 0 1px 4px #14383e;
  font-size: 19px;
  font-weight: 600;
  transform: translate(-50%, -100%);
}
#ghostLabel {
  color: #ffe2a2;
  font-size: 13px;
}
#challengeBar {
  position: absolute;
  top: 103px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  background: #173d3d99;
  border: 1px solid #e8e7c533;
  border-radius: 20px;
  padding: 8px 12px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
#challengeBar button {
  text-decoration: underline;
  margin-left: 10px;
  font-size: 12px;
}
#loading {
  position: absolute;
  inset: 0;
  background: #123e45;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 8;
}
.loading-ripple {
  width: 60px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #f0eaca;
  box-shadow:
    0 0 0 10px #f0eaca11,
    0 0 0 20px #f0eaca08;
}
#loading p {
  font-size: 14px;
  letter-spacing: 1px;
}
#toast {
  position: absolute;
  left: 50%;
  top: 140px;
  transform: translateX(-50%);
  max-width: min(90vw, 500px);
  padding: 13px 20px;
  background: #f5f0df;
  color: #223e34;
  border-radius: 14px;
  font-size: 14px;
  z-index: 12;
  text-align: center;
}
dialog {
  border: 1px solid #fff6;
  border-radius: 24px;
  padding: 34px;
  background: #f4f0e7;
  color: #223b31;
  max-width: 470px;
  width: calc(100% - 32px);
  box-shadow: 0 25px 100px #0006;
}
dialog::backdrop {
  background: #082c3755;
  backdrop-filter: blur(8px);
}
dialog h2 {
  font-size: 30px;
  letter-spacing: -0.8px;
  margin: 10px 0 16px;
}
dialog p {
  font-size: 15px;
  line-height: 1.6;
}
.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 26px;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #234a3422;
  padding: 15px 0;
  font-size: 14px;
}
.setting select {
  max-width: 200px;
  border: 1px solid #234a3433;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}
.keyboard {
  font-size: 13px;
}
.fine {
  font-size: 12px !important;
  color: #587063;
}
dialog label {
  font-size: 14px;
}
dialog input[type="text"],
#playerName,
#challengeLink {
  width: 100%;
  border: 1px solid #20493640;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0 16px;
  background: #fff7;
  color: #223b31;
}
#shareDialog .link {
  display: block;
  margin: 12px auto;
}
body.preparing #launch {
  background: none;
}
body.preparing .launch-label {
  display: none;
}
body.flying #launch,
body.result #launch,
body.flying #throwPanel input {
  pointer-events: none;
}
body.flying #launch,
body.result #launch {
  opacity: 0;
}
body.result #throwPanel,
body.result #actions,
body.result #feedback {
  display: none;
}
@media (max-width: 1100px) {
  h1 {
    font-size: 34px;
  }
  .brand p {
    font-size: 18px;
  }
  .conditions {
    display: none;
  }
  .stones button {
    width: 82px;
  }
  .stones {
    left: 20px;
    bottom: 30px;
  }
  #throwPanel {
    width: 360px;
  }
  .scoreboard {
    font-size: 12px;
    gap: 12px;
  }
  #actions {
    right: 20px;
  }
  .primary {
    min-width: 155px;
  }
}
@media (max-width: 1000px) {
  header {
    top: 22px;
    left: 20px;
    right: 18px;
  }
  h1 {
    font-size: 31px;
  }
  .brand p {
    font-size: 16px;
  }
  .utilities {
    gap: 7px;
  }
  .icon {
    width: 35px;
    height: 35px;
    font-size: 23px;
  }
  #settings {
    display: block;
  }
  .scoreboard {
    top: 90px;
    gap: 18px;
    font-size: 11px;
  }
  .scoreboard b {
    font-size: 22px;
    margin-left: 8px;
  }
  #challengeBar {
    top: 145px;
    font-size: 10px;
  }
  #launch {
    left: 35%;
    top: 54%;
    width: 220px;
  }
  .launch-label {
    font-size: 15px;
  }
  #throwPanel {
    bottom: 151px;
    width: min(88%, 410px);
  }
  .glass {
    padding: 13px 19px 9px;
  }
  .tilt-row {
    margin-top: 19px;
  }
  #instruction {
    font-size: 12px;
  }
  #feedback {
    bottom: 303px;
    font-size: 18px;
  }
  .stones {
    bottom: 30px;
    left: 17px;
    gap: 2px;
  }
  .stones button {
    width: 65px;
  }
  .stone-art {
    height: 48px;
    margin-bottom: 6px;
    border-radius: 10px;
  }
  .stone-art:after {
    inset: 12px 8px;
  }
  .thin:after {
    inset: 18px 8px 10px;
  }
  .heavy:after {
    inset: 8px;
  }
  .stones strong {
    font-size: 11px;
  }
  .stones small {
    font-size: 10px;
  }
  #actions {
    right: 17px;
    bottom: 38px;
    gap: 9px;
  }
  .primary {
    padding: 13px 18px;
    font-size: 14px;
    min-width: 130px;
  }
  .primary span {
    display: none;
  }
  .link {
    font-size: 12px;
  }
  #result {
    bottom: 153px;
    width: 285px;
    padding: 20px 26px 14px;
  }
  #result h2 {
    font-size: 33px;
  }
  body.result .stones {
    left: 50%;
    transform: translateX(-50%);
  }
  #toast {
    top: 180px;
  }
  #floating {
    font-size: 17px;
  }
}
@media (max-height: 620px) and (min-width: 761px) {
  #throwPanel {
    bottom: 15px;
  }
  .glass {
    padding: 10px 20px;
  }
  .tilt-row {
    margin-top: 14px;
  }
  #feedback {
    bottom: 160px;
  }
  #result {
    bottom: 20px;
    padding: 15px 25px;
  }
  #result h2 {
    font-size: 29px;
  }
  .stones,
  #actions {
    bottom: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.stone-art.flat,
.stone-art.thin {
  background-image: url("assets/flat-slate.jpg");
  background-size: cover;
  background-position: center 65%;
}
.stone-art.flat:after,
.stone-art.thin:after {
  display: none;
}
.stone-art.thin {
  filter: brightness(0.75);
}
.heavy:after {
  background-image: url("assets/pebbles.jpg");
  background-size: 180%;
  background-position: 40% 60%;
}
.launch-stone {
  background-image: url("assets/flat-slate.jpg");
  background-size: 125%;
  background-position: center 57%;
  clip-path: polygon(
    2% 40%,
    12% 10%,
    65% 0,
    95% 22%,
    100% 70%,
    80% 96%,
    28% 100%,
    0 72%
  );
}
#resultCount:focus {
  outline: none;
}
#result h2 {
  font-size: 40px;
}
#resultMessage {
  font-size: 16px;
}
#resultDetail {
  font-size: 14px;
}

@media (max-width: 1000px) {
  .stones button {
    width: 57px;
  }
  #actions .primary {
    font-size: 13px;
    padding: 13px 14px;
    min-width: 125px;
  }
  .stones small {
    font-size: 10px;
  }
}

.stone-art.thin {
  background-image: url("assets/thin-slate.jpg");
  filter: none;
}
.stone-art.heavy {
  background-image: url("assets/heavy-cream.jpg");
  background-size: cover;
  background-position: center 60%;
}
.stone-art.heavy:after {
  display: none;
}

body.result #floating:before,
body.result #ghostLabel:before {
  content: "";
  display: block;
  position: absolute;
  height: 24px;
  width: 1px;
  background: currentColor;
  left: 2px;
  top: 11px;
}
/* Compact alignment deck and stone-camera HUD. */
#throwPanel {
  width: min(630px, 48vw);
  bottom: 26px;
  text-align: left;
}
.control-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 18px 20px 12px;
  border-radius: 22px;
  background: linear-gradient(130deg, #142b31ed, #273b39d9);
  border: 1px solid #d3eced70;
  box-shadow:
    0 14px 45px #071b2844,
    inset 0 1px #ffffff20;
}
.meter {
  min-width: 0;
  padding: 0 18px;
  border-right: 1px solid #ffffff25;
}
.meter:first-child {
  padding-left: 0;
}
.meter:nth-child(3) {
  border: 0;
  padding-right: 0;
}
.meter label,
.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #dcebed;
  margin-bottom: 17px;
}
.meter b {
  font-size: 14px;
  letter-spacing: 0;
  color: white;
  font-weight: 600;
  white-space: nowrap;
}
.meter small {
  display: block;
  margin-top: 15px;
  color: #c0d0d1;
  font-size: 12px;
}
.meter .track {
  height: 5px;
  border-radius: 5px;
  background: #77909499;
  margin: 0;
  width: 100%;
}
.track:before,
.track:after {
  display: none;
}
#sweet,
.body-sweet {
  position: absolute;
  top: -4px;
  height: 13px;
  background: #80e2b077;
  border-radius: 8px;
  left: 39%;
  width: 22%;
}
#needle,
#bodyNeedle {
  position: absolute;
  width: 11px;
  height: 19px;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 7px;
  background: #f0fff6;
  box-shadow: 0 0 12px #b4f6d1a0;
}
.power-meter input {
  margin: 0;
  accent-color: #a6edc4;
  height: 5px;
  display: block;
  background: linear-gradient(
    90deg,
    #79908f 55%,
    #8ce4b2 55%,
    #8ce4b2 84%,
    #79908f 84%
  );
}
#instruction {
  grid-column: 1/-1;
  text-align: center;
  border-top: 1px solid #ffffff20;
  padding-top: 11px;
  margin-top: 13px;
  font-size: 12px;
  line-height: 1.4;
  color: #d5e4e5;
}
#targetHint {
  position: absolute;
  left: 30px;
  top: 145px;
  width: 245px;
  padding: 17px 20px;
  border: 1px solid #dceff06b;
  border-radius: 20px;
  background: #112d36b3;
  backdrop-filter: blur(16px);
  color: white;
}
#targetHint b,
#targetHint span,
#targetHint small {
  display: block;
}
#targetHint b {
  font-size: 17px;
  margin-bottom: 8px;
}
#targetHint span {
  font-size: 14px;
  line-height: 1.45;
}
#targetHint small {
  font-size: 12px;
  color: #f7dc9a;
  margin-top: 10px;
}
#pointsBadge {
  position: absolute;
  right: 35px;
  top: 145px;
  text-align: right;
  text-shadow: 0 2px 10px #062431;
}
#pointsBadge strong {
  display: block;
  font-size: 46px;
  font-weight: 650;
}
#pointsBadge span {
  font-size: 12px;
  letter-spacing: 0.14em;
}
#flightHUD {
  display: none;
  position: absolute;
  bottom: 30px;
  left: 30px;
  gap: 26px;
  padding: 19px 24px;
  background: #112b34cc;
  border: 1px solid #d1e5e67a;
  border-radius: 20px;
  backdrop-filter: blur(15px);
}
#flightHUD > div + div {
  padding-left: 26px;
  border-left: 1px solid #ffffff40;
}
#flightHUD span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
  color: #d2e0e3;
}
#flightHUD b {
  font-size: 27px;
}
body.flying #flightHUD,
body.paused #flightHUD {
  display: flex;
}
body.flying #throwPanel,
body.flying .stones,
body.flying #actions,
body.paused #throwPanel,
body.paused .stones {
  display: none;
}
body.flying #targetHint,
body.paused #targetHint {
  opacity: 0.6;
}
#launch {
  width: clamp(120px, 13vw, 200px);
  height: clamp(44px, 3.7vw, 58px);
  padding: 0;
  background: none;
  border-radius: 35px;
  overflow: visible;
}
#launch .launch-stone {
  visibility: hidden;
  margin: 0;
  height: 30px;
}
.launch-label {
  position: absolute;
  top: calc(100% + 14px);
  white-space: nowrap;
  font-size: 14px;
}
.launch-ring { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 2px #102d2c) drop-shadow(0 0 5px #b9eb9570); }
.launch-ring ellipse { fill: none; stroke: #c2efa0; stroke-width: 3.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: .1 9.9; animation: rock-orbit 28s linear infinite, rock-breathe 4s ease-in-out infinite; }
@keyframes rock-orbit { to { stroke-dashoffset: -240; } }
@keyframes rock-breathe { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
#launch:hover .launch-ring, #launch:focus-visible .launch-ring { filter: drop-shadow(0 0 5px #c2efa0b0); }
body.preparing .launch-ring { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .launch-ring ellipse { animation: none; } }
body.paused #launch { visibility: hidden; }
.launch-label small {
  font-size: 12px;
}
#aimReadout {
  position: absolute;
  font-size: 13px;
  font-weight: 600;
  color: #defaff;
  text-shadow: 0 2px 8px #12383f;
  pointer-events: none;
}
body.flying #aimReadout,
body.result #aimReadout,
body.paused #aimReadout {
  display: none;
}
body.preparing #launch {
  opacity: 1;
}
body.preparing .launch-label {
  opacity: 0.75;
}
@media (max-width: 1100px) {
  #throwPanel {
    width: 54vw;
  }
  .meter {
    padding: 0 12px;
  }
  .stones {
    transform: scale(0.85);
    transform-origin: bottom left;
  }
  #actions {
    transform: scale(0.85);
    transform-origin: bottom right;
  }
}
@media (max-width: 760px) {
  #targetHint {
    top: 115px;
    left: 16px;
    width: 190px;
    padding: 12px 14px;
  }
  #targetHint b {
    font-size: 14px;
  }
  #targetHint span {
    font-size: 12px;
  }
  #targetHint small {
    display: none;
  }
  #pointsBadge {
    top: 118px;
    right: 16px;
  }
  #pointsBadge strong {
    font-size: 30px;
  }
  #pointsBadge span {
    font-size: 10px;
  }
  #throwPanel {
    width: calc(100% - 24px);
    bottom: 90px;
  }
  .control-deck {
    padding: 15px 14px 10px;
    border-radius: 19px;
  }
  .meter {
    padding: 0 12px;
  }
  .meter label,
  .meter-label {
    font-size: 10px;
    display: block;
    margin-bottom: 13px;
  }
  .meter b {
    display: block;
    font-size: 13px;
    margin-top: 4px;
  }
  .meter small {
    font-size: 10px;
    margin-top: 13px;
  }
  #instruction {
    font-size: 11px;
  }
  .stones {
    bottom: 10px;
    left: 12px;
    transform: scale(0.7);
  }
  #actions {
    right: 12px;
    bottom: 22px;
    transform: scale(0.75);
  }
  #flightHUD {
    left: 12px;
    right: 12px;
    bottom: 20px;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
  }
  #flightHUD b {
    font-size: 23px;
  }
  #flightHUD > div + div {
    padding-left: 15px;
  }
  .launch-label {
    font-size: 12px;
  }
  .launch-label small {
    font-size: 10px;
  }
}
body.flying #feedback,
body.paused #feedback {
  top: 135px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  font-size: 17px;
}
body.flying #floating,
body.paused #floating {
  display: none;
}
@media (max-width: 760px) {
  #targetHint {
    top: 165px;
    width: 180px;
  }
  #pointsBadge {
    top: 167px;
  }
  .launch-label {
    left: 0;
    text-align: left;
    white-space: normal;
    width: 190px;
  }
  #launch .launch-label small {
    font-size: 11px;
  }
  body.flying #feedback,
  body.paused #feedback {
    top: 270px;
    font-size: 14px;
    width: 80%;
    text-align: center;
  }
}
.trajectory-guide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.guide-arc,
.guide-glow {
  fill: none;
  stroke: #e7fcff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 2 7;
}
.guide-glow {
  stroke: #72dcff;
  stroke-width: 6;
  filter: url(#guideGlow);
  opacity: 0.5;
}
.landing-outer,
.landing-inner {
  fill: #91e8ff0b;
  stroke: #dcfaff;
  stroke-width: 1.7;
}
.landing-inner {
  fill: none;
  stroke-width: 1;
  opacity: 0.55;
}
.landing-number {
  fill: #f2feff;
  font: 600 17px system-ui;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #22495477;
  stroke-width: 3;
}
.landing-final {
  fill: #c1f3ff12;
  stroke: #f4fcff;
  stroke-width: 1.8;
  stroke-dasharray: 5 5;
}
.landing-pole {
  fill: none;
  stroke: #f4fcff;
  stroke-width: 1.8;
}
.landing-flag {
  fill: #f4fcff;
}
.landing-caption,
.preview-caption {
  fill: #ebfcff;
  font: 600 10px system-ui;
  letter-spacing: 0.07em;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #16444bb0;
  stroke-width: 3;
}
.aim-fan,
.aim-ticks {
  fill: none;
  stroke: #e6fcff;
  stroke-width: 1.2;
  opacity: 0.7;
}
.pull-line {
  fill: none;
  stroke: #fff0c5;
  stroke-width: 2;
  stroke-dasharray: 4 5;
}
body.flying .guide-arc {
  stroke-width: 2.4;
}
body.flying .landing-number {
  font-size: 19px;
}
@media (max-width: 760px) {
  .preview-caption {
    visibility: hidden;
  }
  .landing-caption,
  .preview-caption {
    font-size: 8px;
  }
  .landing-number {
    font-size: 13px;
  }
  .guide-arc {
    stroke-width: 1.6;
  }
  .guide-glow {
    stroke-width: 3;
  }
}
.landing-splash{fill:none;stroke:#f2ffff;stroke-width:1.4;stroke-linecap:round;opacity:.8}.landing-outer{stroke-width:2;fill:#c8f4ff12}

/* A quiet guide, visible only once a throw is being prepared. */
.trajectory-guide { opacity: .82; }
.guide-arc { animation: guide-flow 1.8s linear infinite; }
@keyframes guide-flow { to { stroke-dashoffset: -27; } }
body:not(.preparing) #aimReadout { display: none; }
body.paused .guide-arc { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .guide-arc { animation: none; } }
#music[aria-pressed="true"] { background: #d9ecdb55; box-shadow: inset 0 0 0 1px #efffdcaa; }
#music[data-status="loading"] { opacity: .55; }
.stones { width: min(310px, calc((100vw - 680px) / 2 - 50px)); padding: 8px 6px 4px; gap: 0; display: block; border: 1px solid transparent; border-radius: 18px; transition: border-color .2s, background .2s; }
.stones:hover, .stones:focus-within { border-color: #f0f7e9aa; background: #163c4455; }
.stone-list { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #f0f2d5aa transparent; padding: 3px 3px 7px; }
.stones button { flex: 0 0 88px; width: 88px; scroll-snap-align: start; }
.stones .stone-art { height: 60px; background: #e4e1d7b3; overflow: hidden; }
.stones .stone-art::after { display: none; }
.stones .stone-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.stones button:hover .stone-art, .stones button:focus-visible .stone-art { border-color: #fff; background: #edf2ddd9; }
.stones small { font-size: 11px; white-space: nowrap; }
.stones strong { font-size: 12px; letter-spacing: .04em; }
.stone-scroll-hint { display: block; font-size: 11px; opacity: .65; text-align: center; margin-top: 1px; }
.stones:hover .stone-scroll-hint, .stones:focus-within .stone-scroll-hint { opacity: 1; }
#rockDialog { width: min(920px, calc(100vw - 40px)); max-width: 920px; max-height: calc(100dvh - 32px); padding: 0; overflow: auto; color: #f3f2e8; background: radial-gradient(ellipse at 50% 38%, #355762, #112e38 75%); border: 1px solid #c9dde266; }
#rockDialog .close { color: #f3f2e8; z-index: 2; width: 44px; height: 44px; }
.rock-heading { position: absolute; top: 30px; left: 36px; pointer-events: none; z-index: 1; }
.rock-heading .eyebrow { color: #aac4c6; font-size: 11px; margin: 0; letter-spacing: .16em; }
#rockDialog h2 { font-size: clamp(28px, 4vw, 42px); margin: 5px 0 10px; }
#rockTrait { color: #cee6ce; font-size: 13px; border: 1px solid #cee6ce55; border-radius: 20px; padding: 5px 10px; }
#rockViewport { width: 100%; height: min(53vh, 490px); min-height: 280px; cursor: grab; touch-action: none; }
#rockViewport.dragging { cursor: grabbing; }
#rockViewport canvas { display: block; width: 100%; height: 100%; }
#rockViewport:focus-visible { outline: 2px solid #e0eecd; outline-offset: -4px; }
.rock-footer { display: flex; align-items: center; gap: 30px; border-top: 1px solid #d5e1e222; padding: 22px 36px 30px; background: #09253166; }
#rockDialog .rotate-hint { color: #e5ebd9; font-size: 14px; margin: 0 0 8px; }
.rotate-hint span { color: #9ab5bb; }
#rockDescription { color: #b9cdd0; max-width: 530px; margin: 0; font-size: 14px; }
#useRock { flex-shrink: 0; white-space: nowrap; }
@media(max-width:1100px) { .stones { width: calc(23vw - 30px); transform: none; } }
@media(max-width:760px) {
 .stones { width: calc(100vw - 164px); left: 8px; bottom: 4px; transform: none; padding: 5px 3px 0; }
 .stones button { width: 60px; flex-basis: 60px; }
 .stones .stone-art { height: 39px; margin-bottom: 4px; }
 .stones strong { font-size: 9px; } .stones small { display: none; }
 .stone-scroll-hint { font-size: 9px; } .stone-list { padding-bottom: 3px; }
 .utilities { gap: 4px; } .utilities .icon { width: 32px; height: 32px; }
 #rockDialog { width: calc(100vw - 20px); }
 .rock-heading { position: relative; top: auto; left: auto; padding: 20px 22px 0; }
 #rockViewport { height: 34dvh; min-height: 220px; }
 .rock-footer { padding: 18px 22px; gap: 15px; flex-direction: column; align-items: stretch; }
 .rotate-hint span { display: none; }
}

/* A compact invitation beneath the rock; hidden as soon as preparation begins. */
#launch .launch-label {
  padding: 4px 12px;
  border: 1px solid #d6efc638;
  border-radius: 14px;
  background: linear-gradient(135deg, #193e36dc, #122e2bd1);
  box-shadow: 0 5px 18px #061e242e, inset 0 1px 0 #e1ffd90d;
  backdrop-filter: blur(12px);
  color: #f3f7e9;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  text-shadow: none;
}
#launch .launch-label small {
  margin-top: 3px;
  color: #d6e6d2;
  font-size: 11px;
  line-height: 1.2;
}
@media (max-width: 760px) {
  #launch .launch-label { left: 0; width: 190px; font-size: 12px; }
  #launch .launch-label small { font-size: 10px; }
}

@media (min-width: 761px) and (max-height: 800px) {
  .control-deck { padding: 10px 20px 8px; }
  .meter label, .meter-label { margin-bottom: 10px; }
  .meter small { margin-top: 8px; }
  #instruction { display: none; }
  .stones { bottom: 12px; }
  .stones .stone-art { height: 44px; }
  .stones small { display: none; }
}

/* Presentation preferences leave the stone's drag target interactive. */
body[data-flight-trajectory="false"]:is(.flying, .paused, .result) .trajectory-guide {
  display: none;
}
body[data-calm="true"] #game > :not(#view):not(header):not(#launch):not(#calmAim):not(#settingsDialog):not(#loading):not(script) {
  display: none !important;
}
body[data-calm="true"] header > :not(.utilities),
body[data-calm="true"] .utilities > :not(#settings),
body[data-calm="true"] #launch > *,
body[data-calm="true"] .trajectory-guide {
  display: none !important;
}
body[data-calm="true"] #launch {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}
body[data-calm="true"] #settings {
  display: inline-flex;
}

#calmAim {
  display: none;
  position: absolute;
  width: min(240px, calc(100vw - 24px));
  padding: 12px 16px 10px;
  transform: translateX(-50%);
  border: 1px solid #dcf1d629;
  border-radius: 16px;
  background: #173830d9;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px #082a2620;
  color: #e4efdf;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
body[data-calm="true"].preparing #calmAim { display: block; }
.calm-aim-heading, .calm-aim-legend { display: flex; justify-content: space-between; align-items: center; }
.calm-aim-heading { font-size: 10px; letter-spacing: .04em; }
.calm-aim-heading b { margin-left: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
#calmAlignment { color: #c9e8b9; letter-spacing: 0; }
.calm-aim-track { position: relative; height: 4px; margin: 18px 5px 13px; background: #e0f2dd28; border-radius: 4px; }
.calm-sweet { position: absolute; left: 41%; width: 18%; height: 20px; top: -8px; border: 1px solid #c7efa375; border-radius: 6px; background: #b9eaa532; }
#calmAngleMarker, #calmBodyMarker { position: absolute; left: 50%; width: 7px; height: 7px; background: #f0f5e9; box-shadow: 0 1px 4px #102b30; }
#calmAngleMarker { top: -5px; transform: translateX(-50%); border-radius: 50%; }
#calmBodyMarker { top: 3px; transform: translateX(-50%) rotate(45deg); background: #c4e7ad; border-radius: 1px; }
.calm-aim-legend { font-size: 8px; letter-spacing: .1em; color: #d4e7cbbf; }
.calm-power-fill { position: absolute; bottom: 0; left: 0; height: 3px; width: var(--power, 65%); background: #bddfaa; opacity: .7; }
#calmAim[data-aligned="true"] .calm-sweet { background: #bbea9e66; box-shadow: 0 0 12px #b7f09335; }
body[data-calm="true"].preparing .trajectory-guide { display: block !important; opacity: .55; }
body[data-calm="true"].preparing .trajectory-guide :is(.guide-glow, .landing-outer, .landing-inner, .landing-number, .landing-splash, .landing-final, .landing-pole, .landing-flag, .landing-caption, .aim-fan, .aim-ticks, .pull-line, .preview-caption) { display: none; }
body[data-calm="true"].preparing .guide-arc { stroke: #e1f1d8; stroke-width: 1.6; stroke-dasharray: 1 9; animation-duration: 3s; }

/* A compact, touch-friendly lake menu. Native controls retain keyboard behavior. */
#settingsDialog {
  width: min(620px, calc(100% - 24px));
  max-width: 620px;
  max-height: calc(100dvh - 24px);
  padding: 26px;
  border: 0;
  border-radius: 28px;
  background: #faf7ef;
  color: #203f37;
  overflow-y: auto;
}
#settingsDialog .settings-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#settingsDialog .settings-kicker { margin: 0 0 4px; font-size: 10px; font-weight: 700; color: #577266; }
#settingsDialog h2 { margin: 0; font-size: 38px; line-height: 1.15; letter-spacing: normal; text-wrap: balance; }
#settingsDialog .close { position: static; flex: 0 0 44px; height: 44px; border-radius: 50%; background: #e9eee3; color: #25473c; font-size: 28px; }
.settings-nav { display: flex; gap: 6px; padding: 5px; margin: 22px 0 18px; border-radius: 16px; background: #e9ede3; }
.settings-nav button { flex: 1; min-height: 46px; padding: 10px; border-radius: 12px; font-size: 14px; font-weight: 700; color: #4f675d; }
.settings-nav button[aria-pressed="true"] { background: #244e40; color: #fff9ed; box-shadow: 0 2px 4px #18382915; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#settingsDialog .lake-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-height: 182px; padding: 18px; border: 2px solid transparent; border-radius: 20px; color: #203f37; }
#settingsDialog label.lake-option { cursor: pointer; }
.option-mint { background: #d4edc3; }
.option-blue { background: #d0e8f6; }
.option-peach { background: #f8d9c8; }
.option-yellow { background: #f4e7ad; }
.option-icon { display: grid; place-items: center; width: 34px; height: 30px; font-size: 27px; line-height: 1; margin-bottom: 2px; }
#settingsDialog .lake-option strong { font-size: 19px; line-height: 1.2; font-weight: 750; }
.option-description { max-width: 230px; font-size: 12px; line-height: 1.45; color: #39584d; text-wrap: pretty; }
.option-state { margin-top: auto; font-size: 11px; font-weight: 750; }
.lake-option .state-on { display: none; }
.lake-option:has(input:checked) .state-on { display: inline; }
.lake-option:has(input:checked) .state-off { display: none; }
#settingsDialog .lake-option input[type="checkbox"] { appearance: none; position: absolute; top: 18px; right: 18px; margin: 0; width: 46px; height: 28px; border-radius: 20px; border: 2px solid #38574738; background: #fff9; cursor: pointer; }
#settingsDialog .lake-option input[type="checkbox"]::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #728879; }
#settingsDialog .lake-option input:checked { background: #254f40; border-color: #254f40; }
#settingsDialog .lake-option input:checked::after { transform: translateX(18px); background: #f3f8e9; }
#settingsDialog .lake-option:has(input:focus-visible) { outline: 3px solid #245d46; outline-offset: 3px; }
#settingsDialog .lake-option:hover { border-color: #34584630; }
#settingsDialog .lake-option select { margin-top: auto; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #344e3438; border-radius: 12px; background: #fff9; font: inherit; font-size: 13px; font-weight: 650; color: #244b3c; }
#settingsDialog .lake-option:has(select:disabled) { opacity: .65; }
#settingsDialog .settings-note { margin: 13px 4px 0; font-size: 11px; line-height: 1.5; color: #5b7164; text-wrap: pretty; }
.settings-footer { position: sticky; bottom: -26px; padding-top: 18px; padding-bottom: 2px; background: #faf7ef; }
#settingsDialog .close-settings { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 16px 22px; border-radius: 16px; background: #254f40; color: #fff9ed; font-size: 17px; box-shadow: none; }
#settingsDialog .close-settings span { font-size: 24px; }
.lake-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lake-steps li { display: flex; align-items: flex-start; gap: 14px; padding: 16px; background: #e9efdf; border-radius: 16px; }
.lake-steps li:nth-child(2) { background: #dcebf3; }
.lake-steps li:nth-child(3) { background: #f5e1ce; }
.lake-steps li > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: #fff9; font-size: 16px; font-weight: 750; }
.lake-steps strong { font-size: 17px; }
#settingsDialog .lake-steps p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; text-wrap: pretty; }
.settings-details { margin-top: 10px; padding: 0 14px; border-radius: 12px; background: #eeeee5; }
.settings-details summary { cursor: pointer; min-height: 44px; padding: 13px 0; font-size: 13px; font-weight: 700; }
#settingsDialog .settings-details p { margin: 0; padding-bottom: 14px; font-size: 12px; line-height: 1.6; }
#settingsDialog a { color: #255742; text-decoration: underline; }
#settingsDialog :is(button, select, summary):focus-visible { outline: 3px solid #245d46; outline-offset: 3px; }
@media (max-width: 480px) {
  #settingsDialog { padding: 18px; border-radius: 22px; }
  #settingsDialog h2 { font-size: 32px; }
  .settings-nav { margin-top: 18px; }
  .settings-grid { gap: 9px; }
  #settingsDialog .lake-option { padding: 13px; min-height: 190px; border-radius: 16px; }
  #settingsDialog .lake-option strong { font-size: 17px; }
  #settingsDialog .lake-option input[type="checkbox"] { top: 13px; right: 10px; }
  .option-description { font-size: 11px; }
  .settings-footer { bottom: -18px; }
}
@media (max-width: 340px) { .settings-grid { grid-template-columns: 1fr; } }

/* A fixed blur at the periphery; only its opacity follows flight speed. */
.flight-edges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(to right, #000 0%, #0009 10%, transparent 28%, transparent 72%, #0009 90%, #000 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #0009 10%, transparent 28%, transparent 72%, #0009 90%, #000 100%);
}
@media (prefers-reduced-motion: reduce) { .flight-edges { display: none; } }

#settingsDialog .effects-volume-card { margin-top: 14px; padding: 16px 18px; border-radius: 18px; background: #dce8e0; }
#settingsDialog .effects-volume-card label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; }
#effectsVolumeValue { font-size: 13px; font-variant-numeric: tabular-nums; color: #426152; }
#settingsDialog #effectsVolume { display: block; width: 100%; height: 36px; margin: 6px 0 0; accent-color: #2c674d; cursor: pointer; }
#settingsDialog #effectsVolume:focus-visible { outline: 3px solid #245d46; outline-offset: 3px; border-radius: 6px; }
#settingsDialog .effects-volume-card p { margin: 0; font-size: 11px; line-height: 1.5; color: #526b5e; }

.control-deck .meter small b { font-weight: 700; color: #c6eab7; }
.control-deck .power-meter small b { color: #f0f5e6; }

/* Separate the adjustable slider from the two read-only timing gauges. */
#throwPanel .control-deck {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
.manual-controls, .timing-controls {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #d6e7e746;
  background: #1b3439ed;
  box-shadow: 0 6px 22px #0b25252b;
}
.manual-controls { background: #30453cec; border-color: #d7efbc75; }
.control-deck .control-group-title {
  margin: 0 0 14px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  color: #bdcec9;
}
.manual-controls .control-group-title { color: #d2e8b8; }
.timing-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.control-deck .meter { padding: 0; border: 0; }
.control-deck .timing-meters .meter { cursor: default; }
.control-deck .meter label, .control-deck .meter-label { margin-bottom: 15px; font-size: 11px; }
.control-deck .meter small, .control-deck .timing-control-hint {
  font-size: 10px;
  line-height: 1.4;
  margin: 14px 0 0;
  color: #c5d6cc;
}
.control-deck .timing-control-hint { text-align: center; }
.control-deck .timing-meters .track { height: 4px; background: #afc5c344; }
.control-deck #needle, .control-deck #bodyNeedle {
  width: 3px;
  height: 18px;
  top: -7px;
  border-radius: 2px;
  box-shadow: none;
}
/* Keep the fuller state-specific instruction available to assistive technology. */
#throwPanel #instruction {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 760px) {
  #throwPanel .control-deck { gap: 8px; }
  .manual-controls, .timing-controls { padding: 12px 10px; border-radius: 15px; }
  .control-deck .control-group-title { font-size: 8px; margin-bottom: 10px; }
  .timing-meters { gap: 12px; }
  .control-deck .meter label, .control-deck .meter-label { font-size: 9px; }
  .control-deck .meter small, .control-deck .timing-control-hint { font-size: 9px; }
}

/* Pull strength belongs to the stone; the bottom panel is timing only. */
#throwPanel .control-deck { grid-template-columns: minmax(0, 1fr); }
#throwPanel { width: min(440px, 38vw); }
#pullPower { display: none; position: absolute; transform: translateX(-50%); padding: 10px 12px; border-radius: 14px; background: #203c35e6; border: 1px solid #d4e9c73d; pointer-events: none; color: #e3eddc; z-index: 5; max-width: calc(100vw - 24px); }
body.preparing #pullPower { display: block; }
.pull-levels { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.pull-levels span { opacity: .48; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.pull-levels [data-active="true"] { opacity: 1; color: #d5efb5; border-bottom-color: #d5efb5; font-weight: 700; }
#pullTradeoff { display: block; font-size: 10px; margin-top: 5px; color: #cbdbca; }
.calm-sweet { width: var(--timing-window, 17%); left: calc(50% - var(--timing-window, 17%) / 2); }
.calm-power-fill { display: none; }
@media (max-width: 760px) {
  #throwPanel { width: calc(100% - 24px); }
  #throwPanel .meter-label { display: flex; align-items: center; }
  #throwPanel .meter-label b { margin-top: 0; }
  .pull-levels { font-size: 10px; }
}
