:root {
  --sky-coral: #c84f45;
  --sky-coral-dark: #7b2d35;
  --sky-teal: #126c68;
  --sky-yellow: #f4bf45;
  --sky-cream: #fff5d6;
  --sky-ink: #23303a;
}

.sky-game-page {
  color: var(--sky-ink);
  background: #f3dfbd;
}

.sky-game-page .site-header {
  color: #18343c;
  background: rgba(255, 245, 214, 0.94);
  border-bottom-color: rgba(92, 59, 39, 0.22);
}

.sky-game-page .site-brand-mark {
  color: #fff8dd;
  background: var(--sky-coral);
  box-shadow: 5px 5px 0 var(--sky-yellow);
}

.sky-game-page .site-brand-text span {
  color: #647171;
}

.sky-game-page .site-nav a:hover,
.sky-game-page .site-nav a.active,
.sky-game-page .site-back-link:hover {
  background: rgba(18, 108, 104, 0.12);
}

.sky-game-page .site-footer {
  color: #6e685d;
  background: #fff5d6;
  border-top-color: rgba(92, 59, 39, 0.2);
}

.sky-game-page .site-footer strong {
  color: var(--sky-coral-dark);
}

.sky-game-page .site-footer a:hover {
  color: var(--sky-teal);
}

.sky-main {
  width: 100%;
}

.sky-stage {
  width: 100%;
  height: min(760px, calc(100svh - var(--site-header-h)));
  min-height: 590px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #8ad6cf;
  border-bottom: 8px solid #8d573c;
}

#sky-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}

.sky-hud {
  position: absolute;
  top: 16px;
  left: clamp(12px, 3vw, 34px);
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  pointer-events: none;
}

.hud-ticket {
  width: 76px;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  color: #4a3027;
  background: var(--sky-cream);
  border: 2px solid rgba(77, 48, 36, 0.72);
  box-shadow: 5px 5px 0 rgba(66, 45, 35, 0.22);
  transform: rotate(-2deg);
}

.hud-record {
  transform: rotate(1.5deg);
}

.hud-ticket span {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hud-ticket strong {
  color: var(--sky-coral-dark);
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
}

.hud-feather {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px auto;
  column-gap: 8px;
  align-items: center;
  margin-left: 4px;
  padding: 7px 13px 7px 8px;
  color: rgba(35, 48, 58, 0.72);
  background: rgba(255, 245, 214, 0.76);
  border: 1px dashed rgba(78, 57, 43, 0.52);
  box-shadow: 4px 4px 0 rgba(60, 42, 31, 0.12);
}

.hud-feather .feather-symbol {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #7a6e5a;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.hud-feather > span:not(.feather-symbol) {
  align-self: end;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hud-feather strong {
  align-self: start;
  font-size: 0.78rem;
}

.hud-feather.is-ready {
  color: #315d31;
  background: #fff1a8;
  border-style: solid;
  border-color: #8d6e19;
}

.hud-feather.is-ready .feather-symbol {
  color: #7b5420;
  background: var(--sky-yellow);
  animation: featherPulse 1.25s ease-in-out infinite;
}

@keyframes featherPulse {
  50% { transform: rotate(-10deg) scale(1.08); }
}

.sky-tools {
  position: absolute;
  top: 16px;
  right: clamp(12px, 3vw, 34px);
  z-index: 7;
  display: flex;
  gap: 8px;
}

.sky-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff9df;
  background: rgba(35, 48, 58, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 50%;
  box-shadow: 0 4px 0 rgba(35, 48, 58, 0.24);
  font: 900 1.05rem var(--font);
  cursor: pointer;
}

.sky-icon-button:hover {
  background: var(--sky-teal);
  transform: translateY(-1px);
}

.sky-icon-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(35, 48, 58, 0.24);
}

.sky-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 72px 16px 20px;
  overflow-y: auto;
  background: rgba(39, 57, 63, 0.18);
  backdrop-filter: blur(2px);
}

.airmail-panel {
  width: min(570px, 100%);
  position: relative;
  padding: clamp(22px, 4vw, 38px);
  color: #3f3028;
  background:
    linear-gradient(135deg, transparent 19px, #fff5d6 20px) top left,
    linear-gradient(225deg, transparent 19px, #fff5d6 20px) top right,
    linear-gradient(315deg, transparent 19px, #fff5d6 20px) bottom right,
    linear-gradient(45deg, transparent 19px, #fff5d6 20px) bottom left;
  background-size: 51% 51%;
  background-repeat: no-repeat;
  filter: drop-shadow(13px 16px 0 rgba(56, 39, 31, 0.2));
}

.airmail-panel::before {
  content: '';
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border: 2px dashed rgba(194, 78, 70, 0.48);
}

.airmail-stamp {
  width: fit-content;
  margin: 0 0 14px auto;
  padding: 5px 9px;
  color: var(--sky-coral-dark);
  border: 2px solid currentColor;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(3deg);
}

.airmail-panel h1,
.airmail-panel h2 {
  position: relative;
  z-index: 1;
  color: var(--sky-coral-dark);
  font-family: var(--font-display);
  line-height: 0.95;
  text-align: center;
}

.airmail-panel h1 {
  margin: -5px 0 14px;
  font-size: clamp(2.6rem, 8vw, 4.7rem);
}

.airmail-panel h1 span {
  display: block;
  margin-bottom: 4px;
  color: var(--sky-teal);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.airmail-panel h2 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 6vw, 3.3rem);
}

.airmail-lead {
  max-width: 470px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.55;
  text-align: center;
}

.surprise-list {
  margin: 22px 0 18px;
  border-block: 1px solid rgba(88, 59, 42, 0.22);
}

.surprise-list > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 2px;
}

.surprise-list > div + div {
  border-top: 1px solid rgba(88, 59, 42, 0.18);
}

.surprise-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff8d9;
  background: var(--sky-teal);
  border: 2px solid #0b4e4b;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  transform: rotate(-3deg);
}

.surprise-list > div:nth-child(2) .surprise-icon {
  background: var(--sky-coral);
  border-color: var(--sky-coral-dark);
  transform: rotate(3deg);
}

.surprise-list p {
  line-height: 1.35;
}

.surprise-list strong {
  display: block;
  color: #263c3e;
}

.sky-primary-button,
.sky-text-button {
  position: relative;
  z-index: 2;
  font-family: var(--font);
  cursor: pointer;
}

.sky-primary-button {
  width: min(330px, 100%);
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 10px 18px;
  color: #fff8dd;
  background: var(--sky-coral);
  border: 2px solid var(--sky-coral-dark);
  border-radius: 6px;
  box-shadow: 0 6px 0 var(--sky-coral-dark);
  font-size: 1.1rem;
  font-weight: 900;
}

.sky-primary-button:hover {
  background: #d95e52;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--sky-coral-dark);
}

.sky-primary-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--sky-coral-dark);
}

.sky-primary-button small {
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.8;
}

.intro-record {
  margin-top: 16px;
  color: #6d5b4d;
  font-size: 0.84rem;
  text-align: center;
}

.intro-record strong {
  color: var(--sky-coral-dark);
}

.result-panel {
  text-align: center;
}

.result-score {
  width: 142px;
  height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto 14px;
  color: #4c3528;
  background: var(--sky-yellow);
  border: 2px solid #8c6421;
  box-shadow: 7px 7px 0 rgba(83, 55, 38, 0.18);
  transform: rotate(-2deg);
}

.result-score span,
.result-score small {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-score strong {
  color: var(--sky-coral-dark);
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 0.9;
}

.result-panel > p:not(.airmail-stamp) {
  line-height: 1.5;
}

.result-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.result-facts div {
  padding: 10px;
  border-block: 1px solid rgba(88, 59, 42, 0.24);
}

.result-facts dt {
  color: #756454;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-facts dd {
  color: var(--sky-teal);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sky-text-button {
  color: var(--sky-teal);
  background: transparent;
  border: 0;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pause-panel {
  width: min(430px, 100%);
  text-align: center;
}

.pause-panel .sky-primary-button {
  margin-top: 24px;
}

.pause-panel .sky-text-button {
  margin-top: 18px;
}

.sky-toast {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 8;
  min-width: min(360px, calc(100% - 32px));
  padding: 11px 18px;
  color: #fff8dd;
  background: rgba(35, 48, 58, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 0 rgba(35, 48, 58, 0.2);
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  animation: skyToastIn 0.25s ease-out;
}

@keyframes skyToastIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
}

.visually-hidden {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sky-info {
  width: min(1060px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px 46px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 76px) 0;
}

.sky-info h2 {
  margin-bottom: 14px;
  color: #273a37;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.sky-info > div > p:last-child {
  color: #554b41;
  font-size: 1.04rem;
  line-height: 1.7;
}

.sky-game-facts {
  display: grid;
  align-self: end;
  gap: 11px;
}

.sky-game-facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(92, 59, 39, 0.22);
}

.sky-game-facts dt {
  color: #766858;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sky-game-facts dd {
  font-weight: 900;
  text-align: right;
}

.sky-info ul {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 30px;
  padding: 22px 0 0;
  border-top: 3px solid #9d673f;
  list-style: none;
}

.sky-info li {
  position: relative;
  padding-left: 22px;
  line-height: 1.45;
}

.sky-info li::before {
  content: '↟';
  position: absolute;
  left: 0;
  color: var(--sky-coral);
  font-weight: 900;
}

body.sky-game-playing {
  overflow: hidden;
}

.sky-game-playing .sky-stage {
  height: calc(100dvh - var(--site-header-h));
  min-height: 0;
  border-bottom: 0;
}

.sky-game-playing .sky-info {
  display: none;
}

@media (max-width: 700px) {
  .sky-stage {
    height: min(720px, calc(100svh - var(--site-header-h)));
    min-height: 560px;
  }

  .sky-hud {
    top: 10px;
    left: 10px;
    gap: 5px;
  }

  .hud-ticket {
    width: 58px;
    min-height: 54px;
    padding: 5px;
    box-shadow: 3px 3px 0 rgba(66, 45, 35, 0.2);
  }

  .hud-ticket span {
    font-size: 0.58rem;
  }

  .hud-ticket strong {
    font-size: 1.35rem;
  }

  .hud-feather {
    min-height: 42px;
    grid-template-columns: 27px auto;
    column-gap: 5px;
    padding: 5px 7px 5px 5px;
  }

  .hud-feather .feather-symbol {
    width: 26px;
    height: 26px;
    font-size: 1.1rem;
  }

  .hud-feather > span:not(.feather-symbol) {
    display: none;
  }

  .hud-feather strong {
    font-size: 0.68rem;
  }

  .sky-tools {
    top: 10px;
    right: 10px;
    gap: 5px;
  }

  .sky-icon-button {
    width: 36px;
    height: 36px;
  }

  .sky-overlay {
    align-items: start;
    padding: 62px 10px 14px;
  }

  .airmail-panel {
    padding: 22px 20px 24px;
    filter: drop-shadow(8px 10px 0 rgba(56, 39, 31, 0.18));
  }

  .airmail-panel h1 {
    font-size: clamp(2.45rem, 14vw, 3.6rem);
  }

  .airmail-lead {
    font-size: 0.9rem;
  }

  .surprise-list {
    margin: 14px 0;
  }

  .surprise-list > div {
    padding: 8px 0;
  }

  .surprise-list p {
    font-size: 0.82rem;
  }

  .sky-primary-button {
    min-height: 52px;
  }

  .intro-record {
    margin-top: 12px;
  }

  .sky-info {
    grid-template-columns: 1fr;
    padding: 38px 0;
  }

  .sky-info ul {
    grid-template-columns: 1fr;
  }

  .sky-game-playing {
    --site-header-h: 64px;
  }

  .sky-game-playing .site-header {
    min-height: var(--site-header-h);
    align-items: center;
    flex-wrap: nowrap;
    padding-block: 8px;
  }

  .sky-game-playing .site-brand {
    width: auto;
  }

  .sky-game-playing .site-brand-text span,
  .sky-game-playing .site-nav {
    display: none;
  }

  .sky-game-playing .site-back-link {
    margin-left: auto;
  }
}

@media (max-height: 690px) {
  .airmail-panel {
    padding-block: 19px;
  }

  .airmail-panel h1 {
    font-size: 2.45rem;
    margin-bottom: 9px;
  }

  .airmail-lead {
    font-size: 0.82rem;
  }

  .surprise-list {
    margin-block: 10px;
  }

  .surprise-list > div {
    padding-block: 6px;
  }

  .sky-primary-button {
    min-height: 48px;
  }

  .intro-record {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hud-feather.is-ready .feather-symbol,
  .sky-toast {
    animation: none;
  }
}
