:root {
  --bg-sky: #79d8ff;
  --bg-sky-deep: #4197ff;
  --panel: #efc184;
  --panel-border: #8b4e26;
  --panel-shadow: rgba(45, 20, 0, 0.22);
  --ink: #201514;
  --gold: #ffb516;
  --gold-dark: #b76200;
  --blue-soft: rgba(255, 255, 255, 0.25);
  --green: #71d66f;
  --green-dark: #2d9151;
  --shadow: rgba(12, 38, 74, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.5) 0 6%, transparent 6.5%),
    radial-gradient(circle at 75% 14%, rgba(255, 255, 255, 0.38) 0 5%, transparent 5.5%),
    linear-gradient(180deg, var(--bg-sky) 0%, var(--bg-sky-deep) 100%);
  color: var(--ink);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 17px;
  overflow: hidden;
}

body {
  image-rendering: pixelated;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.screen.active {
  display: flex;
}

.panel,
.menu-card {
  position: relative;
  background: linear-gradient(180deg, #f4c98d 0%, #e8b577 100%);
  border: 4px solid var(--panel-border);
  box-shadow: 0 16px 0 rgba(89, 49, 20, 0.16), 0 28px 50px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
}

.menu-card {
  width: min(1360px, calc(100vw - 24px));
  min-height: min(94vh, 840px);
  padding: 28px 30px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.menu-card h1,
.panel h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3.7vw, 3.45rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.menu-card p,
.panel p {
  margin: 10px 0 0;
  font-size: 1rem;
  color: rgba(32, 21, 20, 0.8);
}

.menu-card p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.menu-card h1 {
  font-size: clamp(3.8rem, 7vw, 6.8rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.menu-hero {
  position: relative;
  width: min(1180px, 100%);
  height: min(72vh, 690px);
  margin: 0 auto;
  border-radius: 24px;
  border: 3px solid rgba(126, 73, 35, 0.35);
  background: linear-gradient(180deg, #bde8ff 0%, #7dd7ff 100%);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.menu-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  display: block;
}

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 700;
  color: #1f4e4b;
}

.tag.active {
  background: rgba(255, 181, 22, 0.85);
  color: #562a00;
}

.menu-actions,
.tag-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.menu-actions {
  padding-top: 0;
}

.primary-btn,
.secondary-btn,
.option-card button,
.icon-close {
  border: 3px solid var(--gold-dark);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.menu-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-btn,
.secondary-btn {
  min-width: 220px;
  padding: 18px 28px;
  font-size: 1.34rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.primary-btn {
  background: linear-gradient(180deg, #ffd25b 0%, var(--gold) 100%);
  color: #3c2100;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.72);
  color: #2a2a2a;
}

.primary-btn:hover,
.secondary-btn:hover,
.option-card button:hover,
.icon-close:hover,
.avatar-choice:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.primary-btn:active,
.secondary-btn:active,
.option-card button:active,
.icon-close:active,
.avatar-choice:active {
  transform: translateY(0);
}

.wide {
  width: 100%;
}

.large-panel {
  width: min(960px, 100%);
  padding: 24px;
}

.creator-panel {
  width: min(1500px, calc(100vw - 20px));
  min-height: min(94vh, 920px);
  padding: 34px 38px 32px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.creator-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.15fr) minmax(500px, 1fr);
  gap: 34px;
  align-items: stretch;
}

.creator-options,
.creator-preview {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

#creatorScreen {
  padding: 10px;
}

#creatorScreen .panel-header {
  margin-bottom: 24px;
}

#creatorScreen .panel-header h2 {
  font-size: clamp(3rem, 5vw, 5rem);
  letter-spacing: 0.03em;
}

#creatorScreen .field {
  gap: 12px;
}

#creatorScreen .field span {
  font-size: 1.24rem;
}

.field,
.range-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
}

.field input,
.range-field input {
  border: 3px solid rgba(126, 73, 35, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.82);
}

#creatorScreen .field input {
  min-height: 72px;
  padding: 18px 20px;
  font-size: 1.45rem;
  font-weight: 900;
}

.selector-title {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.avatar-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 360px;
  padding: 24px 22px;
  border: 3px solid rgba(126, 73, 35, 0.35);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.avatar-choice.selected {
  border-color: var(--gold-dark);
  background: rgba(255, 226, 143, 0.9);
  box-shadow: 0 18px 34px rgba(183, 98, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.avatar-choice img {
  width: 288px;
  height: 216px;
  object-fit: none;
  object-position: left top;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 10px rgba(74, 41, 16, 0.16));
}

.avatar-choice img.full-avatar {
  object-fit: contain;
  object-position: center;
  image-rendering: pixelated;
}

.avatar-choice span {
  font-size: clamp(1.8rem, 2.3vw, 2.45rem);
  letter-spacing: 0.04em;
  line-height: 1;
}

.preview-window,
.inventory-avatar {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #c4eeff 0%, #7fd6ff 60%, #53c46a 61%, #3ba45f 100%);
  border: 3px solid rgba(126, 73, 35, 0.35);
}

.preview-window img,
.inventory-avatar img {
  width: 120px;
  height: 84px;
  object-fit: none;
  object-position: left top;
  image-rendering: pixelated;
  z-index: 1;
}

.preview-window img.full-avatar,
.inventory-avatar img.full-avatar {
  object-fit: contain;
  object-position: center;
  image-rendering: pixelated;
}

.preview-window {
  min-height: 560px;
  border-radius: 24px;
  align-items: end;
  justify-items: center;
  padding-bottom: clamp(8px, 2%, 18px);
}

.preview-window img {
  width: 720px;
  height: 540px;
  filter: drop-shadow(0 18px 18px rgba(60, 32, 8, 0.22));
}

#creatorScreen .primary-btn.wide {
  min-height: 78px;
  font-size: 1.7rem;
}

.preview-sky,
.preview-ground {
  position: absolute;
  inset: 0;
}

.preview-ground {
  inset: auto 0 0;
  height: 42%;
  background:
    radial-gradient(circle at 30% 42%, rgba(255, 255, 255, 0.85) 0 4px, transparent 4.5px),
    radial-gradient(circle at 66% 55%, rgba(255, 255, 255, 0.85) 0 4px, transparent 4.5px),
    linear-gradient(180deg, rgba(109, 207, 107, 0) 0%, rgba(72, 169, 85, 0.2) 20%, rgba(62, 159, 79, 1) 21%, rgba(62, 159, 79, 1) 100%);
}

.tutorial-panel,
.loading-panel {
  width: min(640px, 100%);
  padding: 28px;
  text-align: center;
}

.tutorial-keys {
  position: relative;
  width: 210px;
  height: 165px;
  margin: 0 auto 16px;
}

.key {
  position: absolute;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 3px solid #68789a;
  background: linear-gradient(180deg, #edf2ff 0%, #cad3ee 100%);
  font-size: 1.4rem;
  font-weight: 900;
  color: #2a345b;
  box-shadow: 0 8px 0 rgba(76, 89, 132, 0.2);
  animation: pulseKey 1.3s ease-in-out infinite;
}

.key-w { left: 74px; top: 0; animation-delay: 0s; }
.key-a { left: 0; top: 74px; animation-delay: 0.1s; }
.key-s { left: 74px; top: 74px; animation-delay: 0.2s; }
.key-d { left: 148px; top: 74px; animation-delay: 0.3s; }

@keyframes pulseKey {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.04); }
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.loading-dots span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(41, 81, 145, 0.28);
  animation: blinkDot 1s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes blinkDot {
  0%, 100% { transform: scale(0.75); background: rgba(41, 81, 145, 0.3); }
  50% { transform: scale(1.1); background: rgba(41, 81, 145, 0.85); }
}

#gameShell {
  justify-content: center;
  padding: 0;
}

#gameCanvas {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: linear-gradient(180deg, #55c5ff 0%, #1979ff 100%);
  display: block;
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#hud {
  position: absolute;
  top: 34px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.hud-left > *,
.hud-right-cluster > *,
#questPanel,
#hotbar,
#toastHint {
  pointer-events: auto;
}

.mobile-controls {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px;
  pointer-events: none;
  z-index: 18;
}

.mobile-controls-left,
.mobile-controls-right {
  display: flex;
  align-items: flex-end;
}

.mobile-controls-right {
  flex-direction: column;
  gap: 12px;
}

.mobile-stick-base,
.mobile-action-button {
  pointer-events: auto;
  touch-action: none;
}

.mobile-stick-base {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 2px solid rgba(255, 233, 176, 0.3);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.2), transparent 55%),
    rgba(8, 28, 54, 0.48);
  box-shadow: inset 0 10px 24px rgba(255, 255, 255, 0.06), 0 16px 30px rgba(0, 0, 0, 0.22);
}

.mobile-stick-base::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 240, 202, 0.2);
}

.mobile-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  margin-top: -29px;
  border-radius: 50%;
  border: 2px solid rgba(255, 245, 215, 0.45);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.24), transparent 52%),
    linear-gradient(180deg, rgba(255, 197, 100, 0.92), rgba(184, 97, 10, 0.95));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: translate(0px, 0px);
}

.mobile-action-button {
  min-width: 96px;
  min-height: 56px;
  padding: 12px 18px;
  border: 2px solid rgba(255, 228, 161, 0.45);
  border-radius: 18px;
  background: rgba(7, 26, 54, 0.78);
  color: #fff3d0;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.mobile-action-primary {
  background: linear-gradient(180deg, rgba(255, 191, 72, 0.95), rgba(192, 107, 16, 0.95));
  color: #2c1405;
  border-color: rgba(255, 242, 188, 0.72);
}

.mobile-rotate-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 16, 34, 0.38);
  backdrop-filter: blur(6px);
  z-index: 26;
}

.mobile-rotate-card {
  width: min(420px, calc(100vw - 32px));
  padding: 20px 18px 18px;
  border-radius: 22px;
  border: 3px solid rgba(255, 229, 172, 0.36);
  background: linear-gradient(180deg, rgba(11, 32, 66, 0.96), rgba(15, 44, 90, 0.96));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
  color: #fff7df;
  text-align: center;
}

.mobile-rotate-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 181, 22, 0.16);
  color: #ffd676;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-rotate-card h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.04;
}

.mobile-rotate-card p {
  margin: 12px 0 0;
  color: rgba(255, 247, 223, 0.88);
  line-height: 1.45;
}

.hud-left,
.hud-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hud-right-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.hud-action-stack {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resource-pill,
.objective-card,
.hint-bar,
.hotbar {
  backdrop-filter: blur(10px);
}

.resource-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(9, 32, 68, 0.48);
  color: white;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.resource-pill-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.resource-pill-button:disabled {
  cursor: default;
  opacity: 0.64;
}

.resource-pill img {
  width: 24px;
  height: 24px;
}

.energy-pill {
  min-width: 138px;
}

.pill-metric {
  display: flex;
  min-width: 86px;
  flex-direction: column;
  gap: 4px;
}

.carrot-pill .pill-metric {
  min-width: 62px;
}

.pill-subtext {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 241, 184, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.energy-bar {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.energy-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #78d84f 0%, #d3df63 65%, #f8b95c 100%);
  transition: width 120ms ease, background 120ms ease;
}

.resource-pill.accent {
  background: rgba(73, 20, 102, 0.54);
}

.resource-pill.relic-pill {
  background: rgba(114, 82, 18, 0.66);
  color: #fff4cf;
}

.hud-right {
  flex-direction: column;
  align-items: stretch;
  min-width: 230px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(9, 32, 68, 0.48);
  color: white;
}

.hud-right.hidden {
  display: none;
}

.hud-settings-button {
  align-self: flex-end;
  min-width: 138px;
  min-height: 46px;
  padding: 10px 16px;
  border: 2px solid rgba(255, 211, 111, 0.45);
  border-radius: 16px;
  background: rgba(9, 32, 68, 0.58);
  color: #fff3d0;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.hud-settings-button:hover {
  background: rgba(18, 46, 92, 0.72);
}

.hud-settings-button.secondary-action {
  min-width: 110px;
  color: #ffe8aa;
}

.hud-settings-button.secondary-action.active {
  background: rgba(255, 189, 40, 0.28);
  border-color: rgba(255, 219, 122, 0.8);
  color: #fff8da;
}

.level-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
  font-size: 0.98rem;
}

.xp-bar {
  height: 14px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.14);
}

#xpFill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  display: block;
  background: linear-gradient(90deg, #7eff86 0%, #40d95b 58%, #1cab46 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.hud-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-panel-title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

.hud-accordion-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid rgba(255, 211, 111, 0.5);
  border-radius: 12px;
  background: rgba(255, 184, 33, 0.22);
  color: #fff2cc;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

.hotbar {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: min(1120px, calc(100vw - 200px));
  padding: 18px 22px;
  border-radius: 28px;
  background: rgba(9, 32, 68, 0.58);
  color: white;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.hotbar-head {
  align-items: center;
}

.hotbar-main {
  display: block;
}

.inventory-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
}

.inventory-slot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
  height: 60px;
  padding: 0 10px 0 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.1);
  font-weight: 900;
  font-size: 1.4rem;
}

button.inventory-slot {
  cursor: pointer;
}

.seed-slot.active {
  background: rgba(255, 204, 90, 0.2);
  border-color: rgba(255, 222, 133, 0.78);
  box-shadow: 0 0 0 2px rgba(255, 226, 141, 0.16) inset;
}

.inventory-slot img {
  width: 38px;
  height: 38px;
}

.hud-feedback-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.inventory-slot.reward-pulse,
.resource-pill.reward-pulse {
  animation: rewardPulse 0.72s ease;
}

.hud-float-label {
  position: absolute;
  transform: translate(-50%, 0) scale(0.8);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 22, 40, 0.86);
  color: #fff5d7;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.hud-float-label.active {
  animation: hudFloatLabel 0.95s ease forwards;
}

.hud-fly-icon {
  position: absolute;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0.96;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
  transition:
    left 5s cubic-bezier(0.2, 0.9, 0.2, 1),
    top 5s cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 5s ease,
    transform 5s ease;
}

@keyframes rewardPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 225, 129, 0);
  }
  35% {
    transform: scale(1.06);
    box-shadow: 0 0 0 3px rgba(255, 225, 129, 0.26), 0 0 22px rgba(255, 219, 105, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 225, 129, 0);
  }
}

@keyframes hudFloatLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.82);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -2px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -34px) scale(1.02);
  }
}

.hotbar.collapsed {
  min-width: 300px;
  padding: 14px 16px;
}

.hotbar.collapsed .hotbar-main {
  display: none;
}

.task-dock {
  position: absolute;
  left: 40px;
  top: 136px;
  width: min(360px, calc(100vw - 80px));
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(14, 38, 77, 0.9) 0%, rgba(7, 22, 49, 0.86) 100%);
  border: 1px solid rgba(255, 236, 183, 0.12);
  color: white;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  z-index: 4;
}

.task-dock::before {
  content: "";
  position: absolute;
  inset: 10px 12px auto;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.quest-dock {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.task-dock-head,
.task-dock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-dock-head {
  justify-content: space-between;
}

.task-dock-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.task-dock-kicker {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.task-dock-mode {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 181, 22, 0.2);
  color: #ffd676;
  font-size: 0.92rem;
  font-weight: 800;
}

.task-dock-text {
  margin-top: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 232, 183, 0.12);
  background:
    linear-gradient(180deg, rgba(7, 13, 30, 0.7) 0%, rgba(4, 9, 24, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.18);
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.42;
  color: rgba(255, 248, 233, 0.98);
}

.task-dock-text::before {
  content: "Current Objective";
  display: block;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 214, 118, 0.78);
}

.task-dock-actions {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.task-dock-actions::before {
  content: "Next Action";
  display: block;
  margin-bottom: -2px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.task-dock.collapsed {
  width: auto;
  min-width: 220px;
}

.task-dock.collapsed .task-dock-text,
.task-dock.collapsed .task-dock-actions {
  display: none;
}

.hint-bar {
  position: absolute;
  left: 50%;
  bottom: 138px;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 120px));
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(6, 10, 24, 0.84);
  color: white;
  font-size: 1rem;
  line-height: 1.45;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  z-index: 7;
  opacity: 0;
  pointer-events: none;
}

.hint-bar.visible {
  opacity: 1;
  animation: hintToastIn 0.2s ease-out;
}

.hint-bar.hidden {
  display: none;
}

.hint-bar-copy {
  margin: 0;
  text-align: center;
  font-weight: 800;
}

@keyframes hintToastIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(12px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.task-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.06) 100%);
  color: white;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.task-pill strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 214, 118, 0.12);
  color: #ffd676;
}

.task-pill span {
  flex: 1;
  line-height: 1.28;
}

.task-pill.primary {
  border-color: rgba(255, 181, 22, 0.3);
  background: rgba(255, 181, 22, 0.18);
}

.modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 18, 34, 0.5);
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-panel {
  width: min(680px, 100%);
  padding: 24px;
}

#buildModal .modal-panel,
#workbenchModal .modal-panel {
  width: min(1160px, 100%);
  padding: 22px;
}

.claim-panel {
  width: min(520px, 100%);
}

.claim-summary {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.claim-cost-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 3px solid rgba(126, 73, 35, 0.16);
  font-size: 1.35rem;
  font-weight: 900;
}

.claim-cost-chip img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.claim-footnote {
  color: rgba(32, 21, 20, 0.75);
  font-size: 1rem;
  font-weight: 800;
}

.settings-grid,
.market-body {
  display: grid;
  gap: 16px;
}

.settings-placeholder {
  display: grid;
  gap: 10px;
}

.settings-placeholder-label {
  font-size: 1rem;
  font-weight: 800;
}

.option-list {
  display: grid;
  gap: 14px;
}

.catalog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 18px;
  align-items: stretch;
}

.catalog-grid-panel,
.catalog-detail-panel {
  position: relative;
  min-height: 560px;
  border-radius: 26px;
  border: 4px solid rgba(126, 73, 35, 0.34);
  background:
    linear-gradient(180deg, rgba(233, 182, 117, 0.98) 0%, rgba(224, 169, 103, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 204, 0.6),
    0 16px 28px rgba(56, 24, 4, 0.14);
}

.catalog-grid-panel {
  padding: 18px 26px 18px 18px;
}

.catalog-detail-panel {
  padding: 18px;
}

.catalog-grid-head {
  margin-bottom: 16px;
  padding-right: 22px;
}

.catalog-grid-head strong {
  display: block;
  color: #fff8ef;
  font-size: 2.2rem;
  line-height: 1;
  text-shadow:
    4px 0 0 #221205,
    -4px 0 0 #221205,
    0 4px 0 #221205,
    0 -4px 0 #221205,
    3px 3px 0 #221205,
    -3px 3px 0 #221205,
    3px -3px 0 #221205,
    -3px -3px 0 #221205;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-right: 18px;
}

.catalog-card {
  appearance: none;
  border: 0;
  min-height: 118px;
  padding: 10px;
  border-radius: 0;
  background: #9f6148;
  box-shadow:
    inset 0 0 0 4px #9f6148,
    inset 0 0 0 8px #d7a36f;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.catalog-card.selected {
  background: #c8d6eb;
  box-shadow:
    inset 0 0 0 4px #c8d6eb,
    inset 0 0 0 8px #f0dfad,
    0 0 0 4px rgba(91, 136, 214, 0.44);
}

.catalog-card img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 6px rgba(71, 34, 7, 0.2));
}

.recipe-card img {
  width: 76px;
  height: 76px;
}

.placeholder-card {
  cursor: default;
  color: rgba(255, 244, 228, 0.82);
  font-size: 2.2rem;
  font-weight: 900;
}

.catalog-scroll-rail {
  position: absolute;
  top: 94px;
  right: 12px;
  bottom: 18px;
  width: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #946448 0%, #7e5339 100%);
}

.catalog-scroll-thumb {
  position: absolute;
  top: 18px;
  left: 1px;
  width: 12px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9099b8 0%, #636f96 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.catalog-tab-strip {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.catalog-tab {
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffc629 0%, #e7a713 100%);
  box-shadow:
    inset 0 0 0 4px #8a5318,
    0 4px 0 rgba(94, 48, 9, 0.3);
}

.catalog-tab img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-detail-frame {
  min-height: 100%;
  padding: 20px 24px 24px;
  border-radius: 0;
  border: 4px solid rgba(126, 73, 35, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 248, 223, 0.98) 0%, rgba(245, 225, 186, 0.98) 100%);
  display: flex;
  flex-direction: column;
}

.catalog-detail-frame h3 {
  margin: 0 0 18px;
  color: #fff8ef;
  font-size: 2.1rem;
  line-height: 1;
  text-shadow:
    4px 0 0 #221205,
    -4px 0 0 #221205,
    0 4px 0 #221205,
    0 -4px 0 #221205,
    3px 3px 0 #221205,
    -3px 3px 0 #221205,
    3px -3px 0 #221205,
    -3px -3px 0 #221205;
}

.catalog-detail-frame p {
  margin: 0 0 18px;
  color: rgba(75, 41, 16, 0.84);
  font-size: 1.18rem;
  line-height: 1.28;
}

.detail-stat-row,
.detail-resource-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
  background: rgba(232, 188, 115, 0.58);
}

.detail-stat-row {
  margin: 2px 0 24px;
}

.detail-stat-row span,
.detail-resource-line strong,
.detail-resource-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: #6a3916;
}

.detail-stat-row strong {
  color: #fff8ef;
  font-size: 1.9rem;
  text-shadow:
    3px 0 0 #221205,
    -3px 0 0 #221205,
    0 3px 0 #221205,
    0 -3px 0 #221205,
    2px 2px 0 #221205,
    -2px 2px 0 #221205,
    2px -2px 0 #221205,
    -2px -2px 0 #221205;
}

.detail-resource-list {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.detail-resource-line {
  border-top: 4px solid rgba(222, 193, 131, 0.58);
  border-bottom: 4px solid rgba(222, 193, 131, 0.58);
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.detail-resource-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.detail-resource-name img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.detail-flavor {
  min-height: 92px;
  margin: 18px 0 28px;
}

.option-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 3px solid rgba(126, 73, 35, 0.2);
}

.option-card.disabled {
  opacity: 0.52;
}

.option-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 181, 22, 0.18);
}

.option-icon img {
  width: 28px;
  height: 28px;
}

.option-icon.option-preview {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.option-icon.option-preview img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.option-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.14rem;
}

.option-copy span {
  display: block;
  font-size: 0.96rem;
  color: rgba(32, 21, 20, 0.75);
}

.cost-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(23, 51, 88, 0.1);
  font-size: 0.98rem;
  font-weight: 800;
}

.cost-chip img {
  width: 16px;
  height: 16px;
}

.option-card button,
.icon-close {
  padding: 10px 14px;
  background: linear-gradient(180deg, #ffd25b 0%, var(--gold) 100%);
  color: #3c2100;
  font-weight: 800;
}

.icon-close {
  min-width: 48px;
}

.sell-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 800;
}

.market-body {
  display: grid;
  gap: 18px;
  max-height: min(70vh, 760px);
  overflow-y: auto;
  padding-right: 6px;
}

.market-intro {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trade-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(110, 63, 30, 0.12);
  color: #5f3108;
  font-size: 0.92rem;
}

.trade-chip img {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
}

.market-trades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.trade-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 242, 220, 0.88) 100%);
  border: 3px solid rgba(139, 78, 38, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.stone-card {
  background:
    linear-gradient(180deg, rgba(239, 244, 251, 0.88) 0%, rgba(226, 234, 246, 0.96) 100%);
}

.crop-card {
  background:
    linear-gradient(180deg, rgba(247, 243, 222, 0.9) 0%, rgba(255, 239, 213, 0.96) 100%);
}

.wheat-card {
  background:
    linear-gradient(180deg, rgba(249, 236, 196, 0.92) 0%, rgba(245, 223, 165, 0.98) 100%);
}

.farm-buy-card {
  background:
    linear-gradient(180deg, rgba(230, 245, 221, 0.92) 0%, rgba(214, 236, 198, 0.98) 100%);
}

.restock-card {
  background:
    linear-gradient(180deg, rgba(234, 232, 251, 0.92) 0%, rgba(221, 226, 248, 0.98) 100%);
}

.trade-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trade-card-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
}

.trade-card-title img,
.trade-amount img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}

.trade-card-stock {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22, 49, 82, 0.08);
  color: rgba(32, 21, 20, 0.75);
  font-size: 0.88rem;
}

.trade-range {
  gap: 0;
}

.trade-range input[type="range"] {
  padding: 0;
  accent-color: #0c84ff;
  background: transparent;
}

.trade-summary {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
}

.trade-amount {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trade-arrow {
  color: #8b4e26;
  opacity: 0.76;
}

.trade-button {
  min-height: 48px;
}

.trade-static {
  justify-content: center;
}

.trade-footnote {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(54, 36, 20, 0.78);
}

.upgrade-card {
  background:
    linear-gradient(180deg, rgba(255, 247, 224, 0.95) 0%, rgba(247, 224, 184, 0.96) 100%);
  border-color: rgba(166, 104, 35, 0.26);
}

.restock-grid {
  display: grid;
  gap: 10px;
}

.restock-button {
  min-height: 44px;
}

.farm-panel {
  width: min(560px, 100%);
}

.farm-panel-body {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
}

.farm-preview-card {
  display: grid;
  place-items: center;
  min-height: 170px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 224, 140, 0.5), rgba(255, 255, 255, 0.72) 62%);
  border: 2px solid rgba(160, 103, 53, 0.18);
}

.farm-preview-card img {
  width: 88px;
  height: 88px;
  image-rendering: pixelated;
}

.farm-panel-copy {
  display: grid;
  gap: 16px;
}

.campfire-panel {
  width: min(580px, 100%);
}

.campfire-panel-body {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
}

.campfire-panel-copy {
  display: grid;
  gap: 14px;
}

.campfire-actions {
  display: grid;
  gap: 10px;
}

#marketModal .modal-panel,
#animalTraderModal .modal-panel {
  width: min(860px, 100%);
  max-height: min(86vh, 980px);
  overflow: hidden;
}

#storageChestModal .modal-panel {
  width: min(900px, 100%);
}

@media (max-width: 760px) {
  .modal {
    align-items: flex-start;
    padding: 12px;
    overflow-y: auto;
  }

  .modal-panel,
  #buildModal .modal-panel,
  #workbenchModal .modal-panel,
  #marketModal .modal-panel,
  #animalTraderModal .modal-panel,
  #storageChestModal .modal-panel,
  .inventory-panel,
  .storage-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 16px;
    overflow-y: auto;
  }

  .panel-header {
    gap: 12px;
    align-items: flex-start;
  }

  .panel-header-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .catalog-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .catalog-grid-panel,
  .catalog-detail-panel {
    min-height: 0;
    padding: 14px;
  }

  .catalog-grid-head {
    margin-bottom: 12px;
    padding-right: 0;
  }

  .catalog-grid-head strong,
  .catalog-detail-frame h3 {
    font-size: 1.55rem;
    text-shadow:
      2px 0 0 #221205,
      -2px 0 0 #221205,
      0 2px 0 #221205,
      0 -2px 0 #221205,
      2px 2px 0 #221205,
      -2px 2px 0 #221205,
      2px -2px 0 #221205,
      -2px -2px 0 #221205;
  }

  .catalog-tab-strip {
    gap: 8px;
    margin-bottom: 12px;
  }

  .catalog-tab {
    width: 44px;
    height: 44px;
  }

  .catalog-tab img {
    width: 24px;
    height: 24px;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-right: 0;
  }

  .catalog-card {
    min-height: 88px;
    padding: 8px;
  }

  .catalog-card img {
    width: 56px;
    height: 56px;
  }

  .catalog-scroll-rail {
    display: none;
  }

  .catalog-detail-frame {
    min-height: 0;
    padding: 16px;
  }

  .catalog-detail-frame p {
    font-size: 1rem;
    line-height: 1.34;
  }

  .detail-resource-list {
    gap: 10px;
    margin-top: 12px;
  }

  .detail-stat-row,
  .detail-resource-line {
    min-height: 46px;
    padding: 0 10px;
  }

  .detail-stat-row span,
  .detail-resource-line strong,
  .detail-resource-name {
    font-size: 1rem;
  }

  .detail-flavor {
    min-height: 0;
    margin: 14px 0 18px;
  }

  .farm-panel-body {
    grid-template-columns: 1fr;
  }

  .campfire-panel-body {
    grid-template-columns: 1fr;
  }
}

.trade-button:disabled,
.option-card button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: saturate(0.7);
}

.inventory-panel {
  width: min(900px, 100%);
}

.inventory-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}

.inventory-preview {
  display: grid;
  gap: 16px;
}

.inventory-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 800;
}

.inventory-cells {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.inventory-cell {
  min-height: 80px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 3px solid rgba(126, 73, 35, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
}

.inventory-cell img {
  width: 28px;
  height: 28px;
}

.storage-panel {
  width: min(920px, 100%);
}

.storage-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 20px;
}

.storage-column {
  display: grid;
  gap: 12px;
}

.storage-column h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.storage-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.storage-transfer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.storage-card {
  min-height: 104px;
  padding: 14px;
  border-radius: 18px;
  border: 3px solid rgba(126, 73, 35, 0.18);
  background: rgba(255, 255, 255, 0.68);
  display: grid;
  gap: 8px;
  justify-items: start;
  align-content: start;
  font-weight: 800;
  text-align: left;
}

button.storage-card {
  width: 100%;
  cursor: pointer;
}

.storage-card img {
  width: 30px;
  height: 30px;
}

.storage-card strong {
  font-size: 1rem;
}

.storage-card span {
  color: rgba(46, 28, 17, 0.78);
  font-size: 0.96rem;
}

.storage-card small {
  color: rgba(72, 47, 28, 0.72);
  font-size: 0.84rem;
  line-height: 1.3;
}

.storage-card.empty {
  background: rgba(255, 255, 255, 0.42);
  border-style: dashed;
  justify-items: center;
  text-align: center;
}

@media (max-width: 760px) {
  .storage-grid {
    grid-template-columns: 1fr;
  }

  .storage-transfer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.reward-panel {
  position: relative;
  overflow: hidden;
  width: min(760px, 100%);
  padding: 26px 30px 32px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255, 206, 112, 0.72) 0%, rgba(255, 206, 112, 0) 58%),
    linear-gradient(180deg, rgba(18, 20, 40, 0.92) 0%, rgba(8, 11, 28, 0.96) 100%);
  border: 4px solid rgba(255, 222, 139, 0.18);
  color: #24170e;
  box-shadow:
    0 26px 50px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 236, 186, 0.08);
}

.reward-panel.reveal-active {
  animation: rewardPanelReveal 0.52s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.reward-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.reward-halo {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 520px;
  height: 520px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 218, 141, 0.58) 0%, rgba(255, 197, 96, 0.28) 34%, rgba(255, 197, 96, 0) 68%);
  filter: blur(8px);
  animation: rewardHaloPulse 1.9s ease-in-out infinite;
}

.reward-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 640px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255, 247, 231, 0.24) 48%, rgba(255,255,255,0) 100%);
  filter: blur(12px);
  opacity: 0.78;
}

.reward-ray-a {
  transform: translate(-50%, -50%) rotate(18deg);
  animation: rewardSweepA 4.8s ease-in-out infinite;
}

.reward-ray-b {
  transform: translate(-50%, -50%) rotate(-16deg);
  animation: rewardSweepB 5.4s ease-in-out infinite;
}

.reward-ray-c {
  transform: translate(-50%, -50%) rotate(88deg);
  animation: rewardSweepC 6s ease-in-out infinite;
}

.reward-dust {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 209, 122, 0.62);
  box-shadow: 0 0 10px rgba(255, 209, 122, 0.5);
}

.reward-dust-a { left: 16%; top: 24%; animation: rewardDustFloat 4s ease-in-out infinite; }
.reward-dust-b { left: 78%; top: 18%; animation: rewardDustFloat 4.8s ease-in-out infinite 0.3s; }
.reward-dust-c { left: 20%; top: 72%; animation: rewardDustFloat 5.2s ease-in-out infinite 0.8s; }
.reward-dust-d { left: 82%; top: 68%; animation: rewardDustFloat 4.4s ease-in-out infinite 0.5s; }

.reward-star {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0.88;
  filter: drop-shadow(0 0 10px rgba(255, 222, 138, 0.48));
}

.reward-star::before,
.reward-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 251, 236, 1) 0%, rgba(255, 231, 159, 0.92) 100%);
  transform: translate(-50%, -50%);
}

.reward-star::before {
  width: 4px;
  height: 20px;
}

.reward-star::after {
  width: 20px;
  height: 4px;
}

.reward-star-a { left: 18%; top: 12%; animation: rewardStarTwinkle 2.8s ease-in-out infinite; }
.reward-star-b { left: 80%; top: 10%; animation: rewardStarTwinkle 3.4s ease-in-out infinite 0.4s; }
.reward-star-c { left: 13%; top: 54%; animation: rewardStarTwinkle 2.6s ease-in-out infinite 0.8s; }
.reward-star-d { left: 88%; top: 62%; animation: rewardStarTwinkle 3.1s ease-in-out infinite 1.2s; }
.reward-star-e { left: 68%; top: 24%; animation: rewardStarTwinkle 2.9s ease-in-out infinite 1.6s; }

.reward-modal.plan-reward {
  background:
    radial-gradient(circle at center, rgba(255, 202, 104, 0.18) 0%, rgba(255, 202, 104, 0) 46%),
    rgba(2, 4, 14, 0.78);
}

.reward-modal.plan-reward .reward-panel {
  width: min(860px, 100%);
  background:
    radial-gradient(circle at center, rgba(255, 196, 93, 0.16) 0%, rgba(255, 196, 93, 0) 38%),
    linear-gradient(180deg, rgba(17, 21, 46, 0.94) 0%, rgba(7, 10, 28, 0.97) 100%);
}

.reward-modal.plan-reward .reward-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 219, 143, 0.26) 0%, rgba(255, 219, 143, 0) 42%),
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,246,214,0.08) 50%, rgba(255,255,255,0) 100%);
  opacity: 0.92;
}

.reward-modal.celebration-reward {
  background:
    radial-gradient(circle at center, rgba(255, 199, 88, 0.16) 0%, rgba(255, 199, 88, 0) 56%),
    rgba(4, 7, 18, 0.56);
}

.reward-modal.spotlight-reward {
  background:
    radial-gradient(circle at center, rgba(255, 199, 88, 0.12) 0%, rgba(255, 199, 88, 0) 42%),
    rgba(1, 3, 10, 0.86);
}

.reward-modal:not(.hidden) {
  animation: rewardBackdropIn 0.3s ease-out;
}

.reward-label {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  color: rgba(255, 247, 226, 0.95);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(255, 206, 112, 0.28);
}

.reward-scroll {
  position: relative;
  margin: 0 auto 18px;
  max-width: 610px;
  padding: 18px 18px 30px;
  z-index: 1;
}

.reward-modal.plan-reward .reward-scroll::before,
.reward-modal.plan-reward .reward-scroll::after {
  content: "";
  position: absolute;
  top: 118px;
  width: 112px;
  height: 162px;
  border-radius: 16px;
  border: 2px solid rgba(243, 181, 96, 0.16);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 211, 124, 0.18) 0%, rgba(255, 211, 124, 0) 40%),
    linear-gradient(180deg, rgba(219, 150, 81, 0.12) 0%, rgba(124, 67, 39, 0.1) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  filter: blur(0.2px);
}

.reward-modal.plan-reward .reward-scroll::before {
  left: -28px;
  transform: rotate(-7deg);
}

.reward-modal.plan-reward .reward-scroll::after {
  right: -28px;
  transform: rotate(7deg);
}

.reward-scroll-roll {
  position: absolute;
  left: 50%;
  width: min(94%, 564px);
  height: 38px;
  transform: translateX(-50%);
  border: 4px solid #7e5536;
  border-radius: 999px;
  background: linear-gradient(180deg, #f5e9cf 0%, #d8b68a 100%);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16), 0 0 24px rgba(255, 211, 131, 0.24);
}

.reward-scroll-roll-top {
  top: 0;
}

.reward-scroll-roll-bottom {
  bottom: 0;
}

.reward-scroll-body {
  position: relative;
  z-index: 1;
  min-height: 440px;
  padding: 52px 44px 48px;
  border: 4px solid #7e5536;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 246, 208, 0.58) 0%, rgba(255, 246, 208, 0) 44%),
    linear-gradient(180deg, rgba(255, 248, 227, 0.96) 0%, rgba(240, 216, 175, 0.98) 100%);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.16), inset 0 0 26px rgba(255, 228, 169, 0.28);
}

.reward-scroll-body::before {
  content: "";
  position: absolute;
  inset: -8% -28%;
  background: linear-gradient(110deg, rgba(255,255,255,0) 18%, rgba(255,255,255,0.2) 48%, rgba(255,255,255,0) 78%);
  transform: translateX(-36%) rotate(-10deg);
  animation: rewardLightPass 4.4s ease-in-out infinite;
  pointer-events: none;
}

.reward-modal.plan-reward .reward-scroll-body::after {
  content: "";
  position: absolute;
  inset: 12% 8%;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 34%, rgba(255, 248, 225, 0.82) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 26%, rgba(255, 239, 203, 0.76) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 74%, rgba(255, 233, 186, 0.66) 0 2px, transparent 3px),
    radial-gradient(circle at 76% 78%, rgba(255, 243, 215, 0.74) 0 2px, transparent 3px),
    radial-gradient(circle at 52% 18%, rgba(255, 228, 166, 0.54) 0 3px, transparent 4px);
  opacity: 0.78;
}

.reward-preview {
  display: grid;
  place-items: center;
  position: relative;
  width: 184px;
  height: 156px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(255, 214, 118, 0.42) 0%, rgba(255, 214, 118, 0.08) 52%, transparent 74%),
    rgba(173, 133, 82, 0.14);
  border: 2px solid rgba(126, 85, 54, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 229, 0.6),
    0 10px 26px rgba(185, 123, 38, 0.16);
  animation: rewardGlow 1.8s ease-in-out infinite;
}

.reward-preview.hidden {
  display: none;
}

.reward-preview img {
  width: 132px;
  height: 132px;
  max-width: 138px;
  max-height: 126px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 10px rgba(105, 57, 12, 0.28));
}

.reward-preview.tool-preview img {
  width: 176px;
  height: 176px;
  max-width: none;
  max-height: none;
  filter: drop-shadow(0 12px 14px rgba(105, 57, 12, 0.34));
}

.reward-preview.plan-preview {
  width: 266px;
  height: 228px;
  border-radius: 26px;
  background:
    radial-gradient(circle at center, rgba(255, 225, 148, 0.72) 0%, rgba(255, 225, 148, 0.18) 44%, rgba(255, 225, 148, 0) 80%),
    rgba(173, 133, 82, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 229, 0.72),
    0 0 42px rgba(255, 193, 88, 0.34),
    0 20px 40px rgba(185, 123, 38, 0.24);
  animation: rewardPlanPulse 1.45s ease-in-out infinite;
}

.reward-preview.shimmer-preview {
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 229, 0.84),
    0 0 46px rgba(255, 201, 97, 0.38),
    0 20px 44px rgba(185, 123, 38, 0.26);
}

.reward-preview.shimmer-preview::before {
  content: "";
  position: absolute;
  inset: -18% -24%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.34) 0%, rgba(255, 251, 234, 0.18) 22%, rgba(255, 214, 118, 0) 70%);
  filter: blur(12px);
  opacity: 0.98;
  pointer-events: none;
}

.reward-preview.shimmer-preview::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, rgba(255,255,255,0) 0deg 18deg, rgba(255,243,209,0.72) 28deg, rgba(255,255,255,0) 42deg 118deg, rgba(255,225,163,0.52) 138deg, rgba(255,255,255,0) 154deg 228deg, rgba(255,243,209,0.66) 246deg, rgba(255,255,255,0) 264deg 334deg, rgba(255,243,209,0.62) 348deg, rgba(255,255,255,0) 360deg);
  filter: blur(10px);
  opacity: 0.84;
  animation: rewardStarSpin 6s linear infinite;
  pointer-events: none;
}

.reward-preview.plan-preview img {
  width: 188px;
  height: 188px;
  max-width: none;
  max-height: none;
  filter: drop-shadow(0 16px 20px rgba(105, 57, 12, 0.32));
}

.reward-preview.plan-preview::after {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.08) 34%, rgba(255,255,255,0) 72%);
  filter: blur(8px);
  opacity: 0.94;
}

.reward-preview.celebration-preview {
  width: 258px;
  height: 224px;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(255, 223, 130, 0.62) 0%, rgba(255, 223, 130, 0.12) 42%, rgba(255, 223, 130, 0) 78%),
    rgba(173, 133, 82, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 229, 0.78),
    0 0 38px rgba(255, 193, 88, 0.32),
    0 18px 40px rgba(185, 123, 38, 0.22);
}

.reward-preview.celebration-preview img {
  width: 188px;
  height: 188px;
  max-width: none;
  max-height: none;
  filter: drop-shadow(0 18px 20px rgba(105, 57, 12, 0.34));
}

@keyframes rewardGlow {
  0%, 100% { transform: translateY(0); box-shadow: inset 0 0 0 1px rgba(255, 248, 229, 0.6), 0 10px 26px rgba(185, 123, 38, 0.16); }
  50% { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 248, 229, 0.72), 0 16px 34px rgba(185, 123, 38, 0.24); }
}

@keyframes rewardPlanPulse {
  0%, 100% { transform: scale(1); box-shadow: inset 0 0 0 1px rgba(255, 248, 229, 0.72), 0 0 28px rgba(255, 193, 88, 0.24), 0 18px 34px rgba(185, 123, 38, 0.2); }
  50% { transform: scale(1.025); box-shadow: inset 0 0 0 1px rgba(255, 248, 229, 0.84), 0 0 38px rgba(255, 193, 88, 0.36), 0 22px 42px rgba(185, 123, 38, 0.24); }
}

@keyframes rewardCelebrationFloat {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: inset 0 0 0 1px rgba(255, 248, 229, 0.78), 0 0 38px rgba(255, 193, 88, 0.32), 0 18px 40px rgba(185, 123, 38, 0.22); }
  50% { transform: translateY(-4px) scale(1.03); box-shadow: inset 0 0 0 1px rgba(255, 248, 229, 0.9), 0 0 52px rgba(255, 193, 88, 0.46), 0 24px 48px rgba(185, 123, 38, 0.28); }
}

@keyframes rewardStarSpin {
  0% { transform: rotate(0deg) scale(0.96); opacity: 0.7; }
  50% { transform: rotate(180deg) scale(1.04); opacity: 1; }
  100% { transform: rotate(360deg) scale(0.96); opacity: 0.7; }
}

@keyframes rewardSpotlightFlash {
  0% { opacity: 0; }
  24% { opacity: 0.92; }
  100% { opacity: 0; }
}

@keyframes rewardSpotlightDrop {
  0% { opacity: 0; transform: translateY(-62px) scale(0.46) rotate(-12deg); filter: brightness(1.42); }
  58% { opacity: 1; transform: translateY(8px) scale(1.08) rotate(4deg); filter: brightness(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: brightness(1); }
}

@keyframes rewardSpotlightTitle {
  0% { opacity: 0; transform: translateY(16px) scale(0.88); letter-spacing: 0.18em; }
  70% { opacity: 1; transform: translateY(-4px) scale(1.04); letter-spacing: 0.08em; }
  100% { opacity: 1; transform: translateY(0) scale(1); letter-spacing: 0.04em; }
}

@keyframes rewardSpotlightBarRise {
  0% { opacity: 0; transform: translateX(-50%) translateY(30px) scaleY(0.72); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scaleY(1); }
}

@keyframes rewardSpotlightPromptPop {
  0% { opacity: 0; transform: scale(0.72); }
  72% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes rewardStarTwinkle {
  0%, 100% { transform: scale(0.74) rotate(0deg); opacity: 0.34; }
  35% { transform: scale(1.02) rotate(18deg); opacity: 0.96; }
  55% { transform: scale(0.82) rotate(34deg); opacity: 0.56; }
  78% { transform: scale(1.08) rotate(0deg); opacity: 1; }
}

.reward-title {
  font-size: clamp(2.2rem, 3.8vw, 3.55rem);
  font-weight: 900;
  color: #1e1208;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: normal;
}

.reward-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px auto 0;
}

.reward-stats.hidden {
  display: none;
}

.reward-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(126, 85, 54, 0.1);
  border: 2px solid rgba(126, 85, 54, 0.14);
  color: #5d3617;
  font-size: 0.94rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.reward-stat img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 4px rgba(112, 64, 12, 0.2));
}

.reward-icon {
  margin: 16px auto 14px;
  font-size: 1.28rem;
  width: 168px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 197, 90, 0.22);
  color: #7a4b1a;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reward-scroll-body p {
  margin: 14px auto 0;
  max-width: 454px;
  color: rgba(36, 23, 14, 0.82);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.45;
}

.reward-modal.plan-reward .reward-title {
  max-width: 700px;
  margin: 0 auto;
  font-size: clamp(2.45rem, 4.2vw, 3.95rem);
  line-height: 0.94;
  color: #201208;
  text-shadow:
    0 2px 0 rgba(255,255,255,0.08),
    0 0 26px rgba(255, 208, 122, 0.18);
}

.reward-modal.plan-reward .reward-scroll-body p {
  max-width: 470px;
  margin-top: 22px;
  color: rgba(36, 23, 14, 0.78);
  font-size: 1.08rem;
  line-height: 1.5;
}

.reward-modal.plan-reward .reward-stats {
  display: none !important;
}

.reward-modal.plan-reward #rewardContinue {
  min-width: 220px;
}

.reward-modal.celebration-reward .reward-title {
  font-size: clamp(2.45rem, 4vw, 3.95rem);
}

.reward-modal.celebration-reward .reward-scroll-body p {
  max-width: 470px;
  font-size: 1.1rem;
}

.reward-panel.reveal-active .reward-label {
  animation: rewardFadeUp 0.32s ease-out backwards;
}

.reward-panel.reveal-active .reward-scroll {
  animation: rewardScrollLand 0.56s cubic-bezier(0.2, 0.9, 0.2, 1) backwards;
}

.reward-panel.reveal-active .reward-scroll-roll-top {
  animation: rewardRollTopIn 0.44s cubic-bezier(0.18, 0.88, 0.22, 1) backwards;
}

.reward-panel.reveal-active .reward-scroll-roll-bottom {
  animation: rewardRollBottomIn 0.44s cubic-bezier(0.18, 0.88, 0.22, 1) backwards;
}

.reward-panel.reveal-active .reward-preview {
  animation:
    rewardPreviewBloom 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) 0.12s backwards,
    rewardGlow 1.8s ease-in-out 0.62s infinite;
}

.reward-panel.reveal-active .reward-preview.celebration-preview {
  animation:
    rewardPreviewBloom 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) 0.12s backwards,
    rewardCelebrationFloat 1.5s ease-in-out 0.62s infinite;
}

.reward-panel.reveal-active .reward-icon {
  animation: rewardFadeUp 0.34s ease-out 0.2s backwards;
}

.reward-panel.reveal-active .reward-title {
  animation: rewardFadeUp 0.36s ease-out 0.24s backwards;
}

.reward-panel.reveal-active .reward-stats {
  animation: rewardFadeUp 0.36s ease-out 0.32s backwards;
}

.reward-panel.reveal-active .reward-scroll-body p {
  animation: rewardFadeUp 0.36s ease-out 0.38s backwards;
}

.reward-panel.reveal-active #rewardContinue {
  animation: rewardButtonRise 0.38s ease-out 0.48s backwards;
}

.reward-modal.spotlight-reward .reward-panel {
  width: min(980px, 100%);
  min-height: 700px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 205, 102, 0.22) 0%, rgba(255, 205, 102, 0) 34%),
    radial-gradient(circle at center 34%, rgba(255, 239, 196, 0.08) 0%, rgba(255, 239, 196, 0) 28%),
    linear-gradient(180deg, rgba(10, 14, 33, 0.94) 0%, rgba(4, 8, 24, 0.97) 100%);
}

.reward-modal.spotlight-reward .reward-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.96) 0%, rgba(255,244,200,0.7) 12%, rgba(255,227,156,0.18) 30%, rgba(255,227,156,0) 58%);
  mix-blend-mode: screen;
}

.reward-modal.spotlight-reward .reward-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 210, 115, 0.16) 0%, rgba(255, 210, 115, 0) 42%),
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 24%),
    linear-gradient(0deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0) 24%);
  opacity: 0.92;
}

.reward-modal.spotlight-reward .reward-label {
  margin-bottom: 4px;
  font-size: 1.56rem;
  letter-spacing: 0.08em;
  color: #fff8ea;
  text-shadow:
    4px 0 0 #151111,
    -4px 0 0 #151111,
    0 4px 0 #151111,
    0 -4px 0 #151111,
    3px 3px 0 #151111,
    -3px 3px 0 #151111,
    3px -3px 0 #151111,
    -3px -3px 0 #151111,
    0 0 20px rgba(255, 222, 139, 0.22);
}

.reward-modal.spotlight-reward .reward-scroll {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.reward-modal.spotlight-reward .reward-scroll-roll {
  display: none;
}

.reward-modal.spotlight-reward .reward-scroll-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(116px, auto);
  align-content: start;
  justify-items: center;
  row-gap: 14px;
  width: 100%;
  padding: 18px 32px 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.reward-modal.spotlight-reward .reward-scroll-body::before {
  display: none;
}

.reward-modal.spotlight-reward .reward-icon {
  display: none !important;
}

.reward-modal.spotlight-reward .reward-preview {
  width: 260px;
  height: 260px;
  margin: 18px auto 6px;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(255, 236, 170, 0.92) 0%, rgba(255, 196, 105, 0.44) 28%, rgba(255, 196, 105, 0.1) 52%, rgba(255, 196, 105, 0) 78%);
  box-shadow: none;
  animation: rewardCelebrationFloat 1.8s ease-in-out infinite;
}

.reward-modal.spotlight-reward .reward-preview::before {
  content: "";
  position: absolute;
  inset: 16% 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.14) 52%, rgba(255,255,255,0) 78%);
  filter: blur(18px);
}

.reward-modal.spotlight-reward .reward-preview::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, rgba(255,255,255,0) 0deg 26deg, rgba(255,245,210,0.8) 40deg, rgba(255,255,255,0) 60deg 110deg, rgba(255,229,170,0.56) 132deg, rgba(255,255,255,0) 150deg 220deg, rgba(255,245,210,0.62) 238deg, rgba(255,255,255,0) 258deg 330deg, rgba(255,245,210,0.72) 346deg, rgba(255,255,255,0) 360deg);
  filter: blur(10px);
  opacity: 0.84;
  animation: rewardStarSpin 5.4s linear infinite;
}

.reward-modal.spotlight-reward .reward-preview img {
  position: relative;
  z-index: 1;
  width: 194px;
  height: 194px;
  max-width: none;
  max-height: none;
  filter: drop-shadow(0 16px 24px rgba(63, 30, 5, 0.42));
}

.reward-modal.spotlight-reward .reward-title {
  max-width: 820px;
  margin: 0 auto;
  color: #fdfcf8;
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  line-height: 0.9;
  text-align: center;
  text-shadow:
    5px 0 0 #16110f,
    -5px 0 0 #16110f,
    0 5px 0 #16110f,
    0 -5px 0 #16110f,
    4px 4px 0 #16110f,
    -4px 4px 0 #16110f,
    4px -4px 0 #16110f,
    -4px -4px 0 #16110f,
    0 0 18px rgba(255, 232, 188, 0.24);
}

.reward-modal.spotlight-reward .reward-stats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  width: min(760px, calc(100% - 84px));
  margin: 0 auto;
  min-height: 112px;
  padding: 20px 34px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(76, 52, 30, 0.86) 0%, rgba(182, 109, 31, 0.92) 20%, rgba(230, 150, 49, 0.98) 50%, rgba(182, 109, 31, 0.92) 80%, rgba(76, 52, 30, 0.86) 100%);
  border: 4px solid rgba(63, 29, 9, 0.78);
  box-shadow:
    inset 0 0 0 2px rgba(255, 220, 162, 0.2),
    0 20px 44px rgba(0, 0, 0, 0.34),
    0 0 42px rgba(255, 187, 88, 0.22);
}

.reward-modal.spotlight-reward .reward-stats::before {
  content: "";
  position: absolute;
  inset: 8px 18px auto;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.reward-modal.spotlight-reward .reward-stats::after {
  content: "";
  position: absolute;
  inset: -12% -4%;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 12%),
    radial-gradient(circle at 82% 50%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 12%);
  pointer-events: none;
  opacity: 0.84;
}

.reward-modal.spotlight-reward .reward-stat {
  position: relative;
  flex: 1 1 0;
  min-width: 186px;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 20px;
  background: rgba(12, 8, 10, 0.18);
  border-color: rgba(255, 235, 194, 0.18);
  color: #fff8e8;
  font-size: 1.16rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.18);
  text-shadow:
    2px 0 0 rgba(13, 8, 8, 0.7),
    -2px 0 0 rgba(13, 8, 8, 0.7),
    0 2px 0 rgba(13, 8, 8, 0.7),
    0 -2px 0 rgba(13, 8, 8, 0.7);
}

.reward-modal.spotlight-reward .reward-stats[data-count="1"] .reward-stat {
  flex-basis: 320px;
  max-width: 340px;
}

.reward-modal.spotlight-reward .reward-stat:not(:last-child)::after {
  content: "*";
  position: absolute;
  top: 50%;
  right: -24px;
  transform: translateY(-50%);
  color: #fff4ca;
  font-size: 1.08rem;
  text-shadow: 0 0 10px rgba(255, 245, 199, 0.4);
}

.reward-modal.spotlight-reward .reward-scroll-body p {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(760px, calc(100% - 84px));
  min-height: 116px;
  margin: 0;
  padding: 22px 26px;
  border-radius: 10px;
  border: 4px solid rgba(38, 27, 22, 0.92);
  background:
    linear-gradient(180deg, rgba(14, 15, 19, 0.98) 0%, rgba(4, 5, 8, 0.98) 100%);
  color: #fffdf7;
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.36;
  text-shadow:
    3px 0 0 #000,
    -3px 0 0 #000,
    0 3px 0 #000,
    0 -3px 0 #000,
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  text-align: center;
}

.reward-modal.spotlight-reward #rewardContinue {
  position: relative;
  justify-self: end;
  margin: 0 26px 8px auto;
  min-width: 126px;
  min-height: 56px;
  padding: 8px 18px;
  border-radius: 12px;
  border: 4px solid #7a7f8b;
  background: linear-gradient(180deg, #eef1f6 0%, #cdd3de 100%);
  color: #4f5562;
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    0 8px 18px rgba(0,0,0,0.28);
}

.reward-modal.spotlight-reward #rewardContinue:disabled {
  opacity: 0.72;
  filter: grayscale(0.18);
}

.reward-modal.spotlight-reward .reward-panel.reveal-active::before {
  animation: rewardSpotlightFlash 0.58s ease-out;
}

.reward-modal.spotlight-reward .reward-panel.reveal-active .reward-preview.spotlight-preview {
  animation:
    rewardSpotlightDrop 0.68s cubic-bezier(0.16, 0.88, 0.18, 1.08) 0.04s backwards,
    rewardCelebrationFloat 1.8s ease-in-out 0.72s infinite;
}

.reward-modal.spotlight-reward .reward-panel.reveal-active .reward-title {
  animation: rewardSpotlightTitle 0.46s cubic-bezier(0.2, 0.92, 0.18, 1) 0.22s backwards;
}

.reward-modal.spotlight-reward .reward-panel.reveal-active .reward-scroll-body p {
  animation: rewardSpotlightBarRise 0.42s ease-out 0.32s backwards;
}

.reward-modal.spotlight-reward .reward-panel.reveal-active #rewardContinue {
  animation: rewardSpotlightPromptPop 0.32s ease-out 0.48s backwards;
}

@keyframes rewardPanelReveal {
  0% { transform: scale(0.86); opacity: 0; }
  62% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes rewardBackdropIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes rewardHaloPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.98); opacity: 0.74; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

@keyframes rewardFadeUp {
  0% { opacity: 0; transform: translateY(18px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rewardScrollLand {
  0% { opacity: 0; transform: translateY(26px) scale(0.9); }
  60% { opacity: 1; transform: translateY(-6px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rewardRollTopIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(-18px) scaleX(0.86); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scaleX(1); }
}

@keyframes rewardRollBottomIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(18px) scaleX(0.86); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scaleX(1); }
}

@keyframes rewardPreviewBloom {
  0% { opacity: 0; transform: scale(0.56); filter: brightness(1.35); }
  65% { opacity: 1; transform: scale(1.06); filter: brightness(1.08); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

@keyframes rewardButtonRise {
  0% { opacity: 0; transform: translateY(18px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rewardLightPass {
  0%, 100% { transform: translateX(-42%) rotate(-10deg); opacity: 0.2; }
  50% { transform: translateX(30%) rotate(-10deg); opacity: 0.46; }
}

@keyframes rewardSweepA {
  0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) rotate(18deg) scaleX(0.82); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) rotate(18deg) scaleX(1.02); }
}

@keyframes rewardSweepB {
  0%, 100% { opacity: 0.14; transform: translate(-50%, -50%) rotate(-16deg) scaleX(0.78); }
  50% { opacity: 0.42; transform: translate(-50%, -50%) rotate(-16deg) scaleX(1.06); }
}

@keyframes rewardSweepC {
  0%, 100% { opacity: 0.1; transform: translate(-50%, -50%) rotate(88deg) scaleX(0.72); }
  50% { opacity: 0.28; transform: translate(-50%, -50%) rotate(88deg) scaleX(0.92); }
}

@keyframes rewardDustFloat {
  0%, 100% { transform: translateY(0) scale(0.9); opacity: 0.38; }
  50% { transform: translateY(-12px) scale(1.1); opacity: 0.9; }
}

.sky-deco {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.34) 0 4.2%, transparent 4.5%),
    radial-gradient(circle at 81% 14%, rgba(255, 255, 255, 0.28) 0 4.6%, transparent 4.9%),
    radial-gradient(circle at 24% 78%, rgba(255, 255, 255, 0.08) 0 0.8%, transparent 1%),
    radial-gradient(circle at 72% 72%, rgba(255, 255, 255, 0.08) 0 0.7%, transparent 0.9%);
  pointer-events: none;
}

@media (max-width: 960px) {
  .menu-card {
    width: min(100%, calc(100vw - 28px));
    min-height: auto;
    padding: 26px 20px 24px;
    gap: 18px;
  }

  .menu-card h1 {
    font-size: clamp(2.8rem, 10vw, 4.6rem);
  }

  .menu-hero {
    width: 100%;
    height: min(54vh, 420px);
  }

  .primary-btn,
  .secondary-btn {
    min-width: 180px;
    font-size: 1.12rem;
  }

  .creator-layout,
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .creator-panel {
    min-height: auto;
    padding: 24px 20px;
  }

  .avatar-choice {
    min-height: 240px;
    padding: 18px 14px;
  }

  .avatar-choice img,
  .preview-window img {
    width: 420px;
    height: 315px;
  }

  .preview-window {
    min-height: 360px;
  }

  #hud {
    left: 20px;
    right: 20px;
    top: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .hud-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: min(100%, 340px);
  }

  .hud-right-cluster {
    width: 100%;
    align-items: stretch;
  }

  .hud-right {
    min-width: 0;
    width: min(100%, 280px);
  }

  .level-top {
    font-size: 0.84rem;
  }

  .xp-bar {
    height: 10px;
  }

  .hud-action-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 280px);
  }

  .resource-pill {
    gap: 6px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 16px;
    font-size: 0.96rem;
  }

  .resource-pill img {
    width: 20px;
    height: 20px;
  }

  .energy-pill {
    min-width: 118px;
  }

  .pill-metric,
  .carrot-pill .pill-metric {
    min-width: 0;
    gap: 2px;
  }

  .pill-subtext {
    display: none;
  }

  .hud-settings-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
  }

  .hud-settings-button {
    align-self: stretch;
  }

  .task-dock {
    left: 20px;
    top: 120px;
    width: min(320px, calc(100vw - 40px));
    padding: 14px 14px 12px;
  }

  .task-dock-kicker {
    display: none;
  }

  .task-dock-mode {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.82rem;
  }

  .task-dock-text {
    min-height: 74px;
    padding: 12px 13px;
    font-size: 0.92rem;
    line-height: 1.32;
    display: grid;
    overflow: visible;
  }

  .task-dock-actions {
    gap: 8px;
  }

  .task-pill {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.86rem;
    gap: 6px;
  }

  .task-pill strong {
    min-width: 48px;
    min-height: 24px;
    padding: 2px 6px;
  }

  .task-pill span {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }

  .reward-modal.spotlight-reward .reward-panel {
    width: min(100%, calc(100vw - 32px));
    min-height: 0;
    gap: 10px;
    padding: 18px 18px 16px;
  }

  .reward-modal.spotlight-reward .reward-scroll-body {
    grid-template-rows: auto auto auto minmax(92px, auto);
    row-gap: 12px;
    padding: 10px 8px 4px;
  }

  .reward-modal.spotlight-reward .reward-preview {
    width: 208px;
    height: 208px;
    margin-top: 8px;
  }

  .reward-modal.spotlight-reward .reward-preview img {
    width: 154px;
    height: 154px;
  }

  .reward-modal.spotlight-reward .reward-label {
    font-size: 1.18rem;
  }

  .reward-modal.spotlight-reward .reward-title {
    font-size: clamp(2.4rem, 8vw, 4rem);
  }

  .reward-modal.spotlight-reward .reward-stats,
  .reward-modal.spotlight-reward .reward-scroll-body p {
    width: min(100%, calc(100% - 12px));
  }

  .reward-modal.spotlight-reward .reward-stats {
    gap: 12px;
    min-height: 88px;
    padding: 14px 16px;
    border-radius: 22px;
  }

  .reward-modal.spotlight-reward .reward-stat {
    min-width: 0;
    padding: 10px 12px;
    font-size: 1rem;
  }

  .reward-modal.spotlight-reward .reward-stat:not(:last-child)::after {
    right: -12px;
  }

  .reward-modal.spotlight-reward .reward-scroll-body p {
    min-height: 92px;
    padding: 16px 18px;
    font-size: 1.04rem;
  }

  .reward-modal.spotlight-reward #rewardContinue {
    margin: 0 6px 0 auto;
    min-width: 112px;
    min-height: 50px;
    font-size: 1.08rem;
  }

  .hint-bar {
    left: 20px;
    right: 20px;
    bottom: 108px;
    width: auto;
    transform: none;
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .mobile-controls:not([hidden]) {
    display: flex;
    padding: 18px 18px 150px;
  }

  .hotbar {
    left: 20px;
    right: 20px;
    bottom: 20px;
    transform: none;
    min-width: 0;
    padding: 12px 14px;
  }

  .hud-panel-title {
    font-size: 0.9rem;
  }

  .hotbar-main {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tool-slot {
    min-width: 72px;
    height: 58px;
    font-size: 1.08rem;
  }

  .inventory-slot {
    min-width: 72px;
    height: 50px;
    padding: 0 8px 0 4px;
    font-size: 0.92rem;
  }

  .inventory-slot img {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 960px) and (orientation: portrait) {
  #creatorScreen {
    padding: 6px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .creator-panel {
    width: min(100%, calc(100vw - 12px));
    min-height: auto;
    padding: 14px 12px 16px;
  }

  #creatorScreen .panel-header {
    margin-bottom: 10px;
  }

  #creatorScreen .panel-header h2 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .creator-layout {
    gap: 12px;
  }

  .creator-options,
  .creator-preview {
    gap: 12px;
  }

  #creatorScreen .field span {
    font-size: 0.96rem;
  }

  #creatorScreen .field input {
    min-height: 52px;
    padding: 10px 12px;
    font-size: 1.08rem;
  }

  .avatar-choice {
    min-height: 150px;
    padding: 10px 8px;
    gap: 8px;
    border-radius: 18px;
  }

  .avatar-choice img {
    width: 168px;
    height: 126px;
  }

  .avatar-choice span {
    font-size: 0.9rem;
  }

  .preview-window {
    min-height: 180px;
    padding-bottom: 6px;
  }

  .preview-window img {
    width: 260px;
    height: 195px;
  }

  #creatorScreen .primary-btn.wide {
    min-height: 54px;
    font-size: 1.08rem;
  }

  #hud {
    left: 14px;
    right: 14px;
    top: 14px;
    gap: 8px;
  }

  .hud-left {
    width: min(100%, 296px);
    gap: 6px;
  }

  .resource-pill {
    min-height: 40px;
    padding: 7px 9px;
    flex: 0 1 auto;
  }

  .resource-pill img {
    width: 18px;
    height: 18px;
  }

  .energy-pill {
    min-width: 104px;
  }

  .pill-metric {
    font-size: 0.88rem;
  }

  .hud-settings-button {
    min-width: 0;
    min-height: 36px;
    padding: 6px 9px;
    font-size: 0.76rem;
  }

  .hud-action-stack {
    width: min(100%, 228px);
  }

  .hud-right {
    width: min(100%, 228px);
  }

  .level-top {
    font-size: 0.72rem;
  }

  .task-dock {
    top: 92px;
    left: 14px;
    width: min(248px, calc(100vw - 28px));
    padding: 10px 10px 9px;
  }

  .task-dock.collapsed {
    width: auto;
    min-width: 0;
    padding: 4px;
    border-radius: 14px;
  }

  .task-dock.collapsed .task-dock-mode {
    display: none;
  }

  .task-dock.collapsed .task-dock-head {
    justify-content: flex-end;
    gap: 0;
  }

  .task-dock.collapsed .task-dock-head-actions {
    gap: 0;
  }

  .task-dock-head {
    gap: 6px;
  }

  .task-dock-head-actions {
    gap: 6px;
  }

  .hud-accordion-toggle {
    width: 30px;
    min-width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  .task-dock-text {
    min-height: 64px;
    padding: 10px 11px;
    font-size: 0.8rem;
  }

  .hint-bar {
    left: 14px;
    right: 14px;
    bottom: 232px;
    width: auto;
    padding: 10px 12px;
    font-size: 0.76rem;
  }

  .hotbar {
    left: 14px;
    right: 14px;
    bottom: 126px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 242, 196, 0.2);
    background: rgba(9, 32, 68, 0.78);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  }

  .hotbar.collapsed {
    display: none;
  }

  .hotbar.collapsed .hud-panel-title {
    font-size: 0.72rem;
  }

  .hotbar-head {
    gap: 6px;
  }

  .hotbar-main {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .hotbar-main::-webkit-scrollbar {
    display: none;
  }

  .inventory-strip {
    gap: 6px;
    min-width: max-content;
  }

  .inventory-slot {
    min-width: 72px;
    height: 50px;
    padding: 0 8px 0 4px;
    font-size: 0.98rem;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .inventory-slot img {
    width: 28px;
    height: 28px;
  }

  .mobile-controls:not([hidden]) {
    padding: 18px 14px 88px;
  }

  .mobile-stick-base {
    width: 100px;
    height: 100px;
  }

  .mobile-controls-left {
    margin-bottom: 16px;
  }

  .mobile-controls-right {
    gap: 10px;
    margin-bottom: 18px;
  }

  .mobile-action-button {
    min-width: 74px;
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.78rem;
  }
}
