.trawoa-pwa[hidden],
.trawoa-pwa__help[hidden],
.trawoa-today[hidden] {
  display: none !important;
}

@media (max-width: 780px) {
  .trawoa-pwa {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
    z-index: 99990;
    display: flex;
    align-items: center;
    color: #f3f0e9;
    background: rgba(22, 62, 53, .94);
    border: 1px solid rgba(243, 240, 233, .2);
    box-shadow: 0 16px 42px rgba(12, 31, 27, .22);
  }

  .trawoa-pwa__install,
  .trawoa-pwa__dismiss,
  .trawoa-pwa__help button {
    border: 0;
    background: transparent;
    color: inherit;
    font: 700 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    cursor: pointer;
  }

  .trawoa-pwa__install {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
  }

  .trawoa-pwa__icon {
    font-size: 18px;
    font-weight: 400;
    transform: translateY(-1px);
  }

  .trawoa-pwa__dismiss {
    width: 38px;
    height: 44px;
    border-left: 1px solid rgba(243, 240, 233, .16);
    font-size: 18px;
    font-weight: 400;
  }

  .trawoa-pwa__help {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(310px, calc(100vw - 28px));
    padding: 18px;
    color: #263431;
    background: #f7f4ed;
    border: 1px solid rgba(38, 52, 49, .14);
    box-shadow: 0 18px 48px rgba(12, 31, 27, .2);
  }

  .trawoa-pwa__help strong {
    display: block;
    font: 600 22px/1.05 ui-serif, "New York", Georgia, serif;
  }

  .trawoa-pwa__help p {
    margin: 10px 0 16px;
    color: #5b6864;
    font-size: 14px;
    line-height: 1.55;
  }

  .trawoa-pwa__help button {
    min-height: 40px;
    padding: 0 14px;
    color: #f3f0e9;
    background: #163e35;
  }
}

.trawoa-today-launcher,
.trawoa-today-route {
  position: fixed;
  z-index: 99980;
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(251, 250, 247, .18);
  border-radius: 3px;
  color: #fbfaf7;
  background: #18302b;
  box-shadow: 0 14px 34px rgba(16, 24, 23, .2);
  font: 700 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.trawoa-today-launcher {
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
}

.trawoa-today-launcher span,
.trawoa-today-route span {
  color: #9ebaaa;
  font-size: 9px;
  text-transform: uppercase;
}

.trawoa-today-route {
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
}

.trawoa-today {
  width: min(820px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid #d8d6cf;
  border-radius: 4px;
  color: #35423e;
  background: #fbfaf7;
  box-shadow: 0 28px 80px rgba(16, 24, 23, .28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.trawoa-today::backdrop {
  background: rgba(16, 24, 23, .72);
}

.trawoa-today__top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 26px 28px 20px;
  border-bottom: 1px solid #d8d6cf;
  background: #fbfaf7;
}

.trawoa-today__top span,
.trawoa-today label > span {
  display: block;
  margin-bottom: 7px;
  color: #667b8d;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.trawoa-today h2 {
  margin: 0;
  color: #101817;
  font: 600 48px/1 ui-serif, "New York", Georgia, serif;
}

.trawoa-today__top button {
  width: 44px;
  height: 44px;
  border: 1px solid #d8d6cf;
  border-radius: 2px;
  color: #101817;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.trawoa-today__offline {
  padding: 10px 28px;
  color: #52635e;
  background: #e6ece8;
  font-size: 11px;
}

.trawoa-today form {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.trawoa-today__lead,
.trawoa-today__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.trawoa-today input,
.trawoa-today textarea {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid #9ba6a1;
  border-radius: 0;
  color: #101817;
  background: transparent;
  font: 500 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.trawoa-today input {
  min-height: 45px;
}

.trawoa-today textarea {
  padding: 11px 0;
  resize: vertical;
}

.trawoa-today fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 18px;
  border: 1px solid #d8d6cf;
  border-radius: 3px;
}

.trawoa-today legend {
  padding: 0 6px;
  color: #18302b;
  font: 700 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.trawoa-today fieldset a {
  margin-top: 6px;
  color: #526b63;
  font-size: 11px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.trawoa-today [data-trawoa-today-weather-refresh] {
  min-height: 38px;
  margin-top: 3px;
  border: 1px solid #526b63;
  border-radius: 3px;
  background: transparent;
  color: #29453d;
  font: 700 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.trawoa-today [data-trawoa-today-weather-refresh]:disabled {
  cursor: wait;
  opacity: .55;
}

.trawoa-today__weather-source {
  margin: 0;
  color: #786f66;
  font-size: 10px;
  line-height: 1.5;
}

.trawoa-today__weather-source a {
  margin: 0!important;
}

.trawoa-today__phrase {
  padding: 22px;
  border-left: 3px solid #819d92;
  background: #f3f0e9;
}

.trawoa-today__phrase > span {
  color: #667b8d;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.trawoa-today__phrase strong {
  display: block;
  margin-top: 12px;
  color: #101817;
  font: 600 23px/1.3 ui-serif, "New York", Georgia, serif;
}

.trawoa-today__phrase small {
  display: block;
  margin-top: 5px;
  color: #66736e;
}

.trawoa-today__phrase button,
.trawoa-today__actions button {
  min-height: 44px;
  margin-top: 16px;
  padding: 0 15px;
  border: 1px solid #18302b;
  border-radius: 2px;
  color: #fbfaf7;
  background: #18302b;
  font: 700 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.trawoa-today__privacy,
.trawoa-today__status {
  margin: 0;
  color: #66736e;
  font-size: 11px;
  line-height: 1.55;
}

.trawoa-today__actions {
  display: flex;
  gap: 8px;
}

.trawoa-today__actions button {
  margin: 0;
}

.trawoa-today__actions button + button {
  border-color: #d8d6cf;
  color: #35423e;
  background: transparent;
}

@media (display-mode: standalone) {
  .trawoa-today-launcher {
    display: inline-flex;
  }
}

@media (max-width: 780px) {
  .trawoa-today-route {
    display: inline-flex;
  }

  .trawoa-today {
    width: 100%;
    max-width: none;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 6px 6px 0 0;
  }

  .trawoa-today__lead,
  .trawoa-today__grid {
    grid-template-columns: 1fr;
  }

  .trawoa-today__top,
  .trawoa-today form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .trawoa-today__offline {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trawoa-pwa,
  .trawoa-pwa * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
