:root {
  color-scheme: dark;
  --bg: #0f1020;
  --panel: #1a1b28;
  --panel-2: #212233;
  --panel-3: #2a2b3d;
  --line: rgba(255, 255, 255, 0.07);
  --accent: #6842ff;
  --accent-2: #8a6bff;
  --text: #fff;
  --muted: #aaadbe;
  --gold: #ffc21a;
  --green: #3ddc84;
  --danger: #ff4d6d;
  font-family:
    "Nunito",
    ui-rounded,
    "SF Pro Rounded",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
}
body {
  padding: 8px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
}
button:focus-visible,
canvas:focus-visible {
  outline: 3px solid #ffd84d;
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
img.ico {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- shell & hud ---------- */
.tf-shell {
  position: relative;
  width: min(960px, 100%);
  margin: 0 auto;
}
.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.brand-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(160deg, #8ee86b, #33a84a);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 3px 0 #1f6b2f;
}
.brand-icon::before,
.brand-icon::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 7px;
  top: 8px;
  border-radius: 100% 0;
  background: #fff;
}
.brand-icon::before {
  left: 4px;
  transform: rotate(-20deg);
}
.brand-icon::after {
  right: 4px;
  transform: scaleX(-1) rotate(-20deg);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}
.chip strong {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.chip-k {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 4px;
}
.chip-ready.hot {
  background: linear-gradient(180deg, #3a8f3a, #266b2a);
  border-color: rgba(157, 255, 106, 0.4);
}
.chip-ready.hot .chip-k {
  color: #d8ffc0;
}
.chip-saved {
  padding: 0 10px;
  font-size: 12px;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.4s;
}
.chip-saved.show {
  animation: saved 1.6s ease;
}
@keyframes saved {
  15%,
  70% {
    opacity: 1;
  }
}
.coin {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2a6, #ffcf2e 45%, #e79a00);
  box-shadow:
    inset 0 0 0 2px rgba(170, 100, 0, 0.45),
    inset 0 0 0 5px rgba(255, 230, 120, 0.7),
    0 1px 0 rgba(0, 0, 0, 0.3);
  vertical-align: -4px;
}
.coin-s {
  width: 14px;
  height: 14px;
  margin-right: 3px;
  vertical-align: -2px;
  box-shadow:
    inset 0 0 0 1.5px rgba(170, 100, 0, 0.5),
    inset 0 0 0 3.5px rgba(255, 230, 120, 0.7);
}
.chip-level {
  padding-left: 4px;
}
.lvl {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b39cff, var(--accent) 60%, #4a26d8);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 #2d168a;
  font-weight: 900;
  font-size: 14px;
}
.xp {
  display: grid;
  gap: 2px;
}
.xp-bar {
  display: block;
  width: 92px;
  height: 8px;
  border-radius: 99px;
  background: #11121e;
  overflow: hidden;
}
.xp-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a6bff, #c6b6ff);
  transition: width 0.35s ease;
}
.xp-text {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  line-height: 1;
}
.bump {
  animation: bump 0.35s ease;
}
@keyframes bump {
  40% {
    transform: scale(1.12);
  }
}

/* ---------- main layout ---------- */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
@media (min-width: 720px) {
  .main {
    grid-template-columns: minmax(0, 1fr) 292px;
  }
  .side {
    position: relative;
    min-height: 360px;
  }
  .side-inner {
    position: absolute;
    inset: 0;
  }
}
.farm,
.side-inner {
  min-width: 0;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.farm {
  padding: 6px;
}
.board-wrap {
  position: relative;
  aspect-ratio: 640 / 482;
  border-radius: 17px;
  overflow: hidden;
  background: #63c24a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.board-wrap.shake {
  animation: shake 0.3s;
}
#board {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 17px;
}
#board:focus-visible {
  outline-offset: -3px;
}

/* ---------- toolbar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: 6px;
}
.tools,
.seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}
.tool {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  width: 58px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--panel-3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 0 #15162a;
  cursor: pointer;
  transition:
    transform 0.12s,
    background 0.15s;
}
.tool svg {
  width: 24px;
  height: 24px;
}
.tool-name {
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
}
.tool kbd {
  position: absolute;
  top: 3px;
  right: 4px;
  font: 800 9px/1 inherit;
  color: rgba(255, 255, 255, 0.45);
}
.tool[aria-pressed="true"] {
  background: linear-gradient(180deg, #8a6bff, var(--accent));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 3px 0 #3a1fb0,
    0 6px 16px rgba(104, 66, 255, 0.45);
}
.tool[aria-pressed="true"] .tool-name,
.tool[aria-pressed="true"] kbd {
  color: #fff;
}
.tool:active {
  transform: translateY(2px);
}
.i-fill {
  fill: #ffd3b0;
  stroke: #b0764d;
  stroke-width: 1.5;
}
.i-soil {
  fill: #a8703f;
}
.i-leaf {
  fill: #6fdc5a;
  stroke: #2f8f3a;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.i-can {
  fill: #4fb4ff;
  stroke: #1f6fc4;
  stroke-width: 1.5;
}
.i-can-2 {
  fill: none;
  stroke: #1f6fc4;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.i-drop {
  fill: #9ddcff;
}
.i-handle {
  fill: none;
  stroke: #b07a45;
  stroke-width: 3;
}
.i-basket {
  fill: #e0a45f;
  stroke: #9a602a;
  stroke-width: 1.5;
}
.i-weave {
  stroke: #9a602a;
  stroke-width: 2;
}
.seed {
  display: grid;
  justify-items: center;
  align-content: center;
  width: 44px;
  height: 50px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--panel-2);
  box-shadow: 0 3px 0 #15162a;
  cursor: pointer;
  transition: transform 0.12s;
}
.seed img.ico {
  width: 28px;
  height: 28px;
}
.seed-cost {
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.seed.on {
  border-color: #ffd84d;
  background: #2e2a45;
  box-shadow:
    0 3px 0 #15162a,
    0 0 14px rgba(255, 216, 77, 0.35);
}
.seed.poor .seed-cost {
  color: #ff9aa9;
}
.seed.locked {
  cursor: not-allowed;
}
.seed.locked img {
  filter: grayscale(1) brightness(0.55);
}
.seed.locked .seed-cost {
  color: var(--muted);
}
.seed:active {
  transform: translateY(2px);
}

/* ---------- radial menu ---------- */
.radial {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.radial[hidden] {
  display: none;
}
.radial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 30, 0.35);
  animation: fade 0.15s ease;
}
.radial-ring {
  position: absolute;
  width: 0;
  height: 0;
}
.radial-title {
  position: absolute;
  left: 0;
  margin: 0;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(20, 18, 40, 0.92);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  animation: fade 0.15s ease;
}
.rb {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 64px;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
  animation: popin 0.26s cubic-bezier(0.3, 1.6, 0.5, 1) both;
  animation-delay: var(--d, 0ms);
}
.rb-face {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #ffffff, #eef0ff 55%, #cfd2ea);
  box-shadow:
    0 4px 0 #8e91b3,
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 -3px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.12s;
}
.rb-face img.ico,
.rb-face svg {
  width: 36px;
  height: 36px;
}
.rb-label,
.rb-sub {
  display: flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  background: rgba(20, 18, 40, 0.9);
}
.rb-sub {
  font-size: 10px;
  color: #ffe58a;
}
.rb.poor .rb-sub {
  color: #ff9aa9;
}
.rb[aria-disabled="true"] .rb-face {
  filter: grayscale(0.9) brightness(0.7);
}
.rb.locked .rb-sub {
  display: none;
}
.rb:hover .rb-face {
  transform: scale(1.07);
}
.rb:active .rb-face {
  transform: scale(0.95);
}
.rb:focus-visible {
  outline: none;
}
.rb:focus-visible .rb-face {
  outline: 3px solid #ffd84d;
  outline-offset: 2px;
}
.radial-close {
  position: absolute;
  left: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 18, 40, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.radial-close svg,
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
}
@keyframes popin {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- toasts ---------- */
.toasts {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 6;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform: translateX(-50%);
  pointer-events: none;
  width: max-content;
  max-width: 94%;
}
.toast {
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(20, 18, 40, 0.92);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  animation: toast 1.9s ease forwards;
}
.toast.good {
  background: linear-gradient(180deg, #3ddc84, #1fa45c);
}
.toast.bad {
  background: linear-gradient(180deg, #ff6b85, #d63352);
}
@keyframes toast {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.9);
  }
  10%,
  80% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------- side panel ---------- */
.side-inner {
  display: flex;
  flex-direction: column;
  padding: 8px;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: #13141f;
}
.tab {
  position: relative;
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}
.tab[aria-selected="true"] {
  background: linear-gradient(180deg, #8a6bff, var(--accent));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 3px 10px rgba(104, 66, 255, 0.4);
}
.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--green);
  color: #06301a;
  font-size: 11px;
  vertical-align: 1px;
}
.tab-badge[hidden] {
  display: none;
}
.panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: #3a3b55 transparent;
}
.panel[hidden] {
  display: none;
}
.panel-note {
  margin: 2px 4px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.sec {
  margin: 4px 4px 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s;
}
.pill:active {
  transform: translateY(2px);
}
.pill-primary {
  background: linear-gradient(180deg, #8a6bff, var(--accent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 3px 0 #3a1fb0;
}
.pill-secondary {
  background: var(--panel-3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 0 #15162a;
}
.pill-gold {
  background: linear-gradient(180deg, #ffd84d, #f0a500);
  color: #3a2400;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 3px 0 #a86f00;
}
.pill-s {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}
.pill-big {
  min-height: 54px;
  padding: 0 40px;
  font-size: 19px;
}
.pill[aria-disabled="true"] {
  filter: grayscale(0.8) brightness(0.65);
  cursor: not-allowed;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--panel-3);
  cursor: pointer;
}
.icon-btn svg {
  stroke: var(--muted);
}
.shake {
  animation: shake 0.3s;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}

/* orders */
.order {
  position: relative;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2a2b3f, var(--panel-2));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.order.ready {
  border-color: rgba(61, 220, 132, 0.6);
  box-shadow:
    0 0 0 1px rgba(61, 220, 132, 0.3),
    0 0 18px rgba(61, 220, 132, 0.18);
}
.order.pop {
  animation: bump 0.4s ease;
}
.lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.line {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 4px;
  border-radius: 12px;
  background: #15162a;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.line img.ico {
  width: 32px;
  height: 32px;
}
.line b {
  color: #fff;
}
.line.ok {
  background: rgba(61, 220, 132, 0.16);
  color: #b8f5d0;
}
.line.ok b {
  color: #7dffb4;
}
.order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.reward {
  display: grid;
  gap: 2px;
}
.rw {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
  color: #ffe58a;
}
.rw-xp {
  font-size: 12px;
  color: #c9b8ff;
}
.order-btns {
  display: flex;
  gap: 6px;
}
.order.empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  border-style: dashed;
  background: transparent;
}
.order.empty p {
  margin: 0;
}
.order.empty b {
  color: #fff;
}
.truck {
  position: relative;
  width: 46px;
  height: 28px;
  flex: none;
  border-radius: 6px 12px 6px 6px;
  background: linear-gradient(90deg, #ff6152 0 62%, #4fb4ff 62%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
  animation: truck 0.6s ease-in-out infinite alternate;
}
.truck::before,
.truck::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2a2b3d;
  box-shadow: inset 0 0 0 3px #9da0b8;
}
.truck::before {
  left: 5px;
}
.truck::after {
  right: 5px;
}
@keyframes truck {
  to {
    transform: translateY(-2px);
  }
}

/* market & shop */
.market,
.shop,
.decor {
  margin: 0;
  padding: 0;
  list-style: none;
}
.m-row,
.s-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 6px 6px 6px 8px;
  border-radius: 14px;
  background: var(--panel-2);
}
.m-row.none {
  opacity: 0.6;
}
.m-name {
  flex: 1;
  min-width: 0;
  display: grid;
  font-weight: 900;
  font-size: 14px;
}
.m-name small {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.m-count {
  font-weight: 900;
  font-size: 15px;
  min-width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.m-row .pill-s {
  padding: 0 10px;
}
img.ico-l {
  width: 44px;
  height: 44px;
}
.s-row .pill-s {
  padding: 0 10px;
  font-size: 12px;
}
.tag {
  padding: 5px 10px;
  border-radius: 99px;
  background: #13141f;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.tag-ok {
  color: var(--green);
}
.decor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.d-card {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 14px;
  background: var(--panel-2);
  text-align: center;
}
.d-card.owned {
  background: rgba(61, 220, 132, 0.1);
}
.d-card.locked img {
  filter: grayscale(1) brightness(0.6);
}
img.ico-d {
  width: 48px;
  height: 48px;
}
.d-name {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}
.d-card small {
  color: #c9b8ff;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 2px;
}
.d-card .pill-s {
  min-height: 34px;
  padding: 0 10px;
}

/* ---------- overlays ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 10, 26, 0.72);
  backdrop-filter: blur(6px);
  animation: fade 0.25s ease;
}
.overlay[hidden] {
  display: none;
}
.card {
  position: relative;
  width: min(400px, 100%);
  padding: 24px 22px 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, #26274a, #1a1b28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  animation: cardin 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}
@keyframes cardin {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
}
.card h2 {
  margin: 6px 0 6px;
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(180deg, #fff, #d8ffc0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(31, 107, 47, 0.8));
}
.card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}
.card-art {
  display: flex;
  justify-content: center;
  gap: 2px;
}
.card-art img.ico {
  width: 54px;
  height: 54px;
  animation: hop 1.4s ease-in-out infinite;
}
.card-art img:nth-child(2) {
  animation-delay: 0.15s;
}
.card-art img:nth-child(3) {
  animation-delay: 0.3s;
}
.card-art img:nth-child(4) {
  animation-delay: 0.45s;
}
.card-art img:nth-child(5) {
  animation-delay: 0.6s;
}
@keyframes hop {
  0%,
  60%,
  100% {
    transform: none;
  }
  30% {
    transform: translateY(-8px) rotate(-6deg);
  }
}
.welcome {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(61, 220, 132, 0.12);
  color: #b8f5d0 !important;
}
.level-star {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: -64px auto 0;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: radial-gradient(circle at 40% 30%, #fff6b0, #ffd23c 45%, #f09a00);
  font-size: 28px;
  font-weight: 900;
  color: #7a4a00;
  animation: spinin 0.6s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.level-star span {
  margin-top: 8px;
}
.card-level {
  margin-top: 40px;
}
@keyframes spinin {
  from {
    transform: scale(0.2) rotate(-120deg);
  }
}
.unlocks {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.unlocks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 14px;
  background: var(--panel-2);
  text-align: left;
  font-weight: 900;
}
.unlocks li span {
  display: grid;
}
.unlocks small {
  color: #c9b8ff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.unlocks li.plain {
  justify-content: center;
  color: var(--muted);
}
.unlocks img.ico {
  width: 40px;
  height: 40px;
}
.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: confetti 1.8s ease-in forwards;
}
@keyframes confetti {
  to {
    transform: translate(var(--x), 110vh) rotate(540deg);
    opacity: 0.2;
  }
}

/* ---------- small screens ---------- */
@media (max-width: 719px) {
  .side-inner {
    min-height: 300px;
  }
  .panel {
    overflow: visible;
  }
  .overlay {
    position: fixed;
    align-items: start;
    padding-top: 60px;
  }
}
@media (max-width: 420px) {
  body {
    padding: 6px;
  }
  .brand {
    font-size: 19px;
  }
  .chip {
    height: 34px;
    padding: 0 10px 0 6px;
    font-size: 14px;
  }
  .xp-bar {
    width: 64px;
  }
  .tool {
    width: 52px;
  }
  .seed {
    width: 42px;
  }
  .toolbar {
    justify-content: center;
  }
}
@media (max-width: 350px) {
  .chip-ready .chip-k {
    display: none;
  }
  .tools,
  .seeds {
    gap: 3px;
  }
  .tool {
    width: 48px;
  }
  .seed {
    width: 40px;
  }
  .m-row .pill-s {
    padding: 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .chip-saved.show {
    opacity: 1;
  }
}

.radial.compact .rb {
  width: 52px;
}
.radial.compact .rb-face {
  width: 44px;
  height: 44px;
}
.radial.compact .rb-face img.ico,
.radial.compact .rb-face svg {
  width: 30px;
  height: 30px;
}
.radial.compact .rb-label {
  font-size: 10px;
}
