/* ============================================================
   Fajr Circle — dawn theme
   ============================================================ */
:root {
  --ink: #0a0c1d;
  --ink-2: #11142b;
  --ink-3: #191d3a;
  --line: rgba(255, 226, 170, .14);
  --line-2: rgba(255, 226, 170, .28);
  --cream: #fff3dd;
  --muted: #a8a6c2;
  --faint: #6d6b8c;
  --gold: #ffc46b;
  --gold-2: #ffe1a3;
  --amber: #f28b50;
  --rose: #e0648a;
  --violet: #7b61d6;
  --sea: #5ed6c1;
  --miss: #3a3858;

  --sky1: #070918;
  --sky2: #151a44;
  --sky3: #2a2360;
  --sun-y: 30%;
  --star-o: 1;
  --glow-o: .25;

  --r: 22px;
  --display: "Fraunces", Georgia, serif;
  --body: "Readex Pro", system-ui, sans-serif;
}
html[dir="rtl"] { --display: "Reem Kufi", "Readex Pro", serif; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------- Scene ---------------- */
.scene {
  position: relative;
  padding: max(16px, env(safe-area-inset-top)) 16px 0;
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 55%, var(--sky3) 100%);
  transition: background 2s ease;
  overflow: hidden;
  isolation: isolate;
}
.stars {
  position: absolute; inset: 0; z-index: -1; opacity: var(--star-o); transition: opacity 2s;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 44% 22%, #ffe9c4 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 78% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 7%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 35% 44%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 84% 46%, #ffe9c4 50%, transparent 51%),
    radial-gradient(1px 1px at 20% 60%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 58%, #fff 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { filter: brightness(.7); } to { filter: brightness(1.2); } }
.glow {
  position: absolute; left: 50%; bottom: -120px; width: 900px; height: 520px; z-index: -1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 170, 90, .85), rgba(224, 100, 138, .35) 45%, transparent 75%);
  opacity: var(--glow-o); transition: opacity 2s;
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 560px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; color: var(--gold); flex: none; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand h1 {
  margin: 0; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: .01em; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang {
  flex: none; border: 1px solid var(--line-2); background: rgba(10, 12, 29, .35); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 7px 14px; font-size: 13px;
}
html[dir="rtl"] .lang { font-family: "Fraunces", serif; }

.clock { text-align: center; margin: 26px auto 0; max-width: 560px; }
.dates { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.dates i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); opacity: .6; }
.cd-label { margin-top: 18px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); }
html[dir="rtl"] .cd-label { letter-spacing: 0; font-size: 14px; }
.cd {
  font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(52px, 15vw, 76px); line-height: 1; margin-top: 6px;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  text-shadow: 0 0 40px rgba(255, 196, 107, .25);
}
.times { display: flex; justify-content: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.t-chip {
  display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 8px 12px;
  border-radius: 14px; background: rgba(10, 12, 29, .32); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.t-chip b { font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.t-chip span { font-size: 11px; color: var(--muted); margin-top: 1px; }
.t-chip.key { border-color: rgba(255, 196, 107, .55); background: rgba(255, 196, 107, .1); }
.t-chip.key b { color: var(--gold-2); }

/* ---------------- Sun button on the horizon ---------------- */
.horizon { position: relative; height: 250px; margin-top: 26px; }
.skyline {
  position: absolute; left: -16px; right: -16px; bottom: -1px; width: calc(100% + 32px); height: 130px;
  color: var(--ink); pointer-events: none; z-index: 2;
}
.sun {
  --size: 190px;
  position: absolute; left: 50%; bottom: 58px; width: var(--size); height: var(--size); margin-left: calc(var(--size) / -2);
  border: 0; padding: 0; border-radius: 50%; background: transparent; z-index: 1;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .8s cubic-bezier(.2, .9, .2, 1.2), filter .6s;
}
.sun .ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 226, 170, .16); stroke-width: 3; }
.ring-fg { fill: none; stroke: var(--gold-2); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 578; stroke-dashoffset: 578; filter: drop-shadow(0 0 6px rgba(255, 210, 140, .9)); }
.sun-core {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(circle at 50% 38%, #fff4d6 0%, #ffd083 34%, #f79a55 70%, #e0648a 100%);
  color: #3a1a12;
  box-shadow: 0 0 0 10px rgba(255, 196, 107, .08), 0 0 80px 10px rgba(255, 160, 90, .45);
  padding-bottom: 34px;
}
.sun-icon svg { width: 30px; height: 30px; display: block; }
.sun-text { font-weight: 600; font-size: 14px; line-height: 1.2; max-width: 130px; text-align: center; }
.sun:active .sun-core { transform: scale(.97); }
.sun.dim { filter: saturate(.35) brightness(.72); }
.sun.dim .sun-core { box-shadow: 0 0 0 10px rgba(255, 196, 107, .04), 0 0 40px rgba(255, 160, 90, .15); }
.sun.late .sun-core { background: radial-gradient(circle at 50% 38%, #ffe7d2 0%, #f6a37a 40%, #c65a6d 80%, #7b3a6e 100%); }
.sun.done { transform: translateY(-6px); }
.sun.done .sun-core { box-shadow: 0 0 0 12px rgba(255, 196, 107, .12), 0 0 120px 30px rgba(255, 170, 90, .6); }
.sun.holding .sun-core { animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { box-shadow: 0 0 0 16px rgba(255, 196, 107, .16), 0 0 120px 24px rgba(255, 170, 90, .7); } }
.sun.pending .sun-core { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 16px rgba(255, 196, 107, .12), 0 0 110px 20px rgba(255, 160, 90, .55); } }

/* ---------------- App column ---------------- */
.app { max-width: 560px; margin: 0 auto; padding: 0 16px 60px; position: relative; z-index: 3; }

.status { text-align: center; margin-top: 18px; }
.status h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 24px; }
.status p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.status .pts { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 196, 107, .12); color: var(--gold-2); font-weight: 600; font-size: 14px; }

.who {
  margin: 18px auto 0; display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.picker { position: relative; width: 100%; max-width: 360px; margin: 18px auto 0; }
.picker select {
  appearance: none; -webkit-appearance: none; width: 100%;
  font: inherit; font-size: 17px; color: var(--cream);
  padding: 16px 48px 16px 20px; border-radius: 18px;
  background: var(--ink-2); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
html[dir="rtl"] .picker select { padding: 16px 20px 16px 48px; }
.picker::after {
  content: ""; position: absolute; top: 50%; inset-inline-end: 20px; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); pointer-events: none;
}
.me-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 999px;
  background: var(--ink-2); border: 1px solid var(--line);
}
html[dir="rtl"] .me-chip { padding: 6px 6px 6px 8px; }
.me-chip .nm { font-weight: 500; }
.me-chip button { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.me-chip button:hover { background: rgba(255, 255, 255, .06); }

.av {
  --h: 30; width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font-weight: 600; font-size: 14px;
  background: linear-gradient(140deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 60% 42%));
  color: #1a1024;
}
.av.emo { background: var(--ink-3); font-size: 18px; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.av.xl { width: 72px; height: 72px; font-size: 28px; }

/* ---------------- Proof ---------------- */
.proof { margin-top: 20px; padding: 16px; border-radius: var(--r); background: var(--ink-2); border: 1px dashed var(--line-2); }
.proof h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.proof p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.proof-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.proof-btn {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; min-height: 64px;
  background: var(--ink-3); border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; text-align: start;
}
.proof-btn svg { width: 22px; height: 22px; flex: none; color: var(--gold); }
.proof-btn.ok { border-color: rgba(94, 214, 193, .6); background: rgba(94, 214, 193, .08); }
.proof-btn.ok svg { color: var(--sea); }
.proof-btn small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.proof-btn img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }

/* ---------------- Tabs ---------------- */
.tabs {
  position: sticky; top: 10px; z-index: 10; margin: 30px 0 18px;
  display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px; border-radius: 999px;
  background: rgba(17, 20, 43, .82); backdrop-filter: blur(12px); border: 1px solid var(--line);
}
.tabs button { position: relative; z-index: 1; border: 0; background: transparent; padding: 10px 6px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .3s; }
.tabs button.on { color: #2a130c; }
.tab-ink {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 50%, var(--amber));
  transition: transform .45s cubic-bezier(.3, 1.3, .4, 1);
}
html[dir="rtl"] .tab-ink { left: auto; right: 5px; }

/* ---------------- Cards ---------------- */
.panel { display: grid; gap: 14px; animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.card {
  position: relative; padding: 18px; border-radius: var(--r);
  background: linear-gradient(180deg, var(--ink-2), #0e1026);
  border: 1px solid var(--line); overflow: hidden;
}
.card::before { /* corner star ornament */
  content: ""; position: absolute; width: 90px; height: 90px; inset-inline-end: -30px; top: -30px; opacity: .08;
  background: conic-gradient(from 22.5deg, var(--gold) 0 12.5%, transparent 0 25%, var(--gold) 0 37.5%, transparent 0 50%, var(--gold) 0 62.5%, transparent 0 75%, var(--gold) 0 87.5%, transparent 0);
  clip-path: polygon(50% 0, 61% 26%, 85% 15%, 74% 39%, 100% 50%, 74% 61%, 85% 85%, 61% 74%, 50% 100%, 39% 74%, 15% 85%, 26% 61%, 0 50%, 26% 39%, 15% 15%, 39% 26%);
}
.card h3 { margin: 0 0 14px; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
html[dir="rtl"] .card h3 { letter-spacing: 0; font-size: 14px; }
.card h3 em { font-style: normal; letter-spacing: 0; text-transform: none; color: var(--faint); font-size: 12px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { padding: 14px 12px; border-radius: 18px; background: var(--ink-2); border: 1px solid var(--line); text-align: center; }
.tile .n { font-family: "Fraunces", serif; font-weight: 600; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .n small { font-size: 14px; font-weight: 400; color: var(--muted); }
.tile .l { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.tile .s { font-size: 11px; color: var(--faint); margin-top: 3px; }
.tile svg.ic { width: 20px; height: 20px; color: var(--gold); margin-bottom: 6px; }

/* Rank card */
.rank { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.rank-medal { position: relative; width: 78px; height: 78px; display: grid; place-items: center; }
.rank-medal svg { position: absolute; inset: 0; }
.rank-medal b { position: relative; font-family: "Fraunces", serif; font-size: 26px; color: #2a130c; }
.rank-name { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.15; }
.rank-pts { color: var(--muted); font-size: 13px; margin-top: 2px; }
.rank-pts b { color: var(--gold-2); font-weight: 600; font-size: 15px; }
.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), var(--amber), var(--gold-2)); width: 0; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
html[dir="rtl"] .bar i { background: linear-gradient(-90deg, var(--rose), var(--amber), var(--gold-2)); }
.rank-next { font-size: 12px; color: var(--faint); margin-top: 6px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal .wd { text-align: center; font-size: 10.5px; color: var(--faint); padding-bottom: 2px; }
.cal .c { aspect-ratio: 1; border-radius: 10px; position: relative; display: grid; place-items: center; font-size: 10px; color: var(--faint); background: rgba(255, 255, 255, .025); }
.cal .c.ontime { background: radial-gradient(circle at 50% 40%, var(--gold-2), var(--gold) 45%, var(--amber)); color: #3a1a12; font-weight: 600; box-shadow: 0 0 14px rgba(255, 180, 100, .25); }
.cal .c.ontime.l2 { background: radial-gradient(circle at 50% 40%, #d9fff6, var(--sea) 55%, #2c8f9c); }
.cal .c.half { background: linear-gradient(135deg, var(--gold) 0 50%, rgba(255, 196, 107, .12) 50% 100%); color: #3a1a12; font-weight: 600; }
.cal .c.missed { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 3px, transparent 3px 6px); color: #56547a; }
.cal .c.pending { border: 1.5px dashed var(--gold); color: var(--gold); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.cal .c.future, .cal .c.none { background: transparent; color: #2e2c48; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* Charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--body); fill: var(--faint); font-size: 10px; }
.chart .val { fill: var(--cream); font-size: 10px; font-weight: 500; }

/* Badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 8px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; border: 0; background: none; padding: 0; }
.medal { position: relative; width: 62px; height: 62px; display: grid; place-items: center; }
.medal .shape { position: absolute; inset: 0; clip-path: polygon(50% 0, 63% 13%, 82% 9%, 87% 27%, 100% 38%, 93% 55%, 100% 72%, 84% 80%, 80% 98%, 62% 94%, 50% 100%, 38% 94%, 20% 98%, 16% 80%, 0 72%, 7% 55%, 0 38%, 13% 27%, 18% 9%, 37% 13%); background: linear-gradient(145deg, var(--gold-2), var(--amber) 60%, var(--rose)); }
.medal .shape::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a2350, #1a1432); }
.medal svg { position: relative; width: 26px; height: 26px; color: var(--gold-2); }
.badge .bn { font-size: 12px; font-weight: 500; line-height: 1.2; }
.badge .bh { font-size: 10.5px; color: var(--faint); line-height: 1.25; }
.badge.locked .shape { background: #24233f; }
.badge.locked .shape::after { background: #14132a; }
.badge.locked svg { color: #3f3d60; }
.badge.locked .bn { color: var(--faint); }
.badge.fresh .medal { animation: pop 1s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.2) rotate(-40deg); } }

/* Dawn meter */
.meter { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.meter-ring { position: relative; width: 150px; height: 150px; }
.meter-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.meter-ring .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.meter-ring .mid b { font-family: "Fraunces", serif; font-size: 40px; font-weight: 600; line-height: 1; }
.meter-ring .mid b small { font-size: 18px; color: var(--muted); font-weight: 400; }
.meter-ring .mid span { font-size: 11px; color: var(--muted); margin-top: 4px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; font-size: 12.5px; }
html[dir="rtl"] .person { padding: 4px 4px 4px 10px; }
.person .av { width: 26px; height: 26px; font-size: 11px; }
.person.ontime { border-color: rgba(255, 196, 107, .5); background: rgba(255, 196, 107, .08); }
.person.late { border-color: rgba(242, 139, 80, .4); }
.person.wait { opacity: .55; }
.person .tm { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* Journey */
.journey { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 38px 1fr; gap: 14px; position: relative; padding-bottom: 18px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; top: 38px; bottom: 0; inset-inline-start: 18px; width: 2px; background: linear-gradient(var(--line-2), transparent); }
.step:last-child::before { display: none; }
.step .dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: "Fraunces", serif; font-weight: 600; background: var(--ink-3); border: 1px solid var(--line); color: var(--muted); }
.step.now .dot { background: linear-gradient(135deg, var(--gold-2), var(--amber)); color: #2a130c; border: 0; box-shadow: 0 0 20px rgba(255, 180, 100, .35); }
.step.done .dot { background: rgba(94, 214, 193, .15); color: var(--sea); border-color: rgba(94, 214, 193, .4); }
.step h4 { margin: 2px 0 2px; font-size: 15px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.step .when { display: inline-block; margin-top: 6px; font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--gold-2); }

/* Feed */
.feed { display: grid; gap: 2px; }
.feed-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.feed-row:last-child { border-bottom: 0; }
.feed-row .t1 { font-size: 14px; font-weight: 500; }
.feed-row .t2 { font-size: 12px; color: var(--muted); margin-top: 1px; }
.feed-row .tag { display: flex; gap: 4px; }
.feed-row .tag svg { width: 16px; height: 16px; color: var(--sea); }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 196, 107, .12); color: var(--gold-2); }
.pill.late { background: rgba(242, 139, 80, .12); color: var(--amber); }

/* Leaderboard */
.champ { display: flex; align-items: center; gap: 14px; background: linear-gradient(120deg, rgba(255, 196, 107, .18), rgba(224, 100, 138, .12)); border-color: rgba(255, 196, 107, .35); }
.champ .crown { width: 40px; height: 40px; color: var(--gold); flex: none; }
.champ .k { font-size: 11.5px; color: var(--gold-2); letter-spacing: .12em; text-transform: uppercase; }
html[dir="rtl"] .champ .k { letter-spacing: 0; }
.champ .v { font-family: var(--display); font-size: 20px; font-weight: 600; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin-top: 4px; }
.pod { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pod .nm { font-size: 13px; font-weight: 500; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .blk { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: center; padding: 10px 4px; font-family: "Fraunces", serif; }
.pod .blk b { font-size: 24px; display: block; line-height: 1; }
.pod .blk small { font-family: var(--body); font-size: 11px; opacity: .8; }
.pod.p1 .blk { height: 120px; background: linear-gradient(180deg, var(--gold-2), var(--gold) 40%, var(--amber)); color: #2a130c; }
.pod.p2 .blk { height: 92px; background: linear-gradient(180deg, #d8d4ef, #9c96c6); color: #1b1834; }
.pod.p3 .blk { height: 74px; background: linear-gradient(180deg, #f2b58f, #b86a58); color: #2a130c; }
.pod.p1 .av { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(255, 196, 107, .5); }
.list { display: grid; }
.row { display: grid; grid-template-columns: 26px auto 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.row:last-child { border-bottom: 0; }
.row .pos { font-family: "Fraunces", serif; color: var(--faint); font-size: 16px; text-align: center; }
.row .nm { font-weight: 500; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.row .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; align-items: center; }
.row .sub svg { width: 12px; height: 12px; color: var(--amber); vertical-align: -1px; }
.row .p { font-family: "Fraunces", serif; font-weight: 600; font-size: 18px; text-align: end; }
.row .p small { display: block; font-family: var(--body); font-weight: 400; font-size: 10.5px; color: var(--faint); }
.row.me { background: linear-gradient(90deg, rgba(255, 196, 107, .08), transparent); margin: 0 -18px; padding-inline: 18px; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--miss); display: inline-block; }
.sdot.ontime { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.sdot.late { background: var(--amber); }

.empty { text-align: center; color: var(--muted); padding: 10px; font-size: 14px; }
.foot { margin-top: 30px; text-align: center; color: var(--faint); font-size: 11.5px; line-height: 1.7; }

/* Celebration */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.burst i {
  position: absolute; left: 50%; top: 40%; width: 10px; height: 10px;
  background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: fly 1.6s cubic-bezier(.1, .7, .3, 1) forwards;
}
@keyframes fly { to { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.3); opacity: 0; } }
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  background: var(--cream); color: #20122a; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .4); transition: transform .4s cubic-bezier(.2, 1.2, .4, 1), opacity .3s, visibility .4s; z-index: 60; max-width: calc(100% - 32px); text-align: center;
  opacity: 0; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

.skeleton { height: 120px; border-radius: var(--r); background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

@media (min-width: 720px) {
  .horizon { height: 280px; }
  .sun { --size: 210px; }
}
@media (max-width: 380px) {
  .meter { grid-template-columns: 1fr; justify-items: center; }
  .t-chip { min-width: 84px; }
  .sun { --size: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
