:root { --ink: #282436; --muted: #787186; --legal-link: #625b70; --canvas: #f6f3fb; --panel: rgba(255,255,255,.78); }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 15% 10%, #e5dcff 0, transparent 35%), radial-gradient(circle at 90% 90%, #ffe7bd 0, transparent 34%), var(--canvas); color: var(--ink); font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
button { font: inherit; cursor: pointer; }
.app-shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 48px; }
header { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 18px; }
.brand span { color: #7656ae; font-size: 25px; }
.settings-button { border: 0; border-radius: 12px; background: var(--panel); color: var(--ink); padding: 10px 14px; box-shadow: 0 5px 18px #4d386619; }
.settings-button:focus-visible, button:focus-visible { outline: 3px solid #8061bd; outline-offset: 3px; }
.intro { margin: 68px 0 28px; }
.eyebrow { margin: 0 0 8px; color: #7656ae; letter-spacing: .13em; font-size: 11px; font-weight: 700; }
.intro h1 { margin: 0; font-size: clamp(38px, 7vw, 62px); letter-spacing: -.05em; }
.intro p:last-child { color: var(--muted); }
.fortune-card { --fortune: #b896c4; --card-ink: #111111; position: relative; overflow: hidden; min-height: 325px; border-radius: 32px; padding: 34px; background: linear-gradient(135deg, color-mix(in srgb, var(--fortune), white 28%), var(--fortune)); color: var(--card-ink); box-shadow: 0 24px 45px color-mix(in srgb, var(--fortune), transparent 62%); }
.fortune-card::after { content: "✦"; position: absolute; right: -10px; bottom: -75px; opacity: .2; font-size: 270px; }
.fortune-card p { margin: 0; font-weight: 700; }
.color-swatch { width: 48px; height: 48px; margin-top: 52px; border-radius: 50%; background: var(--fortune); border: 4px solid currentColor; opacity: .82; }
.fortune-card h2 { margin: 18px 0 5px; font-size: clamp(48px, 10vw, 76px); letter-spacing: -.07em; }
.fortune-card span { opacity: .82; font-weight: 700; }
.details { display: grid; grid-template-columns: .8fr 1.8fr; gap: 18px; margin-top: 18px; }
.details article { min-height: 142px; padding: 24px; border: 1px solid #ffffffb3; border-radius: 24px; background: var(--panel); box-shadow: 0 14px 32px #49365b0d; }
.details p { margin: 0 0 13px; color: var(--muted); }
.details strong { font-size: 20px; line-height: 1.5; }
.details article:first-child strong { color: #7656ae; font-size: 58px; line-height: 1; }
.weather-card { margin-top: 18px; padding: 26px; border: 1px solid #ffffffb3; border-radius: 24px; background: var(--panel); box-shadow: 0 14px 32px #49365b0d; }
.weather-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.weather-heading h2 { margin: 3px 0 0; font-size: 24px; }
.weather-kicker { margin: 0; color: #7656ae; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.weather-heading button { border: 0; border-radius: 12px; padding: 10px 14px; background: #7656ae; color: #fff; font-weight: 700; }
.weather-heading button:disabled { cursor: wait; opacity: .6; }
.weather-status { margin: 16px 0 0; color: var(--muted); }
.weather-location { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 0; }
.weather-location[hidden] { display: none; }
.weather-location div { min-width: 0; padding: 12px 14px; border-radius: 14px; background: #7656ae12; }
.weather-location dt { color: var(--muted); font-size: 11px; }
.weather-location dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.weather-result { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #8c7e9c29; }
.weather-icon { font-size: 44px; }
.weather-primary { display: flex; align-items: baseline; gap: 12px; }
.weather-primary strong { font-size: 48px; line-height: 1; }
.weather-primary span { color: var(--muted); font-weight: 700; }
.weather-result dl { display: flex; gap: 22px; margin: 0; }
.weather-result dl div { min-width: 58px; }
.weather-result dt { color: var(--muted); font-size: 12px; }
.weather-result dd { margin: 5px 0 0; font-weight: 700; }
.weather-source { margin: 16px 0 0; color: var(--muted); font-size: 12px; text-align: right; }
.weather-source a { color: inherit; }
.note, .noscript { margin-top: 28px; color: var(--muted); font-size: 14px; text-align: center; }
.site-footer { margin-top: 14px; text-align: center; }
.site-footer a { color: var(--legal-link); font-size: 13px; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline: 3px solid #8061bd; outline-offset: 3px; border-radius: 3px; }
.dialog { width: min(580px, calc(100% - 40px)); max-height: calc(100vh - 40px); padding: 28px; border: 0; border-radius: 28px; background: #fff; color: var(--ink); box-shadow: 0 25px 70px #1c122b55; overflow: auto; }
.dialog::backdrop { background: #201a2d66; backdrop-filter: blur(5px); }
.dialog-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dialog h2 { margin: 0; }
.dialog-title button { border: 0; border-radius: 10px; background: #7656ae; color: #fff; padding: 9px 15px; font-weight: 700; }
.setting-group { margin-top: 12px; padding: 17px; border-radius: 16px; background: #f6f3fb; }
.setting-group h3 { margin: 0 0 7px; font-size: 16px; }
.setting-group p { margin: 0; color: #625b70; line-height: 1.55; }
.reset button { margin-top: 13px; border: 1px solid #be3c55; border-radius: 9px; background: transparent; color: #ae2844; padding: 8px 12px; }
@media (max-width: 600px) { .app-shell { width: min(100% - 24px, 920px); padding-top: 20px; } .intro { margin-top: 50px; } .fortune-card { min-height: 285px; padding: 27px; border-radius: 26px; } .details { grid-template-columns: 1fr; gap: 12px; } .details article { min-height: auto; } .weather-heading { align-items: flex-start; flex-direction: column; } .weather-heading button { width: 100%; } .weather-location { grid-template-columns: 1fr; } .weather-result { grid-template-columns: auto 1fr; } .weather-result dl { grid-column: 1 / -1; justify-content: space-between; gap: 10px; } .dialog { padding: 20px; border-radius: 22px; } }
@media (prefers-color-scheme: dark) { :root { --ink: #f3edff; --muted: #c4bacf; --legal-link: #c4bacf; --canvas: #1d1827; --panel: rgba(47,38,60,.82); } .dialog { background: #292133; } .setting-group { background: #382f44; } .setting-group p { color: #d2c7db; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
