:root {
  --primary: #8ed5e8;
  --secondary: #f6c7d9;
  --text: #35424a;
  --panel: rgb(255 255 255 / 78%);
  --panel-strong: rgb(255 255 255 / 88%);
  --line: rgb(255 255 255 / 62%);
  --shadow: 0 18px 45px rgb(47 87 102 / 14%);
  --chi-pink: #ff9ebc;
  --chi-mint: #9be0c8;
  --chi-cream: #fff7df;
  --folder-dark: rgb(19 34 30 / 58%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #eef8fb;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(115deg, rgb(255 255 255 / 70%), rgb(255 255 255 / 25%)), url("/assets/background_landscape.png");
  background-position: center;
  background-size: cover;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 560px) auto;
  gap: 18px;
  align-items: center;
  padding: 18px clamp(16px, 4vw, 44px);
  background: rgb(255 255 255 / 72%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #fff;
  background-image: url("/assets/hachi.png");
  background-position: center;
  background-size: 118%;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgb(72 109 120 / 12%);
  color: transparent;
  overflow: hidden;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 1.8rem;
  letter-spacing: 0;
}

.brand p {
  color: rgb(53 66 74 / 68%);
  font-size: 0.78rem;
  line-height: 1.15;
}

.search {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}

.search input,
.search button,
.desktop-btn,
.music-btn,
.chips button,
.error-card button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search input {
  min-width: 0;
  padding: 0 16px;
  color: var(--text);
  background: rgb(255 255 255 / 82%);
  outline: none;
}

.search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgb(142 213 232 / 24%);
}

.search button,
.error-card button {
  padding: 0 18px;
  color: #fff;
  font-weight: 700;
  background: var(--text);
}

.search .ghost {
  color: var(--text);
  background: #fff;
}

.top-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.desktop-btn,
.music-btn {
  position: relative;
  width: 44px;
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.desktop-icon,
.music-icon {
  display: block;
  width: 100%;
  height: 100%;
  margin: auto;
  border-radius: 8px;
}

.desktop-icon {
  background: url("/assets/generated/mini-forecast.webp") center / cover no-repeat;
}

.music-icon {
  background: url("/assets/hachi.png") center / 118% no-repeat;
}

.music-btn.is-playing .music-icon {
  animation: spin 3s linear infinite;
}

.tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 5px 8px;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  background: rgb(0 0 0 / 72%);
  border-radius: 6px;
  opacity: 0;
}

.desktop-btn:hover .tooltip,
.music-btn:hover .tooltip {
  opacity: 1;
}

.content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 28px;
  flex: 1;
}

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

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips button {
  padding: 0 12px;
  color: var(--text);
  background: rgb(255 255 255 / 74%);
}

.status-text {
  color: rgb(53 66 74 / 70%);
  font-size: 0.92rem;
  text-align: right;
}

.hero-card,
.mascot-card,
.data-panel,
.hour-card,
.index-card,
.forecast-card,
.error-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 28px;
  align-items: center;
  padding: 36px;
}

.empty-state,
.empty-inline {
  color: rgb(53 66 74 / 70%);
  text-align: center;
}

.empty-state {
  grid-column: 1 / -1;
}

.empty-inline {
  width: 100%;
  padding: 18px;
  background: rgb(255 255 255 / 54%);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgb(53 66 74 / 62%);
  font-weight: 700;
}

.weather-copy h2 {
  margin: 0;
  font-size: 4rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.condition {
  margin-top: 12px;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 800;
}

.metrics,
.mini-metrics {
  display: grid;
  gap: 10px;
}

.metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.metrics div,
.mini-metrics div,
.astro-grid div {
  min-width: 0;
  padding: 14px;
  background: rgb(255 255 255 / 66%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics span,
.mini-metrics span,
.astro-grid span {
  display: block;
  margin-bottom: 6px;
  color: rgb(53 66 74 / 62%);
  font-size: 0.85rem;
}

.metrics strong,
.mini-metrics strong,
.astro-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.weather-visual {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.weather-visual img {
  width: min(230px, 48vw);
  aspect-ratio: 1;
  object-fit: contain;
}

.weather-visual p {
  margin: 0;
  color: rgb(53 66 74 / 66%);
}

.temperature {
  font-size: 5.4rem;
  font-weight: 900;
  line-height: 1;
}

.mascot-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.75fr) minmax(180px, 0.75fr);
  gap: 12px;
  margin-top: 18px;
}

.mascot-card {
  min-height: 132px;
  padding: 18px;
}

.mascot-main {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgb(255 255 255 / 88%), rgb(255 238 247 / 74%));
}

.mascot-main img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.mascot-card h2,
.mascot-card p,
.mascot-card strong {
  margin: 0;
}

.mascot-card h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.mascot-card > span {
  display: block;
  margin-bottom: 10px;
  font-size: 1.6rem;
}

.mascot-card strong {
  display: block;
  margin-bottom: 8px;
}

.mascot-card p {
  color: rgb(53 66 74 / 72%);
  line-height: 1.55;
}

.hourly-section,
.forecast-section,
.indices-section {
  margin-top: 22px;
}

.section-title,
.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.section-title h2,
.panel-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-title span,
.panel-title span {
  color: rgb(53 66 74 / 66%);
  font-size: 0.9rem;
}

.hourly-list,
.forecast-grid {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hourly-list {
  grid-template-columns: repeat(24, minmax(124px, 1fr));
}

.hour-card {
  min-width: 124px;
  padding: 14px;
  text-align: center;
}

.hour-time,
.forecast-date {
  font-weight: 800;
}

.hour-card img,
.forecast-card img {
  object-fit: contain;
}

.hour-card img {
  width: 50px;
  height: 50px;
  margin: 8px auto;
}

.hour-card strong {
  display: block;
  font-size: 1.5rem;
}

.hour-card span,
.hour-card small,
.forecast-card small {
  display: block;
  color: rgb(53 66 74 / 68%);
}

.hour-card span {
  margin-top: 4px;
}

.hour-card small,
.forecast-card small {
  margin-top: 8px;
  line-height: 1.4;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.data-panel {
  padding: 18px;
}

.aqi-pill {
  padding: 5px 10px;
  font-weight: 800;
  border-radius: 999px;
}

.aqi-pill.good {
  color: #126646;
  background: #dff8ea;
}

.aqi-pill.moderate {
  color: #755000;
  background: #fff0bf;
}

.aqi-pill.bad {
  color: #9b1c1c;
  background: #ffe0e0;
}

.aqi-pill.unknown {
  color: rgb(53 66 74 / 70%);
  background: rgb(255 255 255 / 60%);
}

.air-score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 6px 0 16px;
}

.air-score span {
  color: rgb(53 66 74 / 62%);
  font-weight: 800;
}

.air-score strong {
  font-size: 3.2rem;
  line-height: 1;
}

.mini-metrics,
.astro-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.moon-note {
  margin: 14px 0 0;
  color: rgb(53 66 74 / 70%);
  line-height: 1.55;
}

.indices-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.index-card {
  padding: 16px;
}

.index-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.index-card h3,
.index-card p {
  margin: 0;
}

.index-card h3 {
  font-size: 1rem;
}

.index-card span {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 800;
}

.index-card p {
  margin-top: 10px;
  color: rgb(53 66 74 / 70%);
  line-height: 1.55;
}

.forecast-grid {
  grid-template-columns: repeat(7, minmax(132px, 1fr));
}

.forecast-card {
  min-width: 132px;
  padding: 14px;
  text-align: center;
}

.forecast-card img {
  width: 58px;
  height: 58px;
  margin: 10px auto;
}

.forecast-temp {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.forecast-temp span,
.forecast-card p {
  color: rgb(53 66 74 / 68%);
}

.forecast-card p {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.error-card {
  margin-top: 18px;
  padding: 16px;
  color: #9b1c1c;
  background: rgb(255 242 242 / 82%);
}

.footer {
  padding: 14px;
  color: rgb(53 66 74 / 64%);
  font-size: 0.88rem;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .app-shell {
    background-image: linear-gradient(115deg, rgb(255 255 255 / 72%), rgb(255 255 255 / 30%)), url("/assets/background_portrait.png");
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto auto;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

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

  .mascot-strip,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .indices-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-line,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-text {
    text-align: left;
  }
}

@media (max-width: 560px) {
  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    background: #10251d;
  }

  .app-shell {
    background-image: linear-gradient(180deg, rgb(13 37 28 / 30%), rgb(12 35 27 / 54%)), url("/assets/background_portrait.png");
    background-attachment: fixed;
  }

  .content {
    width: min(100% - 14px, 430px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 0 14px;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    background: rgb(245 255 250 / 62%);
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand h1 {
    font-size: 1.14rem;
  }

  .brand p {
    display: block;
    font-size: 0.64rem;
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
  }

  .desktop-btn,
  .music-btn {
    width: 38px;
    min-height: 38px;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) 58px 58px;
    gap: 7px;
  }

  .search input,
  .search button {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.9rem;
  }

  .search button {
    padding: 0;
  }

  .status-line,
  .hero-card,
  .mascot-strip,
  .hourly-section,
  .data-grid,
  .indices-section,
  .forecast-section,
  .error-card {
    grid-column: 1 / -1;
  }

  .status-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0 2px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar,
  .hourly-list::-webkit-scrollbar,
  .forecast-grid::-webkit-scrollbar {
    display: none;
  }

  .chips button {
    min-height: 30px;
    padding: 0 9px;
    border-color: rgb(255 255 255 / 32%);
    background: rgb(255 255 255 / 48%);
    white-space: nowrap;
  }

  .status-text {
    max-width: 126px;
    color: rgb(255 255 255 / 82%);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-card,
  .mascot-card,
  .data-panel,
  .hour-card,
  .index-card,
  .forecast-card {
    border-color: rgb(255 255 255 / 24%);
    background: linear-gradient(145deg, rgb(255 255 255 / 70%), rgb(255 255 255 / 36%));
    box-shadow: 0 10px 28px rgb(2 22 15 / 20%);
  }

  .hero-card {
    position: relative;
    min-height: 166px;
    grid-template-columns: minmax(0, 1.05fr) minmax(100px, 0.7fr);
    gap: 4px;
    overflow: hidden;
    padding: 14px;
    border-radius: 14px;
  }

  .hero-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -32px;
    width: 174px;
    height: 174px;
    background: var(--weather-icon) center / contain no-repeat;
    opacity: 0.2;
    pointer-events: none;
  }

  .weather-copy,
  .weather-visual {
    position: relative;
    z-index: 1;
  }

  .eyebrow {
    margin-bottom: 5px;
    font-size: 0.76rem;
  }

  .weather-copy h2 {
    font-size: 2.05rem;
  }

  .condition {
    margin-top: 4px;
    font-size: 1rem;
  }

  .weather-visual {
    align-self: center;
    gap: 2px;
  }

  .weather-visual img {
    width: 76px;
  }

  .weather-visual p {
    font-size: 0.75rem;
  }

  .temperature {
    font-size: 2.6rem;
  }

  .metrics,
  .mini-metrics {
    gap: 5px;
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 10px;
  }

  .metrics div,
  .mini-metrics div,
  .astro-grid div {
    padding: 7px;
    border-color: rgb(255 255 255 / 28%);
    background: rgb(255 255 255 / 40%);
  }

  .metrics span,
  .mini-metrics span,
  .astro-grid span {
    margin-bottom: 2px;
    font-size: 0.68rem;
  }

  .metrics strong,
  .mini-metrics strong,
  .astro-grid strong {
    font-size: 0.78rem;
  }

  .mascot-strip {
    grid-template-columns: 1.25fr 0.9fr 0.9fr;
    gap: 8px;
    margin-top: 0;
  }

  .mascot-card {
    min-height: 78px;
    padding: 10px;
    border-radius: 14px;
  }

  .mascot-main {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
  }

  .mascot-main img {
    width: 42px;
    height: 42px;
  }

  .mascot-card h2 {
    margin-bottom: 3px;
    font-size: 0.9rem;
  }

  .mascot-card p {
    display: -webkit-box;
    color: rgb(53 66 74 / 78%);
    font-size: 0.72rem;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mascot-card > span {
    margin-bottom: 4px;
    font-size: 1.05rem;
  }

  .mascot-card strong {
    margin-bottom: 3px;
    font-size: 0.76rem;
    line-height: 1.22;
  }

  .mascot-card .eyebrow {
    display: none;
  }

  .hourly-section,
  .forecast-section,
  .indices-section {
    margin-top: 0;
    padding: 8px;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 14px;
    background: rgb(255 255 255 / 28%);
    backdrop-filter: blur(14px);
  }

  .section-title,
  .panel-title {
    margin-bottom: 7px;
  }

  .section-title h2,
  .panel-title h2 {
    font-size: 0.96rem;
  }

  .section-title span,
  .panel-title span {
    font-size: 0.7rem;
  }

  .hourly-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .hour-card {
    min-width: 0;
    padding: 7px 4px;
    border-radius: 12px;
  }

  .hour-card:nth-child(n + 5) {
    display: none;
  }

  .hour-time,
  .forecast-date {
    font-size: 0.72rem;
  }

  .hour-card img {
    width: 26px;
    height: 26px;
    margin: 2px auto;
  }

  .hour-card strong {
    font-size: 0.95rem;
  }

  .hour-card span {
    font-size: 0.68rem;
  }

  .hour-card small {
    display: none;
  }

  .data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
  }

  .data-panel {
    min-height: 132px;
    overflow: hidden;
    position: relative;
    padding: 9px;
    border-radius: 14px;
  }

  .data-panel::after,
  .hourly-section::after,
  .forecast-section::after,
  .indices-section::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -22px;
    width: 96px;
    height: 96px;
    background: var(--weather-icon, url("/assets/icon_yt.png")) center / contain no-repeat;
    opacity: 0.1;
    pointer-events: none;
  }

  .hourly-section,
  .forecast-section,
  .indices-section {
    position: relative;
    overflow: hidden;
  }

  .air-score {
    gap: 6px;
    margin: 0 0 6px;
  }

  .air-score span {
    font-size: 0.72rem;
  }

  .air-score strong {
    font-size: 1.8rem;
  }

  .aqi-pill {
    padding: 3px 7px;
    font-size: 0.68rem;
  }

  .mini-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-metrics div:nth-child(n + 3) {
    display: none;
  }

  .astro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .astro-grid div:nth-child(n + 3) {
    display: none;
  }

  .moon-note {
    display: none;
  }

  .indices-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .index-card {
    min-height: 66px;
    padding: 8px;
    border-radius: 12px;
  }

  .index-card div {
    display: block;
  }

  .index-card h3 {
    font-size: 0.76rem;
  }

  .index-card span {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
  }

  .index-card p {
    display: none;
  }

  .forecast-grid {
    grid-template-columns: repeat(7, minmax(58px, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .forecast-card {
    min-width: 0;
    padding: 7px 4px;
    border-radius: 12px;
  }

  .forecast-card img {
    width: 28px;
    height: 28px;
    margin: 4px auto;
  }

  .forecast-temp {
    gap: 4px;
    font-size: 0.78rem;
  }

  .forecast-card p {
    margin-top: 4px;
    font-size: 0.66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .forecast-card small {
    display: none;
  }

  .empty-inline {
    padding: 10px;
    font-size: 0.78rem;
  }

  .error-card {
    margin-top: 0;
    padding: 10px;
    border-radius: 14px;
  }

  .footer {
    padding: 8px;
    color: rgb(255 255 255 / 62%);
    font-size: 0.72rem;
  }
}

@media (max-width: 390px) {
  .content {
    width: calc(100% - 10px);
    gap: 6px;
  }

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

  .weather-copy h2 {
    font-size: 1.8rem;
  }

  .temperature {
    font-size: 2.25rem;
  }

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

  .metrics div:nth-child(n + 4) {
    display: none;
  }

  .hourly-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    background: #123026;
  }

  .app-shell {
    background-image:
      linear-gradient(180deg, rgb(29 80 67 / 18%), rgb(7 24 19 / 72%)),
      url("/assets/background_portrait.png");
    background-position: center top;
    background-size: cover;
  }

  .topbar {
    padding: max(8px, env(safe-area-inset-top)) 8px 8px;
    background: rgb(239 255 248 / 58%);
    border-bottom: 1px solid rgb(255 255 255 / 36%);
    box-shadow: 0 10px 24px rgb(8 32 26 / 16%);
  }

  .brand h1 {
    font-size: 1.08rem;
    line-height: 1.1;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background-size: 90%;
  }

  .desktop-btn,
  .music-btn {
    width: 38px;
    min-height: 38px;
    color: #25362f;
    border-color: rgb(255 255 255 / 58%);
    background: rgb(255 255 255 / 64%);
    box-shadow: 0 8px 16px rgb(10 33 27 / 12%);
  }

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

  .search input,
  .search button {
    min-height: 38px;
    border-color: rgb(255 255 255 / 54%);
    background: rgb(255 255 255 / 68%);
    box-shadow: 0 8px 16px rgb(10 33 27 / 10%);
  }

  .search button {
    color: #fff;
    background: #30413c;
  }

  .search .ghost {
    color: #30413c;
    background: rgb(255 255 255 / 72%);
  }

  .content {
    width: min(calc(100% - 12px), 430px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 7px 0 10px;
  }

  .status-line {
    order: 1;
    min-height: 30px;
    padding: 3px 6px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 14px;
    background: rgb(15 32 28 / 42%);
    backdrop-filter: blur(14px);
  }

  .chips {
    gap: 5px;
  }

  .chips button {
    min-height: 24px;
    padding: 0 8px;
    color: rgb(255 255 255 / 94%);
    font-size: 0.72rem;
    border-color: rgb(255 255 255 / 24%);
    background: rgb(255 255 255 / 18%);
  }

  .status-text {
    max-width: 116px;
    color: rgb(255 255 255 / 82%);
    font-size: 0.72rem;
  }

  .hero-card,
  .mascot-card,
  .data-panel,
  .hour-card,
  .index-card,
  .forecast-card {
    border-color: rgb(255 255 255 / 30%);
    box-shadow: 0 12px 28px rgb(1 19 13 / 20%);
  }

  .hero-card {
    order: 2;
    min-height: 150px;
    grid-template-columns: minmax(0, 1.25fr) minmax(88px, 0.65fr);
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgb(255 255 255 / 84%), rgb(255 255 255 / 42%)),
      radial-gradient(circle at 10% 10%, rgb(255 158 188 / 42%), transparent 44%);
  }

  .hero-card::before {
    content: "";
    position: absolute;
    right: 82px;
    bottom: -8px;
    width: 88px;
    height: 88px;
    background: url("/assets/hachi.png") center / contain no-repeat;
    opacity: 0.18;
    pointer-events: none;
  }

  .hero-card::after {
    right: -24px;
    bottom: -24px;
    width: 156px;
    height: 156px;
    opacity: 0.24;
  }

  .eyebrow {
    margin-bottom: 4px;
    color: rgb(45 63 55 / 64%);
    font-size: 0.72rem;
  }

  .weather-copy h2 {
    max-width: 100%;
    font-size: 1.9rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .condition {
    margin-top: 3px;
    color: #247c83;
    font-size: 0.94rem;
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 8px;
  }

  .metrics div:nth-child(n + 4) {
    display: none;
  }

  .metrics div,
  .mini-metrics div,
  .astro-grid div {
    min-height: 44px;
    padding: 7px;
    border-color: rgb(255 255 255 / 38%);
    background:
      linear-gradient(145deg, rgb(255 255 255 / 62%), rgb(255 255 255 / 26%)),
      var(--weather-icon) right -18px bottom -18px / 64px no-repeat;
  }

  .metrics span,
  .mini-metrics span,
  .astro-grid span {
    margin-bottom: 1px;
    font-size: 0.66rem;
  }

  .metrics strong,
  .mini-metrics strong,
  .astro-grid strong {
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .weather-visual img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgb(19 47 39 / 14%);
  }

  .temperature {
    font-size: 2.45rem;
    letter-spacing: 0;
  }

  .weather-visual p {
    font-size: 0.7rem;
  }

  .mascot-strip {
    order: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    min-height: 0;
    padding: 7px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 18px;
    background: var(--folder-dark);
    box-shadow: 0 14px 30px rgb(1 19 13 / 22%);
    backdrop-filter: blur(16px);
  }

  .mascot-card {
    height: 74px;
    min-height: 0;
    overflow: hidden;
    padding: 8px;
    border-radius: 14px;
    background:
      linear-gradient(145deg, rgb(255 255 255 / 55%), rgb(255 255 255 / 22%)),
      var(--weather-icon) right -22px bottom -24px / 76px no-repeat;
    box-shadow: none;
  }

  .mascot-main {
    grid-column: span 2;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 7px;
    background:
      linear-gradient(145deg, rgb(255 246 216 / 78%), rgb(255 255 255 / 32%)),
      url("/assets/hachi.png") right -24px bottom -28px / 96px no-repeat;
  }

  .mascot-card h2 {
    margin-bottom: 3px;
    font-size: 0.86rem;
    line-height: 1.18;
  }

  .mascot-card p {
    font-size: 0.7rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .mascot-card:not(.mascot-main) p {
    -webkit-line-clamp: 1;
  }

  .mascot-card strong {
    margin-bottom: 3px;
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .mascot-card > span {
    margin-bottom: 5px;
    font-size: 1rem;
  }

  .hourly-section,
  .forecast-section,
  .indices-section {
    padding: 8px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 18px;
    background: var(--folder-dark);
    box-shadow: 0 14px 30px rgb(1 19 13 / 18%);
    backdrop-filter: blur(16px);
  }

  .hourly-section {
    order: 4;
  }

  .data-grid {
    order: 5;
  }

  .forecast-section {
    order: 6;
  }

  .indices-section {
    order: 7;
  }

  .error-card {
    order: 8;
  }

  .section-title,
  .panel-title {
    align-items: center;
    flex-direction: row;
    margin-bottom: 6px;
  }

  .section-title h2,
  .panel-title h2 {
    color: #243830;
    font-size: 0.92rem;
    line-height: 1.16;
  }

  .widget-folder .section-title h2 {
    color: rgb(255 255 255 / 94%);
  }

  .section-title span,
  .panel-title span {
    font-size: 0.66rem;
  }

  .hourly-section .section-title span,
  .forecast-section .section-title span,
  .indices-section .section-title span {
    display: none;
  }

  .widget-folder .section-title span {
    color: rgb(255 255 255 / 68%);
  }

  .hourly-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .hour-card {
    position: relative;
    min-width: 0;
    min-height: 78px;
    overflow: hidden;
    padding: 7px 3px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgb(255 255 255 / 64%), rgb(255 255 255 / 30%));
  }

  .hour-card::after,
  .forecast-card::after,
  .index-card::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -20px;
    width: 64px;
    height: 64px;
    background: var(--weather-icon) center / contain no-repeat;
    opacity: 0.12;
    pointer-events: none;
  }

  .hour-time,
  .forecast-date {
    font-size: 0.7rem;
  }

  .hour-card img {
    width: 25px;
    height: 25px;
    margin: 2px auto;
    border-radius: 8px;
  }

  .hour-card strong {
    font-size: 0.92rem;
  }

  .hour-card span {
    font-size: 0.66rem;
  }

  .data-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .data-panel {
    grid-column: span 2;
    min-height: 116px;
    padding: 9px;
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgb(255 255 255 / 68%), rgb(255 255 255 / 32%)),
      radial-gradient(circle at 15% 10%, rgb(255 247 223 / 58%), transparent 46%);
  }

  .data-panel::after,
  .hourly-section::after,
  .forecast-section::after,
  .indices-section::after {
    right: -22px;
    bottom: -24px;
    width: 110px;
    height: 110px;
    opacity: 0.16;
  }

  .air-score {
    margin: 0 0 6px;
  }

  .air-score strong {
    font-size: 1.72rem;
  }

  .aqi-pill {
    padding: 3px 7px;
    font-size: 0.66rem;
  }

  .mini-metrics,
  .astro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .mini-metrics div:nth-child(n + 3),
  .astro-grid div:nth-child(n + 3) {
    display: none;
  }

  .indices-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .index-card {
    position: relative;
    min-height: 62px;
    overflow: hidden;
    padding: 7px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgb(255 255 255 / 62%), rgb(255 255 255 / 30%));
  }

  .index-card:nth-child(n + 4) {
    display: none;
  }

  .index-card h3 {
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .index-card span {
    font-size: 0.68rem;
  }

  .forecast-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .forecast-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 6px 3px;
    border-radius: 13px;
    background: linear-gradient(145deg, rgb(255 255 255 / 62%), rgb(255 255 255 / 30%));
  }

  .forecast-card img {
    width: 25px;
    height: 25px;
    margin: 3px auto;
    border-radius: 8px;
  }

  .forecast-temp {
    gap: 3px;
    font-size: 0.72rem;
  }

  .forecast-card p {
    display: none;
  }

  .error-card {
    border-radius: 18px;
    background: rgb(255 244 244 / 82%);
  }

  .footer {
    display: none;
  }
}

@media (max-width: 390px) {
  .content {
    width: calc(100% - 10px);
    gap: 6px;
  }

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

  .hero-card {
    min-height: 142px;
    padding: 10px;
  }

  .weather-copy h2 {
    font-size: 1.68rem;
  }

  .temperature {
    font-size: 2.18rem;
  }

  .mascot-strip {
    min-height: 86px;
    gap: 6px;
    padding: 6px;
  }

  .mascot-card {
    min-height: 68px;
    padding: 7px;
  }

  .data-panel {
    min-height: 108px;
  }
}

@media (max-width: 560px) {
  body {
    background: #edf9f4;
  }

  .app-shell {
    background-image:
      linear-gradient(180deg, rgb(251 255 252 / 84%), rgb(232 247 242 / 82%)),
      url("/assets/background_portrait.png");
    background-attachment: scroll;
    background-position: center top;
    background-size: cover;
  }

  .topbar {
    background: rgb(249 255 252 / 78%);
    border-bottom-color: rgb(93 151 137 / 14%);
    box-shadow: 0 10px 28px rgb(74 130 116 / 12%);
  }

  .brand h1 {
    color: #243a34;
  }

  .brand-mark,
  .desktop-btn,
  .music-btn,
  .search input,
  .search button {
    border-color: rgb(90 143 131 / 18%);
    box-shadow: 0 8px 18px rgb(74 130 116 / 10%);
  }

  .search input {
    background: rgb(255 255 255 / 84%);
  }

  .search button {
    background: #44505a;
  }

  .search .ghost,
  .desktop-btn,
  .music-btn {
    color: #31443d;
    background: rgb(255 255 255 / 80%);
  }

  .status-line {
    background: rgb(255 255 255 / 54%);
    border-color: rgb(90 143 131 / 16%);
    box-shadow: 0 8px 18px rgb(74 130 116 / 9%);
  }

  .chips button {
    color: #355149;
    border-color: rgb(90 143 131 / 16%);
    background: rgb(255 255 255 / 74%);
  }

  .status-text {
    color: rgb(50 77 69 / 70%);
  }

  .hero-card,
  .data-panel {
    border-color: rgb(90 143 131 / 16%);
    box-shadow: 0 14px 32px rgb(74 130 116 / 12%);
  }

  .hero-card {
    background:
      linear-gradient(145deg, rgb(255 255 255 / 86%), rgb(255 255 255 / 56%)),
      radial-gradient(circle at 12% 8%, rgb(255 210 224 / 42%), transparent 40%),
      radial-gradient(circle at 90% 16%, rgb(185 232 221 / 46%), transparent 46%);
  }

  .hero-card::before {
    opacity: 0.14;
  }

  .hero-card::after {
    opacity: 0.2;
  }

  .condition {
    color: #2d8a8f;
  }

  .metrics div,
  .mini-metrics div,
  .astro-grid div {
    border-color: rgb(90 143 131 / 14%);
    background:
      linear-gradient(145deg, rgb(255 255 255 / 74%), rgb(255 255 255 / 40%)),
      var(--weather-icon) right -18px bottom -18px / 64px no-repeat;
  }

  .mascot-strip,
  .hourly-section,
  .forecast-section,
  .indices-section {
    border-color: rgb(90 143 131 / 16%);
    background: rgb(255 255 255 / 48%);
    box-shadow: 0 14px 32px rgb(74 130 116 / 12%);
  }

  .mascot-strip {
    height: auto;
    min-height: 0;
  }

  .mascot-card,
  .hour-card,
  .index-card,
  .forecast-card {
    color: #2c443d;
    border-color: rgb(90 143 131 / 14%);
    background:
      linear-gradient(145deg, rgb(255 255 255 / 76%), rgb(255 255 255 / 42%)),
      var(--weather-icon) right -22px bottom -24px / 76px no-repeat;
    box-shadow: none;
  }

  .mascot-main {
    background:
      linear-gradient(145deg, rgb(255 248 222 / 82%), rgb(255 255 255 / 56%));
  }

  .mascot-main img {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .mascot-main h2,
  .mascot-main p,
  .mascot-card:not(.mascot-main) strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mascot-main h2,
  .mascot-card:not(.mascot-main) strong {
    white-space: nowrap;
  }

  .mascot-main p {
    display: block;
    white-space: nowrap;
  }

  .tile-icon {
    display: block;
    width: 25px;
    height: 25px;
    margin-bottom: 4px;
    object-fit: contain;
    border-radius: 8px;
  }

  .mascot-card:not(.mascot-main) {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 3px;
  }

  .mascot-card:not(.mascot-main) p {
    display: none;
  }

  .mascot-card > span {
    display: none;
  }

  .mascot-card h2,
  .mascot-card strong {
    color: #273d36;
  }

  .mascot-card p {
    color: rgb(45 67 60 / 72%);
  }

  .widget-folder .section-title h2,
  .section-title h2,
  .panel-title h2 {
    color: #263d36;
  }

  .widget-folder .section-title span,
  .section-title span,
  .panel-title span {
    color: rgb(45 67 60 / 60%);
  }

  .hour-card,
  .forecast-card,
  .index-card {
    background: linear-gradient(145deg, rgb(255 255 255 / 76%), rgb(255 255 255 / 44%));
  }

  .hour-card::after,
  .forecast-card::after,
  .index-card::after,
  .data-panel::after,
  .hourly-section::after,
  .forecast-section::after,
  .indices-section::after {
    opacity: 0.11;
  }

  .data-panel {
    background:
      linear-gradient(145deg, rgb(255 255 255 / 78%), rgb(255 255 255 / 46%)),
      radial-gradient(circle at 14% 12%, rgb(255 246 216 / 56%), transparent 44%);
  }

  .aqi-pill.good {
    background: #e9f8de;
  }
}

@media (max-width: 390px) {
  .mascot-strip {
    min-height: 0;
  }

  .mascot-card {
    height: 70px;
  }
}

/* Final stability pass: JPG weather art is not transparent, so keep it out of tile backgrounds. */
.hero-card::before,
.hero-card::after,
.data-panel::after,
.hourly-section::after,
.forecast-section::after,
.indices-section::after,
.hour-card::after,
.forecast-card::after,
.index-card::after {
  display: none !important;
}

.metrics div,
.mini-metrics div,
.astro-grid div,
.mascot-card,
.hour-card,
.index-card,
.forecast-card {
  background-image: linear-gradient(145deg, rgb(255 255 255 / 82%), rgb(255 255 255 / 48%)) !important;
}

.mascot-main {
  background-image: linear-gradient(145deg, rgb(255 248 222 / 86%), rgb(255 255 255 / 58%)) !important;
}

.tile-icon,
.hour-card img,
.forecast-card img,
.weather-visual img {
  display: block;
  background: rgb(255 255 255 / 60%);
  border: 1px solid rgb(90 143 131 / 14%);
}

@media (max-width: 560px) {
  .hero-card {
    min-height: 166px;
    grid-template-columns: minmax(0, 1fr) 118px;
  }

  .weather-visual {
    align-self: stretch;
    display: grid;
    align-content: center;
    justify-items: center;
    min-width: 0;
  }

  .weather-visual img {
    width: 94px;
    height: 94px;
    object-fit: cover;
    border-radius: 20px;
  }

  .temperature {
    font-size: 2.7rem;
  }

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

  .metrics div {
    min-height: 48px;
  }

  .mascot-strip {
    height: auto;
  }

  .mascot-card {
    height: 88px;
  }

  .mascot-main {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .mascot-main img {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .mascot-main h2 {
    font-size: 0.92rem;
  }

  .mascot-main p {
    font-size: 0.72rem;
  }

  .mascot-card:not(.mascot-main) {
    grid-template-rows: 44px auto;
    align-content: center;
    justify-items: center;
    text-align: center;
  }

  .tile-icon {
    width: 42px;
    height: 42px;
    margin: 0;
    object-fit: cover;
    border-radius: 12px;
  }

  .mascot-card:not(.mascot-main) strong {
    width: 100%;
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.16;
    white-space: nowrap;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hour-card img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 10px;
  }

  .forecast-card img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 10px;
  }
}

@media (max-width: 390px) {
  .hero-card {
    grid-template-columns: minmax(0, 1fr) 108px;
  }

  .weather-visual img {
    width: 86px;
    height: 86px;
  }

  .temperature {
    font-size: 2.42rem;
  }

  .mascot-card {
    height: 84px;
  }

  .mascot-main {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .mascot-main img {
    width: 52px;
    height: 52px;
  }

  .tile-icon {
    width: 38px;
    height: 38px;
  }
}

.section-art,
.panel-art {
  display: none;
}

@media (max-width: 560px) {
  .hero-card {
    background-image:
      linear-gradient(90deg, rgb(255 255 255 / 94%) 0%, rgb(255 255 255 / 86%) 48%, rgb(255 255 255 / 36%) 100%),
      var(--hero-art) !important;
    background-position: center;
    background-size: cover;
  }

  .weather-visual img {
    width: 104px;
    height: 104px;
    object-fit: cover;
    border-radius: 22px;
  }

  .mascot-card {
    background-image: linear-gradient(145deg, rgb(255 255 255 / 86%), rgb(255 255 255 / 58%)) !important;
  }

  .mascot-main {
    background-image: linear-gradient(145deg, rgb(255 248 222 / 90%), rgb(255 255 255 / 64%)) !important;
  }

  .mascot-main img {
    width: 62px;
    height: 62px;
    object-fit: cover;
  }

  .tile-icon {
    width: 46px;
    height: 46px;
    object-fit: cover;
  }

  .section-title {
    position: relative;
    min-height: 42px;
    padding-right: 58px;
    align-items: center;
  }

  .section-art {
    position: absolute;
    right: 2px;
    top: -6px;
    display: block;
    width: 52px;
    height: 52px;
    object-fit: cover;
    border: 1px solid rgb(90 143 131 / 14%);
    border-radius: 14px;
    background: rgb(255 255 255 / 72%);
  }

  .data-panel {
    padding-right: 68px;
  }

  .panel-title {
    padding-right: 0;
  }

  .panel-art {
    position: absolute;
    top: 56px;
    right: 9px;
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid rgb(90 143 131 / 14%);
    border-radius: 14px;
    background: rgb(255 255 255 / 72%);
  }

  .mini-metrics,
  .astro-grid {
    padding-right: 0;
  }

  .hour-card img,
  .forecast-card img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 390px) {
  .weather-visual img {
    width: 92px;
    height: 92px;
  }

  .mascot-main img {
    width: 54px;
    height: 54px;
  }

  .tile-icon {
    width: 40px;
    height: 40px;
  }

  .section-art,
  .panel-art {
    width: 42px;
    height: 42px;
  }

  .data-panel {
    padding-right: 60px;
  }
}

@media (max-width: 560px) {
  .mascot-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding: 8px;
  }

  .mascot-main {
    grid-column: 1 / -1;
    grid-template-columns: 62px minmax(0, 1fr);
    height: 82px;
    min-height: 0;
    padding: 10px 12px;
  }

  .mascot-main h2 {
    margin-bottom: 4px;
    font-size: 1rem;
    line-height: 1.2;
  }

  .mascot-main p {
    display: block;
    max-width: 100%;
    font-size: 0.74rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mascot-card:not(.mascot-main) {
    height: 88px;
    min-height: 0;
    padding: 9px 8px;
    grid-template-rows: 34px auto auto;
    gap: 3px;
  }

  .tile-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .mascot-card:not(.mascot-main) strong {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    font-size: 0.74rem;
    line-height: 1.16;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .mascot-card:not(.mascot-main) p {
    display: block;
    width: 100%;
    margin: 0;
    color: rgb(45 67 60 / 70%);
    font-size: 0.66rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hourly-section {
    padding: 12px 10px;
  }

  .section-title {
    min-height: 34px;
    margin-bottom: 8px;
    padding-right: 48px;
  }

  .section-title h2 {
    font-size: 1rem;
    line-height: 1.25;
  }

  .section-art {
    top: -3px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .hourly-list {
    gap: 8px;
  }

  .hour-card {
    min-height: 82px;
    padding: 8px 4px;
  }

  .hour-time {
    font-size: 0.78rem;
  }

  .hour-card img {
    width: 32px;
    height: 32px;
    margin: 4px auto;
  }

  .hour-card strong {
    font-size: 1.12rem;
  }

  .hour-card span {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .data-grid {
    gap: 8px;
    margin-top: 10px;
  }

  .data-panel {
    min-height: 126px;
    padding: 12px 54px 10px 12px;
  }

  .panel-title {
    margin-bottom: 6px;
  }

  .panel-title h2 {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .panel-title span {
    font-size: 0.74rem;
  }

  .aqi-pill {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  .air-score {
    gap: 6px;
    margin: 0 0 8px;
  }

  .air-score span {
    font-size: 0.7rem;
  }

  .air-score strong {
    font-size: 2rem;
  }

  .panel-art {
    top: 58px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .mini-metrics,
  .astro-grid {
    gap: 6px;
  }

  .mini-metrics div,
  .astro-grid div {
    min-height: 42px;
    padding: 7px;
  }

  .mini-metrics span,
  .astro-grid span {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .mini-metrics strong,
  .astro-grid strong {
    font-size: 0.88rem;
    line-height: 1.18;
  }
}

@media (max-width: 390px) {
  .mascot-main {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .mascot-main img {
    width: 54px;
    height: 54px;
  }

  .data-panel {
    padding-right: 50px;
  }

  .panel-art {
    right: 8px;
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 560px) {
  .forecast-section {
    order: 3;
    margin-top: 10px;
    padding: 12px 10px;
  }

  .mascot-strip {
    order: 4;
  }

  .hourly-section {
    order: 5;
  }

  .data-grid {
    order: 6;
  }

  .indices-section {
    order: 7;
  }

  .forecast-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 118px;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 5px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .forecast-card {
    min-width: 118px;
    min-height: 118px;
    padding: 10px 8px;
    scroll-snap-align: start;
  }

  .forecast-card img {
    width: 42px;
    height: 42px;
    margin: 5px auto;
  }

  .forecast-temp {
    gap: 6px;
    font-size: 0.9rem;
  }

  .forecast-card p {
    display: block;
    margin-top: 5px;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hourly-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 96px;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 5px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .hour-card,
  .hour-card:nth-child(n + 5) {
    display: block;
  }

  .hour-card {
    min-width: 96px;
    min-height: 112px;
    padding: 9px 6px;
    scroll-snap-align: start;
  }

  .hour-card img {
    width: 38px;
    height: 38px;
    margin: 5px auto;
  }

  .hour-card strong {
    font-size: 1.2rem;
  }

  .hour-card span {
    font-size: 0.76rem;
  }
}
