:root {
  --pig-ink: #183d36;
  --pig-paper: #fff8dd;
  --pig-yellow: #f4c940;
  --pig-red: #d84d43;
  --pig-blue: #3a91bd;
  --pig-green: #5aa83c;
  --pig-line: #254b40;
}

.pig-siege-page {
  color: var(--pig-ink);
  background:
    repeating-linear-gradient(90deg, rgba(54, 72, 50, 0.05) 0 1px, transparent 1px 86px),
    linear-gradient(180deg, #d9efdb 0%, #f3df9f 58%, #84563d 58%, #5d3b2c 100%);
}

.pig-siege-page .site-header {
  color: #173d34;
  background: rgba(233, 246, 220, 0.92);
  border-bottom-color: rgba(31, 76, 61, 0.18);
}

.pig-siege-page .site-brand-mark {
  color: #163d33;
  background: var(--pig-yellow);
  box-shadow: 5px 5px 0 #4f9a44;
}

.pig-siege-page .site-brand-text span {
  color: #4f6e62;
}

.pig-siege-page .site-nav a:hover,
.pig-siege-page .site-nav a.active,
.pig-siege-page .site-back-link:hover {
  background: rgba(35, 93, 71, 0.12);
}

.pig-siege-page .site-footer {
  color: rgba(255, 248, 222, 0.76);
  background: #3a302b;
  border-top-color: rgba(255, 255, 255, 0.12);
}

.pig-siege-page .site-footer strong {
  color: #f6d86a;
}

.pig-siege-main {
  width: 100%;
  padding: 0;
}

.pig-stage {
  min-height: calc(100svh - var(--site-header-h));
  padding: clamp(12px, 2vw, 24px);
  background:
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(255, 255, 255, 0.07) 15px 16px),
    linear-gradient(135deg, #4b8a57, #236c67 48%, #f0bf4d 48%, #e68941 100%);
}

.pig-marquee {
  width: min(1280px, 100%);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 12px;
  padding: 9px 12px 9px 16px;
  color: #173e35;
  background: #fff6d7;
  border: 3px solid #285c4c;
  box-shadow: 7px 7px 0 rgba(24, 61, 54, 0.38);
  transform: rotate(-0.18deg);
}

.pig-title-lockup,
.pig-marquee-actions {
  display: flex;
  align-items: center;
}

.pig-title-lockup {
  min-width: 0;
  gap: 12px;
}

.pig-title-lockup > div {
  min-width: 0;
}

.pig-title-lockup p,
.pig-title-lockup h1 {
  margin: 0;
}

.pig-title-lockup p {
  color: #6b5940;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pig-title-lockup h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.2rem, 2.3vw, 2rem);
  line-height: 1;
  white-space: nowrap;
}

.pig-title-lockup h1 span {
  color: #c84f40;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.55em;
  font-weight: 900;
  text-transform: uppercase;
}

.pig-nose {
  width: 52px;
  height: 45px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 3px solid #2c713d;
  border-radius: 50%;
  background: #76bb4a;
  transform: rotate(-7deg);
}

.pig-nose i {
  width: 7px;
  height: 12px;
  border-radius: 50%;
  background: #245c35;
}

.pig-marquee-actions {
  gap: 7px;
}

.pig-marquee-actions button {
  min-height: 38px;
  padding: 7px 12px;
  color: #163d33;
  font: 800 0.84rem 'Segoe UI', system-ui, sans-serif;
  border: 2px solid #2c6252;
  border-radius: 6px;
  background: #fbe39b;
  cursor: pointer;
}

.pig-marquee-actions button:hover {
  background: #ffd563;
  transform: translateY(-1px);
}

.pig-marquee-actions .round-tool {
  width: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
}

.pig-game-frame {
  width: min(1280px, 100%, calc(100svh + 250px));
  aspect-ratio: 1200 / 675;
  min-height: 430px;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  border: 9px solid #5b3829;
  border-radius: 8px;
  background: #74c9ea;
  box-shadow:
    inset 0 0 0 3px #c4864b,
    0 18px 45px rgba(41, 39, 27, 0.42);
}

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

.pig-hud {
  min-height: 62px;
  display: grid;
  grid-template-columns: 62px minmax(160px, 1fr) repeat(3, 80px) 42px;
  align-items: stretch;
  position: absolute;
  inset: 12px 12px auto;
  color: #173e35;
  border: 3px solid #224c42;
  background: rgba(255, 248, 219, 0.94);
  box-shadow: 5px 6px 0 rgba(29, 68, 57, 0.33);
  pointer-events: none;
}

.pig-hud > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7px 11px;
  border-right: 1px dashed rgba(34, 76, 66, 0.3);
}

.pig-hud span,
.pig-hud i {
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.pig-hud strong {
  overflow: hidden;
  color: #173e35;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-level {
  align-items: center;
  color: #fff4cd;
  background: #d65548;
}

.hud-level strong {
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.hud-name span {
  color: #b4483b;
}

.hud-stat {
  align-items: center;
}

.hud-stat strong {
  font-variant-numeric: tabular-nums;
}

.hud-pause {
  width: 42px;
  color: #fff;
  border: 0;
  background: #245e51;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
}

.hud-pause:hover {
  background: #173e35;
}

.ammo-dock {
  min-width: 82px;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 10px;
  border: 3px solid rgba(31, 73, 59, 0.75);
  background: rgba(255, 248, 219, 0.9);
  box-shadow: 4px 5px 0 rgba(31, 73, 59, 0.28);
}

.ammo-pig {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  border: 2px solid rgba(23, 62, 53, 0.78);
  border-radius: 50%;
}

.ammo-pig::before,
.ammo-pig::after {
  content: '';
  width: 5px;
  height: 8px;
  position: absolute;
  top: -5px;
  border: 2px solid rgba(23, 62, 53, 0.78);
  border-bottom: 0;
  background: inherit;
}

.ammo-pig::before {
  left: 3px;
  transform: rotate(-19deg);
}

.ammo-pig::after {
  right: 3px;
  transform: rotate(19deg);
}

.ammo-pig i {
  width: 3px;
  height: 5px;
  border-radius: 50%;
  background: rgba(25, 62, 54, 0.76);
}

.ammo-green { background: #65b83f; }
.ammo-red { background: #e45a4f; }
.ammo-orange { background: #f49a35; }
.ammo-blue { background: #4da8d8; }

.ammo-pig.is-next {
  width: 31px;
  height: 31px;
  box-shadow: 0 0 0 3px #f4c940;
}

.ammo-empty {
  color: #7d6c50;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.power-dock {
  display: flex;
  gap: 8px;
  position: absolute;
  right: 14px;
  bottom: 14px;
}

.power-button {
  width: 205px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 7px;
  position: relative;
  overflow: hidden;
  padding: 6px 8px;
  color: #173e35;
  border: 3px solid #245e51;
  border-radius: 5px;
  background: rgba(255, 248, 219, 0.94);
  box-shadow: 4px 5px 0 rgba(31, 73, 59, 0.3);
  text-align: left;
  cursor: pointer;
}

.power-button::before {
  content: '';
  width: var(--charge, 0%);
  position: absolute;
  inset: auto auto 0 0;
  height: 5px;
  background: #42b8c3;
}

.power-button:disabled {
  filter: grayscale(0.55);
  opacity: 0.58;
  cursor: default;
}

.power-button:not(:disabled):hover {
  transform: translateY(-2px);
}

.power-button.is-ready {
  animation: powerReady 1.2s ease-in-out infinite alternate;
}

@keyframes powerReady {
  to { box-shadow: 0 0 0 5px rgba(100, 238, 220, 0.42), 4px 5px 0 rgba(31, 73, 59, 0.3); }
}

.power-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: #d65548;
  font-size: 1.25rem;
  font-weight: 900;
}

.puddle-button .power-symbol {
  background: #368fb0;
}

.power-button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.power-button b {
  font-size: 0.78rem;
}

.power-button small {
  color: #5c7169;
  font-size: 0.6rem;
}

.power-button > i {
  min-width: 25px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.ability-tip {
  min-width: 260px;
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 50%;
  bottom: 80px;
  padding: 9px 14px;
  color: #fff9df;
  border: 2px solid rgba(255, 255, 255, 0.56);
  border-radius: 6px;
  background: rgba(23, 62, 53, 0.9);
  box-shadow: 4px 5px 0 rgba(21, 46, 39, 0.35);
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.ability-tip strong {
  font-size: 0.84rem;
}

.ability-tip span {
  color: #d9f2df;
  font-size: 0.7rem;
}

.pig-overlay {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  z-index: 10;
  padding: 20px;
  background: rgba(18, 61, 52, 0.22);
  backdrop-filter: blur(3px);
}

.flight-card,
.small-flight-card,
.result-flight-card {
  width: min(520px, 94%);
  max-height: calc(100% - 12px);
  overflow: auto;
  position: relative;
  padding: clamp(16px, 3vw, 28px);
  color: #183d36;
  border: 4px solid #285c4c;
  border-radius: 7px;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(38, 92, 76, 0.08) 27px 28px),
    #fff8dd;
  box-shadow: 10px 11px 0 rgba(29, 64, 54, 0.48);
  transform: rotate(-0.45deg);
}

.flight-card::before,
.small-flight-card::before,
.result-flight-card::before {
  content: '';
  width: 92px;
  height: 26px;
  position: absolute;
  top: -11px;
  left: 50%;
  background: rgba(246, 211, 112, 0.88);
  transform: translateX(-50%) rotate(1deg);
}

.flight-stamp {
  margin: 0 0 13px;
  color: #b64b3f;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.flight-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.flight-heading p,
.flight-heading h2 {
  margin: 0;
}

.flight-heading p {
  color: #60746b;
  font-size: 0.75rem;
  font-weight: 800;
}

.flight-heading h2 {
  color: #173e35;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 0.95;
}

.menu-pig {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  border: 4px solid #2e713f;
  border-radius: 50%;
  background: #67b843;
  box-shadow: 5px 5px 0 #f0c94b;
}

.menu-pig::before,
.menu-pig::after {
  content: '';
  width: 17px;
  height: 25px;
  position: absolute;
  top: -12px;
  border: 4px solid #2e713f;
  border-bottom: 0;
  background: #67b843;
}

.menu-pig::before {
  left: 7px;
  transform: rotate(-18deg);
}

.menu-pig::after {
  right: 7px;
  transform: rotate(18deg);
}

.menu-pig i {
  width: 7px;
  height: 12px;
  border-radius: 50%;
  background: #245c35;
}

.flight-lead {
  margin: 13px 0 14px;
  color: #496258;
  font-size: 0.9rem;
  line-height: 1.45;
}

.pilot-field {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pilot-field span {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pilot-field input {
  min-width: 0;
  height: 38px;
  padding: 7px 10px;
  color: #183d36;
  border: 2px solid #437164;
  border-radius: 4px;
  background: #fffdf2;
  font: 800 0.9rem 'Segoe UI', system-ui, sans-serif;
}

.flight-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border: 2px dashed rgba(37, 93, 76, 0.42);
  background: rgba(79, 163, 87, 0.09);
}

.flight-preview > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.flight-preview > div > span {
  color: #d45648;
  font: 900 1.55rem Georgia, serif;
}

.flight-preview p,
.flight-preview b,
.flight-preview small {
  display: block;
  margin: 0;
}

.flight-preview p {
  min-width: 0;
}

.flight-preview b {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flight-preview small {
  overflow: hidden;
  color: #5a7167;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flight-preview button,
.paper-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #214d41;
  border: 2px solid #417164;
  border-radius: 4px;
  background: #fffdf2;
  font: 800 0.73rem 'Segoe UI', system-ui, sans-serif;
  cursor: pointer;
}

.pig-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  margin: 13px 0;
  padding: 0;
  list-style: none;
}

.pig-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #536b60;
  font-size: 0.67rem;
  line-height: 1.2;
}

.pig-legend b {
  color: #173e35;
}

.pig-dot {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid #24584a;
  border-radius: 50%;
}

.pig-green { background: #65b83f; }
.pig-red { background: #e45a4f; }
.pig-orange { background: #f49a35; }
.pig-blue { background: #4da8d8; }

.launch-mission {
  width: 100%;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  color: #fffbe9;
  border: 3px solid #1f5948;
  border-radius: 5px;
  background: #3d984a;
  box-shadow: 0 5px 0 #276a3d;
  font: 900 0.95rem 'Segoe UI', system-ui, sans-serif;
  cursor: pointer;
}

.launch-mission:hover {
  background: #4aac57;
  transform: translateY(-1px);
}

.launch-mission small {
  color: #d8f1d9;
  font-size: 0.66rem;
  font-weight: 700;
}

.flight-progress {
  margin: 11px 0 0;
  color: #6c765a;
  font-size: 0.7rem;
  text-align: center;
}

.small-flight-card,
.result-flight-card {
  width: min(420px, 94%);
  text-align: center;
}

.small-flight-card p,
.result-flight-card > p {
  margin: 5px 0;
  color: #a8493d;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.small-flight-card h2,
.result-flight-card h2 {
  margin: 5px 0 18px;
  font: 800 clamp(1.8rem, 4vw, 2.6rem)/1 Georgia, serif;
}

.pause-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  color: #fff;
  border-radius: 50%;
  background: #d45547;
  font-weight: 900;
}

.small-flight-card .paper-button,
.result-flight-card .paper-button {
  width: 100%;
  margin-top: 9px;
}

.result-stars {
  min-height: 42px;
  color: #e6ad25;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  text-shadow: 0 2px 0 #765a1c;
}

.result-flight-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.result-flight-card dl div {
  padding: 9px 6px;
  border: 2px dashed rgba(42, 93, 77, 0.35);
}

.result-flight-card dt {
  color: #60746c;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-flight-card dd {
  margin: 2px 0 0;
  color: #173e35;
  font-size: 1.05rem;
  font-weight: 900;
}

.is-failed .result-stars {
  color: #aab0a8;
  text-shadow: none;
}

.pig-toast {
  max-width: min(90%, 390px);
  position: absolute;
  top: 96px;
  left: 50%;
  z-index: 30;
  padding: 9px 18px;
  color: #fffbed;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 5px;
  background: #d45447;
  box-shadow: 5px 5px 0 rgba(31, 72, 59, 0.38);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%) rotate(-1deg);
}

.pig-info {
  width: min(1120px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1fr;
  gap: clamp(22px, 4vw, 52px);
  margin: 0 auto;
  padding: clamp(38px, 6vw, 70px) 0;
}

.pig-info h2 {
  margin: 0 0 12px;
  color: #173e35;
  font: 800 clamp(2rem, 4vw, 3.4rem)/0.98 Georgia, serif;
}

.pig-info p {
  color: #40594f;
  line-height: 1.65;
}

.pig-info dl {
  display: grid;
  gap: 12px;
  align-content: start;
}

.pig-info dl div {
  padding: 10px 12px;
  border-left: 6px solid #d55447;
  background: #fff4ce;
  box-shadow: 5px 5px 0 rgba(59, 78, 53, 0.16);
}

.pig-info dt {
  color: #65766f;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pig-info dd {
  margin: 2px 0 0;
  font-weight: 900;
}

.pig-info ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pig-info li {
  position: relative;
  padding-left: 27px;
  color: #345148;
  line-height: 1.45;
}

.pig-info li::before {
  content: '';
  width: 15px;
  height: 11px;
  position: absolute;
  top: 5px;
  left: 0;
  border: 2px solid #276940;
  border-radius: 50%;
  background: #70b34c;
}

.pig-dialog {
  width: min(820px, calc(100% - 24px));
  max-height: min(86svh, 760px);
  margin: auto;
  padding: 0;
  color: #183d36;
  border: 4px solid #285c4c;
  border-radius: 7px;
  background: #fff8dd;
  box-shadow: 11px 12px 0 rgba(23, 61, 52, 0.5);
}

.pig-dialog::backdrop {
  background: rgba(18, 50, 44, 0.7);
  backdrop-filter: blur(4px);
}

.pig-dialog > div,
.pig-dialog > form {
  padding: clamp(16px, 3vw, 28px);
}

.pig-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(39, 92, 76, 0.38);
}

.pig-dialog header span {
  color: #b54a3f;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pig-dialog header h2 {
  margin: 1px 0 0;
  font: 800 clamp(1.6rem, 4vw, 2.5rem)/1 Georgia, serif;
}

.pig-dialog header button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: #d45447;
  font-size: 1.4rem;
  cursor: pointer;
}

.level-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  overflow: auto;
}

.level-ticket {
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  color: #183d36;
  border: 2px solid #497568;
  border-radius: 5px;
  background: #fffdf2;
  text-align: left;
  cursor: pointer;
}

.level-ticket > span {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: #fff;
  background: #47914d;
  font: 900 1.2rem Georgia, serif;
}

.level-ticket div {
  min-width: 0;
}

.level-ticket b,
.level-ticket small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-ticket small {
  margin-top: 3px;
  color: #62756d;
  font-size: 0.67rem;
}

.level-ticket > i {
  color: #dfab2d;
  font-size: 0.7rem;
  font-style: normal;
  white-space: nowrap;
}

.level-ticket:hover:not(:disabled),
.level-ticket.is-current {
  background: #f7e6a4;
}

.level-ticket:disabled {
  opacity: 0.58;
  cursor: default;
}

.level-ticket:disabled > span {
  background: #87928c;
}

.leaderboard-level {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-level select {
  min-width: min(320px, 70%);
  padding: 8px 10px;
  color: #183d36;
  border: 2px solid #497568;
  border-radius: 4px;
  background: #fffdf2;
  font-weight: 800;
}

.pig-table-wrap {
  overflow: auto;
  border: 2px solid #497568;
}

.pig-table-wrap table {
  width: 100%;
  min-width: 490px;
  border-collapse: collapse;
}

.pig-table-wrap th,
.pig-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(66, 111, 97, 0.24);
  text-align: left;
}

.pig-table-wrap th {
  color: #fff;
  background: #286653;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.pig-table-wrap td {
  font-size: 0.82rem;
  font-weight: 700;
}

.leaderboard-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.leaderboard-dialog footer p {
  margin: 0;
  color: #68776f;
  font-size: 0.72rem;
}

.leaderboard-dialog footer button {
  padding: 7px 10px;
  color: #a33734;
  border: 2px solid #bd5b51;
  border-radius: 4px;
  background: #fff5e5;
  font-weight: 800;
  cursor: pointer;
}

.help-dialog ol {
  display: grid;
  gap: 12px;
  padding-left: 24px;
  color: #405b51;
  line-height: 1.45;
}

.dialog-confirm {
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  color: #fff;
  border: 0;
  border-radius: 5px;
  background: #3f944a;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 900px) {
  .pig-stage {
    min-height: auto;
    padding: 10px;
  }

  .pig-marquee {
    min-height: 62px;
    margin-bottom: 9px;
  }

  .pig-title-lockup h1 span,
  .pig-title-lockup p {
    display: none;
  }

  .pig-game-frame {
    min-height: 0;
  }

  .pig-hud {
    grid-template-columns: 50px minmax(120px, 1fr) repeat(3, 58px) 36px;
    min-height: 52px;
    inset: 8px 8px auto;
  }

  .pig-hud > div {
    padding: 5px 7px;
  }

  .pig-hud strong {
    font-size: 0.78rem;
  }

  .hud-level strong {
    font-size: 1.25rem;
  }

  .hud-pause {
    width: 36px;
  }

  .power-dock {
    right: 8px;
    bottom: 8px;
  }

  .power-button {
    width: 155px;
    min-height: 42px;
    grid-template-columns: 28px 1fr auto;
    gap: 4px;
    padding: 4px 6px;
  }

  .power-symbol {
    width: 27px;
    height: 27px;
    font-size: 0.9rem;
  }

  .power-button small {
    display: none;
  }

  .ammo-dock {
    left: 8px;
    bottom: 8px;
  }

  .pig-overlay {
    padding: 10px;
  }

  .flight-card {
    padding: 14px 17px;
  }

  .flight-lead,
  .pig-legend {
    margin-block: 8px;
  }

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

  .pig-info > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .pig-stage {
    padding: 7px 5px 10px;
  }

  .pig-marquee {
    min-height: 52px;
    gap: 6px;
    margin-bottom: 7px;
    padding: 6px 7px;
    border-width: 2px;
    box-shadow: 4px 4px 0 rgba(24, 61, 54, 0.32);
    transform: none;
  }

  .pig-title-lockup {
    gap: 7px;
  }

  .pig-title-lockup h1 {
    max-width: 145px;
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
  }

  .pig-nose {
    width: 36px;
    height: 32px;
    gap: 4px;
    border-width: 2px;
  }

  .pig-nose i {
    width: 4px;
    height: 8px;
  }

  .pig-marquee-actions {
    gap: 4px;
  }

  .pig-marquee-actions button {
    min-height: 32px;
    padding: 5px 7px;
    border-width: 1px;
    font-size: 0.66rem;
  }

  .pig-marquee-actions .round-tool {
    width: 30px;
  }

  .pig-game-frame {
    aspect-ratio: 1200 / 675;
    border-width: 5px;
  }

  #pig-canvas {
    object-fit: fill;
  }

  .pig-hud {
    min-height: 40px;
    grid-template-columns: 38px minmax(70px, 1fr) repeat(3, 42px) 29px;
    inset: 4px 4px auto;
    border-width: 2px;
    box-shadow: 3px 3px 0 rgba(29, 68, 57, 0.28);
  }

  .pig-hud > div {
    padding: 3px;
  }

  .pig-hud span {
    font-size: 0.48rem;
  }

  .pig-hud strong {
    font-size: 0.62rem;
  }

  .hud-level strong {
    font-size: 0.88rem;
  }

  .pig-hud > .hud-name {
    display: none;
  }

  .pig-hud {
    grid-template-columns: 38px repeat(3, minmax(38px, 1fr)) 29px;
  }

  .hud-pause {
    width: 29px;
    font-size: 0.7rem;
  }

  .ammo-dock {
    min-width: 55px;
    min-height: 30px;
    gap: 3px;
    left: 4px;
    bottom: 4px;
    padding: 4px 6px;
    border-width: 2px;
  }

  .ammo-pig {
    width: 16px;
    height: 16px;
    border-width: 1px;
  }

  .ammo-pig.is-next {
    width: 21px;
    height: 21px;
    box-shadow: 0 0 0 2px #f4c940;
  }

  .ammo-pig::before,
  .ammo-pig::after {
    width: 3px;
    height: 5px;
    top: -4px;
    border-width: 1px;
  }

  .ammo-pig i {
    width: 2px;
    height: 3px;
  }

  .power-dock {
    gap: 4px;
    right: 4px;
    bottom: 4px;
  }

  .power-button {
    width: 105px;
    min-height: 31px;
    grid-template-columns: 20px 1fr;
    border-width: 2px;
    box-shadow: 2px 3px 0 rgba(31, 73, 59, 0.26);
  }

  .power-symbol {
    width: 19px;
    height: 19px;
    font-size: 0.7rem;
  }

  .power-button b {
    font-size: 0.55rem;
  }

  .power-button > i {
    display: none;
  }

  .ability-tip {
    min-width: 0;
    width: min(280px, 82%);
    bottom: 42px;
    padding: 5px 8px;
  }

  .ability-tip strong {
    font-size: 0.62rem;
  }

  .ability-tip span {
    font-size: 0.52rem;
  }

  .pig-overlay {
    padding: 7px;
  }

  .flight-card,
  .small-flight-card,
  .result-flight-card {
    width: min(420px, 97%);
    padding: 10px 12px;
    border-width: 2px;
    box-shadow: 5px 6px 0 rgba(29, 64, 54, 0.4);
    transform: none;
  }

  .flight-card::before,
  .small-flight-card::before,
  .result-flight-card::before {
    display: none;
  }

  .flight-stamp {
    display: none;
  }

  .flight-heading {
    gap: 9px;
  }

  .menu-pig {
    width: 42px;
    height: 42px;
    gap: 4px;
    border-width: 2px;
    box-shadow: 3px 3px 0 #f0c94b;
  }

  .menu-pig::before,
  .menu-pig::after {
    width: 10px;
    height: 15px;
    top: -8px;
    border-width: 2px;
  }

  .menu-pig i {
    width: 4px;
    height: 7px;
  }

  .flight-heading h2 {
    font-size: 1.55rem;
  }

  .flight-heading p {
    font-size: 0.6rem;
  }

  .flight-lead {
    display: none;
  }

  .pilot-field {
    grid-template-columns: 85px 1fr;
    margin: 7px 0;
  }

  .pilot-field span {
    font-size: 0.58rem;
  }

  .pilot-field input {
    height: 29px;
    padding: 4px 7px;
    border-width: 1px;
    font-size: 0.72rem;
  }

  .flight-preview {
    padding: 5px 6px;
    border-width: 1px;
  }

  .flight-preview > div > span {
    font-size: 1.05rem;
  }

  .flight-preview b {
    font-size: 0.65rem;
  }

  .flight-preview small {
    display: none;
  }

  .flight-preview button {
    padding: 5px 6px;
    border-width: 1px;
    font-size: 0.6rem;
  }

  .pig-legend {
    gap: 4px 8px;
    margin: 7px 0;
  }

  .pig-legend li {
    gap: 4px;
    font-size: 0.52rem;
  }

  .pig-dot {
    width: 15px;
    height: 15px;
    border-width: 1px;
  }

  .launch-mission {
    min-height: 34px;
    padding: 4px 8px;
    border-width: 2px;
    box-shadow: 0 3px 0 #276a3d;
    font-size: 0.72rem;
  }

  .launch-mission small {
    font-size: 0.5rem;
  }

  .flight-progress {
    margin-top: 5px;
    font-size: 0.55rem;
  }

  .small-flight-card h2,
  .result-flight-card h2 {
    margin-bottom: 9px;
    font-size: 1.5rem;
  }

  .pause-mark {
    width: 38px;
    height: 38px;
  }

  .result-flight-card dl {
    margin: 8px 0;
  }

  .result-flight-card dl div {
    padding: 5px 3px;
    border-width: 1px;
  }

  .result-flight-card dt {
    font-size: 0.5rem;
  }

  .result-flight-card dd {
    font-size: 0.75rem;
  }

  .result-stars {
    min-height: 28px;
    font-size: 1.4rem;
  }

  .pig-toast {
    top: 50px;
    padding: 5px 10px;
    font-size: 0.57rem;
  }

  .pig-info {
    grid-template-columns: 1fr;
    padding: 32px 0;
  }

  .pig-info > div:first-child {
    grid-column: auto;
  }

  .level-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-dialog footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .pig-stage {
    padding: 5px;
  }

  .pig-marquee {
    min-height: 44px;
    margin-bottom: 5px;
    padding-block: 4px;
  }

  .pig-game-frame {
    width: min(1080px, 100%);
  }

  .flight-card {
    max-width: 600px;
  }

  .flight-lead {
    display: none;
  }
}
