
/* phones and the app: the chart names as the same small open tabs as on computers (2026-10-13, Emilian: "I like how we have tabs for
   open charts on desktop"), standing on the bottom menu's top edge at the left; the + after them adds the next chart */
@media (max-width: 760px) { html:root:not(.embed) body { --zs-ptab: 1; } }
html.app:root:not(.embed) body { --zs-ptab: 1; }
@media (max-width: 760px) {
  html:root:not(.embed) body .cs-line { position: fixed !important; top: auto !important; bottom: calc(var(--tab-h, 64px) - 1px) !important; left: 14px !important; right: auto !important;
    width: auto !important; min-width: 0; max-width: calc(100vw - 72px) !important; min-height: 0 !important; height: auto !important; display: flex !important; align-items: flex-end; gap: 4px;
    padding: 0 !important; margin: 0 !important; opacity: 1 !important; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; z-index: 31; }
}
html.app:root:not(.embed) body .cs-line { position: fixed !important; top: auto !important; bottom: calc(var(--tab-h, 64px) - 1px) !important; left: 14px !important; right: auto !important;
  width: auto !important; min-width: 0; max-width: calc(100vw - 72px) !important; min-height: 0 !important; height: auto !important; display: flex !important; align-items: flex-end; gap: 4px;
  padding: 0 !important; margin: 0 !important; opacity: 1 !important; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; z-index: 31; }
html:root body .cs-line::-webkit-scrollbar { display: none; }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line #csLow { opacity: 1 !important; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line :is(.cs-two, .cs-low:not([hidden])) { position: static !important; display: flex; align-items: flex-end; gap: 4px; height: auto !important; top: auto !important; left: auto !important; width: auto !important; max-width: none !important; margin: 0 !important; transform: none; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) { position: static !important; display: inline-flex; align-items: center; gap: 6px; height: 34px !important; line-height: 1 !important; padding: 0 13px !important; margin: 0 !important; max-width: 150px; min-width: 0; flex: none; font: 500 16px/1 Cormorant, serif !important; letter-spacing: 0 !important; color: var(--text) !important; border-radius: 11px 11px 0 0 !important; border: 1px solid var(--tab-edge, var(--line)) !important; border-bottom: 0 !important; background: var(--tab-bg, var(--card)) !important; white-space: nowrap; cursor: grab; touch-action: none; transition: background-color .15s; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) > span { overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) .cs-ring { display: none !important; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line .cs-lift { position: relative; z-index: 2; box-shadow: 0 -6px 20px rgba(0,0,0,.18) !important; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line .cs-drop-on { background: color-mix(in srgb, var(--tab-bg, var(--card)) 82%, var(--accent)) !important; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3) { position: static !important; display: inline-grid; place-items: center; width: 36px !important; height: 30px !important; margin: 0 !important; padding: 0 !important; top: auto !important; left: auto !important; flex: none; border-radius: 10px 10px 0 0 !important; border: 1px dashed var(--tab-edge, var(--line)) !important; border-bottom: 0 !important; background: transparent !important; color: var(--accent) !important; opacity: 1 !important; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3)[hidden] { display: none !important; } }
@media (max-width: 760px) { html:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3) svg { display: block; width: 11px; height: 11px; } }
html.app:root:not(.embed) body .cs-line #csLow { opacity: 1 !important; }
html.app:root:not(.embed) body .cs-line :is(.cs-two, .cs-low:not([hidden])) { position: static !important; display: flex; align-items: flex-end; gap: 4px; height: auto !important; top: auto !important; left: auto !important; width: auto !important; max-width: none !important; margin: 0 !important; transform: none; }
html.app:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) { position: static !important; display: inline-flex; align-items: center; gap: 6px; height: 34px !important; line-height: 1 !important; padding: 0 13px !important; margin: 0 !important; max-width: 150px; min-width: 0; flex: none; font: 500 16px/1 Cormorant, serif !important; letter-spacing: 0 !important; color: var(--text) !important; border-radius: 11px 11px 0 0 !important; border: 1px solid var(--tab-edge, var(--line)) !important; border-bottom: 0 !important; background: var(--tab-bg, var(--card)) !important; white-space: nowrap; cursor: grab; touch-action: none; transition: background-color .15s; }
html.app:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) > span { overflow: hidden; text-overflow: ellipsis; }
html.app:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) .cs-ring { display: none !important; }
html.app:root:not(.embed) body .cs-line .cs-lift { position: relative; z-index: 2; box-shadow: 0 -6px 20px rgba(0,0,0,.18) !important; }
html.app:root:not(.embed) body .cs-line .cs-drop-on { background: color-mix(in srgb, var(--tab-bg, var(--card)) 82%, var(--accent)) !important; }
html.app:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3) { position: static !important; display: inline-grid; place-items: center; width: 36px !important; height: 30px !important; margin: 0 !important; padding: 0 !important; top: auto !important; left: auto !important; flex: none; border-radius: 10px 10px 0 0 !important; border: 1px dashed var(--tab-edge, var(--line)) !important; border-bottom: 0 !important; background: transparent !important; color: var(--accent) !important; opacity: 1 !important; }
html.app:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3)[hidden] { display: none !important; }
html.app:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3) svg { display: block; width: 11px; height: 11px; }
@media (max-width: 760px) { html:root:not(.embed):not([data-theme="dark"]) body .cs-line { --tab-bg: color-mix(in srgb, var(--pgl, #f3ecdf) 72%, var(--zs-lift, #fff)); --tab-edge: color-mix(in srgb, var(--pgl, #f3ecdf) 80%, #3a2a14); }
  html:root:not(.embed)[data-theme="dark"] body .cs-line { --tab-bg: color-mix(in srgb, var(--pagebg, #121216) 93%, var(--zs-gold, #b89a5e)); --tab-edge: color-mix(in srgb, var(--zs-gold, #b89a5e) 38%, transparent); } }
html.app:root:not(.embed):not([data-theme="dark"]) body .cs-line { --tab-bg: color-mix(in srgb, var(--pgl, #f3ecdf) 72%, var(--zs-lift, #fff)); --tab-edge: color-mix(in srgb, var(--pgl, #f3ecdf) 80%, #3a2a14); }
html.app:root:not(.embed)[data-theme="dark"] body .cs-line { --tab-bg: color-mix(in srgb, var(--pagebg, #121216) 93%, var(--zs-gold, #b89a5e)); --tab-edge: color-mix(in srgb, var(--zs-gold, #b89a5e) 38%, transparent); }

/* Phone chart tabs at the bottom, on a solid menu bar (2026-10-13, Emilian: "Let's try and see how they look in both positions. Also, if we keep
   the tabs at the bottom, we can just make a bar menu for all the other options at the bottom, that way it all looks more stable").
   Bottom: the menu becomes one solid bar edge to edge and the tabs stand on it, the same colour, so tab and bar read as one piece.
   Top was tried too (tabs hanging from the date bar); Emilian chose the bottom. */
:root { --zs-bar-bg: color-mix(in srgb, var(--pgl, #f3ecdf) 93%, var(--accent)); --zs-bar-edge: color-mix(in srgb, var(--accent) 28%, var(--line)); }
:root[data-theme="dark"] { --zs-bar-bg: var(--bgd-onyx, #121216); --zs-bar-edge: color-mix(in srgb, var(--zs-gold, #b89a5e) 55%, transparent); }
@media (max-width: 760px) {
  html:root:not(.embed) body .tabbar::before { display: block !important; left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important; border-radius: 0 !important;
    background: var(--zs-bar-bg) !important; border: 0 !important; border-top: 1px solid var(--zs-bar-edge) !important; box-shadow: 0 -4px 16px rgba(60, 40, 10, .06) !important; }
  html:root:not(.embed)[data-theme="dark"] body .tabbar::before { box-shadow: 0 -1px 12px color-mix(in srgb, var(--zs-gold, #b89a5e) 16%, transparent) !important; }
  html:root:not(.embed) body .cs-line { --tab-bg: var(--zs-bar-bg) !important; --tab-edge: var(--zs-bar-edge) !important; z-index: 41 !important; bottom: calc(var(--tab-h, 64px) - 3px) !important; padding-bottom: 3px !important; }
}
html.app:root:not(.embed) body .tabbar::before { display: block !important; left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important; border-radius: 0 !important;
  background: var(--zs-bar-bg) !important; border: 0 !important; border-top: 1px solid var(--zs-bar-edge) !important; box-shadow: 0 -4px 16px rgba(60, 40, 10, .06) !important; }
html.app:root:not(.embed)[data-theme="dark"] body .tabbar::before { box-shadow: 0 -1px 12px color-mix(in srgb, var(--zs-gold, #b89a5e) 16%, transparent) !important; }
html.app:root:not(.embed) body .cs-line { --tab-bg: var(--zs-bar-bg) !important; --tab-edge: var(--zs-bar-edge) !important; z-index: 41 !important; bottom: calc(var(--tab-h, 64px) - 3px) !important; padding-bottom: 3px !important; }

/* the bottom menu lower and slimmer, so the bar and the chart tabs take less room (2026-10-13, Emilian: "bring the bottom menu lower then.
   Now it takes up too much space"): less padding above and below the icons, the icon and its word closer, the chart tabs a little shorter; on iPhones the space under the words was still much more than above
   the icons (12:00, "no longer matches padding at the top"), so only a quarter of the home-line space is kept, just enough to stay clear of it;
   since 2026-11-14 12:42 (Emilian: "Bottom menu on mobile also needs to go down further and have less padding from bottom") 40% of it (about
   14pt on an iPhone, the home line's top sits ~13pt up; a quarter put the line on the words in October) and 3px above the icons;
   since 2026-11-18 (Emilian: "the buttons have more padding from bottom than from top. Can you bring them down so that padding is equal, and there is
   less empty space at the very bottom?") 8px above and 27% of the home-line space below, about 9-10px each side on an iPhone */
@media (max-width: 760px) {
  html:root:not(.embed) body .tabbar { padding-top: 8px !important; padding-bottom: max(calc(max(env(safe-area-inset-bottom, 0px), var(--sab, 0px)) * .27), 4px) !important; }
  html:root:not(.embed) body .tabbar .tab { min-height: 0 !important; padding-top: 1px !important; padding-bottom: 1px !important; gap: 1px !important; row-gap: 1px !important; }
  html:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) { height: 30px !important; }
  html:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3) { height: 27px !important; }
}
html.app:root:not(.embed) body .tabbar { padding-top: 8px !important; padding-bottom: max(calc(max(env(safe-area-inset-bottom, 0px), var(--sab, 0px)) * .27), 4px) !important; }
html.app:root:not(.embed) body .tabbar .tab { min-height: 0 !important; padding-top: 1px !important; padding-bottom: 1px !important; gap: 1px !important; row-gap: 1px !important; }
html.app:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) { height: 30px !important; }
html.app:root:not(.embed) body .cs-line :is(#csPlus, #csPlus3) { height: 27px !important; }
/* the empty space after the last chart tab opens the next one (2026-11-06 11:31, Emilian: "can you make it so clicking in the empty
   space next to the open chart tab, will open another tab?"): the hidden + is back as an invisible slot where the next tab would stand */
/* stronger than the app's and phones' dashed + rules (12:43, the dashed outline still showed in the app) */
html:root:not(.x):not(.embed) body .cs-line :is(#csPlus, #csPlus3):not([hidden]) { display: block !important; opacity: 0 !important; border: 0 !important; background: transparent !important;
  box-shadow: none !important; width: 130px !important; height: 40px !important; padding: 0 !important; cursor: pointer; }
html:root:not(.x):not(.embed) body .cs-line :is(#csPlus, #csPlus3):not([hidden]) svg { display: none !important; }
@media (max-width: 760px) { html:root:not(.x):not(.embed) body .cs-line :is(#csPlus, #csPlus3):not([hidden]) { width: 90px !important; height: 30px !important; } }
html.app:root:not(.x):not(.embed) body .cs-line :is(#csPlus, #csPlus3):not([hidden]) { width: 90px !important; height: 30px !important; }
/* the tabs end exactly on the bar's top line, their side lines stop there; a short strip the tab's own colour covers the line under
   each tab, so tab and bar join with nothing crossing into the menu (2026-10-13 12:05, Emilian: "the lines cross down into the menu, clean that up") */
@media (max-width: 760px) {
  html:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) { position: relative !important; overflow: visible !important; }
  html:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2.5px; background: var(--tab-bg); pointer-events: none; }
}
html.app:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird) { position: relative !important; overflow: visible !important; }
html.app:root:not(.embed) body .cs-line :is(#csTitle, #csSecond, #csThird)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2.5px; background: var(--tab-bg); pointer-events: none; }
/* the chart tabs belong to View: they stand above the bottom bar (so they can open into it), which also put them above the full screens
   (Charts, Profile, Journal, Stream, Cartography); they now fade out while one of those is open and back in when it closes
   (2026-10-13 12:22, Emilian: "When I move over to charts tab, the open charts tabs from view screen follow. Fix") */
html:root body .cs-line { transition: opacity .2s cubic-bezier(.32,.72,0,1), visibility 0s linear 0s; }
html:root:has(#charts:not([hidden]), #profileScr:not([hidden]), #zsm:not([hidden]), #journal:not([hidden]), #stream:not([hidden]), #acgMap:not([hidden])) body .cs-line {
  opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transition: opacity .2s cubic-bezier(.32,.72,0,1), visibility 0s linear .2s; }
/* Back to now narrow on phones, so its tap area never reaches the arrows or the date (2026-10-13 12:35, Emilian: "The return button on
   mobile is too close to the day arrows, so I end up clicking on it instead of fast forwarding"); since 13:25 it sits between the date
   and ‹ on the right (below) */
@media (max-width: 760px) { html:root:not(.embed) body .timebar #bNow:not([data-off]) { width: 28px !important; min-width: 0 !important; padding: 0 !important; justify-content: center; } }
html.app:root:not(.embed) body .timebar #bNow:not([data-off]) { width: 28px !important; min-width: 0 !important; padding: 0 !important; justify-content: center; }
/* Phones: the time controls on the right, under the right thumb (2026-10-13; Alex: the bottom menu is too far from the chart and not
   quite intuitive; Emilian: "most of us use our right thumb to navigate time ... Maybe we should move that to the right side of the top
   bar?"). Left, right and below were compared in the preview (13:25: "keep it as is, just move time to the right side, then switch the
   search and toggle button positions"): Toggle planets then search on the left, the date in the middle, Back to now, then ‹ Day › on the
   right. The empty space under the wheel is kept on purpose: tapping a planet may show its information there later (12:43). */
@media (max-width: 760px) { html:root:not(.embed) body .timebar #bNow { order: 5 !important; margin-left: auto !important; margin-right: -12px !important; } }
html.app:root:not(.embed) body .timebar #bNow { order: 5 !important; margin-left: auto !important; margin-right: -12px !important; }
@media (max-width: 760px) { html:root:not(.embed) body .timebar #bNow[data-off] { margin-right: 0 !important; } html:root:not(.embed) body .timebar #bNow:not([data-off]) { width: 28px !important; } }
html.app:root:not(.embed) body .timebar #bNow[data-off] { margin-right: 0 !important; }
html.app:root:not(.embed) body .timebar #bNow:not([data-off]) { width: 28px !important; }
@media (max-width: 760px) { html:root:not(.embed) body .timebar #tBack { order: 6 !important; } }
html.app:root:not(.embed) body .timebar #tBack { order: 6 !important; }
@media (max-width: 760px) { html:root:not(.embed) body .timebar .units-slot { order: 7 !important; } }
html.app:root:not(.embed) body .timebar .units-slot { order: 7 !important; }
@media (max-width: 760px) { html:root:not(.embed) body .timebar #tFwd { order: 8 !important; margin-right: 0 !important; } }
html.app:root:not(.embed) body .timebar #tFwd { order: 8 !important; margin-right: 0 !important; }
@media (max-width: 760px) { html:root:not(.embed) body .timebar #findBtn { order: 2 !important; margin-left: -12px !important; } }
html.app:root:not(.embed) body .timebar #findBtn { order: 2 !important; margin-left: -12px !important; }
@media (max-width: 760px) { html:root:not(.embed) body .timebar .pl-wrap { order: 1 !important; } }
html.app:root:not(.embed) body .timebar .pl-wrap { order: 1 !important; }
@media (max-width: 760px) { html:root:not(.embed) body .timebar .when { left: 50% !important; } }
html.app:root:not(.embed) body .timebar .when { left: 50% !important; }
/* Profile and the More menu follow the chosen page colour (2026-10-13 13:51, Emilian: "Make the profile tab match the current color
   theme"; "When you click menu, make it match the rest of the theme. Now it looks too out of place"): they had kept Cream / Onyx
   whatever page colour or night tone was picked. By day the page colour (cards a lighter shade of it), at night the night tone. */
:root { --zs-surf: color-mix(in srgb, var(--pgl, #f3ecdf) 72%, var(--zs-lift, #fff)); }
:root[data-theme="dark"] { --zs-surf: var(--pagebg, #121216); }
html:root body #profileScr, html:root body #zsm { background: var(--pgl, #f3ecdf) !important; }
html:root[data-theme="dark"] body #profileScr, html:root[data-theme="dark"] body #zsm { background: var(--pagebg, #121216) !important; }
html:root:not([data-theme="dark"]) body :is(#profileScr, #zsm) { --card: var(--zs-surf); }
html:root body #moreMenu.more-menu { background: var(--zs-surf) !important; }
/* night: the bottom bar takes the night tone too (Onyx stays Onyx) */
:root[data-theme="dark"] { --zs-bar-bg: var(--pagebg, var(--bgd-onyx, #121216)); }
/* the date window: the month centred like the other fields, Show without its gold outline (13:52, Emilian: "When you click on the time
   at the top - center the month. And, remove the gold outline around the "show" button") */
html:root body #calPanel.cal.mo #moM { text-align: center !important; }
html:root body #calPanel.cal.mo .mo-show, html:root[data-theme="dark"] body #calPanel.cal.mo .mo-show { border-color: transparent !important; }
/* while a planet is lit, the other aspect lines leave the middle of the chart altogether (2026-10-13 13:53, Emilian: "all other aspect
   lines are hidden from the middle of the chart"); the other planets still step back to 8% */
html:root body #svg [data-pp].zs-tdim { opacity: 0 !important; }
/* the ring icons beside the names are gone on phones with three charts open (2026-10-13, Emilian: "remove the little icons") */
/* Charts on phones: View or Profile (2026-10-13) */
