- One slate/blue palette across the app, dashboard, account/login pages (data colours stay orange = warm, blue = cool on the dashboard) - Slim sticky top bar with location chip, gear (settings) and ? (learn); 4-tab nav (Now, Station, Map, Alerts) with a thumb-reach bottom bar on phones - Hero sky gradient by condition/time with rain, storm, snow and star effects (respects reduced motion); keeps the searched city and badges when temps come from your station - One-line summary, 'Next 2 hours' bars and rain countdown from 15-minute precipitation, rain/cold-aware 'Bring' chips; yesterday + 'vs usual' context from the station - Scrubbable hourly chart (temp, rain chance, wind), 7-day range bars, AQI gauge, details tiles instead of drawers, taller radar with location marker + alert polygons - Skeleton loading instead of a full-screen spinner, sticky section headers, safe areas - Server: minutely_15 precipitation, public /api/station/summary Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
210 lines
16 KiB
CSS
210 lines
16 KiB
CSS
/* Main app redesign layer: slim top bar, dynamic sky hero, nowcast, scrub chart, tiles, skeletons */
|
|
:root {
|
|
--sky-text: #ffffff;
|
|
--blue-grad: linear-gradient(160deg, #2563eb 0%, #3b82f6 55%, #93c5fd 100%);
|
|
--topbar-h: 58px;
|
|
}
|
|
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
|
|
body { overscroll-behavior-y: none; }
|
|
button, a, summary { touch-action: manipulation; }
|
|
|
|
/* ── Layout ── */
|
|
.app { max-width: 980px; padding: 0 1rem 4rem; }
|
|
@media (min-width: 900px) { .app { padding: 0 1.5rem 4rem; } }
|
|
|
|
/* ── Slim top bar ── */
|
|
.topbar {
|
|
position: sticky; top: 0; z-index: 200;
|
|
display: flex; align-items: center; gap: 0.75rem;
|
|
margin: 0 -1rem 1rem; padding: calc(0.55rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) 0.55rem calc(1rem + env(safe-area-inset-left, 0px));
|
|
min-height: var(--topbar-h);
|
|
background: color-mix(in srgb, var(--paper) 86%, transparent);
|
|
backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
@media (min-width: 900px) { .topbar { margin: 0 -1.5rem 1.25rem; padding-left: 1.5rem; padding-right: 1.5rem; } }
|
|
.brand { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -0.01em; font-size: 1.05rem; flex-shrink: 0; }
|
|
.brand-mark { color: var(--accent); font-size: 1.3rem; line-height: 1; }
|
|
.topbar .tabs { border: none; border-radius: 999px; background: var(--paper-dark); padding: 3px; gap: 2px; margin: 0 auto; overflow: visible; }
|
|
.topbar .tab { border: none; border-radius: 999px; min-height: 36px; padding: 0 1rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-light); position: relative; }
|
|
.topbar .tab:hover { color: var(--ink); }
|
|
.topbar .tab.active { background: var(--accent); color: #fff; }
|
|
.topbar-actions { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; min-width: 0; }
|
|
.tabs + .topbar-actions { margin-left: 0; }
|
|
.loc-chip {
|
|
display: inline-flex; align-items: center; gap: 0.35rem; min-height: 40px; max-width: 46vw; padding: 0 0.85rem;
|
|
border: 1px solid var(--border); border-radius: 999px; background: var(--paper-dark); color: var(--ink);
|
|
font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
|
|
}
|
|
.loc-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.loc-chip-ico { font-size: 1.1rem; line-height: 1; color: var(--accent); }
|
|
.icon-btn {
|
|
display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0;
|
|
border: 1px solid var(--border); border-radius: 50%; background: var(--paper-dark); color: var(--ink-light);
|
|
font: inherit; font-size: 1.05rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: color .15s, border-color .15s, background .15s;
|
|
}
|
|
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
|
|
.icon-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
|
|
@media (max-width: 640px) {
|
|
.app { padding: 0 0.9rem max(5.5rem, calc(5rem + env(safe-area-inset-bottom, 0px))); }
|
|
.topbar { margin: 0 -0.9rem 0.8rem; }
|
|
.brand-name { display: none; }
|
|
.topbar .tabs { display: none; }
|
|
.loc-chip { flex: 1; max-width: none; justify-content: flex-start; }
|
|
.icon-btn[href="/dashboard"] { display: none; } /* reachable from Settings */
|
|
}
|
|
|
|
/* ── Bottom nav (4 tabs) in the shared palette ── */
|
|
.bottom-nav { background: color-mix(in srgb, var(--paper-dark) 94%, transparent); border-top: 1px solid var(--border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
|
|
.bottom-tab { color: var(--ink-light); border-right: none; min-height: 58px; position: relative; }
|
|
.bottom-tab.active { color: var(--accent); background: transparent; }
|
|
.bottom-tab.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
|
|
.bottom-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
|
|
|
|
/* ── Location header ── */
|
|
.loc-header { background: transparent; border: none; padding: 0.1rem 0.15rem; margin-bottom: 0.6rem; }
|
|
.loc-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
|
|
.loc-sub, .loc-time { font-size: 0.78rem; color: var(--ink-light); }
|
|
|
|
/* ── Shared card surface ── */
|
|
.ui-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.1rem; margin-bottom: 1.4rem; }
|
|
.ui-card .section-head { margin-bottom: 0.7rem; }
|
|
|
|
/* ── Dynamic sky hero ── */
|
|
.hero {
|
|
position: relative; overflow: hidden; isolation: isolate; color: var(--sky-text);
|
|
background: var(--blue-grad); border: none; border-radius: 22px; padding: 1.6rem 1.3rem; margin-bottom: 0.9rem;
|
|
box-shadow: 0 10px 30px rgba(37, 99, 235, 0.18); transition: background .6s ease;
|
|
--card-sub: rgba(255,255,255,0.82); --card-ink: #fff;
|
|
}
|
|
.hero[data-sky="clear-day"] { background: linear-gradient(160deg, #1d4ed8 0%, #3b82f6 55%, #bae6fd 100%); }
|
|
.hero[data-sky="clear-night"] { background: linear-gradient(160deg, #0b1330 0%, #1e2a5a 60%, #3b2f6b 100%); box-shadow: 0 10px 30px rgba(11,19,48,.5); }
|
|
.hero[data-sky="cloudy-day"] { background: linear-gradient(160deg, #475569 0%, #64748b 55%, #94a3b8 100%); box-shadow: 0 10px 30px rgba(71,85,105,.25); }
|
|
.hero[data-sky="cloudy-night"]{ background: linear-gradient(160deg, #0f172a 0%, #1e293b 60%, #334155 100%); }
|
|
.hero[data-sky="rain"] { background: linear-gradient(160deg, #1e293b 0%, #334155 55%, #475569 100%); }
|
|
.hero[data-sky="storm"] { background: linear-gradient(160deg, #1a1033 0%, #2f2a55 55%, #45406b 100%); }
|
|
.hero[data-sky="snow"] { background: linear-gradient(160deg, #64748b 0%, #94a3b8 55%, #cbd5e1 100%); }
|
|
.hero[data-sky="fog"] { background: linear-gradient(160deg, #64748b 0%, #94a3b8 60%, #cbd5e1 100%); }
|
|
.sky-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
|
|
.hero-temp { font-family: 'Barlow Condensed', var(--serif); font-weight: 800; font-size: clamp(5rem, 18vw, 7.5rem); letter-spacing: -0.02em; text-shadow: 0 2px 18px rgba(0,0,0,.18); }
|
|
.hero-temp .deg { font-size: 0.4em; opacity: .75; }
|
|
.hero .feels, .hero .hero-sub, .hero .hero-desc, .hilo-label { color: var(--sky-text); opacity: .92; }
|
|
.hero-desc { font-weight: 700; font-size: 1rem; }
|
|
.hero-icon { filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
|
|
.hero-hilo { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; color: #fff; }
|
|
.hilo-divider { background: rgba(255,255,255,.3); }
|
|
.hero-share-btn { color: #fff; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.12); min-height: 36px; border-radius: 999px; }
|
|
.hero-share-btn:hover { background: rgba(255,255,255,.25); }
|
|
.hero-share-status { color: #fff; }
|
|
.station-badge { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.4); }
|
|
.hero-context { margin-top: 0.45rem; font-size: 0.8rem; font-weight: 600; color: #fff; background: rgba(0,0,0,.18); border-radius: 999px; padding: 0.25rem 0.8rem; display: inline-block; }
|
|
@media (max-width: 640px) {
|
|
.hero { grid-template-columns: 1fr auto; grid-template-areas: "center right" "left left"; padding: 1.2rem 1rem; gap: 0.7rem; }
|
|
.hero-center { grid-area: center; text-align: left; }
|
|
.hero-right { grid-area: right; }
|
|
.hero-left { grid-area: left; flex-direction: row; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
|
|
.hero-icon { font-size: 2.2rem; }
|
|
.hero-hilo { flex-direction: column; }
|
|
.hilo-divider { width: 70%; height: 1px; }
|
|
}
|
|
|
|
/* ── Summary ── */
|
|
.summary-line { font-size: 1.02rem; font-weight: 700; line-height: 1.35; margin: 0 0.15rem 1.1rem; letter-spacing: -0.005em; }
|
|
.summary-line small { display: block; font-size: 0.8rem; font-weight: 500; color: var(--ink-light); margin-top: 0.15rem; }
|
|
.summary-line:empty { display: none; }
|
|
|
|
/* ── Nowcast ── */
|
|
.nowcast-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; height: 70px; margin-bottom: 0.35rem; }
|
|
.nc-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 0; }
|
|
.nc-bar { width: 100%; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--cool) 28%, var(--paper-darker)); min-height: 5px; transition: height .4s ease; }
|
|
.nc-bar.wet { background: linear-gradient(180deg, #60a5fa, #2563eb); }
|
|
.nc-bar.heavy { background: linear-gradient(180deg, #818cf8, #4338ca); }
|
|
.nc-time { font-size: 0.62rem; color: var(--ink-light); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
.nowcast-bars + .nowcast-bars { margin-top: 0; }
|
|
.bring-row { display: flex; align-items: flex-start; gap: 0.7rem; padding-top: 0.8rem; margin-top: 0.7rem; border-top: 1px solid var(--border); }
|
|
.bring-label { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-light); padding-top: 0.45rem; flex-shrink: 0; }
|
|
.bring-row .recs-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }
|
|
.bring-row .rec-item { flex-direction: row; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--paper-darker); border: 1px solid var(--border); }
|
|
.bring-row .rec-icon { font-size: 1.05rem; }
|
|
.bring-row .rec-label { font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
|
|
|
|
/* ── Sticky section headings (iPhone friendly) ── */
|
|
.sticky-head { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) - 6px); z-index: 20; padding: 0.45rem 0.15rem; margin: 0 0 0.5rem;
|
|
background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
|
|
.section-label { font-size: 0.78rem; letter-spacing: 0.12em; }
|
|
.link-btn { min-height: 36px; font-style: normal; color: var(--accent); }
|
|
|
|
/* ── Hourly scrub chart ── */
|
|
.hourly-card { padding: 0.8rem 0.9rem 0.6rem; margin-bottom: 0.7rem; }
|
|
.hc-readout { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; font-size: 0.82rem; min-height: 1.6rem; font-variant-numeric: tabular-nums; color: var(--ink-light); }
|
|
.hc-readout b { color: var(--ink); font-size: 1.15rem; }
|
|
.hc-readout .hc-t { font-weight: 700; color: var(--ink); min-width: 4.5rem; }
|
|
.hc-readout .hc-rain { color: #3b82f6; font-weight: 600; }
|
|
.hc-readout .hc-wind { color: var(--cool); font-weight: 600; }
|
|
.hourly-chart { width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: crosshair; }
|
|
.hourly-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
|
|
.hourly-scroll { border-radius: 14px; margin-bottom: 1.6rem; }
|
|
.hour-cell { background: var(--card-bg); }
|
|
.hour-cell.now { background: color-mix(in srgb, var(--accent) 14%, var(--card-bg)); }
|
|
|
|
/* ── Radar ── */
|
|
.radar-embed-wrap { border-radius: 16px; margin-bottom: 1.6rem; border: 1px solid var(--border); }
|
|
.radar-map { height: 380px; }
|
|
@media (max-width: 640px) { .radar-map { height: 320px; } }
|
|
.radar-loc-marker { display: flex; flex-direction: column; align-items: center; gap: 4px; transform: translateY(-4px); pointer-events: none; }
|
|
.radar-loc-pin { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25), 0 2px 6px rgba(0,0,0,.5); animation: pin-pulse 2.4s ease-out infinite; }
|
|
.radar-loc-label { background: rgba(7,12,20,.82); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
|
|
@keyframes pin-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.55), 0 2px 6px rgba(0,0,0,.5); } 70%,100% { box-shadow: 0 0 0 14px rgba(37,99,235,0), 0 2px 6px rgba(0,0,0,.5); } }
|
|
|
|
/* ── 7-day range bars ── */
|
|
.daily-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card-bg); margin-bottom: 1.6rem; }
|
|
.day-row { grid-template-columns: 5.2rem 2rem 3rem 2.2rem 1fr 2.2rem; gap: 0.5rem; padding: 0.7rem 1rem; border: none; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
|
|
.day-row:last-child { border-bottom: none; }
|
|
.day-row.today { background: color-mix(in srgb, var(--accent) 8%, transparent); }
|
|
.day-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
.day-icon { font-size: 1.4rem; text-align: center; }
|
|
.day-pop { font-size: 0.74rem; font-weight: 600; color: #3b82f6; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
.pop-drop { font-size: 0.7rem; margin-right: 1px; }
|
|
.day-lo-t, .day-hi-t { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.95rem; text-align: right; }
|
|
.day-lo-t { color: var(--ink-light); font-weight: 600; }
|
|
.day-range { position: relative; height: 7px; border-radius: 99px; background: var(--paper-darker); }
|
|
.day-range-bar { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #38bdf8, #fbbf24 60%, #fb923c); }
|
|
@media (max-width: 640px) { .day-row { grid-template-columns: 3.7rem 1.8rem 2.6rem 2rem 1fr 2rem; gap: 0.35rem; padding: 0.65rem 0.8rem; } }
|
|
|
|
/* ── Detail tiles ── */
|
|
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.65rem; margin-bottom: 1.6rem; }
|
|
.detail-grid .stat-card { border: 1px solid var(--border); border-radius: 16px; background: var(--card-bg); padding: 0.9rem 1rem; min-width: 0; }
|
|
.detail-grid .aqi-card, .detail-grid .sun-tile { grid-column: span 2; }
|
|
@media (max-width: 420px) { .detail-grid { grid-template-columns: repeat(2, 1fr); } }
|
|
.sun-tile .sun-timeline-wrap { margin-top: 0.4rem; }
|
|
.aqi-cat { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1rem 0.5rem; border-radius: 99px; background: var(--paper-darker); vertical-align: middle; margin-left: 0.3rem; }
|
|
.aqi-track { position: relative; height: 8px; border-radius: 99px; margin: 0.45rem 0 0.35rem; background: linear-gradient(90deg, #22c55e 0%, #eab308 20%, #f97316 40%, #ef4444 60%, #a855f7 80%, #7f1d1d 100%); }
|
|
.aqi-marker { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: left .5s ease; }
|
|
|
|
/* ── Skeleton loading (replaces the full-screen spinner) ── */
|
|
.loading { display: block; min-height: 0; padding: 0; }
|
|
.loading.hidden { display: none; }
|
|
body:not([data-tab="conditions"]) #loading { display: none; }
|
|
.sk { border-radius: 16px; background: linear-gradient(90deg, var(--paper-dark) 25%, var(--paper-darker) 50%, var(--paper-dark) 75%); background-size: 200% 100%; animation: sk-shimmer 1.4s infinite linear; }
|
|
.sk-hero { height: 190px; border-radius: 22px; margin-bottom: 0.9rem; }
|
|
.sk-line { height: 24px; width: 70%; margin-bottom: 1.1rem; border-radius: 8px; }
|
|
.sk-card { height: 120px; margin-bottom: 1.2rem; }
|
|
.sk-card.tall { height: 200px; }
|
|
.sk-rows { display: grid; gap: 8px; }
|
|
.sk-row { height: 44px; border-radius: 12px; }
|
|
@keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
|
|
@media (prefers-reduced-motion: reduce) { .sk, .radar-loc-pin, .nc-bar { animation: none; transition: none; } }
|
|
|
|
/* ── Page chrome ── */
|
|
.tab-panel { animation: panel-in .25s cubic-bezier(.2,0,0,1); }
|
|
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
|
|
.footer-note { color: var(--ink-light); }
|
|
.settings-wrap .icon-btn { display: none; }
|
|
|
|
/* High / low block: one tidy line each */
|
|
.hero-hilo { display: flex; align-items: center; gap: 0.2rem; padding: 0.55rem 0.8rem; }
|
|
.hilo-item { display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: center; font-size: 1.35rem; font-weight: 800; line-height: 1.1; text-align: center; min-width: 3.6rem; }
|
|
.hilo-arrow { display: inline; font-size: 0.8em; opacity: .85; margin-right: 1px; }
|
|
.hilo-label { flex-basis: 100%; font-size: 0.62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-top: 2px; }
|
|
@media (max-width: 640px) { .hero-hilo { flex-direction: column; gap: 0.35rem; } .hilo-divider { width: 70%; height: 1px; } }
|