:root {
  color-scheme: light;
  --wind-paper: #f8f7f3;
  --wind-ink: #363a37;
  --wind-muted: #636963;
  --wind-line: #d6d9d1;
  --wind-accent: #518b81;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--wind-paper);
  color: var(--wind-ink);
  font: 14px/1.6 var(--ui, "Microsoft YaHei", sans-serif);
  isolation: isolate;
  transition: background-color 2400ms ease;
}
::selection { background: #d1e2dc; color: #242b27; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--wind-accent); outline-offset: 4px; }
.window-light {
  position: fixed;
  inset: -20%;
  z-index: -3;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 12%, #fffdf4b3 27%, #fffef9ee 46%, transparent 70%);
  opacity: var(--climate-sun, .5);
  transition: opacity 2400ms ease;
}
.window-light::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, transparent 35%, #7978600b 35.2%, #7978600b 35.8%, transparent 36%), linear-gradient(118deg, transparent 58%, #7978600b 58.2%, #7978600b 58.8%, transparent 59%);
}
#wind-shadow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; filter: blur(3px); }
#letter-climate { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
#letter-foreground-mist { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.wind-controls {
  position: absolute;
  top: 24px;
  right: max(36px, calc((100vw - 1048px) / 2));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wind-options { display: flex; gap: 3px; padding: 3px; border-radius: 24px; background: #eceee8; }
.wind-controls button { border: 0; background: transparent; transition: background 160ms ease, color 160ms ease; }
.wind-options button { padding: 6px 17px; border-radius: 20px; color: #656d65; }
.wind-options button[aria-pressed="true"] { background: #fdfdfa; color: #293b32; }
.wind-controls button:hover { background: #e2e6df; color: #293b32; }
#wind-pause { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
#wind-pause svg { width: 20px; height: 20px; }
.climate-picker { position: relative; }
.climate-picker summary { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 5px 8px; list-style: none; cursor: pointer; border-radius: 8px; white-space: nowrap; }
.climate-picker summary::-webkit-details-marker { display: none; }
.climate-picker summary:hover { background: #e2e6df; }
.climate-picker summary:focus-visible { outline: 2px solid var(--wind-accent); outline-offset: 3px; }
.climate-picker summary svg { width: 14px; height: 14px; transition: transform 160ms ease; }
.climate-picker[open] summary svg { transform: rotate(180deg); }
#climate-weather { color: var(--wind-muted); font-size: 12px; }
#climate-panel { position: absolute; top: calc(100% + 12px); right: 0; width: 330px; max-width: calc(100vw - 32px); padding: 20px; border-radius: 14px; background: #fdfdf9; box-shadow: 0 12px 40px #37433b25; }
.climate-term-group { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: baseline; margin-bottom: 14px; }
.climate-term-group > span { color: var(--wind-muted); font-size: 12px; }
.climate-term-group > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.climate-term-group button { min-height: 34px; padding: 4px; border-radius: 7px; }
.climate-term-group button[aria-pressed="true"] { background: #e0eae3; color: #293b32; font-weight: 600; }
.climate-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--wind-line); padding-top: 14px; }
#climate-next { min-height: 36px; padding: 4px 10px; border-radius: 8px; background: #eceee8; }
#climate-sequence { font-size: 12px; color: var(--wind-muted); }
#climate-panel p { margin: 12px 0 0; font-size: 11px; line-height: 1.7; color: var(--wind-muted); }
#letter-album { display: block; width: 100%; height: 980px; border: 0; background: transparent; }
.wind-caption { margin: 0 auto 38px; padding: 0 24px; text-align: center; color: var(--wind-muted); font-size: 12px; }
@media (max-width: 600px) {
  .wind-controls { top: 70px; right: 20px; left: 20px; justify-content: flex-end; gap: 6px; }
  .climate-picker { margin-right: auto; }
  #climate-panel { right: auto; left: 0; }
  .wind-options button { padding: 5px 13px; }
  .wind-caption { max-width: 33ch; }
}
@media (max-width: 360px) { #climate-weather { display: none; } }
@media (prefers-reduced-motion: reduce) { body, .window-light, .wind-controls button, .climate-picker summary svg { transition: none; } }
