/* තරු අහස app */
@font-face { font-family: "Tharu Sans"; src: url(../fonts/noto-sans-sinhala-sinhala-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0D80-0DFF, U+200C-200D, U+25CC; }
@font-face { font-family: "Tharu Sans"; src: url(../fonts/noto-sans-sinhala-sinhala-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0D80-0DFF, U+200C-200D, U+25CC; }
@font-face { font-family: "Tharu Sans"; src: url(../fonts/noto-sans-sinhala-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2010-205F, U+20AC; }
@font-face { font-family: "Tharu Sans"; src: url(../fonts/noto-sans-sinhala-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2010-205F, U+20AC; }
@font-face { font-family: "Tharu Serif"; src: url(../fonts/noto-serif-sinhala-sinhala-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0D80-0DFF, U+200C-200D, U+25CC; }
@font-face { font-family: "Tharu Serif"; src: url(../fonts/noto-serif-sinhala-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2010-205F; }

:root {
	--see-eye: #5ED39A;
	--see-bino: #F2B92C;
	--see-tele: #A9B2FF;
	--see-filter: #FF8A4C;
	--see-none: #7F89AC;
	--sky: #0E1A3D;      /* night indigo */
	--sky-2: #16264F;    /* raised surface */
	--sky-3: #20336A;    /* pressed / chips */
	--line: #2C3F78;
	--star: #F2B92C;     /* logo star gold */
	--teal: #3CC4CF;     /* logo teal, lifted for contrast */
	--flame: #F47A2A;    /* logo orange */
	--text: #EEF0F8;
	--muted: #A6B0CF;
	--good: #5ED39A;
	--bad: #FF7E7E;
	--sans: "Tharu Sans", "Noto Sans Sinhala", "Iskoola Pota", system-ui, sans-serif;
	--serif: "Tharu Serif", "Noto Serif Sinhala", "Tharu Sans", serif;
	--fs-xs: .8125rem;   /* 13 */
	--fs-sm: .9375rem;   /* 15 */
	--fs-md: 1rem;       /* 16 */
	--fs-lg: 1.1875rem;  /* 19 */
	--fs-xl: 1.4375rem;  /* 23 */
	--fs-2xl: 1.75rem;   /* 28 */
	--tabh: 64px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
	color-scheme: dark;
}
html.big { font-size: 112.5%; }
/* Red light mode: keeps eyes dark-adapted outside at night */
html.red { filter: grayscale(1) sepia(1) saturate(7) hue-rotate(-45deg) brightness(.75); background: #000; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--sky); }
body {
	font-family: var(--sans); font-size: var(--fs-md); line-height: 1.7; color: var(--text);
	min-height: 100dvh; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
	padding-bottom: calc(var(--tabh) + var(--safe-b));
}
a { color: var(--teal); text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--star); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--star); color: #000; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
	padding: calc(6px + var(--safe-t)) 16px 6px; background: rgba(14, 26, 61, .92); backdrop-filter: blur(10px);
}
.brand img { display: block; height: 44px; width: auto; }
.loc {
	display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent;
	border-radius: 999px; padding: 5px 12px 5px 9px; font-size: var(--fs-sm); cursor: pointer; max-width: 55vw;
}
.loc svg { width: 16px; height: 16px; fill: var(--star); flex: none; }
.loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.banner { margin: 8px 16px 0; border-radius: 12px; background: var(--sky-2); border: 1px solid var(--line); font-size: var(--fs-sm); overflow: hidden; }
.nt { display: grid; grid-template-columns: 22px 1fr 28px; gap: 10px; align-items: center; padding: 9px 6px 9px 12px; }
.nt + .nt { border-top: 1px solid var(--line); }
.nt > .ico { width: 22px; height: 22px; color: var(--star); }
.nt p { margin: 0; line-height: 1.55; }
.nt a { color: var(--text); }
.nt button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.nt button .ico { width: 18px; height: 18px; }

/* icons */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.ico.inl { width: 15px; height: 15px; margin-right: 4px; transform: translateY(-1px); }
.ico.ok { color: var(--good); }
.ico.no { color: var(--bad); }
.btn .ico { width: 18px; height: 18px; }
.pglyph { display: block; overflow: visible; }
.evb { width: 26px; height: 26px; flex: none; display: inline-grid; place-items: center; color: var(--star); overflow: visible; }
.evb .ico { width: 22px; height: 22px; }
.ev h3 { display: flex; gap: 8px; align-items: flex-start; }
.ev h3 .evb { margin-top: 1px; }
.hl p { display: flex; gap: 8px; align-items: flex-start; }
.hl .ico { color: var(--star); width: 18px; height: 18px; margin-top: 3px; }
.explain strong { display: flex; gap: 6px; align-items: center; }
.streak { display: inline-flex; gap: 4px; align-items: center; }
.streak .ico { color: var(--flame); }
.back .ico { width: 18px; height: 18px; }

main { max-width: 560px; margin: 0 auto; padding: 4px 16px 32px; outline: none; }

/* ---------- bottom tabs ---------- */
.tabs {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
	height: calc(var(--tabh) + var(--safe-b)); padding-bottom: var(--safe-b);
	background: #0A1430; border-top: 1px solid var(--line);
}
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: var(--fs-xs); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--star); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.35; margin: 0; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
p { margin: 0 0 .8em; }

.sec { margin-top: 34px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h a { font-size: var(--fs-sm); white-space: nowrap; }

/* ---------- tonight hero ---------- */
.tonight-h { margin: 14px 0 2px; }
.tonight-h h1 { font-size: var(--fs-2xl); }
.tonight-h p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.dome-wrap { position: relative; margin: 14px -4px 0; }
.dome { display: block; width: 100%; height: auto; touch-action: manipulation; }
.dome .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.dome .hz { fill: #0A1430; stroke: var(--teal); stroke-opacity: .55; stroke-width: 1.5; }
.dome .cp { font: 600 15px var(--sans); fill: var(--muted); text-anchor: middle; dominant-baseline: central; }
.dome .lbl { font: 600 13px var(--sans); fill: var(--text); paint-order: stroke; stroke: #0A1430; stroke-width: 4px; stroke-linejoin: round; }
.dome .bg-star { fill: #fff; }
.dome .obj { cursor: pointer; }
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 10px auto 0; max-width: 320px; background: var(--sky-2); border-radius: 12px; }
.switch button { border: 0; background: transparent; border-radius: 9px; padding: 7px 8px; cursor: pointer; font-size: var(--fs-sm); color: var(--muted); line-height: 1.3; }
.switch button b { display: block; font-weight: 600; color: var(--text); }
.switch button[aria-pressed="true"] { background: var(--sky-3); color: var(--text); }
.dome-note { text-align: center; margin: 8px 0 0; font-size: var(--fs-xs); color: var(--muted); }

.suntimes { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.suntimes div { padding: 10px 4px; text-align: center; }
.suntimes div + div { border-left: 1px solid var(--line); }
.suntimes b { display: block; font-size: var(--fs-lg); font-weight: 600; }
.suntimes span { font-size: var(--fs-xs); color: var(--muted); }

/* moon */
.moon { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.moon svg { width: 96px; height: 96px; }
.moon h3 { margin-bottom: 2px; }
.moon dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0 12px; font-size: var(--fs-sm); }
.moon dt { color: var(--muted); }
.moon dd { margin: 0; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.phases div { text-align: center; font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.phases svg { width: 28px; height: 28px; display: block; margin: 0 auto 4px; }
.phases b { display: block; color: var(--text); font-weight: 600; white-space: nowrap; font-size: .75rem; }

/* planets */
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; transform: translateY(1px); }
.plist .nm { font-weight: 600; }
.plist .nm small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.plist .tx { display: block; font-size: var(--fs-sm); color: var(--muted); }
.plist .mag { font-size: var(--fs-xs); color: var(--muted); text-align: right; max-width: 6.5em; line-height: 1.4; }
.plist li.off { opacity: .55; }

.hl { margin: 18px 0 0; padding: 12px 14px; border-left: 3px solid var(--star); background: var(--sky-2); border-radius: 0 10px 10px 0; font-size: var(--fs-sm); }
.hl p { margin: 0; }
.hl p + p { margin-top: 6px; }

/* ---------- lists ---------- */
.evlist { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev .d { text-align: center; line-height: 1.1; padding-top: 2px; }
.ev .d b { display: block; font-family: var(--serif); font-size: var(--fs-xl); font-weight: 600; }
.ev .d span { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.ev h3 { font-family: var(--sans); font-size: var(--fs-md); font-weight: 600; line-height: 1.5; }
.ev .ic { margin-right: 6px; }
.ev p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.ev.imp3 h3 { color: var(--star); }
.ev.dim { opacity: .6; }
.ev details { margin-top: 6px; font-size: var(--fs-sm); }
.ev summary { cursor: pointer; color: var(--teal); }
.ev table { border-collapse: collapse; margin-top: 6px; width: 100%; }
.ev td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.ev td + td { text-align: right; color: var(--muted); }
.month { margin: 26px 0 2px; font-size: var(--fs-lg); color: var(--muted); }
.month:first-child { margin-top: 10px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 12px -16px 4px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 5px 13px; font-size: var(--fs-sm); cursor: pointer; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--star); border-color: var(--star); color: #1A1300; font-weight: 600; }

/* articles */
.alist { list-style: none; margin: 0; padding: 0; }
.ai a { display: grid; grid-template-columns: 1fr 104px; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.ai:last-child a { border-bottom: 0; }
.ai h3 { font-family: var(--sans); font-size: var(--fs-md); font-weight: 600; line-height: 1.5; }
.ai p { font-size: var(--fs-xs); color: var(--muted); margin: 6px 0 0; }
.ai img, .ai .ph { width: 104px; height: 78px; object-fit: cover; border-radius: 8px; background: var(--sky-2); display: block; }
.ai.lead a { grid-template-columns: 1fr; }
.ai.lead img, .ai.lead .ph { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; order: -1; }
.ai.lead h3 { font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.4; }

.search { display: flex; gap: 8px; margin-top: 14px; }
.search input { flex: 1; min-width: 0; background: var(--sky-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--sky-2); border-radius: 10px; padding: 9px 16px; cursor: pointer; color: var(--text); font-size: var(--fs-sm); }
.btn.pri { background: var(--star); border-color: var(--star); color: #1A1300; font-weight: 600; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.more { margin-top: 18px; }

/* article page */
.art-img { margin: 10px -16px 0; }
.art-img img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.art h1 { margin-top: 18px; line-height: 1.4; }
.art .meta { margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.art .actions { margin: 16px 0 6px; }
.prose { margin-top: 18px; font-size: 1.0625rem; line-height: 1.85; overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin: 1.4em 0 .5em; }
.prose img, .prose iframe, .prose video { max-width: 100%; height: auto; border-radius: 8px; }
.prose figure { margin: 1.2em 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: var(--fs-sm); }
.prose td, .prose th { border: 1px solid var(--line); padding: 4px 8px; }
.prose blockquote { margin: 1em 0; padding-left: 14px; border-left: 3px solid var(--teal); color: var(--muted); }

.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 0; padding: 0; cursor: pointer; margin-top: 16px; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.yt::after { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; border-radius: 12px; background: #E53935 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 28px no-repeat; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* quiz */
.qhead { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.qdots { display: flex; gap: 6px; }
.qdots i { width: 22px; height: 6px; border-radius: 3px; background: var(--sky-3); }
.qdots i.ok { background: var(--good); }
.qdots i.no { background: var(--bad); }
.qdots i.now { background: var(--star); }
.qq { margin-top: 22px; font-size: var(--fs-lg); line-height: 1.7; white-space: pre-line; }
.opts { display: grid; gap: 10px; margin-top: 18px; }
.opt { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--sky-2); border-radius: 12px; padding: 12px; cursor: pointer; line-height: 1.5; }
.opt b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-3); font-weight: 600; }
.opt.ok { border-color: var(--good); }
.opt.ok b { background: var(--good); color: #062; }
.opt.no { border-color: var(--bad); }
.opt.no b { background: var(--bad); color: #400; }
.opt:disabled { cursor: default; }
.explain { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--sky-2); font-size: var(--fs-sm); }
.explain strong { display: block; font-size: var(--fs-md); margin-bottom: 2px; }
.score { text-align: center; margin-top: 30px; }
.score .big { font-family: var(--serif); font-size: 4rem; line-height: 1.1; color: var(--star); }

/* facts */
.fact { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact .t { white-space: pre-line; }
.fact img { width: 100%; border-radius: 10px; margin-bottom: 10px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sky-2); }
.src { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }

/* more menu */
.menu { list-style: none; margin: 14px 0 0; padding: 0; }
.menu a, .menu button { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; }
.menu li:last-child a, .menu li:last-child button { border-bottom: 0; }
.menu .i { display: grid; place-items: center; color: var(--star); }
.menu .i .ico { width: 22px; height: 22px; }
.menu .chev { display: grid; place-items: center; }
.menu .chev .ico { width: 16px; height: 16px; }
.menu small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.menu .chev { color: var(--muted); }
.toggle { width: 44px; height: 26px; border-radius: 13px; background: var(--sky-3); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
[aria-checked="true"] .toggle { background: var(--star); }
[aria-checked="true"] .toggle::after { transform: translateX(18px); background: #1A1300; }

/* iss */
.pass { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pass:last-child { border-bottom: 0; }
.pass h3 { font-family: var(--sans); font-size: var(--fs-md); font-weight: 600; }
.pass .q { font-size: var(--fs-xs); padding: 1px 8px; border-radius: 999px; background: var(--sky-3); margin-left: 6px; font-weight: 400; }
.pass .q3 { background: var(--star); color: #1A1300; }
.pass p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.path { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; font-size: var(--fs-xs); text-align: center; }
.path div { padding: 6px 2px; background: var(--sky-2); }
.path div:first-child { border-radius: 8px 0 0 8px; }
.path div:last-child { border-radius: 0 8px 8px 0; }
.path b { display: block; font-size: var(--fs-sm); }

/* videos */
.vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 14px; }
.vgrid a { color: var(--text); font-size: var(--fs-sm); line-height: 1.5; }
.vgrid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 6px; background: var(--sky-2); }

/* sheet */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 85dvh; border-radius: 18px 18px 0 0; background: var(--sky-2); color: var(--text); }
.sheet::backdrop { background: rgba(0, 0, 0, .55); }
.sheet .in { padding: 18px 16px calc(18px + var(--safe-b)); overflow-y: auto; max-height: 85dvh; }
.sheet h2 { font-size: var(--fs-lg); margin-bottom: 12px; }
.cities { list-style: none; margin: 10px 0 0; padding: 0; columns: 2; column-gap: 12px; }
.cities button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.cities button[aria-current="true"] { background: var(--sky-3); color: var(--star); }

/* states */
.state { text-align: center; padding: 40px 12px; color: var(--muted); }
.state p { margin-bottom: 14px; }
.skel { background: linear-gradient(90deg, var(--sky-2), var(--sky-3), var(--sky-2)); background-size: 200% 100%; animation: sh 1.4s infinite linear; border-radius: 10px; }
@keyframes sh { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabh) + var(--safe-b) + 12px); transform: translateX(-50%); background: var(--text); color: var(--sky); padding: 9px 16px; border-radius: 14px; width: max-content; line-height: 1.5; font-size: var(--fs-sm); z-index: 60; max-width: 90vw; }

.page-h { margin-top: 16px; }
.page-h p { color: var(--muted); font-size: var(--fs-sm); margin: 4px 0 0; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.otd-y { font-family: var(--serif); font-size: var(--fs-xl); color: var(--star); display: block; }

/* how to see it: colour code */
.see { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; line-height: 1; padding: 4px 8px 4px 6px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; font-weight: 600; }
.see .ico { width: 14px; height: 14px; stroke-width: 1.8; }
.see-eye { color: var(--see-eye); }
.see-binoculars { color: var(--see-bino); }
.see-telescope { color: var(--see-tele); }
.see-filter { color: var(--see-filter); }
.see-none { color: var(--see-none); }
.see-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 8px; }
.see-row .tip { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; flex: 1 1 180px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ev { border-left: 3px solid transparent; padding-left: 8px; margin-left: -11px; }
.ev.s-eye { border-left-color: var(--see-eye); }
.ev.s-binoculars { border-left-color: var(--see-bino); }
.ev.s-telescope { border-left-color: var(--see-tele); }
.ev.s-filter { border-left-color: var(--see-filter); }
.plist .see-row { margin-top: 6px; }

/* star map */
body.sky-mode .top, body.sky-mode .banner { display: none; }
body.sky-mode main { max-width: none; padding: 0; }
.sky { position: relative; height: calc(100dvh - var(--tabh) - var(--safe-b)); overflow: hidden; background: #070D24; user-select: none; -webkit-user-select: none; }
.sky-cv { display: block; width: 100%; height: 100%; }
.sky-top { position: absolute; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.sky-top > *, .sky-time > * { pointer-events: auto; }
.sky-btn, .sky-now { border: 1px solid rgba(255,255,255,.15); background: rgba(10,20,48,.86); color: var(--text); border-radius: 999px; min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; cursor: pointer; font-size: var(--fs-sm); }
.sky-btn .ico { width: 20px; height: 20px; }
.sky-time { display: flex; gap: 6px; }
.sky-now { font-weight: 600; }
.sky-bottom { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; pointer-events: none; }
.sky-ar { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 18px; background: var(--star); color: #1A1300; font-weight: 600; cursor: pointer; font-size: var(--fs-sm); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.ar-on .sky-ar { background: rgba(10,20,48,.85); color: var(--text); border: 1px solid var(--star); }
.sky-info { position: absolute; left: 12px; right: 12px; bottom: 72px; margin: 0 auto; max-width: 420px; background: rgba(10,20,48,.9); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; font-size: var(--fs-sm); }
.sky-info b { font-size: var(--fs-lg); font-family: var(--serif); }
.sky-info span { color: var(--muted); }
.sky-info .see { justify-self: start; margin-top: 6px; }
.sky-hint { position: absolute; left: 16px; right: 16px; top: 64px; margin: 0 auto; max-width: 420px; text-align: center; background: rgba(10,20,48,.85); border-radius: 12px; padding: 10px 12px; font-size: var(--fs-sm); }
.sky-open { margin: 12px auto 0; max-width: 320px; display: flex; }
.sky-open .ico { color: var(--star); }

/* email alerts */
.ev { position: relative; }
.bell { position: absolute; top: 10px; right: -4px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.bell .ico { width: 20px; height: 20px; }
.bell.on { color: var(--star); }
.bell.on .ico { fill: currentColor; }
.ev h3 { padding-right: 34px; }
.alert-btn { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 11px 14px; border-radius: 12px; border: 1px dashed var(--star); background: rgba(242,185,44,.08); color: var(--text); cursor: pointer; text-align: left; font-size: var(--fs-sm); }
.alert-btn .ico { color: var(--star); }
.alerts h2 { display: flex; align-items: center; gap: 8px; }
.alerts h2 .ico { color: var(--star); }
.fld { display: grid; gap: 4px; margin: 12px 0; font-size: var(--fs-sm); }
.fld input { background: var(--sky); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--text); font: inherit; }
.fs { border: 0; padding: 0; margin: 10px 0; }
.fs legend { font-weight: 600; margin-bottom: 6px; }
.opt-r { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 8px 0; cursor: pointer; }
.opt-r input { margin-top: 5px; accent-color: var(--star); }
.opt-r small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.opt-r .ico { width: 16px; height: 16px; color: var(--star); }
.types { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px 30px; }
.types.dimmed { opacity: .45; }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--fs-xs); cursor: pointer; }
.chk input { accent-color: var(--star); margin: 0; }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); background: var(--sky-3); border-radius: 10px; padding: 9px 12px; }
.note .ico { color: var(--star); flex: none; margin-top: 3px; width: 18px; height: 18px; }
.mine { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mine b { display: flex; gap: 6px; align-items: center; }
.mine b .ico { width: 16px; height: 16px; color: var(--star); }
.mine-r { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.mine-r small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.link { background: none; border: 0; color: var(--teal); cursor: pointer; font-size: var(--fs-xs); }
.link-danger { color: var(--bad); border-color: transparent; background: transparent; }

/* install */
.install-bar { display: grid; grid-template-columns: 22px 1fr auto 30px; gap: 10px; align-items: center; margin-top: 12px; padding: 8px 6px 8px 12px; border-radius: 12px; background: var(--sky-2); border: 1px solid var(--star); font-size: var(--fs-sm); line-height: 1.4; }
.install-bar > .ico { color: var(--star); }
.install-bar .btn { padding: 7px 14px; }
.install-bar .x { background: none; border: 0; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.install-bar .x .ico { width: 16px; height: 16px; }
.steps { padding-left: 20px; margin: 10px 0; }
.steps li { margin-bottom: 6px; }
.sheet h2 .ico { color: var(--star); }

/* Article content from WordPress: never wider than the screen
   (captions / embeds / tables often carry fixed widths like style="width:1210px"). */
main { overflow-x: clip; }
.prose { max-width: 100%; }
.prose * { max-width: 100% !important; box-sizing: border-box; }
.prose figure, .prose .wp-caption, .prose .wp-block-image, .prose .wp-block-embed, .prose [style*="width"] { width: auto !important; margin-left: 0 !important; margin-right: 0 !important; }
.prose img, .prose video { height: auto !important; display: block; }
.prose iframe { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0; }
.prose pre, .prose code { white-space: pre-wrap; word-break: break-word; }
.prose .alignleft, .prose .alignright { float: none !important; margin: 1em 0 !important; }
.prose .wp-block-columns { display: block !important; }
