/* Shared shell. Phone < 768px: sticky translucent header + bottom tab bar.
   Tablet 768–991px: icon rail. Desktop >= 992px: full sidebar. */
.jito-workspace { min-width: 0; }
.jito-brand { display: flex; flex-direction: column; min-width: 0; color: var(--jito-text-primary); text-decoration: none; line-height: 1.4; padding: var(--jito-space-2) 0; }
.jito-brand-name { display: inline-flex; align-items: center; gap: var(--jito-space-2); font-size: 1.5rem; letter-spacing: .04em; font-weight: 700; line-height: 1.2; }
.jito-brand-mark { width: 2.5rem; height: 2.5rem; object-fit: contain; flex: none; }
.jito-tenant-name { font-size: var(--jito-type-label); color: var(--jito-text-secondary); overflow-wrap: anywhere; }

/* Header: stays on screen like an iOS navigation bar. */
.jito-header { position: sticky; top: 0; z-index: var(--jito-z-sticky); display: flex; align-items: center; gap: var(--jito-space-3); min-height: calc(var(--jito-mobile-header-height) + env(safe-area-inset-top, 0px)); padding: calc(var(--jito-space-1) + env(safe-area-inset-top, 0px)) max(var(--jito-space-4), env(safe-area-inset-right, 0px)) var(--jito-space-1) max(var(--jito-space-4), env(safe-area-inset-left, 0px)); isolation: isolate; border-bottom: 1px solid transparent; transition: border-color var(--jito-transition-color); }
/* Frosted bars. The blur sits on a pseudo-element: backdrop-filter on the bar itself would make it
   the containing block of the fixed-position quick-create sheet nested inside the tab bar. */
.jito-header::before, .jito-bottom-nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--jito-bar-bg); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .jito-header::before, .jito-bottom-nav::before { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .jito-header::before, .jito-bottom-nav::before { background: var(--jito-surface); }
}
.jito-header.is-condensed { border-bottom-color: var(--jito-border); }
.jito-header-brand { flex: 1 1 auto; min-width: 0; }
.jito-header-brand .jito-brand { flex-direction: row; align-items: center; gap: var(--jito-space-3); min-height: 2.75rem; padding: var(--jito-space-1) 0; }
.jito-header-brand .jito-brand-name { flex: none; white-space: nowrap; font-size: 1.125rem; gap: .5rem; line-height: 1; }
.jito-header-brand .jito-brand-mark { width: 2.5rem; height: 2.5rem; }
/* The temple name is secondary: smaller, lighter, set off by a hairline. */
.jito-header-brand .jito-tenant-name { min-width: 0; padding-left: var(--jito-space-3); border-left: 1px solid var(--jito-border-strong); font-size: var(--jito-type-micro); font-weight: 400; line-height: 1; color: var(--jito-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jito-back { display: inline-flex; flex: none; align-items: center; gap: .125rem; min-height: 2.75rem; min-width: 2.75rem; margin-left: calc(-1 * var(--jito-space-2)); padding: 0 var(--jito-space-2) 0 0; color: var(--jito-accent); font-size: 1.0625rem; text-decoration: none; border-radius: var(--jito-radius-medium); max-width: 40%; }
.jito-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* is-pressed (set by shell.js on tap until the next page loads) gives header buttons the same tint as :active. */
.jito-back.is-pressed, .jito-mobile-search.is-pressed, .jito-search-button.is-pressed { background: var(--jito-accent-subtle); color: var(--jito-accent); }
.jito-back .jito-icon { width: var(--jito-icon-lg); height: var(--jito-icon-lg); stroke-width: 2.1; }
/* With a back link the phone header shows the page title (after scrolling) instead of the brand. */
.jito-header-title { display: none; position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 13rem); margin: 0; font-size: 1.0625rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity var(--jito-transition-color); pointer-events: none; }
.jito-header.is-condensed .jito-header-title { opacity: 1; }
.jito-mobile-search { display: inline-flex; align-items: center; justify-content: center; gap: var(--jito-space-2); min-height: 2.75rem; min-width: 2.75rem; margin-left: auto; text-decoration: none; font-weight: 700; flex: none; color: var(--jito-accent); border-radius: var(--jito-radius-medium); }
.jito-mobile-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jito-search { display: none; position: relative; flex: 0 1 28rem; min-width: 0; max-width: 100%; align-items: center; gap: var(--jito-space-2); margin-left: auto; }
.jito-search input { flex: 1 1 0; width: 0; min-width: 0; min-height: 2.75rem; padding-right: 2.5rem; border-radius: var(--jito-radius-small); }
.jito-search-kbd { position: absolute; right: 6.25rem; pointer-events: none; }
.jito-search input:focus ~ .jito-search-kbd, .jito-search input:not(:placeholder-shown) ~ .jito-search-kbd { display: none; }
/* The PC search button is a secondary-button shape (surface + strong 1px edge), so it does not read as plain body text. */
.jito-search-button { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: var(--jito-space-2); border: 1px solid var(--jito-border-strong); background: var(--jito-surface); color: var(--jito-accent); padding: var(--jito-space-2); min-width: 5rem; min-height: 2.75rem; white-space: nowrap; font-weight: 700; border-radius: var(--jito-radius-medium); }
.jito-shortcut-button { display: none; flex: none; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--jito-border); border-radius: var(--jito-radius-medium); background: var(--jito-surface); color: var(--jito-text-secondary); }
.jito-kbd { display: inline-block; min-width: 1.6em; padding: .05em .45em; border: 1px solid var(--jito-border); border-bottom-width: 2px; border-radius: var(--jito-radius-small); background: var(--jito-surface-muted); color: var(--jito-text-secondary); font: 600 .8125rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }

.jito-main { width: 100%; max-width: var(--jito-max-content-width); margin: 0 auto; padding: var(--jito-space-4) max(var(--jito-space-4), env(safe-area-inset-right, 0px)) var(--jito-space-7) max(var(--jito-space-4), env(safe-area-inset-left, 0px)); min-width: 0; overflow-wrap: anywhere; }
.jito-app--tenant .jito-main { padding-bottom: calc(var(--jito-mobile-nav-height) + env(safe-area-inset-bottom, 0px) + var(--jito-space-7)); }

/* Sidebar / rail navigation. */
.jito-sidebar { display: none; }
.jito-nav-link { display: flex; align-items: center; gap: var(--jito-space-3); min-height: 2.75rem; padding: var(--jito-space-2) var(--jito-space-3); color: var(--jito-text-secondary); text-decoration: none; border-radius: var(--jito-radius-medium); border: 0; background: transparent; width: 100%; text-align: left; font-size: var(--jito-type-secondary); transition: background-color var(--jito-transition-color), color var(--jito-transition-color), transform var(--jito-transition-color); }
.jito-nav-link span { min-width: 0; overflow-wrap: anywhere; }
/* is-pressed (set by shell.js on tap until the next page loads) mirrors the selected look. */
.jito-nav-link.is-active, .jito-nav-link.is-pressed { background: var(--jito-accent-subtle); color: var(--jito-accent); font-weight: 700; }
.jito-nav-link.is-active .jito-icon, .jito-nav-link.is-pressed .jito-icon { fill: currentColor; fill-opacity: .16; stroke-width: 2.1; }
.jito-tab.is-active .jito-icon, .jito-tab.is-pressed .jito-icon { fill: currentColor; fill-opacity: .16; stroke-width: 2.1; }
.jito-nav-group + .jito-nav-group { margin-top: var(--jito-space-4); }
.jito-nav-heading { color: var(--jito-text-secondary); font-size: var(--jito-type-metadata); font-weight: 400; margin: var(--jito-space-2) var(--jito-space-3) var(--jito-space-1); }
.jito-sidebar-user { display: flex; align-items: center; gap: var(--jito-space-2); margin: var(--jito-space-2) var(--jito-space-3) 0; color: var(--jito-text-secondary); font-size: var(--jito-type-metadata); min-width: 0; }
.jito-sidebar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jito-sidebar-user .jito-icon { width: var(--jito-icon-md); height: var(--jito-icon-md); }

/* Generic native-details menu (account menu on non-tenant pages). */
.jito-menu { position: relative; }
.jito-menu summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; }
.jito-menu summary::-webkit-details-marker { display: none; }
.jito-menu-panel { position: absolute; z-index: var(--jito-z-menu); right: 0; top: calc(100% + var(--jito-space-2)); width: min(22rem, calc(100vw - 2rem)); padding: var(--jito-space-3); background: var(--jito-surface-elevated); border: 1px solid var(--jito-border); border-radius: var(--jito-radius-large); box-shadow: var(--jito-shadow-popover); max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain; }
.jito-account-menu { margin-left: auto; }

/* Bottom tab bar (phone). Columns follow the number of permitted tabs; nothing is shown disabled. */
.jito-bottom-nav { position: fixed; z-index: var(--jito-z-tabbar); bottom: 0; left: 0; right: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: start; min-height: var(--jito-mobile-nav-height); isolation: isolate; border-top: 1px solid var(--jito-border); padding: var(--jito-space-1) max(var(--jito-space-2), env(safe-area-inset-right, 0px)) calc(var(--jito-space-1) + env(safe-area-inset-bottom, 0px)) max(var(--jito-space-2), env(safe-area-inset-left, 0px)); }
.jito-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .125rem; min-height: 3.5rem; padding: .25rem 0; color: var(--jito-text-secondary); min-width: 0; font-size: .6875rem; font-weight: 400; line-height: var(--jito-leading-tight); text-align: center; text-decoration: none; border-radius: var(--jito-radius-medium); transition: color var(--jito-transition-color), transform var(--jito-transition-color); }
.jito-tab > span { max-width: 100%; overflow-wrap: anywhere; word-break: keep-all; } /* 5 tabs at the largest text size wrap inside their column instead of overflowing */
.jito-tab .jito-icon { width: var(--jito-icon-lg); height: var(--jito-icon-lg); }
.jito-tab.is-active, .jito-tab.is-pressed { color: var(--jito-accent); font-weight: 700; }

/* Quick create: a centred button in the tab bar that opens a bottom sheet. */
.jito-create-toggle { display: flex; align-items: center; justify-content: center; gap: var(--jito-space-2); padding: var(--jito-space-2) var(--jito-space-3); background: var(--jito-accent); color: var(--jito-on-accent); border-radius: var(--jito-radius-pill); font-size: var(--jito-type-label); font-weight: 700; list-style: none; transition: transform var(--jito-transition-color), background-color var(--jito-transition-color); }
.jito-create-toggle::-webkit-details-marker { display: none; }
.jito-bottom-nav .jito-menu { position: static; display: flex; justify-content: center; }
.jito-quick-create--mobile .jito-create-toggle { flex-direction: column; gap: 0; width: 3.25rem; height: 3.25rem; min-height: 0; margin-top: .125rem; padding: 0; border-radius: var(--jito-radius-medium); font-size: 0; box-shadow: var(--jito-shadow-subtle); }
.jito-quick-create--mobile .jito-create-toggle .jito-icon { width: var(--jito-icon-lg); height: var(--jito-icon-lg); stroke-width: 2.1; }
.jito-quick-create--mobile .jito-create-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jito-quick-create:not([open]) > .jito-create-panel, .jito-quick-create:not([open]) > .jito-create-backdrop { display: none; }
/* Without JS the toggle stays reachable above the scrim, so tapping it again closes the sheet. */
.jito-quick-create[open]:not([data-menu-enhanced]) > .jito-create-toggle { position: relative; z-index: calc(var(--jito-z-sheet) + 2); }
.jito-create-backdrop { position: fixed; z-index: var(--jito-z-scrim); inset: 0 0 calc(var(--jito-mobile-nav-height) + env(safe-area-inset-bottom, 0px)); background: var(--jito-scrim); animation: jito-fade-in var(--jito-transition-sheet); }
.jito-quick-create[data-menu-enhanced] > .jito-create-backdrop { inset: 0; }
.jito-create-panel { position: fixed; z-index: var(--jito-z-sheet); inset: auto 0 0 0; display: flex; flex-direction: column; width: auto; max-width: 40rem; margin: 0 auto; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--jito-space-6)); padding: var(--jito-space-3) max(var(--jito-space-5), env(safe-area-inset-right, 0px)) calc(var(--jito-space-5) + env(safe-area-inset-bottom, 0px)) max(var(--jito-space-5), env(safe-area-inset-left, 0px)); background: var(--jito-surface-elevated); border-radius: var(--jito-radius-large) var(--jito-radius-large) 0 0; box-shadow: var(--jito-shadow-sheet); overflow-wrap: anywhere; animation: jito-sheet-up var(--jito-transition-sheet); touch-action: pan-y; }
.jito-quick-create:not([data-menu-enhanced]) > .jito-create-panel { bottom: calc(var(--jito-mobile-nav-height) + env(safe-area-inset-bottom, 0px)); }
.jito-create-panel::before { content: ""; display: block; flex: none; width: 2.25rem; height: .3125rem; margin: 0 auto var(--jito-space-3); border-radius: var(--jito-radius-pill); background: var(--jito-border); }
.jito-create-panel.is-dragging { animation: none; transition: none; }
.jito-create-heading { display: flex; flex: none; justify-content: space-between; align-items: flex-start; gap: var(--jito-space-3); padding-bottom: var(--jito-space-4); }
.jito-create-heading > div { min-width: 0; }
.jito-create-heading h2 { font-size: var(--jito-type-overlay-title); font-weight: 700; margin: 0 0 var(--jito-space-1); }
.jito-create-heading p { color: var(--jito-text-secondary); font-size: var(--jito-type-secondary); margin: 0; }
.jito-create-close { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: var(--jito-space-1); min-height: 2.75rem; min-width: 2.75rem; padding: var(--jito-space-2); border: 0; border-radius: var(--jito-radius-pill); background: var(--jito-surface-muted); color: var(--jito-text-primary); font-size: var(--jito-type-label); }
.jito-create-close[hidden] { display: none; }
.jito-create-close:has(> span) { border-radius: var(--jito-radius-small); } /* a labelled button is not a round icon button */
.jito-create-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--jito-space-2); margin: calc(-1 * var(--jito-space-2)); }
.jito-create-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--jito-space-3); }
.jito-create-card { --create-color: var(--jito-text-secondary); --create-bg: var(--jito-surface-muted); display: flex; align-items: center; gap: var(--jito-space-3); min-height: 4.75rem; padding: var(--jito-space-3) var(--jito-space-4); border: 1px solid var(--jito-border); border-radius: var(--jito-radius-medium); background: var(--jito-surface); color: var(--jito-text-primary); text-decoration: none; transition: transform var(--jito-transition-color), background-color var(--jito-transition-color); }
.jito-create-icon { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: var(--jito-radius-medium); background: var(--create-bg); color: var(--create-color); }
.jito-create-copy { display: flex; flex-direction: column; gap: var(--jito-space-1); min-width: 0; flex: 1; }
.jito-create-copy strong { font-size: var(--jito-type-card-title); font-weight: 700; }
.jito-create-copy > span { color: var(--jito-text-secondary); font-size: var(--jito-type-label); font-weight: 400; }
.jito-create-card > .jito-icon { width: var(--jito-icon-sm); height: var(--jito-icon-sm); color: var(--jito-text-secondary); }
.jito-create-card--ceremony { --create-color: var(--jito-ceremony); --create-bg: var(--jito-ceremony-subtle); }
.jito-create-card--schedule { --create-color: var(--jito-schedule); --create-bg: var(--jito-schedule-subtle); }
.jito-create-card--household { --create-color: var(--jito-success); --create-bg: var(--jito-success-subtle); }
.jito-create-card--person { --create-color: var(--jito-person); --create-bg: var(--jito-person-subtle); }
.jito-create-card--visit { --create-color: var(--jito-warning); --create-bg: var(--jito-warning-subtle); }
.jito-create-secondary-title { font-size: var(--jito-type-label); color: var(--jito-text-secondary); margin: var(--jito-space-5) 0 var(--jito-space-3); }
.jito-create-help { font-size: var(--jito-type-metadata); color: var(--jito-text-secondary); margin: var(--jito-space-4) 0 0; }
body.jito-sheet-open { overflow: hidden; }
@keyframes jito-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes jito-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes jito-dialog-in { from { opacity: 0; transform: translateY(-50%) scale(.97); } to { opacity: 1; transform: translateY(-50%); } }

.jito-skip-link { position: fixed; z-index: var(--jito-z-skip); top: .5rem; left: 1rem; transform: translateY(-200%); padding: .5rem 1rem; background: var(--jito-surface); color: var(--jito-accent); border-radius: var(--jito-radius-small); }
.jito-skip-link:focus { transform: none; }

@media (hover: hover) {
  .jito-brand:hover { color: var(--jito-accent); }
  .jito-nav-link:hover { background: var(--jito-surface-muted); color: var(--jito-text-primary); }
  .jito-nav-link.is-active:hover, .jito-nav-link.is-pressed:hover { background: var(--jito-accent-subtle); color: var(--jito-accent); }
  .jito-tab:hover { color: var(--jito-text-primary); }
  .jito-tab.is-active:hover, .jito-tab.is-pressed:hover { color: var(--jito-accent); }
  .jito-create-card:hover { background: var(--create-bg); border-color: var(--create-color); color: var(--jito-text-primary); }
  .jito-create-close:hover { background: var(--jito-accent-subtle); }
  .jito-search-button:hover, .jito-mobile-search:hover, .jito-shortcut-button:hover { background: var(--jito-accent-subtle); color: var(--jito-accent); }
  .jito-back:hover span { text-decoration: underline; }
  .jito-back.is-pressed:hover, .jito-mobile-search.is-pressed:hover, .jito-search-button.is-pressed:hover { background: var(--jito-accent-subtle); color: var(--jito-accent); }
}

/* Phone: brand gives way to the back link; the condensed title appears on scroll. */
@media (max-width: 767.98px) {
  .jito-header-brand.has-back { display: none; }
  .jito-header-title { display: block; }
}

@media (min-width: 768px) {
  .jito-main, .jito-header { padding-left: max(var(--jito-space-6), env(safe-area-inset-left, 0px)); padding-right: max(var(--jito-space-6), env(safe-area-inset-right, 0px)); }
  .jito-app--tenant .jito-workspace { margin-left: var(--jito-tablet-rail-width); }
  .jito-app--tenant .jito-main { padding-bottom: var(--jito-space-7); }
  .jito-bottom-nav, .jito-app--tenant .jito-header-brand { display: none; }
  .jito-app--tenant .jito-header { min-height: 4rem; padding-top: var(--jito-space-2); padding-bottom: var(--jito-space-2); }
  .jito-back { margin-left: 0; padding: 0 var(--jito-space-3) 0 var(--jito-space-1); background: var(--jito-surface); border: 1px solid var(--jito-border); font-size: var(--jito-type-secondary); font-weight: 700; }
  .jito-back .jito-icon { width: var(--jito-icon-md); height: var(--jito-icon-md); }
  .jito-sidebar { display: flex; flex-direction: column; align-items: stretch; position: fixed; z-index: var(--jito-z-sticky); inset: 0 auto 0 0; width: var(--jito-tablet-rail-width); padding: calc(var(--jito-space-4) + env(safe-area-inset-top, 0px)) var(--jito-space-2) calc(var(--jito-space-4) + env(safe-area-inset-bottom, 0px)) max(var(--jito-space-2), env(safe-area-inset-left, 0px)); background: var(--jito-surface); border-right: 1px solid var(--jito-border); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .jito-sidebar-nav { display: flex; flex: 1 0 auto; flex-direction: column; }
  .jito-sidebar-account { margin-top: auto; padding-top: var(--jito-space-4); }
  .jito-sidebar:has(.jito-quick-create[open]) { z-index: var(--jito-z-sheet); }
  .jito-create-backdrop { inset: 0; }
  .jito-create-panel { inset: 50% var(--jito-space-6) auto; transform: translateY(-50%); max-width: 44rem; max-height: calc(100dvh - var(--jito-space-7) * 2); padding: var(--jito-space-6); border-radius: var(--jito-radius-large); animation: jito-dialog-in var(--jito-transition-sheet); }
  .jito-quick-create:not([data-menu-enhanced]) > .jito-create-panel { bottom: auto; }
  .jito-create-panel::before { display: none; }
  .jito-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jito-search, .jito-shortcut-button:not([hidden]) { display: flex; }
  .jito-search ~ .jito-mobile-search, .jito-mobile-search:has(~ .jito-search) { display: none; }
}

/* Tablet rail: icons with short labels, like an iPad sidebar collapsed to a rail. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .jito-sidebar > .jito-brand { align-items: center; padding: 0 0 var(--jito-space-4); }
  .jito-sidebar > .jito-brand .jito-brand-name { flex-direction: column; gap: 0; font-size: .75rem; letter-spacing: .05em; }
  .jito-sidebar .jito-tenant-name, .jito-sidebar .jito-nav-heading, .jito-sidebar-user { display: none; }
  .jito-sidebar > .jito-quick-create { display: flex; justify-content: center; margin-bottom: var(--jito-space-3); }
  .jito-sidebar .jito-create-toggle { width: 3rem; height: 3rem; padding: 0; border-radius: var(--jito-radius-medium); font-size: 0; }
  .jito-sidebar .jito-create-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .jito-sidebar .jito-nav-link { flex-direction: column; justify-content: center; gap: .125rem; min-height: 3.5rem; padding: var(--jito-space-1); font-size: .6875rem; line-height: var(--jito-leading-tight); text-align: center; }
  .jito-sidebar .jito-nav-link span { overflow-wrap: anywhere; word-break: keep-all; }
  .jito-sidebar .jito-nav-group + .jito-nav-group { margin-top: var(--jito-space-2); padding-top: var(--jito-space-2); border-top: 1px solid var(--jito-border); }
}

@media (min-width: 992px) {
  .jito-app--tenant .jito-workspace { margin-left: var(--jito-sidebar-width); }
  .jito-sidebar { width: var(--jito-sidebar-width); padding: var(--jito-space-5) var(--jito-space-4) var(--jito-space-5) max(var(--jito-space-4), env(safe-area-inset-left, 0px)); scrollbar-gutter: stable; }
  .jito-sidebar > .jito-brand { padding: 0 var(--jito-space-3) var(--jito-space-5); }
  .jito-sidebar > .jito-quick-create { margin: 0 var(--jito-space-3) var(--jito-space-5); }
  .jito-app--tenant .jito-header { min-height: 4.5rem; }
}

/* Native-app feel. Controls react to the first tap, app chrome is not selectable text, and a
   keyboard-focused field is never hidden behind the sticky header or the tab bar. */
html { scroll-padding-top: calc(var(--jito-mobile-header-height) + env(safe-area-inset-top, 0px) + var(--jito-space-3)); }
@media (max-width: 767.98px) {
  html:has(.jito-app--tenant) { scroll-padding-bottom: calc(var(--jito-mobile-nav-height) + env(safe-area-inset-bottom, 0px) + var(--jito-space-3)); }
}
@media (min-width: 992px) {
  html { scroll-padding-top: calc(4.5rem + var(--jito-space-3)); }
}
.jito-app a, .jito-app button, .jito-app summary, .jito-app label, .jito-app select, .jito-app input, .jito-app [role="button"] { touch-action: manipulation; }
.jito-bottom-nav, .jito-nav-link, .jito-back, .jito-header-brand, .jito-button, .jito-main .btn, .jito-app summary {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
body.jito-keyboard-open .jito-bottom-nav { display: none; }

/* Page transitions: a short cross-fade (browsers without cross-document view transitions simply
   navigate as before). The bars are deliberately not given a view-transition-name: that would make
   them the containing block of the fixed sheet nested in the tab bar and break their frosted blur. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Busy indicator: an ink-stroke bar at the top, an ensō (one open brush circle) on buttons and in the long-wait card. */
/* The bar is a pale full-width track; the ink (::before) runs across it. The ink is a child so that it paints above the track. */
/* WebKit holds CSS animations at their first frame while a form navigation is pending, so every first frame here is
   already a visible state: ink at the left edge, a whole ensō, an opaque card. */
.jito-progress { position: fixed; z-index: var(--jito-z-toast); top: env(safe-area-inset-top, 0px); left: 0; width: 100%; height: 3px; overflow: hidden; background: var(--jito-accent-subtle); opacity: 0; pointer-events: none; }
.jito-progress::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--jito-accent) 35%, var(--jito-accent) 65%, transparent); transform: translateX(-50%); }
html.is-navigating .jito-progress { opacity: 1; }
html.is-navigating .jito-progress::before { animation: jito-progress-slide 1.6s ease-in-out infinite; }
@keyframes jito-progress-slide { from { transform: translateX(-50%); } to { transform: translateX(250%); } }
.jito-enso { display: inline-block; flex: none; width: 1.125em; height: 1.125em; animation: jito-enso-turn 2.4s linear infinite; }
.jito-enso-stroke { fill: currentColor; }
@keyframes jito-enso-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  /* No looping motion: the ink stands still across the whole bar; elapsed seconds in the notice show progress. */
  html.is-navigating .jito-progress::before { width: 100%; transform: none; animation: none; }
  .jito-enso { animation: none; }
  .jito-busy-notice { animation: none; }
}

/* Busy submit button: the label stays in the layout (hidden) so the width does not change. */
.jito-app button.is-busy { position: relative; }
.jito-busy-label { visibility: hidden; }
.jito-busy-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .5em; padding-inline: .375em; font-weight: 400; white-space: nowrap; }
.jito-busy-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Long-wait card: above the phone tab bar (and its safe area); at the bottom edge of the content area on larger screens. */
.jito-busy-notice { position: fixed; z-index: var(--jito-z-toast); left: 0; right: 0; margin-inline: auto; bottom: calc(var(--jito-mobile-nav-height) + env(safe-area-inset-bottom, 0px) + var(--jito-space-3)); width: min(28rem, calc(100% - var(--jito-space-6))); display: flex; align-items: flex-start; gap: var(--jito-space-3); padding: var(--jito-space-4); background: var(--jito-surface); color: var(--jito-text-primary); border: 1px solid var(--jito-border); border-radius: var(--jito-radius-medium); box-shadow: var(--jito-shadow-floating); font-family: var(--jito-font-sans); font-size: var(--jito-type-body); font-weight: 400; line-height: 1.75rem; animation: jito-busy-rise var(--jito-duration-base) var(--jito-ease) both; }
.jito-busy-notice[hidden] { display: none; }
@keyframes jito-busy-rise { from { transform: translateY(8px); } to { transform: none; } }
.jito-busy-notice .jito-enso { width: 1.75rem; height: 1.75rem; color: var(--jito-accent); }
.jito-busy-copy { display: flex; flex-direction: column; gap: var(--jito-space-1); min-width: 0; }
.jito-busy-phrase { display: inline-block; }
.jito-busy-elapsed { color: var(--jito-text-secondary); font-size: var(--jito-type-label); line-height: 1.25rem; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .jito-busy-notice { bottom: calc(var(--jito-space-4) + env(safe-area-inset-bottom, 0px)); } .jito-app--tenant .jito-busy-notice { left: var(--jito-tablet-rail-width); } }
@media (min-width: 992px) { .jito-app--tenant .jito-busy-notice { left: var(--jito-sidebar-width); } }
body.jito-keyboard-open .jito-busy-notice { bottom: calc(var(--jito-space-3) + env(safe-area-inset-bottom, 0px)); }

/* Phone tab bar "メニュー": pulls a link list up above the tab bar.
   The panel is absolutely positioned against the fixed tab bar, so it always sits exactly on top
   of it whatever the safe-area padding, and the tab bar itself stays tappable (tap again = close). */
.jito-tab[hidden], .jito-bottom-nav .jito-menu-sheet[hidden] { display: none; }
.jito-bottom-nav .jito-menu-sheet { display: flex; align-items: stretch; justify-content: stretch; }
.jito-menu-sheet > summary.jito-tab { flex: 1 1 auto; min-height: 3.5rem; list-style: none; cursor: pointer; }
.jito-menu-sheet > summary::-webkit-details-marker { display: none; }
/* Open: the menu tab takes the selected look; the tab of the current page steps back meanwhile. */
.jito-menu-sheet[open] > summary.jito-tab { color: var(--jito-accent); font-weight: 700; }
.jito-menu-sheet[open] > summary.jito-tab .jito-icon { fill: currentColor; fill-opacity: .16; stroke-width: 2.1; }
.jito-bottom-nav:has(.jito-menu-sheet[open]) a.jito-tab.is-active { color: var(--jito-text-secondary); font-weight: 400; }
.jito-bottom-nav:has(.jito-menu-sheet[open]) a.jito-tab.is-active .jito-icon { fill: none; stroke-width: 1.7; } /* back to the resting icon */
.jito-menu-sheet:not([open]) > .jito-menu-sheet-panel, .jito-menu-sheet:not([open]) > .jito-menu-sheet-backdrop { display: none; }
.jito-menu-sheet-backdrop { position: absolute; left: 0; right: 0; bottom: 100%; height: 100dvh; background: var(--jito-scrim); animation: jito-fade-in var(--jito-transition-sheet); }
.jito-menu-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 100%;
  /* At most 3/4 of the screen and never over the header, so there is always backdrop to tap. */
  max-height: min(75dvh, calc(100dvh - var(--jito-mobile-header-height) - env(safe-area-inset-top, 0px) - var(--jito-mobile-nav-height) - env(safe-area-inset-bottom, 0px) - var(--jito-space-6)));
  overflow-y: auto; overscroll-behavior: contain;
  padding: var(--jito-space-4) max(var(--jito-space-4), env(safe-area-inset-right, 0px)) var(--jito-space-3) max(var(--jito-space-4), env(safe-area-inset-left, 0px));
  background: var(--jito-surface-muted); border-top: 1px solid var(--jito-border);
  border-radius: var(--jito-radius-large) var(--jito-radius-large) 0 0; box-shadow: var(--jito-shadow-sheet);
  overflow-wrap: anywhere; animation: jito-menu-sheet-in var(--jito-transition-sheet);
}
/* Compact rows: every link stays >= 44px, headings split the groups. */
.jito-menu-sheet-panel.is-dragging { animation: none; transition: none; }
.jito-menu-sheet-panel::before { content: ""; display: block; width: 2.25rem; height: .3125rem; margin: calc(var(--jito-space-2) * -1) auto var(--jito-space-2); border-radius: var(--jito-radius-pill); background: var(--jito-border); }
.jito-menu-sheet-head { display: flex; justify-content: flex-end; margin-bottom: var(--jito-space-2); }
.jito-menu-sheet-panel .jito-list-section + .jito-list-section { margin-top: var(--jito-space-4); }
.jito-menu-sheet-panel .jito-list-title { margin: 0 var(--jito-space-3) var(--jito-space-1); }
.jito-menu-sheet-panel .jito-list-row { min-height: 2.75rem; padding: var(--jito-space-1) var(--jito-space-3); }
.jito-menu-sheet-panel .jito-list-row + .jito-list-row { box-shadow: inset 3.25rem 1px 0 var(--jito-row-fill, var(--jito-surface)), inset 0 1px 0 var(--jito-border); }
.jito-menu-sheet-panel .jito-list-icon { width: 1.75rem; height: 1.75rem; border-radius: var(--jito-radius-small); }
.jito-menu-sheet-panel .jito-list-icon .jito-icon { width: var(--jito-icon-sm); height: var(--jito-icon-sm); }
.jito-menu-sheet-panel .jito-empty-note { margin: 0 0 var(--jito-space-3); }
@keyframes jito-menu-sheet-in { from { opacity: 0; transform: translateY(.75rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .jito-menu-sheet-panel, .jito-menu-sheet-backdrop { animation: none; } }
/* The group clips its rows (overflow: hidden), so the focus ring is drawn inside the row. */
.jito-menu-sheet-panel .jito-list-row:focus-visible { outline-offset: -3px; box-shadow: inset 0 0 0 5px var(--jito-focus-inner); border-radius: var(--jito-radius-medium); }
