/* ============================================================
   ಕನ್ನಡ ಸಾಂಸ್ಕೃತಿಕ ಕ್ಯಾಲೆಂಡರ್ — PV maroon-and-white visual system
   ============================================================ */
/* Prajavani Text web fonts (as served by prajavani.net) */
@font-face { font-family: "Prajavani Text"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/PrajavaniTextRegular.woff2") format("woff2"); }
@font-face { font-family: "Prajavani Text"; font-weight: 600 900; font-style: normal; font-display: swap; src: url("assets/fonts/PrajavaniTextSemibold.woff2") format("woff2"); }
/* Noto Sans Kannada, self-hosted; ascent/descent overrides centre the letter body in the line box */
@font-face { font-family: "Noto Sans Kannada"; font-weight: 400 900; font-style: normal; font-display: swap; src: url("assets/fonts/NotoSansKannada-kannada.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0B83, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835; ascent-override: 95.1%; descent-override: 39.8%; line-gap-override: 0%; }
@font-face { font-family: "Noto Sans Kannada"; font-weight: 400 900; font-style: normal; font-display: swap; src: url("assets/fonts/NotoSansKannada-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; ascent-override: 95.1%; descent-override: 39.8%; line-gap-override: 0%; }

:root {
  --paper: #ffffff;
  --paper-deep: #f3f3f3;
  --card: #ffffff;
  --ink: #111111;
  --ink-soft: #555555;
  --line: rgba(17, 17, 17, .16);
  --verm: #942a2a;
  --verm-deep: #6f1d1d;
  --gold: #6f1d1d;
  --gold-soft: #f6e6e6;
  --green: #2f7a45;
  --amber: #c98a12;
  --green-soft: #e3f1e7;
  --red-soft: #f6e6e6;
  --amber-soft: #f1f1f1;
  --radius: 0;
  --shadow: 0 1px 2px rgba(17, 17, 17, .08), 0 4px 14px rgba(17, 17, 17, .05);
  --tabbar-h: 58px;
  --font-num: "Noto Sans Kannada", "Nirmala UI", sans-serif;
  --font-display: "Prajavani Text", "Noto Sans Kannada", "Nirmala UI", sans-serif;
  --font-body: "Prajavani Text", "Noto Sans Kannada", "Nirmala UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  min-height: 100vh;
}

.app { max-width: 720px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

[hidden] { display: none !important; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-top));
  background: var(--verm);
  color: #fff;
}
.masthead .icon-btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .55); color: #fff; }
.masthead .icon-btn:hover { background: rgba(255, 255, 255, .28); }
.masthead .today-btn { background: #fff; color: var(--verm); border-color: #fff; }
.masthead .today-btn:hover { background: #f6e6e6; }
.masthead :focus-visible { outline-color: #fff; }
.brand-logo { display: block; height: 32px; width: auto; max-width: 100%; }
/* The logo goes back to the Prajavani home page; a swipe that starts on it does not change the day */
.brand-link { display: block; max-width: 100%; line-height: 0; }
.brand-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.masthead-mid {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0;
  background: none; border: none; padding: 0; font: inherit; color: inherit; touch-action: pan-y;
}
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .02em;
  color: var(--verm); line-height: 1.1;
}
.masthead-mid { position: relative; }
.masthead-date {
  font-size: 13.5px; font-weight: 700; color: #fff; margin-top: 2px;
  background: none; border: 0; padding: 5px 10px; font-family: inherit; cursor: pointer; border-radius: 0;
  text-decoration: underline dotted rgba(255, 255, 255, .7); text-underline-offset: 4px; /* reads as tappable */
}
.masthead-date::after {
  content: ""; display: inline-block; width: 15px; height: 15px; margin-left: 7px; vertical-align: -2px;
  background: currentColor; /* calendar icon, drawn as a mask so it takes the text colour */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='1'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='1'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.masthead-date:hover { background: rgba(255, 255, 255, .16); }
.date-picker-input { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.ext-link { display: inline-block; margin-top: 6px; color: var(--verm); font-weight: 700; text-decoration: underline; }
.today-btn {
  flex: none; min-height: 44px; padding: 9px 12px; border: 1px solid var(--verm); border-radius: 0;
  background: var(--verm); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.today-btn:hover { background: var(--verm-deep); }

.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  font-size: 26px; line-height: 1; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  cursor: pointer; transition: transform .12s ease, background .12s ease;
}
/* Chevrons are drawn, not typeset: the ‹ › glyphs sit off-centre in the font's line box. */
#prevDay, #nextDay { font-size: 0; align-content: center; } /* the hidden text node is a 2nd grid row; centre the rows as a block */
#prevDay::before, #nextDay::before {
  content: ""; width: 10px; height: 10px;
  border: solid currentColor; border-width: 0 0 3px 3px;
}
#prevDay::before { transform: translateX(2px) rotate(45deg); }
#nextDay::before { transform: translateX(-2px) rotate(-135deg); }
.icon-btn:hover { background: var(--paper-deep); }
.icon-btn:active { transform: scale(.92); }

/* ---------- Main & views ---------- */
.main {
  flex: 1;
  padding: 14px 14px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 20px);
}
.view { animation: view-in .28s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Home ---------- */
/* The week strip follows the Month calendar: one grid, cells sharing their lines, weekday band on top. */
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); margin: 0 0 8px; border: 1px solid var(--line); border-right: 0; }
.strip-legend { margin: 0 0 12px; font-size: 12.5px; }
.ds-day {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px;
  padding: 0 0 21px; border: 0; border-right: 1px solid var(--line); border-radius: 0;
  background: var(--card); color: var(--ink); font: inherit; text-align: center; cursor: pointer;
  transition: background .1s ease;
}
.ds-day:hover, .ds-day:active { background: var(--paper-deep); }
.ds-day:focus-visible { outline: 2px solid var(--verm); outline-offset: -3px; }
.ds-wd { padding: 3px 0; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 800; }
.ds-day.sun .ds-wd { background: var(--verm); }
.sr-rest { font-size: 0; } /* in the accessible name, not on screen; inline so the word stays whole */
.ds-num { font-family: var(--font-num); font-weight: 900; font-size: 19px; line-height: 1.2; }
.ds-day.sun .ds-num { color: var(--verm); }
.ds-dots { position: absolute; left: 0; right: 0; bottom: 5px; display: flex; justify-content: center; align-items: center; gap: 3px; min-height: 12px; }
.ds-day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.ds-day.sel { background: var(--verm); }
.ds-day.sel .ds-num { color: #fff; }
.ds-day.sel.today { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px #fff; }
.home-header {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 18px;
  padding: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 0; box-shadow: var(--shadow);
}
.home-date { flex: 1 1 100%; }
.home-day-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-day-label { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
.home-day-name { font-size: 26px; font-weight: 900; line-height: 1.2; color: var(--ink); }
.home-day-date { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1; }
.home-day-date small { margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.home-date strong { font-family: var(--font-num); font-weight: 900; font-size: 56px; line-height: 1; color: var(--ink); flex: none; }
.home-date[data-sun] .home-day-name, .home-date[data-sun] strong { color: var(--verm); }
.home-district { display: flex; flex-direction: column; flex: 1 1 100%; gap: 4px; min-width: 0; }
.home-district > span { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
/* The switch sits outside the header card, flush on top of the content it controls. */
.home-switch { display: flex; gap: 4px; margin-top: 14px; border-bottom: 3px solid var(--verm); }
.home-switch button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 8px 4px; white-space: nowrap; border: 1px solid var(--line); border-bottom: 0; border-radius: 0; background: var(--paper-deep); color: var(--ink-soft); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.home-switch button.is-active { border-color: var(--verm); background: var(--verm); color: #fff; }
.home-switch button.is-active .switch-count { background: #fff; color: var(--verm); }
.home-switch .ico { display: block; flex: none; width: 18px; height: 18px; }
.switch-alert { display: block; }
.switch-alert.is-live { color: var(--verm); }
/* The icon blinks when the selected day itself has a notice, until its tab is opened. */
.home-switch button:not(.is-active) .switch-alert.is-live { animation: notice-blink 1s ease-in-out infinite; }
.home-switch button.is-active .switch-alert { color: #fff; }
@keyframes notice-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
.home-switch + .card { margin-top: 0; border-top: 0; }
.home-switch + .notices-view { margin-top: 12px; }
.home-switch button:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }

/* ---------- Panchanga ---------- */
.sun-row { display: flex; justify-content: center; gap: 28px; margin: 12px 0 2px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.sun-row .sun-item { display: inline-flex; align-items: center; gap: 5px; }
.sun-row .sunrise-item { color: #6f1d1d; }
.sun-row .sunset-item { color: #444; }
.sun-row .sun-ico { color: currentColor; font-weight: 700; }
.sun-ico .ico { width: 17px; height: 17px; display: inline-block; vertical-align: -3px; margin-right: 3px; }
.src-note { margin: 6px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-soft); }
.panga-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.panga-card { background: var(--card); border: 2px solid var(--verm); border-radius: 0; padding: 0 0 10px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.panga-head { display: flex; align-items: center; gap: 6px; padding: 5px 13px; background: var(--verm); }
.panga-name, .panga-sub { padding: 0 13px; }
.panga-head + .panga-name { padding-top: 6px; }
.panga-head .ico { width: 15px; height: 15px; flex: none; color: #fff; }
.panga-label { font-size: 13px; font-weight: 800; color: #fff; letter-spacing: .04em; }
.panga-name { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; }
.panga-card.featured .panga-label { font-size: 13px; }
.panga-card.featured .panga-name { font-size: 26px; }
.panga-sub { font-size: 13.5px; color: var(--ink-soft); }
.panga-sub .nd { color: var(--verm); font-weight: 700; }
.panga-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.pm-item { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 13px; background: var(--card); border: 2px solid var(--verm); border-radius: 0; box-shadow: var(--shadow); text-align: center; }
.pm-label { font-size: 13px; font-weight: 700; color: var(--gold); letter-spacing: .04em; }
.pm-value { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); line-height: 1.2; }
.date-context { margin-bottom: 14px; padding: 9px 14px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 0; color: var(--ink-soft); box-shadow: var(--shadow); }
.date-context p { margin: 0; font-size: 14px; }
.timeline { margin: 14px 0 4px; }
.tl-track { position: relative; height: 58px; background: linear-gradient(var(--line), var(--line)) center 50%/100% 3px no-repeat; }
.tl-block { position: absolute; top: 0; bottom: 0; border-radius: 0; padding: 4px 5px; overflow: hidden; font-size: 10.5px; line-height: 1.25; text-align: center; color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.tl-block b { font-weight: 700; display: block; }
.tl-block.good { background: var(--green); }
.tl-block.bad { background: var(--verm); }
.tl-block.mid { background: var(--amber); }
.tl-ends { display: flex; justify-content: space-between; gap: 16px; font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; }
.tl-endpoint { display: inline-flex; align-items: baseline; gap: 5px; }
.tl-endpoint small { color: var(--ink-soft); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tl-endpoint:last-child { text-align: right; }
.timing-list { display: none; list-style: none; margin: 10px 0 0; padding: 0; }
.timing-list li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.timing-list li:first-child { border-top: none; }
.tl-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tl-name { font-weight: 600; line-height: 1.35; }
.timing-list .t-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.timing-list .tone-dot { width: 11px; height: 11px; }
.tl-end-row { color: var(--ink-soft); }
.tl-end-row .ico { width: 16px; height: 16px; flex: none; color: var(--verm); }
.tl-end-row .t-time { margin-left: auto; color: var(--ink); }
.tone-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tone-dot.good { background: var(--green); }
.tone-dot.bad { background: var(--verm); }
.tone-dot.mid { background: var(--amber); }
.timing-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-soft); }
.timing-legend span { display: inline-flex; align-items: center; gap: 6px; }
.timing-legend .tone-dot { display: inline-block; }
.jathaka-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jr { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 0; background: #fafafa; font-size: 15px; }
.jr .jr-name { font-weight: 700; font-family: var(--font-display); }
.jr .jr-p { color: var(--verm-deep); font-weight: 600; }

@media (max-width: 759px) {
  /* Kala on mobile: one flat panel like the events list, the tone shown by a narrow left stripe and a plain word. */
  .timeline { display: none; }
  .timeline-mobile { display: block; margin: 12px 0 0; background: #fafafa; border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
  .timeline-mobile .tl-row { display: block; padding: 0; }
  .timeline-mobile .tl-row + .tl-row { border-top: 1px dashed var(--line); }
  .timeline-mobile .timeline-node { display: none; }
  .timeline-mobile .timeline-card { display: flex; flex-direction: column; gap: 6px; padding: 11px 14px 12px; border-left: 4px solid var(--tone, var(--line)); }
  .timeline-mobile .tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .timeline-mobile .tl-name { font-size: 15px; font-weight: 700; }
  .timeline-mobile .tl-tone { flex: none; color: var(--tone-ink, var(--ink-soft)); font-size: 13px; font-weight: 800; }
  .timeline-mobile .tl-when { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .timeline-mobile .t-time { font-family: var(--font-num); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .timeline-mobile .tl-dur { flex: none; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
  .timeline-mobile .tl-bar { position: relative; display: block; height: 4px; background: rgba(17, 17, 17, .09); }
  .timeline-mobile .tl-bar i { position: absolute; top: 0; bottom: 0; background: var(--tone, var(--line)); }
  .timeline-mobile .tl-row.good { --tone: var(--green); --tone-ink: var(--green); }
  .timeline-mobile .tl-row.mid { --tone: var(--amber); --tone-ink: #8f5d00; }
  .timeline-mobile .tl-row.bad { --tone: var(--verm); --tone-ink: var(--verm); }
  .panga-meta { gap: 6px; }
  .pm-item { padding: 10px 5px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line); border-radius: 0;
  box-shadow: var(--shadow); margin-top: 14px;
}
.card-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.card-heading { margin: 0; padding: 14px 16px 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.card-title .ico { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 7px; color: var(--verm); }
.card-body { padding: 0 16px 16px; }

.home-category { padding-top: 14px; }
.home-category + .home-category { margin-top: 16px; border-top: 1px dashed var(--line); }
.home-category-title { margin: 0 0 10px; color: var(--verm); font-family: var(--font-display); font-size: 18px; }
.home-category.cultural .home-category-title { color: var(--gold); }
.upcoming-day + .upcoming-day { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.upcoming-date { margin: 0; }
.upcoming-day .week-day-name { font-size: 20px; }
.upcoming-day .week-day-date b { font-size: 28px; }
.upcoming-day[data-sun] .week-day-name, .upcoming-day[data-sun] .week-day-date b { color: var(--verm); }
.upcoming-day .home-category { padding-top: 8px; }
.upcoming-day .home-category + .home-category { margin-top: 10px; padding-top: 10px; }

/* ---------- Events list ---------- */
.ev-panel {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 14px;
  font-size: .95em; line-height: 1.5; color: var(--ink);
  transition: background .12s ease;
}
.ev-row + .ev-row { border-top: 1px dashed var(--line); }
.ev-row:hover { background: var(--paper-deep); }
.event-link { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.event-link:focus-visible { outline: 2px solid var(--verm); outline-offset: 3px; border-radius: 0; }
.ev-mark {
  flex: none; width: 9px; height: 9px; margin-top: 7px;
  background: var(--gold);
  border: 1px solid rgba(111, 29, 29, .5);
  border-radius: 0; transform: rotate(45deg);
}
.ev-more {
  display: flex; justify-content: center;
  padding: 10px 12px 12px;
  border-top: 1px dashed var(--line);
}
.chip-more {
  padding: 9px 18px; font-size: 14px; font-weight: 700;
  color: var(--ink); background: var(--gold-soft);
  border: 1px solid rgba(148, 42, 42, .4); border-radius: 0;
  cursor: pointer; transition: background .12s ease;
}
.chip-more:hover { background: var(--gold-soft); filter: brightness(.97); }
.empty-note { margin: 0; font-size: 14px; color: var(--ink-soft); font-style: normal; }

/* ---------- District filter + event sections ----------
   Injected inside the Today events card body (#body-events): grouped
   inner sections, not standalone cards. */
.ev-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.ev-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.ev-section-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--verm);
}
.ev-section.state .ev-section-title { color: var(--green); }
.ev-container { min-height: 48px; }

.district-pick { display: flex; align-items: center; gap: 8px; }
.district-pick label {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  white-space: nowrap;
}
.district-select {
  flex: 1; min-width: 0; max-width: 260px;
  padding: 8px 32px 8px 12px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line); border-radius: 0;
  cursor: pointer;
}
.district-select:hover { border-color: rgba(17, 17, 17, .3); }
.district-select:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }
.district-native { display: none !important; }
.district-picker { position: relative; flex: 1; min-width: 0; }
.setting-row .district-picker { max-width: 240px; }
.district-trigger {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); text-align: left;
  background: var(--card); border: 1.5px solid rgba(17, 17, 17, .24); border-radius: 0; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.district-trigger:hover { border-color: rgba(17, 17, 17, .45); }
.district-trigger:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }
.district-pin { width: 20px; height: 20px; flex: none; color: var(--verm); }
.district-trigger-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.district-picker[data-empty] .district-trigger-text { font-weight: 500; color: var(--ink-soft); }
.district-trigger-chevron { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--ink-soft); transition: transform .15s ease; }
.district-trigger-chevron svg { width: 20px; height: 20px; }
.district-picker.is-open .district-trigger { border-color: var(--verm); box-shadow: 0 0 0 3px rgba(148, 42, 42, .14); }
.district-picker.is-open .district-trigger-chevron { transform: rotate(180deg); color: var(--verm); }

.district-panel {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 25;
  background: var(--card); border: 1px solid var(--line); border-radius: 0; overflow: hidden;
  box-shadow: 0 14px 34px rgba(17, 17, 17, .2);
}
.district-picker.is-open .district-panel { display: block; }
.district-sheet-title { display: none; }
.district-search {
  display: block; width: calc(100% - 20px); margin: 10px; padding: 10px 12px 10px 40px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #f6f6f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") no-repeat 12px center / 18px;
  border: 1px solid transparent; border-radius: 0;
}
.district-search:focus { outline: none; border-color: var(--verm); background-color: #fff; }
.district-menu { max-height: min(52vh, 340px); overflow-y: auto; padding: 0 8px 8px; overscroll-behavior: contain; }
.district-option {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border: 0; border-radius: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 15.5px; text-align: left; cursor: pointer;
}
.district-option:hover { background: var(--paper-deep); }
.district-option[aria-selected="true"] { background: var(--gold-soft); color: var(--verm); font-weight: 800; }
.district-option[aria-selected="true"]::after { content: "\2713"; flex: none; margin-left: 4px; font-weight: 900; }
.district-option:focus-visible { outline: 2px solid var(--verm); outline-offset: -2px; }
.district-clear { min-height: 40px; margin-bottom: 4px; color: var(--ink-soft); font-size: 14.5px; border-bottom: 1px solid var(--line); border-radius: 0; }
.district-option-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.district-option-count {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 24px; padding: 0 8px; border-radius: 0;
  background: var(--gold-soft); color: var(--verm-deep); font-family: var(--font-num);
  font-size: 13px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
}
.district-empty { margin: 0; padding: 18px 12px; text-align: center; color: var(--ink-soft); font-size: 14px; }

/* Phones: the list opens as a bottom sheet with a dimmed backdrop. */
@media (max-width: 759px) {
  .district-picker.is-open::before { content: ""; position: fixed; inset: 0; z-index: 44; background: rgba(17, 17, 17, .42); }
  .district-panel {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 45;
    border: 0; border-radius: 0; box-shadow: 0 -10px 34px rgba(17, 17, 17, .28);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .district-panel::before { content: ""; display: block; width: 42px; height: 4px; margin: 8px auto 0; border-radius: 0; background: rgba(17, 17, 17, .2); }
  .district-sheet-title { display: block; padding: 10px 16px 0; color: var(--verm); font-size: 17px; font-weight: 800; }
  .district-menu { max-height: 56vh; }
}

.error-note {
  margin: 0; font-size: 14px; color: var(--verm-deep);
  background: var(--red-soft);
  border: 1px solid rgba(148, 42, 42, .3);
  border-radius: 0;
  padding: 10px 12px;
}
.scope-state .ev-mark { background: var(--green); }
.scope-district .ev-mark { background: var(--verm); }
.ev-when { display: block; color: var(--ink-soft); font-size: .82em; font-family: var(--font-num); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* ---------- Month view ---------- */
.period-head, .month-head { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.month-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.month-title { flex: 1; text-align: center; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 21px; }
/* A plain calendar grid: cells share their lines, with no gaps between them. */
.week-row, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-grid { border-left: 1px solid var(--line); }
.week-row { font-size: 13px; font-weight: 800; color: #fff; text-align: center; }
.week-row > * { background: var(--ink); border-radius: 0; padding: 4px 0; }
.week-row > :first-child { background: var(--verm); }
.month-grid > .mday:nth-child(7n+1) { color: var(--verm); }
.mday {
  aspect-ratio: 1 / 1; padding: 0 0 15px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0;
  background: var(--card); font-family: var(--font-num); font-weight: 900; font-size: 17px;
  color: var(--ink); cursor: pointer; position: relative;
  transition: background .1s ease;
}
.mday:hover, .mday:active { background: var(--paper-deep); }
.mday.blank { background: #fafafa; cursor: default; }
.month-grid > .mday.sel { background: var(--verm); color: #fff; }
.mday.today { box-shadow: inset 0 0 0 2px var(--ink); }
.mday.sel.today { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px #fff; }
.mday:focus-visible { outline-offset: -3px; }
.mday-dots { position: absolute; left: 0; right: 0; bottom: 5px; display: flex; justify-content: center; align-items: center; gap: 3px; }
/* Markers: the Home tab icons at a small size. Lamp = events (maroon for the district, green for Karnataka-wide), warning sign = notices. */
.mark { flex: none; display: inline-flex; width: 12px; height: 12px; color: var(--verm); }
.mark .ico { display: block; width: 100%; height: 100%; }
.mark:not(.mark-alert) .ico { stroke-width: 2.6; } /* a heavier line keeps the lamp readable when small */
.mark-state { color: var(--green); }
.mark-alert { color: #8f5d00; }
/* In the Month grid the Karnataka-wide lamp is grey: it is on most days, so the district lamp and the warning sign are the ones to notice. */
.month-cal .mark-state, .month-legend .mark-state { color: #8c8c8c; }
.ds-day.sel .mark, .mday.sel .mark { color: #fff; --mark-cut: var(--verm); }
.scope-legend .mark { width: 16px; height: 16px; }
.week-day-label .mark { width: 22px; height: 22px; }
.month-note { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 12px; }
.dot-legend {
  display: inline-block; width: 8px; height: 8px; border-radius: 0;
  background: var(--gold); margin: 0 2px; vertical-align: baseline;
}

/* ---------- Month agenda ---------- */
.month-agenda {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
}
/* The list is collapsed until the heading is tapped. */
.month-agenda > summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; margin: 0;
}
.month-agenda > summary::-webkit-details-marker { display: none; }
.month-agenda > summary > span:first-child { flex: 1; }
.month-agenda > summary::after {
  content: ""; flex: none; padding: 3.5px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s ease;
}
.month-agenda[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.month-agenda[open] > summary { margin-bottom: 10px; }
.month-agenda > summary:focus-visible { outline: 2px solid var(--verm); outline-offset: 4px; }
.agenda-count {
  flex: none; min-width: 22px; padding: 1px 7px; border-radius: 0; text-align: center;
  background: var(--verm); color: #fff; font-size: 12.5px; font-weight: 800; font-family: var(--font-num);
}
.month-agenda-list { padding: 0 12px; }
.agenda-day + .agenda-day { border-top: 1px dashed var(--line); }
.agenda-day .week-day-title { padding: 0; }
.agenda-scope { margin-top: 4px; }
.agenda-scope + .agenda-scope { border-top: 1px dashed var(--line); }
.agenda-scope h4 { margin: 7px 2px 0; color: var(--verm); font-size: 13px; }
.agenda-scope.statewide h4 { color: var(--green); }
.week-day-link {
  padding: 0; border: 0; background: none; color: var(--verm-deep); font: inherit; font-weight: 700; cursor: pointer;
}
.agenda-day .ev-row { padding-left: 4px; padding-right: 4px; }

/* ---------- Week view ---------- */
.week-agenda, .month-scroller { display: grid; gap: 24px; }
.week-block { display: grid; gap: 0; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 0; box-shadow: var(--shadow); }
.month-block { display: grid; gap: 12px; }
.stream-period-title { margin: 0; padding: 4px 2px; font-family: var(--font-display); font-size: 21px; color: var(--verm); }
.month-cal > .week-row {
  position: sticky; top: var(--masthead-h, 64px); z-index: 10;
}
/* Week and Month: the district name in each period heading opens the view's one picker. */
.stream-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.district-link { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 55%; min-height: 36px; padding: 4px 2px; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.district-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 1px dotted currentColor; }
.district-link .district-pin { width: 16px; height: 16px; }
.district-link:hover { color: var(--verm); }
.district-link:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }
/* A district link inside a sentence: reads as a link, not a pill */
.district-link.inline-link { display: inline; max-width: none; min-height: 0; padding: 0; font-size: inherit; color: var(--verm); text-decoration: underline; text-underline-offset: 2px; }
.district-anchor .district-trigger { display: none; }
@media (min-width: 760px) {
  .district-anchor .district-panel { position: fixed; top: calc(var(--masthead-h, 64px) + 12px); left: 50%; right: auto; width: 420px; transform: translateX(-50%); z-index: 45; }
}
.month-block + .month-block { padding-top: 8px; border-top: 2px solid var(--line); }
.week-block + .week-block { margin-top: 8px; }
.week-block .stream-period-title { font-size: 18px; }
.week-day { padding: 10px 0 12px; }
.week-day + .week-day { border-top: 1px solid var(--line); }
.week-day-title { margin: 0; }
.week-day-link { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.week-day-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.week-day-name { min-width: 0; font-family: "Noto Sans Kannada", "Nirmala UI", sans-serif; font-weight: 900; font-size: 22px; line-height: 1.2; color: var(--ink); }
.week-day-date { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1; }
.week-day-date b { font-family: var(--font-num); font-weight: 900; font-size: 34px; color: var(--ink); }
.week-day-date small { margin-top: 3px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.today-pill { padding: 1px 9px; border-radius: 0; background: var(--verm); color: #fff; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.week-day[data-sun] .week-day-name, .week-day[data-sun] .week-day-date b { color: var(--verm); }
.week-day[data-today] { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 0; background: var(--gold-soft); }
.week-day[data-today], .week-day[data-today] + .week-day { border-top-color: transparent; }
.week-day[data-empty] .empty-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.week-scope { margin-top: 10px; border-top: 1px dashed var(--line); }
.week-scope .scope-title { margin: 9px 0 2px; font-size: 14px; color: var(--verm); }
.week-scope.statewide .scope-title { color: var(--green); }
.week-scope .ev-row { padding-left: 4px; padding-right: 4px; }
.scope-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; }
.scope-legend span { display: inline-flex; align-items: center; gap: 6px; }
.month-legend { margin: 0; }
.view-title { margin: 4px 0 2px; font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--verm); }

@media (max-width: 480px) {
  .home-header { align-items: stretch; flex-direction: column; gap: 14px; }
  .home-district { min-width: 0; }
}

/* ---------- Settings / about ---------- */
.settings { padding: 4px 16px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-top: 1px dashed var(--line); cursor: pointer;
}
.setting-row:first-child { border-top: none; }
.setting-row small { display: block; font-size: 13px; color: var(--ink-soft); }
.setting-link { color: inherit; text-decoration: none; }
.setting-link:hover { background: var(--paper-deep); }
.switch { width: 46px; height: 26px; accent-color: var(--verm); flex: none; }
.about { padding: 14px 16px; font-size: 14px; color: var(--ink-soft); }
.about p { margin: 0 0 8px; }
.about p:last-child { margin-bottom: 0; }
.about code { background: var(--paper-deep); padding: 1px 5px; border-radius: 0; font-size: 13px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-top: 3px solid var(--verm);
}
.tabbar-inner, .app { position: relative; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: none; cursor: pointer; font: inherit;
  color: var(--ink-soft); font-size: 14px; font-weight: 600;
}
.tab-ico { display: block; width: 24px; height: 24px; line-height: 0; }
.tab-ico svg { width: 24px; height: 24px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--verm); font-weight: 800; }
.tab.is-active .tab-ico { transform: translateY(-1px); }
.tab:focus-visible, .icon-btn:focus-visible, .mday:focus-visible, .card-heading:focus-visible {
  outline: 2px solid var(--verm); outline-offset: 2px; border-radius: 0;
}
.today-btn:focus-visible, .district-select:focus-visible, .week-day-link:focus-visible {
  outline: 2px solid var(--verm); outline-offset: 2px;
}

/* ---------- Big type (accessibility) ---------- */
body.big { font-size: 20px; }
body.big .mday { font-size: 19px; }
body.big .panga-name { font-size: 24px; }
body.big .panga-card.featured .panga-name { font-size: 29px; }
body.big .pm-label { font-size: 13.5px; }
body.big .pm-value { font-size: 21px; }
body.big .tab { font-size: 16px; }

/* ---------- Desktop ---------- */
@media (min-width: 760px) {
  /* Header and bottom nav span the whole window. The content stays in a centred
     760px column, framed by a fine hairline. */
  .app { max-width: none; }
  .masthead { padding-left: max(20px, calc((100% - 760px) / 2 + 20px)); padding-right: max(20px, calc((100% - 760px) / 2 + 20px)); }
  .main { width: 100%; max-width: 760px; margin: 0 auto; padding-left: 20px; padding-right: 20px; border-left: 1px solid rgba(148, 42, 42, .28); border-right: 1px solid rgba(148, 42, 42, .28); }
  .panga-grid { gap: 12px; }
  .tabbar { left: 0; right: 0; width: auto; max-width: none; transform: none; border-left: 0; border-right: 0; padding-left: max(0px, calc((100% - 760px) / 2)); padding-right: max(0px, calc((100% - 760px) / 2)); }
}

/* ---------- Loading skeleton ---------- */
.skeleton { display: grid; gap: 10px; padding: 6px 0; }
.skeleton i { display: block; height: 16px; border-radius: 0; background: linear-gradient(90deg, #eee 25%, #f8f8f8 50%, #eee 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.3s linear infinite; }
.skeleton i:nth-child(2) { width: 82%; }
.skeleton i:nth-child(3) { width: 64%; }
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Dates and day names: always Noto Sans Kannada ---------- */
.masthead-date, .ds-day, .home-date, .home-date *, .upcoming-date, .month-title,
.stream-period-title, .week-row, .week-day-link, .week-day-link * {
  font-family: var(--font-num);
}
.masthead-date, .upcoming-date, .month-title, .stream-period-title { font-weight: 800; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Add to calendar */
.ev-cal { flex: none; align-self: flex-start; margin: -8px -10px -8px 0; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--ink-soft); cursor: pointer; }
.ev-cal:hover { color: var(--verm); }
.ev-cal:focus-visible { outline: 2px solid var(--verm); outline-offset: 0; }
.ev-cal .ico { width: 20px; height: 20px; }
.cal-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(17, 17, 17, .45); }
.cal-sheet[hidden] { display: none; }
.cal-panel { width: 100%; max-width: 480px; background: var(--paper); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.cal-title { margin: 0 0 4px; font-weight: 700; line-height: 1.4; }
.cal-opt { display: block; width: 100%; padding: 13px 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.cal-opt:hover { background: var(--paper-deep); }
.cal-opt:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }
.cal-google { background: var(--verm); border-color: var(--verm); color: #fff; }
.cal-google:hover { background: var(--verm-deep); }


/* ---------- Notices on the Home page (power, water, public work, railway) ---------- */
.notices-view { margin-top: 14px; }
.switch-count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 5px; background: var(--verm); color: #fff; font-family: var(--font-num); font-size: 12px; line-height: 20px; text-align: center; }

.notice-dummy { margin: 0 0 12px; padding: 8px 12px; border: 1px dashed var(--amber); background: #fff7d6; color: #5c4300; font-size: 13.5px; font-weight: 700; text-align: center; }
.notice-empty { margin-top: 18px; text-align: center; }
.notice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.notice-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.notice-chip .ico { width: 16px; height: 16px; color: var(--cat, var(--ink-soft)); }
.notice-chip.is-active { border-color: var(--verm); background: var(--verm); color: #fff; }
.notice-chip.is-active .ico { color: #fff; }
.notice-chip:focus-visible, .notice-more:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.upcoming-date + .notice-list { margin-top: 8px; }
.notice { --cat: var(--ink-soft); padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--cat); background: #fafafa; }
/* Category colours back up the icon and label; they are never the only cue. */
.cat-power { --cat: #8f5d00; }
.cat-water { --cat: #1f5f99; }
.cat-work { --cat: #4a4a4a; }
.cat-rail { --cat: var(--verm); }
.notice-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.notice-cat { display: inline-flex; align-items: center; gap: 6px; color: var(--cat); font-size: .95em; font-weight: 800; }
.notice-cat .ico { width: 18px; height: 18px; flex: none; }
.notice-type { padding: 1px 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.notice-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-family: var(--font-num); font-weight: 800; }
.notice-time { color: var(--ink-soft); font-weight: 700; }
.notice-text { margin-top: 8px; font-size: .95em; overflow-wrap: anywhere; }
.notice-text p { margin: 0 0 8px; }
.notice-text p:last-child { margin-bottom: 0; }
.notice-more { min-height: 36px; margin-top: 6px; padding: 4px 0; border: 0; background: none; color: var(--verm); font: inherit; font-size: 14px; font-weight: 800; text-decoration: underline; cursor: pointer; }

.rain-nak { margin: 0 0 4px; font-size: 16px; }
.rain-today { color: var(--verm); font-weight: 800; }
.mark-rain { color: #2d6a8f; }
.rain-prog { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.rain-bar { position: relative; flex: 1; height: 5px; background: rgba(17, 17, 17, .09); }
.rain-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #2d6a8f; }
.rain-days { flex: none; font-family: var(--font-num); font-size: 13px; font-weight: 800; color: var(--ink-soft); }

/* ---------- Mobile: give the content more width ----------
   Narrower page and card padding, and inner panels run edge to edge in their card (one box, not two). */
@media (max-width: 759px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .card-heading { padding-left: 12px; padding-right: 12px; }
  .card-body { padding: 0 12px 12px; }
  .card-body .ev-panel, .card-body .timeline-mobile { margin-left: -12px; margin-right: -12px; border-left: 0; border-right: 0; }
  .card-body .notice-list { margin-left: -12px; margin-right: -12px; }
  .card-body .notice { border-right: 0; }
}
.rain-all { margin-top: 12px; border: 1px solid var(--line); background: #fafafa; }
.rain-all summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; background: var(--gold-soft); color: var(--verm); font-weight: 800; cursor: pointer; }
.rain-all summary::-webkit-details-marker { display: none; }
.rain-all summary:focus-visible { outline: 2px solid var(--verm); outline-offset: -2px; }
.rain-chev { flex: none; width: 9px; height: 9px; margin-right: 3px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.rain-all[open] .rain-chev { transform: translateY(2px) rotate(-135deg); }
.rain-all .rain-close, .rain-all[open] .rain-open { display: none; }
.rain-all[open] .rain-close { display: inline; }
.rain-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rain-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 14px; border-left: 4px solid transparent; font-size: 15px; }
.rain-row + .rain-row { border-top: 1px dashed var(--line); }
.rain-row-when { flex: none; font-family: var(--font-num); font-size: 14px; color: var(--ink-soft); }
.rain-row.past { color: var(--ink-soft); }
.rain-row.now { border-left-color: var(--verm); background: var(--red-soft); font-weight: 800; color: var(--ink); }
.rain-row.now .rain-row-when { color: var(--verm); font-weight: 800; }
@media (max-width: 759px) {
  .card-body .rain-all { margin-left: -12px; margin-right: -12px; border-left: 0; border-right: 0; }
}
.rain-fc { margin-top: 10px; border: 1px solid var(--line); background: #fafafa; }
.rain-fc-list { list-style: none; margin: 0; padding: 0; }
.rain-fc-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 96px; align-items: center; gap: 10px; padding: 9px 14px; font-size: 14.5px; }
.rain-fc-row + .rain-fc-row { border-top: 1px dashed var(--line); }
.rain-fc-day { font-weight: 700; }
.rain-fc-mm { text-align: right; font-family: var(--font-num); font-weight: 700; }
.rain-fc-mm small { color: var(--ink-soft); font-weight: 600; }
.src-note a { color: var(--verm); font-weight: 700; }
@media (max-width: 759px) {
  .card-body .rain-fc { margin-left: -12px; margin-right: -12px; border-left: 0; border-right: 0; }
}
