.astro-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.astro-card {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

.astro-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.astro-card h2 {
  margin: 0 0 4px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.astro-card p {
  margin: 0;
  color: #64748b;
}

.astro-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.astro-main-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.astro-main-values-single {
  grid-template-columns: 1fr;
}

.astro-main-values > div {
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  padding: 14px;
}

.astro-label {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.86rem;
}

.astro-main-values strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.1;
}

.astro-main-values small {
  display: block;
  margin-top: 5px;
  color: #475569;
}

.astro-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.astro-detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(100, 116, 139, 0.3);
  padding-bottom: 8px;
}

.astro-detail-list dt {
  color: #64748b;
}

.astro-detail-list dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.astro-inline-error {
  grid-column: 1 / -1;
  color: #b91c1c;
  font-size: 0.92rem;
}

.astro-widget-loading {
  opacity: 0.75;
}

@media (max-width: 760px) {
  .astro-extra-grid {
    grid-template-columns: 1fr;
  }

  .astro-main-values {
    grid-template-columns: 1fr;
  }
}

/* ===== Presnycas: výběr města, minutka, změna času ===== */
.sun-block select[data-astro-city-select],
.timer-dst-block input,
.timer-dst-block select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 10px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
}

.dark-mode .sun-block select[data-astro-city-select],
.dark-mode .timer-dst-block input,
.dark-mode .timer-dst-block select {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.45);
  color: #e5e7eb;
}

.astro-city-current {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.78rem;
}

.timer-dst-block .timer-tabs,
.timer-dst-block .quick-timer-buttons,
.timer-dst-block .timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.timer-dst-block .mini-tab {
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 0.86rem;
}

.timer-dst-block .mini-tab.on {
  background: rgba(37, 99, 235, 0.13);
  border-color: rgba(37, 99, 235, 0.40);
  font-weight: 700;
}

.timer-custom-row {
  display: block;
  margin-top: 8px;
}

.timer-custom-row .inline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.timer-custom-row input {
  max-width: 110px;
}

.timer-display {
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  font-variant-numeric: tabular-nums;
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 10px 0 6px;
  padding: 12px 10px;
  text-align: center;
}

.dark-mode .timer-display {
  background: rgba(255, 255, 255, 0.08);
}

.timer-end-row {
  margin: 4px 0 10px;
  text-align: center;
}

.timer-premium-box {
  border: 1px dashed rgba(37, 99, 235, 0.42);
  border-radius: 14px;
  margin-top: 12px;
  padding: 10px;
  background: rgba(37, 99, 235, 0.06);
}

.premium-title {
  margin: 0 0 4px;
  font-weight: 800;
}

.timer-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.timer-list-item,
.timer-list-remove {
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  text-align: left;
}

.dark-mode .timer-list-item,
.dark-mode .timer-list-remove {
  background: rgba(15, 23, 42, 0.65);
}

.timer-list-item.active {
  border-color: rgba(37, 99, 235, 0.58);
  font-weight: 700;
}

.timer-list-remove {
  color: #b91c1c;
  justify-content: center;
}

.dst-table td {
  font-weight: 600;
}

.timer-fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #020617;
  color: #e5e7eb;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.timer-fs-overlay[hidden] {
  display: none;
}

.timer-fs-title {
  align-self: end;
  font-size: clamp(1.3rem, 3vw, 2.4rem);
  font-weight: 700;
  margin: 0;
}

.timer-fs-display {
  font-variant-numeric: tabular-nums;
  font-size: clamp(4rem, 17vw, 15rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}

.timer-fs-end {
  align-self: start;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.6rem);
  margin: 0;
}

@media (max-width: 520px) {
  .timer-display {
    font-size: 1.65rem;
  }

  .timer-dst-block .timer-actions .btn-bar {
    flex: 1 1 auto;
  }
}

/* ===== Presnycas: stabilní rozložení 4 bloky na řádek ===== */
.small-blocks.top-info-blocks,
.small-blocks.extra-info-blocks {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px;
  align-items: stretch;
}

.small-blocks.top-info-blocks > .small-block,
.small-blocks.extra-info-blocks > .small-block {
  min-width: 0;
}

.small-blocks.extra-info-blocks > [data-astro-field="astro-error"] {
  grid-column: 1 / -1;
}

.dst-block .dst-table td {
  font-weight: 700;
}

.timer-only-block .timer-display {
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .small-blocks.top-info-blocks,
  .small-blocks.extra-info-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  .small-blocks.top-info-blocks,
  .small-blocks.extra-info-blocks {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Konverzní a mobilní UX úpravy ===== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 20000;
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}
.skip-link:focus { left: 8px; }

.status-bar {
  position: relative;
  z-index: 1000;
}
.status-bar .right {
  gap: 8px;
}
.premium-cta {
  font-weight: 800;
  border-color: rgba(245, 158, 11, 0.55) !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.design-section {
  margin-top: 12px;
}
.design-section-title {
  margin: 0 0 6px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}
.design-pills.in-main {
  margin: 0 auto;
  justify-content: center;
}
.design-pill.prem {
  position: relative;
}
.design-pill.prem::after {
  content: "premium";
  margin-left: 6px;
  font-size: 0.68em;
  opacity: 0.72;
}

.premium-lead {
  font-size: 1.04rem;
  line-height: 1.45;
}
.premium-benefits {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding-left: 1.2rem;
}
.premium-benefits li::marker {
  content: "✓ ";
  color: #16a34a;
  font-weight: 900;
}
.af-modal:focus { outline: none; }

.seo-info-block details {
  border-bottom: 1px solid rgba(100,116,139,.25);
  padding: 10px 0;
}
.seo-info-block summary {
  cursor: pointer;
  font-weight: 800;
}
.seo-info-block p {
  margin: 8px 0 0;
}

.site-mobile-nav {
  display: none;
}

.dst-actions .btn-bar,
.timer-actions .btn-bar,
.site-mobile-nav button,
.site-mobile-nav a {
  min-height: 44px;
}

@media (max-width: 760px) {
  body {
    padding-bottom: 76px;
  }
  .status-bar {
    gap: 8px;
    padding: 8px 10px;
  }
  .status-bar .left {
    display: none !important;
  }
  .status-bar .right {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .status-bar .right .btn-bar,
  .status-bar .right .speech-box > .btn-bar {
    width: 100%;
    min-height: 42px;
    font-size: 0.86rem;
    padding-left: 6px;
    padding-right: 6px;
  }
  .status-bar .right .speech-box {
    display: contents;
  }
  #speech-toggle,
  #nye-open,
  #dark-toggle {
    display: none !important;
  }
  .speech-panel {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: 74px !important;
    width: auto !important;
    max-height: 75vh;
    overflow: auto;
    z-index: 12000;
  }
  .hlavicka {
    padding-left: 12px;
    padding-right: 12px;
  }
  .hlavicka h1 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
    line-height: 1.08;
  }
  .hlavicka h2 {
    font-size: 1rem;
  }
  .main-block {
    margin-top: 10px;
  }
  .share-row {
    justify-content: center;
  }
  .share-label {
    flex-basis: 100%;
    text-align: center;
  }
  .design-pills.in-main {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }
  .design-pill {
    min-height: 42px;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .cal-table,
  .cal-table tbody,
  .cal-table tr,
  .cal-table th,
  .cal-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .cal-table tr {
    border-bottom: 1px solid rgba(100,116,139,.18);
    padding: 7px 0;
  }
  .cal-table th {
    opacity: .72;
    padding-bottom: 2px;
  }
  .cal-table td {
    font-size: 1.05rem;
    font-weight: 700;
  }
  .timer-display {
    font-size: clamp(2rem, 13vw, 3.4rem);
  }
  .site-footer {
    margin-bottom: 70px;
  }
  .site-mobile-nav {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 15000;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    border: 1px solid rgba(100,116,139,.28);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 14px 40px rgba(15,23,42,.22);
    padding: 7px;
    backdrop-filter: blur(12px);
  }
  .dark-mode .site-mobile-nav {
    background: rgba(15,23,42,.94);
  }
  .site-mobile-nav a,
  .site-mobile-nav button {
    border: 0;
    border-radius: 14px;
    background: rgba(15,23,42,.05);
    color: inherit;
    display: grid;
    place-items: center;
    gap: 1px;
    font: inherit;
    font-size: 1rem;
    padding: 5px 2px;
    text-decoration: none;
  }
  .site-mobile-nav span {
    font-size: .72rem;
    font-weight: 700;
  }
}

/* ===== Mobilní doplnění: horní přepínač režimu, fúzované menu, premium nastavení ===== */
.mobile-dark-toggle {
  display: none !important;
  aspect-ratio: 1 / 1;
  min-width: 42px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 1.08rem !important;
}

.premium-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.premium-settings-grid .btn-bar {
  text-align: center;
  justify-content: center;
}
.premium-watermark-row {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .status-bar .right {
    grid-template-columns: 44px repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch;
  }
  .mobile-dark-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .site-mobile-nav button.is-primary-mobile {
    background: rgba(56, 189, 248, .18);
    font-weight: 800;
  }
  .dark-mode .site-mobile-nav button.is-primary-mobile {
    background: rgba(56, 189, 248, .22);
  }
  .premium-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Mobilní menu: hlas a obecné nastavení ===== */
.voice-settings-modal .speech-panel {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  z-index: auto !important;
  display: grid;
  gap: 10px;
  box-shadow: none;
  margin-top: 10px;
}

.voice-settings-modal .speech-panel[hidden] {
  display: none !important;
}

.settings-section {
  border-top: 1px solid rgba(100,116,139,.24);
  margin-top: 14px;
  padding-top: 14px;
}
.settings-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.settings-section h4 {
  margin: 0 0 8px;
}
.settings-shortcuts {
  display: grid;
  gap: 8px;
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.theme-choice {
  border: 1px solid rgba(100,116,139,.28);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  text-align: left;
}
.dark-mode .theme-choice {
  background: rgba(15,23,42,.72);
}
.theme-choice.is-active {
  border-color: rgba(56,189,248,.85);
  box-shadow: 0 0 0 3px rgba(56,189,248,.16);
  font-weight: 800;
}
.theme-swatch {
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.12);
  display: inline-block;
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}
.theme-default { background: linear-gradient(135deg,#f8fafc 0 50%,#0f172a 50% 100%); }
.theme-dark-blue { background: linear-gradient(135deg,#020617,#0f2a44); }
.theme-dark-red { background: linear-gradient(135deg,#14070a,#3f111d); }
.theme-dark-green { background: linear-gradient(135deg,#04120c,#123d2b); }
.theme-light-cream { background: linear-gradient(135deg,#fff7ed,#fde68a); }
.theme-light-blue { background: linear-gradient(135deg,#eff6ff,#bfdbfe); }

body.theme-dark-blue {
  background: radial-gradient(circle at 50% 0%, #123b63 0, #071827 42%, #020617 100%) !important;
  color: #e5edf8;
}
body.theme-dark-red {
  background: radial-gradient(circle at 50% 0%, #5a1424 0, #210910 45%, #0b0306 100%) !important;
  color: #f8e7eb;
}
body.theme-dark-green {
  background: radial-gradient(circle at 50% 0%, #14513a 0, #092418 45%, #03100b 100%) !important;
  color: #e8f7ee;
}
body.theme-light-cream {
  background: linear-gradient(180deg, #fff7ed 0, #fffbeb 50%, #f8fafc 100%) !important;
  color: #1f2937;
}
body.theme-light-blue {
  background: linear-gradient(180deg, #eff6ff 0, #dbeafe 48%, #f8fafc 100%) !important;
  color: #172033;
}

body.theme-dark-blue .main-block,
body.theme-dark-blue .small-block,
body.theme-dark-blue .info-block,
body.theme-dark-red .main-block,
body.theme-dark-red .small-block,
body.theme-dark-red .info-block,
body.theme-dark-green .main-block,
body.theme-dark-green .small-block,
body.theme-dark-green .info-block {
  background: rgba(15,23,42,.78) !important;
  border-color: rgba(148,163,184,.24) !important;
  color: inherit;
}

body.theme-light-cream .main-block,
body.theme-light-cream .small-block,
body.theme-light-cream .info-block,
body.theme-light-blue .main-block,
body.theme-light-blue .small-block,
body.theme-light-blue .info-block {
  background: rgba(255,255,255,.84) !important;
  color: inherit;
}

body.theme-dark-blue .site-mobile-nav,
body.theme-dark-red .site-mobile-nav,
body.theme-dark-green .site-mobile-nav {
  background: rgba(5,10,18,.94) !important;
  color: #f8fafc;
}
body.theme-light-cream .site-mobile-nav,
body.theme-light-blue .site-mobile-nav {
  background: rgba(255,255,255,.95) !important;
  color: #172033;
}

@media (max-width: 760px) {
  .theme-choice-grid {
    grid-template-columns: 1fr;
  }
  .app-settings-modal,
  .voice-settings-modal,
  .premium-settings-modal {
    width: min(94vw, 560px);
    max-height: 86vh;
    overflow: auto;
  }
}

/* ===== Oprava dialogů: menu nesmí překrývat zavírání, spodní zavírání a toggly ===== */
.af-overlay,
.voice-settings-overlay,
.app-settings-overlay,
.premium-settings-overlay {
  z-index: 40000 !important;
  position: fixed !important;
  inset: 0 !important;
  overflow-y: auto !important;
  padding: max(18px, env(safe-area-inset-top)) 12px max(96px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box;
}

.af-overlay[hidden],
.voice-settings-overlay[hidden],
.app-settings-overlay[hidden],
.premium-settings-overlay[hidden] {
  display: none !important;
}

.af-modal,
.voice-settings-modal,
.app-settings-modal,
.premium-settings-modal {
  position: relative !important;
  z-index: 40001 !important;
  margin: 0 auto !important;
  max-height: calc(100dvh - 128px) !important;
  overflow-y: auto !important;
  padding-top: 18px !important;
  scroll-padding-top: 52px;
}

.af-modal > .nye-close,
.voice-settings-modal > .nye-close,
.app-settings-modal > .nye-close,
.premium-settings-modal > .nye-close {
  position: sticky !important;
  top: 0 !important;
  float: right;
  z-index: 3 !important;
  margin: 0 0 8px 10px !important;
}

.af-modal > h3,
.voice-settings-modal > h3,
.app-settings-modal > h3,
.premium-settings-modal > h3 {
  padding-right: 52px;
}

.dialog-bottom-close {
  margin-top: 16px !important;
  justify-content: center;
  border-color: rgba(239, 68, 68, .35) !important;
}

.desktop-settings-toggle {
  white-space: nowrap;
}

.site-mobile-nav button.is-open {
  background: rgba(245, 158, 11, .18) !important;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .32);
  font-weight: 800;
}
.dark-mode .site-mobile-nav button.is-open {
  background: rgba(245, 158, 11, .22) !important;
}

@media (max-width: 760px) {
  .desktop-settings-toggle {
    display: none !important;
  }
  .af-overlay,
  .voice-settings-overlay,
  .app-settings-overlay,
  .premium-settings-overlay {
    padding-top: max(72px, env(safe-area-inset-top)) !important;
  }
  .af-modal,
  .voice-settings-modal,
  .app-settings-modal,
  .premium-settings-modal {
    width: min(94vw, 560px) !important;
    max-height: calc(100dvh - 156px) !important;
  }
  .voice-settings-modal .speech-panel {
    display: grid !important;
    visibility: visible !important;
  }
}

@media (max-width: 760px) {
  .site-mobile-nav {
    z-index: 50000 !important;
  }
}
