[hidden] {
  display: none !important;
}
:root {
  color-scheme: dark;
  --cream: #f2eedb;
  --yellow: #efd582;
  --green: #18352f;
  --mint: #9bd3ae;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #18352f;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--cream);
  overscroll-behavior: none;
}
button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}
#game {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.hud {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(590px, calc(100% - 32px));
  z-index: 3;
  pointer-events: none;
}
.topline {
  display: flex;
  align-items: center;
  gap: 22px;
  background: rgba(21, 43, 38, 0.94);
  border: 1px solid #78927850;
  border-radius: 17px;
  padding: 13px 18px;
  box-shadow: 0 8px 26px #07181130;
}
.wordmark {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.6;
}
.wordmark span {
  display: block;
  font-size: 15px;
  letter-spacing: 3px;
}
.score {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-left: auto;
}
.score strong {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.score span,
.best {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #c0cbb8;
}
.best strong {
  display: block;
  color: var(--yellow);
  font-size: 17px;
  letter-spacing: 0;
  margin-top: 5px;
  text-align: right;
}
.buttons {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.buttons button {
  background: #ffffff0c;
  border: 1px solid #ffffff20;
  border-radius: 10px;
  width: 35px;
  height: 38px;
  color: var(--cream);
  font-size: 21px;
}
.buttons button:hover {
  background: #ffffff20;
}
.grip-row {
  margin: 10px 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--cream);
  text-shadow: 0 1px 4px #000;
}
.grip-track {
  flex: 1;
  height: 10px;
  background: #102a27;
  border: 1px solid #e7dfb43c;
  border-radius: 9px;
  overflow: hidden;
}
#grip {
  height: 100%;
  width: 100%;
  background: var(--mint);
  border-radius: 9px;
  transition: background 0.3s;
}
#grip-value {
  width: 37px;
  font-variant-numeric: tabular-nums;
}
.weather {
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 9px 17px;
  border-radius: 24px;
  background: #17382de8;
  border: 1px solid #91bda360;
  box-shadow: 0 5px 18px #0002;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.weather.warning {
  background: #f1d388;
  color: #332d21;
  border-color: #fff3bb;
  animation: pulse 0.65s ease-in-out infinite alternate;
}
.weather.rain {
  background: #243f53;
  color: #e1f1ef;
  border-color: #93b6c4;
}
.weather.safe {
  background: #1c5944;
  border-color: #a7dcab;
}
.overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  width: min(390px, calc(100% - 36px));
  z-index: 5;
  background: #18352ff5;
  border: 1px solid #9fb89470;
  border-radius: 25px;
  padding: 25px 32px 21px;
  box-shadow: 0 25px 90px #0b1a1570;
  text-align: center;
  max-height: calc(100% - 155px);
  overflow: auto;
  scrollbar-width: thin;
}
.overlay[hidden] {
  display: none;
}
.intro-icon {
  color: var(--yellow);
  font-size: 29px;
  margin-bottom: 9px;
}
.eyebrow {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: #b7cbb5;
  margin: 0 0 13px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 57px;
  line-height: 0.98;
  letter-spacing: -2px;
  margin: 0;
  font-weight: 400;
}
h1 em {
  color: var(--yellow);
  font-weight: 400;
}
#description {
  font-size: 14px;
  line-height: 1.6;
  color: #c6d4c2;
  margin: 17px 0;
}
.guide {
  border-top: 1px solid #b6d0b32c;
  border-bottom: 1px solid #b6d0b32c;
  padding: 13px 0;
  margin-bottom: 19px;
  text-align: left;
  display: grid;
  gap: 13px;
}
.guide > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.guide-symbol {
  display: grid;
  place-items: center;
  font-size: 26px;
  width: 31px;
  color: #b8d6bb;
}
.fly-symbol {
  color: var(--yellow);
}
.hole-symbol {
  color: #0b1e19;
  text-shadow: 0 0 4px #b8d6bb;
}
.guide span {
  font-size: 10px;
  color: #adbfab;
  line-height: 1.6;
}
.guide strong {
  display: block;
  font-size: 12px;
  color: var(--cream);
}
.primary {
  border: 0;
  width: 100%;
  padding: 15px 20px;
  border-radius: 13px;
  background: var(--yellow);
  color: #263d2e;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 0 #aa965d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.primary:hover {
  background: #ffe5a1;
}
.primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #aa965d;
}
.primary span {
  font-size: 22px;
  line-height: 15px;
}
.footnote {
  font-size: 9px;
  color: #adbfab;
  margin: 16px 0 0;
}
.touch-controls {
  position: absolute;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: max(25px, env(safe-area-inset-left));
  z-index: 4;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
}
#joystick {
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: #17382ddd;
  border: 2px solid #aec4a883;
  box-shadow:
    0 5px 25px #0a1e1950,
    inset 0 0 22px #071e1b44;
  position: relative;
  touch-action: none;
  cursor: grab;
}
#joystick:active {
  cursor: grabbing;
  border-color: var(--yellow);
}
.pad-arrow {
  position: absolute;
  font-size: 12px;
  color: #b9caae;
  line-height: 1;
}
.up {
  top: 11px;
  left: calc(50% - 6px);
}
.down {
  bottom: 11px;
  left: calc(50% - 6px);
}
.left {
  top: calc(50% - 6px);
  left: 11px;
}
.right {
  top: calc(50% - 6px);
  right: 11px;
}
#knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 45px;
  height: 45px;
  margin: -22.5px;
  border-radius: 50%;
  background: #90b39b;
  border: 2px solid #c3d7b9;
  box-shadow: 0 3px 8px #0004;
  pointer-events: none;
}
.pad-label {
  display: block;
  margin-top: 9px;
  font-size: 8px;
  letter-spacing: 1.6px;
  font-weight: 800;
  text-shadow: 0 2px 5px #071e19;
}
.field-note {
  position: absolute;
  right: max(28px, env(safe-area-inset-right));
  bottom: max(32px, env(safe-area-inset-bottom));
  z-index: 2;
  text-align: right;
  max-width: 230px;
  text-shadow: 0 2px 6px #163327;
}
.field-note > span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--yellow);
}
.field-note p {
  font-family: Georgia, serif;
  font-size: 19px;
  margin: 9px 0 12px;
  line-height: 1.3;
}
.field-note small {
  font-size: 8px;
  letter-spacing: 1.4px;
  color: #d3ddc6;
}
#toast {
  position: absolute;
  left: 50%;
  top: 185px;
  transform: translateX(-50%);
  z-index: 4;
  color: var(--yellow);
  font-weight: 800;
  font-size: 14px;
  text-shadow: 0 2px 8px #173327;
  transition: opacity 0.4s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
@keyframes pulse {
  from {
    box-shadow: 0 0 0 0 #efd58240;
  }
  to {
    box-shadow: 0 0 0 7px #efd58208;
  }
}
@media (max-width: 600px) {
  .hud {
    width: calc(100% - 24px);
    top: max(12px, env(safe-area-inset-top));
  }
  .topline {
    padding: 10px 12px;
    gap: 10px;
  }
  .wordmark {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .wordmark span {
    font-size: 11px;
    letter-spacing: 2px;
  }
  .score {
    gap: 4px;
  }
  .score strong {
    font-size: 28px;
  }
  .score span {
    font-size: 8px;
  }
  .best {
    font-size: 7px;
    letter-spacing: 0.6px;
  }
  .best strong {
    font-size: 14px;
  }
  .buttons {
    gap: 4px;
  }
  .buttons button {
    width: 31px;
    height: 34px;
    font-size: 18px;
  }
  .weather {
    font-size: 11px;
    padding: 8px 12px;
  }
  .overlay {
    padding: 20px 25px 18px;
    transform: translate(-50%, -46%);
  }
  h1 {
    font-size: 48px;
  }
  .intro-icon {
    font-size: 21px;
    margin-bottom: 5px;
  }
  .eyebrow {
    font-size: 7px;
    margin-bottom: 10px;
  }
  #description {
    font-size: 13px;
    margin: 13px 0;
  }
  .guide {
    gap: 10px;
    padding: 11px 0;
    margin-bottom: 16px;
  }
  #joystick {
    width: 116px;
    height: 116px;
  }
  .touch-controls {
    left: max(18px, env(safe-area-inset-left));
    bottom: max(20px, env(safe-area-inset-bottom));
  }
  .field-note {
    right: 18px;
    bottom: max(35px, env(safe-area-inset-bottom));
    max-width: 175px;
  }
  .field-note p {
    font-size: 15px;
  }
  .field-note small {
    display: none;
  }
  .field-note > span {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  #toast {
    top: 160px;
  }
}
@media (max-height: 650px) {
  .overlay {
    max-height: calc(100% - 125px);
    padding: 17px 25px;
  }
  .intro-icon,
  .eyebrow {
    display: none;
  }
  h1 {
    font-size: 39px;
  }
  #description {
    margin: 10px 0;
  }
  .guide {
    padding: 9px 0;
    gap: 6px;
  }
  .footnote {
    margin-top: 10px;
  }
  .touch-controls {
    bottom: 12px;
  }
  #joystick {
    width: 100px;
    height: 100px;
  }
  .field-note {
    bottom: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .weather.warning {
    animation: none;
  }
}
/* Keep the opening card clear of the thumb pad on smaller phones. */
@media (max-height: 740px) {
  .overlay {
    padding: 16px 22px;
    transform: translate(-50%, -50%);
  }
  .intro-icon,
  .eyebrow {
    display: none;
  }
  h1 {
    font-size: 36px;
  }
  #description {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.4;
  }
  .guide {
    padding: 7px 0;
    gap: 5px;
    margin-bottom: 12px;
  }
  .guide span {
    line-height: 1.3;
  }
  .guide strong {
    font-size: 11px;
  }
  .footnote {
    margin-top: 10px;
  }
}
@media (max-height: 620px) {
  .overlay {
    padding: 14px 22px;
  }
  h1 {
    font-size: 30px;
    letter-spacing: -1px;
  }
  h1 br {
    display: none;
  }
  h1 em::before {
    content: " ";
  }
  #description {
    font-size: 11px;
  }
  .guide span {
    font-size: 9px;
    line-height: 1.2;
  }
  .guide strong {
    font-size: 10px;
  }
  .guide-symbol {
    font-size: 21px;
    width: 25px;
  }
  .footnote {
    display: none;
  }
  .primary {
    padding: 13px 15px;
  }
}
