*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #141517;
  --bg-widget: #1c1e22;
  --bg-skeleton: #2a2d33;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.08);
  --text-primary: #d0d4da;
  --text-body: #b8bcc2;
  --text-secondary: #a8adb5;
  --text-muted: #7c828c;
  --text-dim: #5e6470;
  --text-faint: #555a63;
  --text-subtlest: #4d525a;
  --accent-blue: #8badc8;
  --accent-green: #5d9e6b;
  --accent-red: #c75050;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  color: var(--text-body);
  padding: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1400px;
  width: 100%;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  padding-bottom: 3rem;
}

.hero {
  grid-column: 1 / -1;
  margin-bottom: 0.5rem;
  text-align: left;
}

.hero-date {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-week {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .hero-date {
    font-size: 1.5rem;
  }
  .hero-week {
    font-size: 0.75rem;
  }
}

/* Proverb widget */
.proverb-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
}

.proverb-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.proverb-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.proverb-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

header {
  display: none;
}

.proverb-body {
  position: relative;
  padding: 2rem 2rem;
  margin: 0 auto 1rem;
}

.quote-mark {
  font-size: 3.5rem;
  color: var(--text-subtlest);
  line-height: 1;
  position: absolute;
  top: 0.3rem;
  left: 1rem;
  opacity: 0.6;
}

.quote-mark.closing {
  top: auto;
  left: auto;
  bottom: 0.3rem;
  right: 1rem;
}

.proverb-text {
  font-size: 1.35rem;
  line-height: 1.8;
  font-style: italic;
  color: var(--text-body);
  padding: 0 1rem;
  transition: opacity 0.4s ease;
}

.proverb-text.fade {
  opacity: 0;
}

.btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Bus widget */
.bus-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 2;
  text-align: left;
}

.bus-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.bus-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.bus-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bus-departures {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bus-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.bus-route {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 2.5rem;
}

.bus-headsign {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bus-time {
  font-variant-numeric: tabular-nums;
  color: var(--accent-blue);
  white-space: nowrap;
}

.bus-rt {
  color: var(--accent-green);
  font-size: 0.6rem;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.bus-error {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-style: italic;
}

.bus-alerts {
  margin-bottom: 0.5rem;
}

.bus-alert {
  font-size: 0.8rem;
  color: #f5a623;
  padding: 0.25rem 0;
  line-height: 1.3;
}

.bus-alert-icon {
  margin-right: 0.25rem;
}

/* Train widget */
.train-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 2;
  text-align: left;
}

.train-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.train-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.train-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.train-departures {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.train-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.train-route {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 2.5rem;
}

.train-headsign {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.train-time {
  font-variant-numeric: tabular-nums;
  color: var(--accent-blue);
  white-space: nowrap;
}

.train-rt {
  color: var(--accent-green);
  font-size: 0.6rem;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.train-error {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-style: italic;
}

.train-alerts {
  margin-bottom: 0.5rem;
}

.train-alert {
  font-size: 0.8rem;
  color: #f5a623;
  padding: 0.25rem 0;
  line-height: 1.3;
}

.train-alert-icon {
  margin-right: 0.25rem;
}

/* Weather widget */
.weather-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 2;
  text-align: left;
}

.weather-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.weather-icon {
  font-size: 1.2rem;
  opacity: 0.7;
}

.weather-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weather-data {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.weather-temp {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.weather-condition {
  font-size: 1.6rem;
  color: var(--text-secondary);
  line-height: 1;
}

.weather-condition-icon {
  font-size: 2rem;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.weather-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: #8b919a;
}

.weather-detail-label {
  color: var(--text-dim);
  margin-right: 0.35rem;
}

.weather-detail-value {
  color: var(--text-secondary);
}

.weather-error {
  font-size: 0.9rem;
  color: var(--text-faint);
  font-style: italic;
}

.weather-rain {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--accent-blue);
  padding: 0.35rem 0.6rem;
  background: rgba(96, 165, 250, 0.08);
  border-radius: 6px;
  display: inline-block;
}

.weather-rain-none {
  color: var(--text-muted);
  background: transparent;
}

.weather-ext-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.weather-ext-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.weather-forecast {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
}

.weather-forecast-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.weather-forecast-time {
  color: var(--text-dim);
  font-weight: 600;
  min-width: 2.5rem;
}

.weather-forecast-icon {
  font-size: 1rem;
}

.weather-forecast-temp {
  font-weight: 600;
  color: var(--text-secondary);
}

.weather-forecast-desc {
  color: var(--text-dim);
}

/* News widget */
.news-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 4;
  min-height: 420px;
  text-align: left;
}

.news-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.news-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.news-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-stories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-story {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.news-story:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.news-story-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.news-story-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-story-title a:hover {
  color: var(--accent-blue);
}

.news-story-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

.news-latest-update {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  padding-left: 0.6rem;
  border-left: 2px solid var(--accent-blue);
  line-height: 1.4;
}

.news-latest-label {
  font-weight: 600;
  color: var(--accent-blue);
  position: relative;
  cursor: help;
}

.news-latest-label[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  background: var(--bg-card, #23262b);
  color: var(--text-main, #e8ecf0);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
  max-width: 320px;
  width: max-content;
  white-space: normal;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.news-story-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.news-story-sources {
  font-size: 0.75rem;
  color: var(--text-subtlest);
}

.news-story-time {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.news-topic-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  background: rgba(139, 173, 200, 0.15);
  color: var(--accent-blue);
}

.news-topic-conflict { background: rgba(220, 80, 80, 0.15); color: #e06060; }
.news-topic-politics { background: rgba(180, 130, 220, 0.15); color: #b88ade; }
.news-topic-diplomacy { background: rgba(100, 180, 220, 0.15); color: #6cb8e0; }
.news-topic-economy { background: rgba(100, 200, 130, 0.15); color: #6cc880; }
.news-topic-climate { background: rgba(80, 180, 120, 0.15); color: #50b878; }
.news-topic-disaster { background: rgba(240, 150, 60, 0.15); color: #e8a040; }
.news-topic-technology { background: rgba(100, 140, 240, 0.15); color: #7090e8; }
.news-topic-health { background: rgba(220, 100, 160, 0.15); color: #d870a0; }
.news-topic-science { background: rgba(160, 120, 240, 0.15); color: #a080e8; }

.news-blowing-up {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  background: rgba(255, 80, 40, 0.2);
  color: #ff6030;
  margin-right: 0.4em;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.news-error {
  font-size: 0.9rem;
  color: var(--text-faint);
  font-style: italic;
}

.news-independent-section {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.news-independent-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.7rem;
}

/* Oil widget */
.oil-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 3;
  text-align: left;
}

.oil-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.oil-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.oil-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.oil-period-selector {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
}

.oil-period-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.oil-period-btn:hover {
  border-color: #8badc8;
  color: var(--text-primary);
}

.oil-period-btn.active {
  background: rgba(139, 173, 200, 0.15);
  border-color: #8badc8;
  color: #8badc8;
}

.oil-data {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.oil-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.oil-change {
  font-size: 1rem;
  font-weight: 600;
}

.oil-change-up {
  color: var(--accent-green);
}

.oil-change-down {
  color: var(--accent-red);
}

.oil-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.oil-chart {
  width: 100%;
  height: 180px;
  margin-top: 0.75rem;
  display: block;
}

.oil-error {
  font-size: 0.9rem;
  color: var(--text-faint);
  font-style: italic;
}

/* Electricity widget */
.electricity-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 3;
  text-align: left;
}

.electricity-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.electricity-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.electricity-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.electricity-data {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.electricity-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.electricity-unit {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.electricity-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

.electricity-stat-label {
  color: var(--text-dim);
  margin-right: 0.3rem;
}

.electricity-stat-value {
  color: var(--text-secondary);
}

.electricity-stat-value.price-low {
  color: var(--accent-green);
}

.electricity-stat-value.price-high {
  color: var(--accent-red);
}

.electricity-chart {
  width: 100%;
  height: 180px;
  margin-top: 0.75rem;
  display: block;
}

.electricity-chart-wrap {
  position: relative;
}

.electricity-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-skeleton);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.electricity-tooltip.visible {
  opacity: 1;
}

.electricity-error {
  font-size: 0.9rem;
  color: var(--text-faint);
  font-style: italic;
}

.electricity-tomorrow-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.electricity-source {
  font-size: 0.68rem;
  color: var(--text-subtlest);
  margin-left: auto;
}

.electricity-source a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.electricity-source a:hover {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.2);
}

/* History widget */
.history-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 2;
  text-align: left;
}

.history-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.history-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.history-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-source {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--text-subtlest);
}

.history-events {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-event {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-year-badge {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-blue);
  line-height: 1;
}

.history-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.history-text a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.history-text a:hover {
  color: var(--accent-blue);
}

.history-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.history-article a {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.history-article a:hover {
  color: var(--accent-blue);
}

.history-error {
  font-size: 0.9rem;
  color: var(--text-faint);
  font-style: italic;
}

/* Festivals widget */
.festivals-widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  grid-column: span 3;
  text-align: left;
}

.festivals-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.festivals-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.festivals-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.festivals-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.festivals-empty {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-style: italic;
}

.festivals-month {
  margin-bottom: 0.5rem;
}

.festivals-month-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: capitalize;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.festivals-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.festivals-item:last-child {
  border-bottom: none;
}

.festivals-item-ongoing {
  background: rgba(139, 173, 200, 0.06);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
}

.festivals-item-local {
  border-left: 2px solid rgba(139, 173, 200, 0.35);
  padding-left: 0.5rem;
}

.festivals-item-date {
  font-size: 0.78rem;
  color: var(--text-dim);
  min-width: 5.5rem;
  white-space: nowrap;
}

.festivals-ongoing-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-green);
  margin-left: 0.3rem;
  text-transform: uppercase;
}

.festivals-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.festivals-item-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.festivals-item-name a,
.festivals-item-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.festivals-item-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.festivals-item-name a:hover {
  color: var(--accent-blue);
}

.festivals-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.festivals-location {
  color: var(--text-muted);
}

.festivals-price {
  color: var(--text-dim);
}

.festivals-genre-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.festivals-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  font-size: 0.6rem;
  font-style: normal;
  color: var(--text-faint);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.festivals-info:hover {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.25);
}

.festivals-info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: #1e2024;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: normal;
  width: max-content;
  max-width: 280px;
  max-height: 200px;
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.festivals-info:hover::after {
  opacity: 1;
  visibility: visible;
}

footer {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: #3a3e44;
}

@media (max-width: 480px) {
  .proverb-text {
    font-size: 1.1rem;
  }
}

@media (max-width: 1100px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }
  .bus-widget,
  .train-widget {
    grid-column: span 1;
  }
  .weather-widget,
  .news-widget,
  .oil-widget,
  .electricity-widget,
  .history-widget,
  .festivals-widget {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .container {
    grid-template-columns: 1fr;
  }
  .bus-widget,
  .train-widget,
  .weather-widget,
  .news-widget,
  .oil-widget,
  .electricity-widget,
  .history-widget,
  .festivals-widget {
    grid-column: span 1;
  }
}

/* Oil chart tooltip */
.oil-chart-wrap {
  position: relative;
}

.oil-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-skeleton);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.oil-tooltip.visible {
  opacity: 1;
}

/* Skeleton loaders */
@keyframes skeleton-pulse {
  0% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    opacity: 0.3;
  }
}

.skeleton {
  display: inline-block;
  background: var(--bg-skeleton);
  border-radius: 4px;
  height: 1em;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-sm {
  width: 3rem;
}

.skeleton-md {
  width: 6rem;
}

.skeleton-lg {
  width: 10rem;
}

.skeleton-xl {
  width: 4rem;
  height: 2rem;
  border-radius: 6px;
}

.skeleton-full {
  width: 100%;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.skeleton-story {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.skeleton-story:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

/* Settings gear dropdown */
.settings-menu {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
}

.reorder-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  font-size: 1.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.reorder-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.reorder-btn.active {
  background: rgba(139, 173, 200, 0.15);
  border-color: #8badc8;
  color: #8badc8;
}

.settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  font-size: 1.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.settings-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-widget);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-direction: column;
  gap: 0.5rem;
}

.settings-dropdown.open {
  display: flex;
}

.widget-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-faint);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.widget-toggle:hover {
  color: var(--text-muted);
}

/* Widget drag-and-drop reorder mode */
.container.reorder-mode [data-widget-key] {
  cursor: grab;
  outline: 2px dashed rgba(139, 173, 200, 0.25);
  outline-offset: -2px;
  transition: outline-color 0.2s ease, opacity 0.2s ease;
}

.container.reorder-mode [data-widget-key]:hover {
  outline-color: rgba(139, 173, 200, 0.5);
}

.container.reorder-mode [data-widget-key].dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.container.reorder-mode [data-widget-key].drag-over {
  outline-color: #8badc8;
  outline-style: solid;
}

/* Update toast */
.update-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-widget);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
  pointer-events: none;
}

.update-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.update-toast-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--accent-blue);
  color: var(--bg-primary);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.update-toast-btn:hover {
  opacity: 0.85;
}

.widget-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 14px;
  background: var(--bg-skeleton);
  border-radius: 7px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.widget-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: var(--text-faint);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.widget-toggle input[type="checkbox"]:checked {
  background: #2d3a47;
}

.widget-toggle input[type="checkbox"]:checked::after {
  left: 16px;
  background: var(--accent-blue);
}