@font-face {
  font-family: "Archivo Black";
  src: url("/wp-content/themes/czesc-gizycko/assets/fonts/archivo-black-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113;
}

@font-face {
  font-family: "Archivo Black";
  src: url("/wp-content/themes/czesc-gizycko/assets/fonts/archivo-black-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  src: url("/wp-content/themes/czesc-gizycko/assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113;
}

@font-face {
  font-family: "Montserrat";
  src: url("/wp-content/themes/czesc-gizycko/assets/fonts/montserrat-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #0849a2;
  --blue-dark: #06366f;
  --sky: #d6e9fe;
  --ice: #f6fbff;
  --white: #fff;
  --ink: #101820;
  --muted: #536674;
  --line: rgba(8, 73, 162, 0.2);
  --reed: #234e3e;
  --sand: #e8c67c;
  --orange: #d86c32;
  --green: #2ea86f;
  --red: #dc4b3f;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --body: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  -webkit-touch-callout: none;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 500;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.72rem 1rem;
  color: #fff;
  background: var(--blue);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.mobile-orientation {
  display: none;
}

.portal-header {
  border-bottom: 1px solid rgba(8, 73, 162, 0.12);
  background: #fff;
}

.portal-header__masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 2rem), 1360px);
  min-height: 92px;
  margin: 0 auto;
}

.portal-header__brand,
.portal-header__back {
  display: inline-flex;
  align-items: center;
}

.portal-header__brand img {
  display: block;
  width: 92px;
  height: auto;
}

.portal-header__back {
  gap: 0.55rem;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
  text-transform: uppercase;
}

.portal-header__back span {
  font-size: 1.15rem;
  transition: transform 140ms ease;
}

.portal-header__back:hover span,
.portal-header__back:focus-visible span {
  transform: translateX(-4px);
}

.game-page {
  width: min(calc(100% - 2rem), 1360px);
  margin: 0 auto;
  padding: clamp(2rem, 3.5vw, 3.25rem) 0 clamp(4rem, 7vw, 7rem);
}

.game-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.4fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.game-heading h1,
.game-overlay h2,
.leaderboard__header h2,
.game-manual h2 {
  margin: 0;
  color: var(--blue);
  font-family: var(--display);
  font-weight: 400;
}

.game-heading h1 {
  font-size: clamp(2.75rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.game-heading__lead {
  max-width: 780px;
  margin: 0.85rem 0 0;
  color: rgba(16, 24, 32, 0.72);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.68;
}

.game-heading__facts {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  align-items: flex-start;
  margin: 0 0 0.2rem;
  color: var(--blue);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  font-weight: 900;
  line-height: 1.18;
  text-transform: uppercase;
}

.game-heading__facts span:nth-child(1) { transform: rotate(-1deg); }
.game-heading__facts span:nth-child(2) { transform: rotate(0.7deg); }
.game-heading__facts span:nth-child(3) { transform: rotate(-0.45deg); }

.game-shell {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--blue);
  background: var(--blue);
}

.game-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr)) 68px;
  color: #fff;
  background: var(--blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hud-item {
  min-height: 66px;
  padding: 0.7rem clamp(0.75rem, 1.7vw, 1.45rem);
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.hud-item__label {
  display: block;
  margin-bottom: 0.15rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-item strong {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(0.92rem, 1.35vw, 1.18rem);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-item strong em {
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--sans);
  font-size: 0.58em;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.sound-button {
  width: 68px;
  min-height: 66px;
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.35rem;
}

.sound-button:hover,
.sound-button:focus-visible {
  color: var(--blue);
  background: var(--sky);
  outline: 0;
}

.sound-button[aria-pressed="false"] {
  color: rgba(255, 255, 255, 0.42);
  text-decoration: line-through;
}

.game-stage {
  position: relative;
  min-height: 480px;
  height: min(680px, calc(100vh - 150px));
  overflow: hidden;
  isolation: isolate;
  background: #a9d7ee;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
}

.stage-status {
  position: absolute;
  z-index: 4;
  top: 1rem;
  left: 50%;
  max-width: min(80%, 560px);
  padding: 0.52rem 0.8rem;
  color: #fff;
  background: rgba(6, 54, 111, 0.86);
  box-shadow: 0 6px 22px rgba(5, 34, 60, 0.15);
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.stage-status.is-alert {
  background: rgba(173, 54, 39, 0.92);
}

.fight-panel {
  position: absolute;
  z-index: 7;
  right: clamp(1rem, 2.3vw, 2rem);
  bottom: 112px;
  width: min(420px, calc(100% - 2rem));
  padding: 0.88rem 1rem 0.95rem;
  color: #fff;
  background: rgba(4, 34, 63, 0.89);
  box-shadow: 0 14px 36px rgba(6, 30, 55, 0.22);
  backdrop-filter: blur(7px);
}

.fight-panel__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fight-panel__row strong {
  color: #c8efd8;
  font-size: inherit;
}

.tension-meter,
.fish-distance {
  position: relative;
  overflow: hidden;
  height: 16px;
  background: rgba(255, 255, 255, 0.16);
}

.tension-meter__zones {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 22% 54% 24%;
}

.tension-meter__zones i:nth-child(1) { background: #e9c95d; }
.tension-meter__zones i:nth-child(2) { background: #46b879; }
.tension-meter__zones i:nth-child(3) { background: #d9564b; }

.tension-meter__needle {
  position: absolute;
  z-index: 2;
  top: -3px;
  bottom: -3px;
  left: 36%;
  width: 4px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(5, 31, 54, 0.36);
  transform: translateX(-50%);
}

.fish-distance {
  height: 5px;
  margin-top: 0.58rem;
}

.fish-distance span {
  display: block;
  width: 0;
  height: 100%;
  background: #cceeff;
  transition: width 80ms linear;
}

.catch-card {
  position: absolute;
  z-index: 9;
  top: clamp(3.6rem, 10vh, 5rem);
  left: 50%;
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(130px, 0.75fr);
  align-items: center;
  width: min(620px, calc(100% - 2rem));
  min-height: 178px;
  padding: 0.8rem 1.2rem 0.8rem 0.6rem;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(4, 28, 58, 0.27);
  transform: translateX(-50%) rotate(-0.5deg);
  pointer-events: none;
}

.catch-card canvas {
  display: block;
  width: 100%;
  height: auto;
}

.catch-card p,
.catch-card strong,
.catch-card span,
.catch-card small {
  display: block;
}

.catch-card p {
  margin: 0 0 0.28rem;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catch-card strong {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 3.15rem);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}

.catch-card span {
  margin-top: 0.35rem;
  color: var(--orange);
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
}

.catch-card small {
  min-height: 1.1em;
  margin-top: 0.45rem;
  color: #1d7c54;
  font-size: 0.68rem;
  font-weight: 850;
}

.game-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(90deg, rgba(244, 250, 255, 0.97) 0%, rgba(244, 250, 255, 0.9) 40%, rgba(244, 250, 255, 0.2) 70%, transparent 100%);
}

.game-overlay__copy {
  width: min(560px, 60%);
}

.game-overlay__eyebrow {
  margin: 0 0 0.5rem;
  color: var(--orange);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-overlay h2 {
  max-width: 520px;
  font-size: clamp(2rem, 4vw, 3.85rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.game-overlay__copy > p:not(.game-overlay__eyebrow):not(.game-overlay__hint) {
  max-width: 550px;
  margin: 0.9rem 0 1.15rem;
  color: rgba(16, 24, 32, 0.76);
  font-size: clamp(0.82rem, 1.15vw, 1rem);
  font-weight: 560;
  line-height: 1.55;
}

.game-overlay__score {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 1.15rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.game-overlay__score span {
  padding: 0.7rem 0.75rem 0.72rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-overlay__score span:last-child {
  border-right: 0;
}

.game-overlay__score strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--blue);
  font-family: var(--display);
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.primary-button,
.score-form button {
  min-height: 50px;
  padding: 0.82rem 1.25rem;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.primary-button:hover,
.primary-button:focus-visible,
.score-form button:hover,
.score-form button:focus-visible {
  color: var(--blue);
  background: var(--sky);
  outline: 2px solid var(--blue);
  outline-offset: 0;
}

.game-overlay__hint {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

kbd {
  display: inline-block;
  min-width: 1.8rem;
  padding: 0.22rem 0.42rem;
  color: var(--blue);
  background: var(--ice);
  border: 1px solid var(--line);
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
}

.score-form {
  margin: 0.9rem 0 1rem;
}

.score-form > label {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.score-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.score-form input {
  min-width: 0;
  min-height: 50px;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(8, 73, 162, 0.36);
  border-radius: 0;
  outline: 0;
}

.score-form input:focus {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.score-form button {
  min-width: 108px;
}

.score-form p {
  margin: 0.38rem 0 0 !important;
  font-size: 0.62rem !important;
  line-height: 1.35 !important;
}

.score-form__status {
  min-height: 1.25em;
  font-weight: 750 !important;
}

.score-form__status.is-error { color: #a4382f !important; }
.score-form__status.is-success { color: #1b704c !important; }

.game-controls {
  position: absolute;
  z-index: 8;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.22fr);
  min-height: 94px;
  color: #fff;
  background: linear-gradient(90deg, rgba(4, 40, 73, 0.95), rgba(5, 62, 111, 0.92));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(5px);
}

.bait-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bait-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  padding: 0.65rem clamp(0.55rem, 1.3vw, 1rem);
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  cursor: pointer;
  text-align: left;
}

.bait-button:hover,
.bait-button:focus-visible,
.bait-button.is-selected {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  outline: 0;
}

.bait-button.is-selected {
  box-shadow: inset 0 4px 0 #d8efff;
}

.bait-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.bait-button span,
.bait-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bait-button span {
  font-size: 0.71rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bait-button small {
  margin-top: 0.14rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.55rem;
  font-weight: 650;
  text-transform: none;
}

.bait-icon {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
}

.bait-icon--worm::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 3px;
  width: 23px;
  height: 12px;
  border: 5px solid #e68a62;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(18deg);
}

.bait-icon--corn::before,
.bait-icon--corn::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #f4c948;
  box-shadow: 9px 1px 0 #eab337, 4px 9px 0 #ffd45a, 13px 10px 0 #eab337;
}

.bait-icon--corn::before { top: 4px; left: 3px; width: 9px; height: 11px; }
.bait-icon--corn::after { top: 14px; left: 6px; width: 9px; height: 11px; }

.bait-icon--spoon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 8px;
  width: 14px;
  height: 25px;
  border-radius: 58% 42% 58% 42%;
  background: linear-gradient(135deg, #fff 10%, #8daec7 45%, #fff 72%, #6b8ca5);
  transform: rotate(28deg);
}

.bait-icon--spoon::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid #d5e5ed;
  border-bottom: 2px solid #d5e5ed;
  transform: rotate(38deg);
}

.bait-icon--wobbler::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 1px;
  width: 26px;
  height: 13px;
  border-radius: 65% 45% 45% 65%;
  background: linear-gradient(#e45837 0 45%, #f2c355 45% 70%, #dce8e8 70%);
  transform: rotate(-8deg);
}

.bait-icon--wobbler::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 0;
  border-width: 5px 0 5px 7px;
  border-style: solid;
  border-color: transparent transparent transparent #e58a41;
}

.action-button {
  min-width: 180px;
  padding: 0.75rem 1rem;
  color: var(--blue);
  background: #fff;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  touch-action: none;
}

.action-button:not(:disabled):hover,
.action-button:not(:disabled):focus-visible,
.action-button.is-active {
  color: #fff;
  background: var(--orange);
  outline: 0;
}

.action-button.is-urgent {
  color: #fff;
  background: var(--orange);
  animation: biteSignal 520ms ease-in-out infinite alternate;
}

.game-stage.is-bite .stage-status {
  background: rgba(199, 72, 39, 0.96);
  box-shadow: 0 0 0 4px rgba(255, 244, 221, 0.72), 0 10px 28px rgba(83, 35, 23, 0.24);
}

.action-button:disabled {
  color: rgba(8, 73, 162, 0.45);
  cursor: default;
}

.action-button span,
.action-button small {
  display: block;
}

.action-button span {
  font-family: var(--display);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  line-height: 1;
  text-transform: uppercase;
}

.action-button small {
  margin-top: 0.28rem;
  font-size: 0.56rem;
  font-weight: 750;
}

@keyframes biteSignal {
  from { box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.7); }
  to { box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.82); }
}

.leaderboard,
.game-manual {
  margin-top: clamp(3.2rem, 6vw, 6rem);
}

.leaderboard__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.2rem;
}

.leaderboard__header h2,
.game-manual h2 {
  font-size: clamp(2rem, 3.4vw, 3.45rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.leaderboard__header p {
  max-width: 760px;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.58;
}

.leaderboard__mark {
  color: var(--blue);
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
}

.leaderboard-periods {
  display: flex;
  gap: 1.6rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.leaderboard-periods button {
  position: relative;
  padding: 0.45rem 0 0.62rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.leaderboard-periods button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--blue);
  opacity: 0;
}

.leaderboard-periods button[aria-selected="true"] { color: var(--blue); }
.leaderboard-periods button[aria-selected="true"]::after { opacity: 1; }
.leaderboard-periods button:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
  border: 1px solid var(--line);
  border-bottom: 0;
}

.leaderboard-tabs button {
  min-height: 52px;
  padding: 0.7rem 1rem;
  color: var(--blue);
  background: #fff;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-tabs button:last-child { border-right: 0; }
.leaderboard-tabs button[aria-selected="true"] { color: #fff; background: var(--blue); }
.leaderboard-tabs button:focus-visible { outline: 2px solid var(--orange); outline-offset: -3px; }

.leaderboard__table-wrap {
  position: relative;
  overflow-x: auto;
  border-top: 3px solid var(--blue);
}

.leaderboard table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.leaderboard th,
.leaderboard td {
  padding: 1rem clamp(0.7rem, 1.8vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.leaderboard th {
  color: var(--muted);
  background: var(--ice);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.leaderboard td {
  font-size: 0.82rem;
  font-weight: 650;
}

.leaderboard__place,
.leaderboard__result {
  color: var(--blue);
  font-family: var(--display);
}

.leaderboard__empty,
.leaderboard__error {
  margin: 0;
  padding: 1.4rem;
  color: var(--muted);
  background: var(--ice);
  font-size: 0.82rem;
  font-weight: 650;
}

.leaderboard__error { color: #9c3932; }

.leaderboard.has-new-score {
  animation: leaderboardPulse 900ms ease;
}

@keyframes leaderboardPulse {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-4px); }
}

.game-manual {
  padding-top: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.game-manual__rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 3rem);
  margin-top: 1.5rem;
}

.game-manual__rules p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.game-manual__rules b {
  color: var(--blue);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
}

.game-manual__keys {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.game-footer {
  padding: 1.6rem 1rem;
  color: var(--muted);
  background: var(--ice);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  text-align: center;
}

.game-footer p { margin: 0; }
.game-footer a { color: var(--blue); font-weight: 850; }

@media (max-width: 820px) {
  .game-heading { grid-template-columns: 1fr; gap: 1.25rem; }
  .game-heading__facts { flex-direction: row; flex-wrap: wrap; gap: 0.6rem 1rem; }
  .game-overlay__copy { width: min(620px, 72%); }
  .game-manual__rules { grid-template-columns: 1fr; }
  .bait-button { grid-template-columns: 28px minmax(0, 1fr); }
  .bait-icon { width: 27px; height: 27px; transform: scale(0.86); transform-origin: left center; }
}

@media (max-width: 1000px) and (orientation: landscape) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--blue);
  }

  .skip-link,
  .portal-header,
  .game-heading,
  .leaderboard,
  .game-manual,
  .game-footer {
    display: none !important;
  }

  .game-page {
    width: 100%;
    height: 100svh;
    margin: 0;
    padding: 0;
  }

  .game-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100svh;
    border: 0;
  }

  .game-hud {
    position: relative;
    z-index: 40;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 44px;
    height: 44px;
  }

  .hud-item {
    min-height: 44px;
    padding: 0.28rem 0.55rem;
  }

  .hud-item__label {
    margin: 0;
    font-size: 0.46rem;
  }

  .hud-item strong {
    font-size: clamp(0.72rem, 2.35vw, 0.95rem);
  }

  .sound-button {
    width: 44px;
    min-height: 44px;
    font-size: 1rem;
  }

  .game-stage {
    min-height: 0;
    height: calc(100svh - 44px);
    background: var(--blue-dark);
    touch-action: none;
  }

  #gameCanvas {
    right: auto;
    left: 50%;
    width: min(calc((100svh - 44px) * 2), 100vw);
    height: 100%;
    transform: translateX(-50%);
  }

  .stage-status {
    top: 0.45rem;
    max-width: 64%;
    padding: 0.38rem 0.68rem;
    font-size: clamp(0.58rem, 1.65vw, 0.7rem);
  }

  .game-controls {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 29%);
    min-height: 78px;
  }

  .bait-button {
    grid-template-columns: 1fr;
    grid-template-rows: 30px auto;
    gap: 0.08rem;
    justify-items: center;
    min-height: 78px;
    padding: 0.34rem 0.24rem 0.3rem;
    text-align: center;
  }

  .bait-icon {
    width: 30px;
    height: 30px;
    transform: scale(0.8);
    transform-origin: center;
  }

  .bait-button span {
    width: 100%;
    font-size: clamp(0.56rem, 1.55vw, 0.69rem);
    text-align: center;
  }
  .bait-button small { display: none; }

  .action-button {
    min-width: 180px;
    min-height: 78px;
    padding: 0.45rem 0.75rem;
  }

  .action-button span { font-size: clamp(1rem, 2.7vw, 1.3rem); }
  .action-button small { font-size: clamp(0.5rem, 1.35vw, 0.62rem); }

  .fight-panel {
    right: 0.65rem;
    bottom: 86px;
    width: min(430px, 54%);
    padding: 0.58rem 0.72rem 0.66rem;
  }

  .fight-panel__row { margin-bottom: 0.38rem; font-size: clamp(0.5rem, 1.4vw, 0.6rem); }
  .tension-meter { height: 15px; }
  .fish-distance { margin-top: 0.36rem; }

  .catch-card {
    top: 2.8rem;
    width: min(500px, 64%);
    min-height: 118px;
    grid-template-columns: minmax(120px, 1.15fr) minmax(120px, 0.85fr);
    padding: 0.35rem 0.75rem 0.35rem 0.3rem;
  }

  .catch-card strong { font-size: clamp(1.25rem, 4vw, 2rem); }
  .catch-card span { font-size: clamp(1rem, 3vw, 1.45rem); }
  .catch-card p,
  .catch-card small { font-size: 0.48rem; }

  .game-overlay {
    padding: 0.8rem 1rem 4.7rem;
    background: linear-gradient(90deg, rgba(244, 250, 255, 0.97), rgba(244, 250, 255, 0.82) 56%, rgba(244, 250, 255, 0.08));
  }

  .game-overlay__copy {
    width: min(470px, 68%);
  }

  .game-overlay__eyebrow { margin-bottom: 0.25rem; font-size: 0.48rem; }
  .game-overlay h2 { max-width: 450px; font-size: clamp(1.4rem, 5vw, 2.35rem); }
  .game-overlay__copy > p:not(.game-overlay__eyebrow):not(.game-overlay__hint) {
    margin: 0.42rem 0 0.55rem;
    font-size: clamp(0.56rem, 1.6vw, 0.72rem);
    line-height: 1.35;
  }

  .primary-button,
  .score-form button,
  .score-form input { min-height: 38px; }
  .primary-button,
  .score-form button { padding: 0.55rem 0.8rem; font-size: 0.58rem; }
  .game-overlay__hint { display: none; }
  .game-overlay__score { margin: 0.45rem 0 0.5rem; }
  .game-overlay__score span { padding: 0.4rem 0.5rem; font-size: 0.43rem; }
  .game-overlay__score strong { font-size: 0.75rem; }
  .score-form { margin: 0.4rem 0 0.5rem; }
  .score-form > label { margin-bottom: 0.2rem; font-size: 0.48rem; }
  .score-form input { padding: 0.48rem 0.58rem; font-size: 0.7rem; }
  .score-form button { min-width: 84px; }
  .score-form p { display: none; }
}

@media (max-width: 1000px) and (orientation: portrait) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #eaf4fb;
  }

  .portal-header,
  .game-page,
  .game-footer,
  .skip-link {
    display: none !important;
  }

  .mobile-orientation {
    position: fixed;
    z-index: 999;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--blue);
    text-align: center;
  }

  .mobile-orientation strong {
    margin-top: 1.3rem;
    font-family: var(--display);
    font-size: clamp(1.55rem, 8vw, 2.5rem);
    font-weight: 400;
    line-height: 1;
  }

  .mobile-orientation p {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
  }

  .mobile-orientation__phone {
    width: 48px;
    height: 82px;
    border: 4px solid var(--blue);
    animation: rotatePhone 1.9s ease-in-out infinite;
  }

  .mobile-orientation__phone span {
    display: block;
    width: 18px;
    height: 3px;
    margin: 7px auto 0;
    background: var(--blue);
  }
}

@keyframes rotatePhone {
  0%, 26% { transform: rotate(0); }
  58%, 100% { transform: rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
