/* Visual refinements for the real markup emitted by lezzet-rotasi-screen.js. */
.lr-screen {
  --lr-ink: #f7ead0;
  --lr-gold: #edbd64;
  --lr-teal: #27675e;
  --lr-night: #112b39;
  width: min(100%, 540px);
  min-height: min(640px, 100dvh);
  height: min(920px, 100dvh);
  margin-inline: auto;
  background-color: #10251f;
  box-shadow: 0 28px 80px rgb(3 11 9 / 58%), inset 0 1px rgb(255 245 218 / 11%);
}

.lr-screen .lr-backdrop {
  background:
    linear-gradient(180deg, rgb(5 17 22 / 34%), transparent 28%, rgb(7 16 14 / 52%) 73%, #111a15 100%),
    radial-gradient(ellipse at 18% 29%, rgb(229 155 77 / 24%), transparent 28%),
    linear-gradient(135deg, #173b43 0%, #17373b 42%, #60422e 100%);
}

.lr-screen .lr-topbar {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgb(7 19 18 / 88%), rgb(7 19 18 / 10%));
}

.lr-screen .lr-back,
.lr-screen .lr-wallet {
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 14px rgb(0 0 0 / 28%), inset 0 1px rgb(255 255 255 / 12%);
}

.lr-screen .lr-brand-mark {
  background: radial-gradient(circle at 32% 25%, #fff2c9, #e4aa52 48%, #764328 100%);
  color: #56331b;
  text-shadow: 0 1px rgb(255 242 201 / 65%);
}

.lr-screen .lr-main {
  z-index: 1;
}

.lr-screen .lr-scene-title {
  max-width: 100%;
  padding-inline: 10px;
}

.lr-screen .lr-eyebrow {
  color: #f6d28a;
  text-shadow: 0 2px 8px rgb(0 0 0 / 70%);
}

.lr-screen .lr-table {
  border-color: rgb(224 175 108 / 66%);
  background:
    linear-gradient(135deg, rgb(255 225 170 / 12%), transparent 32%),
    repeating-linear-gradient(4deg, #60391f 0 8px, #704528 9px 13px, #58331e 14px 20px);
  box-shadow:
    0 18px 40px rgb(0 0 0 / 47%),
    inset 0 1px rgb(255 231 187 / 28%),
    inset 0 -9px 18px rgb(28 15 9 / 48%);
}

.lr-screen .lr-table::before {
  border-color: rgb(246 207 143 / 31%);
}

.lr-screen .lr-player-row {
  padding-block: 2px 5px;
}

.lr-screen .lr-avatar {
  border-color: #f1c66e;
  box-shadow: 0 0 0 3px rgb(248 196 96 / 14%), 0 4px 10px rgb(24 12 7 / 58%);
}

.lr-screen .lr-vs {
  width: 29px;
  height: 29px;
  border-color: #f0c871;
  background: radial-gradient(circle at 35% 25%, #65442a, #2b1d17 75%);
  box-shadow: 0 0 14px rgb(242 185 83 / 21%), inset 0 1px rgb(255 255 255 / 13%);
}

.lr-screen .lr-progress {
  height: 7px;
  border: 1px solid rgb(255 226 170 / 12%);
  background: #281a14;
}

.lr-screen .lr-progress span {
  background: linear-gradient(90deg, #be762f, #f4c45d 58%, #fff0a9);
  box-shadow: 0 0 12px rgb(255 196 83 / 60%);
}

.lr-screen .lr-board {
  gap: clamp(4px, 1.35vw, 7px);
  padding: clamp(8px, 2.3vw, 11px);
  border: 2px solid #ba7e45;
  border-radius: 19px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 6%), transparent 35%),
    radial-gradient(ellipse at 50% 0%, #315947, #17372e 65%, #102820);
  box-shadow:
    inset 0 0 0 3px rgb(34 18 10 / 52%),
    inset 0 4px 12px rgb(0 0 0 / 35%),
    0 8px 16px rgb(29 15 7 / 42%);
}

.lr-screen .lr-tile {
  min-width: 0;
  border-color: rgb(255 250 229 / 79%);
  border-radius: clamp(9px, 2.6vw, 13px);
  background:
    linear-gradient(145deg, #fffdf3 0%, #f0e3c8 72%, #d8c5a1 100%);
  box-shadow:
    0 3px 0 #ae9873,
    0 5px 8px rgb(34 20 10 / 35%),
    inset 0 2px 3px rgb(255 255 255 / 92%),
    inset 0 -3px 5px rgb(93 66 36 / 13%);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lr-screen .lr-tile::after {
  position: absolute;
  inset: 3px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.lr-screen .lr-food-art {
  display: block;
  width: 94%;
  height: 94%;
  overflow: visible;
  filter: drop-shadow(0 3px 2px rgb(51 29 16 / 31%));
  pointer-events: none;
}

.lr-screen .lr-tile[aria-pressed="true"] {
  z-index: 1;
  outline: 2px solid #fff0a1;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgb(242 188 72 / 85%), 0 0 19px rgb(255 216 102 / 75%);
}

.lr-screen .lr-tile-empty {
  border-color: rgb(240 211 162 / 26%);
  background: linear-gradient(145deg, #26483a, #173329);
  box-shadow: inset 0 2px 8px rgb(0 0 0 / 35%);
}

.lr-screen .lr-goals {
  flex-wrap: wrap;
}

.lr-screen .lr-goal {
  border-color: rgb(245 208 142 / 35%);
  background: linear-gradient(145deg, rgb(30 51 39 / 95%), rgb(15 30 24 / 96%));
  box-shadow: inset 0 1px rgb(255 255 255 / 9%), 0 4px 10px rgb(0 0 0 / 22%);
}

.lr-screen .lr-goal-art {
  flex: 0 0 27px;
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 30%));
}

.lr-screen .lr-meta {
  color: #ead7b4;
  font-variant-numeric: tabular-nums;
}

.lr-screen .lr-moves {
  color: #ffe39c;
}

.lr-screen .lr-boosters {
  flex-wrap: wrap;
}

.lr-screen .lr-booster {
  width: min(30%, 100px);
  min-width: 76px;
  border-color: rgb(243 205 135 / 38%);
  background: linear-gradient(155deg, #254538, #132a23 78%);
  box-shadow: 0 5px 0 #0b1812, 0 8px 14px rgb(0 0 0 / 29%), inset 0 1px rgb(255 255 255 / 11%);
  transition: transform 130ms ease, filter 130ms ease;
}

.lr-screen .lr-booster:active {
  transform: translateY(3px);
  filter: brightness(1.12);
  box-shadow: 0 2px 0 #0b1812;
}

.lr-screen .lr-booster svg {
  filter: drop-shadow(0 0 5px rgb(244 202 120 / 24%));
}

.lr-screen .lr-hint {
  max-width: 100%;
  color: #f7dda5;
  text-shadow: 0 1px 6px rgb(0 0 0 / 75%);
}

.lr-screen .lr-exit {
  color: #efdab9;
}

/* Keep the active board and its controls together on tall phone screens. */
.lr-screen .lr-main {
  justify-content: center;
  padding-block: 10px 14px;
}

.lr-screen .lr-table {
  margin: 0 auto;
}

.lr-screen .lr-boosters {
  margin: clamp(12px, 2.5dvh, 22px) auto 0;
  padding-top: 0;
}

.lr-screen .lr-hint {
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  margin: 9px auto 0;
  padding: 8px 13px;
  border: 1px solid rgb(245 208 142 / 28%);
  border-radius: 999px;
  background: linear-gradient(125deg, rgb(18 42 36 / 88%), rgb(25 35 40 / 88%));
  box-shadow: 0 8px 20px rgb(0 0 0 / 24%), inset 0 1px rgb(255 255 255 / 9%);
  line-height: 1.4;
  animation: lr-feedback-in 240ms cubic-bezier(.2,.75,.3,1) both;
}

.lr-screen .lr-tile-merged {
  z-index: 1;
  animation: lr-tile-merge 430ms cubic-bezier(.2,.8,.25,1.2) both;
}

.lr-screen .lr-tile-merged::before {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle, rgb(255 235 164 / 88%), rgb(255 211 105 / 35%) 42%, transparent 72%);
  content: "";
  pointer-events: none;
  animation: lr-merge-flare 430ms ease-out both;
}

@keyframes lr-feedback-in {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lr-tile-merge {
  0% { transform: scale(.78); filter: brightness(1.35); }
  58% { transform: scale(1.1); filter: brightness(1.16); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes lr-merge-flare {
  0% { opacity: .95; transform: scale(.72); }
  100% { opacity: 0; transform: scale(1.28); }
}

.lr-screen button:focus-visible {
  outline-color: #ffe49a;
  box-shadow: 0 0 0 4px rgb(248 201 95 / 26%);
}

.lr-screen .lr-board {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(3px, 1.2vw, 6px);
  padding: clamp(6px, 1.8vw, 9px);
}

.lr-screen .lr-food-art {
  position: relative;
  width: 94%;
  height: 94%;
  display: block;
  background-image: url("./assets/lezzet-food-sprites.png");
  background-repeat: no-repeat;
  background-size: 500% 100%;
  background-position: var(--lr-food-position);
}

.lr-screen .lr-food--tomato { --lr-food-position: 0% 50%; }
.lr-screen .lr-food--cheese { --lr-food-position: 25% 50%; }
.lr-screen .lr-food--bread { --lr-food-position: 50% 50%; }
.lr-screen .lr-food--steak { --lr-food-position: 75% 50%; }
.lr-screen .lr-food--donut { --lr-food-position: 100% 50%; }

.lr-screen .lr-food-level {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1px solid #fff3cf;
  border-radius: 50%;
  background: #b86b28;
  color: #fff9e9;
  font: 700 8px/1 system-ui, sans-serif;
  font-style: normal;
  box-shadow: 0 1px 4px #452411;
}

.lr-screen .lr-tile-empty {
  background:
    repeating-linear-gradient(135deg, rgb(7 28 21 / 70%) 0 5px, transparent 5px 10px),
    linear-gradient(145deg, #27483b, #163329);
}

.lr-screen .lr-goals { gap: 5px; }
.lr-screen .lr-goal { gap: 4px; padding-inline: 6px; }
.lr-screen .lr-goal-art { width: 24px; height: 24px; }

@media (max-width: 380px) {
  .lr-screen .lr-board { gap: 3px; padding: 6px; }
  .lr-screen .lr-table { padding-inline: 8px; }
}

@media (max-width: 420px) {
  .lr-screen .lr-main { padding-inline: 16px; }
  .lr-screen .lr-table { padding-inline: 10px; }
  .lr-screen .lr-board { gap: 4px; padding: 6px; }
  .lr-screen .lr-tile { border-radius: 10px; }
}

@media (max-height: 760px) {
  .lr-screen {
    min-height: min(560px, 100dvh);
  }
  .lr-screen .lr-scene-title p {
    display: none;
  }
}

@media (max-width: 380px) {
  .lr-screen .lr-player-row {
    gap: 5px;
    margin-inline: 1px;
  }
  .lr-screen .lr-avatar {
    width: 34px;
    height: 34px;
  }
  .lr-screen .lr-goal {
    padding-inline: 6px;
    font-size: 9px;
  }
  .lr-screen .lr-booster {
    min-width: 70px;
    width: 29%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lr-screen .lr-tile,
  .lr-screen .lr-booster,
  .lr-screen .lr-tile-merged,
  .lr-screen .lr-hint {
    transition: none;
    animation: none;
  }
}

.lr-screen.lr-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0;
}

@media (max-width: 360px) and (max-height: 620px) {
  .lr-screen .lr-topbar { height: 58px; padding: 8px 14px; }
  .lr-screen .lr-main {
    height: calc(100% - 58px);
    justify-content: flex-start;
    padding: 4px 10px 6px;
  }
  .lr-screen .lr-table { margin-top: 4px; padding: 8px 8px 9px; }
  .lr-screen .lr-player-row { margin-bottom: 8px; }
  .lr-screen .lr-board { gap: 3px; padding: 5px; }
  .lr-screen .lr-goals,
  .lr-screen .lr-meta { margin-top: 7px; }
  .lr-screen .lr-boosters { gap: 7px; margin-top: 8px; }
  .lr-screen .lr-hint {
    width: 100%;
    padding: 6px 8px;
    border-radius: 12px;
    font-size: 9px;
    line-height: 1.3;
    white-space: normal;
  }
}
