/* Rente — light mode, React + orbit glass tiles */
.rente-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(165deg, #fdf4ff 0%, #f0f9ff 38%, #fffbeb 72%, #f8fafc 100%);
  color: #1e293b;
  font-family: Inter, system-ui, sans-serif;
}

.rente-page .tool-app-top {
  position: relative;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.rente-scene {
  position: relative;
  min-height: calc(100vh - 52px);
  min-height: calc(100dvh - 52px);
  overflow: hidden;
}

/* Soft pastel blobs */
.rente-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.rente-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  will-change: transform;
  animation: renteBlobFloat var(--blob-dur, 22s) ease-in-out infinite alternate;
}

.rente-blob-1 { --blob-dur: 24s; }
.rente-blob-2 { --blob-dur: 19s; animation-delay: -5s; }
.rente-blob-3 { --blob-dur: 26s; animation-delay: -9s; }
.rente-blob-4 { --blob-dur: 17s; animation-delay: -3s; }

@keyframes renteBlobFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, 6%) scale(1.08); }
  100% { transform: translate(-3%, 4%) scale(0.96); }
}

.rente-hub-glow {
  animation: renteGlowPulse 4s ease-in-out infinite;
}

.rente-hub-ring {
  animation: renteOrbitSpin 24s linear infinite;
}

.rente-hub-card--in {
  animation: renteHubIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes renteHubIn {
  from { transform: scale(0.82); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes renteGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.12); opacity: 0.75; }
}

.rente-hub-days--live {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.rente-hub-quip--fade {
  animation: renteQuipIn 0.45s ease both;
}

@keyframes renteQuipIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.rente-tile--in {
  animation:
    renteTileIn 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) var(--delay, 0s) both,
    renteTileFloat var(--float-dur, 3.5s) ease-in-out calc(var(--delay, 0s) + 0.5s) infinite;
}

@keyframes renteTileIn {
  from { opacity: 0; transform: translateY(20px) scale(0.88); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes renteTileFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.rente-tile:hover {
  transform: translateY(-8px) scale(1.06) !important;
  box-shadow:
    0 20px 48px rgba(99, 102, 241, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rente-blob-1 {
  width: min(58vw, 480px);
  height: min(58vw, 480px);
  background: radial-gradient(circle, #c4b5fd 0%, transparent 68%);
  top: -8%;
  left: -6%;
}

.rente-blob-2 {
  width: min(50vw, 420px);
  height: min(50vw, 420px);
  background: radial-gradient(circle, #fbcfe8 0%, transparent 68%);
  top: 8%;
  right: -8%;
}

.rente-blob-3 {
  width: min(46vw, 380px);
  height: min(46vw, 380px);
  background: radial-gradient(circle, #a5f3fc 0%, transparent 68%);
  bottom: 5%;
  left: 18%;
}

.rente-blob-4 {
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  background: radial-gradient(circle, #fed7aa 0%, transparent 68%);
  bottom: 12%;
  right: 12%;
}

/* Stage layout */
.rente-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 12px 32px;
}

.rente-stage--desktop {
  min-height: calc(100vh - 52px);
  min-height: calc(100dvh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rente-orbit-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--orbit-r, 260px) * 2 + 200px);
  height: calc(var(--orbit-r, 260px) * 2 + 200px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rente-orbit-spin {
  position: absolute;
  inset: 0;
  animation: renteOrbitSpin 150s linear infinite;
  pointer-events: none;
}

.rente-orbit-slot {
  position: absolute;
  width: 148px;
  pointer-events: auto;
}

.rente-orbit-counter {
  animation: renteOrbitSpin 150s linear infinite reverse;
}

@keyframes renteOrbitSpin {
  to { transform: rotate(360deg); }
}

.rente-orbit-spin > * {
  pointer-events: auto;
}

/* Center hub */
.rente-hub {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 320px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.rente-stage--mobile .rente-hub {
  width: min(88vw, 300px);
  margin-top: 8px;
  margin-bottom: 20px;
}

.rente-hub-glow {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.rente-hub-ring {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  border: 2px dashed rgba(99, 102, 241, 0.22);
  pointer-events: none;
}

.rente-hub-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.65) 100%
  );
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 24px 64px rgba(99, 102, 241, 0.12),
    0 8px 24px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(148, 163, 184, 0.12);
}

.rente-hub-icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.rente-hub-sun {
  color: #f59e0b;
  animation: renteSpinSlow 8s linear infinite;
}

.rente-hub-spark {
  color: #a855f7;
  animation: renteWiggle 2.5s ease-in-out infinite;
}

@keyframes renteSpinSlow {
  to { transform: rotate(360deg); }
}

@keyframes renteWiggle {
  0%, 100% { transform: rotate(-12deg) scale(1); }
  50% { transform: rotate(12deg) scale(1.15); }
}

.rente-hub-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.rente-hub-date {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #4f46e5 0%, #db2777 55%, #ea580c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.rente-hub-sub {
  margin: 10px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.rente-hub-days {
  display: block;
  font-size: clamp(2.8rem, 12vw, 4rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #312e81 0%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rente-hub-unit {
  margin: 4px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.rente-hub-quip {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #64748b;
  max-width: 220px;
  min-height: 2.6em;
}

/* Liquid glass tiles */
.rente-tile {
  position: relative;
  padding: 14px 12px 12px;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.55) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 10px 32px rgba(15, 23, 42, 0.07),
    0 2px 8px rgba(99, 102, 241, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  overflow: hidden;
  cursor: default;
  user-select: none;
}

.rente-tile::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12%;
  right: 12%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent, #6366f1);
  opacity: 0.65;
}

.rente-tile-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 18px 18px 0 0;
}

.rente-fallback {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.rente-lucide svg {
  display: block;
}

.rente-tile-icon {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.rente-hub-sun svg {
  animation: renteSpinSlow 8s linear infinite;
}

.rente-hub-spark svg {
  animation: renteWiggle 2.5s ease-in-out infinite;
}

.rente-tile-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
}

.rente-tile--compact .rente-tile-label {
  font-size: 0.58rem;
  letter-spacing: 0.03em;
}

.rente-tile-value {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
  word-break: break-word;
}

.rente-tile--compact .rente-tile-value {
  font-size: 0.95rem;
}

.rente-tile-hint {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.3;
}

.rente-tile--compact {
  padding: 12px 10px 10px;
}

/* Mobile grid */
.rente-stage--mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.rente-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 0 4px 8px;
}

@media (min-width: 400px) {
  .rente-mobile-grid {
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .rente-hub {
    width: 300px;
  }

  .rente-hub-card {
    padding: 32px 24px;
  }

  .rente-tile-value {
    font-size: 1.2rem;
  }
}

@media (max-height: 700px) and (min-width: 768px) {
  .rente-orbit-wrap {
    transform: translate(-50%, -48%) scale(0.88);
  }
}

/* Fullscreen */
.rente-fs-btn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #475569;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.rente-fs-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #4f46e5;
  transform: scale(1.05);
}

.rente-page--fullscreen .tool-app-top {
  display: none;
}

.rente-page--fullscreen {
  overflow: hidden;
}

.rente-page--fullscreen #rente-root,
.rente-page--fullscreen .rente-scene {
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
}

.rente-page--fullscreen .rente-stage {
  max-width: none;
  width: 100%;
  min-height: 100dvh;
  height: 100%;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.rente-page--fullscreen .rente-stage--desktop {
  min-height: 100%;
  height: 100%;
}

.rente-page--fullscreen .rente-stage--mobile {
  min-height: 100%;
  height: 100%;
  justify-content: center;
}

.rente-page--fullscreen .rente-mobile-grid {
  max-width: min(520px, 92vw);
}

.rente-page--fullscreen .rente-hub {
  width: min(42vmin, 380px);
}

.rente-page--fullscreen .rente-hub-days {
  font-size: clamp(3rem, 14vmin, 5.5rem);
}

.rente-page--fullscreen .rente-fs-btn {
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
}
