/* Radio Fain — același aspect ca aplicația: fundal închis, bleumarin, galben, tricolor. */
:root {
  color-scheme: dark;
  --bg: #060a17;
  --surface: #101930;
  --ink: #ffffff;
  --muted: #9aa6c2;
  --line: rgba(255, 255, 255, .09);
  --navy: #0f2a66;
  --gold: #dcb86e;
  --rose: #f55f5f;
  --mist: #b3bbdb;
  --sea: #8fccc9;
  --gold-ink: #0d1730;
  --accent: #dcb86e;
  --on-accent: #0d1730;
  --live: #ff4d4d;
  --err: #ff8a7a;
  --ok: #6fd39a;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --page: 880px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scroll-padding-bottom: 110px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}
body.has-bar { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Antet */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  max-width: var(--page); margin: 0 auto; padding: 12px 18px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { display: block; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text span { font-size: 17px; }
.brand-text strong { font-size: 21px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.top nav { display: flex; gap: 2px; margin-left: auto; }
.top nav a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-radius: 999px; }
.top nav a:hover { color: var(--ink); background: var(--surface); }
.demo-pill { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); padding: 4px 10px; border-radius: 999px; }

main { max-width: var(--page); margin: 0 auto; padding: 6px 18px 0; }

/* Cartonașul „În direct” */
.live-card {
  border-radius: 22px; overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--surface));
  border: 1px solid var(--line);
}
.tricolor { height: 3px; background: linear-gradient(90deg, #0a3fb0 0 33.33%, #fcd116 33.33% 66.66%, #ce1126 66.66%); }
.live-body { display: flex; align-items: center; gap: 16px; padding: 20px; }
.live-text { flex: 1; min-width: 0; display: grid; gap: 8px; }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.eyebrow.is-live { color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .5); flex: none; }
.eyebrow.is-live .dot { background: var(--live); box-shadow: 0 0 0 0 rgba(255, 77, 77, .7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); } }
.live-card h1 { font-size: clamp(24px, 6vw, 34px); font-weight: 600; overflow-wrap: anywhere; }
.live-sub { color: rgba(255, 255, 255, .72); font-size: 15px; }

.play-big {
  flex: none; display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 0 28px rgba(220, 184, 110, .35);
  transition: transform .15s ease;
}
.play-big:hover { transform: scale(1.05); }
.play-big:active { transform: scale(.96); }
.play-big svg { width: 34px; height: 34px; fill: currentColor; }
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }
.play-big.is-loading { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 44px rgba(220, 184, 110, .6); } }

/* Secțiuni */
.block { padding-top: 34px; }
.block > h2, .block-head h2 { font-size: clamp(26px, 6vw, 32px); }
.block > h2 { margin-bottom: 14px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.hint { font-size: 14px; color: var(--muted); }
.pill { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--gold); background: transparent; border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); padding: 7px 15px; border-radius: 999px; }

/* Emisiuni */
.shows {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none;
}
.shows::-webkit-scrollbar { display: none; }
.show {
  position: relative; flex: none; width: 214px; min-height: 160px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 12px; padding: 18px 16px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.show::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 3px; border-radius: 999px; background: var(--show); }
.show h3 { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.show-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.show-meta { min-width: 0; font-size: 13px; color: var(--muted); }
.show-meta p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-play { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--show); color: var(--gold-ink); }
.show-play svg { width: 17px; height: 17px; fill: currentColor; }
.show-play:disabled { opacity: .35; cursor: default; }

/* Ediții */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { cursor: pointer; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.episodes { display: grid; gap: 6px; }
.ep-row {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 8px; margin: 0 -8px; border: 0; border-radius: 14px; background: transparent; cursor: pointer;
}
.ep-row:hover:not(:disabled) { background: var(--surface); }
.ep-row:disabled { cursor: default; }
.ep-row:disabled .ep-title { color: rgba(255, 255, 255, .6); }
.badge {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--show); background: color-mix(in srgb, var(--show) 18%, transparent); color: var(--show);
  font-family: var(--serif); font-weight: 700; font-size: 21px;
}
.badge svg { width: 20px; height: 20px; fill: currentColor; }
.ep-text { min-width: 0; flex: 1; display: grid; gap: 3px; }
.ep-title { font-weight: 500; overflow-wrap: anywhere; }
.episode.is-current .ep-title { color: var(--show); }
.ep-meta { font-size: 14px; color: var(--muted); }
.empty { color: var(--muted); padding: 8px 0; }

/* Calendar ortodox */
.cal-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.cal-rule { height: 1px; background: var(--line); }

/* Ziua aleasă */
.cal-hero {
  display: grid; gap: 16px; padding: 22px; margin-bottom: 14px; border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--navy) 75%, transparent), var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}
.cal-hero-head { display: flex; align-items: center; gap: 18px; }
.cal-hero-num { font-family: var(--serif); font-size: 68px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 76px; }
.cal-hero.is-red .cal-hero-num { color: var(--rose); }
.cal-hero-when { display: grid; gap: 4px; }
.cal-hero-month { font-family: var(--serif); font-size: 21px; color: rgba(255, 255, 255, .85); }
.cal-feast { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.cal-feast.is-red { color: var(--rose); font-weight: 600; }
.cal-plain { font-family: var(--serif); font-style: italic; color: rgba(255, 255, 255, .55); }
.cal-mark-row { display: flex; align-items: center; gap: 12px; }
.cal-mark-text { display: grid; gap: 1px; min-width: 0; }
.cal-mark-text strong { font-size: 15px; font-weight: 600; }
.cal-mark-text span { font-size: 13px; color: var(--muted); }

/* Iconițe */
.cal-icon {
  --tone: var(--muted);
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent);
}
.cal-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tone-red { --tone: var(--rose); }
.tone-teal { --tone: var(--sea); }
.tone-violet { --tone: var(--mist); }
.tone-gold { --tone: var(--gold); }
.tone-plain { --tone: #9aa6c2; }

/* Luna */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.cal-month { font-family: var(--serif); font-size: 26px; font-weight: 600; text-transform: capitalize; text-align: center; }
.cal-nav { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--gold); cursor: pointer; font-size: 20px; line-height: 1; }
.cal-nav:hover { border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week span { text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); padding: 4px 0 8px; }
.cal-week span:last-child { color: var(--rose); }
.cal-day {
  min-width: 0; height: 50px; padding: 0; display: grid; justify-items: center; align-content: center; gap: 2px;
  border: 0; background: transparent; cursor: pointer;
}
.cal-num {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid transparent;
  font-family: var(--serif); font-size: 18px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .92);
}
.cal-day:hover .cal-num { background: rgba(255, 255, 255, .07); }
.cal-day.is-red .cal-num { color: var(--rose); font-weight: 600; }
.cal-day.is-today .cal-num { border-color: var(--gold); }
.cal-day.is-selected .cal-num { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.cal-mark { width: 4px; height: 4px; border-radius: 50%; }
.cal-day.is-fast .cal-mark { background: var(--mist); }
.cal-day.is-fish .cal-mark { background: var(--sea); }
.cal-day.is-oil .cal-mark { background: var(--gold); }
.cal-day.is-selected .cal-mark { background: transparent; }
.lg-oil { background: var(--gold); }
.cal-saints p.is-red, .cal-row-saints.is-red { color: var(--rose); font-weight: 600; }
.cal-legend { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.lg { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: -10px; }
.lg-red { background: var(--rose); }
.lg-fast { background: var(--mist); }
.lg-fish { background: var(--sea); }

/* Sărbătorile lunii */
.cal-list-title { margin: 26px 0 6px; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.cal-list > li + li { border-top: 1px solid var(--line); }
.cal-row {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  padding: 14px 0; border: 0; background: transparent;
}
.cal-badge { flex: none; width: 44px; text-align: center; display: grid; gap: 2px; }
.cal-badge strong { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-badge span { font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.cal-row.is-red .cal-badge strong { color: var(--rose); }
.cal-row-name { flex: 1; min-width: 0; display: grid; gap: 3px; font-family: var(--serif); font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; color: rgba(255, 255, 255, .9); }
.cal-row-feast.is-red { color: var(--rose); font-weight: 600; }
.cal-row-saints { font-size: 16px; color: rgba(255, 255, 255, .82); }
.cal-row-feast + .cal-row-saints { font-size: 14px; color: var(--muted); }
.cal-saints { display: grid; gap: 6px; }
.cal-title { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.4; color: rgba(255, 255, 255, .82); }
.cal-row-title { font-size: 14px; font-style: italic; color: var(--muted); }
.cal-saints p { font-family: var(--serif); font-size: 19px; line-height: 1.4; color: rgba(255, 255, 255, .92); }
.cal-row:hover .cal-row-name { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.cal-row-icons { flex: none; display: flex; gap: 6px; }
.cal-row-icons .cal-icon { width: 32px; height: 32px; }
.cal-row-icons .cal-icon svg { width: 16px; height: 16px; }
.cal-note { margin-top: 12px; }

/* Program */
.schedule { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.slot { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.slot:first-child { border-top: 0; }
.slot.is-today { background: rgba(220, 184, 110, .12); }
.slot-when { font-size: 14px; color: var(--muted); }
.slot-when strong { display: block; color: var(--ink); font-size: 15px; }
.slot-time { font-variant-numeric: tabular-nums; }
.slot-title { font-weight: 600; }
.slot-note { font-size: 14px; color: var(--muted); }

/* Susține */
.support { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; align-content: start; }
.support-card h3 { font-size: 21px; }
.support-card p { color: var(--muted); }
.btn {
  justify-self: start; display: inline-block; text-decoration: none; font-weight: 700;
  background: var(--accent); color: var(--on-accent);
  padding: 11px 22px; border-radius: 999px; border: 2px solid var(--accent);
}
.btn-ghost { background: transparent; color: var(--accent); }
.sponsors { display: flex; flex-wrap: wrap; gap: 8px; }
.sponsors a, .sponsors span { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; }
.sponsors:empty { display: none; }

.foot { max-width: var(--page); margin: 0 auto; padding: 44px 18px 28px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; text-align: center; }
.foot strong { color: var(--ink); }

/* Bara de redare, mereu vizibilă jos */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
}
.bar-row, .seek { max-width: calc(var(--page) - 36px); margin: 0 auto; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.play-small { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); }
.play-small svg { width: 21px; height: 21px; fill: currentColor; }
.bar-text { min-width: 0; flex: 1; }
.bar-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seek { display: block; width: 100%; margin-top: 8px; accent-color: var(--gold); }
.time { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
body.has-seek { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }

@media (max-width: 560px) {
  .top nav { display: none; }
  .demo-pill { margin-left: auto; }
  .slot { grid-template-columns: 82px 1fr; }
  .live-body { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
