:root {
  color-scheme: light;
  --ink: #080808;
  --muted: #666;
  --paper: #f5f5f3;
  --soft: #ececea;
  --glass: rgba(255, 255, 255, .56);
  --line: rgba(10, 10, 10, .08);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--paper);
  overflow: hidden;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fafafa 0%, #f1f1ef 48%, #f7f7f6 100%);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  background: transparent;
}

.scene {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}

.ambient {
  display: none;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: 42%;
  height: 70%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  transform: rotate(38deg);
}

.ambient-left {
  left: -7vmin;
  top: 16vmin;
  transform: rotate(-28deg);
}

.ambient-right {
  right: -5vmin;
  bottom: 7vmin;
  transform: rotate(28deg);
}

.side-poem {
  display: none;
}

.side-poem span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1.55;
}

.side-poem b {
  display: block;
  width: 1px;
  height: 138px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .5), transparent);
}

.side-poem i,
.brand-note span {
  font-style: normal;
}

.phone {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  overscroll-behavior: none;
}

.screen {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  padding:
    max(22px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  border-radius: 0;
  --screen-default-wallpaper: linear-gradient(180deg, #fbfbfa 0%, #eeeeec 54%, #f8f8f7 100%);
  background: var(--screen-wallpaper, var(--screen-default-wallpaper));
  background-position: center;
  background-size: cover;
  box-shadow: none;
}

.screen::before,
.screen::after {
  content: none;
  position: absolute;
  color: #111;
  pointer-events: none;
}

.screen::before {
  left: 34px;
  top: 236px;
  font-size: 34px;
}

.screen::after {
  right: 48px;
  top: 136px;
  font-size: 14px;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding-inline: 2px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-left {
  font-weight: 650;
}

.status-right {
  color: #111;
  font-weight: 650;
}

.signal {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 15px;
}

.signal i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--ink);
}

.signal i:nth-child(1) { height: 5px; opacity: .46; }
.signal i:nth-child(2) { height: 8px; opacity: .62; }
.signal i:nth-child(3) { height: 11px; opacity: .78; }
.signal i:nth-child(4) { height: 14px; }

.wifi-icon {
  width: 22px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.wifi-icon circle {
  fill: currentColor;
  stroke: none;
}

.battery {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 55px;
  font-size: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.battery-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 24px;
  height: 12px;
  padding: 2px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.battery-shell::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
}

#batteryFill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: width .2s ease;
}

.battery.unavailable #batteryLevel {
  color: #777;
}

.desktop-pager {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.desktop-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  transition: transform .28s cubic-bezier(.2, .84, .26, 1);
  will-change: transform;
}

.desktop-page {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  min-height: 0;
  overflow: hidden;
}

.desktop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  align-content: start;
  align-items: start;
  gap: clamp(18px, 3.2vh, 30px) 16px;
  height: 100%;
  min-height: 0;
  padding:
    clamp(22px, 5vh, 42px)
    clamp(6px, 3vw, 18px)
    12px;
  overflow: hidden;
}

.weather-dashboard-card {
  --weather-widget-ink: #111;
  --weather-widget-muted: rgba(17, 17, 17, .62);
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  gap: 13px;
  justify-self: center;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  min-height: 204px;
  padding: 13px;
  overflow: hidden;
  color: var(--weather-widget-ink);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .58);
  box-shadow:
    0 14px 34px rgba(28, 31, 35, .10),
    inset 1px 1px 0 rgba(255, 255, 255, .78),
    inset -1px -1px 0 rgba(29, 34, 39, .055);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}

.weather-dashboard-top {
  display: grid;
  grid-template-columns: minmax(112px, .82fr) minmax(0, 1.4fr);
  gap: 13px;
  min-width: 0;
  min-height: 106px;
}

.weather-dashboard-summary {
  display: flex;
  min-width: 0;
  padding: 2px 0 1px 2px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.weather-location-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  min-height: 25px;
  color: var(--weather-widget-muted);
  cursor: pointer;
}

.weather-location-button span {
  min-width: 0;
  overflow: hidden;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-location-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather-location-button:focus-visible,
.weather-photo-button:focus-visible {
  outline: 2px solid rgba(17, 17, 17, .42);
  outline-offset: 2px;
}

#heroTime {
  display: block;
  max-width: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  font-weight: 360;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

#dateLine {
  margin: 0;
  color: var(--weather-widget-muted);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.weather-photo-button {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 106px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(28, 31, 35, .08);
  cursor: pointer;
}

.weather-photo-button img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 106px;
  object-fit: cover;
  transition: transform .24s ease, opacity .18s ease;
}

.weather-photo-button:hover img,
.weather-photo-button:focus-visible img {
  transform: scale(1.018);
}

.weather-photo-button[aria-busy="true"] img {
  opacity: .62;
}

.weather-photo-edit-icon {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 6px;
  background: rgba(15, 17, 20, .46);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.weather-photo-edit-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  min-height: 58px;
  padding-top: 10px;
  border-top: 1px solid rgba(17, 17, 17, .10);
}

.weather-forecast-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 0 8px;
}

.weather-forecast-item + .weather-forecast-item {
  border-left: 1px solid rgba(17, 17, 17, .08);
}

.weather-forecast-condition,
.weather-forecast-values {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.weather-forecast-condition {
  gap: 4px;
  color: var(--weather-widget-ink);
}

.weather-forecast-condition > span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-forecast-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  overflow: visible;
  color: rgba(20, 23, 27, .82);
}

.weather-forecast-values {
  gap: 5px;
  color: var(--weather-widget-muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.weather-forecast-values strong {
  color: var(--weather-widget-ink);
  font-size: 12px;
  font-weight: 560;
}

.weather-dashboard-card[data-weather-state="loading"] .weather-forecast {
  opacity: .62;
}

.weather-dashboard-card[data-weather-state="error"] .weather-forecast-condition,
.weather-dashboard-card[data-weather-state="error"] .weather-forecast-values strong {
  color: #9e2f2f;
}

.weather-widget-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.weather-icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.map-weather-location-button {
  margin-top: 4px;
  max-width: 100%;
  padding: 2px 18px 2px 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) right 8px center / 5px 5px no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) right 4px center / 5px 5px no-repeat;
}

.map-weather-location-button:focus-visible {
  outline: 1px solid rgba(0, 0, 0, .34);
  outline-offset: 3px;
}
.weather-picker-dialog {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
  background: rgba(245, 245, 243, .56);
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.weather-picker-dialog.open {
  opacity: 1;
  pointer-events: auto;
}

.weather-picker-card {
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  max-height: min(88dvh, 740px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(250, 250, 249, .97);
  box-shadow:
    8px 10px 28px rgba(0, 0, 0, .08),
    inset 1px 1px 0 rgba(255, 255, 255, .86),
    inset -1px -1px 0 rgba(0, 0, 0, .065);
  transform: translateY(16px) scale(.98);
  transition: none;
}

.weather-picker-dialog.open .weather-picker-card {
  transform: translateY(0) scale(1);
}

.weather-picker-card header {
  display: grid;
  gap: 4px;
}

.weather-picker-card h2,
.weather-picker-card p {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.weather-picker-card h2 {
  color: #111;
  font-size: 17px;
  font-weight: 620;
  line-height: 1.25;
}

.weather-picker-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.weather-picker-field {
  display: grid;
  gap: 6px;
}

.weather-picker-field span {
  color: #111;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.weather-picker-field input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  color: #111;
  font: inherit;
  background: rgba(255, 255, 255, .92);
}

.weather-picker-field input:focus {
  outline: 0;
  border-color: rgba(0, 0, 0, .16);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.weather-picker-results {
  display: grid;
  gap: 8px;
  max-height: 42dvh;
  overflow: auto;
}

.weather-picker-result {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  text-align: left;
  cursor: pointer;
}

.weather-picker-result strong {
  font-size: 14px;
  font-weight: 620;
  line-height: 1.3;
}

.weather-picker-result small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.weather-picker-result:focus-visible,
.weather-picker-result:hover {
  border-color: rgba(0, 0, 0, .16);
}

.weather-picker-status {
  margin: 0;
  min-height: 1.4em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.weather-picker-status[data-tone="error"] {
  color: #9e2f2f;
}

.weather-picker-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.weather-picker-actions button {
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
  cursor: pointer;
}

.widget-photo-dialog {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
  background: rgba(245, 245, 243, .58);
  opacity: 0;
  pointer-events: none;
  transition: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.widget-photo-dialog.open {
  opacity: 1;
  pointer-events: auto;
}

.widget-photo-card {
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  max-height: min(90dvh, 720px);
  padding: 16px;
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(252, 252, 251, .94);
  box-shadow:
    8px 12px 30px rgba(0, 0, 0, .10),
    inset 1px 1px 0 rgba(255, 255, 255, .88);
  transform: translateY(14px) scale(.98);
}

.widget-photo-dialog.open .widget-photo-card {
  transform: translateY(0) scale(1);
}

.widget-photo-card header,
.widget-photo-card header > div {
  display: grid;
  gap: 4px;
}

.widget-photo-card h2,
.widget-photo-card p {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.widget-photo-card h2 {
  color: #111;
  font-size: 17px;
  font-weight: 620;
  line-height: 1.25;
}

.widget-photo-card header p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.widget-photo-preview {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 6px;
  background: #e8e8e6;
}

.widget-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-photo-file-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 9px 12px;
  color: #111;
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  cursor: pointer;
}

.widget-photo-file-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.widget-photo-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.widget-photo-file-button:focus-within {
  outline: 2px solid rgba(0, 0, 0, .28);
  outline-offset: 2px;
}

.widget-photo-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.widget-photo-divider::before,
.widget-photo-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(0, 0, 0, .08);
}

.widget-photo-field {
  display: grid;
  gap: 6px;
  color: #111;
  font-size: 13px;
  font-weight: 600;
}

.widget-photo-field input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  color: #111;
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, .90);
  font: inherit;
  font-weight: 400;
}

.widget-photo-field input:focus {
  border-color: rgba(0, 0, 0, .20);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
}

.widget-photo-status {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.widget-photo-status[data-tone="error"] {
  color: #9e2f2f;
}

.widget-photo-status[data-tone="success"] {
  color: #2f6c4b;
}

.widget-photo-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.widget-photo-actions button {
  min-height: 38px;
  padding: 8px 12px;
  color: #111;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .80);
  cursor: pointer;
}

.widget-photo-actions button.primary {
  color: #fff;
  border-color: #111;
  background: #111;
}

.widget-photo-actions button:disabled,
.widget-photo-file-button[aria-disabled="true"] {
  cursor: wait;
  opacity: .54;
}

html.night-mode .weather-dashboard-card {
  --weather-widget-ink: rgba(250, 249, 246, .96);
  --weather-widget-muted: rgba(250, 249, 246, .64);
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .12);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, .28),
    inset 1px 1px 0 rgba(255, 255, 255, .10),
    inset -1px -1px 0 rgba(0, 0, 0, .16);
}

html.night-mode .weather-dashboard-card .weather-forecast {
  border-top-color: rgba(255, 255, 255, .13);
}

html.night-mode .weather-dashboard-card .weather-forecast-item + .weather-forecast-item {
  border-left-color: rgba(255, 255, 255, .10);
}

html.night-mode .weather-dashboard-card .weather-forecast-icon {
  color: rgba(250, 249, 246, .88);
}

html.night-mode .weather-dashboard-card .weather-location-button:focus-visible,
html.night-mode .weather-dashboard-card .weather-photo-button:focus-visible {
  outline-color: rgba(255, 255, 255, .62);
}

html.night-mode .widget-photo-dialog {
  background: rgba(10, 10, 10, .68);
}

html.night-mode .widget-photo-card {
  color: #f4f1eb;
  border-color: rgba(255, 255, 255, .11);
  background: rgba(23, 22, 20, .94);
  box-shadow:
    8px 12px 30px rgba(0, 0, 0, .30),
    inset 1px 1px 0 rgba(255, 255, 255, .07);
}

html.night-mode .widget-photo-card h2,
html.night-mode .widget-photo-field,
html.night-mode .widget-photo-file-button,
html.night-mode .widget-photo-actions button {
  color: #f4f1eb;
}

html.night-mode .widget-photo-card header p,
html.night-mode .widget-photo-divider,
html.night-mode .widget-photo-status {
  color: rgba(244, 241, 235, .58);
}

html.night-mode .widget-photo-file-button,
html.night-mode .widget-photo-field input,
html.night-mode .widget-photo-actions button {
  color: #f4f1eb;
  border-color: rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .07);
}

html.night-mode .widget-photo-actions button.primary {
  color: #111;
  border-color: #f4f1eb;
  background: #f4f1eb;
}

html.night-mode .widget-photo-divider::before,
html.night-mode .widget-photo-divider::after {
  background: rgba(255, 255, 255, .10);
}
html.night-mode .weather-location-button,
html.night-mode .map-weather-location-button {
  color: rgba(241, 238, 231, .72);
}

html.night-mode .weather-picker-dialog {
  background: rgba(17, 16, 15, .64);
}

html.night-mode .weather-picker-card {
  border-color: rgba(255, 255, 255, .10);
  background: rgba(22, 21, 19, .96);
  box-shadow:
    8px 10px 28px rgba(0, 0, 0, .24),
    inset 1px 1px 0 rgba(255, 255, 255, .08),
    inset -1px -1px 0 rgba(0, 0, 0, .18);
}

html.night-mode .weather-picker-card h2,
html.night-mode .weather-picker-field span,
html.night-mode .weather-picker-actions button {
  color: var(--ink);
}

html.night-mode .weather-picker-card p,
html.night-mode .weather-picker-status,
html.night-mode .weather-picker-result small {
  color: rgba(241, 238, 231, .58);
}

html.night-mode .weather-picker-field input,
html.night-mode .weather-picker-result,
html.night-mode .weather-picker-actions button {
  border-color: rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .07);
}

html.night-mode .weather-picker-result:hover,
html.night-mode .weather-picker-result:focus-visible {
  border-color: rgba(241, 238, 231, .36);
}

.weather-dashboard-card,
.app-button,
.dock-button {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.weather-dashboard-card,
.app-button,
.dock-button {
  touch-action: none;
}

.app-button,
.dock-button {
  display: grid;
  justify-items: center;
  gap: 11px;
  cursor: pointer;
  outline: none;
  touch-action: none;
}

.app-icon {
  --app-icon-border-size: 1.5px;
  --app-icon-border-opacity: .86;
  --app-icon-border-gradient:
    linear-gradient(142deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .06) 42%, rgba(0, 0, 0, .07) 72%, rgba(0, 0, 0, .15) 100%),
    radial-gradient(ellipse at 86% 88%, rgba(0, 0, 0, .12), transparent 46%);
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  border-radius: 20px;
  border: 0;
  padding: var(--app-icon-border-size);
  background: rgba(255, 255, 255, .045);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .025),
    inset -1px -1px 0 rgba(0, 0, 0, .045);
  -webkit-backdrop-filter: blur(18px) saturate(128%);
  backdrop-filter: blur(18px) saturate(128%);
  isolation: isolate;
  overflow: hidden;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.app-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: var(--app-icon-border-size);
  border-radius: inherit;
  background: var(--app-icon-border-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: var(--app-icon-border-opacity);
  pointer-events: none;
}

.app-icon img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: calc(20px - var(--app-icon-border-size));
}

.app-button span:last-child,
.dock-button span {
  max-width: 84px;
  min-height: 21px;
  overflow-wrap: anywhere;
  text-align: center;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.3;
}

.dock-button span {
  font-size: 11px;
}

.app-button:is(:hover, :focus-visible) .app-icon,
.dock-button:is(:hover, :focus-visible) .dock-icon {
  transform: none;
}

.app-button:active .app-icon,
.dock-button:active .dock-icon {
  transform: translateY(2px) scale(.94);
}

.app-button.active .app-icon {
  --app-icon-border-opacity: .90;
  background: rgba(255, 255, 255, .055);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .028),
    inset -1px -1px 0 rgba(0, 0, 0, .045);
}

.app-button.active:active .app-icon,
.app-button:active .app-icon {
  --app-icon-border-opacity: .76;
  background: rgba(0, 0, 0, .028);
  transform: translateY(2px) scale(.94);
}

.screen.app-icon-border-disabled .app-button.active:active .app-icon,
.screen.app-icon-border-disabled .app-button.active .app-icon,
.screen.app-icon-border-disabled .app-button:active .app-icon,
.screen.app-icon-border-disabled .app-button .app-icon {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.screen.app-icon-border-disabled .app-button .app-icon::before {
  content: none;
}

.dock {
  --dock-border-size: 1.5px;
  --dock-border-opacity: .86;
  --dock-border-gradient:
    linear-gradient(142deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .06) 42%, rgba(0, 0, 0, .07) 72%, rgba(0, 0, 0, .15) 100%),
    radial-gradient(ellipse at 86% 88%, rgba(0, 0, 0, .12), transparent 46%);
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-self: end;
  min-height: clamp(108px, 16vh, 132px);
  margin-top: clamp(10px, 3vh, 28px);
  padding: 30px 14px 16px;
  border-radius: 34px;
  border: 0;
  background: rgba(255, 255, 255, .045);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .025),
    inset -1px -1px 0 rgba(0, 0, 0, .045);
  -webkit-backdrop-filter: blur(18px) saturate(128%);
  backdrop-filter: blur(18px) saturate(128%);
  isolation: isolate;
}

.dock::before {
  content: "\2726";
  position: absolute;
  top: -24px;
  left: 50%;
  z-index: 2;
  font-size: 32px;
  transform: translateX(-50%);
}

.dock::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: var(--dock-border-size);
  border-radius: inherit;
  background: var(--dock-border-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: var(--dock-border-opacity);
  pointer-events: none;
}

.dock-button {
  position: relative;
  z-index: 1;
}

.dock-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .18s ease;
}

.dock-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.dock-button::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity .18s ease, background .18s ease, transform .18s ease;
}

.dock-button.active::before {
  background: rgba(255, 255, 255, .14);
  box-shadow: none;
  opacity: 1;
}

.dock-button:active::before,
.dock-button.active:active::before {
  background: rgba(0, 0, 0, .035);
  box-shadow: none;
  opacity: 1;
  transform: translateX(-50%) scale(.92);
}

.dock-button.active span {
  color: #050505;
  font-weight: 600;
}

.screen.desktop-editing {
  touch-action: none;
}

.screen.desktop-editing .desktop-pager,
.screen.desktop-editing .desktop-page,
.screen.desktop-editing .desktop-grid,
.screen.desktop-editing .dock {
  overflow: visible;
}

.screen.desktop-editing .weather-dashboard-card,
.screen.desktop-editing .app-button,
.screen.desktop-editing .dock-button {
  cursor: grab;
  animation: desktop-jiggle .16s ease-in-out infinite alternate;
}

.screen.desktop-editing .app-button:nth-child(2n),
.screen.desktop-editing .dock-button:nth-child(2n),
.screen.desktop-editing .weather-dashboard-card {
  animation-delay: -.08s;
}

.screen.desktop-editing .app-button:active .app-icon,
.screen.desktop-editing .dock-button:active .dock-icon {
  transform: none;
}

.desktop-pressing {
  transform: scale(.97);
  transition: transform .12s ease;
}

.desktop-dragging {
  cursor: grabbing;
  opacity: .98;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .18));
  animation: none !important;
}

.desktop-drag-placeholder {
  justify-self: center;
  align-self: center;
  border: 1px dashed rgba(0, 0, 0, .26);
  border-radius: 20px;
  background: rgba(255, 255, 255, .3);
  opacity: .72;
}

.desktop-grid > .desktop-drag-placeholder {
  min-height: 100px;
}

.desktop-grid > .desktop-drag-placeholder[data-placeholder-id="widget-weather-dashboard"] {
  grid-column: 1 / -1;
  min-height: 204px;
  justify-self: stretch;
}

.dock > .desktop-drag-placeholder {
  min-height: 68px;
  border-radius: 18px;
}

@keyframes desktop-jiggle {
  from {
    transform: rotate(-.7deg) translateY(-1px);
  }

  to {
    transform: rotate(.7deg) translateY(1px);
  }
}

.desktop-layout-error {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(162px + env(safe-area-inset-bottom));
  z-index: 21;
  padding: 12px 14px;
  color: #fff;
  border-radius: 16px;
  background: rgba(140, 24, 24, .92);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.45;
}

.app-panel {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 164px;
  z-index: 5;
  display: grid;
  gap: 5px;
  padding: 18px 48px 18px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: none;
  backdrop-filter: none;
  transform: translateY(18px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.app-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.app-panel button {
  position: absolute;
  right: 14px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .05);
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.app-panel p,
.app-panel h1 {
  margin: 0;
}

.app-panel p {
  color: var(--muted);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.app-panel h1 {
  font-size: 24px;
  line-height: 1.15;
}

.app-panel span {
  color: #333;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  line-height: 1.55;
}

.edit-dialog {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: end center;
  padding: 24px 28px calc(164px + env(safe-area-inset-bottom));
  background: rgba(245, 245, 243, .54);
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.edit-dialog.open {
  opacity: 1;
  pointer-events: auto;
}

.edit-card {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 20px;
  background: rgba(250, 250, 249, .96);
}

.edit-card label {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  font-weight: 600;
}

.edit-card textarea {
  width: 100%;
  min-height: 82px;
  resize: none;
  padding: 12px;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  outline: none;
  background: #fff;
  font: inherit;
  line-height: 1.5;
}

.edit-card textarea:focus {
  border-color: rgba(0, 0, 0, .34);
}

.edit-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
}

.edit-actions button {
  min-width: 64px;
  min-height: 36px;
  padding-inline: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .055);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  cursor: pointer;
}

.edit-actions button[type="submit"] {
  color: #fff;
  background: #111;
}

html.low-performance-mode *,
html.low-performance-mode *::before,
html.low-performance-mode *::after {
  animation: none !important;
  transition-duration: .01ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

html.low-performance-mode .desktop-track,
html.low-performance-mode .app-icon,
html.low-performance-mode .dock-icon,
html.low-performance-mode .app-panel,
html.low-performance-mode .edit-dialog,
html.low-performance-mode .weather-picker-dialog,
html.low-performance-mode .widget-photo-dialog {
  will-change: auto !important;
}

html.low-performance-mode .desktop-dragging {
  filter: none;
}

.brand-note {
  display: none;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  body {
    background: linear-gradient(180deg, #fafafa 0%, #f1f1ef 48%, #f7f7f6 100%);
  }

  .scene {
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    padding:
      max(14px, env(safe-area-inset-top))
      max(22px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(22px, env(safe-area-inset-left));
    border-radius: 0;
  }

  .side-poem,
  .brand-note,
  .ambient {
    display: none;
  }
}

@media (max-width: 760px) {
  .side-poem,
  .brand-note {
    display: none;
  }
}

@media (max-width: 460px) {
  .scene {
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    padding:
      max(12px, env(safe-area-inset-top))
      max(22px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(22px, env(safe-area-inset-left));
    border-radius: 0;
  }

  .desktop-grid {
    grid-template-columns: repeat(4, minmax(58px, 1fr));
    gap: 22px 10px;
    padding:
      34px
      clamp(4px, 2.5vw, 12px)
      8px;
  }

  .weather-dashboard-card {
    gap: 11px;
    min-height: 194px;
    padding: 12px;
  }

  .weather-dashboard-top {
    grid-template-columns: minmax(108px, .86fr) minmax(0, 1.32fr);
    gap: 11px;
    min-height: 100px;
  }

  .weather-photo-button,
  .weather-photo-button img {
    min-height: 100px;
  }

  #heroTime {
    font-size: 30px;
  }

  .weather-location-button span,
  .map-weather-location-button {
    font-size: 13px;
  }

  .weather-forecast-item {
    gap: 6px;
    padding-inline: 5px;
  }

  .weather-forecast-condition {
    gap: 3px;
  }

  .weather-forecast-condition > span {
    font-size: 11px;
  }

  .weather-forecast-icon {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .weather-forecast-values {
    gap: 3px;
    font-size: 10px;
  }

  .weather-forecast-values strong {
    font-size: 11px;
  }

  .widget-photo-actions {
    grid-template-columns: 1fr 1fr;
  }

  .widget-photo-actions > span {
    display: none;
  }

  .widget-photo-actions button:first-child {
    grid-column: 1 / -1;
  }
  .app-icon {
    width: 68px;
    border-radius: 18px;
  }

  .app-button span:last-child {
    font-size: 12px;
  }

  .dock-icon {
    width: 54px;
    border-radius: 17px;
  }

  .dock {
    min-height: 124px;
    padding-inline: 6px;
  }
}

@media (max-width: 360px) {
  .weather-dashboard-top {
    grid-template-columns: minmax(96px, .92fr) minmax(0, 1.2fr);
    gap: 9px;
  }

  #heroTime {
    font-size: 27px;
  }

  #dateLine {
    font-size: 12px;
  }

  .weather-forecast-item {
    padding-inline: 3px;
  }

  .weather-forecast-condition {
    display: grid;
    gap: 2px;
    justify-items: center;
  }

  .weather-forecast-condition > span {
    max-width: 100%;
  }

  .weather-forecast-values {
    display: grid;
    gap: 2px;
    justify-items: center;
  }
}
@media (max-height: 740px) {
  .desktop-grid {
    gap: 18px 12px;
    padding-top: 22px;
  }

  .weather-dashboard-card {
    gap: 9px;
    min-height: 184px;
    padding: 11px;
  }

  .weather-dashboard-top,
  .weather-photo-button,
  .weather-photo-button img {
    min-height: 92px;
  }

  .weather-forecast {
    padding-top: 8px;
  }

  .dock {
    min-height: 112px;
    padding-top: 24px;
  }
}
