:root {
  --bg: #12141c;
  --panel: #1b1e29;
  --line: #2b3040;
  --accent: #ffc94d;
  --accent-ink: #241d05;
}

body {
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

.app-nav {
  background: rgba(18, 20, 28, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-right: .25rem;
  border-radius: .5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: .85rem;
}

/* Submit form ------------------------------------------------------------ */

.photo-drop {
  display: block;
  width: 100%;
  cursor: pointer;
}

.photo-drop-inner {
  display: grid;
  place-items: center;
  min-height: 14rem;
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: 1rem;
  background: var(--panel);
  color: #8891a8;
  text-align: center;
  overflow: hidden;
}

.photo-drop-inner img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: .75rem;
}

.photo-icon { font-size: 2.5rem; }

.price-input {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: .02em;
}

.usd-hint {
  margin-top: .4rem;
  text-align: center;
  font-size: .95rem;
  color: var(--accent);
  opacity: .8;
}

.currency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  gap: .5rem;
}

.currency-grid .btn {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .55rem .3rem;
  line-height: 1.1;
}

.cur-symbol { font-size: 1.15rem; font-weight: 700; }
.cur-code { font-size: .7rem; opacity: .7; }

.pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Play screen ------------------------------------------------------------ */

.play-body { overflow: hidden; }

.play-wrap {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem .75rem;
}

.round-counter {
  font-weight: 700;
  font-size: 1.1rem;
}

.round-counter span {
  font-weight: 400;
  opacity: .5;
  font-size: .9rem;
}

/* min-height:0 lets this shrink below the photo's intrinsic size, and
   overflow:hidden gives the box a definite height so the image's 100% has
   something real to resolve against. Without both, a tall photo pushes the
   REVEAL button off the bottom of the screen. */
.play-photo {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 0 .5rem;
}

.play-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: .75rem;
}

.play-bottom { padding: .75rem; }

.btn-reveal {
  padding: 1.1rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 1rem;
}

.btn-reveal:hover, .btn-reveal:focus { background: #ffd876; color: var(--accent-ink); }

/* Reveal panel ----------------------------------------------------------- */

.reveal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .9rem;
}

.reveal-price { text-align: center; }

.price-big {
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.price-usd {
  font-size: 1rem;
  opacity: .55;
  margin-top: .2rem;
}

.price-meta {
  font-size: .85rem;
  opacity: .7;
  margin-top: .45rem;
}

.winner-pick { margin-top: .9rem; }

.winner-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .6;
  margin-bottom: .4rem;
}

.winner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: .4rem;
}

.winner-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  background: #232735;
  color: #e6e9f2;
  border-radius: .7rem;
  font-weight: 600;
}

.winner-btn .w-points {
  min-width: 1.6rem;
  padding: .05rem .35rem;
  border-radius: .5rem;
  background: #12141c;
  font-size: .8rem;
  opacity: .75;
}

.winner-btn.won {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.winner-btn.won .w-points { background: rgba(0, 0, 0, .18); opacity: 1; }
.winner-btn.nobody { opacity: .65; font-weight: 500; }

.winner-hint {
  font-size: .72rem;
  opacity: .45;
  margin: .5rem 0 0;
}

.reveal-actions {
  display: flex;
  gap: .5rem;
  margin-top: .8rem;
}

/* Scores ----------------------------------------------------------------- */

.podium-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  margin-bottom: .4rem;
  background: var(--panel);
}

.podium-row.winner {
  border-color: var(--accent);
  background: rgba(255, 201, 77, .1);
}

.podium-rank { width: 1.5rem; opacity: .5; font-weight: 700; }
.podium-name { flex: 1 1 auto; font-weight: 600; }
.podium-points { font-size: 1.4rem; font-weight: 800; color: var(--accent); }

/* Admin ------------------------------------------------------------------ */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: .75rem;
}

.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .75rem;
  overflow: hidden;
}

.admin-card.inactive { opacity: .45; }

.admin-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.admin-card-body { padding: .5rem; }

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
