@font-face {
  font-family: "Bebas Neue";
  src: url("../assets/fonts/bebas-neue-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #12100e;
  --bg2: #1c1915;
  --card: #1f1b17;
  --ink: #f4eee3;
  --muted: #a69d8e;
  --line: rgba(255, 240, 220, 0.09);
  --brass: #d8ad57;
  --brass-hi: #f7d98f;
  --brass-lo: #8a672a;
  --plasma: #6fe7ff;
  --plasma-hot: #eafdff;
  --good: #66d991;
  --bad: #ff7a6b;
  --left: #8fe9ff;
  --right: #ffc66e;
  /* Capacitor's Android shell sets --safe-area-inset-*; browsers use env() */
  --safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --ad-height: 0px;
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, #241f19 0%, rgba(18, 16, 14, 0) 60%),
    radial-gradient(90% 60% at 50% 110%, #1d1813 0%, rgba(18, 16, 14, 0) 70%),
    var(--bg);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 10px) 14px calc(var(--safe-bottom) + var(--ad-height) + 12px);
}

.screen[hidden],
[hidden] {
  display: none !important;
}

/* ---------- buttons ---------- */

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-family: var(--display);
  font-size: 25px;
  letter-spacing: 1.5px;
  line-height: 1;
  background: #2a241d;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(216, 173, 87, 0.45);
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  color: #1b130a;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #b98a37);
  box-shadow: 0 6px 18px rgba(216, 173, 87, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  width: auto;
  padding: 10px 14px;
  font-size: 19px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 240, 220, 0.06);
  color: var(--muted);
  font-family: var(--display);
  font-size: 24px;
  display: grid;
  place-items: center;
}

/* ---------- title ---------- */

.title {
  justify-content: center;
  gap: 16px;
}

.title-top {
  text-align: center;
  margin-bottom: 6px;
}

.logo {
  position: relative;
  margin: 0 auto;
  width: 300px;
  height: 104px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 104px;
  line-height: 104px;
  letter-spacing: 3px;
}

.logo-half {
  position: absolute;
  inset: 0;
  white-space: nowrap;
  text-align: center;
}

.logo-upper {
  color: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 34%, 0 66%);
}

.logo-lower {
  color: var(--brass);
  clip-path: polygon(0 66%, 100% 34%, 100% 100%, 0 100%);
  transform: translate(5px, 4px);
}

.logo-beam {
  position: absolute;
  left: -14px;
  right: -14px;
  top: 50%;
  height: 3px;
  margin-top: 1px;
  background: linear-gradient(90deg, rgba(111, 231, 255, 0), var(--plasma) 18%, #fff 50%, var(--plasma) 82%, rgba(111, 231, 255, 0));
  box-shadow: 0 0 12px var(--plasma), 0 0 26px rgba(111, 231, 255, 0.6);
  transform: rotate(-6.3deg);
  border-radius: 2px;
  animation: beam 3.2s ease-in-out infinite;
}

@keyframes beam {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
    filter: brightness(1.3);
  }
}

.tagline {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
}

.daily-card {
  background: linear-gradient(180deg, rgba(255, 240, 220, 0.06), rgba(255, 240, 220, 0.025));
  border-radius: 20px;
  padding: 18px 16px 14px;
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}

.kicker {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 3px;
  color: var(--brass);
}

.daily-status {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.daily-status b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 1px;
  display: block;
  color: var(--ink);
}

.daily-next {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 1em;
}

.btn.yard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 15px 18px;
}

.btn.yard small {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}

.menu-btn {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  left: 14px;
}

.btn.cards-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 13px 18px;
  font-size: 22px;
  box-shadow: inset 0 0 0 1.5px rgba(242, 201, 76, 0.55), 0 0 18px rgba(242, 201, 76, 0.12);
  background: linear-gradient(180deg, #2c2418, #221c14);
}

.btn.cards-btn small {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}

.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(8, 7, 6, 0.6);
}

.menu {
  position: fixed;
  z-index: 9;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(300px, 82vw);
  padding: calc(var(--safe-top) + 22px) 18px calc(var(--safe-bottom) + var(--ad-height) + 20px);
  background: var(--card);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slide-in 0.22s ease-out both;
}

.menu .kicker {
  margin-bottom: 12px;
}

.menu button,
.menu a {
  border: 0;
  border-radius: 12px;
  padding: 13px 12px;
  text-align: left;
  background: none;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
}

.menu button:active,
.menu a:active {
  background: rgba(255, 240, 220, 0.07);
}

.menu-foot {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}

@keyframes slide-in {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: none;
  }
}

.title-foot {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(166, 157, 142, 0.7);
}

/* Google's Play badge (web only), centred with the clear space Google asks for */
.get-app {
  align-self: center;
  margin: 2px 0;
  border-radius: 9px;
}

.get-app img {
  display: block;
  height: 52px;
  width: auto;
}

/* ---------- play ---------- */

.play {
  gap: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
}

.mode {
  text-align: center;
  min-width: 0;
}

.mode-kicker {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--brass);
}

.mode-title {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: 1.5px;
  color: var(--ink);
  white-space: nowrap;
}

.objbar {
  flex: 0 0 auto;
  text-align: center;
  padding: 8px 0 2px;
}

.objbar h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 2px;
  line-height: 1;
}

.legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 4px 9px 4px 5px;
  background: rgba(255, 240, 220, 0.07);
  font-size: 12.5px;
  color: var(--ink);
}

.chip b {
  font-weight: 600;
}

.chip i {
  font-style: normal;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sw {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.sw-aerogel {
  background: radial-gradient(circle at 35% 30%, #fff, #cfe7f7 55%, #86aecb);
  opacity: 0.85;
}
.sw-oak {
  background: repeating-linear-gradient(100deg, #b07a43 0 3px, #8c5e30 3px 4px, #b98449 4px 7px);
}
.sw-granite {
  background: radial-gradient(circle at 30% 40%, #3d3b39 0 1px, transparent 1.5px), radial-gradient(circle at 70% 60%, #e5e1da 0 1px, transparent 1.5px), radial-gradient(circle at 55% 25%, #b89a8f 0 1px, transparent 1.5px), #8f8c87;
}
.sw-iron {
  background: linear-gradient(135deg, #202328, #6c747f 45%, #2b2f35 70%, #4b5058);
}
.sw-copper {
  background: linear-gradient(135deg, #78361a, #f6b48c 45%, #a85128 70%, #c46c3c);
}
.sw-lead {
  background: linear-gradient(160deg, #8c93a0, #5f6673);
}
.sw-gold {
  background: linear-gradient(135deg, #996b0b, #fff2a8 45%, #c99419 70%, #e6b42e);
}
.sw-hollow {
  background: radial-gradient(circle, #0b0a09 45%, #3a332b 70%);
}

.bench {
  position: relative;
  flex: 1 1 auto;
  min-height: 230px;
  touch-action: none;
}

.scales {
  flex: 0 0 auto;
  height: clamp(116px, 17vh, 150px);
}

.footer {
  flex: 0 0 auto;
  padding-top: 8px;
  min-height: 104px;
}

.hint {
  margin: 0 0 8px;
  min-height: 2.6em;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.hint b {
  color: var(--ink);
}

.btn-cut {
  position: relative;
  display: block;
  -webkit-touch-callout: none;
  width: 100%;
  height: 64px;
  border-radius: 16px;
  border: 0;
  overflow: hidden;
  background: #241d15;
  box-shadow: inset 0 0 0 2px var(--brass), 0 6px 20px rgba(0, 0, 0, 0.35);
  color: var(--brass-hi);
  font-family: var(--display);
  font-size: 31px;
  letter-spacing: 3px;
  touch-action: none;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-cut::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #1f6f8a, var(--plasma) 70%, #ffffff);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
}

.btn-cut span {
  position: relative;
}

.btn-cut.off {
  opacity: 0.42;
}

.btn-cut.charging {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 30, 45, 0.85);
  box-shadow: inset 0 0 0 2px var(--plasma), 0 0 30px rgba(111, 231, 255, 0.45);
}

.btn-cut.ready:not(.charging) {
  animation: ready 1.6s ease-in-out infinite;
}

.btn-cut.nudge:not(.charging) {
  animation: nudge 0.9s ease-in-out infinite;
}

@keyframes nudge {
  0%,
  100% {
    background: #241d15;
    color: var(--brass-hi);
    box-shadow: inset 0 0 0 2px var(--brass), 0 6px 20px rgba(0, 0, 0, 0.35);
    transform: scale(1);
  }
  50% {
    background: #6b5024;
    color: #fff6dc;
    box-shadow: inset 0 0 0 2px var(--brass-hi), 0 0 34px rgba(247, 217, 143, 0.6);
    transform: scale(1.03);
  }
}

@keyframes ready {
  0%,
  100% {
    box-shadow: inset 0 0 0 2px var(--brass), 0 6px 20px rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow: inset 0 0 0 2px var(--brass-hi), 0 0 24px rgba(247, 217, 143, 0.35);
  }
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: rise 0.35s ease-out both;
}

.act-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.act-note {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.35;
}

.act-note b {
  color: var(--ink);
  font-weight: 600;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- coach ---------- */

.coach {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: min(300px, 90%);
  text-align: center;
  pointer-events: none;
}

.coach p {
  margin: 0;
  display: inline-block;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(10, 9, 8, 0.82);
  color: var(--ink);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(111, 231, 255, 0.35);
}

/* ---------- result ---------- */

.result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 0 4px;
  text-align: center;
  animation: rise 0.4s ease-out both;
}

.res-kicker {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--muted);
}

.res-pcts {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  font-family: var(--display);
  font-size: clamp(44px, 13vw, 60px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.res-left {
  color: var(--left);
}

.res-right {
  color: var(--right);
}

.res-sep {
  color: var(--muted);
  font-size: 0.6em;
}

.res-diff {
  margin: 4px 0 10px;
  font-size: 14px;
  color: var(--muted);
}

.res-diff b {
  color: var(--ink);
}

.res-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.res-mini-wrap {
  flex: 0 0 auto;
}

.res-mini {
  width: clamp(104px, 33vw, 150px);
  height: clamp(104px, 33vw, 150px);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.res-key {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.res-key i {
  display: inline-block;
  width: 12px;
  height: 3px;
  margin: 0 3px 2px 6px;
  border-radius: 2px;
  vertical-align: middle;
}

.k-you {
  background: var(--plasma);
}

.k-best {
  background: repeating-linear-gradient(90deg, var(--brass-hi) 0 3px, transparent 3px 5px);
}

.res-side {
  flex: 1 1 auto;
  max-width: 190px;
}

.stamp {
  display: inline-block;
  padding: 8px 12px 6px;
  border: 3px solid currentColor;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 26px;
  line-height: 0.95;
  letter-spacing: 1.5px;
  transform: rotate(-7deg);
  color: var(--brass-hi);
  opacity: 0;
}

.stamp.show {
  animation: stamp 0.42s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}

.stamp.t5 {
  color: #ffe58a;
  text-shadow: 0 0 16px rgba(255, 229, 138, 0.6);
}
.stamp.t4 {
  color: var(--good);
}
.stamp.t3 {
  color: var(--left);
}
.stamp.t2 {
  color: var(--ink);
}
.stamp.t1 {
  color: #ffb36b;
}
.stamp.t0 {
  color: var(--bad);
}

@keyframes stamp {
  0% {
    opacity: 0;
    transform: rotate(-7deg) scale(2.4);
  }
  100% {
    opacity: 1;
    transform: rotate(-7deg) scale(1);
  }
}

.res-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.res-note b {
  color: var(--ink);
}

.res-note.pass b {
  color: var(--good);
}

.res-note .combo {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 8px;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 1px;
  color: #1b0d03;
  background: linear-gradient(90deg, #ff9a3c, #ffd36b);
  box-shadow: 0 0 14px rgba(255, 154, 60, 0.7);
  animation: flame 0.7s ease-in-out infinite alternate;
}

@keyframes flame {
  from {
    box-shadow: 0 0 8px rgba(255, 154, 60, 0.5);
  }
  to {
    box-shadow: 0 0 20px rgba(255, 120, 40, 0.95);
  }
}

.res-note.fail b {
  color: var(--bad);
}

/* ---------- knock label ---------- */

.knock {
  position: fixed;
  z-index: 5;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(10, 9, 8, 0.9);
  box-shadow: inset 0 0 0 1px rgba(216, 173, 87, 0.5);
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  animation: knock 1.5s ease-out forwards;
}

.knock b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 1px;
}

.knock span {
  font-size: 12px;
  color: var(--muted);
}

@keyframes knock {
  0% {
    opacity: 0;
    margin-top: 6px;
  }
  12% {
    opacity: 1;
    margin-top: 0;
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 14px) 14px calc(var(--safe-bottom) + var(--ad-height) + 14px);
  background: rgba(8, 7, 6, 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.card {
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  overflow-y: auto;
  background: var(--card);
  border-radius: 20px;
  padding: 20px 18px 16px;
  box-shadow: inset 0 0 0 1px var(--line), 0 20px 60px rgba(0, 0, 0, 0.5);
  -webkit-user-select: text;
  user-select: text;
}

.card h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 1px;
  line-height: 1.02;
}

.card h3 em {
  font-style: normal;
  color: var(--brass);
}

.card .lead {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.steps {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.5;
}

.steps li {
  margin-bottom: 4px;
}

.mat-table,
.rank-table {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
}

.mat-row,
.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.mat-row .sw {
  width: 18px;
  height: 18px;
}

.mat-row span,
.rank-row span {
  flex: 1;
}

.mat-row i,
.rank-row i {
  font-style: normal;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.small {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
  text-align: center;
}

.stat-grid b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
}

.stat-grid span {
  font-size: 11.5px;
  color: var(--muted);
}

.st-ranks {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.st-bar {
  display: grid;
  grid-template-columns: 118px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.st-bar div {
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 240, 220, 0.07);
  overflow: hidden;
}

.st-bar div i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brass-lo), var(--brass));
}

.st-bar em {
  font-style: normal;
  color: var(--muted);
  text-align: right;
}

/* ---------- cards ---------- */

.objbar h2.treasure {
  color: #ffd66e;
  text-shadow: 0 0 14px rgba(255, 206, 84, 0.6);
}

.res-note .combo.gold {
  background: linear-gradient(90deg, #ffe58a, #e6b42e);
}

.album h4 {
  margin: 18px 0 8px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--brass);
}

.album h4 span {
  color: var(--muted);
  font-size: 18px;
  margin-left: 6px;
}

.album .small {
  margin: 0 0 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ocard {
  position: relative;
  border-radius: 10px;
  padding: 5px 5px 7px;
  text-align: center;
  background: #171411;
  box-shadow: inset 0 0 0 2px #4a4036;
  overflow: hidden;
}

.ocard-art {
  aspect-ratio: 1;
  border-radius: 7px;
  background: radial-gradient(circle at 50% 40%, #24392f, #142019);
  display: grid;
  place-items: center;
}

.ocard-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ocard b {
  display: block;
  margin-top: 5px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ocard i {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ocard-foil {
  display: block;
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.ocard.locked {
  opacity: 0.55;
}

.ocard.locked .ocard-art {
  background: #1c1915;
}

.ocard.f-bronze {
  box-shadow: inset 0 0 0 2px #b0703f;
}
.ocard.f-bronze .ocard-foil {
  color: #e0a070;
}

.ocard.f-silver {
  box-shadow: inset 0 0 0 2px #c7ced8, 0 0 10px rgba(199, 206, 216, 0.25);
}
.ocard.f-silver .ocard-foil {
  color: #dfe5ee;
}

.ocard.f-gold {
  box-shadow: inset 0 0 0 2px #f2c94c, 0 0 14px rgba(242, 201, 76, 0.4);
}
.ocard.f-gold .ocard-foil {
  color: #ffe58a;
}

.ocard.f-gold::after,
.ocard.treasure:not(.locked)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 244, 200, 0.35) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: foil 2.8s linear infinite;
  pointer-events: none;
}

.ocard.treasure:not(.locked) .ocard-art {
  background: radial-gradient(circle at 50% 40%, #5a4416, #241a08);
}

@keyframes foil {
  from {
    background-position: 150% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.ocard {
  cursor: pointer;
}

.card-view {
  z-index: 12;
}

.bigcard {
  position: relative;
  width: min(330px, 92vw);
  max-height: 100%;
  overflow-y: auto;
  border-radius: 18px;
  padding: 16px 16px 14px;
  background: #1a1612;
  box-shadow: inset 0 0 0 3px #4a4036, 0 24px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  animation: pop 0.28s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.bigcard.f-bronze {
  box-shadow: inset 0 0 0 3px #b0703f, 0 24px 60px rgba(0, 0, 0, 0.6);
}
.bigcard.f-silver {
  box-shadow: inset 0 0 0 3px #c7ced8, 0 0 30px rgba(199, 206, 216, 0.3), 0 24px 60px rgba(0, 0, 0, 0.6);
}
.bigcard.f-gold {
  box-shadow: inset 0 0 0 3px #f2c94c, 0 0 36px rgba(242, 201, 76, 0.45), 0 24px 60px rgba(0, 0, 0, 0.6);
}

.bigcard.f-gold::after,
.bigcard.treasure:not(.locked)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 244, 200, 0.22) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: foil 3s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}

.bigcard-x {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 240, 220, 0.1);
  color: var(--ink);
  font-size: 18px;
}

.bigcard-set {
  margin: 4px 40px 10px;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--brass);
}

.bigcard.f-gold .bigcard-set {
  color: #ffe58a;
}

.bigcard-art {
  aspect-ratio: 1;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #24392f, #142019);
  display: grid;
  place-items: center;
}

.bigcard.treasure:not(.locked) .bigcard-art {
  background: radial-gradient(circle at 50% 40%, #5a4416, #241a08);
}

.bigcard.locked .bigcard-art {
  background: #1c1915;
}

.bigcard-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bigcard h3 {
  margin: 12px 0 8px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 1.5px;
  line-height: 1;
}

.bigcard .legend {
  margin-bottom: 10px;
}

.bigcard-stats {
  margin: 0;
  display: grid;
  gap: 6px;
  text-align: left;
}

.bigcard-stats div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 240, 220, 0.05);
}

.bigcard-stats dt {
  color: var(--muted);
  font-size: 13.5px;
}

.bigcard-stats dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.bigcard-tip {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.newcard {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--ad-height) + 150px);
  transform: translateX(-50%);
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  background: #1d1914;
  box-shadow: inset 0 0 0 2px #4a4036, 0 12px 30px rgba(0, 0, 0, 0.55);
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
  animation: rise-centre 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.newcard b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--brass-hi);
}

.newcard.f-gold {
  box-shadow: inset 0 0 0 2px #f2c94c, 0 0 24px rgba(242, 201, 76, 0.5);
}
.newcard.f-silver {
  box-shadow: inset 0 0 0 2px #c7ced8, 0 0 18px rgba(199, 206, 216, 0.35);
}
.newcard.f-bronze {
  box-shadow: inset 0 0 0 2px #b0703f;
}

.newcard-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 244, 200, 0.3) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: foil 1.6s linear infinite;
  pointer-events: none;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--ad-height) + 118px);
  transform: translateX(-50%);
  max-width: min(360px, 90vw);
  pointer-events: none;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(14, 12, 10, 0.95);
  box-shadow: inset 0 0 0 1px rgba(216, 173, 87, 0.5), 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  text-align: center;
  animation: rise-centre 0.25s ease-out both;
}

/* like rise, for things centred with translateX(-50%) */
@keyframes rise-centre {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Netlify injects a "Powered by Netlify" badge on the web version; it would cover the cut button */
#nl-badge-frame,
#nl-hud-frame,
iframe[title*="Netlify" i] {
  display: none !important;
}

@media (max-height: 640px) {
  .logo {
    transform: scale(0.82);
    margin: -10px auto;
  }
  .objbar h2 {
    font-size: 25px;
  }
  .btn-cut {
    height: 56px;
  }
  .hint {
    min-height: 1.3em;
    margin-bottom: 6px;
  }
  .footer {
    min-height: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-beam,
  .btn-cut.ready:not(.charging),
  .btn-cut.nudge:not(.charging) {
    animation: none;
  }
}
