/* AEON · Shell (Scene). Ersetzt alte Seitenleiste, Dock und Route-Links durch eine Glas-Navigation. */
html.shell { --sh-g: rgba(16,17,16,.5); --sh-hl: inset 0 0 0 1px rgba(255,255,255,.09); --sh-ez: cubic-bezier(.23,1,.32,1); --sh-ac: var(--accent, #E9A35B); --sh-mono: "JetBrains Mono", ui-monospace, monospace; }
html.shell #aeon-sidebar, html.shell .mobile-dock, html.shell .nav-toggle, html.shell .nav-backdrop, html.shell .aeon-route-link { display: none !important; }
html.shell body.has-sidebar, html.shell body { --sidebar-width: 0px; }
.sh-glass, .sh-rail, .sh-search, .sh-race, .sh-sub, .sh-dock { background: var(--sh-g); -webkit-backdrop-filter: blur(26px) saturate(165%); backdrop-filter: blur(26px) saturate(165%); box-shadow: var(--sh-hl), 0 18px 50px rgba(0,0,0,.28); }
.sh-rail svg, .sh-top svg, .sh-dock svg { width: 20px; height: 20px; flex: none; }
.sh-rail a, .sh-top a, .sh-top button, .sh-dock a, .sh-sub button { -webkit-tap-highlight-color: transparent; transition: transform .16s var(--sh-ez), background-color .25s, color .25s; }
.sh-rail a:active, .sh-top a:active, .sh-top button:active, .sh-dock a:active, .sh-sub button:active { transform: scale(.96); }
:is(.sh-rail, .sh-top, .sh-dock, .sh-sub) :focus-visible { outline: 2px solid var(--sh-ac); outline-offset: 2px; }

/* ── Kopfzeile ── */
.sh-top { position: relative; z-index: 20; display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 0 12px; color: #F5F5F7; font: 400 13px/1.3 Inter, system-ui, sans-serif; }
.sh-logo { display: flex; align-items: center; gap: 9px; color: #F5F5F7; text-decoration: none; font-size: 20px; font-weight: 600; letter-spacing: -.045em; flex: none; }
.sh-logo i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--sh-ac); box-shadow: 0 6px 22px rgba(233,163,91,.32); }
.sh-logo i svg { width: 17px; height: 17px; stroke: #1a1206; }
.sh-logo b span { color: var(--sh-ac); }
.sh-search { flex: 1; min-width: 0; max-width: 440px; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; border: 0; border-radius: 99px; color: rgba(245,245,247,.42); font: inherit; text-align: left; cursor: pointer; }
.sh-search svg { width: 15px; height: 15px; stroke: rgba(245,245,247,.6); }
.sh-search span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sh-search kbd { margin-left: auto; padding: 3px 6px; border-radius: 6px; background: rgba(255,255,255,.07); font: 500 10px var(--sh-mono); color: rgba(245,245,247,.4); }
.sh-race { display: flex; align-items: center; gap: 8px; margin-left: auto; height: 38px; padding: 0 14px; border-radius: 99px; color: #F5F5F7; text-decoration: none; font-size: 12px; white-space: nowrap; }
.sh-race[hidden] { display: none; }
.sh-race svg { width: 14px; height: 14px; stroke: var(--sh-ac); }
.sh-race b { font: 600 11px var(--sh-mono); color: var(--sh-ac); }
.sh-me { display: flex; align-items: center; gap: 10px; flex: none; color: #F5F5F7; text-decoration: none; }
.sh-race[hidden] + .sh-me { margin-left: auto; }
.sh-me i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font: 600 12px/1 Inter, sans-serif; font-style: normal; color: #1a1206; background: linear-gradient(135deg, #F3C99A, var(--sh-ac)); }
.sh-me span { display: none; font-size: 13px; font-weight: 500; line-height: 1.2; }
.sh-me small { display: block; color: rgba(245,245,247,.38); font-size: 11px; font-weight: 400; }
@media (hover: none) { .sh-search kbd { display: none; } }

/* ── Unterbereiche: Segment-Pille mit gleitendem Indikator ── */
.sh-sub { position: relative; z-index: 15; display: flex; gap: 2px; width: max-content; max-width: 100%; margin: 4px 0 18px; padding: 4px; border-radius: 99px; overflow-x: auto; scrollbar-width: none; }
.sh-sub::-webkit-scrollbar { display: none; }
.sh-sub[hidden] { display: none; }
.sh-sub button { position: relative; z-index: 1; flex: none; height: 34px; padding: 0 15px; border: 0; border-radius: 99px; background: none; color: rgba(245,245,247,.6); font: 500 13px/1 Inter, system-ui, sans-serif; letter-spacing: -.01em; cursor: pointer; white-space: nowrap; }
.sh-sub button[aria-selected="true"] { color: #1a1206; font-weight: 600; }
.sh-ind { position: absolute; left: 0; top: 4px; height: 34px; border-radius: 99px; background: var(--sh-ac); opacity: 0; pointer-events: none; transition: transform .42s var(--sh-ez), width .42s var(--sh-ez), opacity .2s; }
.sh-sub .sh-ind { left: 0; }

/* ── Dock (Handy) ── */
.sh-dock { position: fixed; z-index: 120; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px; border-radius: 26px; }
.sh-dock .sh-ind { top: 5px; height: calc(100% - 10px); border-radius: 21px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sh-dock a { position: relative; z-index: 1; display: grid; place-items: center; gap: 3px; min-height: 52px; padding: 6px 0 4px; border-radius: 21px; color: rgba(245,245,247,.5); text-decoration: none; font: 500 10.5px/1 Inter, system-ui, sans-serif; letter-spacing: -.005em; }
.sh-dock a svg { width: 22px; height: 22px; }
.sh-dock a[aria-current="page"] { color: #F5F5F7; }
.sh-dock a[aria-current="page"] svg { stroke: var(--sh-ac); }
.sh-rail { display: none; }

@media (max-width: 759px) {
  html.shell body { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  .sh-top { gap: 10px; }
  .sh-search { flex: none; width: 40px; padding: 0; justify-content: center; margin-left: auto; }
  .sh-search span, .sh-search kbd { display: none; }
  .sh-race { margin-left: 0; height: 36px; padding: 0 11px; }
  .sh-race span { display: none; }
  .sh-race:not([hidden]) ~ .sh-me { margin-left: 0; }
  .sh-sub { margin-inline: -16px; padding-inline: 4px; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; width: auto; }
  .sh-sub button { background: rgba(255,255,255,.06); margin-right: 4px; }
  .sh-sub .sh-ind { top: 4px; }
}

/* ── Desktop: Glas-Leiste links ── */
@media (min-width: 760px) {
  html.shell body.has-sidebar, html.shell body { padding-left: 120px !important; padding-right: 32px !important; }
  .sh-dock { display: none; }
  .sh-rail { position: fixed; z-index: 120; left: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; width: 68px; padding: 12px 10px; border-radius: 28px; overflow: hidden; transition: width .36s var(--sh-ez); }
  .sh-rail:hover, .sh-rail:focus-within { width: 214px; }
  .sh-rail a { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 13px; border-radius: 16px; color: rgba(245,245,247,.55); text-decoration: none; font: 500 13.5px/1 Inter, system-ui, sans-serif; white-space: nowrap; }
  .sh-rail a span { opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .36s var(--sh-ez); }
  .sh-rail:hover a span, .sh-rail:focus-within a span { opacity: 1; transform: none; }
  .sh-rail a:hover { color: #F5F5F7; background: rgba(255,255,255,.06); }
  .sh-rail a[aria-current="page"] { color: #F5F5F7; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
  .sh-rail a[aria-current="page"] svg { stroke: var(--sh-ac); }
  .sh-rail .sh-mark { height: 46px; padding: 0 11px; margin-bottom: 6px; }
  .sh-rail .sh-mark svg { width: 24px; height: 24px; padding: 4px; box-sizing: content-box; border-radius: 9px; background: var(--sh-ac); stroke: #1a1206; margin-left: -4px; }
  .sh-items, .sh-foot { display: flex; flex-direction: column; gap: 4px; }
  .sh-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
  .sh-top .sh-logo { display: none; }
}
@media (min-width: 1000px) { .sh-me span { display: block; } }
@media (prefers-reduced-motion: reduce) { .sh-ind, .sh-rail, .sh-rail a span { transition: none !important; } }

/* ── Hintergrund außerhalb von „Heute“: nur Stimmung, unscharf und dunkel ── */
html.shell #scene-world { transition: filter .9s var(--sh-ez), transform .9s var(--sh-ez); }
html.shell:not(.dash-on) #scene-world { filter: blur(22px) brightness(.32) saturate(.85); transform: scale(1.08); }
html.shell #scene-world .sw-attr { opacity: .5; }
@media (max-width: 759px) { html.shell #scene-world .sw-attr { bottom: calc(84px + env(safe-area-inset-bottom)) !important; } }

/* ── Trainings-Unterbereiche im gleichen Segment-Stil; Wettkampf/Ziele leben im Bereich „Ziele“ ── */
html.shell .training-directory { display: flex; gap: 2px; width: max-content; max-width: 100%; padding: 4px; border-radius: 99px; overflow-x: auto; scrollbar-width: none; border: 0;
  background: var(--sh-g); -webkit-backdrop-filter: blur(26px) saturate(165%); backdrop-filter: blur(26px) saturate(165%); box-shadow: var(--sh-hl); }
html.shell .training-directory::-webkit-scrollbar { display: none; }
html.shell .training-directory a { flex: none; height: 34px; display: inline-flex; align-items: center; padding: 0 15px; border: 0 !important; border-radius: 99px; color: rgba(245,245,247,.6); font: 500 13px/1 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap; box-shadow: none !important; transition: background-color .3s var(--sh-ez), color .3s; }
html.shell .training-directory a[aria-current="page"] { background: var(--sh-ac); color: #1a1206; font-weight: 600; }
html.shell .training-directory a::after { display: none !important; }
html[data-hub="training"].shell .training-directory a[href^="#plan/wettkampf"] { display: none; }
html[data-hub="ziele"].shell .training-nav { display: none; }
@media (max-width: 759px) { html.shell .training-directory { margin-inline: -16px; padding-inline: 12px; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; width: auto; }
  html.shell .training-directory a { background: rgba(255,255,255,.06); margin-right: 4px; } }
html.shell:not(.dash-on) #scene-btn, html.shell:not(.dash-on) #scene-panel { display: none !important; }

#dash-cmd { position: fixed; inset: 0; z-index: 2147482000; display: flex; justify-content: center; align-items: flex-start; padding: max(70px, env(safe-area-inset-top)) 14px 14px; background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#dash-cmd[hidden] { display: none; }
#dash-cmd .box { width: min(560px, 100%); max-height: 70vh; overflow: auto; padding: 8px; color: #F5F5F7; font: 400 14px Inter, system-ui, sans-serif; background: rgba(20,21,20,.78); -webkit-backdrop-filter: blur(28px) saturate(165%); backdrop-filter: blur(28px) saturate(165%); border-radius: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 30px 80px rgba(0,0,0,.5); }
#dash-cmd input { width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 16px; outline: none; }
#dash-cmd ul { list-style: none; margin: 6px 0 0; padding: 0; }
#dash-cmd li button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
#dash-cmd li button small { color: rgba(245,245,247,.4); font: 500 10px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
#dash-cmd li button[aria-selected="true"] { background: rgba(233,163,91,.16); color: var(--accent, #E9A35B); }

dialog#dash-cmd {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
}
dialog#dash-cmd:not([open]) { display: none; }
dialog#dash-cmd::backdrop { background: transparent; }
dialog#dash-cmd .sh-empty { padding: 8px 14px; color: inherit; }

/* Keep section names in view when the screen can accommodate a full sidebar. */
@media (min-width: 1200px) {
  html.shell body, html.shell body.has-sidebar { padding-left: 218px !important; }
  .sh-rail, .sh-rail:hover, .sh-rail:focus-within { width: 176px; }
  .sh-rail a span { opacity: 1; transform: none; }
}
.sh-me[aria-current="page"] i { box-shadow: 0 0 0 2px var(--sh-ac); }
.sh-sub button { min-height: 44px; }
.sh-sub .sh-ind { height: 44px; }
@media (max-width: 759px) {
  .sh-search, .sh-me, .sh-race { min-height: 44px; min-width: 44px; }
}
.load-retry { max-width: 32rem; margin: 12vh auto 0; padding: 20px; }
.load-retry h1 { font-size: clamp(22px, 4vw, 30px); line-height: 1.15; }
.load-retry p { margin: 12px 0 20px; }

/* ── „Mehr“ unter Ziele ── */
.sh-more { position: absolute; z-index: 200; min-width: 180px; padding: 6px; border-radius: 16px; display: grid; gap: 2px; animation: shMore .18s cubic-bezier(.23,1,.32,1) both; }
.sh-more button { text-align: left; border: 0; background: none; color: #F5F5F7; font: 500 14px/1 Inter, system-ui, sans-serif; padding: 12px 14px; border-radius: 11px; cursor: pointer; }
.sh-more button:hover, .sh-more button:focus-visible { background: rgba(255,255,255,.08); outline: none; }
@keyframes shMore { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* Athleten-Edition: Joshs persönliche Einstiege ausblenden */
html[data-edition="athlete"] .aeon-route-link--os,
html[data-edition="athlete"] .owner-only { display: none !important; }
