/* ============== FOOTER ============== */
footer {
  text-align: center;
  color: rgba(var(--accent-rgb), 0.5);
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  padding: 22px 16px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
  letter-spacing: 0.22em;
  position: relative;
  z-index: 1;
}
footer a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed rgba(var(--accent-rgb), 0.4); }

/* ============== TOAST ============== */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(8, 18, 30, 0.95);
  backdrop-filter: blur(8px);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 22px;
  border-radius: 3px;
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.4), inset 0 0 14px rgba(var(--accent-rgb), 0.08);
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
  max-width: 90vw;
}
#toast.visible { transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }

/* Always-visible "back to menu" floating button on result and final screens */
.screen-back-fab {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 200;
  background: rgba(8, 18, 30, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  padding: 11px 18px;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.45), inset 0 0 12px rgba(var(--accent-rgb), 0.08);
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.screen-back-fab:hover {
  background: rgba(var(--accent-rgb), 0.18);
  box-shadow: 0 0 32px rgba(var(--accent-rgb), 0.6), inset 0 0 18px rgba(var(--accent-rgb), 0.15);
  transform: translateY(-1px);
}

/* ============== BOOT LOADER ============== */
#boot {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #02080e 0%, #000204 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
}
#boot::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 2px solid rgba(var(--accent-rgb), 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.35);
}
@keyframes spin { to { transform: rotate(360deg); } }
#boot.gone { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }

/* ============== MOBILE ============== */
@media (max-width: 600px) {
  .page-wrap { padding: 14px 12px 24px; gap: 12px; }
  .ranking-list { grid-template-columns: repeat(2, 1fr); }
  .home-hint { font-size: 18px; }
  .receipt { font-size: 12px; padding: 20px 18px 24px; }
  .ledger-btn { font-size: 11px; padding: 8px 14px; }
  .home-header { padding: 14px 16px; }
  .home-logo { font-size: 26px; }
  .date-stamp { width: 130px; height: 130px; }
  .stamp-year { font-size: 38px; }
  .stat { padding: 10px 4px; }
}
