/* ===== CONTADOR MASIVO ===== */
.mass {
  margin: 1.6rem auto 0; pointer-events: auto; display: inline-flex; flex-direction: column; align-items: center; gap: .5rem;
  background: rgba(11,13,42,.7); border: 2px solid rgba(255,255,255,.22); border-radius: 18px; padding: 1rem 1.4rem;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.mass h2 { font-family: 'Press Start 2P', monospace; font-size: clamp(10px, 1.6vw, 12px); text-shadow: 2px 2px 0 #000; }
.massnum { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.8rem, 8vw, 4.6rem); line-height: 1; font-variant-numeric: tabular-nums; color: #ffd166; text-shadow: 0 3px 0 #7a4b00; }
.massnum.bump { animation: bump .18s ease-out; }
@keyframes bump { 50% { transform: scale(1.08) } }
.massbtn {
  width: 110px; height: 110px; border-radius: 50%; cursor: pointer;
  font-family: 'Press Start 2P', monospace; font-size: 18px; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff9a6b, #ff5d3a 55%, #b3261e);
  border: 4px solid #fff; box-shadow: 0 8px 0 #7a1712, 0 12px 30px rgba(0,0,0,.4);
  text-shadow: 2px 2px 0 #000; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform .06s, box-shadow .06s;
}
.massbtn:active { transform: translateY(6px); box-shadow: 0 2px 0 #7a1712, 0 6px 14px rgba(0,0,0,.4); }
.massmeta { font-size: .78rem; opacity: .85; }
.plus1 { position: fixed; z-index: 16; pointer-events: none; font-family: 'Press Start 2P', monospace; font-size: 14px; color: #ffd166; text-shadow: 2px 2px 0 #000; animation: floatup .7s ease-out forwards; }

/* ===== SWITCH MODO TEA ===== */
.teaswitch {
  position: fixed; top: 12px; left: 12px; z-index: 25; display: flex; align-items: center; gap: .55rem;
  background: rgba(11,13,42,.8); border: 2px solid rgba(255,255,255,.3); border-radius: 999px;
  padding: .4rem .8rem .4rem .45rem; cursor: pointer; color: #fff; font: 600 .85rem 'Inter', sans-serif;
}
.teaswitch .track { width: 46px; height: 26px; border-radius: 999px; background: #555a80; position: relative; transition: background .3s; }
.teaswitch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .3s; }
.teaswitch[aria-checked="true"] .track { background: linear-gradient(90deg, #ff6b9e, #ffd166, #6be3a4, #6bc4ff, #b98bff); }
.teaswitch[aria-checked="true"] .knob { left: 23px; }

/* ===== MODO TEA =====
   Colores vivos y figuras grandes para tocar, pero con movimientos lentos y predecibles:
   sin parpadeos, sin sacudidas de pantalla y sin sonido. */
#teaLayer { position: fixed; inset: 0; z-index: 1; display: none; overflow: hidden; }
body.tea #teaLayer { display: block; }
body.tea #bg { filter: saturate(1.4) brightness(1.1); }
body.tea .veil { background: none; }
.tea-sky {
  position: absolute; inset: 0; opacity: .5;
  background: linear-gradient(120deg, #ff6b9e, #ffb36b, #ffe66b, #6be3a4, #6bc4ff, #b98bff, #ff6b9e);
  background-size: 400% 400%; animation: teaSky 40s linear infinite alternate;
}
@keyframes teaSky { 0% { background-position: 0% 50% } 100% { background-position: 100% 50% } }
.bubble {
  position: absolute; border-radius: 50%; cursor: pointer;
  box-shadow: inset -8px -10px 0 rgba(0,0,0,.12), inset 8px 8px 0 rgba(255,255,255,.45), 0 6px 18px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center; user-select: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.bubble.popped { animation: bubblePop .45s ease-out forwards; pointer-events: none; }
@keyframes bubblePop { to { transform: scale(1.6); opacity: 0 } }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; border: 6px solid; transform: translate(-50%,-50%); animation: ripple 1.2s ease-out forwards; }
@keyframes ripple { from { width: 0; height: 0; opacity: .9 } to { width: 220px; height: 220px; opacity: 0 } }

body.tea .shake { animation: none !important; }
body.tea .shooting { display: none; }
body.tea h1 { color: #fff; text-shadow: 0 4px 0 #6b3fd1, 0 8px 0 rgba(0,0,0,.2); }
body.tea .box { border: 4px solid #fff; box-shadow: 0 6px 0 rgba(0,0,0,.25); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.tea .box:nth-child(1) { background: #ff6b9e; }
body.tea .box:nth-child(2) { background: #ff9f43; }
body.tea .box:nth-child(3) { background: #2ec27e; }
body.tea .box:nth-child(4) { background: #3a8dde; }
body.tea .box .lbl { opacity: 1; font-weight: 600; }
body.tea .now, body.tea .wday, body.tea .mass { background: rgba(255,255,255,.93); color: #1b1d3f; border-color: #fff; text-shadow: none; }
body.tea .wday *, body.tea .mass * { text-shadow: none; }
body.tea .mass h2, body.tea .massnum { color: #6b3fd1; }
body.tea .weather h2 { text-shadow: 2px 2px 0 #6b3fd1; }
body.tea .wnote { text-shadow: 0 1px 3px #000; opacity: 1; }
body.tea .egg { transition: opacity .3s; transform: translate(-50%,-50%); background: #fff; color: #1b1d3f !important; text-shadow: none; }
body.tea .egg.show { transform: translate(-50%,-50%); }
body.tea .particle { display: none; }

.tea-friend { position: fixed; bottom: 10px; left: 12px; z-index: 6; display: none; align-items: flex-end; gap: .3rem; cursor: pointer; }
body.tea .tea-friend { display: flex; }
.tea-friend img { width: 84px; height: 84px; image-rendering: pixelated; animation: friendBob 3s ease-in-out infinite; }
.tea-friend .speech {
  background: #fff; color: #1b1d3f; border-radius: 16px; padding: .55rem .8rem; font-weight: 600; font-size: .95rem;
  margin-bottom: 58px; box-shadow: 0 4px 0 rgba(0,0,0,.2); max-width: 220px; text-align: left;
}
@keyframes friendBob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

@media (prefers-reduced-motion: reduce) {
  .tea-sky, .tea-friend img { animation: none; }
}
