/* Juntos — Juego del día (/diario). Mobile first; colors from common.css and the brand palette (coral → orange, navy, cream, gold). */
:root {
  --dz-hero: linear-gradient(135deg, #FF6B4A, #FF9A3C);
  --dz-navy: linear-gradient(160deg, #3A3D5C, #1F2137);
  --dz-ok: #2BB673; --dz-meh: #F7B731; --dz-late: #FF8A3C; --dz-bad: #EF5350; --dz-none: #DCD6D0;
  --dz-edge: rgba(43, 45, 66, .08);
  --dz-lift: 0 18px 32px -24px rgba(43, 45, 66, .55);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dz-none: #4A4A72; --dz-edge: rgba(255, 255, 255, .1); --dz-lift: 0 18px 32px -24px rgba(0, 0, 0, .8); } }
:root[data-theme="dark"] { --dz-none: #4A4A72; --dz-edge: rgba(255, 255, 255, .1); --dz-lift: 0 18px 32px -24px rgba(0, 0, 0, .8); }

.dz { display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin: 0 auto; padding: 12px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
.dz-card { background: var(--card); border: 1px solid var(--dz-edge); border-radius: 24px; padding: 16px; box-shadow: var(--dz-lift); }
.dz-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 16px; text-align: center; font-weight: 700; color: var(--fg-2); }
.dz-spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255, 107, 74, .25); border-top-color: #FF6B4A; animation: dz-rot .8s linear infinite; }
@keyframes dz-rot { to { transform: rotate(360deg); } }

/* header */
.dz-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 26px; color: #fff; background: radial-gradient(260px 160px at 100% 0%, rgba(255, 107, 74, .45), transparent 70%), var(--dz-navy); box-shadow: 0 22px 40px -26px rgba(31, 33, 55, .9); }
.dz-head__em { flex: none; width: 64px; height: 64px; border-radius: 20px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .2), 0 12px 20px -12px rgba(0, 0, 0, .7); }
.dz-head__txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dz-head__kicker { font-weight: 800; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #FFD98A; }
.dz-head__title { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.dz-head.is-compact { padding: 10px 14px; border-radius: 20px; gap: 10px; }
.dz-head.is-compact .dz-head__em { width: 44px; height: 44px; border-radius: 14px; }
.dz-head.is-compact .dz-head__title { font-size: 1.2rem; }

/* intro */
.dz-intro { display: flex; flex-direction: column; gap: 14px; }
.dz-intro__rule { font: 600 1.15rem/1.35 var(--font-display); }
.dz-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dz-facts li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; background: var(--card-2); text-align: center; font-size: .82rem; font-weight: 800; color: var(--fg-2); line-height: 1.2; }
.dz-facts li span { font-size: 1.4rem; line-height: 1; }
.dz-go { gap: 10px; font-size: 1.25rem; min-height: 60px; }
.dz-go .ndj-ic { width: 22px; height: 22px; }
.dz-intro__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dz-risk { font-weight: 800; font-size: .88rem; color: #C2381C; }
.dz-streak { display: inline-flex; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .95rem; background: linear-gradient(135deg, rgba(255, 107, 74, .16), rgba(255, 154, 60, .2)); color: #B8361A; }
.dz-streak b { font: 700 1.1rem var(--font-display); }
.dz-streak.is-zero { background: var(--card-2); color: var(--fg-2); filter: grayscale(.6); }
.dz-streak.is-up { animation: dz-flame .9s cubic-bezier(.3, 1.6, .5, 1) .5s both; }
@keyframes dz-flame { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: none; } }

/* play: shared */
.dz-stage { display: flex; flex-direction: column; gap: 12px; }
.dz-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.dz-live { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--dz-edge); font-weight: 800; font-size: .82rem; color: var(--fg-2); }
.dz-live b { font: 700 1.3rem var(--font-display); color: var(--fg); }
.dz-live.is-bump { animation: dz-bump .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dz-bump { 40% { transform: scale(1.12); } }
.dz-timer { height: 10px; border-radius: 99px; background: var(--card-2); overflow: hidden; border: 1px solid var(--dz-edge); }
.dz-timer i { display: block; height: 100%; transform-origin: left center; background: var(--dz-hero); transition: transform .25s linear; }
.dz-timer.is-low i { background: linear-gradient(90deg, #EF5350, #FF8A3C); }
.dz-float { position: absolute; right: 12px; top: -6px; font: 700 1.25rem var(--font-display); color: var(--dz-ok); pointer-events: none; animation: dz-up 1s ease-out both; }
@keyframes dz-up { from { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-34px); } }
.dz-stop__note { text-align: center; font-size: .86rem; font-weight: 700; color: var(--fg-2); }

/* trivia */
.dz-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.dz-dot { width: 22px; height: 22px; border-radius: 7px; background: var(--card-2); border: 2px solid var(--dz-edge); }
.dz-dot.is-now { border-color: #FF6B4A; box-shadow: 0 0 0 3px rgba(255, 107, 74, .2); }
.dz-dot.is-ok { background: var(--dz-ok); border-color: transparent; }
.dz-dot.is-bad { background: var(--dz-bad); border-color: transparent; }
.dz-dot.is-none { background: var(--dz-none); border-color: transparent; }
.dz-q { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--dz-edge); box-shadow: var(--dz-lift); }
.dz-q__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-chip { padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .78rem; color: #fff; background: var(--c, #6C63FF); }
.dz-q__n { font-weight: 800; font-size: .82rem; color: var(--fg-2); }
.dz-secs { margin-left: auto; font: 700 1.3rem var(--font-display); min-width: 2ch; text-align: right; }
.dz-q__text { font-size: 1.35rem; font-weight: 600; line-height: 1.25; }
.dz-answers { display: grid; grid-template-columns: 1fr; gap: 10px; }
.dz-ans {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border: 0; border-radius: 18px; cursor: pointer; text-align: left;
  color: #fff; font: 600 1.1rem/1.2 var(--font-display); box-shadow: 0 12px 20px -14px rgba(43, 45, 66, .7), inset 0 -3px 0 rgba(0, 0, 0, .15);
  transition: transform .12s ease, opacity .2s ease, filter .2s ease;
}
.dz-ans:active:not(:disabled) { transform: scale(.98); }
.dz-ans--0 { background: #D63D3A; } .dz-ans--1 { background: #7E3FE0; } .dz-ans--2 { background: #0A7A74; } .dz-ans--3 { background: #B85600; }
.dz-ans__shape { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .2); font-size: 1rem; }
.dz-ans.is-right { background: linear-gradient(145deg, #1FAE63, #0F8A55); box-shadow: 0 0 0 3px rgba(43, 182, 115, .35); }
.dz-ans.is-wrong { background: linear-gradient(145deg, #EE5560, #C23039); }
.dz-ans.is-dim { opacity: .38; filter: grayscale(.5); }
.dz-ans:disabled { cursor: default; }
@media (min-width: 520px) { .dz-answers { grid-template-columns: 1fr 1fr; } }

/* stop */
.dz-stop__head { display: flex; align-items: center; gap: 14px; }
.dz-letter { display: grid; place-items: center; flex: none; width: 84px; height: 84px; border-radius: 24px; color: #fff; font: 700 3.2rem/1 var(--font-display); background: var(--dz-hero); box-shadow: 0 16px 26px -14px rgba(255, 107, 74, .95), inset 0 1px 0 rgba(255, 255, 255, .4); }
.dz-stop__info p { font: 600 1.1rem/1.3 var(--font-display); }
.dz-stop__info b { color: #E5482A; }
.dz-stop__clock { color: var(--fg-2); }
.dz-stop__clock b { color: var(--fg); font-size: 1.35rem; }
.dz-stop__list { display: flex; flex-direction: column; gap: 8px; }
.dz-stop__row { display: grid; grid-template-columns: minmax(0, 40%) 1fr; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--dz-edge); }
.dz-stop__lab { display: flex; align-items: center; gap: 6px; font: 600 .98rem/1.2 var(--font-display); }
.dz-stop__lab span { font-size: 1.2rem; }
.dz-stop__in { min-height: 48px; padding: 10px 12px; font-size: 1.08rem; }
.dz-stop__btn { min-height: 62px; font-size: 1.4rem; color: #fff; background: linear-gradient(180deg, #F25555, #C92A2A); box-shadow: 0 16px 26px -14px rgba(201, 42, 42, .9), inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .15); letter-spacing: .04em; }

/* memoria */
.dz-mm__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dz-mm__stats span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 14px; background: var(--card); border: 1px solid var(--dz-edge); font-weight: 800; }
.dz-mm__stats b { font: 700 1.15rem var(--font-display); }
.dz-mm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dz-mm__card { position: relative; aspect-ratio: 3 / 4; min-height: 64px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; }
.dz-mm__in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .35s cubic-bezier(.3, .9, .4, 1); }
.dz-mm__card.is-up .dz-mm__in { transform: rotateY(180deg); }
.dz-mm__back, .dz-mm__face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 10px 18px -12px rgba(43, 45, 66, .7); }
.dz-mm__back { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .08) 0 8px, transparent 8px 16px), var(--dz-navy); border: 2px solid rgba(255, 255, 255, .12); }
.dz-mm__logo { width: 52%; height: auto; opacity: .9; }
.dz-mm__face { background: #FFF7F0; border: 2px solid rgba(43, 45, 66, .08); transform: rotateY(180deg); padding: 8%; }
.dz-mm__face svg { width: 100%; height: 100%; }
.dz-mm__card.is-done .dz-mm__face { border-color: var(--dz-ok); box-shadow: 0 0 0 3px rgba(43, 182, 115, .3); }
.dz-mm__card.is-done { cursor: default; }
@media (prefers-reduced-motion: reduce) { .dz-mm__in { transition: none; } }

/* bingo */
.dz-bingo__count { font-weight: 800; color: var(--fg-2); }
.dz-bingo__top { display: flex; align-items: center; gap: 14px; }
.dz-ball { display: grid; place-items: center; flex: none; width: 112px; height: 112px; border-radius: 50%; color: #1F2137;
  background: radial-gradient(circle at 50% 50%, #FFE27A 0 62%, #F5A81A 63%); box-shadow: 0 18px 28px -16px rgba(245, 168, 26, .95), inset 0 -6px 0 rgba(0, 0, 0, .12); }
.dz-ball__n { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; font: 700 2.1rem/1 var(--font-display); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .12); }
.dz-ball.is-count .dz-ball__n { color: #E5482A; }
.dz-ball.is-pop { animation: dz-ball .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dz-ball { 0% { transform: scale(.5) rotate(-40deg); } 100% { transform: none; } }
.dz-bingo__hist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dz-bingo__hist li { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--dz-edge); font: 700 1rem var(--font-display); color: var(--fg-2); }
.dz-card3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; border-radius: 24px; background: var(--dz-navy); box-shadow: var(--dz-lift); }
.dz-cell { position: relative; aspect-ratio: 1; min-height: 64px; border: 0; border-radius: 18px; cursor: pointer; background: #FFF7F0; color: #1F2137; font: 700 2rem/1 var(--font-display); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1); transition: transform .12s; }
.dz-cell:active { transform: scale(.96); }
.dz-cell.is-on { color: #fff; background: radial-gradient(circle at 50% 50%, #2BD66F 0 55%, #17A653 56%); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), inset 0 -4px 0 rgba(0, 0, 0, .15); }
.dz-cell.shake { animation: ndj-shake .35s; }

/* result */
.dz-result { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.dz-result__kicker { font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.dz-score { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.dz-score__n { font: 700 4.2rem/1 var(--font-display); background: var(--dz-hero); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dz-score span { font-weight: 800; color: var(--fg-2); margin-top: 4px; }
.dz-grid { display: flex; flex-direction: column; gap: 6px; }
.dz-grid__row { display: flex; justify-content: center; gap: 6px; }
.dz-sq { width: 38px; height: 38px; border-radius: 10px; background: var(--dz-none); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1); }
.dz-sq--ok { background: var(--dz-ok); } .dz-sq--meh { background: var(--dz-meh); } .dz-sq--late { background: var(--dz-late); } .dz-sq--bad { background: var(--dz-bad); }
.is-fresh .dz-sq { animation: dz-sq .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.is-fresh .dz-grid__row:nth-child(2) .dz-sq { animation-delay: .25s; }
.is-fresh .dz-grid__row:nth-child(3) .dz-sq { animation-delay: .5s; }
.is-fresh .dz-sq:nth-child(2) { animation-delay: .08s; } .is-fresh .dz-sq:nth-child(3) { animation-delay: .16s; } .is-fresh .dz-sq:nth-child(4) { animation-delay: .24s; } .is-fresh .dz-sq:nth-child(5) { animation-delay: .32s; } .is-fresh .dz-sq:nth-child(6) { animation-delay: .4s; }
@keyframes dz-sq { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.dz-result__chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dz-chip2 { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--card-2); font-weight: 800; }
.dz-best { font-size: .86rem; font-weight: 700; color: var(--fg-2); }
.dz-share { gap: 8px; }
.dz-detail { width: 100%; text-align: left; border-radius: 16px; background: var(--card-2); padding: 4px 12px; }
.dz-detail summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font: 600 1rem var(--font-display); }
.dz-detail__list { margin: 0 0 10px; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dz-detail__list li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--dz-edge); }
.dz-detail__q { font-weight: 700; font-size: .9rem; color: var(--fg-2); }
.dz-detail__a { font-weight: 800; }
.dz-detail__note { font-size: .82rem; font-weight: 700; color: var(--fg-2); padding-bottom: 8px; }
.dz-word--letter .dz-detail__a, .dz-word--dup .dz-detail__a, .dz-word--no .dz-detail__a { color: var(--fg-2); text-decoration: line-through; }

/* board */
.dz-board { display: flex; flex-direction: column; gap: 10px; }
.dz-board__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dz-board__head h2 { font-size: 1.2rem; }
.dz-refresh { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--dz-edge); background: var(--card-2); color: var(--fg); font: 700 .9rem var(--font-display); cursor: pointer; }
.dz-refresh.is-busy { opacity: .7; }
.dz-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.dz-tab { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--dz-edge); background: var(--card-2); color: var(--fg-2); font: 700 .9rem var(--font-display); cursor: pointer; }
.dz-tab.is-on { background: var(--dz-hero); color: #fff; border-color: transparent; }
.dz-board__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dz-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: 16px; background: var(--card-2); }
.dz-row.is-lead { background: linear-gradient(90deg, rgba(255, 196, 76, .3), transparent 85%); }
.dz-row.is-me { box-shadow: inset 0 0 0 2px rgba(255, 107, 74, .45); }
.dz-row__pos { width: 26px; text-align: center; font: 700 1.05rem var(--font-display); color: var(--fg-2); }
.dz-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dz-row__name { display: flex; align-items: center; gap: 6px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-row__meta { font-size: .78rem; font-weight: 700; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-row__pts { font: 700 1.35rem var(--font-display); }
.dz-board__empty { color: var(--fg-2); font-weight: 700; }
.dz-board__note { font-size: .8rem; font-weight: 700; color: var(--fg-2); }
.dz-dare, .dz-board .btn { gap: 8px; }
.dz-board .btn .ndj-ic { width: 22px; height: 22px; color: #17A653; }

/* history + next */
.dz-hist h2 { font-size: 1.1rem; margin-bottom: 10px; }
.dz-hist__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dz-hist__d { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 14px; background: var(--card-2); min-width: 0; }
.dz-hist__d.is-on { background: linear-gradient(180deg, rgba(255, 154, 60, .26), rgba(255, 107, 74, .12)); }
.dz-hist__d.is-today { box-shadow: inset 0 0 0 2px rgba(255, 107, 74, .5); }
.dz-hist__dow { font-weight: 800; font-size: .76rem; color: var(--fg-2); }
.dz-hist__mark { font-size: 1.1rem; line-height: 1.2; color: var(--fg-2); }
.dz-hist__pts { font: 700 .78rem var(--font-display); min-height: 1em; }
.dz-next { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.dz-next p { font-weight: 800; }
.dz-next b { font-family: var(--font-display); color: #E5482A; }
.dz-next__sub { color: var(--fg-2); font-size: .9rem; }
.dz-next .btn { gap: 8px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dz-streak { color: #FFB59E; }
  :root:not([data-theme="light"]) .dz-risk { color: #FFB067; }
  :root:not([data-theme="light"]) .dz-stop__info b, :root:not([data-theme="light"]) .dz-next b { color: #FF9A7A; }
}
:root[data-theme="dark"] .dz-streak { color: #FFB59E; }
:root[data-theme="dark"] .dz-risk { color: #FFB067; }
:root[data-theme="dark"] .dz-stop__info b, :root[data-theme="dark"] .dz-next b { color: #FF9A7A; }
@media (max-width: 370px) {
  .dz { padding-left: 12px; padding-right: 12px; }
  .dz-stop__row { grid-template-columns: 1fr; }
  .dz-head__title { font-size: 1.35rem; }
}
