/* RatRig — clarity & game feel (iteration 11).
   "Siguiente paso" guide, "?" jargon helpers, purchase/placement feedback, coins that fly to the
   balance, the level-up banner and nicer toasts. Same pixel language as main.css: ink outlines,
   bevels, Jersey 10 at 20/30/40/60 px, violet for what you press, gold ONLY for Ratbit.
   Motion is transform/opacity only and short; everything here switches off with reduced motion. */

/* ================================================================== buttons: hover lift, press squish
   The face rises 2 px over a taller side (the bottom edge never moves); pressing still drops it onto
   its side. Touch screens skip the hover (it would stick after a tap). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html:not([data-reduced-motion="true"]) .btn:hover:not(:disabled):not([aria-disabled="true"]) { --d: 6px; transform: translateY(-2px); }
  html:not([data-reduced-motion="true"]) .btn:active:not(:disabled):not([aria-disabled="true"]) { --d: 0px; transform: translateY(4px); }
  html:not([data-reduced-motion="true"]) .btn-icon:hover { --d: 5px; transform: translateY(-2px); }
  html:not([data-reduced-motion="true"]) .btn-icon:active { --d: 0px; transform: translateY(3px); }
}
/* a disabled button that tells you why ("Te faltan 0,40 RBIT", "Necesitas nivel 5") */
.btn.btn-why {
  min-height: 36px;
  padding: 2px 12px 0;
  white-space: normal;
  text-align: center;
  line-height: 1;
}

/* ================================================================== "?" helpers */
.tip-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: -3px 2px 0 3px;
  padding: 1px 0 0;
  vertical-align: middle;
  font: 700 12px/1 var(--f-body);
  color: var(--text-2);
  background: var(--surface-3);
  border: 0;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 var(--s3-hi), 0 0 0 2px var(--ink);
  cursor: help;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast) steps(2), color var(--t-fast) steps(2);
}
.tip-btn::before { content: ''; position: absolute; inset: -9px; } /* a 36 px touch target */
.tip-btn:hover,
.tip-btn[aria-expanded="true"] { color: #fff; background: var(--violet); box-shadow: inset 2px 2px 0 var(--violet-hi), 0 0 0 2px var(--ink); }
.tip-btn:focus-visible { outline-offset: 3px; }
.tip-bubble {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 125;
  width: max-content;
  max-width: min(300px, calc(100vw - 16px));
  padding: 10px 13px 11px;
  font-size: var(--fs-5);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface-3);
  box-shadow: var(--bevel-3), var(--ring), 0 6px 0 var(--drop);
  pointer-events: none;
}
.tip-bubble[hidden] { display: none; }
.tip-bubble.tip-in { animation: tip-in 140ms steps(2) both; }
@keyframes tip-in { from { opacity: 0; } }
/* keep the "?" on the label's line in the facts card (the mining strip's own: css/dashboard.css) */
.stat-row dt .tip-btn { margin-top: -2px; }

/* ================================================================== "Siguiente paso" guide (Guarida) */
.guide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "icon body side";
  align-items: center;
  gap: 10px 20px;
  padding: 14px 54px 14px 14px;
  background: var(--violet-deep);
  box-shadow: inset 3px 3px 0 #43307F, inset -3px -3px 0 #1A1040, var(--ring), 0 6px 0 var(--drop);
}
.guide::after {
  /* success ring when a goal was just completed (see .guide-done) */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 3px var(--success);
}
.guide-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  line-height: 0;
  background: var(--well);
  box-shadow: var(--sunk-2), var(--ring2);
}
.guide-body { grid-area: body; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.guide-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: var(--fs-6);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--violet-text);
}
.guide-dots { display: inline-flex; gap: 4px; }
.guide-dot { width: 8px; height: 8px; background: var(--well); box-shadow: 0 0 0 2px var(--ink); }
.guide-dot.is-done { background: var(--violet-text); }
.guide-dot.is-now { background: #fff; animation: guide-dot 1.2s steps(1) infinite; }
@keyframes guide-dot { 50% { background: var(--violet-text); } }
.guide-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--px-m);
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
  overflow-wrap: anywhere;
}
.guide-why { font-size: var(--fs-5); line-height: 1.45; color: #D9CFFA; max-width: 70ch; }
.guide-side { grid-area: side; display: flex; align-items: center; gap: 16px; padding: 0 0 4px; }
.guide-progress { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.guide-bar {
  position: relative;
  display: block;
  height: 12px;
  background: var(--well);
  box-shadow: var(--sunk-2), var(--ring2);
  overflow: hidden;
}
.guide-bar-fill {
  position: absolute;
  left: 2px; top: 2px; bottom: 2px;
  width: calc(100% - 4px);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: var(--violet-text);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
  transition: transform 500ms var(--ease-out);
}
.guide-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0 10px, var(--well) 10px 12px);
  pointer-events: none;
}
.guide-count { font-size: var(--fs-6); font-weight: 600; color: #D9CFFA; font-variant-numeric: tabular-nums; white-space: nowrap; }
.guide-go { white-space: nowrap; }
.guide-x {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0 0 2px;
  color: #D9CFFA;
  font: var(--px-m)/1 var(--f-display);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background-color var(--t-fast) steps(2), color var(--t-fast) steps(2);
}
.guide-x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.guide-x:active { transform: translateY(2px); }
.guide.guide-in { animation: guide-in 380ms var(--ease-out) both; }
@keyframes guide-in { from { opacity: 0; transform: translateY(8px); } }
.guide.guide-done::after { animation: guide-flash 900ms steps(6) both; }
@keyframes guide-flash { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }

/* ≥ 1400 px: the guide heads the side column (dense grid: room spans the guide's row and the next),
   so nothing is added above the room and its integer scale is unchanged. */
@media (min-width: 1400px) {
  .screen-lair.has-guide { grid-auto-flow: dense; }
  .screen-lair.has-guide > .guide { grid-column: 2; align-self: start; }
  .screen-lair.has-guide > .room-panel,
  .screen-lair.has-guide > .lair-main { grid-row: span 2; }
  .screen-lair.has-guide > .lair-side { align-self: start; }
  .screen-lair > .guide {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon body" "side side";
    gap: 12px 14px;
    padding: 16px 44px 18px 16px;
  }
  .screen-lair > .guide .guide-icon { width: 48px; height: 48px; align-self: start; }
  .screen-lair > .guide .guide-title { font-size: var(--px-s); line-height: 1.1; }
  .screen-lair > .guide .guide-side { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
  .screen-lair > .guide .guide-progress { flex: 1 1 140px; }
}
@media (min-width: 1024px) and (max-width: 1399.98px) {
  .screen-lair > .guide .guide-title { font-size: var(--px-s); line-height: 1.1; }
}
@media (max-width: 899.98px) {
  .guide { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon body" "side side"; }
  .guide-side { justify-content: space-between; }
  .guide-progress { flex: 1 1 auto; }
}
.guide-progress.is-empty { min-width: 0; }
@media (max-width: 639.98px) {
  .guide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "body" "side";
    gap: 10px;
    padding: 12px 40px 12px 14px;
  }
  .guide-icon { display: none; }
  .guide-title { font-size: var(--px-s); line-height: 1.1; }
  .guide-why { font-size: var(--fs-6); }
  .guide-side { gap: 12px; padding: 0; }
  .guide-progress { min-width: 0; }
  .guide-go { max-width: 58%; white-space: normal; text-align: center; }
  .guide-x { top: 4px; right: 4px; }
}

/* ================================================================== lair: placements land, blocks glide */

/* a machine just placed drops onto its shelf with one small bounce (once; machines never idle-bob) */
.lair-scene .mach.thunk { animation: mach-thunk 560ms both; }
@keyframes mach-thunk {
  0% { transform: translateY(calc(var(--s, 1) * -12px)); opacity: 0; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  12% { opacity: 1; }
  40% { transform: translateY(0); animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
  55% { transform: translateY(calc(var(--s, 1) * -2px)); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  70%, 100% { transform: translateY(0); opacity: 1; }
}
.lair-scene .mach-dust { position: absolute; pointer-events: none; }
.lair-scene .mach-dust::before,
.lair-scene .mach-dust::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: calc(var(--s, 1) * 3px);
  height: calc(var(--s, 1) * 2px);
  background: var(--c-parchment);
  box-shadow: calc(var(--s, 1) * 3px) calc(var(--s, 1) * -2px) 0 0 rgba(244, 235, 221, 0.6);
  opacity: 0;
}
.lair-scene .mach-dust::before { left: 0; }
.lair-scene .mach-dust::after { right: 0; transform: scaleX(-1); }
.lair-scene .mach-dust.puff::before { animation: dust-left 460ms 200ms steps(4) both; }
.lair-scene .mach-dust.puff::after { animation: dust-right 460ms 200ms steps(4) both; }
@keyframes dust-left {
  0% { opacity: 0.9; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(calc(var(--s, 1) * -6px), calc(var(--s, 1) * -4px)); }
}
@keyframes dust-right {
  0% { opacity: 0.9; transform: scaleX(-1) translate(0, 0); }
  100% { opacity: 0; transform: scaleX(-1) translate(calc(var(--s, 1) * -6px), calc(var(--s, 1) * -4px)); }
}
/* a new rack lands; an upgraded one shines for a moment */
.lair-scene .rack.thunk-rack { animation: rack-thunk 600ms both; }
@keyframes rack-thunk {
  0% { transform: translateY(calc(var(--s, 1) * -16px)); opacity: 0; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  15% { opacity: 1; }
  45% { transform: translateY(0); animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
  58% { transform: translateY(calc(var(--s, 1) * -3px)); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  72%, 100% { transform: translateY(0); opacity: 1; }
}
.lair-scene .rack.shine { animation: rack-shine 800ms steps(5) both; }
@keyframes rack-shine { 0% { filter: brightness(1.9); } 100% { filter: none; } }

/* (the next-block bar's glide moved to css/dashboard.css, iteration 24) */

/* ================================================================== shop & inventory: what it does for ME */
.shop-gain,
.inv-gain {
  font-size: var(--fs-6);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.shop-gain { margin-top: -4px; }
.gain-rbit { font-weight: 700; color: var(--gold); white-space: nowrap; }
.gain-days { color: var(--text-3); }
.shop-card.locked .gain-rbit { color: var(--text-2); }

/* bought: a success ring and a "+1" that pops out of the plinth */
.shop-card.just-bought::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--success), 0 0 0 3px var(--ink);
  animation: bought-ring 900ms steps(6) both;
  animation-delay: inherit;
}
@keyframes bought-ring { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }
.shop-card.just-bought .shop-art::after {
  content: '+1';
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 3px 8px 1px;
  font: var(--px-s)/1 var(--f-display);
  color: #fff;
  background: var(--violet);
  box-shadow: inset 0 2px 0 var(--violet-hi), var(--ring2);
  animation: plus-one 900ms var(--ease-out) both;
  animation-delay: inherit;
}
@keyframes plus-one {
  0% { opacity: 0; transform: translateY(8px); }
  20% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* inventory: the screen's one action (place what is stored) */
.inv-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  padding: 14px 18px 16px;
  background: var(--violet-deep);
  box-shadow: inset 3px 3px 0 #43307F, inset -3px -3px 0 #1A1040, var(--ring), 0 6px 0 var(--drop);
}
.inv-cta-text { flex: 1 1 320px; color: #D9CFFA; }
.inv-cta-text strong { font-weight: 700; color: #fff; }
@media (max-width: 639.98px) {
  .inv-cta { padding: 12px 14px 14px; }
  .inv-cta .btn { flex: 1 1 auto; }
}

/* ================================================================== HUD feedback */
.qso-delta-u { margin-left: 4px; font: 600 11px/1 var(--f-body); letter-spacing: 0.04em; color: var(--text-2); }
.qso-delta.is-power { left: 6px; right: auto; color: var(--violet-text); }
.power-pop-help { margin: -4px 0 var(--sp-3); font-size: var(--fs-6); line-height: 1.45; color: var(--text-2); }

/* ================================================================== flying coins, float notes, level-up */
.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 118; /* over the bar, game overlay and dialogs; under the toasts */
  pointer-events: none;
  overflow: hidden;
}
.fx-coin {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 0 rgba(7, 4, 15, 0.6));
  will-change: transform, opacity;
}
.fx-coin-css {
  width: 16px;
  height: 16px;
  margin: 8px;
  background: var(--gold);
  box-shadow: inset 3px 3px 0 var(--gold-hi), inset -3px -3px 0 var(--gold-lo), var(--ring2);
}
.fx-note {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 8px 2px;
  font: var(--px-s)/1 var(--f-display);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: var(--surface-3);
  box-shadow: var(--ring2), 0 4px 0 var(--drop);
  will-change: transform, opacity;
}
.fx-note-gold { color: var(--gold); }
.fx-note-violet { color: var(--violet-text); }

.fx-level {
  position: absolute;
  left: 50%;
  top: 24vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  padding: 16px 36px 20px;
  text-align: center;
  color: #fff;
  background: var(--violet);
  box-shadow: inset 0 4px 0 var(--violet-hi), inset 0 -4px 0 var(--violet-lo), var(--ring), 0 8px 0 var(--violet-side), 0 11px 0 var(--ink), 0 18px 0 var(--drop);
  transform: translateX(-50%);
  will-change: transform, opacity;
}
.fx-level-kicker { font: var(--px-s)/1 var(--f-display); color: #E2D8FF; letter-spacing: 0.04em; }
.fx-level-num { font: var(--px-xl)/0.85 var(--f-display); text-shadow: 0 4px 0 var(--violet-side); }
.fx-level-nv { margin-right: 8px; font-size: var(--px-m); color: #E2D8FF; }
.fx-level-sub { max-width: 34ch; font-size: var(--fs-5); font-weight: 500; line-height: 1.4; color: #E2D8FF; }
.fx-confetti {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 1px rgba(7, 4, 15, 0.7);
  will-change: transform, opacity;
}

/* ================================================================== toasts: icon plate, time bar */
.toast { overflow: hidden; }
.toast-icon {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  line-height: 0;
}
.toast-level .toast-icon,
.toast-ach .toast-icon { animation: toast-icon-pop 420ms 90ms var(--ease-spring) both; }
@keyframes toast-icon-pop { from { transform: scale(0.4); opacity: 0; } }
.toast-time {
  position: absolute;
  left: 8px;
  right: 3px;
  bottom: 3px;
  height: 3px;
  background: var(--tone);
  opacity: 0.6;
  transform-origin: 0 50%;
  animation: toast-time var(--toast-ms, 3000ms) linear both;
  pointer-events: none;
}
.toast.is-held .toast-time { animation-play-state: paused; opacity: 0.3; }
@keyframes toast-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ================================================================== reduced motion */
html[data-reduced-motion="true"] .fx-layer,
html[data-reduced-motion="true"] .toast-time,
html[data-reduced-motion="true"] .mach-dust { display: none; }
html[data-reduced-motion="true"] .guide-dot.is-now { animation: none; }
html[data-reduced-motion="true"] .guide-bar-fill { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .fx-layer, .toast-time, .mach-dust { display: none; }
  .guide-dot.is-now { animation: none; }
}

/* ================================================================== the server owns the save (iteration 11)
   The account box on the Portada (same start-form cushion as before: tabs, fields, one big button),
   the "Cerrar sesión" block, and the small banner shown while the server can't be reached. */
.acct { gap: var(--sp-4); }
.acct-tabs { margin-bottom: var(--sp-1); }
.acct-tabs .seg-btn { min-height: 40px; padding: 3px 16px 0; }
.acct-panel { min-width: 0; }
.acct-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.acct-field { display: flex; flex-direction: column; min-width: 0; }
.acct-field .label { margin-bottom: 8px; }
.acct-help { margin-top: 8px; font-size: var(--fs-6); line-height: 1.4; color: var(--text-3); }
.acct-input[aria-invalid="true"] {
  box-shadow: var(--sunk), 0 -3px 0 var(--danger), 0 3px 0 var(--danger), -3px 0 0 var(--danger), 3px 0 0 var(--danger);
}
.acct-input[readonly] { opacity: 0.7; }
.acct-error:empty { display: none; }
.acct-error { color: var(--danger); font-size: var(--fs-5); }
.acct-form .acct-submit { align-self: stretch; margin-top: var(--sp-1); }
.acct-submit.is-busy { cursor: progress; }
.acct-submit.is-busy::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 10px;
  background: currentColor;
  animation: acct-blink 600ms steps(2) infinite;
}
@keyframes acct-blink { 50% { opacity: 0.2; } }

/* show / hide password: a small plate inside the right end of the field */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 96px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-width: 78px;
  min-height: 32px;
  padding: 3px 10px 0;
  font: var(--px-s)/1 var(--f-display);
  color: var(--text-2);
  background: var(--surface-2);
  border: 0;
  border-radius: 0;
  box-shadow: var(--bevel-2), var(--ring2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-3); }
.pw-toggle[aria-pressed="true"] { color: var(--text); }
.pw-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.acct-summary { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-4); }
.acct-summary .muted { font-size: var(--fs-5); max-width: 52ch; }
.acct-who { font: var(--px-s)/1.2 var(--f-display); color: var(--text); }
.acct-who strong { color: var(--violet-text); font-weight: 400; }
.save-tools .acct-summary { margin-top: 0; }
.start-form > .btn-ghost.btn-small { align-self: flex-start; }

/* Booting without the server: what is going on, and a way to try again now */
.boot-wait { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); padding: 40px 0; text-align: center; }
.boot-wait .boot-msg { padding: 0; }

/* A minigame waiting for its ticket */
.game-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font: var(--px-s)/1 var(--f-display);
  color: var(--text-2);
}
.results-rejected {
  padding: 8px 12px;
  color: var(--text);
  background: var(--well);
  box-shadow: var(--sunk-2), var(--ring2);
  font-size: var(--fs-5);
  line-height: 1.45;
}

/* Cartera: a withdrawal the server is holding */
.wh-status.is-review { color: var(--gold); }

/* Offline banner: a small pill at the bottom, above the dock on phones */
.net-banner {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 9px 14px 8px;
  font-size: var(--fs-5);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  background: var(--surface-3);
  box-shadow: var(--bevel-3), var(--ring), 0 6px 0 var(--drop);
  pointer-events: none;
}
.net-banner[hidden] { display: none; }
.net-dot {
  flex: none;
  width: 8px; height: 8px;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--ink);
  animation: acct-blink 900ms steps(2) infinite;
}
@media (max-width: 639.98px) {
  .net-banner { bottom: calc(var(--dock-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  body[data-route="portada"] .net-banner,
  body.in-game .net-banner { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
html[data-reduced-motion="true"] .net-dot,
html[data-reduced-motion="true"] .acct-submit.is-busy::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .net-dot, .acct-submit.is-busy::after { animation: none; }
}

/* Turnstile «no soy un robot» (js/human.js) */
.acct-human { min-height: 65px; }
.human-check { width: 100%; }

/* E-mail verification (iteration 13): the "Verifica tu correo" step after sign-up and the small
   reminder in the Cartera and in Ajustes while the address is not verified yet. */
.email-remind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  max-width: 760px;
  margin: 0;
  padding: 12px 14px 12px 18px;
  background: var(--well);
  box-shadow: inset 4px 0 0 var(--violet-text), var(--sunk-2), var(--ring2);
}
.email-remind-dot { flex: none; width: 8px; height: 8px; background: var(--violet-text); box-shadow: 0 0 0 2px var(--ink); }
.email-remind-text { flex: 1 1 220px; min-width: 0; margin: 0; font-size: var(--fs-5); line-height: 1.45; color: var(--text-2); }
.email-remind-text strong { color: var(--text); font-weight: 600; }
.email-remind > .btn { flex: none; }
.modal .email-remind { margin-top: var(--sp-4); }

.verify { display: flex; flex-direction: column; gap: var(--sp-2); }
.verify > p { margin: 0; line-height: 1.5; }
.verify-to { color: var(--violet-text); font-weight: 600; overflow-wrap: anywhere; }
.verify-note { font-size: var(--fs-5); }
.verify-form { display: flex; flex-direction: column; margin-top: var(--sp-3); }
.verify-form .label { margin-bottom: 8px; }
.verify-input {
  max-width: 220px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em; /* balances the trailing letter-space so the digits sit centred */
  text-align: center;
}
.verify-input::placeholder { color: var(--text-3); opacity: 0.45; }
.verify-msg, .verify-ok { margin: 8px 0 0; font-size: var(--fs-5); line-height: 1.4; }
.verify-msg:empty, .verify-ok:empty { display: none; }
.verify-ok { color: var(--success); }
.verify-again { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: var(--sp-3); }
.verify-again .acct-help { flex: 1 1 200px; margin: 0; }
.verify-resend { flex: none; min-width: 150px; }
.modal-verify .modal-actions .btn.is-busy { cursor: progress; }
@media (max-width: 639.98px) {
  .verify-input { max-width: none; }
  .verify-resend { width: 100%; }
}

/* «Continuar con Google» (iteration 14): on top of both account tabs, only when the server has Google
   configured. Google's sign-in branding: white face, the multicolour G, dark label in a plain sans
   (Rubik medium stands in for Roboto); the site's chunky outline and press keep it one of our buttons. */
.acct-google { display: flex; flex-direction: column; gap: var(--sp-4); }
.acct-google[hidden] { display: none; }
.btn.btn-google {
  --face: #FFFFFF;
  --face-hover: #F1F3F4;
  --hi: #FFFFFF;
  --lo: #DADCE0;
  --side: #8E918F;
  --fg: #1F1F1F;
  align-self: stretch;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.btn-google .g-logo { width: 20px; height: 20px; }
.btn-google .g-logo svg { width: 20px; height: 20px; }
.btn-google.is-busy { cursor: progress; }
.btn-google.is-busy::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 2px;
  background: currentColor;
  animation: acct-blink 600ms steps(2) infinite;
}
.btn-google:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; }
.g-logo { display: inline-flex; flex: none; width: 18px; height: 18px; }
.g-logo svg { display: block; width: 18px; height: 18px; }

/* «o con tu correo»: a quiet rule with the words in the middle */
.acct-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: var(--fs-6);
  font-weight: 500;
  line-height: 1;
  color: var(--text-3);
  white-space: nowrap;
}
.acct-or::before,
.acct-or::after { content: ''; flex: 1 1 0; height: 2px; background: var(--line-strong); }

/* a cancelled Google sign-in is news, not an error */
.why.acct-error.is-info:not(:empty) { color: var(--text-2); }

/* "Elige tu nombre de usuario" (a new Google player) */
.acct-gstep { display: flex; flex-direction: column; gap: var(--sp-3); }
.acct-gstep-title { margin: 0; font: var(--px-m)/1 var(--f-display); font-weight: 400; color: var(--text); }
.acct-gstep-wait { margin: 0; font-size: var(--fs-5); color: var(--text-2); }
.acct-gstep-text { margin: 0; font-size: var(--fs-5); line-height: 1.45; color: var(--text-2); }
.acct-gchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  max-width: 100%;
  margin: 0;
  padding: 8px 12px 8px 10px;
  font-size: var(--fs-5);
  font-weight: 600;
  color: var(--text);
  background: var(--well);
  box-shadow: var(--sunk-2), var(--ring2);
}
.acct-gchip-mail { min-width: 0; overflow-wrap: anywhere; }
.acct-gstep .acct-gcancel { align-self: flex-start; margin-top: 0; }

/* Ajustes / Estadísticas: the account is linked with Google */
.acct-linked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 10px 6px 8px;
  font-size: var(--fs-5);
  font-weight: 600;
  color: var(--text);
  background: var(--well);
  box-shadow: var(--sunk-2), var(--ring2);
}
html[data-reduced-motion="true"] .btn-google.is-busy::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .btn-google.is-busy::after { animation: none; }
}

/* «Red de minado» window (js/ui/network.js, iteration 13) */
.net-modal { width: min(560px, calc(100vw - 32px)); }
.net-modal .modal-body { max-height: min(72vh, 720px); overflow-y: auto; }
.net-info .net-lead { color: var(--text-2); font-size: var(--fs-5); margin: 0 0 var(--sp-3); }
.net-info .panel-sub { margin: var(--sp-3) 0 var(--sp-1); }
.net-next { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.net-next strong { font-family: var(--font-display, inherit); font-size: var(--fs-3); }
.net-clock { color: var(--text-2); font-variant-numeric: tabular-nums; }
.net-bar { margin-top: var(--sp-1); }
.net-grid { display: grid; gap: 2px; margin: 0; }
.net-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); padding: 6px 8px; background: var(--surface-2, rgba(255,255,255,.03)); }
.net-row dt { color: var(--text-2); font-size: var(--fs-5); display: flex; flex-direction: column; }
.net-row dt small { color: var(--text-3); font-size: var(--fs-6); }
.net-row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.net-row.is-gold dd { color: var(--gold); }
.net-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.net-blocks li { display: grid; grid-template-columns: auto auto 1fr auto; gap: var(--sp-2); padding: 5px 8px; background: var(--surface-2, rgba(255,255,255,.03)); font-size: var(--fs-5); font-variant-numeric: tabular-nums; }
.net-blocks li.offline { opacity: .8; }
.net-blocks .nb-t, .net-blocks .nb-n { color: var(--text-3); }
.net-blocks .nb-v { color: var(--gold); text-align: right; }
.net-blocks .nb-v.zero { color: var(--text-3); }
.net-panel .net-open { margin: 0 0 var(--sp-2); }
@media (max-width: 480px) {
  .net-blocks li { grid-template-columns: auto 1fr auto; }
  .net-blocks .nb-n { display: none; }
}

/* ------------------------------------------------------------------ Tareas (iteration 19, js/ui/tasks.js) */
.screen-tasks { display: flex; flex-direction: column; gap: var(--sp-5); }
.tasks-intro { display: flex; gap: var(--sp-5); align-items: flex-start; }
.tasks-art { flex: none; line-height: 0; padding-top: 4px; }
.tasks-text { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.tasks-points { display: flex; flex-direction: column; gap: 8px; padding-left: 1.2em; list-style: square; color: var(--text); }
.tasks-points li::marker { color: var(--gold); }
.tasks-closed { color: var(--gold); font-weight: 600; }
.tasks-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }
.tasks-recent { display: flex; flex-direction: column; gap: 6px; }
.tasks-recent li { display: flex; gap: var(--sp-3); align-items: baseline; }
.tasks-recent .pos { color: var(--gold); font-weight: 600; min-width: 8ch; }
.tasks-recent .neg { color: #FF8A8A; font-weight: 600; min-width: 8ch; }
.tasks-modal { width: min(1100px, calc(100vw - 32px)); max-width: none; }
.tasks-modal-body { display: flex; flex-direction: column; gap: var(--sp-3); }
.tasks-frame { display: block; width: 100%; height: min(75vh, 900px); border: 0; background: #0E0A1C; box-shadow: var(--ring2); }
.tasks-modal-note { font-size: var(--fs-5); color: var(--text-2); }
.tasks-card {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4); padding: 12px 16px;
  color: var(--text); text-decoration: none;
}
.tasks-card:hover { color: var(--text); background: #241B42; }
.tasks-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tasks-card-text strong { font: 400 var(--px-s)/1 var(--f-display); }
.tasks-card-text small { color: var(--text-2); }
.tasks-card-go { font: 400 var(--px-m)/1 var(--f-display); color: var(--gold); }
@media (max-width: 639.98px) {
  .tasks-intro { flex-direction: column; }
  .tasks-frame { height: 70vh; }
  .tasks-modal { width: auto; }
}

/* Tareas (iteration 20): the wall is right there, full width, with the explanation below it. */
.screen-tasks { display: flex; flex-direction: column; gap: var(--sp-5); }
.tasks-wall { padding: 0; overflow: hidden; }
.tasks-wall-host { display: grid; min-height: 560px; }
.tasks-frame-inline { height: min(80vh, 920px); min-height: 560px; box-shadow: none; }
.tasks-wall-host .tasks-loading,
.tasks-wall-host .tasks-closed { margin: auto; padding: 40px 16px; text-align: center; }
.tasks-loading { color: var(--text-2); }
.tasks-wall-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: 10px 16px 12px; }
.tasks-wall-foot p { font-size: var(--fs-5); margin: 0; }
.tasks-side { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
@media (max-width: 899.98px) {
  .tasks-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639.98px) {
  .tasks-wall-host { min-height: 480px; }
  .tasks-frame-inline { height: calc(100dvh - 220px); min-height: 480px; }
}
.tasks-wall-foot a[hidden] { display: none; }

/* Daily reward (iteration 24, js/ui/daily.js): seven warm tiles, today's glowing, the 7th a bigger prize. */
.modal-daily { width: min(760px, calc(100vw - 24px)); max-width: none; }
.daily { display: flex; flex-direction: column; gap: var(--sp-4); }
.daily-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.daily-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px;
  min-height: 132px; padding: 10px 6px 10px;
  text-align: center;
  background: #1D1636;
  border: 2px solid #3A2E63;
  border-radius: 12px;
  box-shadow: 0 4px 0 #0D081E, inset 0 2px 0 rgba(255, 255, 255, 0.05);
}
.daily-tile.is-big { grid-column: span 2; background: linear-gradient(180deg, #2A2048, #1D1636); border-color: #8A6A2E; }
.daily-day { font: 400 var(--px-s)/1 var(--f-display); color: var(--text-2); }
.daily-art { display: grid; place-items: center; min-height: 64px; line-height: 0; }
.daily-art .rack-thumb { max-height: 64px; overflow: hidden; }
.daily-what { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.2; }
.daily-tile.is-claimed { opacity: 0.55; }
.daily-tile.is-claimed .daily-art { filter: grayscale(0.6); }
.daily-check {
  position: absolute; top: 6px; right: 8px;
  font: 400 22px/1 var(--f-display); color: #8CF2C8; text-shadow: 0 2px 0 var(--ink);
}
.daily-tile.is-today {
  background: linear-gradient(180deg, #4A3410, #2A1D0A);
  border-color: var(--gold);
  box-shadow: 0 4px 0 #6B4A0E, 0 0 0 3px var(--ink), 0 0 18px rgba(244, 199, 82, 0.35);
  animation: daily-glow 1.6s steps(6) infinite alternate;
}
.daily-tile.is-today .daily-day { color: var(--gold); }
@keyframes daily-glow {
  from { box-shadow: 0 4px 0 #6B4A0E, 0 0 0 3px var(--ink), 0 0 10px rgba(244, 199, 82, 0.2); }
  to { box-shadow: 0 4px 0 #6B4A0E, 0 0 0 3px var(--ink), 0 0 22px rgba(244, 199, 82, 0.45); }
}
.daily-note { margin: 0; color: var(--text); }
.daily-note strong { color: var(--gold); }
@media (max-width: 559.98px) {
  .daily-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-tile { min-height: 116px; }
}
html[data-reduced-motion="true"] .daily-tile.is-today { animation: none; }

/* the Guarida card */
.daily-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px var(--sp-3); }
.daily-card-art { line-height: 0; }
.daily-card-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.daily-card > .btn { grid-column: 1 / -1; width: 100%; }
.daily-card-text p { margin: 0; font-size: 14px; color: var(--text-2); }
.daily-card.is-ready { border-color: var(--gold); box-shadow: inset 0 0 0 2px rgba(244, 199, 82, 0.35); }
.daily-card.is-ready .daily-card-text p { color: var(--text); }

/* Tareas diarias card (iteration 25, js/ui/dailytasks.js) */
.daily-tasks .panel-meta { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 600; }
.dt-lead { margin: 4px 0 10px; font-size: 13px; }
.dt-list { display: flex; flex-direction: column; gap: 8px; }
.dt-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #1D1636; border: 2px solid #3A2E63; border-radius: 10px; }
.dt-row.is-claimable { border-color: var(--gold); box-shadow: 0 0 12px rgba(244, 199, 82, 0.25); }
.dt-row.is-claimed { opacity: 0.6; }
.dt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dt-name { font-size: 14px; font-weight: 600; color: var(--text); }
.dt-bar { display: block; height: 6px; background: #120C24; border-radius: 3px; overflow: hidden; }
.dt-bar > span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--gold); }
.dt-count { color: var(--text-2); font-size: 12px; }
.dt-done { font: 400 22px/1 var(--f-display); color: #8CF2C8; }
