/* assets/css/tiles.css - Noos Tiles */
.tl-body { background: #070914; color: #f4f1ff; margin: 0; padding: 0; }
.tl { --acc: #d946ef; --acc2: #7c3aed; --panel: #0d1126; --line: rgba(255, 255, 255, .1); --muted: #a9a3c7;
      font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif; color: #f4f1ff; }
.tl [hidden] { display: none !important; }
.tl button { font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
/* the arcade bug pill covers controls; the menu row is used instead */
#beta-report-trigger { display: none !important; }
body.tl-playing { overflow-x: hidden; }

/* ------------------------------------------------------------ picker */
.tl-picker { max-width: 620px; margin: 0 auto; padding: 18px 16px 90px; }
.tl-phead { text-align: center; padding: 6px 0 14px; }
.tl-title { margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: .04em; background: linear-gradient(90deg, #f0abfc, #a78bfa 55%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-tag { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.tl-daily { display: block; width: 100%; text-align: left; border: 1px solid hsl(var(--h, 290) 70% 60% / .55); border-radius: 18px; padding: 16px 18px; cursor: pointer;
    background: radial-gradient(120% 140% at 0% 0%, hsl(var(--h, 290) 70% 30% / .55), transparent 60%), linear-gradient(135deg, #171233, #0d1126);
    box-shadow: 0 8px 30px hsl(var(--h, 290) 80% 40% / .25); margin-bottom: 12px; transition: transform .15s; }
.tl-daily:hover { transform: translateY(-2px); }
.tl-daily-k { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .18em; color: #fde68a; }
.tl-daily-t { display: block; font-size: 1.35rem; font-weight: 800; margin: 3px 0 2px; }
.tl-daily-s { display: block; font-size: .85rem; color: var(--muted); }
.tl-daily-b { display: inline-block; margin-top: 8px; font-size: .8rem; font-weight: 700; color: #fde047; }
.tl-pbar { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.tl-chip { border: 1px solid var(--line); background: rgba(255, 255, 255, .05); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.tl-chip:hover { background: rgba(255, 255, 255, .1); }
.tl-songs { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tl-songs { grid-template-columns: 1fr 1fr; } }
.tl-song { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; width: 100%;
    border: 1px solid var(--line); border-left: 4px solid hsl(var(--h) 80% 60%); border-radius: 14px; padding: 12px 12px 12px 14px;
    background: linear-gradient(100deg, hsl(var(--h) 60% 20% / .45), rgba(255, 255, 255, .03) 60%); transition: transform .12s, background .2s; min-width: 0; }
.tl-song:hover { transform: translateY(-2px); background: linear-gradient(100deg, hsl(var(--h) 60% 26% / .6), rgba(255, 255, 255, .05) 60%); }
.tl-song-l { display: flex; flex-direction: column; min-width: 0; }
.tl-song-t { font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-song-c { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-dots { display: flex; gap: 3px; margin-top: 5px; }
.tl-dots i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); }
.tl-dots i.on { background: hsl(var(--h) 90% 65%); }
.tl-song-r { display: flex; gap: 4px; flex: none; }
.tl-pill { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: rgba(255, 255, 255, .07); color: var(--muted); }
.tl-pill.on { background: hsl(var(--h) 75% 45%); color: #fff; }
.tl-pill.on[data-s="3"] { background: linear-gradient(135deg, #facc15, #f59e0b); color: #3b2500; }
.tl-empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 30px 0; }

/* ------------------------------------------------------------ stage */
.tl-play { display: flex; justify-content: center; padding: 6px 0 0; }
.tl-stage { position: relative; width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; background: #0a0d1c; border-radius: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
@media (min-width: 560px) { .tl-stage { border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .07); } }
#tl-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.tl-hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 22px; pointer-events: none;
    background: linear-gradient(180deg, rgba(7, 9, 20, .88), rgba(7, 9, 20, 0)); }
.tl-hbtn { pointer-events: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .1); font-size: .8rem; cursor: pointer; letter-spacing: -2px; }
.tl-hs { text-align: center; flex: 1; }
.tl-k { display: block; font-size: .62rem; letter-spacing: .2em; color: var(--muted); font-weight: 700; }
.tl-hs b { font-size: 1.7rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(217, 70, 239, .5); }
.tl-hm { width: 84px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tl-hm b { font-size: 1.1rem; font-weight: 800; color: #fde68a; }
.tl-hm span { font-size: .72rem; color: var(--muted); font-weight: 700; min-height: 1em; }
.tl-bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(255, 255, 255, .08); }
.tl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc2), var(--acc)); }
.tl-fever { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); padding: 4px 16px; border-radius: 999px; font-weight: 800; letter-spacing: .15em; font-size: .85rem;
    color: #3b2500; background: linear-gradient(90deg, #fde047, #f59e0b); box-shadow: 0 0 22px rgba(251, 191, 36, .7); animation: tl-pulse .5s ease-in-out infinite alternate; pointer-events: none; white-space: nowrap; }
@keyframes tl-pulse { to { transform: translateX(-50%) scale(1.08); } }
.tl-count { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: 6rem; font-weight: 800; color: #fff; text-shadow: 0 0 30px var(--acc); pointer-events: none; }
.tl-count.pop { animation: tl-pop .7s ease-out; }
@keyframes tl-pop { 0% { transform: scale(1.6); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); opacity: .95; } }
.tl-toast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(20, 22, 44, .96); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: .85rem; z-index: 40; max-width: 90%; text-align: center; }

/* ------------------------------------------------------------ overlays (opaque, scrollable, auto-margin centring) */
.tl-ov { position: absolute; inset: 0; z-index: 20; background: #0d1126; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 10px; padding: 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; text-align: center; }
.tl-ov > * { flex-shrink: 0; }
.tl-ov > :first-child { margin-top: auto; }
.tl-ov > :last-child { margin-bottom: auto; }
.tl-ready { background: radial-gradient(100% 70% at 50% 0%, hsl(var(--h, 280) 65% 22%), #0d1126 75%); z-index: 22; }
#tl-opts { z-index: 24; } #tl-cal { z-index: 26; } #tl-result { z-index: 28; }
.tl-p-t { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: .06em; }
.tl-p-s { color: var(--muted); font-size: .9rem; }
.tl-osmall { font-size: .78rem; }
.tl-r-k { font-size: .72rem; font-weight: 800; letter-spacing: .2em; color: hsl(var(--h, 280) 90% 78%); }
.tl-r-t { margin: 0; font-size: 1.8rem; line-height: 1.15; font-weight: 800; }
.tl-r-c { color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.tl-r-d { color: var(--muted); font-size: .88rem; min-height: 2.4em; }
.tl-r-info { font-weight: 700; font-size: .9rem; }
.tl-r-pb { color: #fde047; font-weight: 800; font-size: .95rem; }
.tl-r-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.tl-r-hint { font-size: .78rem; color: var(--muted); }
.tl-diffs { display: flex; gap: 8px; justify-content: center; }
.tl-diff { flex: 1; max-width: 120px; padding: 11px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); font-weight: 800; cursor: pointer; }
.tl-diff.on { background: linear-gradient(135deg, var(--acc2), var(--acc)); border-color: transparent; }
.tl-diff:disabled { opacity: .35; cursor: default; }
.tl-go { padding: 15px 22px; border: 0; border-radius: 999px; font-weight: 800; font-size: 1.05rem; letter-spacing: .08em; cursor: pointer; background: linear-gradient(135deg, var(--acc2), var(--acc)); box-shadow: 0 8px 26px rgba(217, 70, 239, .4); }
.tl-go:disabled { opacity: .45; cursor: default; }
.tl-btn { padding: 13px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); font-weight: 700; cursor: pointer; }
.tl-link { background: none; border: 0; color: #c4b5fd; font-weight: 700; cursor: pointer; padding: 6px; font-size: .9rem; }
.tl-ready > .tl-link:first-child { align-self: flex-start; margin-top: 0; }
.tl-orow { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); font-weight: 700; cursor: pointer; text-align: left; box-sizing: border-box; }
.tl-orow b { color: #f0abfc; white-space: nowrap; }
.tl-off { cursor: default; }
.tl-offctl { display: flex; align-items: center; gap: 10px; }
.tl-offctl button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .1); font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.tl-offctl b { min-width: 64px; text-align: center; }
#trophy-list { max-height: 46vh; overflow-y: auto; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: rgba(255, 255, 255, .03); }
.tl-caldot { width: 90px; height: 90px; border-radius: 50%; margin: 6px auto; background: rgba(255, 255, 255, .08); border: 2px solid var(--line); transition: background .05s; }
.tl-caldot.on { background: var(--acc); box-shadow: 0 0 40px var(--acc); }
.tl-res-score { font-size: 3rem; font-weight: 800; color: #fde047; }

/* ------------------------------------------------------------ small / landscape */
.tl-stage.tl-short .tl-hud { padding: 6px 10px 14px; }
.tl-stage.tl-short .tl-hs b { font-size: 1.2rem; }
.tl-stage.tl-short .tl-count { font-size: 3.4rem; top: 24%; }
.tl-stage.tl-short .tl-ov { padding: 10px 14px; gap: 6px; }
.tl-stage.tl-short .tl-r-t { font-size: 1.3rem; }
.tl-stage.tl-short .tl-go { padding: 10px 18px; }
.tl-stage.tl-short .tl-btn { padding: 8px 14px; }
.tl-stage.tl-narrow .tl-hm { width: 70px; }
.tl-stage.tl-narrow .tl-r-t { font-size: 1.45rem; }
@media (prefers-reduced-motion: reduce) { .tl-count.pop, .tl-fever { animation: none; } }