* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

html {
  background: #171814;
  font-size: 16px;
}

body {
  background: #f3f1e9;
  color: #171814;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-kerning: normal;
  line-height: 1.5;
}

button,
select,
input {
  font: inherit;
}

button,
select {
  min-height: 44px;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.skip-link {
  background: #171814;
  color: #f3f1e9;
  left: 12px;
  padding: 12px 16px;
  position: absolute;
  top: -80px;
  z-index: 20;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.weather-app {
  background: #f3f1e9;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  position: relative;
}

.app-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 16px;
  position: relative;
  z-index: 8;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.header-actions {
  align-items: center;
  display: flex;
}

.connection-state {
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.settings-button,
.close-settings,
.retry-button {
  background: #f3f1e9;
  border: 1px solid #171814;
  border-radius: 999px;
  color: #171814;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 8px 16px;
}

.settings-button:hover,
.close-settings:hover,
.retry-button:hover {
  background: #e4dfd0;
}

button:focus,
select:focus,
input:focus,
a:focus {
  outline: 3px solid #d88935;
  outline-offset: 3px;
}

.weather-main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-height: 34rem;
}

.facts-panel {
  padding: 16px 24px 32px;
  position: relative;
  z-index: 4;
}

.status-banner {
  background: #fff3cf;
  border: 1px solid #a76819;
  border-radius: 12px;
  color: #4c3212;
  margin: 0 0 24px;
  padding: 12px 16px;
}

.status-banner strong,
.status-banner span {
  display: block;
}

.status-banner span {
  font-size: 0.875rem;
}

.location-kicker,
.settings-kicker,
.companion-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.location-kicker {
  color: #4e6250;
}

.location-name {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 4px 0;
}

.change-location-button {
  background: transparent;
  border: 0;
  color: #344650;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 4px 0 12px;
  text-align: left;
  text-decoration: underline;
}

.current-reading {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
}

.temperature {
  font-size: 5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  letter-spacing: -0.08em;
  line-height: 0.85;
  margin: 0 24px 0 -6px;
}

.current-copy {
  padding-bottom: 4px;
}

.condition-label {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.feels-like {
  color: #344650;
  font-size: 0.875rem;
  margin: 4px 0 0;
}

.details-list {
  display: flex;
  flex-wrap: wrap;
  margin: 24px 0 0;
}

.detail-pair {
  border-right: 1px solid #c9c2af;
  margin: 0 16px 12px 0;
  min-width: 64px;
  padding: 0 16px 0 0;
}

.detail-pair:last-child {
  border-right: 0;
}

.detail-pair dt {
  color: #5c5f57;
  font-size: 0.75rem;
}

.detail-pair dd {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin: 0;
}

.retry-button {
  margin-top: 12px;
}

.living-window {
  background: #e8d3ae;
  min-height: 20rem;
  overflow: hidden;
  position: relative;
}

.sky-layer {
  background: #ecd6aa;
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.celestial-body {
  background: #d88935;
  border-radius: 50%;
  box-shadow: 0 0 0 16px #e2a75f;
  height: 72px;
  position: absolute;
  right: 18%;
  top: 14%;
  width: 72px;
}

.cloud {
  background: #f3f1e9;
  border-radius: 48px;
  height: 32px;
  opacity: 0.82;
  position: absolute;
  width: 112px;
}

.cloud:before,
.cloud:after {
  background: inherit;
  border-radius: 50%;
  content: "";
  position: absolute;
}

.cloud:before {
  height: 52px;
  left: 18px;
  top: -24px;
  width: 52px;
}

.cloud:after {
  height: 42px;
  right: 14px;
  top: -16px;
  width: 42px;
}

.cloud-one {
  left: 13%;
  top: 20%;
}

.cloud-two {
  right: 6%;
  top: 34%;
  transform: scale(0.72);
}

.terrain {
  border-radius: 50% 50% 0 0;
  bottom: -28%;
  position: absolute;
  transform: rotate(-5deg);
}

.terrain-far {
  background: #b6753d;
  height: 66%;
  left: -8%;
  width: 78%;
}

.terrain-middle {
  background: #7c5436;
  height: 48%;
  right: -18%;
  transform: rotate(7deg);
  width: 74%;
}

.terrain-near {
  background: #4e6250;
  bottom: -38%;
  height: 64%;
  left: 14%;
  transform: rotate(1deg);
  width: 96%;
}

.forest-shapes {
  bottom: 12%;
  display: none;
  left: 3%;
  position: absolute;
  right: 3%;
}

.forest-shapes i {
  border-bottom: 120px solid #314234;
  border-left: 34px solid transparent;
  border-right: 34px solid transparent;
  display: inline-block;
  margin-right: -14px;
  transform: scale(0.75);
  transform-origin: bottom;
}

.forest-shapes i:nth-child(2),
.forest-shapes i:nth-child(4) {
  border-bottom-color: #4e6250;
  transform: scale(1);
}

.forest-shapes i:nth-child(3) {
  transform: scale(0.58);
}

.world-forest .sky-layer {
  background: #dce1cf;
}

.world-forest .terrain-far {
  background: #71846a;
}

.world-forest .terrain-middle {
  background: #4e6250;
}

.world-forest .terrain-near {
  background: #293c30;
}

.world-forest .forest-shapes {
  display: block;
}

.world-forest .celestial-body {
  background: #e0a243;
}

.rain-layer {
  bottom: 18%;
  display: none;
  left: 0;
  opacity: 0.66;
  position: absolute;
  right: 0;
  top: 0;
}

.rain-layer span {
  background: #d7e5e8;
  height: 58px;
  left: 8%;
  position: absolute;
  top: 9%;
  transform: rotate(13deg);
  width: 2px;
}

.rain-layer span:nth-child(2) { left: 16%; top: 30%; }
.rain-layer span:nth-child(3) { left: 25%; top: 14%; }
.rain-layer span:nth-child(4) { left: 34%; top: 39%; }
.rain-layer span:nth-child(5) { left: 43%; top: 19%; }
.rain-layer span:nth-child(6) { left: 52%; top: 45%; }
.rain-layer span:nth-child(7) { left: 61%; top: 12%; }
.rain-layer span:nth-child(8) { left: 69%; top: 34%; }
.rain-layer span:nth-child(9) { left: 76%; top: 18%; }
.rain-layer span:nth-child(10) { left: 84%; top: 42%; }
.rain-layer span:nth-child(11) { left: 91%; top: 7%; }
.rain-layer span:nth-child(12) { left: 96%; top: 29%; }

.condition-rain .rain-layer {
  display: block;
}

.condition-rain .sky-layer {
  background: #657680;
}

.condition-rain .cloud {
  background: #344650;
  opacity: 0.9;
}

.condition-rain .celestial-body {
  background: #bac1bd;
  box-shadow: none;
  opacity: 0.35;
}

.companion-stage {
  bottom: 8%;
  min-height: 230px;
  position: absolute;
  right: 4%;
  width: 260px;
  z-index: 3;
}

.companion-label {
  background: #171814;
  border-radius: 4px;
  color: #f3f1e9;
  padding: 4px 8px;
  position: absolute;
  right: 0;
  text-align: right;
  top: 0;
  z-index: 2;
}

.label-bear {
  display: none;
}

.world-forest .label-gugo {
  display: none;
}

.world-forest .label-bear {
  display: inline;
}

.companion {
  bottom: 12px;
  height: 218px;
  position: absolute;
  right: 0;
  width: 154px;
}

.companion-character {
  bottom: 0;
  display: block;
  height: 100%;
  max-width: 100%;
  position: absolute;
  right: 0;
  width: auto;
}

.companion-bear {
  display: none;
}

.world-forest .companion-gugo {
  display: none;
}

.world-forest .companion-bear {
  display: block;
}

.leaf {
  background: #d88935;
  border-radius: 90% 10% 90% 10%;
  bottom: 34px;
  height: 18px;
  position: absolute;
  right: 148px;
  transform: rotate(24deg);
  width: 34px;
}

.weather-quip {
  background: #f3f1e9;
  border: 1px solid #171814;
  border-radius: 12px;
  bottom: 86px;
  color: #171814;
  font-size: 0.875rem;
  left: -32px;
  margin: 0;
  max-width: 158px;
  padding: 12px;
  position: absolute;
}

.window-sill {
  background: #563c28;
  bottom: 0;
  height: 11%;
  left: 0;
  position: absolute;
  right: 0;
}

.forecast-sill {
  background: #412f22;
  color: #f3f1e9;
  padding: 16px;
  position: relative;
}

.forecast-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 auto;
  max-width: 76rem;
  padding: 0;
}

.forecast-list li {
  align-items: center;
  border-right: 1px solid #7c644f;
  display: flex;
  flex: 1 1 50%;
  min-height: 68px;
  padding: 8px 12px;
}

.forecast-list li:nth-child(2),
.forecast-list li:nth-child(4) {
  border-right: 0;
}

.forecast-time {
  font-size: 0.875rem;
  font-weight: 700;
  width: 42px;
}

.forecast-symbol {
  color: #e4a143;
  display: none;
  font-size: 1.25rem;
  margin-right: 8px;
}

.forecast-condition {
  display: block;
  flex: 1 1 auto;
  font-size: 0.875rem;
  line-height: 1.2;
  margin-left: 8px;
}

.forecast-temperature {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.app-footer {
  align-items: center;
  background: #171814;
  color: #f3f1e9;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 16px;
}

.app-footer a {
  color: #f0c87c;
}

.settings-panel {
  background: #f3f1e9;
  border: 1px solid #171814;
  box-shadow: 0 16px 48px #171814;
  color: #171814;
  max-width: 420px;
  max-height: calc(100% - 84px);
  overflow-y: auto;
  padding: 24px;
  position: absolute;
  right: 12px;
  top: 72px;
  width: calc(100% - 24px);
  -webkit-overflow-scrolling: touch;
  z-index: 12;
}

.settings-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.settings-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-heading h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 4px 16px 0 0;
}

.close-settings {
  flex: 0 0 auto;
}

.settings-panel label:not(.check-setting) {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-top: 16px;
}

.settings-panel select,
.settings-panel input[type="search"] {
  background: #ffffff;
  border: 1px solid #74766e;
  border-radius: 8px;
  color: #171814;
  display: block;
  margin-top: 4px;
  padding: 8px 12px;
  width: 100%;
}

.location-search-form {
  border-bottom: 1px solid #c9c2af;
  margin-bottom: 24px;
  padding-bottom: 24px;
}

.location-search-form > label {
  margin-top: 0 !important;
}

.location-search-row {
  align-items: stretch;
  display: flex;
  margin-top: 4px;
}

.settings-panel .location-search-row input {
  border-radius: 8px 0 0 8px;
  flex: 1 1 auto;
  margin-top: 0;
  min-height: 44px;
  min-width: 0;
}

.location-search-row button {
  background: #171814;
  border: 1px solid #171814;
  border-radius: 0 8px 8px 0;
  color: #f3f1e9;
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 8px 12px;
}

.location-search-status {
  color: #50534c;
  font-size: 0.75rem;
  margin: 8px 0 0;
  min-height: 18px;
}

.location-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.location-results li + li {
  margin-top: 8px;
}

.location-result-button {
  background: #ffffff;
  border: 1px solid #74766e;
  border-radius: 8px;
  color: #171814;
  display: block;
  min-height: 44px;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
}

.location-result-button:hover {
  background: #e4dfd0;
}

.check-setting {
  align-items: center;
  display: flex;
  font-weight: 600;
  min-height: 44px;
  margin-top: 12px;
}

.check-setting input {
  height: 22px;
  margin: 0 12px 0 0;
  width: 22px;
}

.settings-note {
  color: #50534c;
  font-size: 0.75rem;
  margin: 24px 0 0;
}

.detail-simple .extra-detail,
.humor-off .weather-quip {
  display: none;
}

.theme-purple {
  background: #24162f;
  color: #f5edf7;
}

.theme-purple .app-header,
.theme-purple .facts-panel {
  background: #24162f;
}

.theme-purple .location-kicker,
.theme-purple .feels-like,
.theme-purple .connection-state,
.theme-purple .detail-pair dt {
  color: #d9bfdc;
}

.theme-purple .detail-pair {
  border-color: #6e4b77;
}

.theme-purple .settings-button {
  background: #392047;
  border-color: #d9bfdc;
  color: #f5edf7;
}

.theme-purple .change-location-button {
  color: #d9bfdc;
}

.theme-purple .living-window,
.theme-purple .sky-layer {
  background: #392047;
}

.theme-purple .celestial-body {
  background: #f0d8a8;
  box-shadow: 0 0 0 16px #583660;
}

.theme-purple .cloud {
  background: #6e4b77;
}

.theme-purple .terrain-far {
  background: #583660;
}

.theme-purple .terrain-middle {
  background: #42254f;
}

.theme-purple .terrain-near {
  background: #2d1a38;
}

.theme-purple .forecast-sill {
  background: #2d1a38;
}

.theme-purple .forecast-list li {
  border-color: #6e4b77;
}

.theme-purple .window-sill,
.theme-purple .app-footer {
  background: #180d20;
}

.theme-purple .forecast-symbol,
.theme-purple .app-footer a {
  color: #f0d8a8;
}

.phase-night:not(.theme-light) {
  background: #24162f;
  color: #f5edf7;
}

.is-loading .facts-panel,
.is-loading .living-window,
.is-loading .forecast-sill {
  opacity: 0.72;
}

.no-script {
  background: #fff3cf;
  border: 1px solid #a76819;
  margin: 0;
  padding: 12px 16px;
}

.motion-on .cloud-one {
  animation: cloud-drift 18s ease-in-out infinite alternate;
}

.motion-on.condition-rain .rain-layer {
  animation: rain-shift 1.1s linear infinite;
}

.motion-on .leaf {
  animation: leaf-breathe 4s ease-in-out infinite alternate;
}

.motion-on .companion-character {
  animation: companion-breathe 5s ease-in-out infinite alternate;
}

@keyframes cloud-drift {
  from { transform: translateX(-8px); }
  to { transform: translateX(18px); }
}

@keyframes rain-shift {
  from { transform: translateY(-18px); }
  to { transform: translateY(18px); }
}

@keyframes leaf-breathe {
  from { transform: rotate(18deg) translateY(0); }
  to { transform: rotate(30deg) translateY(-8px); }
}

@keyframes companion-breathe {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}

@media (max-width: 30rem) {
  .companion-stage {
    right: 1%;
    width: 240px;
  }

  .companion {
    height: 198px;
    width: 140px;
  }

  .weather-quip {
    left: -18px;
    max-width: 142px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-app *,
  .weather-app *:before,
  .weather-app *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 48rem) {
  .app-header {
    padding: 16px 24px;
  }

  .connection-state {
    clip: auto;
    color: #4e6250;
    font-size: 0.75rem;
    height: auto;
    margin: 0 12px 0 0;
    max-width: 18rem;
    overflow: visible;
    position: static;
    text-align: right;
    width: auto;
  }

  .weather-main {
    flex-direction: row;
    min-height: 38rem;
  }

  .facts-panel {
    display: flex;
    flex: 0 0 38%;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
  }

  .living-window {
    flex: 1 1 62%;
    min-height: 38rem;
  }

  .temperature {
    font-size: 6rem;
  }

  .forecast-list {
    flex-wrap: nowrap;
  }

  .forecast-list li {
    flex-basis: 25%;
  }

  .forecast-list li:nth-child(2) {
    border-right: 1px solid #7c644f;
  }

  .theme-purple .forecast-list li:nth-child(2) {
    border-color: #6e4b77;
  }

  .forecast-condition {
    margin-left: 0;
  }

  .forecast-symbol {
    display: inline;
  }
}

@media (min-width: 48rem) and (max-height: 35rem) {
  .app-header {
    min-height: 52px;
    padding: 4px 16px;
  }

  .connection-state {
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }

  .weather-main,
  .living-window {
    min-height: 17rem;
  }

  .facts-panel {
    padding: 12px 24px;
  }

  .location-name {
    font-size: 1.125rem;
  }

  .change-location-button {
    padding-bottom: 4px;
  }

  .temperature {
    font-size: 4rem;
    margin-right: 16px;
  }

  .condition-label {
    font-size: 1rem;
  }

  .details-list {
    margin-top: 12px;
  }

  .detail-pair {
    margin: 0 10px 4px 0;
    min-width: 52px;
    padding-right: 10px;
  }

  .detail-pair dd {
    font-size: 1rem;
  }

  .celestial-body {
    box-shadow: 0 0 0 10px #e2a75f;
    height: 48px;
    width: 48px;
  }

  .theme-purple .celestial-body {
    box-shadow: 0 0 0 10px #583660;
  }

  .companion-stage {
    bottom: 2%;
    min-height: 190px;
    width: 230px;
  }

  .companion-label {
    font-size: 0.625rem;
  }

  .companion {
    bottom: 8px;
    height: 180px;
    width: 127px;
  }

  .leaf {
    bottom: 26px;
    right: 122px;
  }

  .weather-quip {
    bottom: 66px;
    font-size: 0.75rem;
    left: -12px;
    max-width: 132px;
    padding: 8px;
  }

  .forecast-sill {
    padding: 4px 16px;
  }

  .forecast-list li {
    min-height: 54px;
    padding: 4px 8px;
  }

  .forecast-time,
  .forecast-condition {
    font-size: 0.75rem;
  }

  .forecast-temperature {
    font-size: 1rem;
  }

  .app-footer {
    font-size: 0.6875rem;
    min-height: 36px;
    padding: 6px 16px;
  }

  .settings-panel {
    max-height: calc(100% - 60px);
    padding: 16px;
    top: 56px;
  }
}

@media (min-width: 64rem) {
  .app-header {
    min-height: 76px;
    padding-left: 48px;
    padding-right: 48px;
  }

  .facts-panel {
    flex-basis: 34%;
    padding: 48px;
  }

  .living-window {
    flex-basis: 66%;
  }

  .companion-stage {
    min-height: 320px;
    width: 370px;
  }

  .companion {
    height: 300px;
    width: 210px;
  }

  .leaf {
    right: 202px;
  }

  .weather-quip {
    bottom: 122px;
    left: -34px;
    max-width: 176px;
  }

  .temperature {
    font-size: 7rem;
  }

  .forecast-sill {
    padding-left: 48px;
    padding-right: 48px;
  }
}
