:root {
  color-scheme: light;
  --ink: #193047;
  --ink-soft: #40566a;
  --muted: #73879a;
  --line: rgba(62, 91, 116, 0.13);
  --line-strong: rgba(62, 91, 116, 0.22);
  --paper: rgba(255, 255, 255, 0.72);
  --paper-strong: #ffffff;
  --sky: #79bdea;
  --sky-deep: #498fc7;
  --sky-pale: #dceffb;
  --sun: #ffd46b;
  --accent: #297ab6;
  --accent-deep: #1d5f91;
  --accent-soft: rgba(67, 148, 205, 0.12);
  --success: #35a27a;
  --danger: #c85858;
  --shadow: 0 24px 70px rgba(66, 105, 134, 0.13);
  --shadow-soft: 0 12px 34px rgba(66, 105, 134, 0.09);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--font);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #cfeafa 0, #edf6fb 34rem, #f4f8fa 100%);
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(41, 122, 182, 0.28);
  outline-offset: 2px;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sky-decoration {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.sky-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(1px);
}

.orb-one {
  top: -210px;
  right: -130px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle at 34% 38%, rgba(255, 250, 210, 0.88), rgba(255, 245, 189, 0.2) 38%, transparent 68%);
}

.orb-two {
  top: 260px;
  left: -250px;
  width: 600px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.56), transparent 68%);
  transform: rotate(-12deg);
}

.sky-grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(black, transparent 46rem);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(222, 240, 249, 0.72);
  backdrop-filter: blur(20px) saturate(135%);
}

.topbar-inner,
.favorite-ribbon-inner,
.weather-layout,
.site-footer {
  width: min(1240px, calc(100% - 42px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px) 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #4f9ed6, #2273ad);
  box-shadow: 0 8px 24px rgba(34, 115, 173, 0.25);
}

.brand-icon::before {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffda74;
  box-shadow: 0 0 12px rgba(255, 218, 116, 0.68);
  content: "";
}

.brand-icon::after,
.brand-icon i {
  position: absolute;
  bottom: 8px;
  left: 7px;
  width: 27px;
  height: 12px;
  border-radius: 999px;
  background: #eff9ff;
  content: "";
}

.brand-icon i {
  bottom: 13px;
  left: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 8px 2px 0 -1px #eff9ff;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy b {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.city-search {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(73, 119, 151, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 8px 28px rgba(70, 113, 145, 0.08);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.city-search:focus-within {
  border-color: rgba(41, 122, 182, 0.38);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(70, 113, 145, 0.13);
}

.search-icon {
  position: relative;
  width: 17px;
  height: 17px;
  margin-left: 16px;
  flex: 0 0 auto;
  border: 1.7px solid var(--muted);
  border-radius: 50%;
  opacity: 0.8;
}

.search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 6px;
  height: 1.7px;
  border-radius: 2px;
  background: var(--muted);
  content: "";
  transform: rotate(45deg);
}

.city-search input {
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.city-search input::placeholder {
  color: #8ba0b1;
}

.city-search > button {
  height: 32px;
  margin-right: 6px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.search-results {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 50px rgba(46, 83, 111, 0.2);
  backdrop-filter: blur(18px);
}

.search-result {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.search-result:hover,
.search-result.active {
  background: var(--accent-soft);
}

.search-result span {
  font-size: 13px;
  font-weight: 620;
}

.search-result small {
  color: var(--muted);
  font-size: 10px;
}

.top-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.unit-toggle {
  padding: 3px;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

.unit-toggle button {
  width: 43px;
  height: 32px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.unit-toggle button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 14px rgba(41, 122, 182, 0.2);
}

.account-button {
  max-width: 150px;
  height: 39px;
  padding: 4px 11px 4px 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.account-button:hover,
.account-button.signed-in {
  border-color: rgba(41, 122, 182, 0.2);
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.84);
}

.account-button > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-avatar {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #65acd9, #297cb7);
  font-size: 11px;
  font-weight: 750;
  box-shadow: 0 5px 15px rgba(41, 124, 183, 0.2);
}

.favorite-ribbon {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(91, 128, 151, 0.08);
  background: rgba(239, 247, 251, 0.52);
}

.favorite-ribbon-inner {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
}

.favorite-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.favorite-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.favorite-list::-webkit-scrollbar {
  display: none;
}

.favorite-city {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.favorite-city:hover,
.favorite-city.active {
  border-color: var(--line);
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.62);
}

.favorite-empty {
  overflow: hidden;
  color: #91a3b1;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-layout {
  padding: 30px 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 19px;
  align-items: start;
}

.weather-column {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.glass-card,
.assistant-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(125%);
}

.glass-card {
  border-radius: var(--radius-xl);
}

.current-card {
  position: relative;
  padding: 27px;
  overflow: hidden;
  color: #f8fcff;
  border-color: rgba(255, 255, 255, 0.25);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.13), transparent 58%),
    linear-gradient(145deg, var(--sky-deep), var(--sky) 63%, #8ec9ed);
  box-shadow: 0 25px 70px rgba(52, 120, 170, 0.24);
}

.current-card::before {
  position: absolute;
  top: -140px;
  right: -50px;
  width: 370px;
  height: 370px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 180, 0.7), rgba(255, 244, 180, 0.1) 39%, transparent 67%);
  content: "";
  pointer-events: none;
}

.current-card::after {
  position: absolute;
  right: -55px;
  bottom: -70px;
  width: 360px;
  height: 155px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: -180px 35px 0 5px rgba(255, 255, 255, 0.07);
  content: "";
  transform: rotate(-7deg);
  pointer-events: none;
}

body[data-mood="cloudy"] .current-card {
  --sky-deep: #647f9e;
  --sky: #8ca6bd;
}

body[data-mood="rain"] .current-card {
  --sky-deep: #405c77;
  --sky: #68859e;
}

body[data-mood="night"] .current-card {
  --sky-deep: #263f67;
  --sky: #45688f;
}

.current-heading,
.current-weather,
.weather-metrics {
  position: relative;
  z-index: 2;
}

.current-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.location-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pin {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
  border: 1.7px solid rgba(255, 255, 255, 0.88);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.pin::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  content: "";
}

.location-line h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.favorite-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.11);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.favorite-button[aria-pressed="true"] {
  color: #ffe080;
  background: rgba(255, 225, 124, 0.16);
}

.current-heading p {
  margin: 7px 0 0 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.virtual-badge {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.11);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.current-weather {
  min-height: 190px;
  display: grid;
  grid-template-columns: 150px 190px minmax(160px, 1fr);
  align-items: center;
  gap: 14px;
}

.condition-visual {
  position: relative;
  height: 130px;
  display: grid;
  place-items: center;
}

.weather-symbol {
  position: relative;
  z-index: 2;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(35, 91, 127, 0.18));
  font-size: 88px;
  line-height: 1;
  transform: translateY(-4px);
}

.symbol-shadow {
  position: absolute;
  bottom: 10px;
  width: 90px;
  height: 13px;
  border-radius: 50%;
  background: rgba(25, 80, 117, 0.12);
  filter: blur(5px);
}

.temperature-block {
  min-width: 0;
}

.temperature {
  display: flex;
  align-items: flex-start;
  font-size: clamp(66px, 8vw, 88px);
  font-weight: 270;
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.temperature sup {
  margin: 7px 0 0 8px;
  font-size: 22px;
  font-weight: 450;
  letter-spacing: -0.03em;
}

.condition-name {
  margin-top: 11px;
  font-size: 17px;
  font-weight: 650;
}

.high-low {
  margin-top: 7px;
  display: flex;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.high-low b {
  color: #fff;
  font-weight: 620;
}

.weather-summary {
  max-width: 270px;
  margin: 0;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.7;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.metric {
  min-width: 0;
  padding: 11px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.09);
}

.metric-icon {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.metric span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hourly-section,
.forecast-section {
  padding: 22px;
}

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

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.section-note,
.forecast-legend {
  color: var(--muted);
  font-size: 9px;
}

.hourly-list {
  padding-bottom: 3px;
  display: grid;
  grid-auto-columns: minmax(82px, 1fr);
  grid-auto-flow: column;
  gap: 7px;
  overflow-x: auto;
  scrollbar-color: rgba(91, 126, 150, 0.22) transparent;
  scrollbar-width: thin;
}

.hour-card {
  min-height: 130px;
  padding: 12px 8px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: rgba(231, 241, 247, 0.58);
}

.hour-card.now {
  border-color: rgba(41, 122, 182, 0.19);
  background: var(--accent-soft);
}

.hour-card small {
  color: var(--muted);
  font-size: 9px;
}

.hour-card .hour-symbol {
  font-size: 28px;
  line-height: 1;
}

.hour-card b {
  font-size: 14px;
}

.hour-card .rain-chance {
  color: var(--accent);
  font-size: 8px;
}

.forecast-legend {
  display: flex;
  gap: 12px;
}

.forecast-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.forecast-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-low {
  background: #9ec9e4;
}

.legend-high {
  background: #f1bb70;
}

.forecast-list {
  display: grid;
}

.forecast-day {
  min-height: 54px;
  padding: 7px 4px;
  display: grid;
  grid-template-columns: 80px 38px 90px minmax(90px, 1fr) 74px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(72, 105, 129, 0.08);
}

.forecast-day:first-child {
  border-top: 0;
}

.forecast-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forecast-date b {
  font-size: 12px;
}

.forecast-date small,
.forecast-condition,
.forecast-rain {
  color: var(--muted);
  font-size: 9px;
}

.forecast-symbol {
  font-size: 23px;
  text-align: center;
}

.forecast-condition {
  color: var(--ink-soft);
}

.temperature-range {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(40px, 1fr) 28px;
  align-items: center;
  gap: 7px;
}

.temperature-range span {
  font-size: 10px;
  text-align: center;
}

.range-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8ef;
}

.range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #98c9e7, #ffd078);
}

.forecast-rain {
  color: var(--accent);
  text-align: right;
}

.data-disclaimer {
  margin: -1px 4px 0;
  color: #8597a5;
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.assistant-card {
  position: sticky;
  top: 96px;
  height: min(720px, calc(100vh - 119px));
  min-height: 580px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
}

.assistant-header {
  padding: 17px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.assistant-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #51a4d9, #2679b6);
  box-shadow: 0 8px 20px rgba(38, 121, 182, 0.2);
  font-size: 18px;
}

.assistant-identity > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.assistant-identity b {
  font-size: 14px;
}

.assistant-identity small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.assistant-identity small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(53, 162, 122, 0.1);
}

.clear-chat-button {
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.clear-chat-button:hover {
  color: var(--danger);
  background: rgba(200, 88, 88, 0.07);
}

.chat-context {
  margin: 11px 14px 0;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(41, 122, 182, 0.12);
  border-radius: 12px;
  background: rgba(222, 240, 250, 0.55);
}

.mini-weather-symbol {
  font-size: 22px;
}

.chat-context > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-context small {
  color: var(--muted);
  font-size: 8px;
}

.chat-context b {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-messages {
  min-height: 0;
  padding: 15px 14px;
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-color: rgba(75, 113, 140, 0.2) transparent;
  scrollbar-width: thin;
}

.chat-message {
  margin-bottom: 13px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.chat-message.user {
  justify-content: flex-end;
}

.message-avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
}

.message-bubble {
  max-width: 84%;
  padding: 10px 12px;
  border: 1px solid rgba(62, 91, 116, 0.08);
  border-radius: 5px 15px 15px;
  color: var(--ink-soft);
  background: rgba(235, 243, 247, 0.9);
  font-size: 12px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message.user .message-bubble {
  border: 0;
  border-radius: 15px 15px 5px;
  color: #fff;
  background: linear-gradient(145deg, #4192ca, #287ab7);
}

.chat-message.pending .message-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7a91a2;
  animation: typing 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.suggestion-row {
  padding: 7px 14px 9px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.suggestion-row::-webkit-scrollbar {
  display: none;
}

.suggestion-row button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(234, 244, 250, 0.72);
  cursor: pointer;
  font-size: 9px;
}

.suggestion-row button:hover {
  border-color: rgba(41, 122, 182, 0.25);
  background: var(--accent-soft);
}

.chat-form {
  margin: 0 13px;
  padding: 5px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(49, 90, 120, 0.08);
}

.chat-form:focus-within {
  border-color: rgba(41, 122, 182, 0.42);
  box-shadow: 0 9px 28px rgba(49, 90, 120, 0.12);
}

.chat-form textarea {
  width: 100%;
  min-height: 38px;
  max-height: 110px;
  padding: 9px 9px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.5;
}

.chat-form textarea::placeholder {
  color: #91a2af;
}

.chat-form button {
  height: 38px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  border-radius: 11px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.chat-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.chat-form button i {
  font-style: normal;
  font-size: 13px;
}

.assistant-note {
  margin: 7px 14px 11px;
  color: #8b9ca9;
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.site-footer {
  padding: 22px 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(70, 106, 132, 0.1);
  color: var(--muted);
  font-size: 10px;
}

.site-footer > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.site-footer b {
  color: var(--ink-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100% - 30px);
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(29, 55, 75, 0.9);
  box-shadow: 0 12px 36px rgba(28, 52, 70, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 11px;
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.account-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  color: var(--ink);
  background: rgba(250, 253, 255, 0.96);
  box-shadow: 0 32px 100px rgba(28, 65, 91, 0.3);
  backdrop-filter: blur(28px) saturate(135%);
}

.account-dialog::backdrop {
  background: rgba(29, 53, 72, 0.32);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(224, 237, 245, 0.72);
  cursor: pointer;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--ink);
  background: rgba(214, 231, 241, 0.9);
}

.auth-panel,
.settings-panel {
  padding: 32px;
}

.dialog-heading {
  padding-right: 42px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dialog-mark,
.settings-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, #5ca8da, #2679b6);
  box-shadow: 0 11px 28px rgba(38, 121, 182, 0.23);
  font-size: 20px;
  font-weight: 750;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.dialog-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.auth-tabs {
  margin-top: 26px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  background: rgba(222, 235, 243, 0.66);
}

.auth-tabs button {
  height: 38px;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.auth-tabs button[aria-selected="true"] {
  color: var(--accent-deep);
  background: #fff;
  box-shadow: 0 7px 20px rgba(51, 87, 113, 0.1);
}

.auth-form {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 450;
}

.auth-form input:focus {
  border-color: rgba(41, 122, 182, 0.42);
  box-shadow: 0 0 0 3px rgba(41, 122, 182, 0.09);
}

.primary-auth-button {
  height: 46px;
  margin-top: 3px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #4194cd, #2779b6);
  box-shadow: 0 10px 25px rgba(39, 121, 182, 0.22);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.primary-auth-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.secondary-auth-button {
  height: 44px;
  border: 1px solid rgba(41, 122, 182, 0.2);
  border-radius: 14px;
  color: var(--accent-deep);
  background: rgba(226, 240, 249, 0.72);
  cursor: pointer;
  font-size: 11px;
  font-weight: 720;
}

.secondary-auth-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.auth-error {
  margin: 13px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(200, 88, 88, 0.16);
  border-radius: 11px;
  color: #a84444;
  background: rgba(200, 88, 88, 0.07);
  font-size: 10px;
  line-height: 1.5;
}

.auth-footnote {
  margin: 16px 0 0;
  color: #8799a7;
  font-size: 9px;
  text-align: center;
}

.auth-footnote code,
.octo-install-note code {
  color: var(--accent-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.settings-heading {
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.settings-avatar {
  border-radius: 50%;
  font-size: 17px;
}

.account-detail-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}

.account-detail-grid > span {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(232, 242, 248, 0.45);
}

.account-detail-grid small,
.api-key-card small {
  color: var(--muted);
  font-size: 9px;
}

.account-detail-grid code,
.account-detail-grid b {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-card {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(41, 122, 182, 0.17);
  border-radius: 17px;
  background: rgba(219, 238, 249, 0.52);
}

.api-key-card > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.api-key-card > div > span {
  display: grid;
  gap: 4px;
}

.api-key-card b {
  font-size: 11px;
}

.api-key-card > div > button {
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 9px;
}

.api-key-card input {
  width: 100%;
  height: 41px;
  margin-top: 11px;
  padding: 0 11px;
  border: 1px solid rgba(41, 122, 182, 0.16);
  border-radius: 10px;
  outline: 0;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.8);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.copy-key-button {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.octo-install-note {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px dashed rgba(62, 91, 116, 0.2);
  border-radius: 14px;
}

.octo-install-note b {
  font-size: 11px;
}

.octo-install-note p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
  word-break: break-word;
}

.logout-button {
  width: 100%;
  height: 40px;
  margin-top: 16px;
  border-radius: 12px;
  color: var(--danger);
  background: rgba(200, 88, 88, 0.07);
  cursor: pointer;
  font-size: 10px;
  font-weight: 680;
}

.logout-button:hover {
  background: rgba(200, 88, 88, 0.12);
}

@media (max-width: 1040px) {
  .weather-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .current-weather {
    grid-template-columns: 125px 175px minmax(130px, 1fr);
  }

  .weather-symbol {
    font-size: 75px;
  }

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

@media (max-width: 850px) {
  .topbar-inner {
    grid-template-columns: 1fr minmax(240px, 1fr) auto;
  }

  .brand-copy small {
    display: none;
  }

  .weather-layout {
    grid-template-columns: 1fr;
  }

  .assistant-card {
    position: relative;
    top: auto;
    height: 640px;
    min-height: 0;
  }

  .current-weather {
    grid-template-columns: 150px 190px minmax(160px, 1fr);
  }
}

@media (max-width: 650px) {
  .topbar-inner,
  .favorite-ribbon-inner,
  .weather-layout,
  .site-footer {
    width: min(100% - 24px, 1240px);
  }

  .topbar-inner {
    min-height: 66px;
    grid-template-columns: auto 1fr auto;
    gap: 9px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-copy {
    display: none;
  }

  .city-search {
    height: 40px;
  }

  .city-search > button {
    display: none;
  }

  .search-icon {
    margin-left: 13px;
  }

  .unit-toggle button {
    width: 36px;
    height: 29px;
  }

  .account-button {
    width: 37px;
    padding: 4px;
  }

  .account-button > span:last-child {
    display: none;
  }

  .favorite-ribbon-inner {
    min-height: 40px;
  }

  .favorite-label {
    display: none;
  }

  .weather-layout {
    padding-top: 17px;
  }

  .current-card {
    padding: 20px 17px 17px;
    border-radius: 25px;
  }

  .current-heading p {
    margin-left: 0;
  }

  .virtual-badge {
    padding: 5px 7px;
    font-size: 8px;
  }

  .current-weather {
    min-height: 250px;
    grid-template-columns: 110px 1fr;
    gap: 8px;
  }

  .condition-visual {
    height: 120px;
  }

  .weather-symbol {
    font-size: 68px;
  }

  .temperature {
    font-size: 68px;
  }

  .weather-summary {
    max-width: none;
    padding: 12px 0 0;
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

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

  .hourly-section,
  .forecast-section {
    padding: 18px 14px;
    border-radius: 25px;
  }

  .forecast-day {
    grid-template-columns: 68px 30px 62px minmax(80px, 1fr);
    gap: 6px;
  }

  .forecast-rain {
    display: none;
  }

  .temperature-range {
    grid-template-columns: 24px minmax(36px, 1fr) 24px;
    gap: 4px;
  }

  .assistant-card {
    height: min(670px, calc(100vh - 30px));
    min-height: 570px;
    border-radius: 25px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .auth-panel,
  .settings-panel {
    padding: 25px 20px 22px;
  }

  .dialog-heading {
    align-items: flex-start;
  }

  .dialog-mark,
  .settings-avatar {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .settings-avatar {
    border-radius: 50%;
  }

  .account-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .unit-toggle button {
    width: 31px;
  }

  .city-search input {
    font-size: 12px;
  }

  .current-weather {
    grid-template-columns: 94px 1fr;
  }

  .temperature {
    font-size: 60px;
  }

  .weather-symbol {
    font-size: 58px;
  }

  .forecast-condition {
    display: none;
  }

  .forecast-day {
    grid-template-columns: 65px 30px minmax(90px, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .chat-messages {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
