#game-screen {
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 12px;
}

#sp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  height: 68px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 14px;
  background: rgba(3, 9, 35, 0.92);
}

#sp-hud-avatar {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 2px solid #ffd700;
  border-radius: 50%;
  flex-shrink: 0;
}

.sp-hud-cell {
  min-width: 80px;
  flex-shrink: 0;
  text-align: center;
}

#sp-hud-mode-cell {
  min-width: 112px;
}

#sp-hud-level,
#sp-hud-q {
  white-space: nowrap;
}

.sp-hud-value {
  color: #ffd700;
  font: 27px/1 "Bebas Neue", sans-serif;
}

.sp-hud-label {
  color: #93c5fd;
  font: 700 9px/1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.wo-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.wo-progress-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.wo-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.wo-progress-fill.s1 {
  background: linear-gradient(90deg, #1d4ed8, #eab308);
}

.wo-progress-fill.s2 {
  background: linear-gradient(90deg, #1d4ed8, #ffd700);
}

.wo-progress-fill.s3 {
  background: linear-gradient(90deg, #1d4ed8, #ffd700);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
}

.wo-progress-fill.locked {
  background: repeating-linear-gradient(135deg, #334155 0 9px, #1e293b 9px 18px);
  box-shadow: none;
  transition: none;
}

.wo-pmark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.35);
}

.wo-progress-stars-row {
  position: relative;
  display: flex;
  height: 11px;
}

.wo-pstar {
  position: absolute;
  color: rgba(255, 255, 255, 0.2);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  transform: translateX(-50%);
  transition: color 0.25s, text-shadow 0.25s;
}

.wo-pstar.lit {
  color: #ffd700;
  text-shadow: 0 0 7px rgba(255, 215, 0, 0.75);
}

@keyframes wo-star-burst {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  16% {
    transform: translateX(-50%) scale(2.4);
  }
  33% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.9);
  }
  66% {
    transform: translateX(-50%) scale(1);
  }
  83% {
    transform: translateX(-50%) scale(1.5);
  }
}

.wo-pstar.pulsing {
  z-index: 10;
  color: #fff !important;
  text-shadow: 0 0 18px #ffd700, 0 0 10px #ffd700 !important;
  transition: none !important;
  animation: wo-star-burst 0.78s ease-in-out forwards;
}

#sp-controls {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(20, 10, 50, 0.8);
  color: #f9fafb;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.12s;
}

.ctrl-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.ctrl-btn.muted {
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
}

#lite-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  border: 1.5px solid rgba(124, 58, 237, 0.8);
  border-radius: 8px;
  background: rgba(5, 14, 44, 0.82);
  color: #c4b5fd;
  cursor: pointer;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.15s;
}

#lite-btn.active {
  color: #f87171;
}

.play-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(440px, 1fr) minmax(420px, 0.95fr);
  gap: 20px;
  perspective: 1400px;
}

.play-stage.displacing .board-panel {
  animation: displaceFlip 0.96s cubic-bezier(0.25, 0.8, 0.25, 1) both;
  backface-visibility: hidden;
}

.play-stage.displacing .turkish-panel {
  animation-delay: 0.06s;
}

@keyframes displaceFlip {
  0% { opacity: 1; transform: rotateY(0) scale(1); }
  46% { opacity: 0.38; transform: rotateY(88deg) scale(0.96); }
  54% { opacity: 0.38; transform: rotateY(272deg) scale(0.96); }
  100% { opacity: 1; transform: rotateY(360deg) scale(1); }
}

.board-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 1.6vw, 22px);
  border: 4px solid rgba(20, 17, 16, 0.92);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 12%),
    linear-gradient(135deg, rgba(32, 28, 28, 0.96), rgba(18, 14, 13, 0.98));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06), inset 0 0 42px rgba(0, 0, 0, 0.62), 0 16px 30px rgba(0, 0, 0, 0.35);
}

.english-panel {
  isolation: isolate;
  overflow: hidden;
}

.quick-bonus-drop {
  position: absolute;
  z-index: 100;
  pointer-events: auto;
  touch-action: manipulation;
  top: -78px;
  left: var(--bonus-lane);
  width: min(156px, 28%);
  min-height: 52px;
  padding: 7px 10px;
  border: 2px solid #fde68a;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #2563eb 52%, #16a34a);
  color: #fff;
  cursor: pointer;
  font: 800 clamp(13px, 1.4vw, 19px)/1 "Barlow Condensed", Arial, sans-serif;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.65);
  box-shadow: 0 0 18px rgba(253, 230, 138, 0.9), 0 7px 0 rgba(0, 0, 0, 0.38);
  animation: quickBonusLeafFall 6s ease-in forwards;
}

.quick-bonus-drop:hover {
  filter: brightness(1.18);
}

.quick-bonus-drop.tutorial-hold {
  top: 46%;
  animation: none;
}

.surprise-tutorial {
  position: absolute;
  z-index: 110;
  top: 5%;
  left: 50%;
  width: min(430px, 86%);
  padding: 14px 18px 12px;
  border: 2px solid #fde68a;
  border-radius: 8px;
  background: rgba(13, 27, 75, 0.97);
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
}

.surprise-tutorial::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -17px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: #fde68a;
  transform: translateX(-50%);
}

.surprise-tutorial strong {
  display: block;
  color: #fde68a;
  font: 800 24px/1 "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.08em;
}

.surprise-tutorial p {
  margin: 7px 0;
  font: 700 15px/1.1 "Barlow Condensed", Arial, sans-serif;
  letter-spacing: 0.03em;
}

.surprise-tutorial button {
  margin-top: 4px;
  padding: 7px 18px;
  border: 1px solid #fde68a;
  border-radius: 4px;
  background: #f59e0b;
  color: #251305;
  cursor: pointer;
  font: 800 15px/1 "Barlow Condensed", Arial, sans-serif;
  letter-spacing: 0.08em;
}

body.lite-mode .quick-bonus-drop {
  top: 42%;
  animation: none;
}

body.lite-mode .quick-bonus-drop.tutorial-hold {
  top: 46%;
}

body.time-warp-active .gem.falling { animation-duration: 1.16s; }
body.time-warp-active .gem.new-gem { animation-duration: 1.44s; }
body.time-warp-active .gem.intro-gem { animation-duration: 1.08s; }
body.time-warp-active .paper-card.intro-card { animation-duration: 1.04s; }
body.time-warp-active .paper-card.new-card { animation-duration: 0.7s; }
body.time-warp-active .gem.crushing,
body.time-warp-active .paper-card.crushing { animation-duration: 1.44s; }
body.time-warp-active .score-float { animation-duration: 2.7s; }
body.time-warp-active .wo-star-burst { animation-duration: 1.56s; }

body.earthquake-active {
  animation: bonusEarthquake 0.14s linear infinite;
}

@keyframes bonusEarthquake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-8px, 5px) rotate(-0.18deg); }
  40% { transform: translate(7px, -6px) rotate(0.2deg); }
  60% { transform: translate(-6px, -4px) rotate(-0.14deg); }
  80% { transform: translate(8px, 5px) rotate(0.16deg); }
}

@keyframes quickBonusLeafFall {
  0% { transform: translateX(-50%) translateY(-10px) rotate(-8deg); }
  18% { transform: translateX(calc(-50% + var(--bonus-drift))) translateY(120px) rotate(12deg); }
  42% { transform: translateX(calc(-50% - var(--bonus-drift))) translateY(310px) rotate(-14deg); }
  68% { transform: translateX(calc(-50% + var(--bonus-drift))) translateY(530px) rotate(16deg); }
  100% { transform: translateX(calc(-50% - var(--bonus-drift))) translateY(900px) rotate(-18deg); }
}

.english-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.45vw, 18px);
  height: 100%;
}

.turkish-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.35vw, 17px);
  height: 100%;
}

.gem,
.gem-slot,
.paper-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 76px;
}

.gem,
.paper-card {
  border: 0;
  cursor: pointer;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-weight: 800;
  line-height: 1.02;
  transition: transform 0.14s ease, filter 0.14s ease, opacity 0.2s ease;
}

.gem-slot.empty {
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.gem {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  clip-path: none;
  border-radius: 8px;
  color: #fff;
  font-size: clamp(25px, 2.9vw, 47px);
  text-align: center;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.85), 0 0 9px rgba(0, 0, 0, 0.8);
  box-shadow: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.gem::before {
  display: none;
}

.gem span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: break-word;
  word-break: normal;
}

.fit-label.single-word {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.fit-label.long-single-word {
  overflow-wrap: normal;
  word-break: keep-all;
}

.gem.red {
  background-color: #781208;
  background-image: url("../assets/gems/gem-red.png");
}

.gem.green {
  background-color: #064e26;
  background-image: url("../assets/gems/gem-green.png");
}

.gem.blue {
  background-color: #1d3a8a;
  background-image: url("../assets/gems/gem-blue.png");
}

.gem.purple {
  background-color: #581c87;
  background-image: url("../assets/gems/gem-purple.png");
}

.gem.orange {
  background-color: #9a3412;
  background-image: url("../assets/gems/gem-orange.png");
}

.gem.darkblue {
  background-color: #172554;
  background-image: url("../assets/gems/gem-darkblue.png");
}

.gem.black {
  background-color: #030712;
  background-image: url("../assets/gems/gem-black.png");
  color: rgba(255, 255, 255, 0.72);
  filter: none;
}

.gem.yellow {
  background-image: url("../assets/gems/gem-yellow.png");
}

.gem.cyan {
  background-image: url("../assets/gems/gem-cyan.png");
}

.gem.selected {
  filter: brightness(1.22);
  outline: 5px solid #fff3a3;
  outline-offset: 3px;
  transform: scale(1.035);
}

.gem.falling {
  animation: gemFall 0.58s cubic-bezier(0.18, 0.84, 0.28, 1.08) both;
}

.gem.new-gem {
  animation: gemDropIn 0.72s cubic-bezier(0.16, 0.9, 0.24, 1.08) both;
}

.gem.intro-gem {
  animation: introGemDrop 0.54s cubic-bezier(0.17, 0.86, 0.25, 1.08) both;
  animation-delay: var(--intro-delay, 0ms);
  pointer-events: none;
}

.paper-card.intro-card {
  animation: introCardIn 0.52s cubic-bezier(0.16, 0.86, 0.23, 1) both;
  animation-delay: var(--intro-delay, 0ms);
  pointer-events: none;
}

body.lite-mode .gem.falling,
body.lite-mode .gem.new-gem {
  animation: none;
}

body.lite-mode .gem.intro-gem,
body.lite-mode .paper-card.intro-card {
  animation: none;
}

.gem.crushing,
.paper-card.crushing {
  pointer-events: none;
  animation: crushOut 0.72s ease forwards;
}

body.lite-mode .gem.crushing,
body.lite-mode .paper-card.crushing {
  opacity: 0;
  transform: none;
  animation: none;
}

.paper-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 2px solid rgba(99, 62, 37, 0.56);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 34%),
    linear-gradient(180deg, #ead4b8, #c8ad8d);
  color: #17110d;
  font-size: clamp(25px, 2.6vw, 44px);
  text-align: center;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 2px rgba(121, 80, 47, 0.18);
}

.paper-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(99, 62, 37, 0.26);
  pointer-events: none;
}

.paper-card.color-linked {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.64);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.7);
}

.paper-card.color-linked::after {
  border-color: rgba(255, 255, 255, 0.42);
}

.paper-card.color-linked-red { background: linear-gradient(145deg, #ef5b50, #a51e1b); }
.paper-card.color-linked-green { background: linear-gradient(145deg, #45c96e, #13723b); }
.paper-card.color-linked-blue { background: linear-gradient(145deg, #3baef1, #1d4f9b); }
.paper-card.color-linked-purple { background: linear-gradient(145deg, #f472b6, #be185d); }
.paper-card.color-linked-orange { background: linear-gradient(145deg, #fbad45, #b74a16); }
.paper-card.color-linked-darkblue { background: linear-gradient(145deg, #38538e, #101e4a); }
.paper-card.color-linked-black { background: linear-gradient(145deg, #4b5563, #111827); }

.gem.word-fog .fit-label {
  filter: blur(2.65px);
}

.paper-card.picture-card {
  padding: 5px;
  overflow: hidden;
}

.turkish-card-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.paper-card.selected.picture-card {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

.paper-card.selected {
  color: #fff;
  background: linear-gradient(180deg, #f59e0b, #92400e);
  transform: scale(1.035);
}

.paper-card.locked {
  color: rgba(23, 17, 13, 0.42);
  cursor: not-allowed;
  filter: grayscale(1) brightness(0.72);
}

.paper-card.locked::before {
  content: "LOCKED";
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 8px;
  color: #7f1d1d;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.paper-card span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: break-word;
  word-break: normal;
}

.paper-card .fit-label.single-word,
.gem .fit-label.single-word {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.paper-card .fit-label.long-single-word,
.gem .fit-label.long-single-word {
  overflow-wrap: normal;
  word-break: keep-all;
}

.fit-label.text-overflow-guard {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.message-line {
  min-height: 30px;
  color: #f8d874;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}

.float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.score-float {
  position: fixed;
  color: #facc15;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 60px;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 0 #3b1b0f, 0 0 22px rgba(250, 204, 21, 0.62);
  animation: scoreFloat 1.35s ease forwards;
}

.black-combo-float {
  color: #f87171;
  font-size: clamp(64px, 9vw, 148px);
  text-shadow: 0 5px 0 #240707, 0 0 30px rgba(239, 68, 68, 0.9);
  animation: blackComboFloat 3s ease-out forwards;
}

body.black-combo-active {
  animation: blackComboQuake 0.16s linear infinite;
}

@keyframes blackComboQuake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-9px, 5px) rotate(-0.22deg); }
  40% { transform: translate(8px, -6px) rotate(0.2deg); }
  60% { transform: translate(-6px, -4px) rotate(-0.16deg); }
  80% { transform: translate(7px, 6px) rotate(0.15deg); }
}

@keyframes blackComboFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(-5deg); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(2deg); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-1deg); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(0.92) rotate(1deg); }
}

@keyframes crushOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  35% {
    opacity: 1;
    transform: scale(1.08) rotate(-1deg);
  }
  68% {
    opacity: 1;
    transform: scale(1.18) rotate(2deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.12) rotate(9deg);
  }
}

@keyframes gemFall {
  from {
    transform: translateY(calc(var(--fall-distance, 1) * -118%));
  }
  72% {
    transform: translateY(6%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes gemDropIn {
  from {
    opacity: 0;
    transform: translateY(calc(var(--spawn-distance, 5) * -118%)) scale(0.96);
  }
  18% {
    opacity: 1;
  }
  76% {
    transform: translateY(7%) scale(1.01);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes introGemDrop {
  from {
    opacity: 0;
    transform: translateY(-260%) scale(0.96);
  }
  18% {
    opacity: 1;
  }
  78% {
    transform: translateY(7%) scale(1.01);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes introCardIn {
  from {
    opacity: 0;
    transform: translate3d(var(--intro-x, 0px), var(--intro-y, 0px), 0) rotate(var(--intro-rot, 0deg)) scale(0.88);
  }
  30% {
    opacity: 1;
  }
  82% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1.035);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

.paper-card.new-card {
  animation: newCardIn 0.35s cubic-bezier(0.22, 0.88, 0.36, 1) both;
}
body.lite-mode .paper-card.new-card { animation: none; }

@keyframes newCardIn {
  from { opacity: 0; transform: translateX(40px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0)    scale(1);   }
}

/* ── BLAST CURSOR ── */
.blast-cursor {
  display: none;
  position: absolute;
  width: 66.67%;
  height: 40%;
  border: 3px solid #f97316;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(249,115,22,.8), inset 0 0 8px rgba(249,115,22,.25);
  pointer-events: none;
  z-index: 20;
  transition: left .4s cubic-bezier(.4,0,.2,1), top .4s cubic-bezier(.4,0,.2,1);
}
.blast-cursor.active {
  display: block;
  pointer-events: auto;
  cursor: crosshair;
}
body.lite-mode .blast-cursor { transition: none; }
body.lite-mode .paper-card { box-shadow: none; }
body.lite-mode .paper-card::after { display: none; }
body.lite-mode .gem,
body.lite-mode .paper-card { transition: none; }
@keyframes blastPulse {
  0%,100% { box-shadow: 0 0 10px rgba(249,115,22,.7), inset 0 0 6px rgba(249,115,22,.2); }
  50%      { box-shadow: 0 0 22px rgba(249,115,22,1),  inset 0 0 14px rgba(249,115,22,.4); }
}
.blast-cursor.active { animation: blastPulse 1s ease-in-out infinite; }
body.lite-mode .blast-cursor.active { animation: none; }

/* ── JOKER REVEAL HIGHLIGHT ── */
.gem.joker-revealed,
.paper-card.joker-revealed {
  outline: 3px solid #a78bfa;
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(167,139,250,.8);
}

@keyframes scoreFloat {
  from {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.8);
  }
  15% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(-50%, -96px) scale(1.24);
  }
}

@media (max-width: 920px) {
  #game-screen {
    padding: 10px;
  }

  #sp-header {
    height: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .wo-progress {
    flex-basis: 100%;
    order: 8;
    min-width: 260px;
  }

  .play-stage {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .english-board,
  .turkish-board {
    min-height: 420px;
  }
}

.campaign-select-panel {
  width: min(1120px, 96vw);
}

.campaign-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 260px));
  justify-content: center;
  gap: clamp(10px, 1.5vw, 18px);
}

.campaign-choice-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 3;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1.5px solid rgba(255, 215, 0, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(145deg, rgba(30, 58, 138, 0.45), rgba(2, 6, 24, 0.9));
  color: #ffd700;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
  transition: transform 0.14s ease, filter 0.14s ease, border-color 0.14s ease;
}

.campaign-choice-card:hover {
  border-color: rgba(255, 215, 0, 0.9);
  filter: brightness(1.08);
  transform: translateY(-4px);
}

.campaign-choice-card:active {
  transform: translateY(-1px);
}

.campaign-choice-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-choice-card span {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
  color: #ffd700;
  font: clamp(28px, 3.2vw, 48px)/0.96 "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 4px 0 #2a1407, 0 0 20px rgba(0, 0, 0, 0.86);
}

.campaign-choice-card img + span {
  opacity: 0;
}

.campaign-choice-card.back-card {
  background: linear-gradient(145deg, rgba(71, 85, 105, 0.58), rgba(15, 23, 42, 0.92));
}

@media (max-width: 920px) {
  .campaign-select-grid {
    grid-template-columns: 1fr;
    max-height: 72vh;
    overflow-y: auto;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  #game-screen {
    gap: 4px;
    padding:
      max(5px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(5px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  #sp-header {
    height: 44px;
    min-height: 44px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 10px;
    overflow: hidden;
  }

  #sp-hud-avatar {
    width: 34px;
    height: 34px;
    border-width: 1.5px;
  }

  .sp-hud-cell {
    min-width: 54px;
  }

  #sp-hud-mode-cell {
    min-width: 92px;
  }

  .sp-hud-value {
    font-size: 20px;
  }

  .sp-hud-label {
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .wo-progress {
    order: 0;
    flex-basis: auto;
    min-width: 120px;
    gap: 1px;
  }

  .wo-progress-track {
    height: 7px;
  }

  .wo-progress-stars-row {
    height: 8px;
  }

  .wo-pstar {
    font-size: 7px;
  }

  #sp-controls {
    gap: 3px;
  }

  .ctrl-btn,
  #lite-btn {
    height: 28px;
    border-radius: 7px;
  }

  .ctrl-btn {
    width: 28px;
    font-size: 12px;
  }

  #lite-btn {
    width: 38px;
    font-size: 8px;
  }

  .adv-joker-btn-hud {
    padding: 3px 8px;
    font-size: 12px;
  }

  .play-stage {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 8px;
    min-height: 0;
  }

  .board-panel {
    padding: 6px;
    border-width: 2px;
    border-radius: 8px;
  }

  .english-board,
  .turkish-board {
    gap: 5px;
    min-height: 0;
  }

  .gem,
  .gem-slot,
  .paper-card {
    min-height: 0;
  }

  .gem,
  .paper-card {
    padding: 4px 7px;
  }

  .gem {
    border-radius: 6px;
    font-size: clamp(15px, 3.4vh, 26px);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.85), 0 0 7px rgba(0, 0, 0, 0.8);
  }

  .paper-card {
    font-size: clamp(13px, 3vh, 24px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(121, 80, 47, 0.18);
  }

  .paper-card::after {
    inset: 4px;
  }

  .paper-card.locked::before {
    top: 2px;
    right: 4px;
    font-size: 8px;
  }

  .message-line {
    min-height: 16px;
    font-size: 14px;
    line-height: 1;
  }

  .gem.selected,
  .paper-card.selected {
    outline-width: 2px;
    outline-offset: 1px;
  }

  .score-float {
    font-size: 40px;
  }

  .campaign-select-panel {
    width: min(760px, calc(100vw - 20px));
    padding: 14px;
  }

  .campaign-select-grid {
    grid-template-columns: repeat(3, minmax(120px, 200px));
    gap: 8px;
    max-height: none;
    overflow: visible;
  }

  .campaign-choice-card span {
    font-size: clamp(22px, 5.2vh, 34px);
  }
}

@media (orientation: landscape) and (max-height: 380px) {
  #game-screen {
    gap: 3px;
  }

  #sp-header {
    height: 38px;
    min-height: 38px;
    padding: 3px 6px;
  }

  #sp-hud-avatar {
    width: 30px;
    height: 30px;
  }

  .sp-hud-cell {
    min-width: 46px;
  }

  #sp-hud-mode-cell {
    min-width: 78px;
  }

  .sp-hud-value {
    font-size: 17px;
  }

  .sp-hud-label {
    display: none;
  }

  .ctrl-btn {
    width: 25px;
  }

  .ctrl-btn,
  #lite-btn {
    height: 25px;
  }

  #lite-btn {
    width: 34px;
  }

  .play-stage {
    gap: 6px;
  }

  .board-panel {
    padding: 5px;
  }

  .english-board,
  .turkish-board {
    gap: 4px;
  }

  .gem {
    font-size: clamp(13px, 3.1vh, 21px);
  }

  .paper-card {
    font-size: clamp(12px, 2.8vh, 20px);
  }
}
