:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #283d32;
  --muted: #626f61;
  --line: #dfdfd2;
  --accent: #e4b95f;
  --card: #fffefa;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --hand: "KaiTi", "STKaiti", "Kaiti SC", "Songti SC", serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--paper); color: var(--ink); font-family: var(--sans); transition: background-color 850ms ease, color 850ms ease; -webkit-tap-highlight-color: transparent; }
body[data-weather="rainy"] { --paper: #eef2f3; --ink: #334853; --muted: #5d707b; --line: #d4dfe2; --accent: #a9c1cd; --card: #fcfdfc; }
button { font: inherit; cursor: pointer; color: inherit; touch-action: manipulation; }
button:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
button:disabled { cursor: default; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.page-shell { position: relative; width: min(1120px, calc(100% - 112px)); min-height: 100svh; margin: 0 auto; display: flex; flex-direction: column; z-index: 1; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding-top: 42px; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 11px; font-size: 14px; letter-spacing: 2px; font-weight: 500; }
.brand-sun { width: 27px; height: 27px; color: #9b874f; stroke-width: 1.4; }
.today { color: var(--muted); font-size: 12px; letter-spacing: 1.2px; }
.main-layout { flex: 1; width: 100%; display: grid; grid-template-columns: 1fr 1.06fr; align-items: center; gap: 82px; padding: 112px 0 104px; }
.intro { position: relative; padding-bottom: 16px; }
.little-sun { width: 65px; height: 65px; margin: 0 0 26px 4px; color: var(--accent); transition: color 800ms; }
.sun-rays { transform-origin: 40px 40px; animation: sun-turn 60s linear infinite; }
h1 { position: relative; margin: 0; font-family: var(--hand); font-weight: 400; font-size: clamp(46px, 4.55vw, 65px); line-height: 1.3; letter-spacing: -2px; white-space: nowrap; }
.weather-word { display: inline-block; position: relative; }
.weather-word > svg { position: absolute; width: 104%; height: 14px; bottom: -4px; left: -2%; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; opacity: .75; }
.subtitle { margin: 27px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; letter-spacing: 1.4px; }
.weather-choices { display: flex; gap: 14px; margin-top: 40px; }
.weather-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 58px; padding: 0 23px; border: 1px solid #d4d8ca; border-radius: 999px; background: rgba(255,255,255,.45); font-size: 15px; letter-spacing: .5px; transition: background-color 250ms, border-color 250ms, transform 250ms, box-shadow 250ms; }
.weather-button:hover { transform: translateY(-3px); box-shadow: 0 5px 14px #283d320a; }
.weather-button:active { transform: translateY(0) scale(.98); }
.weather-icon { width: 23px; height: 23px; }
.sunny-button .weather-icon { color: #9b7b31; }
.rainy-button .weather-icon { color: #718d9a; }
.sunny-button[aria-pressed="true"] { background: #ebc775; border-color: #ebc775; color: #3e3b27; box-shadow: 0 5px 16px #bf963d17; }
.rainy-button[aria-pressed="true"] { background: #c2d6df; border-color: #c2d6df; color: #334853; box-shadow: 0 5px 16px #7290a01a; }
.choice-check { width: 14px; height: 14px; opacity: 0; margin-left: -4px; transition: opacity 250ms; }
[aria-pressed="true"] > .choice-check { opacity: .75; }
.choice-hint { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; letter-spacing: 1.1px; margin: 21px 0 0 5px; }
.hint-line { width: 20px; height: 1px; background: currentColor; opacity: .6; }
.postcard-wrap { position: relative; min-width: 0; padding: 8px; }
.postcard { position: relative; background: var(--card); border: 1px solid #d5d8ca; border-radius: 7px; padding: 35px 25px 22px; box-shadow: 0 12px 40px #32402e09, 0 2px 4px #32402e05; transform: rotate(1.4deg); transition: background-color 800ms, border-color 800ms; }
body[data-weather="rainy"] .postcard { border-color: #d1dce0; }
.paper-tape { position: absolute; top: -16px; left: calc(50% - 54px); height: 31px; width: 108px; background: #d9d3b9; opacity: .57; transform: rotate(-4deg); clip-path: polygon(1% 2%, 99% 0, 97% 15%, 100% 29%, 98% 43%, 100% 55%, 98% 75%, 100% 95%, 1% 100%, 3% 83%, 0 66%, 2% 48%, 0 31%, 3% 17%); }
.empty-card { min-height: 361px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 0 20px; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 36px, #e4e5d733 36px, #e4e5d733 37px); }
.letter-art { width: 170px; height: 145px; margin-bottom: 21px; animation: letter-float 6s ease-in-out infinite; }
.empty-card h2 { font-family: var(--hand); font-size: 25px; font-weight: 400; margin: 0 0 15px; letter-spacing: 1px; }
.empty-card p { font-size: 11px; color: var(--muted); letter-spacing: .8px; margin: 0; line-height: 1.8; }
.empty-rule { width: 42px; height: 1px; background: #c4c8b7; margin-top: 31px; }
.result-card[hidden], .empty-card[hidden] { display: none; }
.result-quote { margin: 3px 0 25px; min-height: 59px; display: flex; align-items: center; justify-content: center; font-family: var(--hand); font-weight: 400; font-size: 26px; line-height: 1.55; letter-spacing: .3px; text-align: center; text-wrap: balance; }
figure { margin: 0; }
.image-button { display: flex; width: 100%; border: 0; border-radius: 3px; padding: 0; background: transparent; flex-direction: column; align-items: center; cursor: zoom-in; }
#weather-picture { display: block; width: auto; height: auto; max-width: 100%; max-height: 470px; object-fit: contain; border-radius: 3px; }
.image-zoom-hint { font-size: 10px; letter-spacing: 1px; color: var(--muted); margin-top: 11px; }
.image-dialog { padding: 0; border: 0; max-width: 94vw; max-height: 94svh; background: transparent; overflow: visible; }
.image-dialog::backdrop { background: #17231dd9; backdrop-filter: blur(5px); }
.image-dialog > img { display: block; max-width: 94vw; max-height: 85svh; width: auto; height: auto; object-fit: contain; border-radius: 5px; }
.close-image { position: fixed; right: max(16px, env(safe-area-inset-right)); top: max(16px, env(safe-area-inset-top)); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #ffffff6b; background: #263c32; color: white; }
body:has(.image-dialog[open]) { overflow: hidden; }
figcaption { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 18px; text-align: center; letter-spacing: 1.6px; }
.postcard-sparkle { position: absolute; width: 28px; height: 28px; right: -20px; bottom: -17px; stroke: #b2b799; stroke-width: 1.1; transform: rotate(14deg); }
.site-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); gap: 20px; padding: 26px 0 30px; }
.site-footer > p { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; margin: 0; line-height: 1.8; }
.sound-button { display: flex; align-items: center; gap: 8px; padding: 8px 0 8px 12px; min-height: 44px; border: 0; background: transparent; font-size: 11px; color: var(--muted); letter-spacing: .8px; border-radius: 4px; }
.sound-button:hover { color: var(--ink); }
.sound-button .icon { width: 16px; height: 16px; stroke-width: 1.4; }
.atmosphere { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sky-glow { position: absolute; top: -260px; left: -120px; width: 800px; height: 800px; background: radial-gradient(ellipse, #edd99420 0%, transparent 65%); transition: opacity 900ms; opacity: .6; }
body[data-weather="sunny"] .sky-glow { opacity: 1; }
body[data-weather="rainy"] .sky-glow { opacity: 0; }
.cloud { position: absolute; width: 170px; height: 34px; background: #d9dece; opacity: .18; border-radius: 50px; animation: cloud-drift 25s ease-in-out infinite alternate; transition: background-color 1s; }
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; bottom: 10px; }
.cloud::before { width: 76px; height: 76px; left: 28px; }
.cloud::after { width: 60px; height: 60px; right: 24px; }
.cloud-one { top: 17%; right: 9%; transform: scale(.7); }
.cloud-two { bottom: 19%; left: -25px; opacity: .15; animation-delay: -12s; }
body[data-weather="rainy"] .cloud { background: #b0c4cf; opacity: .23; }
.rain-curtain { opacity: 0; transition: opacity 900ms; }
body[data-weather="rainy"] .rain-curtain { opacity: 1; }
.rain-drop { position: absolute; top: -50px; left: var(--x); width: 1px; height: var(--length); background: #8da9b63b; transform: rotate(14deg); animation: rainfall var(--duration) linear infinite; animation-delay: var(--delay); animation-play-state: paused; }
body[data-weather="rainy"] .rain-drop { animation-play-state: running; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.noscript-note { margin: 20px; text-align: center; }
@keyframes cloud-drift { from { translate: -30px 0; } to { translate: 45px 8px; } }
@keyframes sun-turn { to { transform: rotate(360deg); } }
@keyframes letter-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
@keyframes rainfall { from { translate: 20px -30px; } to { translate: -130px calc(100vh + 100px); } }
@media (min-width: 1500px) { .page-shell { width: 1190px; } .main-layout { gap: 110px; } h1 { font-size: 70px; } }
@media (max-width: 1080px) and (min-width: 761px) { .page-shell { width: calc(100% - 72px); } .main-layout { gap: 35px; } h1 { font-size: 48px; } .weather-button { padding: 0 15px; gap: 8px; } .weather-choices { gap: 10px; } .postcard { padding: 30px 18px 19px; } .result-quote { font-size: 23px; } .empty-card { min-height: 330px; } }
@media (max-width: 760px) {
  .page-shell { width: min(490px, calc(100% - 44px)); }
  .site-header { padding-top: 24px; gap: 8px; }
  .wordmark { font-size: 11px; gap: 8px; letter-spacing: 1px; }
  .brand-sun { width: 23px; height: 23px; }
  .today { font-size: 10px; letter-spacing: .5px; }
  .main-layout { display: flex; flex-direction: column; padding: 47px 0 45px; gap: 37px; }
  .intro { padding: 0; text-align: center; width: 100%; }
  .little-sun { width: 49px; height: 49px; margin: 0 auto 18px; }
  h1 { font-size: clamp(41px, 10vw, 55px); letter-spacing: -1.5px; }
  .weather-word > svg { bottom: -5px; height: 10px; }
  .subtitle { font-size: 12px; letter-spacing: .8px; margin-top: 21px; }
  .weather-choices { justify-content: center; gap: 12px; margin-top: 28px; }
  .weather-button { font-size: 14px; padding: 0 17px; min-height: 53px; gap: 8px; }
  .weather-icon { width: 21px; height: 21px; }
  .choice-hint { justify-content: center; margin: 16px 0 0; font-size: 10px; letter-spacing: .7px; }
  .hint-line { width: 15px; }
  .postcard-wrap { width: 100%; padding: 5px 7px; }
  .postcard { padding: 28px 17px 18px; transform: rotate(.7deg); }
  .paper-tape { width: 87px; left: calc(50% - 43px); top: -12px; height: 25px; }
  .empty-card { min-height: 290px; }
  .letter-art { width: 140px; height: 119px; margin-bottom: 18px; }
  .empty-card h2 { font-size: 23px; margin-bottom: 13px; }
  .empty-card p { font-size: 10px; letter-spacing: .3px; }
  .empty-rule { margin-top: 25px; }
  .result-quote { font-size: 24px; margin: 0 3px 17px; min-height: 64px; }
  figcaption { font-size: 10px; letter-spacing: .6px; margin-top: 15px; }
  .postcard-sparkle { width: 21px; height: 21px; right: -6px; bottom: -12px; }
  .site-footer { padding: 18px 0 21px; gap: 8px; }
  .site-footer > p { font-size: 10px; letter-spacing: .25px; max-width: 210px; }
  .sound-button { font-size: 10px; gap: 6px; padding-left: 5px; white-space: nowrap; }
  .sound-button .icon { width: 15px; height: 15px; }
  .cloud-one { top: 13%; right: -80px; }
  .cloud-two { bottom: 24%; left: -98px; }
}
@media (max-width: 360px) { .page-shell { width: calc(100% - 34px); } .weather-button { padding: 0 13px; gap: 7px; } .weather-choices { gap: 9px; } .choice-check { width: 12px; } h1 { font-size: 40px; } .result-quote { font-size: 22px; } .site-footer > p { max-width: 174px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rain-curtain { display: none; }
}
