:root {
  --bg: #08131f;
  --panel: #122537;
  --panel-alt: #19324d;
  --text: #edf6ff;
  --muted: #b5c6d8;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(125, 211, 252, 0.4);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --success: #4ade80;
  --warning: #fbbf24;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: radial-gradient(circle at top, #10263d, var(--bg) 45%);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.topbar h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.5px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.panel {
  background: rgba(18, 37, 55, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.layout > .panel {
  min-width: 0;
}

.panel h2 {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
}

#settings-disclosure > summary {
  list-style: none;
  cursor: default;
}

#settings-disclosure > summary::-webkit-details-marker {
  display: none;
}

#settings-disclosure > summary h2 {
  margin-bottom: 16px;
}

#settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted);
}

.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

input {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #021a2b;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.primary-button:hover:not(:disabled) {
  opacity: 0.92;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.autosave-status-row {
  min-height: 1.25em;
  margin-top: 2px;
}

.status-message {
  font-size: 0.85rem;
  font-weight: 600;
}

.status-message.status-success {
  color: var(--success);
}

.status-message.status-saving {
  color: var(--muted);
}

.status-message.status-error {
  color: #f87171;
}

.direction-block h3 {
  margin: 4px 0 8px 0;
  font-size: 0.9rem;
  color: var(--text);
}

.direction-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.direction-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.direction-field label {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.direction-field input {
  width: 100%;
}

/* Planner Header & Toolbar */
.planner-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.header-top h2 {
  margin: 0;
  font-size: 1.5rem;
}

.mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  border: 1px solid var(--border);
}

.pill-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn.active {
  background: var(--panel-alt);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.range-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.horizon-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.horizon-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.horizon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.horizon-btn.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent-strong);
}

.start-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.start-date-field label {
  margin: 0;
  font-size: 0.8rem;
  white-space: nowrap;
}

.start-date-field input {
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Quick Jump Bar */
.quick-jump-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.quick-jump-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer {
  max-width: 1600px;
  margin: 12px auto 0;
  padding: 0 12px 16px;
  text-align: right;
  font-size: 0.8rem;
}

.site-footer a,
.imprint-page a {
  color: var(--accent);
}

.site-footer-button {
  margin-left: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.site-footer-button:hover {
  color: var(--text);
}

.cookie-notice {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(620px, calc(100vw - 32px));
  padding: 16px 18px;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 14px;
  background: #10263d;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.cookie-notice[hidden] {
  display: none;
}

.cookie-notice h2 {
  margin: 0;
  font-size: 0.95rem;
}

.cookie-notice p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.cookie-notice-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.cookie-notice-actions button {
  min-width: 88px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cookie-notice-decline {
  border: 1px solid rgba(181, 198, 216, 0.35);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.cookie-notice-decline:hover {
  border-color: rgba(181, 198, 216, 0.65);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.cookie-notice-actions button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cookie-notice-actions button:active {
  transform: translateY(1px);
}

.imprint-page {
  width: min(720px, calc(100% - 32px));
  margin: 32px auto;
  line-height: 1.6;
}

.imprint-page h1 {
  margin: 24px 0 8px;
}

.imprint-page h2 {
  margin: 28px 0 8px;
  font-size: 1.1rem;
}

.imprint-page address {
  font-style: normal;
}

.imprint-draft-notice {
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

.weather-forecast-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.weather-forecast-panel[hidden] {
  display: none;
}

.weather-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

#weather-panel-content[hidden] {
  display: none;
}

.weather-toggle-button,
.weather-load-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.weather-toggle-button {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
}

.weather-toggle-button:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.weather-load-button {
  color: #062236;
  border: 1px solid rgba(125, 211, 252, 0.55);
  background: linear-gradient(135deg, #a5e4ff, #38bdf8);
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.18);
}

.weather-load-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(56, 189, 248, 0.28);
}

.weather-load-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.weather-load-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.weather-forecast-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weather-forecast-panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.weather-forecast-panel > header p,
.weather-status,
.weather-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.weather-status:empty {
  display: none;
}

.weather-forecast-days {
  display: grid;
  gap: 8px;
}

.weather-day {
  display: block;
  min-width: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.weather-day > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  list-style-position: inside;
}

.weather-day > summary::marker {
  color: var(--accent);
}

.weather-day-summary {
  display: grid;
  gap: 2px;
  color: var(--muted);
  text-align: right;
}

.weather-day-details {
  padding: 0 10px 10px;
}

.weather-window-average {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 0.8rem;
}

.weather-hourly-strip {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  height: 42px;
  gap: 2px;
}

.weather-cloud-bar {
  display: block;
  min-width: 0;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
}

.weather-cloud-bar.unavailable {
  border: 1px dashed var(--muted);
}

.weather-hour-labels {
  position: relative;
  height: 1em;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.weather-hour-labels span {
  position: absolute;
  left: 25%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.weather-hour-labels span:first-child {
  left: 0;
  transform: none;
}

.weather-hour-labels span:nth-child(3) {
  left: 50%;
}

.weather-hour-labels span:nth-child(4) {
  left: 75%;
}

.weather-hour-labels span:last-child {
  left: 100%;
  transform: translateX(-100%);
}

.weather-visible-objects {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.object-lookup {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.object-lookup[hidden] {
  display: none;
}

.object-lookup h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.object-lookup input {
  width: 100%;
  margin-top: 6px;
}

.object-visibility {
  min-height: 70px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.875rem;
}

.object-visibility p {
  margin: 6px 0 0;
}

.summary-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.summary-controls[hidden] {
  display: none;
}

.summary-search {
  flex: 1;
  min-width: 0;
}

.summary-search h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.summary-search-row {
  display: flex;
  gap: 8px;
}

.summary-search-row input {
  flex: 1;
  min-width: 0;
}

.summary-selected-objects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.summary-object-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--border-focus);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-alt);
  cursor: pointer;
}

.summary-object-chip span {
  color: var(--muted);
  font-size: 1rem;
}

.summary-hint {
  max-width: 230px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-horizon {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}

.summary-horizon select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--text);
  background: #122537;
  font-size: 0.9rem;
}

.summary-horizon[hidden] {
  display: none;
}

.summary-object-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-object-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.summary-object-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.summary-object-card h3 {
  margin: 0;
}

.summary-object-card > header > span,
.summary-range-count {
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-ranges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-range {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.summary-range > span {
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-empty {
  margin: 0;
  color: var(--muted);
}

.next-window-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.next-window-card .next-window-date {
  color: var(--accent);
}

.object-path-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.object-path-header h3 {
  margin: 0;
}

.object-path-header p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.altitude-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.75rem;
}

.altitude-legend i {
  width: 18px;
  height: 10px;
  border-radius: 3px;
}

.object-path-charts-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  align-items: start;
  gap: 6px;
  width: 100%;
  overflow: hidden;
}

.object-path-chart-scroll {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.object-path-svg {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.moon-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.moon-view-chart-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.moon-view-svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

.moon-view-path {
  fill: none;
  stroke: rgba(125, 211, 252, 0.48);
  stroke-width: 1.4;
}

.moon-view-date-label {
  fill: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.moon-view-detail-label {
  fill: var(--muted);
  font-size: 9px;
}

.moon-view-direction-heading,
.moon-view-time-label {
  fill: var(--muted);
  font-size: 8px;
}

.moon-view-direction-label {
  fill: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.moon-view-horizon {
  stroke: rgba(251, 191, 36, 0.55);
  stroke-dasharray: 4 4;
}

.object-path-moon-chart {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.object-path-moon-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.moon-path-cell {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.moon-path-value {
  fill: var(--text);
  font-size: 9px;
  font-weight: 700;
}

.moon-path-heading {
  fill: var(--text);
  font-size: 9px;
  font-weight: 700;
}

.chart-gridline {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-dasharray: 3 4;
}

.chart-rowline {
  stroke: rgba(255, 255, 255, 0.05);
}

.chart-axis-label,
.chart-date-label {
  fill: var(--muted);
  font-size: 12px;
}

.chart-rise-marker {
  fill: #08131f;
  stroke: #4ade80;
  stroke-width: 2;
}

.chart-set-marker {
  fill: #08131f;
  stroke: #fb7185;
  stroke-width: 2;
}

.object-path-view h4 {
  margin: 4px 0 0;
}

.object-path-windows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.object-path-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.object-path-row > strong {
  color: var(--text);
}

.object-path-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.path-window {
  color: var(--muted);
}

.path-window-none {
  opacity: 0.7;
}

.quick-jump-pill {
  display: grid;
  justify-items: start;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.quick-jump-pill:hover {
  background: rgba(125, 211, 252, 0.08);
  color: var(--text);
  border-color: rgba(125, 211, 252, 0.35);
}

.quick-jump-pill.active {
  background: var(--panel-alt);
  color: var(--text);
  border-color: var(--accent);
}

.quick-jump-cloud {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.quick-jump-pill.active .quick-jump-cloud {
  color: var(--accent);
}

/* Output Layouts */
.calendar-output {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nights-with-moon-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 290px);
  align-items: start;
  gap: 16px;
}

.night-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.moon-illumination-panel {
  position: sticky;
  top: 16px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.moon-illumination-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.moon-illumination-panel p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.moon-illumination-chart-scroll {
  overflow-x: auto;
}

.moon-illumination-svg {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
}

.moon-chart-gridline {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-dasharray: 3 4;
}

.moon-chart-axis-label {
  fill: var(--muted);
  font-size: 9px;
}

.moon-chart-value {
  fill: var(--text);
  font-size: 9px;
  font-weight: 700;
}

.moon-chart-bar {
  fill: #c4b5fd;
  stroke: rgba(221, 214, 254, 0.75);
  stroke-width: 1;
}

/* By Night Section */
.night-section {
  scroll-margin-top: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.night-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.night-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.night-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  background: var(--badge-bg);
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge-sunset {
  color: #fdba74;
  border-color: rgba(253, 186, 116, 0.3);
  background: rgba(253, 186, 116, 0.08);
}

.badge-cutoff {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.3);
  background: rgba(147, 197, 253, 0.08);
}

.badge-count {
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.3);
}

.badge-cloud-cover {
  color: #bfdbfe;
  border-color: rgba(147, 197, 253, 0.3);
  background: rgba(59, 130, 246, 0.1);
  background: rgba(74, 222, 128, 0.08);
}

.badge-type {
  text-transform: capitalize;
}

.badge-planet {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}

.badge-moon {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.35);
  background: rgba(196, 181, 253, 0.1);
}

.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.object-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.object-card:hover {
  border-color: rgba(125, 211, 252, 0.25);
  transform: translateY(-1px);
}

.object-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.object-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.object-card p {
  margin: 2px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.empty-night {
  padding: 12px;
  color: var(--muted);
  font-size: 0.875rem;
  font-style: italic;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 10px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #settings-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }

  #settings-disclosure > summary h2 {
    margin: 0;
  }

  #settings-disclosure > summary::after {
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s ease;
  }

  #settings-disclosure[open] > summary {
    margin-bottom: 16px;
  }

  #settings-disclosure[open] > summary::after {
    transform: rotate(225deg) translateY(-2px);
  }

  .mode-toggle {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .pill-btn {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .object-lookup {
    grid-template-columns: 1fr;
  }

  .summary-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-hint {
    max-width: none;
  }

  .summary-controls {
    flex-wrap: wrap;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-object-card > header {
    align-items: flex-start;
  }

  .weather-forecast-panel > header {
    align-items: stretch;
    flex-direction: column;
  }

  .weather-panel-actions {
    justify-content: flex-start;
  }

  .weather-panel-actions button {
    flex: 1 1 auto;
  }

  .cookie-notice {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .cookie-notice-actions {
    justify-content: flex-end;
  }

  .nights-with-moon-chart {
    grid-template-columns: 1fr;
  }

  .moon-illumination-panel {
    position: static;
    grid-row: 1;
  }
}
