/* AEON Graphite: neutral black, graphite and silver; photographic discipline cues,
   restrained motion. Keep the calendar and its evidence readable first. */
/* Tokens kommen aus aeon-tokens.css (keine Grautöne für die Ampel mehr). */
html::before,html::after { display:none; }
html body { background:var(--bg); }
body.has-sidebar .aeon-sidebar { background:#0d0d10; border-right-color:var(--line); }
body.has-sidebar #tabs button { border-radius:7px; }
body.has-sidebar #tabs button[aria-current="page"] { background:var(--accent-soft); color:var(--accent); }
.sidebar-brand a { letter-spacing:-.055em; }
.card,.group { border-radius:var(--r); background:var(--panel); }
.num,.display { font-stretch:normal; letter-spacing:-.045em; }
.btn,.chip,.homecal-now,.homecal-nav { border-radius:7px; }
.btn.primary { background:var(--text); color:var(--bg); border-color:var(--text); box-shadow:none; }
.btn { transition:background 180ms,color 180ms,transform 200ms var(--endurance-ease); }
.btn:active { transform:scale(.975); }
::selection { background:rgba(221,221,227,.28);color:var(--text); }
.su-i.ok { background:var(--accent);color:var(--accent-ink); }
.sw.on { background:var(--accent); }
.sw.on::after { background:var(--accent-ink); }
input[type="checkbox"],input[type="radio"] { accent-color:var(--accent); }
.today-workspace .nx { border-color:var(--line);background:var(--panel); }
.homecal { padding:24px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.homecal-header { gap:28px; margin-bottom:20px; align-items:center; }
.homecal-header > div:first-child { min-width:0; flex:1; }
.homecal-eyebrow { font-size:10px; letter-spacing:.13em; font-weight:570; }
.homecal-range { font-size:clamp(27px,3.4vw,46px); font-weight:560; letter-spacing:-.065em; margin:12px 0 7px; }
.homecal-summary { font-size:12px; color:var(--text-2); }
.homecal-photography { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; width:37%; min-width:220px; max-width:410px; height:146px; overflow:hidden; border-radius:6px; background:var(--surface-2); }
.homecal-photography figure { margin:0; position:relative; min-width:0; overflow:hidden; background:#1b1b20; }
.homecal-photography figure::after { content:"";position:absolute;inset:0;background:linear-gradient(transparent 50%,rgba(0,0,0,.68));pointer-events:none; }
.homecal-photography img { width:100%;height:100%;object-fit:cover;filter:grayscale(1) contrast(1.06) brightness(.78); }
.homecal-photography figure:first-child img { object-position:52% center; }
.homecal-photography figcaption { position:absolute;bottom:10px;left:10px;z-index:1;color:var(--text);font-size:10px;font-weight:560;letter-spacing:.12em;text-transform:uppercase; }
.homecal-toolbar { gap:12px; margin-bottom:16px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.homecal-layout { border-radius:7px; background:transparent; padding:2px; }
.homecal-layout > button { border-radius:4px; min-height:35px; }
.homecal-layout > button[aria-pressed="true"] { background:var(--surface-2);box-shadow:none; }
.homecal-actions { gap:6px; }
.homecal-actions .btn { min-height:38px; padding:9px 12px; }
.homecal-actions .homecal-record { background:transparent; }
.homecal-nav,.homecal-now { min-height:38px; background:transparent; }
.homecal-actions > .btn.primary { border-radius:7px;min-height:38px;padding:0 14px; }
.homecal-volume { margin-bottom:14px; }
.homecal-metrics { gap:0; border-bottom:1px solid var(--line); padding-bottom:14px; }
.homecal-metric { border:0; border-radius:0; background:none; padding:3px 16px; }
.homecal-metric:first-child { padding-left:0; }
.homecal-metric + .homecal-metric { border-left:1px solid var(--line); }
.homecal-metric.is-accent { border-color:var(--line); background:none; }
.homecal-metric strong { font-size:clamp(23px,2.7vw,35px); font-weight:540; }
.homecal-metric.is-accent strong { color:var(--accent); }
.homecal-metric small { line-height:1.45; }
.homecal-volume-details { margin-top:3px; }
.homecal-volume-details > summary { min-height:32px; padding:7px 0; font-size:11px; }
.homecal-coach-focus { display:grid;grid-template-columns:minmax(145px,.7fr) minmax(0,1.8fr) auto;align-items:center;gap:20px;padding:17px 0 20px;margin-bottom:16px;border-bottom:1px solid var(--line); }
.homecal-focus-state { display:grid; gap:5px; }
.homecal-focus-state b { font-size:14px;font-weight:550; }
.homecal-focus-state small { font-size:11px; color:var(--text-2); }
.homecal-focus-session { min-width:0; }
.homecal-focus-session h3 { margin:6px 0;font-size:20px;font-weight:550;letter-spacing:-.04em;line-height:1.25; }
.homecal-focus-dose { margin:0;font-size:12px;color:var(--text-2);font-variant-numeric:tabular-nums; }
.homecal-focus-why { margin:7px 0 0;font-size:12px;line-height:1.5;color:var(--text-2);max-width:65ch; }
.homecal-focus-change { margin:8px 0 0;font-size:12px;line-height:1.45;color:var(--yellow); }
.homecal-plan-note { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);color:var(--yellow);font-size:12px;line-height:1.5; }
.homecal-plan-note p { display:grid;gap:3px;margin:0; }
.homecal-plan-note b { font-weight:550; }
.homecal-plan-note .linkbtn { flex-shrink:0;min-height:36px;color:var(--text-2);font-size:11px; }
.session-window-note { margin:7px 0;color:var(--text-3);font-size:11px;line-height:1.5;font-variant-numeric:tabular-nums; }
.session-schedule-notes { border-left:2px solid var(--yellow);padding:1px 0 1px 12px;margin:8px 0 12px;color:var(--yellow);font-size:12px;line-height:1.5; }
.session-schedule-notes p { margin:4px 0; }
.session-schedule-notes small { display:block;margin-top:8px;color:var(--text-2); }
.homecal-event.has-schedule-note .homecal-eventstatus,.week-event.has-schedule-note .week-event-footer { color:var(--yellow); }
.homecal-grid { gap:7px; }
.homecal-day { border-radius:8px;min-height:220px;padding:12px 9px;background:transparent;border-color:var(--line);box-shadow:none; }
.homecal-day.is-today { background:#1a1a1f; }
.homecal-day.is-selected { background:var(--accent-soft);border-color:#9b9ba5;box-shadow:inset 0 2px 0 var(--accent); }
.homecal-daytop { margin-bottom:14px; }
.homecal-daynum { font-size:25px;font-weight:550; }
.homecal-event { border-radius:4px;background:color-mix(in srgb,var(--sport) 5%,var(--panel));padding:9px 7px;border-left-width:2px;gap:4px; }
.homecal-event.is-recorded { background:color-mix(in srgb,var(--green) 7%,var(--panel));border-left-color:var(--green); }
.homecal-eventtitle { font-size:12px;font-weight:560;line-height:1.4; }
.homecal-eventtime,.homecal-eventstatus { font-size:10.5px; }
.homecal-dayfoot { font-size:10px;white-space:normal;line-height:1.5; }
.homecal-empty { border-radius:4px; }
.homecal-day:hover { transform:none; }
.homecal-detail { padding-top:20px;margin-top:20px; }
.homecal-detail-head h3 { font-weight:550;letter-spacing:-.04em; }
.homecal-add { border-radius:8px;background:var(--surface-2);border-color:var(--line); }
.homecal-add h4 { font-size:17px;font-weight:550; }
.homecal-action-copy { font-size:12px; }
.homecal-source-help { font-size:11px; }
.homecal.is-list .homecal-day { min-height:74px;border-radius:6px; }
.homecal.is-list .homecal-event { flex-basis:150px; }
.homecal-footer { font-size:10.5px;line-height:1.5; }
.home-nutrition { border-radius:12px;background:var(--panel); }
.home-nutrition-value strong { font-weight:550; }
.home-nutrition-phase,.home-nutrition-weight-goal,.home-nutrition-progress { border-radius:6px; }
.aeon-compose-dialog { border-radius:14px;box-shadow:0 35px 100px rgba(0,0,0,.45); }
.aeon-compose-dialog[open] { animation:endurance-dialog 350ms var(--endurance-ease) both; }
.aeon-compose-dialog::backdrop { animation:endurance-backdrop 220ms ease both;background:rgba(0,0,0,.65);backdrop-filter:blur(8px); }
.aeon-compose-tabs { border-radius:8px; }
.aeon-compose-tab { border-radius:5px; }
.aeon-compose-tab.active { box-shadow:none;background:var(--panel); }
.aeon-compose-fields input,.aeon-compose-fields select { border-radius:6px; }
@keyframes endurance-dialog { from{opacity:0;transform:translateY(18px) scale(.985)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes endurance-backdrop { from{opacity:0} to{opacity:1} }
@keyframes endurance-arrive { from{opacity:.15;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@media(prefers-reduced-motion:no-preference) {
  .enter .homecal-header { animation:endurance-arrive 420ms var(--endurance-ease) both; }
  .enter .homecal-metrics { animation:endurance-arrive 420ms var(--endurance-ease) 40ms both; }
  .enter .homecal-grid { animation:endurance-arrive 420ms var(--endurance-ease) 80ms both; }
  .training-stack > :not(.training-nav) { animation-timing-function:var(--endurance-ease); }
}
@media(max-width:1100px) {
  .homecal-coach-focus { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
  .homecal-focus-state { grid-column:1/-1;display:flex;align-items:baseline;flex-wrap:wrap;gap:7px 15px; }
}
@media(max-width:760px) {
  .homecal-plan-note { align-items:flex-start;flex-direction:column;gap:4px; }
  .homecal { padding:16px 13px;border-radius:10px; }
  .homecal-header { display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:12px; }
  .homecal-range { font-size:27px; }
  .homecal-header .homecal-eyebrow { font-size:9px; }
  .homecal-photography { width:100px;min-width:0;max-width:none;height:112px;gap:1px;border-radius:4px; }
  .homecal-photography figure:nth-child(2) { display:none; }
  .homecal-photography { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .homecal-photography figcaption { font-size:8px;left:5px;bottom:6px;letter-spacing:.07em; }
  .homecal-toolbar { gap:10px;padding-bottom:13px; }
  .homecal-toolbar .homecal-actions { display:grid;grid-template-columns:minmax(0,1fr) auto auto auto; width:100%; }
  .homecal-toolbar .homecal-actions > .homecal-record { grid-row:2;grid-column:1/-1;min-height:34px; }
  .homecal-actions .btn { font-size:11px;padding-inline:10px; }
  .homecal-toolbar .homecal-actions > .btn.primary { width:100%;padding-inline:10px; }
  .homecal-metrics { gap:15px 0; }
  .homecal-metric { padding:0 11px; }
  .homecal-metric:nth-child(3) { padding-left:0;border-left:0; }
  .homecal-metric strong { font-size:25px; }
  .homecal-metric .homecal-eyebrow { font-size:9px;letter-spacing:.06em; }
  .homecal-metric small { font-size:10px; }
  .homecal-coach-focus { grid-template-columns:minmax(0,1fr);gap:13px;margin-bottom:10px;padding:12px 0 18px; }
  .homecal-coach-focus > .btn { justify-self:start; }
  .homecal-focus-state { gap:5px 10px; }
  .homecal-focus-state b { font-size:12px; }
  .homecal-focus-session h3 { font-size:20px; }
  .homecal.is-list .homecal-day { padding:10px 8px; }
  .homecal.is-list .homecal-event { flex-basis:160px; }
}
@media(prefers-reduced-motion:reduce) {
  .btn,.homecal-day,.aeon-compose-dialog,.aeon-compose-dialog::backdrop,
  .enter .homecal-header,.enter .homecal-metrics,.enter .homecal-grid { animation:none!important;transition:none!important;transform:none!important; }
}

/* Phone: coaching first. Opening AEON answers "what do I do next, when and how hard"
   before week tools and totals. Visual order only; the markup stays as on desktop. */
/* List rows have a 6px radius; the viewport must not clip their corners. */
.homecal.is-list .homecal-viewport { border-radius:8px; }
.homecal-help { margin:0 0 12px; }
.homecal-source .homecal-help { margin:2px 0 0; }
.homecal-help > p.note { margin:4px 0 0;max-width:54ch; }
@media(max-width:600px) {
  .homecal { display:flex;flex-direction:column; }
  .homecal > .homecal-header { order:0;display:block;margin-bottom:8px; }
  .homecal > .homecal-header .homecal-photography { display:none; }
  .homecal > .homecal-header .homecal-range { font-size:21px;letter-spacing:-.02em; }
  .homecal > .homecal-plan-note { order:1; }
  /* Session first, week second: the week title moves below today's plan. */
  .homecal > .homecal-header { order:3;margin-bottom:10px; }
  .homecal > .homecal-coach-focus { order:2;gap:10px;margin-bottom:14px;padding:0 0 16px;border-top:0;border-bottom:1px solid var(--line); }
  .homecal-focus-session h3 { font-size:26px;line-height:1.1;letter-spacing:-.02em; }
  .homecal-focus-dose { font-size:14px;color:var(--text); }
  .homecal > .homecal-toolbar { order:3;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;padding-bottom:0;border-bottom:0; }
  .homecal-toolbar .homecal-actions { display:flex;width:auto;gap:6px; }
  /* Planning and logging stay in the day panel right below the week. */
  .homecal-toolbar .homecal-actions > .btn { display:none; }
  .homecal > .homecal-viewport { order:4; }
  .homecal > .homecal-detail { order:5; }
  .homecal > .homecal-volume { order:6;margin:16px 0 0;padding-top:16px;border-top:1px solid var(--line); }
  .homecal > .homecal-footer { order:7; }
  .homecal-footer > span { display:none; }
  /* Week list: free days are one line, training days carry the detail. */
  .homecal.is-list .homecal-day { grid-template-columns:50px minmax(0,1fr); }
  .homecal.is-list .homecal-dayfoot { display:none; }
  .homecal.is-list .homecal-day:has(.homecal-empty) { min-height:44px;padding-block:8px;align-items:center; }
  .homecal.is-list .homecal-day:has(.homecal-empty) .homecal-daytop { display:flex;align-items:baseline;gap:6px;grid-row:auto; }
  .homecal.is-list .homecal-day:has(.homecal-empty) .homecal-daynum { font-size:15px; }
  .homecal.is-list .homecal-day:has(.homecal-empty) .homecal-empty { min-height:0;color:var(--text-3); }
}
@media(max-width:600px) and (prefers-reduced-motion:no-preference) {
  .homecal-day { transition:transform .1s ease-out,background-color .18s ease,border-color .18s ease; }
  .homecal-day:active { transform:scale(.985); }
}

/* The week board is a flat stack section (hairline on top); its own box border
   left side lines hugging the content. */
.stack > .card.weekboard { border-inline:0;border-bottom:0; }

/* Reihenfolge auf Heute kommt allein aus app.js (keine CSS-Umsortierung). */


/* Day panel tools: one collapsible block. Open on desktop, folded on the phone for today. */
.homecal-manage > summary { list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:44px;cursor:pointer; }
.homecal-manage > summary::-webkit-details-marker { display:none; }
.homecal-manage > summary h4 { margin:0; }
.homecal-manage > summary::after { content:"";width:8px;height:8px;border-right:1.5px solid var(--text-3);border-bottom:1.5px solid var(--text-3);transform:rotate(45deg);transition:transform .18s ease;margin-right:4px; }
.homecal-manage[open] > summary::after { transform:rotate(-135deg); }
.homecal-manage[open] > summary { margin-bottom:6px; }
@media(min-width:601px) {
  .homecal-manage > summary { pointer-events:none;min-height:0; }
  .homecal-manage > summary::after { display:none; }
  .homecal-manage > summary h4 { margin:0 0 9px; }
  .homecal-manage[open] > summary { margin-bottom:0; }
}
@media(max-width:600px) { .today-todo-top { margin-bottom:12px; } }
@media(prefers-reduced-motion:reduce) { .homecal-manage > summary::after { transition:none; } }
