/* Main navigation: one panel, two states (html[data-nav]) at every width; overlay below 1024px. */
:root{--logo-disc:#fff;--logo-disc-stroke:#4f46e5;--logo-ink:#4f46e5}
[data-theme=dark]{--logo-disc:#4f46e5;--logo-disc-stroke:#4f46e5;--logo-ink:#fff}
/* Only where the panel is a column; below 1024px the shell sets --nav to 0 (overlay). */
@media(min-width:1024px){html[data-nav=collapsed]{--nav:72px}}
/* The panel width is the first grid track, so the shell animates the track, not the aside. */
.app-shell{transition:grid-template-columns .28s cubic-bezier(.4,0,.2,1)}
.brand{position:relative;height:56px;flex:0 0 56px;display:flex;align-items:flex-start;gap:0;padding:8px 0 0 16px;border:0;border-bottom:1px solid var(--border-subtle);background:transparent;color:var(--text-primary);cursor:pointer;text-align:left;width:100%;overflow:hidden;border-radius:0}
.brand:hover{background:var(--surface-hover)}
.brand:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-3px}
.brand-mark{flex:none;display:block;overflow:visible}
.brand-mark *{transition:transform .28s cubic-bezier(.4,0,.2,1),stroke-dashoffset .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1)}
.bm-disc{fill:var(--logo-disc);stroke:var(--logo-disc-stroke);stroke-width:2}
.bm-bar{stroke:var(--logo-ink);stroke-width:2;stroke-linecap:round}
.bm-dot{fill:var(--logo-ink);opacity:.85}
.bm-hand{stroke:var(--logo-ink);stroke-width:4.2;stroke-linecap:round}
.bm-hand-thin{stroke-width:3}
.bm-pivot{fill:var(--logo-ink)}
.bm-hour,.bm-minute{transform-origin:20px 20px}
.bm-hour{transform:rotate(0deg)}
.bm-minute{transform:rotate(68deg)}
.brand:hover .bm-hour{transform:rotate(-12deg)}
/* Wordmark rail: starts where the 3-o'clock bar ends (16px padding + 36.4) and is clipped there,
   so on collapse the whole block slides left "into" the dial as one piece. */
.brand-tail{position:absolute;left:52.4px;top:8px;height:40px;right:0;overflow:hidden;pointer-events:none}
.brand-slide{position:absolute;left:0;top:0;height:40px;width:150px;transition:transform .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1)}
.brand-line{position:absolute;left:0;top:19px;width:84px;height:2px;border-radius:0 1px 1px 0;background:var(--logo-ink)}
.brand-label{position:absolute;left:5.6px;top:3px;font-weight:700;font-size:15.5px;line-height:1;letter-spacing:.5px;white-space:nowrap;color:var(--text-primary)}
html[data-nav=collapsed] .brand-slide{transform:translateX(-100px);opacity:.6}
html[data-nav=collapsed] .bm-hour,.brand-mark-closed .bm-hour{transform:rotate(-45deg)}
html[data-nav=collapsed] .bm-minute,.brand-mark-closed .bm-minute{transform:rotate(45deg)}
html[data-nav=collapsed] .brand:hover .bm-hour{transform:rotate(-45deg)}
.mobile-menu .brand-mark{width:32px;height:32px}
/* Items keep their icon in place in both states (12px list padding + 12px link padding);
   only the label, group heading and footer slide away, on the shell's timing. */
.nav-link{white-space:nowrap;overflow:hidden;transition:width .28s cubic-bezier(.4,0,.2,1),background-color .15s}
/* The list is a flex item: without min-width:0 its min-content (the nowrap group labels)
   makes it wider than the folded panel and the group dividers stick out into the page. */
.nav-body .nav-links{min-width:0}
/* An explicit width: a transition from `auto` cannot be animated, the item would snap. */
.nav-body .nav-link{width:208px}
.nav-link .icon{width:22px;height:22px;flex:none}
.nav-link .nav-label{display:inline-block;max-width:160px;overflow:hidden;transition:max-width .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1)}
.nav-group-label{white-space:nowrap;height:31px;box-sizing:border-box;overflow:hidden;transition:height .28s cubic-bezier(.4,0,.2,1),padding .28s cubic-bezier(.4,0,.2,1),margin .28s cubic-bezier(.4,0,.2,1),background-color .28s,color .28s}
.nav-foot{height:88px;box-sizing:border-box;overflow:hidden;transition:height .28s cubic-bezier(.4,0,.2,1),padding .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1)}
html[data-nav=collapsed] .nav-body .nav-link{width:48px}
html[data-nav=collapsed] .nav-body .nav-link .nav-label{max-width:0;opacity:0;transform:translateX(-8px)}
html[data-nav=collapsed] .nav-body .nav-group-label{height:1px;padding:0;margin:6px 8px;background:var(--border-subtle);color:transparent}
html[data-nav=collapsed] .nav-foot{height:0;padding:0 24px;opacity:0;border-top-width:0}
/* The folded list scrolls when the window is short (tooltips are popovers, so clipping is no issue). */
html[data-nav=collapsed] .nav-body .nav-links{overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
html[data-nav=collapsed] .nav-body .nav-links::-webkit-scrollbar{display:none}
/* ヘルプ stays reachable at the bottom whatever the height. */
.nav-body .nav-group:last-child{position:sticky;bottom:0;margin-bottom:0;padding:6px 0 4px;background:var(--surface);box-shadow:0 -8px 8px -8px rgba(0,0,0,.25)}
/* Tooltip of a folded item: a popover in the top layer, placed by the script beside the item. */
.nav-tip{position:fixed;inset:auto;margin:0;transform:translateY(-50%);border:1px solid var(--border-subtle);background:var(--surface-raised);color:var(--text-primary);font-size:12px;font-weight:400;padding:6px 10px;border-radius:6px;white-space:nowrap;box-shadow:var(--shadow);pointer-events:none}
.nav-tip:before{content:"";position:absolute;right:100%;top:50%;margin-top:-5px;border:5px solid transparent;border-right-color:var(--border-subtle)}
.nav-tip:not(:popover-open){display:none}
@media(max-width:1023px){.app-shell{transition:none}}
@media(prefers-reduced-motion:reduce){.app-shell,.brand-mark *,.brand-slide{transition:none!important}}
