:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card: #111827;
  --card-border: rgba(148, 163, 184, 0.35);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.2);
  --accent-strong: rgba(56, 189, 248, 0.7);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.7);
  --radius-xl: 35px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  width: 100vw;
  height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ffffff;
  color: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.app {
  width: 100%;
  max-width: 375px;
  padding: 8px;
}

.clock-box {
  width: 85%;
  height: fit-content;
  margin: 5px;
  background-color: transparent;
  border-radius: 35px;
  border-top-left-radius: 35px;
  border-top-right-radius: 35px;
  border-bottom-right-radius: 35px;
  border-bottom-left-radius: 35px;
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 0, 0, 1);
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
  padding: 18px 18px 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  vertical-align: middle;
  opacity: 1;
}

.app-header {
  text-align: center;
  margin-bottom: 10px;
}

.app-header p {
  margin: 0;
  font-size: 16px;
  color: #2563eb;
  font-weight: 600;
  font-family: "Baloo 2", "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
}

.cards-grid {
  display: flex;
  flex-direction: row;
  gap: 2px;
  flex: 0 0 auto;
  height: fit-content;
  padding: 0px 4px;
  justify-content: flex-end;
  align-items: center;
  box-sizing: content-box;
  font-size: 14px;
  text-align: center;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.app-header h1 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #2563eb;
  white-space: nowrap;
}

#cards {
  width: 100%;
  height: fit-content;
  flex-wrap: nowrap;
  margin-left: 5px;
  margin-right: 5px;
  padding-top: 15px;
  padding-bottom: 15px;
}

.card {
  position: relative;
  background: #fffef0;
  border-radius: 12px;
  padding: 6px 6px 4px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#card-berlin,
#card-nyc,
#card-seoul {
  height: fit-content;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

#card-berlin {
  width: 100%;
  order: 2;
  box-shadow: 0px 4px 0px 0px rgba(0, 0, 0, 0);
  border-radius: 12px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
}

#card-seoul {
  order: 1;
  border-right-color: rgba(255, 255, 255, 0.35);
}

#card-nyc {
  order: 3;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    var(--accent-soft),
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
}

.card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 2px;
}

.city-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 1.5em;
  box-sizing: content-box;
}

.city-name {
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.90rem;
  color: #6d28d9;
  text-align: center;
  width: auto;
  padding: 3px 14px;
  margin-left: 12px;
  border-radius: 999px;
  background-color: #fff9c4; /* very light yellow */
  background-image: radial-gradient(#f97316 1px, transparent 1px);
  background-size: 8px 8px;
  background-position: 0 0;
  border: none;
  box-sizing: border-box;
}

.city-badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: radial-gradient(circle at top left, #1d283a, #020617);
  color: var(--muted);
}

.time-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2rem;
}

.time-main {
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  width: 100%;
  text-align: center;
  color: #c2410c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.time-main .day-night-icon {
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0.95;
  flex-shrink: 0;
}

.time-main .day-night-icon.day {
  filter: none;
}

.time-main .day-night-icon.night {
  filter: none;
}

.time-main .time-value {
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.time-sub {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.time-sub .weekday {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.time-sub .date {
  font-size: 0.68rem;
  color: var(--muted);
}

.divider {
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.5),
    transparent
  );
  margin: 10px 0 9px;
  display: none;
}

.weather-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 1.75rem;
  margin-top: -6px;
}

.temp-main {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 6px;
  margin-left: 10px;
}

.temp-main .temp {
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  font-feature-settings: "tnum" 1, "lnum" 1;
  color: #059669;
  box-sizing: content-box;
}

.temp-main .feels {
  font-size: 0.6rem;
  color: #f47005;
  display: none;
}

.conditions {
  flex: 1;
  text-align: right;
  display: none;
}

.conditions .summary {
  font-size: 0.7rem;
  font-weight: 500;
  color: #ea580c;
}

.conditions .meta {
  font-size: 0.62rem;
  color: var(--muted);
}

.meta span + span::before {
  content: "•";
  margin: 0 6px;
  color: rgba(148, 163, 184, 0.7);
}

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.6rem;
  color: var(--muted);
  display: none;
}

.status span.label {
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.status span.value {
  color: var(--accent-strong);
}

.status span.error {
  color: var(--danger);
}

.pill {
  padding: 2px 2px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #020617, #020617);
}

.app-footer {
  margin-top: 8px;
  text-align: right;
  font-size: 0.7rem;
  color: #6b7280;
}

#last-updated {
  font-size: 11px;
}

.quote-panel {
  margin: 10px auto 0;
  width: fit-content;
  max-width: 375px;
  border-radius: 0px;
  border-top: 4px solid #fbbf24;
  background: rgba(255, 255, 255, 1);
  border-width: 0px;
  border-style: none;
  border-color: rgba(0, 0, 0, 0);
  border-image: none;
  height: fit-content;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  opacity: 1;
  box-sizing: content-box;
}

.extra-panel {
  margin: 16px auto 0;
  width: 100%;
  max-width: 375px;
  padding: 10px 0;
  border-radius: 10px;
  background: #ffffff;
  min-height: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.extra-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #0e46a7;
}

.pinterest-wrap {
  width: 100%;
  flex: 1;
  overflow: hidden;
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gallery-arrow {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1;
}

.gallery-arrow:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #111827;
}

.gallery-arrow:focus-visible {
  outline: 2px solid #0e46a7;
  outline-offset: 2px;
}

.pinterest-wrap img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 150px;
  object-fit: contain !important;
  border-radius: 8px;
  margin: 0 auto 6px;
}

.pinterest-wrap a[data-pin-do] {
  display: block;
  width: 100%;
  max-width: 100%;
}

.pinterest-hint {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #6b7280;
}

.pinterest-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.68rem;
  color: #111827;
}

.quote-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.quote-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #000000;
  font-weight: 600;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 350px;
  width: fit-content;
  box-sizing: content-box;
  backdrop-filter: blur(12px);
  height: fit-content;
}

.quote-author {
  margin-top: 0px;
  font-size: 0.68rem;
  color: #6b7280;
  text-align: right;
  align-self: flex-end;
  overflow: hidden;
  transform: rotate(360deg);
}

#quote-author {
  padding-left: 15px;
  padding-right: 15px;
}

@media (max-width: 640px) {
  .app {
    padding-inline: 14px;
  }

  .card {
    padding-inline: 16px;
  }

  #card-berlin {
    padding-right: 20px;
  }

  #card-seoul,
  #card-nyc {
    padding-right: 20px;
  }

  #card-nyc {
    padding-left: 20px;
  }

  .time-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .time-sub {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .weather-row {
    align-items: flex-start;
  }

  .conditions {
    text-align: left;
  }
}

