/* ==========================================================================
   Makalu · नेपाली पात्रो — Nepali Calendar
   Design language: Nepal's flag — crimson #C8102E, deep blue #003893,
   white, the double-pennant silhouette, sun & moon — kept subtle.
   ========================================================================== */

:root {
  --crimson: #C8102E;
  --crimson-deep: #A00D26;
  --crimson-ink: #7C0A1F;
  --crimson-soft: #FBEDEF;
  --crimson-ghost: rgba(200, 16, 46, 0.08);

  --blue: #003893;
  --blue-deep: #061D45;
  --blue-soft: #EBF0FA;
  --blue-ghost: rgba(0, 56, 147, 0.07);
  --line-blue: #D9E1F2;

  --ink: #232733;
  --muted: #6E7480;
  --faint: #9BA1AC;

  --paper: #FAF7F3;
  --card: #FFFFFF;
  --line: #E9E2D9;
  --warm-hover: #F5F0E9;

  --shadow-sm: 0 1px 2px rgba(35, 39, 51, 0.05), 0 4px 14px rgba(35, 39, 51, 0.06);
  --shadow-md: 0 2px 6px rgba(35, 39, 51, 0.06), 0 16px 40px rgba(35, 39, 51, 0.10);

  --radius: 18px;
  --radius-sm: 10px;

  --font-body: "Manrope", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
  --font-deva: "Noto Sans Devanagari", "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Nepali mode: Devanagari-leading font stack */
html[lang="ne"] body { font-family: var(--font-deva); }
html[lang="ne"] .tb-bs,
html[lang="ne"] .view-title { font-family: var(--font-deva); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 0; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Buttons & controls
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 10px 20px; transition: all .18s ease;
}
.btn-sm { padding: 7px 16px; font-size: 0.88rem; }
.btn-primary { background: var(--crimson); color: #fff; box-shadow: 0 6px 16px rgba(200, 16, 46, 0.25); }
.btn-primary:hover { background: var(--crimson-deep); transform: translateY(-1px); }
.btn-ghost {
  background: var(--card); color: var(--blue);
  border-color: var(--line-blue);
}
.btn-ghost:hover { background: var(--blue-soft); }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; transition: all .18s ease;
}
.btn-icon svg { width: 17px; height: 17px; }
.btn-icon:hover { background: var(--crimson-soft); color: var(--crimson); border-color: #F2C7CE; }
.btn-icon:active { transform: scale(0.94); }

select, input[type="date"] {
  font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
select:hover, input[type="date"]:hover { border-color: var(--line-blue); }
select:focus, input[type="date"]:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-ghost);
}

button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.logo-mark { width: 40px; height: 40px; flex: none; }
.brand-name {
  display: flex; flex-direction: column; line-height: 1.12;
  font-family: var(--font-deva); font-weight: 800; font-size: 1.18rem; color: var(--ink);
}
.brand-name small {
  font-family: var(--font-body); font-weight: 700; font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--crimson);
}

.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem;
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: all .18s ease;
}
.main-nav a:hover { color: var(--ink); border-bottom-color: var(--crimson); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex; background: #F1ECE4; border-radius: 999px; padding: 3px;
}
.lang-toggle button {
  border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 0.82rem;
  color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer;
  transition: all .18s ease;
}
.lang-toggle button.active { background: var(--blue); color: #fff; box-shadow: 0 3px 8px rgba(0, 56, 147, 0.3); }

/* --------------------------------------------------------------------------
   Today band
   -------------------------------------------------------------------------- */

.today-band {
  position: relative;
  background:
    radial-gradient(640px 320px at 92% -30%, var(--crimson-ghost), transparent 62%),
    radial-gradient(480px 260px at -6% 130%, var(--blue-ghost), transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.today-band .container {
  position: relative;
  padding-top: 22px;
  padding-bottom: 22px;
}

.tb-kicker {
  display: flex; align-items: center; gap: 10px;
  color: var(--crimson); font-weight: 800; font-size: 0.78rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  margin: 0 0 8px;
}
html[lang="ne"] .tb-kicker { font-size: 0.92rem; letter-spacing: 0.05em; }

.pennant-chip {
  width: 11px; height: 11px; flex: none; background: var(--crimson);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.tb-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 14px 22px;
}

.tb-bs {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.015em; color: var(--ink);
}

.tb-sep { width: 1px; height: 46px; flex: none; background: var(--line-blue); }

.tb-mid { display: flex; flex-direction: column; gap: 3px; }
.tb-week { color: var(--blue); font-weight: 800; font-size: 1.02rem; line-height: 1.3; }
.tb-ad { color: var(--muted); font-weight: 600; font-size: 0.95rem; line-height: 1.3; }

.tb-mark {
  position: absolute; top: 50%; right: 36px;
  transform: translateY(-50%);
  height: 128px; width: auto;
  pointer-events: none;
}

/* --- clock (inside today band) --- */

.tc-time {
  display: flex; align-items: center; gap: 9px;
  color: var(--blue);
  font-weight: 800; font-size: 1.04rem;
  font-variant-numeric: tabular-nums;
}
.tc-time-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--crimson);
  animation: pulse 2s ease-in-out infinite;
}
.tc-time-label { color: var(--faint); font-weight: 600; font-size: 0.78rem; }

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200,16,46,.35); } 50% { box-shadow: 0 0 0 7px rgba(200,16,46,0); } }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 68px 0; }

/* Calendar section sits directly under the today band — keep the whole
   month above the fold on common laptop screens. */
#calendar { padding-top: 24px; }
#home, #calendar, #converter, #about { scroll-margin-top: 84px; }
.section-alt {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 30px; flex-wrap: wrap;
}
.section-head h2 {
  display: flex; align-items: center; gap: 12px;
  margin: 0; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.01em;
}
.section-head h2::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: var(--crimson); clip-path: polygon(0 0, 100% 0, 0 100%);
}
.section-sub { margin: 6px 0 0 0 0; color: var(--muted); font-weight: 600; font-size: 0.98rem; }

.segmented {
  display: inline-flex; background: #F1ECE4; border-radius: 999px; padding: 4px;
}
.segmented button {
  border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 0.9rem;
  color: var(--muted); padding: 8px 20px; border-radius: 999px; cursor: pointer;
  transition: all .18s ease;
}
.segmented button.active {
  background: var(--card); color: var(--crimson); box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Month view
   -------------------------------------------------------------------------- */

.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.nav-btns { display: flex; align-items: center; gap: 14px; }
.view-title { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; min-width: 200px; text-align: center; }
.view-title.clickable { cursor: pointer; transition: color .15s ease; }
.view-title.clickable:hover { color: var(--crimson); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.view-title.clickable:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
.cal-selects { display: flex; align-items: center; gap: 10px; }
.cal-selects select { font-weight: 700; }

.cal-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px; align-items: start;
}

.cal-card {
  background: var(--card);
  border: 1px solid var(--line-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 18px;
}

.weekday-row {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  padding: 6px 0 12px; border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.weekday-row span {
  text-align: center; font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase;
}
.weekday-row span.sat { color: var(--crimson); }
html[lang="ne"] .weekday-row span { font-size: 0.88rem; letter-spacing: 0.02em; }

.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.day {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 74px; padding: 8px 9px;
  background: transparent; border: 1px solid #EEE7DD; border-radius: 12px;
  font: inherit; cursor: pointer; text-align: left;
  transition: background .16s ease;
}
.day:hover { background: var(--warm-hover); }
.day.empty { pointer-events: none; border-color: transparent; }
.day.today { border-color: transparent; }

.day .bs {
  font-weight: 700; font-size: 1.04rem; line-height: 1.2; color: var(--ink);
  display: flex; align-items: baseline; gap: 5px;
}
.day .ad {
  margin-top: auto; font-size: 0.72rem; font-weight: 700; color: var(--faint);
  letter-spacing: 0.02em;
}
.day .ad .adm { color: var(--blue); }

.day .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--crimson);
  flex: none; transform: translateY(-2px);
}
.day .dot.dot-day { background: var(--blue); }
.day.sat .bs { color: var(--crimson); }
.day.out { opacity: 0.38; }

.day.today {
  background: linear-gradient(155deg, #D31234, #AE0E28);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.35);
}
.day.today .bs, .day.today .ad { color: #fff; }
.day.today .ad { opacity: 0.85; }
.day.today .dot { background: #fff; }
.day.today:hover { background: linear-gradient(155deg, #C8102E, #A00D26); }

.day.selected:not(.today) { box-shadow: inset 0 0 0 2px var(--blue); background: var(--blue-soft); }
.day.selected:not(.today):hover { background: #E1EAF9; }

/* --- detail panel --- */

.detail-panel {
  position: sticky; top: 90px;
  background: var(--card);
  border: 1px solid var(--line-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 24px 20px;
  min-height: 320px;
}

.dp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dp-kicker {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue);
}
html[lang="ne"] .dp-kicker { font-size: 0.8rem; letter-spacing: 0.06em; }
.dp-nav { display: flex; gap: 6px; }
.dp-nav .btn-icon { width: 30px; height: 30px; }
.dp-nav .btn-icon svg { width: 14px; height: 14px; }

.dp-bs { margin: 2px 0 4px; font-size: 1.72rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.dp-sub { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.dp-rule { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.dp-rows { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.dp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dp-row dt { color: var(--muted); font-weight: 700; font-size: 0.85rem; flex: none; }
.dp-row dd { margin: 0; font-weight: 700; font-size: 0.95rem; text-align: right; }

.dp-holidays { display: flex; flex-direction: column; gap: 8px; }
.dp-holiday-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--crimson-soft); color: var(--crimson-ink);
  font-weight: 700; font-size: 0.86rem;
  border-radius: 999px; padding: 6px 13px;
}
.dp-holiday-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--crimson); }

.dp-month-holidays { display: flex; flex-direction: column; gap: 4px; }
.dp-mh-row {
  display: flex; justify-content: space-between; gap: 10px;
  border: 0; background: transparent; font: inherit; cursor: pointer;
  padding: 7px 10px; border-radius: 8px; text-align: left; transition: background .15s ease;
}
.dp-mh-row:hover { background: var(--warm-hover); }
.dp-mh-row .d { font-weight: 800; color: var(--crimson); flex: none; }
.dp-mh-row .n { font-weight: 600; text-align: right; }

.dp-none { color: var(--faint); font-weight: 600; }

/* --------------------------------------------------------------------------
   Year view
   -------------------------------------------------------------------------- */

.year-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
}

.mini-card {
  background: var(--card); border: 1px solid var(--line-blue);
  border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 14px 14px 12px; cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.mini-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.mini-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px; padding: 0 2px;
}
.mini-head .name { font-weight: 800; font-size: 1rem; }
.mini-head .len { font-size: 0.72rem; font-weight: 700; color: var(--faint); }

.mini-week {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px;
}
.mini-week span {
  text-align: center; font-size: 0.6rem; font-weight: 800; color: var(--faint);
  letter-spacing: 0.03em;
}
.mini-week span.sat { color: var(--crimson); }

.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600; color: var(--ink);
  border-radius: 7px; border: 0; background: transparent; font-family: inherit;
  cursor: pointer; padding: 0; transition: background .14s ease;
}
.mini-day:hover { background: var(--warm-hover); }
.mini-day.sat { color: var(--crimson); font-weight: 700; }
.mini-day.holiday { background: var(--crimson-soft); color: var(--crimson-ink); font-weight: 700; }
.mini-day.today {
  background: var(--crimson); color: #fff; font-weight: 800;
  box-shadow: 0 4px 10px rgba(200, 16, 46, 0.35);
}
.mini-day.today:hover { background: var(--crimson-deep); }

/* --------------------------------------------------------------------------
   Festivals & special days (from js/festivals.js)
   crimson dot / fill = चाडपर्व (festival)
   blue dot / fill    = विशेष दिन (special/observance day)
   major              = filled cell
   -------------------------------------------------------------------------- */

.day.fest { background: var(--crimson-soft); }
.day.fest:hover { background: #F6D9DE; }
.day.fest .bs { color: var(--crimson-ink); }
.day.fest .ad { color: #C4707E; }
.day.today.fest { background: linear-gradient(155deg, #D31234, #AE0E28); }
.day.today.fest .bs, .day.today.fest .ad { color: #fff; }
.day.selected.fest:not(.today) { box-shadow: inset 0 0 0 2px var(--blue); }

.day.spec { background: var(--blue-soft); }
.day.spec:hover { background: #DEE8F8; }
.day.spec .bs { color: var(--blue); }
.day.spec .ad { color: #7A93C4; }
.day.today.spec { background: linear-gradient(155deg, #12449C, #0A2C66); }
.day.today.spec .bs, .day.today.spec .ad { color: #fff; }
.day.selected.spec:not(.today) { box-shadow: inset 0 0 0 2px var(--crimson); }

/* already-gone days: marks stay visible but recede */
.day.past .dot { background: #C7CBD4; }
.day.fest.past { background: #F5F0F1; }
.day.fest.past:hover { background: #EFE8EA; }
.day.fest.past .bs { color: #A98E95; }
.day.fest.past .ad { color: #C9BCBF; }
.day.spec.past { background: #EFF1F6; }
.day.spec.past:hover { background: #E8EBF3; }
.day.spec.past .bs { color: #9AA1B4; }

.mini-day.fest { background: var(--crimson-soft); color: var(--crimson-ink); font-weight: 800; }
.mini-day.fest.past { background: #F1ECEE; color: #A98E95; font-weight: 700; }
.mini-day.spec { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.mini-day.specmajor { background: var(--blue); color: #fff; font-weight: 800; }
.mini-day.holiday.past, .mini-day.spec.past, .mini-day.specmajor.past { background: #F1EFF2; color: #A2A7B2; }
/* today always wins over festival/special fills */
.mini-day.today.holiday, .mini-day.today.fest, .mini-day.today.spec, .mini-day.today.specmajor {
  background: var(--crimson); color: #fff; font-weight: 800;
}

.dp-holiday-pill.major { background: var(--crimson); color: #fff; }
.dp-holiday-pill.major::before { background: #fff; }
.dp-holiday-pill.spec { background: var(--blue-soft); color: var(--blue); }
.dp-holiday-pill.spec::before { background: var(--blue); }
.dp-holiday-pill.spec.major { background: var(--blue); color: #fff; }
.dp-holiday-pill.spec.major::before { background: #fff; }
.dp-holiday-pill.past { background: #EFEFF2; color: #8F93A0; }
.dp-holiday-pill.past::before { background: #C7CBD4; }
.dp-holiday-pill.major.past { background: #E5D3D7; color: #79626B; }
.dp-holiday-pill.major.past::before { background: #B99AA2; }
.dp-holiday-pill.spec.major.past { background: #D7DEEC; color: #5D6B85; }
.dp-holiday-pill.spec.major.past::before { background: #9AA8C4; }
.dp-mh-row.major .n { color: var(--crimson-ink); font-weight: 800; }
.dp-mh-row.spec .d { color: var(--blue); }
.dp-mh-row.spec.major .n { color: var(--blue); font-weight: 800; }
.dp-mh-row.past { opacity: 0.55; }
.dp-mh-row.past:hover { opacity: 0.85; }

.dp-desc { margin: 10px 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.65; }

/* --------------------------------------------------------------------------
   Converter
   -------------------------------------------------------------------------- */

.converter-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.conv-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px; font-size: 1.12rem; font-weight: 800;
}
.conv-inputs { display: flex; gap: 12px; flex-wrap: wrap; }
.conv-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 90px; }
.conv-field-wide { flex: 1; }
.conv-field > span {
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
html[lang="ne"] .conv-field > span { font-size: 0.84rem; letter-spacing: 0.03em; }
.conv-field select, .conv-field input { width: 100%; }

.conv-result {
  margin-top: 20px; padding-top: 18px; border-top: 1px dashed #D8CFC2;
  display: flex; flex-direction: column; gap: 4px; min-height: 92px;
}
.cr-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--crimson); }
html[lang="ne"] .cr-label { font-size: 0.82rem; letter-spacing: 0.06em; }
.cr-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.cr-sub { color: var(--muted); font-weight: 600; font-size: 0.92rem; }

.footnote {
  margin: 26px 0 0; color: var(--faint); font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.footnote::before {
  content: ""; width: 8px; height: 8px; flex: none;
  background: var(--faint); clip-path: polygon(0 0, 100% 0, 0 100%); opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--blue-deep); color: #DCE4F5; padding: 56px 0 0; }

.footer-grid {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px;
}

.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name small { color: #FF8FA3; }
.footer-brand p { margin: 16px 0 0; font-size: 0.92rem; color: #A9B7DB; max-width: 34ch; }

.site-footer h4 {
  margin: 4px 0 12px; font-size: 0.95rem; font-weight: 800; color: #fff;
  letter-spacing: 0.02em;
}
.site-footer p { margin: 0; font-size: 0.9rem; color: #A9B7DB; line-height: 1.65; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
  font-size: 0.84rem; color: #8EA0CC; font-weight: 600;
}
.footer-flag {
  width: 22px; height: 16px;
  background: var(--crimson);
  clip-path: polygon(0 0, 100% 18%, 40% 42%, 100% 68%, 0 100%);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .cal-layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; min-height: 0; }
}

@media (max-width: 900px) {
  .tb-mark { display: none; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .converter-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .year-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  #calendar { padding-top: 16px; }
  .tb-sep { display: none; }
  .tb-row { gap: 8px 16px; }
  .tb-bs { font-size: 1.8rem; }
  .day { min-height: 58px; padding: 6px 7px; }
  .day .bs { font-size: 0.92rem; }
  .day .ad { font-size: 0.66rem; }
  .view-title { min-width: 0; font-size: 1.2rem; }
  .cal-selects { flex-wrap: wrap; }
  .header-inner { gap: 14px; }
  .brand-name { font-size: 1.04rem; }
  .lang-toggle button { padding: 6px 10px; font-size: 0.76rem; }
  .year-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column-reverse; gap: 10px; }
}

@media (max-width: 460px) {
  .year-grid { grid-template-columns: 1fr; }
  .day .ad { display: none; }
  .day .ad.has-month { display: block; }
}

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